/* =========================================================================
   The Oak Blokes — Specialist Heritage Builder
   Brand-lock: #f0a830 oak/amber + heritage neutrals
   Niche: specialist-heritage-builder (editorial-scrim)
   ========================================================================= */

:root {
  /* Brand */
  --brand-primary: #f0a830;        /* logo extract — oak/amber gold */
  --brand-primary-deep: #c87a14;   /* darker oak shade for hover/active */
  --brand-accent: #6b4a2b;         /* deep oak brown */

  /* Heritage neutrals */
  --ink: #1a1d24;                  /* charcoal — body text + section bg */
  --ink-soft: #2a2e36;             /* one step lighter for cards on dark */
  --cream: #f6f1e7;                /* parchment — alt section bg */
  --cream-soft: #fbf8f1;           /* lightest paper tone */
  --line: #d9d2c2;                 /* divider on cream */
  --line-dark: #353941;            /* divider on ink */
  --muted: #5d6470;                /* body grey for sub-copy on cream */
  --muted-light: #b6bcc8;          /* sub-copy on ink */
  --moss: #4f5a3e;                 /* sub-accent */

  /* Type */
  --font-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Geometry */
  --nav-h: 76px;
  --container-pad: clamp(1.25rem, 4vw, 3.25rem);
  --section-pad-y: clamp(4.5rem, 10vh, 9rem);
  --max-w: 1240px;
  --max-w-wide: 1440px;
  --r-card: 14px;
  --r-pill: 999px;
}


/* -- Universal floor -------------------------------------------------------- */
html { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* NOTE: no `overflow-x: clip/hidden` on html/body — it breaks position:fixed on
   iOS WebKit (the sticky nav scrolls away, fixed menus open off-screen). The
   carousel rail and marquee clip themselves via their own containers, so the
   page has no horizontal overflow without a root clip. */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
img, video, picture { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  margin: 0 0 0.5em;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.005em;
}
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: inherit; }
input, textarea, select, button {
  font-family: inherit;
  font-size: 16px;
  min-height: 44px;
}
button, .btn, a.btn, [role="button"] {
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
}
button:active, .btn:active { transform: scale(0.96); }

@media (scripting: none) {
  .reveal-up, .reveal-fade, .reveal-stagger > *, .reveal-section, .section-head {
    opacity: 1 !important; visibility: visible !important; transform: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal-up, .reveal-fade, .reveal-stagger > *, .reveal-section, .section-head {
    opacity: 1 !important; visibility: visible !important; transform: none !important;
  }
}

.bottom-cta, .fixed-cta-bar { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }

/* Designed placeholder */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 1.5px dashed currentColor;
  border-radius: var(--r-card);
  opacity: 0.7;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
}
.placeholder--photo {
  aspect-ratio: 4/5;
  background: rgba(107,74,43,0.06);
  color: var(--brand-accent);
}

/* -- Container -------------------------------------------------------------- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--container-pad); }
.container--wide { max-width: var(--max-w-wide); }
.container--narrow { max-width: 960px; }
.section { padding-block: var(--section-pad-y); }

/* -- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 150ms ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--brand-primary);
  color: var(--ink);
  border-color: var(--brand-primary);
}
.btn--primary:hover {
  background: var(--brand-primary-deep);
  border-color: var(--brand-primary-deep);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.btn--ghost-light {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246,241,231,0.55);
}
.btn--ghost-light:hover {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}
.btn--lg { padding: 1.1rem 2rem; font-size: 0.98rem; }

/* -- Nav (full-width top bar; transparent over hero; solid on scroll) ------ */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 var(--container-pad);
  background: transparent;
  transition: background-color 280ms ease, border-color 280ms ease, color 280ms ease, box-shadow 280ms ease, transform 320ms ease;
  color: var(--cream);
}
/* Mobile reveal-on-scroll-up: nav tucks away on scroll-down, slides back on
   scroll-up (class toggled by stickyNav() in animations.js). Only ever added
   on phones, and only while .is-scrolled (fixed), so desktop is untouched. */
