/*
Theme Name: JR Marine
Theme URI: https://wp-sandbox.dev.simonroberts.solutions
Author: Marlow
Description: Custom brochure theme for JR Marine in Salcombe.
Version: 0.1.5
Text Domain: jr-marine
*/

:root {
  --jr-ink: #414345;
  --jr-navy: #627098;
  --jr-harbour: #5b7a86;
  --jr-aqua: #68ccd1;
  --jr-brass: #939393;
  --jr-rust: #627098;
  --jr-paper: #ffffff;
  --jr-foam: #f7f7f7;
  --jr-mist: #f2f2f2;
  --jr-line: #d7dcdf;
  --jr-white: #ffffff;
  --jr-muted: #666666;
  --jr-shadow: 0 18px 44px rgba(65, 67, 69, 0.11);
  --jr-hard-shadow: 0 24px 70px rgba(65, 67, 69, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--jr-ink);
  background: var(--jr-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--jr-harbour);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--jr-navy);
}

.skip-link {
  position: absolute;
  top: -120px;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: var(--jr-white);
  background: var(--jr-navy);
}

.skip-link:focus {
  top: 1rem;
}

.site-shell {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 252, 251, 0.92);
  border-bottom: 1px solid rgba(98, 112, 152, 0.18);
  backdrop-filter: blur(18px);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 36px rgba(65, 67, 69, 0.08);
}

.site-header__inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 1.05rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.site-brand img {
  width: 166px;
  height: auto;
  filter: brightness(0) saturate(100%) invert(45%) sepia(14%) saturate(885%) hue-rotate(186deg) brightness(91%) contrast(90%);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--jr-line);
  border-radius: 2px;
  background: var(--jr-white);
  cursor: pointer;
}

.nav-toggle__line {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--jr-navy);
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(4) {
  transform: translateY(-7px) rotate(-45deg);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.primary-nav {
  margin-left: auto;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.45rem 0.7rem;
  color: var(--jr-ink);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  right: 0.72rem;
  bottom: 0.34rem;
  left: 0.72rem;
  height: 2px;
  background: var(--jr-aqua);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.primary-nav .current-menu-item > a,
.primary-nav a:hover,
.primary-nav a:focus {
  color: var(--jr-navy);
}

.primary-nav .current-menu-item > a::after,
.primary-nav a:hover::after,
.primary-nav a:focus::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  color: var(--jr-white);
  background: var(--jr-navy);
  border: 1px solid var(--jr-navy);
  border-radius: 2px;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.header-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.header-action:hover,
.header-action:focus {
  color: var(--jr-white);
  background: var(--jr-harbour);
  border-color: var(--jr-harbour);
}

.header-action--email {
  color: var(--jr-navy);
  background: transparent;
}

.header-action--email:hover,
.header-action--email:focus {
  color: var(--jr-white);
}

.site-main {
  min-height: 60vh;
}

.hero,
.page-hero {
  position: relative;
  isolation: isolate;
  color: var(--jr-white);
  background-color: var(--jr-navy);
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero {
  min-height: 650px;
  display: grid;
  align-items: center;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(65, 67, 69, 0.82), rgba(98, 112, 152, 0.44) 56%, rgba(91, 122, 134, 0.18)),
    rgba(65, 67, 69, 0.2);
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--jr-aqua), var(--jr-navy), var(--jr-harbour));
}

.hero > .site-shell,
.page-hero > .site-shell {
  position: relative;
  z-index: 1;
}

.hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(280px, 0.48fr);
  gap: 2.4rem;
  align-items: end;
  padding: 5rem 0;
}

.hero__content {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--jr-brass);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: 4.9rem;
  line-height: 0.98;
}

.hero p {
  max-width: 650px;
  margin: 1.05rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.24rem;
  line-height: 1.68;
}

