/* ============================================================
   Hunt Constructions — Main Stylesheet
   Depends on tokens.css (load it FIRST).
   ============================================================ */

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; max-width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul[role="list"] { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;            /* Fraunces reads premium at 600, not heavy */
  line-height: var(--lh-snug);
  letter-spacing: -0.015em;
  color: var(--text);
  font-optical-sizing: auto;
  overflow-wrap: break-word;   /* never let a long word overflow the viewport */
  word-break: break-word;
}
.display, h1 { line-height: var(--lh-tight); }

p { max-width: var(--measure); }

/* ---------- A11y helpers ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--sp-4); top: -100px;
  background: var(--c-ink); color: var(--c-paper);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm);
  z-index: var(--z-transition); transition: top var(--dur-ui) var(--ease-soft);
}
.skip-link:focus { top: var(--sp-4); }

:focus-visible {
  outline: 3px solid var(--c-brass);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-wide { max-width: var(--container-wide); }
.section { padding-block: var(--sp-24); }
.section--tight { padding-block: var(--sp-16); }
.section--dark { background: var(--c-ink); color: var(--c-paper); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--c-paper); }
.section--dark p { color: var(--c-muted-on-dark); }
.section--banded { background: var(--c-sand-deep); }

.stack > * + * { margin-top: var(--sp-4); }
.grid { display: grid; gap: var(--sp-8); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-label);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-brass);
  margin-bottom: var(--sp-3);
}
.section--dark .eyebrow { color: var(--c-brass-bright); }
.display { font-size: var(--fs-display); }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); font-weight: 700; }
.lead { font-size: var(--fs-lead); color: var(--text-muted); max-width: 54ch; }
.section--dark .lead { color: var(--c-muted-on-dark); }
.muted { color: var(--text-muted); }
.measure { max-width: var(--measure); }
.text-center { text-align: center; }
.center-col { margin-inline: auto; }

.section-head { max-width: 60ch; margin-bottom: var(--sp-12); }
.section-head.text-center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 0.85em 1.6em;
  border-radius: var(--r-pill);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: transform var(--dur-ui) var(--ease-soft),
              background var(--dur-ui) var(--ease-soft),
              color var(--dur-ui) var(--ease-soft),
              box-shadow var(--dur-ui) var(--ease-soft);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--c-brass); color: var(--c-ink); }
.btn--primary:hover { background: var(--c-brass-bright); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn--ghost:hover { background: rgba(176, 141, 87, 0.14); }
.btn--on-dark.btn--ghost { border-color: var(--c-line-dark); color: var(--c-paper); }
.btn .arrow { transition: transform var(--dur-ui) var(--ease-soft); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0;
  z-index: var(--z-header);
  transition: background var(--dur-ui) var(--ease-soft),
              box-shadow var(--dur-ui) var(--ease-soft);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-6);
  padding-block: var(--sp-4);
}
.site-header.is-stuck {
  background: color-mix(in srgb, var(--c-paper) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--c-line);
}
.brand { display: flex; align-items: center; gap: var(--sp-3); }
.brand__mark {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--c-ink); color: var(--c-brass);
  display: grid; place-items: center;
  font-family: var(--font-label); font-weight: 800; font-size: 1.1rem;
  border: 1px solid var(--c-line-dark);
}
.brand__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.15rem; letter-spacing: 0; line-height: 1;
}
.brand__name small {
  display: block; font-family: var(--font-body); font-weight: 600;
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--c-brass); margin-top: 3px;
}
.site-header:not(.is-stuck) .brand__name { color: var(--c-paper); }
.site-header:not(.is-stuck) .nav__link { color: var(--c-paper); }
.site-header:not(.is-stuck) .nav-toggle { color: var(--c-paper); }

.primary-nav { display: flex; align-items: center; gap: var(--sp-8); }
.nav__list { display: flex; gap: var(--sp-6); }
.nav__link {
  font-family: var(--font-label); font-weight: 500; font-size: var(--fs-small);
  letter-spacing: 0.04em; text-transform: uppercase;
  position: relative; padding-block: var(--sp-2);
  transition: color var(--dur-ui) var(--ease-soft);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--c-brass);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-ui) var(--ease-soft);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--c-brass); }

.nav-toggle {
  display: none; background: none; border: 0; color: var(--c-ink);
  padding: var(--sp-2); border-radius: var(--r-sm);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* Mobile drawer */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; inset: 0 0 0 auto; width: min(86vw, 360px);
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    gap: var(--sp-6);
    background: var(--c-ink); color: var(--c-paper);
    padding: var(--sp-24) var(--sp-8) var(--sp-8);
    transform: translateX(100%);
    transition: transform var(--dur-ui) var(--ease-door);
    z-index: var(--z-drawer);
    box-shadow: var(--shadow-lg);
  }
  .primary-nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; gap: var(--sp-4); width: 100%; }
  .site-header:not(.is-stuck) .primary-nav .nav__link,
  .primary-nav .nav__link { color: var(--c-paper); font-size: 1.25rem; }
  .primary-nav .btn { width: 100%; justify-content: center; }
  .nav-backdrop {
    position: fixed; inset: 0; background: rgba(28,27,25,0.5);
    opacity: 0; pointer-events: none; z-index: var(--z-drawer);
    transition: opacity var(--dur-ui) var(--ease-soft);
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
}