.nav.is-scrolled.nav--hidden { transform: translateY(-100%); }
.nav.is-scrolled {
  position: fixed;
  background: rgba(20,18,14,0.93);
  border-bottom: 1px solid rgba(246,241,231,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  margin-right: 0;
  order: 1;
}
.nav__brand img {
  height: 46px;
  width: auto;
  display: block;
}
.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.nav__brand-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav__brand-sub {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}
.nav__menu {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav__menu li { margin: 0; padding: 0; max-width: none; }
.nav__menu a {
  text-decoration: none;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.4rem 0;
  position: relative;
}
.nav__menu a:hover { color: var(--brand-primary); }
.nav__menu a.is-active { color: var(--brand-primary); }
.nav__cta {
  margin-left: 1.8rem;
}
.nav__hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.nav__hamburger svg { width: 22px; height: 22px; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;                       /* fills the viewport in ANY iOS toolbar state; no vh/svh */
  z-index: 200;
  background: var(--ink);
  color: var(--cream);
  padding: var(--container-pad);
  padding-top: calc(var(--nav-h) + 1rem);
  padding-bottom: calc(var(--container-pad) + env(safe-area-inset-bottom) + 1.25rem);
  display: none;
  flex-direction: column;
  overflow: hidden;               /* links flex to fill; CTA pinned bottom; no scroll */
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px; height: 48px;
  background: transparent;
  border: 1px solid var(--cream);
  border-radius: 8px;
  color: var(--cream);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mobile-menu__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;    /* links grouped at the top */
  flex: 1 1 auto;                 /* grows to push the CTA to the bottom */
  min-height: 0;
  gap: 0.25rem;
}
.mobile-menu__links li:last-child a { border-bottom: none; }  /* no trailing rule into the void */
.mobile-menu__links a {
  display: block;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.6rem);
  font-weight: 500;
  text-decoration: none;
  color: var(--cream);
  line-height: 1.15;
  border-bottom: 1px solid rgba(246,241,231,0.1);
}
.mobile-menu__contact {
  flex: 0 0 auto;                  /* pinned to the bottom */
  margin-top: 2rem;
  padding-top: 0;                  /* no stray divider above the CTA */
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted-light);
}
.mobile-menu__contact a { color: var(--cream); text-decoration: none; }
.mobile-menu__cta { margin-top: 1.5rem; }

@media (max-width: 980px) {
  .nav__menu, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .nav__brand-text { display: none; }
  .nav__brand img { height: 42px; }
}

/* -- HERO (editorial-scrim) ----------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  color: var(--cream);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(20,18,14,0.62) 0%,
      rgba(20,18,14,0.32) 50%,
      rgba(20,18,14,0.72) 100%
    );
}
.hero__inner {
  width: 100%;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 4rem) var(--container-pad) 4rem;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 4rem;
  align-items: end;
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.92;
  margin-bottom: 1.4rem;
}
.hero__kicker::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--brand-primary);
}
.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0 0 1.4rem;
  color: var(--cream);
}
.hero h1 .accent {
  color: var(--brand-primary);
  font-style: italic;
}
.hero__sub {
  font-size: 1.1rem;
  line-height: 1.55;
  color: rgba(246,241,231,0.86);
  max-width: 44ch;
  margin: 0 0 2rem;
}
.hero__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.hero__right {
  align-self: end;
}
.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(246,241,231,0.18);
}
.hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.hero__meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}
.hero__meta-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.15;
}
.hero__meta-value small {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  display: block;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-top: 0.15rem;
}
.hero__meta-awards {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.3rem;
}
.hero__meta-awards img {
  height: 54px;
  width: auto;
  display: block;
  background: rgba(248,245,239,0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 6px 9px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.22);
}

@media (max-width: 980px) {
  .hero { min-height: 92dvh; align-items: end; }
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    padding: calc(var(--nav-h) + 3rem) var(--container-pad) 2.6rem;
  }
  .hero__meta { grid-template-columns: 1fr; gap: 1rem; padding-top: 1.4rem; }
  .hero__meta-value { font-size: 1.15rem; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3.1rem); }
  .hero__sub { font-size: 1rem; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; min-width: 0; }
}

/* -- PAGE-HERO (smaller, for sub-pages) ---------------------------------- */
.page-hero {
  position: relative;
  min-height: 56vh;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
}
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,18,14,0.52) 0%, rgba(20,18,14,0.30) 50%, rgba(20,18,14,0.72) 100%);
}
.page-hero__inner {
  width: 100%;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3.5rem) var(--container-pad) 3rem;
}
.page-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.92;
}
.page-hero__kicker::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--brand-primary);
}
.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  line-height: 1.06;
  margin: 0 0 1.1rem;
  color: var(--cream);
  max-width: 22ch;
}
.page-hero__sub {
  font-size: 1.08rem;
  line-height: 1.55;
  max-width: 56ch;
  color: rgba(246,241,231,0.86);
  margin: 0 0 1.6rem;
}
.page-hero__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
@media (max-width: 720px) {
  .page-hero { min-height: 60vh; }
  .page-hero__inner { padding: calc(var(--nav-h) + 2.5rem) var(--container-pad) 2.2rem; }
  .page-hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
}