.hero__facts {
  display: grid;
  gap: 0;
  align-self: stretch;
  background: rgba(98, 112, 152, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  backdrop-filter: blur(14px);
  box-shadow: var(--jr-hard-shadow);
  overflow: hidden;
}

.hero__fact {
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.hero__fact:last-child {
  border-bottom: 0;
}

.hero__fact strong {
  display: block;
  color: var(--jr-white);
  font-size: 1.55rem;
  line-height: 1.1;
}

.hero__fact span {
  display: block;
  margin-top: 0.32rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.35;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.65rem;
}

.button,
.wp-block-button__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.76rem 1.05rem;
  color: var(--jr-white);
  background: var(--jr-harbour);
  border: 1px solid var(--jr-harbour);
  border-radius: 2px;
  font-size: 0.96rem;
  font-weight: 850;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus {
  color: var(--jr-white);
  background: var(--jr-navy);
  border-color: var(--jr-navy);
  box-shadow: 0 12px 28px rgba(18, 53, 76, 0.18);
  transform: translateY(-1px);
}

.button--light {
  color: var(--jr-navy);
  background: var(--jr-white);
  border-color: var(--jr-white);
}

.button--light:hover,
.button--light:focus {
  color: var(--jr-white);
}

.button--outline {
  color: var(--jr-white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.72);
}

.button--quiet {
  color: var(--jr-navy);
  background: transparent;
  border-color: var(--jr-line);
}

.button--quiet:hover,
.button--quiet:focus {
  color: var(--jr-white);
}

.section {
  padding: 5.4rem 0;
}

.section--mist {
  background: var(--jr-mist);
}

.section--foam {
  background: var(--jr-foam);
}

.section--tight {
  padding: 3.6rem 0;
}

.section--compact {
  padding: 3.2rem 0;
}

.section__heading {
  max-width: 760px;
  margin: 0 auto 2.6rem;
  text-align: center;
}

.section__heading h2,
.split__text h2,
.service-plan h2,
.profile h2,
.sales-intro h2,
.contact-panel h2 {
  margin: 0 0 0.75rem;
  color: var(--jr-navy);
  font-size: 2.4rem;
  line-height: 1.08;
}

.section__heading p,
.split__text p,
.sales-intro p,
.contact-panel p {
  margin: 0.78rem 0 0;
  color: var(--jr-muted);
  font-size: 1.04rem;
  line-height: 1.78;
}

.feature-grid,
.service-grid,
.sales-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--jr-line);
  background: var(--jr-line);
}

.feature-grid {
  counter-reset: feature;
}

.feature-card,
.service-card,
.sales-card,
.contact-panel,
.service-plan,
.profile {
  background: var(--jr-white);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.feature-card,
.service-card {
  position: relative;
  min-height: 230px;
  padding: 1.55rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.feature-card {
  counter-increment: feature;
}

.feature-card::before {
  content: "0" counter(feature);
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 2.2rem;
  color: var(--jr-navy);
  font-size: 0.8rem;
  font-weight: 850;
}

.feature-card:hover,
.service-card:hover,
.sales-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--jr-shadow);
  z-index: 1;
}

.feature-card h3,
.service-card h3,
.sales-card h3 {
  margin: 0 0 0.55rem;
  color: var(--jr-navy);
  font-size: 1.26rem;
  line-height: 1.18;
}

.feature-card p,
.service-card p,
.sales-card p {
  margin: 0;
  color: var(--jr-muted);
  line-height: 1.78;
}

.service-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin-bottom: 1.35rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1fr);
  gap: 3.4rem;
  align-items: center;
}

.split--reverse {
  grid-template-columns: minmax(340px, 1fr) minmax(0, 0.9fr);
}

.split__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
  box-shadow: var(--jr-hard-shadow);
}

.image-stack {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 0.72rem;
  align-items: end;
}

.image-stack img {
  width: 100%;
  object-fit: cover;
  box-shadow: var(--jr-hard-shadow);
}

.image-stack img:first-child {
  aspect-ratio: 4 / 3;
}

.image-stack img:last-child {
  aspect-ratio: 3 / 4;
  margin-bottom: -2rem;
}

.split__text ul,
.service-plan ul,
.sales-intro ul {
  margin: 1.1rem 0 0;
  padding-left: 1.15rem;
}

.split__text li,
.service-plan li,
.sales-intro li {
  margin: 0.34rem 0;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--jr-line);
  background: var(--jr-line);
}

.stat-strip__item {
  min-height: 120px;
  padding: 1.2rem;
  background: var(--jr-white);
}

.stat-strip__item strong {
  display: block;
  color: var(--jr-navy);
  font-size: 2.15rem;
  line-height: 1;
}

.stat-strip__item span {
  display: block;
  margin-top: 0.5rem;
  color: var(--jr-muted);
  font-size: 0.94rem;
  line-height: 1.35;
}

.band {
  color: var(--jr-white);
  background: var(--jr-ink);
}

.band .site-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.band h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.14;
}

.band p {
  max-width: 640px;
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.page-hero__content {
  min-height: 370px;
  display: grid;
  align-content: center;
  max-width: 790px;
  padding: 4.6rem 0;
}

.page-hero p {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.16rem;
}

.profile {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding: 1.7rem;
  border: 1px solid var(--jr-line);
}

.profile + .profile {
  margin-top: 1.15rem;
}

.profile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0;
}

.profile p {
  margin: 0.72rem 0 0;
  line-height: 1.78;
}

.service-plan {
  padding: 1.7rem;
  border: 1px solid var(--jr-line);
}