/* ---------- Hero (generic interior pages) ---------- */
.page-hero {
  position: relative; padding-block: clamp(8rem, 16vh, 12rem) var(--sp-16);
  background: var(--c-ink); color: var(--c-paper); overflow: hidden;
}
.page-hero__bg {
  position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%;
  opacity: 0.42; filter: saturate(1.05);
}
.page-hero__bg-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,27,25,0.55) 0%, rgba(28,27,25,0.82) 100%);
}
.page-hero .container { position: relative; }
.page-hero h1 { color: var(--c-paper); max-width: 18ch; }
.page-hero .lead { color: var(--c-muted-on-dark); margin-top: var(--sp-4); }
.breadcrumb { font-size: var(--fs-small); color: var(--c-muted-on-dark); margin-bottom: var(--sp-4); }
.breadcrumb a:hover { color: var(--c-brass-bright); }

/* ---------- Home: scroll walkthrough ---------- */
.walk {
  position: relative;
  background: var(--c-ink);
  color: var(--c-paper);
}
/* The sticky stage occupies the viewport while the tall track scrolls past. */
.walk__track { position: relative; }
.walk__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; place-items: center;
}
.walk__scene { position: absolute; inset: 0; }
.walk__bg {
  position: absolute; inset: -8% ; width: 116%; height: 116%;
  object-fit: cover;
  will-change: transform;
}
.walk__bg--facade { z-index: 1; }
.walk__rooms { position: absolute; inset: 0; z-index: 1; }
.walk__room {
  position: absolute; inset: 0;
  object-fit: cover; width: 100%; height: 100%;
  opacity: 0; will-change: opacity, transform;
}