/* -- Section-head (kicker + H2 + intro) ---------------------------------- */
.section-head {
  margin-bottom: 3.5rem;
  max-width: 64rem;
}
.section-head--center { text-align: center; margin-inline: auto; }
/* Header row: title left, "see all" link right (aligned to content's right edge); tighter gap pulls cards up */
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; text-align: left; margin-bottom: 1.6rem; max-width: none; width: 100%; }
.section-head--row > div { min-width: 0; }
.section-head__link {
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.03em;
  color: var(--brand-primary-deep); text-decoration: none;
  border-bottom: 2px solid var(--brand-primary); padding-bottom: 4px;
  display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; flex: none;
  transition: color .2s ease, border-color .2s ease;
}
.section-head__link span { transition: transform .2s ease; }
.section-head__link:hover { color: var(--brand-primary); }
.section-head__link:hover span { transform: translateX(3px); }
@media (max-width: 640px) {
  .section-head--row { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
.section-head__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 1rem;
}
.section-head__kicker::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--brand-primary);
}
.section-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 1.1rem;
  letter-spacing: -0.005em;
}
.section-head h2 .accent { color: var(--brand-primary-deep); font-style: italic; }
.section-head__sub {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 56ch;
  margin: 0;
}
.section-head--center .section-head__sub { margin-inline: auto; }
.feature-band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.feature-band__media { border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4/3; }
.feature-band__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .feature-band { grid-template-columns: 1fr; } }
/* YouTube facade (testimonials + home) */
.yt-facade { position: relative; overflow: hidden; cursor: pointer; background: var(--ink); border-radius: inherit; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.045); }
.yt-facade__play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border: 0; border-radius: 50%; background: rgba(240,168,48,.94); color: var(--ink); font-size: 1.3rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.yt-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
/* Video testimonial: label ABOVE the player (was an overlay that covered the
   YouTube controls). Player uses the padding-bottom ratio hack — iOS WebKit
   collapses an aspect-ratio-sized iframe box to ~150px. */
.testimonial-card--video { padding: 1.6rem 1.7rem; overflow: visible; position: relative; display: flex; flex-direction: column; gap: 0.9rem; }
.testimonial-card.testimonial-card--video::before { content: none; }
.testimonial-card--video .yt-facade { position: relative; inset: auto; width: 100%; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; }
.testimonial-video__cap { display: block; padding: 0; background: none; color: var(--brand-primary); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; line-height: 1.3; pointer-events: auto; }
.footer__social { display: flex; gap: 0.6rem; margin-top: 1.1rem; }
.footer__social a { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-dark); color: var(--cream); transition: background .2s ease, color .2s ease, border-color .2s ease; }
.footer__social a:hover { background: var(--brand-primary); color: var(--ink); border-color: var(--brand-primary); }
/* Socials sit right of the brand (left group); nav + CTA stay on the right. */
.nav__social { order: 2; display: flex; align-items: center; gap: 0.35rem; margin-left: 1.1rem; }
.nav__social a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 0.5rem; color: var(--cream); opacity: 0.72; transition: opacity .2s ease, color .2s ease; }
.nav__social a:hover { opacity: 1; color: var(--brand-primary); }
.nav > nav { order: 3; margin-left: auto; }
.nav__cta { order: 4; }
.nav__hamburger { order: 5; margin-left: auto; }
@media (max-width: 1080px) { .nav__social { display: none; } }
@media (max-width: 720px) {
  .section-head { margin-bottom: 2.4rem; }
  .section-head h2 { font-size: clamp(1.8rem, 7.5vw, 2.4rem); }
}

/* Section variants */
.section--ink {
  background: var(--ink);
  color: var(--cream);
}
.section--ink .section-head h2 { color: var(--cream); }
.section--ink .section-head__sub { color: var(--muted-light); }
.section--ink .section-head__kicker { color: var(--brand-primary); }
.section--cream { background: var(--cream); }
.section--cream-soft { background: var(--cream-soft); }

/* -- Trust rail (hero-trust scroll-velocity) ----------------------------- */
.hero-trust-rail {
  position: relative;
  background: var(--ink);
  color: var(--cream);
  padding: 1.6rem 0;
  border-top: 1px solid rgba(246,241,231,0.08);
  border-bottom: 1px solid rgba(246,241,231,0.08);
  overflow: hidden;
}
.hero-trust-rail .rail-track {
  display: flex;
  gap: 3.5rem;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}
.hero-trust-rail__item {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--cream);
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-trust-rail__item .dot {
  width: 4px; height: 4px;
  background: var(--brand-primary);
  border-radius: 50%;
  flex-shrink: 0;
}
.hero-trust-rail__item img {
  height: 38px;
  width: auto;
  display: inline-block;
}
.hero-trust-rail__item strong {
  font-weight: 600;
  color: var(--brand-primary);
}

/* -- Featured projects rail (scroll-velocity) ---------------------------- */
.featured-projects-rail {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 1.4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-primary) rgba(255,255,255,0.12);
}
.featured-projects-rail::-webkit-scrollbar { height: 8px; }
.featured-projects-rail::-webkit-scrollbar-track { background: rgba(255,255,255,0.12); border-radius: 4px; }
.featured-projects-rail::-webkit-scrollbar-thumb { background: var(--brand-primary); border-radius: 4px; }
.featured-projects-rail .rail-track {
  display: flex;
  gap: 1.5rem;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}