.service-plan + .service-plan {
  margin-top: 1.15rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.service-plan--full {
  grid-column: 1 / -1;
}

.sales-card {
  padding: 0;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sales-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.sales-card__body {
  padding: 1.25rem;
}

.sales-card__body p {
  margin-top: 0.52rem;
}

.boat-listing-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.boat-listing-card__media {
  position: relative;
  background: var(--jr-mist);
}

.boat-listing-card__image,
.boat-listing-card__placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.boat-listing-card__placeholder {
  background: linear-gradient(135deg, var(--jr-mist), var(--jr-line));
}

.boat-listing-card__status {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.3rem 0.55rem;
  color: var(--jr-white);
  background: rgba(98, 112, 152, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 850;
}

.boat-listing-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.boat-listing-card__price {
  color: var(--jr-navy);
  font-weight: 850;
}

.boat-listing-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  margin: 1rem 0 0;
  background: var(--jr-line);
  border: 1px solid var(--jr-line);
}

.boat-listing-card__meta div {
  min-width: 0;
  padding: 0.65rem;
  background: var(--jr-white);
}

.boat-listing-card__meta dt {
  color: var(--jr-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.boat-listing-card__meta dd {
  margin: 0.2rem 0 0;
  color: var(--jr-ink);
  font-size: 0.94rem;
  line-height: 1.35;
}

.boat-listing-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1.1rem;
}

.boat-listings-empty {
  padding: 1.4rem;
  color: var(--jr-muted);
  background: var(--jr-white);
  border: 1px solid var(--jr-line);
}

.boat-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
  gap: 2rem;
  align-items: start;
}

.boat-detail__main,
.boat-detail__summary {
  background: var(--jr-white);
  border: 1px solid var(--jr-line);
}

.boat-detail__main {
  padding: 1.8rem;
}

.boat-detail__summary {
  padding: 1.35rem;
}

.boat-detail__summary h2 {
  margin: 0 0 1rem;
  color: var(--jr-navy);
  font-size: 1.35rem;
}

.boat-detail__summary dl {
  display: grid;
  gap: 1px;
  margin: 0;
  background: var(--jr-line);
  border: 1px solid var(--jr-line);
}

.boat-detail__summary div {
  padding: 0.78rem;
  background: var(--jr-white);
}

.boat-detail__summary dt {
  color: var(--jr-muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.boat-detail__summary dd {
  margin: 0.22rem 0 0;
  color: var(--jr-ink);
}

.boat-detail__content {
  color: var(--jr-muted);
  line-height: 1.78;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.7rem;
  border: 1px solid var(--jr-line);
}

.contact-list {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.site-footer {
  color: rgba(255, 255, 255, 0.82);
  background: var(--jr-ink);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-footer__brand img {
  width: 128px;
}

.site-footer p {
  margin: 0.25rem 0 0;
}

.site-footer a {
  color: var(--jr-white);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
}

.footer-links a {
  text-decoration: none;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.not-found {
  padding: 5rem 0;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .hero {
    animation: jrHeroDrift 18s ease-in-out infinite alternate;
  }
}

@keyframes jrHeroDrift {
  from {
    background-position: center;
  }

  to {
    background-position: center 42%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1040px) {
  .site-header__inner {
    flex-wrap: wrap;
    padding: 0.78rem 0;
  }

  .nav-toggle {
    display: block;
    order: 3;
    margin-left: 0;
  }

  .primary-nav {
    width: 100%;
    order: 4;
    display: none;
    margin-left: 0;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    align-items: stretch;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.4rem 0 0.2rem;
  }

  .primary-nav a {
    width: 100%;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .hero {
    min-height: 600px;
  }

  .hero__layout,
  .feature-grid,
  .service-grid,
  .sales-grid,
  .plan-grid,
  .split,
  .split--reverse,
  .boat-detail,
  .contact-panel,
  .profile,
  .stat-strip {
    grid-template-columns: 1fr;
  }

  .hero__facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-self: auto;
  }

  .hero__fact {
    border-right: 1px solid rgba(255, 255, 255, 0.22);
    border-bottom: 0;
  }

  .hero__fact:last-child {
    border-right: 0;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 3.55rem;
  }

  .split--reverse .split__image,
  .split--reverse .image-stack {
    order: -1;
  }

  .band .site-shell,
  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    display: flex;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .site-shell {
    width: min(100% - 30px, 1180px);
  }

  .site-brand img {
    width: 148px;
  }

  .header-actions {
    width: auto;
    order: 2;
    margin-left: auto;
  }

  .header-action {
    flex: 0 0 auto;
    justify-content: center;
  }

  .hero {
    min-height: 580px;
  }

  .hero__layout,
  .page-hero__content {
    padding: 3.5rem 0;
  }

  .hero__facts {
    grid-template-columns: 1fr;
  }

  .hero__fact {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.85rem;
  }

  .hero p,
  .page-hero p {
    font-size: 1.04rem;
  }

  .section {
    padding: 3.7rem 0;
  }

  .section__heading h2,
  .split__text h2,
  .service-plan h2,
  .profile h2,
  .sales-intro h2,
  .contact-panel h2 {
    font-size: 1.96rem;
  }

  .hero-actions,
  .action-row {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .boat-listing-card__actions {
    grid-template-columns: 1fr;
  }

  .image-stack {
    grid-template-columns: 1fr;
  }

  .image-stack img:last-child {
    margin-bottom: 0;
  }
}