/* The door — two panels that split apart on scroll progress. */
.walk__door {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: grid; grid-template-columns: 1fr 1fr;
  perspective: 1600px;
}
.walk__door-panel {
  position: relative; height: 100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.25)),
    repeating-linear-gradient(90deg, #3a2618 0 6px, #2f1f13 6px 12px),
    var(--c-timber-deep);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.6);
  will-change: transform;
  transform-origin: var(--hinge, left) center;
  backface-visibility: hidden;
}
.walk__door-panel--l { --hinge: left; border-right: 2px solid #1a120b; }
.walk__door-panel--r { --hinge: right; border-left: 2px solid #1a120b; }
.walk__door-panel::after { /* door hardware */
  content: ""; position: absolute; top: 50%; width: 12px; height: 46px;
  border-radius: var(--r-pill); background: var(--c-brass);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.3); transform: translateY(-50%);
}
.walk__door-panel--l::after { right: 14px; }
.walk__door-panel--r::after { left: 14px; }

.walk__overlay-text {
  position: absolute; z-index: 6; left: 50%; bottom: clamp(2rem, 8vh, 6rem);
  transform: translateX(-50%);
  text-align: center; width: min(90vw, 760px);
}
.walk__caption {
  opacity: 0; transition: opacity var(--dur-room) var(--ease-soft);
}
.walk__caption.is-active { opacity: 1; }
.walk__caption h2 { color: var(--c-paper); }
.walk__caption p { color: var(--c-muted-on-dark); margin-inline: auto; }

.walk__scrollcue {
  position: absolute; z-index: 6; left: 50%; bottom: var(--sp-6);
  transform: translateX(-50%);
  font-size: var(--fs-small); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--c-muted-on-dark); display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
}
.walk__scrollcue span { animation: bob 1.8s var(--ease-soft) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.walk__progress {
  position: absolute; z-index: 6; right: var(--gutter); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.walk__dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.25); transition: background var(--dur-ui), transform var(--dur-ui); }
.walk__dot.is-active { background: var(--c-brass); transform: scale(1.4); }

/* Reduced-motion / no-JS fallback: stack scenes as readable cards. */
.walk--fallback .walk__track { height: auto !important; }
.walk--fallback .walk__stage { position: static; height: auto; display: block; }
.walk--fallback .walk__scene { position: relative; }
.walk--fallback .walk__door,
.walk--fallback .walk__scrollcue,
.walk--fallback .walk__progress { display: none; }
.walk--fallback .walk__room,
.walk--fallback .walk__bg { position: relative; inset: auto; width: 100%; height: auto; opacity: 1; transform: none; border-radius: 0; }
.walk--fallback .walk__scene { padding-block: var(--sp-16); border-bottom: 1px solid var(--c-line-dark); }
.walk--fallback .walk__caption { position: static; opacity: 1; transform: none; margin-top: var(--sp-6); }
.walk--fallback .walk__overlay-text { position: static; transform: none; width: auto; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-8); }
.stat__num { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.4rem, 1.5rem + 3vw, 3.6rem); color: var(--c-brass); line-height: 1; }
.section--dark .stat__num { color: var(--c-brass-bright); }
.stat__label { font-size: var(--fs-small); color: var(--text-muted); margin-top: var(--sp-2); text-transform: uppercase; letter-spacing: 0.08em; }
.section--dark .stat__label { color: var(--c-muted-on-dark); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border-radius: var(--r-md);
  border: 1px solid var(--c-line); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-ui) var(--ease-soft), box-shadow var(--dur-ui) var(--ease-soft);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__body { padding: var(--sp-6); }
.card__body .h3 { margin-bottom: var(--sp-2); }

.service-card { display: flex; flex-direction: column; }
.service-card__icon {
  width: 52px; height: 52px; border-radius: var(--r-sm);
  background: var(--c-sand); color: var(--c-timber);
  display: grid; place-items: center; margin-bottom: var(--sp-4);
  border: 1px solid var(--c-line);
}
.service-card__icon svg { width: 26px; height: 26px; }
.service-card ul { list-style: none; padding: 0; margin-top: var(--sp-4); display: grid; gap: var(--sp-2); }
.service-card li { font-size: var(--fs-small); color: var(--text-muted); padding-left: 1.4em; position: relative; }
.service-card li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; background: var(--c-brass); border-radius: 2px; }

/* Project cards */
.project-card { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.project-card__img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; transition: transform 600ms var(--ease-door); }
.project-card:hover .project-card__img, .project-card:focus-visible .project-card__img { transform: scale(1.06); }
.project-card__overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--sp-6);
  background: linear-gradient(0deg, rgba(28,27,25,0.85) 0%, rgba(28,27,25,0.0) 55%);
  color: var(--c-paper);
}
.project-card__overlay .eyebrow { color: var(--c-brass-bright); margin-bottom: var(--sp-1); }
.project-card__overlay h3 { color: var(--c-paper); font-size: var(--fs-h3); }
.project-card__meta { font-size: var(--fs-small); color: var(--c-muted-on-dark); margin-top: var(--sp-1); }