.featured-projects-rail .project-card { scroll-snap-align: start; }
.project-card {
  flex: 0 0 460px;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  background: #211d17;
  border-radius: var(--r-card);
  overflow: hidden;
}
.project-card__media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 0;
  background: var(--ink-soft);
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}
.project-card:hover .project-card__media img { transform: scale(1.04); }
.project-card__media::after { display: none; }
.project-card__overlay {
  position: static;
  padding: 1.05rem 1.35rem 1.3rem;
  color: var(--cream);
}
.project-card__tag {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 0.45rem;
}
.project-card__title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.14;
  margin: 0;
  color: var(--cream);
}
.project-card__sub {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: rgba(246,241,231,0.78);
  margin-top: 0.35rem;
  line-height: 1.45;
}
@media (max-width: 720px) {
  .project-card { flex: 0 0 320px; }
  .project-card__title { font-size: 1.25rem; }
}

/* -- Services 1+2 editorial split --------------------------------------- */
.services-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.4rem;
  align-items: stretch;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--ink-soft);
  color: var(--cream);
  text-decoration: none;
  min-height: 360px;
}
.service-card__media {
  position: relative;
  flex: 1;
  min-height: 280px;
  overflow: hidden;
}
.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}
.service-card:hover .service-card__media img { transform: scale(1.04); }
.service-card__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.6rem 1.8rem;
  background: linear-gradient(180deg, transparent 0%, rgba(20,18,14,0.88) 60%, rgba(20,18,14,0.95) 100%);
  z-index: 2;
}
.service-card__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--brand-primary);
  margin-bottom: 0.55rem;
}
.service-card h3 {
  font-size: 1.7rem;
  font-weight: 500;
  margin: 0 0 0.55rem;
  color: var(--cream);
  line-height: 1.18;
}
.service-card__body p {
  font-size: 0.95rem;
  color: rgba(246,241,231,0.82);
  margin: 0 0 1rem;
  line-height: 1.55;
}
.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  font-weight: 600;
}
.service-card__link::after {
  content: '→';
  font-size: 1rem;
  transition: transform 220ms ease;
}
.service-card:hover .service-card__link::after { transform: translateX(4px); }
.services-split__right {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 1.5rem;
}
.services-split__right .service-card { min-height: 260px; }
.services-split__right .service-card__media { min-height: 200px; }
@media (max-width: 900px) {
  .services-split {
    grid-template-columns: 1fr;
  }
  .services-split__right { grid-template-rows: auto; gap: 1.5rem; }
}

/* -- Services list page ------------------------------------------------- */
.services-list { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.service-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
}
.service-row:nth-child(even) { direction: rtl; }
.service-row:nth-child(even) > * { direction: ltr; }
.service-row__media {
  position: relative;
  aspect-ratio: 5/4;
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--ink-soft);
}
.service-row__media img { width: 100%; height: 100%; object-fit: cover; }
.service-row__body {
  padding: 1rem 0;
}
.service-row__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--brand-primary-deep);
  margin-bottom: 0.6rem;
}
.service-row h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}
.service-row p {
  font-size: 1.04rem;
  color: var(--ink);
  line-height: 1.65;
  margin: 0 0 1rem;
  max-width: 50ch;
}
.service-row__bullets {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1.2rem;
}
.service-row__bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}
.service-row__bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  background: var(--brand-primary);
  border-radius: 50%;
}
@media (max-width: 900px) {
  .service-row { grid-template-columns: 1fr; gap: 1.6rem; direction: ltr !important; }
  .service-row:nth-child(even) { direction: ltr; }
  .service-row__bullets { grid-template-columns: 1fr; }
}

/* -- About snapshot section --------------------------------------------- */
.about-snap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: stretch;
}
.about-snap__media {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: var(--r-card);
}
.about-snap__media img {
  width: 100%; height: 100%; object-fit: cover;
}
.about-snap__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-snap__copy h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1.4rem;
}
.about-snap__copy p {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 1.2rem;
  max-width: 56ch;
}
.about-snap__cite {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--brand-accent);
}
@media (max-width: 900px) {
  .about-snap { grid-template-columns: 1fr; gap: 1.6rem; }
  .about-snap__media { aspect-ratio: 4/3; }
}

/* -- About page founder narrative --------------------------------------- */
.story-chapter {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: start;
  padding-block: 3rem;
  border-bottom: 1px solid var(--line);
}
.story-chapter:last-child { border-bottom: none; }
.story-chapter__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--brand-primary-deep);
  margin-bottom: 0.4rem;
}
.story-chapter h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0 0 1rem;
  line-height: 1.12;
}
.story-chapter p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 1.1rem;
  max-width: 56ch;
}
@media (max-width: 800px) {
  .story-chapter { grid-template-columns: 1fr; gap: 1rem; padding-block: 2rem; }
}

/* Founders trio */
.founders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.founder-card {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.founder-card__photo {
  width: 100%;
  aspect-ratio: 4/5;
  background: rgba(107,74,43,0.07);
  border-radius: calc(var(--r-card) - 2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-accent);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  overflow: hidden;
}
.founder-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.founder-card h3 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 500;
}
.founder-card__role {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-primary-deep);
}
.founder-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}
@media (max-width: 800px) {
  .founders { grid-template-columns: 1fr; gap: 1rem; }
}

