/* ==========================================================
   Villens Media · styles
   ========================================================== */

:root {
  /* Palette */
  --stone: #E6E3DC;
  --paper: #F1EFEA;
  --forest: #17201C;
  --forest-2: #1F2A25;
  --forest-3: #2A3731;
  --sage: #C3C2A1;
  --ink: #17201C;
  --ink-muted: #59615B;
  --on-dark: #EDEBE4;
  --on-dark-muted: #A9AFA8;
  --rule: rgba(23, 32, 28, 0.16);
  --rule-dark: rgba(237, 235, 228, 0.16);

  /* Type */
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Scale (perfect fourth-ish) */
  --fs-small: 0.875rem;
  --fs-body: 1rem;
  --fs-lead: 1.125rem;
  --fs-h3: 1.375rem;
  --fs-display-2: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
  --fs-display-1: clamp(2.75rem, 1.3rem + 5vw, 6rem);

  /* Space (spacious) */
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 3rem);
  --section-y: clamp(5rem, 3rem + 7vw, 10rem);
  --maxw: 1320px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;

  --header-h: 84px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--sage); color: var(--ink); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
/* Sections receive focus after a menu jump; no frame around the whole block */
[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  background: var(--paper); color: var(--ink); padding: 0.75rem 1rem;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }

.display-2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--fs-display-2);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lead { font-size: var(--fs-lead); color: var(--ink-muted); max-width: 34em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.6rem;
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 400; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 999px;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
  touch-action: manipulation;
}
.btn-dark { background: var(--forest); color: var(--on-dark); }
.btn-dark:hover { background: var(--forest-3); }
.btn-light { background: var(--on-dark); color: var(--ink); }
.btn-light:hover { background: var(--sage); }
.btn-ghost-light { border-color: rgba(237, 235, 228, 0.45); color: var(--on-dark); }
.btn-ghost-light:hover { border-color: var(--on-dark); background: rgba(237, 235, 228, 0.08); }
.btn-outline { border-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--on-dark);
  transition: background-color var(--dur-med) ease, color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; }
.brand-mark { width: 32px; height: auto; flex: none; }
.brand-word { width: 134px; height: auto; flex: none; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 2.25rem; }
.main-nav a { text-decoration: none; font-size: 0.9375rem; padding-block: 0.5rem; position: relative; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.2rem; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-med) var(--ease-out);
}
.main-nav a:hover::after, .main-nav a[aria-current="true"]::after { transform: scaleX(1); }
.header-cta { min-height: 42px; padding: 0.5rem 1.25rem; color: inherit; }
.header-cta:hover { background: rgba(237, 235, 228, 0.1); }

/* Solid state once the hero is scrolled past */
.site-header.is-solid { background: rgba(230, 227, 220, 0.94); color: var(--ink); box-shadow: 0 1px 0 var(--rule); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); }
.site-header.is-solid .header-cta:hover { background: rgba(23, 32, 28, 0.06); }

.nav-toggle {
  display: none; margin-left: auto; width: 48px; height: 48px; padding: 0;
  background: none; border: 0; cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1px; background: currentColor;
  transition: transform var(--dur-med) var(--ease-out);
}
.nav-toggle span:first-child { top: 20px; }
.nav-toggle span:last-child { top: 27px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu { background: var(--forest); color: var(--on-dark); padding: 1rem var(--gutter) 2rem; }
.mobile-menu a { display: block; padding: 0.75rem 0; font-family: var(--serif); font-size: 2rem; font-weight: 300; text-decoration: none; border-bottom: 1px solid var(--rule-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--on-dark); background: var(--forest);
  overflow: hidden; isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; background: var(--forest); }

/* Background films (hero + founding partners) */
.bg-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* Gentle grade towards the site palette */
  filter: saturate(0.82) contrast(1.04) brightness(0.92);
}

/* Darkening: deepest behind the text (bottom-left), lighter top-right so the film stays alive */
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14, 19, 17, 0.45) 0%, rgba(14, 19, 17, 0.08) 20%, rgba(14, 19, 17, 0.22) 45%, rgba(14, 19, 17, 0.74) 75%, rgba(14, 19, 17, 0.88) 100%),
    linear-gradient(90deg, rgba(14, 19, 17, 0.5) 0%, rgba(14, 19, 17, 0.15) 60%, rgba(14, 19, 17, 0) 100%);
}