/* Feature split */
.split { display: grid; gap: var(--sp-16); align-items: center; grid-template-columns: 1fr 1fr; }
.split--reverse .split__media { order: 2; }
.split__media img { border-radius: var(--r-lg); box-shadow: var(--shadow-md); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } .split--reverse .split__media { order: 0; } }

/* Testimonials */
.quote { background: var(--surface); border-left: 4px solid var(--c-brass); padding: var(--sp-8); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.quote blockquote { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; }
.quote figcaption { margin-top: var(--sp-4); font-size: var(--fs-small); color: var(--text-muted); }
.quote figcaption strong { color: var(--text); font-family: var(--font-display); }

/* Process steps */
.steps { counter-reset: step; display: grid; gap: var(--sp-8); }
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-6); align-items: start; }
.step__num {
  counter-increment: step;
  font-family: var(--font-display); font-weight: 900; font-size: 1.5rem;
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--c-brass); color: var(--c-brass);
  display: grid; place-items: center;
}
.step__num::before { content: counter(step, decimal-leading-zero); }

/* CTA band */
.cta-band { background: var(--c-ink); color: var(--c-paper); border-radius: var(--r-lg); padding: clamp(2.5rem, 5vw, 4.5rem); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(176,141,87,0.25), transparent 50%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: var(--c-paper); margin-bottom: var(--sp-4); }
.cta-band .btn-row { justify-content: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-8); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--sp-6); max-width: 640px; }
.field { display: grid; gap: var(--sp-2); }
.field label { font-family: var(--font-label); font-weight: 600; font-size: var(--fs-small); letter-spacing: 0.02em; }
.field .req { color: var(--c-error); }
.field input, .field textarea, .field select {
  font: inherit; padding: 0.8em 1em;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--c-line); border-radius: var(--r-sm);
  transition: border-color var(--dur-ui) var(--ease-soft), box-shadow var(--dur-ui) var(--ease-soft);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--c-brass); box-shadow: var(--shadow-brass);
}
.field textarea { resize: vertical; min-height: 140px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
@media (max-width: 560px) { .field--row { grid-template-columns: 1fr; } }
.form__note { font-size: var(--fs-small); color: var(--text-muted); }
.form__status { padding: var(--sp-4); border-radius: var(--r-sm); font-size: var(--fs-small); display: none; }
.form__status.is-visible { display: block; }
.form__status--ok { background: color-mix(in srgb, var(--c-success) 14%, transparent); color: var(--c-success); border: 1px solid var(--c-success); }
.form__status--err { background: color-mix(in srgb, var(--c-error) 12%, transparent); color: var(--c-error); border: 1px solid var(--c-error); }

/* Contact info list */
.info-list { display: grid; gap: var(--sp-6); }
.info-item { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: start; }
.info-item__icon { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--c-sand); display: grid; place-items: center; color: var(--c-timber); border: 1px solid var(--c-line); }
.info-item__icon svg { width: 22px; height: 22px; }
.info-item h3 { font-size: 1rem; }
.info-item a:hover { color: var(--c-timber); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-ink); color: var(--c-muted-on-dark); padding-block: var(--sp-24) var(--sp-12); }
.site-footer a:hover { color: var(--c-brass-bright); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: var(--sp-12); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.14em; color: var(--c-paper); margin-bottom: var(--sp-4); }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: var(--sp-3); font-size: var(--fs-small); }
.footer-brand .brand__name { color: var(--c-paper); }
.footer-brand p { font-size: var(--fs-small); margin-top: var(--sp-4); max-width: 32ch; }
.footer-bottom { margin-top: var(--sp-16); padding-top: var(--sp-6); border-top: 1px solid var(--c-line-dark); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-4); font-size: var(--fs-small); }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-soft), transform 700ms var(--ease-door); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Door page transition overlay ---------- */
.door-transition {
  position: fixed; inset: 0; z-index: var(--z-transition);
  display: grid; grid-template-columns: 1fr 1fr;
  pointer-events: none; visibility: hidden;
}
.door-transition.is-active { visibility: visible; pointer-events: auto; }
.door-transition__panel {
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.35)),
    repeating-linear-gradient(90deg, #3a2618 0 8px, #2f1f13 8px 16px),
    var(--c-timber-deep);
  box-shadow: inset 0 0 80px rgba(0,0,0,0.7);
  transform: scaleX(0);
  transition: transform var(--dur-door) var(--ease-door);
}
.door-transition__panel--l { transform-origin: left; }
.door-transition__panel--r { transform-origin: right; }
/* closing: panels fill from each side */
.door-transition.is-closing .door-transition__panel { transform: scaleX(1); }
/* opening (on arrival): start filled, then retract */
.door-transition.is-opening .door-transition__panel--l { transform-origin: left; }
.door-transition.is-opening .door-transition__panel--r { transform-origin: right; }
.door-transition__seam {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: var(--c-brass); transform: translateX(-50%) scaleY(0);
  transition: transform var(--dur-ui) var(--ease-soft);
}
.door-transition.is-closing .door-transition__seam,
.door-transition.is-opening .door-transition__seam { transform: translateX(-50%) scaleY(1); }
.door-transition__logo {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; color: var(--c-brass);
  font-size: 2rem; letter-spacing: 0.2em; opacity: 0;
  transition: opacity var(--dur-ui) var(--ease-soft);
}
.door-transition.is-closing .door-transition__logo { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  /* No theatrics: overlay never shows, navigation is instant. */
  .door-transition { display: none !important; }
}