/* -- Awards band -------------------------------------------------------- */
.awards-band {
  background: var(--cream-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.awards-band__inner {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 2rem;
  align-items: center;
}
.awards-band__copy h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0 0 0.4rem;
  line-height: 1.18;
}
.awards-band__copy p {
  font-size: 0.95rem;
  margin: 0;
  color: var(--muted);
}
.awards-band__copy small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-primary-deep);
  margin-bottom: 0.6rem;
}
.awards-band img {
  height: 120px;
  width: auto;
}
@media (max-width: 720px) {
  .awards-band__inner { grid-template-columns: 1fr; text-align: center; gap: 1.4rem; justify-items: center; }
  .awards-band img { height: 96px; }
}

/* -- Testimonials --------------------------------------------------------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--ink-soft);
  color: var(--cream);
  padding: 2rem 2.2rem;
  border-radius: var(--r-card);
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 1rem;
  left: 1.6rem;
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--brand-primary);
  opacity: 0.5;
}
.testimonial-card blockquote {
  margin: 0 0 1.4rem;
  padding-top: 2.2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.4;
  color: var(--cream);
  position: relative;
  z-index: 1;
}
.testimonial-card cite {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-primary);
}
@media (max-width: 800px) {
  .testimonials { grid-template-columns: 1fr; }
  .testimonial-card blockquote { font-size: 1.05rem; }
}

/* -- Affiliates rail (constant marquee) --------------------------------- */
.affiliates-rail {
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 0;
  overflow: hidden;
  position: relative;
}
.affiliates-rail__label {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin: 0 0 1.6rem;
}
.affiliates-rail .rail-track {
  display: flex;
  gap: 3.5rem;
  align-items: center;
  animation: marquee 90s linear infinite;
  width: max-content;
}
.affiliates-rail:hover .rail-track { animation-play-state: paused; }
.affiliates-rail__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 56px;
}
.affiliates-rail__item img {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.85;
  transition: filter 250ms ease, opacity 250ms ease;
  mix-blend-mode: multiply;
}
.affiliates-rail__item span[aria-hidden="true"] {
  filter: grayscale(1);
  opacity: 0.85;
  mix-blend-mode: multiply;
  transition: filter 250ms ease, opacity 250ms ease;
}
.affiliates-rail__item:hover img,
.affiliates-rail__item:hover span[aria-hidden="true"] { filter: grayscale(0); opacity: 1; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .affiliates-rail .rail-track { animation: none; }
}

/* -- Affiliates grid page ----------------------------------------------- */
.affiliates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.affiliates-grid__cell {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
a.affiliates-grid__cell:hover {
  transform: translateY(-4px);
  border-color: var(--brand-primary);
  box-shadow: 0 1px 2px rgba(26,29,36,0.05), 0 14px 32px rgba(26,29,36,0.10);
}
.affiliates-grid__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  padding: 1.4rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.affiliates-grid__logo img {
  max-height: 82px;
  max-width: 82%;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.affiliates-grid__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.3rem 1.5rem 1.5rem;
  flex: 1;
}
.affiliates-grid__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}
.affiliates-grid__desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}
.affiliates-grid__cta {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.affiliates-grid__cta::after { content: '\2192'; transition: transform .2s ease; }
a.affiliates-grid__cell:hover .affiliates-grid__cta::after { transform: translateX(4px); }
.affiliates-grid__cell--nolink { cursor: default; }
@media (max-width: 800px) {
  .affiliates-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .affiliates-grid { grid-template-columns: 1fr; }
}

/* === Projects rail — clickable arrows + infinite loop (no scroll-lock) == */
.rail-wrap { position: relative; }
.featured-projects-rail { -ms-overflow-style: none; scrollbar-width: none; }
.featured-projects-rail::-webkit-scrollbar { display: none; }
.rail-arrow {
  position: absolute; top: 44%; transform: translateY(-50%);
  z-index: 5; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(246,241,231,0.25); background: rgba(20,18,14,0.72);
  color: var(--cream); display: flex; align-items: center; justify-content: center;
  cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.rail-arrow svg { width: 22px; height: 22px; }
.rail-arrow:hover { background: var(--brand-primary); color: var(--ink); border-color: var(--brand-primary); }
.rail-arrow--prev { left: clamp(0.5rem, 1.5vw, 1.5rem); }
.rail-arrow--next { right: clamp(0.5rem, 1.5vw, 1.5rem); }
@media (max-width: 767px) { .rail-arrow { display: none; } }

/* Swiper projects carousel — seamless loop, flick on touch, arrows on desktop */
.featured-projects-rail.swiper { overflow: hidden; padding: 0; }
.featured-projects-rail .swiper-wrapper { align-items: stretch; }
.featured-projects-rail .swiper-slide { width: 460px; height: auto; display: flex; }
.featured-projects-rail .swiper-slide .project-card { width: 100%; flex: none; }
@media (max-width: 767px) {
  /* Mobile: Swiper is NOT initialised (see index.html). Drive the rail with
     native CSS scroll-snap so it snaps card-to-card the way iOS expects. */
  .featured-projects-rail.swiper {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--container-pad);
    -webkit-overflow-scrolling: touch;
  }
  .featured-projects-rail .swiper-slide { width: min(82vw, 340px); scroll-snap-align: start; }
  /* Trailing spacer: lets the LAST card scroll to the same start-aligned rest
     (small left gutter + right breathing) as the others. iOS drops flex
     trailing padding, so a real flex item is the reliable fix. Mobile-only,
     so desktop Swiper (which counts .swiper-slide children) is untouched. */
  .featured-projects-rail .rail-track::after {
    content: '';
    flex: 0 0 calc(100vw - var(--container-pad) - min(82vw, 340px));
  }
}
/* Arrows stay static — keep vertical centering in every state (the global
   button:active scale was wiping translateY(-50%) and dropping the arrow). */
.rail-arrow,
.rail-arrow:hover,
.rail-arrow:focus,
.rail-arrow:active { transform: translateY(-50%); }

/* === Services No. IV wide card ======================================== */
.service-card--wide { margin-top: 1.5rem; height: 380px; min-height: 0; }
.service-card--wide .service-card__media { min-height: 0; }
.service-card--wide .service-card__media img { object-position: center 60%; }
@media (max-width: 760px) { .service-card--wide { height: 300px; } }

/* Sub-page project gallery heading */
.project-photos__head {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin: 2.4rem 0 1.3rem;
}

/* -- CTA strip (heavy full-bleed) ---------------------------------------- */
.cta-strip {
  position: relative;
  padding: var(--section-pad-y) 0;
  overflow: hidden;
  isolation: isolate;
  color: var(--cream);
  text-align: center;
}
.cta-strip__media { position: absolute; inset: 0; z-index: -2; }
.cta-strip__media img { width: 100%; height: 100%; object-fit: cover; }
.cta-strip__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,18,14,0.72) 0%, rgba(20,18,14,0.62) 100%);
}
.cta-strip__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.cta-strip__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 1rem;
}
.cta-strip h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 1.2rem;
  color: var(--cream);
}
.cta-strip p {
  font-size: 1.08rem;
  color: rgba(246,241,231,0.86);
  margin: 0 0 2rem;
  max-width: 50ch;
  margin-inline: auto;
  line-height: 1.6;
}
.cta-strip__actions {
  display: inline-flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}