/* Pause / play for background films */
.video-toggle {
  position: absolute; right: var(--gutter); bottom: var(--gutter); z-index: 2;
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(237, 235, 228, 0.45); background: rgba(14, 19, 17, 0.25);
  color: var(--on-dark); cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.video-toggle:hover { border-color: var(--on-dark); background: rgba(14, 19, 17, 0.45); }
.video-toggle svg { width: 16px; height: 16px; }
.video-toggle .icon-pause { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.video-toggle .icon-play { fill: currentColor; margin-left: 2px; display: none; }
.video-toggle[aria-pressed="true"] .icon-pause { display: none; }
.video-toggle[aria-pressed="true"] .icon-play { display: block; }

.hero-content {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: end; gap: 3rem;
  padding-bottom: clamp(4.5rem, 3rem + 6vw, 8rem);
  padding-top: calc(var(--header-h) + 4rem);
}
.hero-title {
  font-family: var(--serif); font-weight: 300;
  font-size: var(--fs-display-1); line-height: 0.98; letter-spacing: -0.015em;
}
.hero-title em { font-style: italic; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line > span { display: inline-block; }
@media (min-width: 1025px) { .hero-title .line > span { white-space: nowrap; } }
.hero-side p { color: rgba(237, 235, 228, 0.86); max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Page-load sequence: the one orchestrated entrance */
.js .hero-title .line > span { transform: translateY(105%); }
.js .hero-side { opacity: 0; transform: translateY(12px); }
.is-loaded .hero-title .line > span { transform: none; transition: transform 1.1s var(--ease-out); }
.is-loaded .hero-title .line:nth-child(2) > span { transition-delay: 0.08s; }
.is-loaded .hero-title .line:nth-child(3) > span { transition-delay: 0.16s; }
.is-loaded .hero-side { opacity: 1; transform: none; transition: opacity 0.9s ease 0.5s, transform 0.9s var(--ease-out) 0.5s; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(3rem, 6vw, 7rem); }
.services-intro .lead { margin-top: 1.75rem; }
.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 3vw, 3rem); }
.service { padding-block: 2rem 2.25rem; border-top: 1px solid var(--rule); }
.service-icon { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 1.25rem; }
.service h3 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; margin-bottom: 0.5rem; }
.service p { color: var(--ink-muted); font-size: 0.9375rem; }

/* ---------- Portfolio ---------- */
.work { background: var(--paper); }
.work-head { text-align: center; max-width: 40rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.work-head p { color: var(--ink-muted); margin-top: 1rem; }

.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); }
.work-card { margin: 0; }
.film {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0;
  border: 0; border-radius: 4px; overflow: hidden; cursor: pointer; text-align: left;
  background: var(--forest); color: var(--on-dark); isolation: isolate;
}
.film[disabled] { cursor: default; }
.film-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.9s var(--ease-out); }
.film-placeholder {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(80% 90% at 85% 10%, rgba(195, 194, 161, 0.22), transparent 60%),
    linear-gradient(160deg, #24302A 0%, #17201C 70%);
}
.film-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(23, 32, 28, 0.7) 0%, rgba(23, 32, 28, 0) 45%, rgba(23, 32, 28, 0.35) 100%); }
.film-title { position: absolute; top: 1rem; left: 1.1rem; right: 1.1rem; }
.film-title strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.375rem; line-height: 1.15; }
.film-title span { font-size: 0.8125rem; color: var(--on-dark-muted); }
.film-play {
  position: absolute; left: 50%; top: 54%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; border: 1px solid rgba(237, 235, 228, 0.6);
  display: grid; place-items: center;
  background: rgba(23, 32, 28, 0.25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform var(--dur-med) var(--ease-out), background-color var(--dur-med) ease;
}
.film-play svg { width: 18px; height: 18px; fill: var(--on-dark); margin-left: 3px; }
.film-soon { position: absolute; left: 1.1rem; bottom: 0.85rem; font-size: 0.8125rem; color: var(--on-dark-muted); }
.film-type { position: absolute; right: 1.1rem; bottom: 0.85rem; font-size: 0.8125rem; color: var(--on-dark-muted); }
.film:not([disabled]):hover .film-play, .film:not([disabled]):focus-visible .film-play { transform: scale(1.08); background: rgba(237, 235, 228, 0.18); }
.film:not([disabled]):hover .film-poster { transform: scale(1.03); }
.film:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.work-cta { display: flex; justify-content: center; margin-top: clamp(2.5rem, 5vw, 3.75rem); }

/* ---------- Founding partners ---------- */
.partners {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, 82vh, 860px);
  display: flex; align-items: center;
  color: var(--on-dark); background: var(--forest);
  padding-block: var(--section-y);
}
.partners-media { position: absolute; inset: 0; z-index: -2; }
.partners-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 19, 17, 0.78) 0%, rgba(14, 19, 17, 0.5) 50%, rgba(14, 19, 17, 0.25) 100%),
    linear-gradient(180deg, rgba(14, 19, 17, 0.3) 0%, rgba(14, 19, 17, 0) 40%, rgba(14, 19, 17, 0.45) 100%);
}
.partners-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 1.75rem; }
.partners-title { font-family: var(--serif); font-weight: 300; font-size: var(--fs-display-2); line-height: 1.08; letter-spacing: -0.01em; }
.partners-text { font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 1.05rem + 1.3vw, 2.1rem); line-height: 1.3; max-width: 24em; color: var(--on-dark); text-wrap: pretty; }
.partners-inner .btn { margin-top: 0.75rem; }