/* ---------- Filterable portfolio (Toll Brothers-style UX) ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-12); }
.filter-chip {
  font-family: var(--font-label); font-weight: 500; font-size: var(--fs-small);
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.55em 1.2em; border-radius: var(--r-pill);
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--c-line);
  transition: all var(--dur-ui) var(--ease-soft);
}
.filter-chip:hover { color: var(--text); border-color: var(--c-timber); }
.filter-chip[aria-pressed="true"] { background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink); }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--sp-8); }
.portfolio-grid .project-card { transition: opacity var(--dur-ui) var(--ease-soft), transform var(--dur-ui) var(--ease-soft); }
.project-card.is-hidden { display: none; }
.portfolio-empty { display: none; color: var(--text-muted); padding: var(--sp-12) 0; text-align: center; }
.portfolio-empty.is-visible { display: block; }

/* ---------- Background-video hero (EllisDon-style) ---------- */
.cinema-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; color: var(--c-paper); }
.cinema-hero__media, .cinema-hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.cinema-hero__tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,27,25,0.35) 0%, rgba(28,27,25,0.25) 45%, rgba(28,27,25,0.88) 100%);
}
.cinema-hero .container { position: relative; padding-bottom: clamp(4rem, 10vh, 8rem); padding-top: 8rem; }
.cinema-hero h1 { color: var(--c-paper); max-width: 16ch; font-size: var(--fs-display); }
.cinema-hero .lead { color: var(--c-paper); opacity: 0.9; max-width: 46ch; }

/* ---------- Credibility / awards strip ---------- */
.cred-strip { border-block: 1px solid var(--c-line); background: var(--c-paper); }
.cred-strip__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-8); padding-block: var(--sp-8); }
.cred-item { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-small); color: var(--text-muted); }
.cred-item strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--text); display: block; }
.cred-item__icon { color: var(--c-brass); }
.cred-item__icon svg { width: 28px; height: 28px; }