@media (max-width: 600px) {
  .cta-strip__actions { width: 100%; flex-direction: column; }
  .cta-strip__actions .btn { width: 100%; }
}

/* -- Projects index grid ------------------------------------------------ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.projects-grid .project-card { flex: none; }
.projects-grid .project-card__media { aspect-ratio: 4/3; }
@media (max-width: 900px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .projects-grid { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid .project-card,
  .projects-grid .project-card:nth-child(1),
  .projects-grid .project-card:nth-child(2),
  .projects-grid .project-card:nth-child(3),
  .projects-grid .project-card:nth-child(4),
  .projects-grid .project-card:nth-child(5),
  .projects-grid .project-card:nth-child(6),
  .projects-grid .project-card:nth-child(7) { grid-column: span 1; }
  .projects-grid .project-card .project-card__media { aspect-ratio: 4/3; }
}
@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* -- Project sub-page narrative ----------------------------------------- */
.project-body {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: start;
}
.project-body__meta {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
.project-body__meta-item {
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.project-body__meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 0.4rem;
}
.project-body__meta-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}
.project-body__prose p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 1.4rem;
  max-width: 64ch;
}
.project-body__prose p:first-child {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-style: italic;
  color: var(--brand-accent);
  line-height: 1.5;
  border-left: 2px solid var(--brand-primary);
  padding-left: 1.4rem;
}
.project-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 2.4rem 0;
}
.project-photos figure { margin: 0; overflow: hidden; border-radius: var(--r-card); }
.project-photos figure:first-child { grid-column: 1 / -1; aspect-ratio: 16/9; }
.project-photos figure { aspect-ratio: 4/3; }
.project-photos img { width: 100%; height: 100%; object-fit: cover; }
/* In-column project video: iOS-safe padding-bottom 16:9 box (aspect-ratio on an
   in-flow box collapses the iframe on iOS WebKit). Sits between write-up + gallery. */
.project-video__frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  margin: 0 0 2.4rem;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--ink);
}
.project-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 800px) {
  .project-body { grid-template-columns: 1fr; gap: 1.4rem; }
  .project-body__meta { position: static; }
  .project-photos { grid-template-columns: 1fr; }
  .project-photos figure { aspect-ratio: 4/3; }
}

/* Related projects */
.related-projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.5rem;
}
@media (max-width: 800px) {
  .related-projects { grid-template-columns: 1fr; }
}