/* ---------- Philosophy ---------- */
.philosophy { position: relative; height: 260vh; background: var(--forest); color: var(--on-dark); }
.philosophy-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-inline: var(--gutter); text-align: center;
}
.philosophy-mark { width: 38px; height: auto; flex: none; opacity: 0.6; margin-bottom: clamp(2rem, 4vw, 3rem); }
.philosophy-text {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 1rem + 3.6vw, 4.5rem); line-height: 1.14; letter-spacing: -0.01em;
  max-width: 19ch; max-width: min(19em, 100%);
}
.ph-line { display: block; }
.ph-line + .ph-line { margin-top: 0.35em; }
.ph-line:last-child { font-style: italic; }
.ph-char { opacity: var(--o, 1); transition: opacity 0.12s linear; }
.js .ph-char { --o: 0.16; }

/* ---------- Approach ---------- */
.approach-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: end; margin-bottom: clamp(3rem, 6vw, 5rem); }
.approach-head .lead { justify-self: end; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); counter-reset: step; }
.step { border-top: 1px solid var(--ink); padding-top: 1.5rem; }
.step-num { display: block; font-family: var(--serif); font-size: 1rem; font-style: italic; color: var(--ink-muted); margin-bottom: 2.5rem; font-variant-numeric: lining-nums; }
.step h3 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; margin-bottom: 0.6rem; }
.step p { color: var(--ink-muted); font-size: 0.9375rem; }

.regions { margin-top: clamp(4rem, 8vw, 7rem); padding-top: 2.5rem; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 2rem; }
.regions-label { color: var(--ink-muted); font-size: 0.9375rem; padding-top: 0.6rem; }
.regions-list { display: flex; flex-wrap: wrap; column-gap: 2.25rem; row-gap: 0.25rem; font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem); line-height: 1.3; }

/* ---------- CTA ---------- */
.cta {
  position: relative; background: var(--forest-2); color: var(--on-dark);
  padding-block: clamp(6rem, 4rem + 8vw, 11rem); overflow: hidden; isolation: isolate;
}
.cta-mark {
  position: absolute; z-index: -1; right: -4vw; top: 50%;
  width: min(52vw, 640px); height: auto; transform: translateY(-50%);
  color: var(--on-dark); opacity: 0.05; pointer-events: none;
}
.cta-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 2.5rem; }
.cta-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.75rem); line-height: 1.06; letter-spacing: -0.01em; max-width: 17em; text-wrap: balance; }
.cta-title em { font-style: italic; color: var(--sage); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(3rem, 6vw, 7rem); }
.contact-intro .lead { margin-top: 1.5rem; }
.contact-details { margin-top: 2.75rem; display: grid; gap: 1.25rem; }
.contact-details dt { font-size: 0.8125rem; color: var(--ink-muted); }
.contact-details dd { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; line-height: 1.3; }
.contact-details a { text-decoration-thickness: 1px; text-underline-offset: 4px; }