.awards { display: flex; flex-wrap: wrap; gap: var(--sp-8); align-items: center; opacity: 0.8; }
.award-badge { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); text-align: center; }
.award-badge svg { width: 44px; height: 44px; color: var(--c-timber); }
.award-badge span { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); font-family: var(--font-label); }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: var(--sp-8); }
.mb-0 { margin-bottom: 0; }
.flow > * + * { margin-top: var(--sp-6); }
.pill { display: inline-block; font-size: var(--fs-small); padding: 0.3em 0.9em; border-radius: var(--r-pill); background: var(--c-sand); border: 1px solid var(--c-line); color: var(--c-timber); font-weight: 600; }
.section--dark .pill { background: var(--c-ink-soft); border-color: var(--c-line-dark); color: var(--c-brass-bright); }
.todo-flag { background: repeating-linear-gradient(45deg, #fff4d6, #fff4d6 10px, #ffe9b0 10px, #ffe9b0 20px); color: #6b4a00; border: 1px dashed #c9a227; padding: 2px 6px; border-radius: 4px; font-size: 0.8em; font-weight: 600; }

/* ============================================================
   MOBILE: walkthrough gallery (replaces the sticky scroll
   experience on phones — built by main.js when width < 720).
   ============================================================ */
.walk-gallery { display: block; }
.walk-card { position: relative; display: block; }
.walk-card img {
  width: 100%; height: 64vh; height: 64svh;
  min-height: 340px; max-height: 600px;
  object-fit: cover; display: block;
}
.walk-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--sp-16) var(--gutter) var(--sp-8);
  background: linear-gradient(0deg, rgba(28,27,25,0.94) 12%, rgba(28,27,25,0) 100%);
}
.walk-card figcaption h2 { color: var(--c-paper); margin-bottom: var(--sp-2); }
.walk-card figcaption p { color: var(--c-muted-on-dark); max-width: 60ch; }

/* Mobile drawer close (×) button — injected by JS */
.nav-close { display: none; background: none; border: 0; }
@media (max-width: 860px) {
  .nav-close {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: var(--sp-6); right: var(--sp-6);
    color: var(--c-paper); padding: var(--sp-2); border-radius: var(--r-sm);
  }
  .nav-close svg { width: 30px; height: 30px; }
}

/* ============================================================
   GENERAL SMALL-SCREEN TUNING (no-overlap hardening)
   ============================================================ */
@media (max-width: 640px) {
  /* Typography: shrink display type so long headlines never clip on phones */
  .display { font-size: clamp(2rem, 7.6vw, 2.7rem); }
  .cinema-hero h1 { font-size: clamp(2rem, 8vw, 2.7rem); }
  .page-hero h1, .h1 { font-size: clamp(1.85rem, 7vw, 2.4rem); }
  .h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .lead { font-size: 1.05rem; }
  /* Forced line breaks read badly when the type reflows — let it wrap naturally */
  .cinema-hero h1 br, .page-hero h1 br { display: none; }
  .eyebrow { letter-spacing: 0.1em; }

  .section { padding-block: var(--sp-16); }
  .section--tight { padding-block: var(--sp-12); }
  .split { gap: var(--sp-8); }
  .section-head { margin-bottom: var(--sp-8); }
  /* CTAs go full-width and stack cleanly instead of crowding */
  .btn-row { gap: var(--sp-3); }
  .btn-row .btn { flex: 1 1 100%; justify-content: center; }
  .cinema-hero .container { padding-top: 6.5rem; }
  .page-hero { padding-block: 7rem var(--sp-12); }
  .stats { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  .stat__num { font-size: clamp(2rem, 6vw, 2.6rem); }
  .footer-bottom { flex-direction: column; gap: var(--sp-2); }
  .cred-strip__row { gap: var(--sp-4); }
  .quote { padding: var(--sp-6); }
  .quote blockquote { font-size: 1.2rem; }
  .step { gap: var(--sp-4); }
  .step__num { width: 52px; height: 52px; font-size: 1.2rem; }
  .cta-band p { max-width: 100%; }
}

/* Avoid the brand sub-label crowding the toggle on very narrow phones */
@media (max-width: 400px) {
  .brand__name small { display: none; }
  .brand__mark { width: 36px; height: 36px; }
}

/* Safety net: never allow horizontal overflow on any element */
@media (max-width: 640px) {
  img, video, table, pre { max-width: 100%; }
}