/* -- Gallery masonry ---------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 1rem;
  grid-auto-flow: dense;
}
.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-card);
  position: relative;
  cursor: pointer;
}
.gallery-grid figure img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms ease;
}
.gallery-grid figure:hover img { transform: scale(1.03); }
.gallery-grid figure:nth-child(3n+1) { grid-row: span 2; }
.gallery-grid figure:nth-child(5n+3) { grid-column: span 2; }
@media (max-width: 980px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-grid figure:nth-child(5n+3) { grid-column: span 1; }
}
@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gallery-grid figure:nth-child(3n+1) { grid-row: span 1; }
}

/* ---- Mobile fixes (2026-07) ---- */
@media (max-width: 767px) {
  /* Scroll-velocity hero rail is JS-gated off on mobile -> autonomous CSS marquee.
     Track carries 2 duplicated item sets, so translateX(-50%) loops seamlessly. */
  .hero-trust-rail .rail-track { animation: hero-rail-drift 40s linear infinite; }
  /* Tap targets to the 44px floor */
  .footer__social a { width: 44px; height: 44px; }
  .section-head__link { min-height: 44px; display: inline-flex; align-items: center; }
  /* Nav menu fits one screen: drop redundant phone/email, links flex-distribute */
  .mobile-menu__contact p { display: none; }
  .mobile-menu__links { margin: 0; }
  .mobile-menu__links a { padding: 0.55rem 0; font-size: clamp(1.5rem, 5.8vw, 2.05rem); }
  .mobile-menu__contact { margin-top: 1.25rem; padding-top: 0; }
}
/* Projects carousel — slim progress bar under the rail (senior pick over 9 dots) */
#projProgress { position: relative; height: 3px; max-width: 220px; margin: 1.5rem auto 0; background: rgba(107,74,43,0.18); border-radius: 2px; overflow: hidden; }
#projProgress .swiper-pagination-progressbar-fill { background: var(--brand-primary); border-radius: 2px; }
/* Mobile (no Swiper): our own fill, scaled from scroll position via JS. */
#projProgress .rail-progress__fill { display: block; position: absolute; inset: 0; background: var(--brand-primary); border-radius: 2px; transform-origin: left center; transform: scaleX(0.12); transition: transform 0.12s linear; }
@keyframes hero-rail-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-trust-rail .rail-track { animation: none !important; transform: none !important; }
}

/* -- Videos grid (placeholder) ----------------------------------------- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
.video-card {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-card);
  overflow: hidden;
  position: relative;
}
.video-card__poster {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.video-card__poster img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 1;
}
.video-card__poster.yt-facade { cursor: pointer; }
.video-card__play {
  position: absolute;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(240,168,48,0.92);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  z-index: 2;
  border: 2px solid var(--cream);
}
.video-card__body { padding: 1.2rem 1.4rem 1.6rem; }
.video-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 0.3rem;
}
.video-card__sub {
  font-size: 0.85rem;
  color: var(--muted-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.video-card__supply {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-primary);
  border: 1px dashed rgba(240,168,48,0.5);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}
@media (max-width: 720px) {
  .videos-grid { grid-template-columns: 1fr; }
}

/* -- Contact page ------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: stretch;
}
.contact-form label:has(textarea) { flex: 1; }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--cream-soft);
  padding: 2.2rem;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
}
.contact-form label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--brand-accent);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-size: 16px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
}
.contact-form textarea { flex: 1; min-height: 130px; resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-color: var(--brand-primary);
}
.contact-form__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}
.contact-form__submit {
  margin-top: 0.6rem;
}
.contact-info {
  padding: 0.6rem 0;
}
.contact-info h3 {
  font-size: 1.4rem;
  margin: 0 0 1.2rem;
}
.contact-info__item {
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.contact-info__item:last-child { border-bottom: none; }
.contact-info__label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 0.4rem;
}
.contact-info__value {
  font-family: var(--font-display);
  font-size: 1.32rem;
  color: var(--ink);
  text-decoration: none;
  display: block;
  min-height: 44px;
  padding: 0.3rem 0;
}
.contact-info__value:hover { color: var(--brand-primary-deep); }
.contact-info__value small {
  font-family: var(--font-body);
  font-size: 0.78rem;
  display: block;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; gap: 1.6rem; }
}

/* -- Materials inventory ------------------------------------------------ */
.materials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.material-tile {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 1.4rem 1.2rem;
  text-align: left;
}
.material-tile__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--brand-primary-deep);
  margin-bottom: 0.6rem;
}
.material-tile h4 {
  font-size: 1.08rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
  line-height: 1.18;
}
.material-tile p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
@media (max-width: 800px) {
  .materials { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .materials { grid-template-columns: 1fr; }
}

/* -- Footer -------------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 4rem 0 2rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(246,241,231,0.1);
}
.footer__brand {
  display: flex; flex-direction: column; gap: 1rem;
  margin-top: -1.1rem; /* lift so 'The Oak Blokes' sits in line with the section headers */
}
.footer__brand-row {
  display: flex; align-items: center; gap: 0.7rem;
}
.footer__brand-row img { height: 50px; width: auto; }
.footer__brand-row .name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
}
.footer__brand p {
  font-size: 0.92rem;
  color: var(--muted-light);
  margin: 0;
  max-width: 36ch;
  line-height: 1.6;
}
/* Column shrinks to its content so the header underline spans exactly the
   content width (Explore's line reaches the 'Testimonials' edge). */