.contact-form { display: grid; gap: 1.5rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field label, .field legend { font-size: 0.875rem; font-weight: 400; color: var(--ink); }
.field label span { color: var(--ink-muted); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 0.7rem 0;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid rgba(23, 32, 28, 0.35); border-radius: 0;
  transition: border-color var(--dur-fast) ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: #7D847E; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.field input[aria-invalid="true"] { border-bottom-color: #A23B2A; }
.field-error { font-size: 0.8125rem; color: #A23B2A; }

.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips legend { margin-bottom: 0.75rem; padding: 0; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1.1rem;
  border: 1px solid rgba(23, 32, 28, 0.3); border-radius: 999px; font-size: 0.9375rem;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--forest); border-color: var(--forest); color: var(--on-dark); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.btn-submit { justify-self: start; margin-top: 0.5rem; }
.form-status { font-size: 0.9375rem; color: var(--ink-muted); min-height: 1.5em; }
.form-note { font-size: 0.8125rem; color: var(--ink-muted); margin-top: -0.5rem; }
.form-note a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: var(--on-dark-muted); padding-block: 4rem 3rem; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 2rem; }
.footer-logo { display: block; width: 150px; color: var(--on-dark); opacity: 0.92; text-decoration: none; }
.footer-logo svg { width: 100%; height: auto; }
.site-footer nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2rem; }
.site-footer nav a { text-decoration: none; font-size: 0.9375rem; padding-block: 0.5rem; display: inline-block; }
.site-footer nav a:hover { color: var(--on-dark); }
.footer-copy { font-size: 0.8125rem; line-height: 1.9; }
.footer-copy a { color: var(--on-dark-muted); text-underline-offset: 3px; }
.footer-copy a:hover { color: var(--on-dark); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(1200px, 92vw); max-width: none; max-height: none; padding: 0; border: 0;
  background: #000; color: var(--on-dark); overflow: visible;
}
.lightbox::backdrop { background: rgba(14, 19, 17, 0.92); }
.lightbox-frame { aspect-ratio: 16 / 9; width: 100%; }
.lightbox-frame video, .lightbox-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.lightbox-close {
  position: absolute; right: 0; top: -56px; width: 48px; height: 48px;
  display: grid; place-items: center; background: none; border: 1px solid rgba(237, 235, 228, 0.4); border-radius: 50%; cursor: pointer;
}
.lightbox-close svg { width: 18px; height: 18px; stroke: var(--on-dark); stroke-width: 1.4; fill: none; }
.lightbox-close:hover { border-color: var(--on-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 2rem; }
  .services-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
  .approach-head { grid-template-columns: 1fr; gap: 1.25rem; }
  .approach-head .lead { justify-self: start; }
  .regions { grid-template-columns: 1fr; gap: 1rem; }
  .footer-inner { grid-template-columns: 1fr; justify-items: start; }
  .site-footer nav ul { justify-content: flex-start; }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  /* Text covers more of the frame on phones, so the darkening starts higher */
  .hero-shade { background: linear-gradient(180deg, rgba(14, 19, 17, 0.45) 0%, rgba(14, 19, 17, 0.22) 16%, rgba(14, 19, 17, 0.62) 40%, rgba(14, 19, 17, 0.9) 100%); }
  .brand-mark { width: 27px; }
  .brand-word { width: 114px; }
  .service-list { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step-num { margin-bottom: 1rem; }
  .field-row { grid-template-columns: 1fr; }
  .philosophy { height: 220vh; }
  .lightbox-close { top: -56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .hero-title .line > span, .js .hero-side { transform: none; opacity: 1; }
  .js .ph-char { --o: 1; }
  .philosophy { height: auto; }
  .philosophy-sticky { position: relative; height: auto; padding-block: var(--section-y); }
}

/* ---------- Contact form: sending + success ---------- */
.contact-form[hidden] { display: none; }
.botcheck { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-submit[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.form-status a { color: var(--ink); }

.form-success {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem;
  padding-top: 0.5rem; outline: none;
}
.form-success[hidden] { display: none; }
.form-success-mark { width: 34px; height: auto; opacity: 0.85; }
.form-success-title { font-family: var(--serif); font-weight: 300; font-size: var(--fs-display-2); line-height: 1.08; letter-spacing: -0.01em; }
.form-success-text { color: var(--ink-muted); font-size: var(--fs-lead); max-width: 30em; }
.form-success-text strong { color: var(--ink); font-weight: 400; overflow-wrap: anywhere; }
.form-success .btn { margin-top: 0.75rem; color: var(--ink); }
.form-success .btn:hover { background: rgba(23, 32, 28, 0.06); }

.js .form-success:not([hidden]) { animation: success-in 0.7s var(--ease-out) both; }
@keyframes success-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Legal pages (privacy policy) ---------- */
.legal-page .site-header { position: sticky; }
.legal-back { margin-left: auto; }
.legal { padding-block: clamp(3rem, 2rem + 4vw, 6rem) var(--section-y); }
.legal-inner { max-width: 46rem; }
.legal-updated { color: var(--ink-muted); font-size: 0.875rem; margin-top: 0.75rem; }
.legal .lead { margin-top: 2rem; max-width: none; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1.2; margin: 2.75rem 0 0.75rem; }
.legal p + p, .legal ul + p { margin-top: 0.9rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; margin-top: 0.75rem; }
.legal li + li { margin-top: 0.5rem; }
.legal strong { font-weight: 500; }
.legal a { color: var(--ink); text-underline-offset: 3px; }
.legal-footer { grid-template-columns: 1fr; }
@media (max-width: 860px) { .legal-page .header-cta { display: inline-flex; } }
@media (max-width: 640px) { .legal-back { min-height: 40px; padding: 0.4rem 0.9rem; font-size: 0.875rem; } }