.footer__col { width: fit-content; }
.footer__col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin: 0 0 0.95rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(246,241,231,0.16);
  font-family: var(--font-body);
}
.footer__col ul { list-style: none; margin: 0; padding: 0; }
/* Explore links: 2 columns x 3 rows so the column height matches the others */
.footer__col ul.footer__links--cols { display: grid; grid-template-columns: auto auto; column-gap: 1.75rem; }
.footer__col li { margin-bottom: 0.15rem; }
.footer__col a {
  text-decoration: none;
  color: var(--cream);
  font-size: 0.93rem;
  opacity: 0.85;
  display: inline-block;
  padding: 0.45rem 0;
  min-height: 44px;
  line-height: 1.4;
}
.footer__col a:hover { color: var(--brand-primary); opacity: 1; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.6rem;
  font-size: 0.8rem;
  color: var(--muted-light);
  flex-wrap: wrap;
  gap: 0.8rem;
}
.footer__bottom a { color: inherit; text-decoration: none; margin-left: 1.2rem; }
.footer__bottom a:hover { color: var(--brand-primary); }
.footer__credit { margin-left: 1.2rem; }
.footer__bottom .footer__credit a { color: var(--brand-primary); margin-left: 0; padding-inline: 0; min-width: 0; }
.footer__bottom .footer__credit a:hover { text-decoration: underline; }
@media (max-width: 800px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer__brand { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 500px) {
  .footer__inner { grid-template-columns: 1fr; }
}

/* -- Cookie banner ------------------------------------------------------ */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 250;
  background: var(--ink);
  color: var(--cream);
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  padding-bottom: calc(1.2rem + env(safe-area-inset-bottom));
}
.cookie-banner__text {
  font-size: 0.85rem;
  flex: 1;
  min-width: 240px;
  color: rgba(246,241,231,0.86);
}
.cookie-banner__text a {
  color: var(--brand-primary);
}
.cookie-banner__actions {
  display: inline-flex;
  gap: 0.6rem;
}
.cookie-banner__actions .btn { padding: 0.85rem 1.3rem; font-size: 0.82rem; min-height: 44px; }

/* -- 404 page ----------------------------------------------------------- */
.error-page {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--cream);
  padding: var(--container-pad);
}
.error-page__inner { text-align: center; max-width: 540px; }
.error-page__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(5rem, 16vw, 9rem);
  color: var(--brand-primary);
  line-height: 1;
  margin-bottom: 1rem;
}
.error-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1rem; color: var(--cream); }
.error-page p { color: var(--muted-light); margin-bottom: 2rem; font-size: 1.05rem; }

/* -- Prose pages (privacy/terms/thank-you) ------------------------------ */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 4rem) var(--container-pad) 5rem;
}
.prose h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.4rem; }
.prose .lede { font-size: 1rem; color: var(--muted); margin-bottom: 2.5rem; letter-spacing: 0.04em; }
.prose h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.8rem; }
.prose p { font-size: 1rem; line-height: 1.7; color: var(--ink); margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; line-height: 1.6; }

/* -- Thank-you ---------------------------------------------------------- */
.thank-you {
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: var(--container-pad);
  text-align: center;
}
.thank-you__inner { max-width: 540px; }
.thank-you__check {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 1.6rem;
}

/* -- Utility ------------------------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-accent { color: var(--brand-primary-deep); font-style: italic; }

/* Tap-target compliance: nav__brand on mobile (>=44h) */
@media (max-width: 980px) {
  .nav__brand { min-height: 48px; align-items: center; }
  .nav__brand img { height: 44px; }
}

/* Tap-target compliance: prose inline anchors + footer__bottom links + thank-you links */
.prose a, .footer__bottom a, .thank-you a, .mobile-menu__contact a {
  display: inline-block;
  padding: 0.4rem 0.2rem;
  min-height: 44px;
  line-height: 1.45;
}
/* Specific exceptions: btn class shouldn't get double-padding */
.prose a.btn, .footer__bottom a.btn, .thank-you a.btn, .mobile-menu__contact a.btn { padding: 1.1rem 2rem; }


/* Tap-target compliance: cookie banner inline link */
.cookie-banner a {
  display: inline-block;
  min-height: 44px;
  padding: 0.6rem 0.2rem;
  line-height: 1.4;
}

/* Tap-target compliance: footer__col anchors min-width for short labels */
.footer__col a { min-width: 44px; padding: 0.45rem 0.3rem; }
.footer__col li { padding-left: 0; }


/* Tap-target compliance: footer__bottom short anchors min-width */
.footer__bottom a { min-width: 44px; padding-inline: 0.55rem; text-align: center; }

/* Contact — Call the team photos */
.call-team { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.4rem; }
.call-team__row { display: flex; align-items: center; gap: 0.75rem; }
.call-team__photo { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; flex: none; background: var(--ink-soft); }
.call-team__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.call-team__who { display: flex; flex-direction: column; line-height: 1.25; }
.call-team__who small { opacity: 0.72; font-size: 0.8rem; }
