/* ------------------------------------------------------------------
   Grain & Mortise — design tokens, layout, components
   ------------------------------------------------------------------ */

/* Self-hosted variable fonts (latin subset) — no third-party round trip */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
}
:root {
  --ink: #17110c;
  --ink-soft: #473a2f;
  --cream: #f5efe4;
  --cream-2: #ece1d1;
  --paper: #fbf7ef;
  --amber: #e0a45c;
  --amber-deep: #a8692a;
  --dark: #0e0b08;
  --dark-2: #171310;
  --light: #f6efe3;
  --light-muted: #c3b3a0;
  --line: rgba(23, 17, 12, 0.14);
  --line-light: rgba(246, 239, 227, 0.18);
  --danger: #ff9d7e;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: clamp(1.05rem, 0.6vw + 0.9rem, 1.2rem);
  --text-xl: clamp(1.25rem, 1vw + 1rem, 1.6rem);
  --text-2xl: clamp(1.7rem, 2vw + 1.1rem, 2.6rem);
  --text-3xl: clamp(2.2rem, 4vw + 1rem, 4.4rem);
  --text-hero: clamp(3rem, 8.5vw + 0.5rem, 8rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 6rem;
  --space-16: 8rem;

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 14px;

  --shadow-md: 0 10px 30px rgba(20, 12, 6, 0.18);
  --shadow-lg: 0 30px 70px rgba(20, 12, 6, 0.35);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 320ms;

  --container: 1240px;
  --header-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

p {
  margin: 0 0 1em;
  max-width: 62ch;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

button {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--amber);
  color: var(--ink);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin: 0 0 var(--space-4);
}

.eyebrow--light {
  color: var(--amber);
}

.section-title {
  font-size: var(--text-3xl);
  max-width: 18ch;
}

.section-note {
  max-width: 34ch;
  color: var(--light-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  background: var(--amber);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: top 180ms var(--ease);
}

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

/* Header ---------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgba(12, 9, 7, 0.82);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--line-light);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--header-h);
  color: var(--light);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  color: var(--amber);
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand__sub {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--light-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.2rem);
  font-size: var(--text-sm);
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
  color: var(--light);
  padding-block: 0.4rem;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav__cta {
  border: 1px solid rgba(246, 239, 227, 0.38);
  border-radius: 999px;
  padding: 0.65rem 1.25rem !important;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.site-nav__cta::after {
  display: none;
}

.site-nav__cta:hover,
.site-nav__cta:focus-visible {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(246, 239, 227, 0.3);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--light);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.2px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.2px) rotate(-45deg);
}

/* Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform 160ms var(--ease),
    box-shadow var(--dur) var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn--solid {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
}

.btn--solid:hover {
  background: #efb772;
  border-color: #efb772;
  box-shadow: 0 12px 28px rgba(224, 164, 92, 0.28);
}

.btn--ghost {
  background: transparent;
  color: var(--light);
  border-color: rgba(246, 239, 227, 0.42);
}

.btn--ghost:hover {
  background: rgba(246, 239, 227, 0.1);
  border-color: var(--light);
}

.btn--wide {
  width: 100%;
}

/* Hero ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-block: calc(var(--header-h) + 3rem) clamp(3rem, 7vw, 5.5rem);
  background: radial-gradient(120% 90% at 62% 32%, #3b2417 0%, #1a100a 46%, #0b0806 100%);
  color: var(--light);
  overflow: clip;
  isolation: isolate;
  --hero-canvas-opacity: 1;
}

/* Instant paint: the poster holds the frame until WebGL is ready */
.hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 42%;
  z-index: 0;
  transform: translateX(6%);
  transition: opacity 600ms var(--ease);
}

.hero.is-3d .hero__poster {
  opacity: 0;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 700ms var(--ease);
  transform: translateX(6%);
}

.hero.is-3d .hero__canvas {
  opacity: var(--hero-canvas-opacity);
}

.hero__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(11, 8, 6, 0.9) 0%, rgba(11, 8, 6, 0.55) 38%, rgba(11, 8, 6, 0.08) 62%, rgba(11, 8, 6, 0.35) 100%),
    linear-gradient(0deg, rgba(11, 8, 6, 0.92) 0%, transparent 34%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
}

.eyebrow--light {
  color: var(--amber);
}

.hero__title {
  font-size: var(--text-hero);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.94;
  margin-block: 0 var(--space-5);
  text-wrap: balance;
}

.hero__title em {
  font-style: italic;
  color: var(--amber);
}

.hero__lede {
  font-size: var(--text-lg);
  color: #e3d6c6;
  max-width: 44ch;
  margin-bottom: var(--space-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  max-width: 640px;
  margin: 0;
  border-top: 1px solid var(--line-light);
  padding-top: var(--space-5);
}

.hero__meta dt {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--light-muted);
  margin-bottom: 0.35rem;
}

.hero__meta dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.scroll-cue {
  position: absolute;
  right: clamp(1.25rem, 4vw, 2.5rem);
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--light-muted);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.scroll-cue__line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--amber), transparent);
  animation: cue 2.4s var(--ease) infinite;
  transform-origin: top;
}

@keyframes cue {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Marquee --------------------------------------------------------- */
.marquee {
  background: var(--cream-2);
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding-block: 0.95rem;
}

.marquee__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee__track span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 3rem;
  white-space: nowrap;
}

.marquee__track span::after {
  content: "✳";
  color: var(--amber-deep);
  font-size: 0.8rem;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Scroll story ---------------------------------------------------- */
.story {
  position: relative;
  height: 360vh;
  background: var(--dark);
  color: var(--light);
}

.story__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.story__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.story__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(11, 8, 6, 0.95) 0%, rgba(11, 8, 6, 0.72) 30%, rgba(11, 8, 6, 0.05) 58%, rgba(11, 8, 6, 0.1) 100%),
    linear-gradient(0deg, rgba(11, 8, 6, 0.8) 0%, transparent 40%);
  pointer-events: none;
}

.story__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: calc(var(--header-h) + 2rem) clamp(2rem, 6vh, 4rem);
}

.story__head {
  max-width: 30rem;
}

.story__title {
  font-size: var(--text-2xl);
  font-weight: 300;
}

.story__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  min-height: 15rem;
  max-width: 30rem;
}

.story__step {
  position: absolute;
  inset: auto 0 0 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  pointer-events: none;
}

.story__step.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.story__num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--amber);
  border-top: 1px solid var(--line-light);
  padding-top: 0.6rem;
  margin-bottom: 0.9rem;
  min-width: 4rem;
}

.story__step h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.5rem;
}

.story__step p {
  color: #d8cabb;
  font-size: var(--text-sm);
  max-width: 40ch;
}

.story__rail {
  position: absolute;
  right: clamp(1.25rem, 3vw, 2.25rem);
  top: 50%;
  translate: 0 -50%;
  width: 2px;
  height: min(30vh, 220px);
  background: var(--line-light);
  z-index: 2;
}

.story__rail-fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(var(--p, 0) * 100%);
  background: var(--amber);
  transition: height 120ms linear;
}

/* Work ------------------------------------------------------------ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  flex-wrap: wrap;
}

.section-head--light .section-title {
  color: var(--light);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.chip:hover {
  border-color: var(--ink);
}

.chip.is-active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
}

.card {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream-2);
}

.card.is-hidden {
  display: none;
}

.card__btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  text-align: left;
  color: var(--light);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.card__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms var(--ease), filter 500ms var(--ease);
}

.card__btn:hover img,
.card__btn:focus-visible img {
  transform: scale(1.045);
  filter: saturate(1.05);
}

.card__meta {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 2.5rem 1.15rem 1.1rem;
  background: linear-gradient(transparent, rgba(12, 8, 5, 0.86));
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.card__sub {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dbcbba;
}

.work__empty {
  margin-top: var(--space-6);
  color: var(--ink-soft);
}

/* Films ----------------------------------------------------------- */
.section--dark {
  background: var(--dark);
  color: var(--light);
}

.films__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
}

.film {
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--dark-2);
}

.film__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #120d09;
}

.film__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 1.1rem 1.25rem;
}

.film__bar h3 {
  font-size: 1.2rem;
}

.film__bar p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--light-muted);
}

.film__toggle {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  background: transparent;
  color: var(--light);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.film__toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.film__toggle:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.film.is-playing .film__toggle svg {
  display: none;
}

.film.is-playing .film__toggle::before {
  content: "";
  width: 14px;
  height: 16px;
  border-inline: 4px solid currentColor;
}

/* Process --------------------------------------------------------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  counter-reset: step;
}

.steps li {
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
}

.steps__num {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--amber-deep);
  margin-bottom: var(--space-4);
}

.steps h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.4rem;
}

.steps p {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin: 0;
}

/* Stats ----------------------------------------------------------- */
.stats {
  background: var(--ink);
  color: var(--light);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-left: 1px solid var(--line-light);
  padding-left: var(--space-4);
}

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1;
  color: var(--amber);
}

.stat__label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light-muted);
}

/* Studio ---------------------------------------------------------- */
.studio__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.studio__figure {
  margin: 0;
}

.studio__figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.studio__figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.studio__body p {
  color: var(--ink-soft);
}

.tick-list {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 var(--space-6);
  display: grid;
  gap: 0.55rem;
}

.tick-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: var(--text-sm);
}

.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--amber-deep);
}

/* Quotes ---------------------------------------------------------- */
.quotes {
  background: var(--cream-2);
}

.quotes__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.quotes blockquote {
  margin: 0;
}

.quotes blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.6vw + 0.9rem, 1.75rem);
  line-height: 1.4;
  max-width: 34ch;
}

.quotes footer {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Contact --------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.contact__intro p {
  color: #d6c7b7;
}

.contact__list {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0 0;
  display: grid;
  gap: 0.9rem;
  font-size: var(--text-sm);
}

.contact__list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line-light);
  padding-top: 0.9rem;
}

.contact__list span {
  color: var(--light-muted);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 0.15em;
}

.contact__list a {
  text-decoration-color: var(--amber);
}

.form {
  display: grid;
  gap: var(--space-4);
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--light-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: rgba(246, 239, 227, 0.04);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  color: var(--light);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.85rem 0.95rem;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--light-muted) 50%),
    linear-gradient(135deg, var(--light-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8e7d6b;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(246, 239, 227, 0.34);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
  border-color: var(--amber);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field__error {
  margin: 0;
  font-size: 0.78rem;
  color: var(--danger);
}

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
}

.field--check input {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--amber);
}

.field--check label {
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
  color: #cfc0af;
}

.field--check .field__error {
  grid-column: 1 / -1;
}

.form__note {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--light-muted);
  text-align: center;
}

.form__status {
  margin: 0;
  min-height: 1.4rem;
  font-size: 0.85rem;
  color: #a9d6a3;
}

/* Footer ---------------------------------------------------------- */
.site-footer {
  background: #080605;
  color: var(--light-muted);
  padding-block: var(--space-8) var(--space-6);
  border-top: 1px solid var(--line-light);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-6);
  align-items: center;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
}

.site-footer .brand__name {
  color: var(--light);
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.site-footer nav a {
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--amber);
}

.site-footer__note {
  font-size: 0.72rem;
  margin: 0;
  max-width: 30ch;
  text-align: right;
}

/* Lightbox -------------------------------------------------------- */
.lightbox {
  width: min(92vw, 900px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--dark-2);
  color: var(--light);
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(6, 4, 3, 0.84);
  backdrop-filter: blur(4px);
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #0a0705;
}

.lightbox__caption {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--light-muted);
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  background: rgba(10, 7, 5, 0.7);
  color: var(--light);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close:hover {
  background: var(--amber);
  color: var(--ink);
}

/* Reveal ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Responsive ------------------------------------------------------ */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .story__steps {
    max-width: 24rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .site-footer__note {
    text-align: left;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 8, 6, 0.97);
    padding: 0.5rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line-light);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav a {
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(246, 239, 227, 0.08);
  }

  .site-nav__cta {
    margin-top: 0.9rem;
    text-align: center;
    border-bottom: 0 !important;
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-block: calc(var(--header-h) + 6rem) 3rem;
  }

  .hero__canvas {
    transform: none;
    opacity: 0.55;
  }

  .hero__wash {
    background: linear-gradient(0deg, rgba(11, 8, 6, 0.96) 4%, rgba(11, 8, 6, 0.6) 52%, rgba(11, 8, 6, 0.25) 100%);
  }

  .hero__meta {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .scroll-cue {
    display: none;
  }

  .story {
    height: 300vh;
  }

  .story__steps {
    min-height: 17rem;
  }

  .story__rail {
    display: none;
  }

  .films__grid,
  .quotes__grid {
    grid-template-columns: 1fr;
  }

  .stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }

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

  .hero__title {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .brand__sub {
    display: none;
  }

  .story__step p {
    font-size: 0.86rem;
  }

  .contact__list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

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

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

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

  .marquee__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
  }

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

  .story {
    height: auto;
  }

  .story__pin {
    position: relative;
    height: auto;
    padding-block: 4rem;
  }

  .story__steps {
    position: static;
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
    min-height: 0;
  }

  .story__step {
    position: static;
    opacity: 1;
    transform: none;
  }

  .story__canvas {
    opacity: 0.5;
  }
}

/* Anchor offset + no-WebGL fallback ------------------------------- */
[id] {
  scroll-margin-top: calc(var(--header-h) + 14px);
}

body.no-3d .hero {
  background-image: linear-gradient(90deg, rgba(11, 8, 6, 0.88) 0%, rgba(11, 8, 6, 0.4) 60%, rgba(11, 8, 6, 0.3) 100%),
    url("../img/hero-poster.jpg");
  background-size: cover;
  background-position: 58% 42%;
}

body.no-3d .story {
  height: auto;
}

body.no-3d .story__pin {
  position: relative;
  height: auto;
  padding-block: 4rem;
}

body.no-3d .story__steps {
  position: static;
  display: grid;
  gap: 2rem;
  min-height: 0;
  margin-top: 1rem;
}

body.no-3d .story__step {
  position: static;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

body.no-3d .story__canvas {
  display: none;
}

/* ==================================================================
   Door polishing — before/after compare, films, phone refinements
   ================================================================== */

.compare-section {
  background: linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
}

.compare__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  grid-template-areas:
    "head figure"
    "body figure";
  column-gap: clamp(2rem, 5vw, 4.5rem);
  row-gap: 1.15rem;
  align-items: center;
}

.compare__copy {
  grid-area: head;
  align-self: end;
}

.compare__body {
  grid-area: body;
  align-self: start;
}

.compare {
  grid-area: figure;
  margin: 0;
}

.compare__body p {
  color: var(--ink-soft);
}

.compare__body .tick-list {
  margin-bottom: 0;
}

.compare__copy .section-title {
  margin-bottom: 0;
}

.compare__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0d0906;
  box-shadow: var(--shadow-lg);
  touch-action: pan-y;
}

.compare__frame:focus-within {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.compare__img,
.compare__before img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.compare__before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
  will-change: clip-path;
}

.compare__tag {
  position: absolute;
  top: 1rem;
  z-index: 3;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--light);
  background: rgba(10, 7, 5, 0.72);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.compare__tag--before {
  left: 1rem;
}

.compare__tag--after {
  right: 1rem;
  color: var(--ink);
  background: rgba(224, 164, 92, 0.94);
}

.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  z-index: 4;
  background: rgba(246, 239, 227, 0.9);
  translate: -1px 0;
  pointer-events: none;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.55);
}

.compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(246, 239, 227, 0.96);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
}

.compare__grip::before,
.compare__grip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
  translate: 0 -50%;
}

.compare__grip::before {
  left: 15px;
  border-right: 7px solid var(--ink-soft);
}

.compare__grip::after {
  right: 15px;
  border-left: 7px solid var(--ink-soft);
}

.compare__range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.compare__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 56px;
  height: 100%;
  border: 0;
  background: transparent;
}

.compare__range::-moz-range-thumb {
  width: 56px;
  height: 100%;
  border: 0;
  background: transparent;
}

.compare__range:focus-visible {
  outline: none;
}

.compare figcaption {
  margin-top: 0.85rem;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* Three films instead of two */
.films__grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

/* Larger tap targets for text links */
.contact__list a,
.site-footer__note a,
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.contact__list li {
  align-items: start;
}

.site-footer nav a {
  padding-inline: 0.15rem;
}

@media (max-width: 1024px) {
  .compare__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "figure"
      "body";
    gap: 1.35rem;
  }

  .compare {
    max-width: 520px;
  }
}

@media (max-width: 860px) {
  /* Blur is the most expensive thing in a sticky header — use a flat scrim */
  .site-header.is-stuck {
    background: rgba(12, 9, 7, 0.94);
    backdrop-filter: none;
  }

  .reveal {
    transition-duration: 480ms;
    transform: translateY(14px);
  }

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

  .compare {
    max-width: none;
  }

  /* Story: door on top, copy on a solid panel underneath */
  .story__pin {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .story__canvas {
    position: relative;
    inset: auto;
    flex: none;
    width: 100%;
    height: 60%;
  }

  .story__shade {
    inset: 0 0 auto 0;
    height: 60%;
    background: linear-gradient(
      180deg,
      rgba(11, 8, 6, 0.1) 0%,
      rgba(11, 8, 6, 0.55) 68%,
      rgba(11, 8, 6, 0.92) 100%
    );
  }

  .story__content {
    height: 40%;
    justify-content: center;
    gap: 0.7rem;
    padding-block: 0.9rem 1.1rem;
    background: var(--dark);
  }

  .story__head {
    max-width: none;
  }

  .story__head .eyebrow {
    margin-bottom: 0.35rem;
  }

  .story__title {
    font-size: 1.6rem;
  }

  .story__steps {
    flex: none;
    min-height: 11.5rem;
    max-width: none;
  }

  .story__step {
    inset: 0 0 auto 0;
  }

  .story__num {
    margin-bottom: 0.5rem;
    padding-top: 0.45rem;
  }

  .story__step h3 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
  }

  .story__step p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .hero {
    --hero-canvas-opacity: 0.42;
  }
}

@media (max-width: 560px) {
  .compare {
    padding-inline: 1.25rem;
  }

  .compare__tag {
    top: 0.75rem;
    font-size: 0.6rem;
  }

  .compare__tag--before {
    left: 0.75rem;
  }

  .compare__tag--after {
    right: 0.75rem;
  }

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

  .filters .chip {
    min-height: 44px;
    padding-inline: 1.05rem;
    display: inline-flex;
    align-items: center;
  }

  .story__title {
    font-size: 1.42rem;
  }

  .story__step p {
    font-size: 0.8rem;
  }

  .film__toggle {
    width: 48px;
    height: 48px;
  }
}

/* Phone ergonomics ------------------------------------------------- */
.quick-contact {
  display: none;
}

@media (max-width: 860px) {
  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }

  .quick-contact {
    position: fixed;
    inset: auto 0 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 8, 6, 0.97);
    border-top: 1px solid var(--line-light);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  }

  .quick-contact a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    touch-action: manipulation;
  }

  .quick-contact svg {
    width: 18px;
    height: 18px;
    flex: none;
  }

  .quick-contact__call {
    background: var(--amber);
    color: #1a120b;
  }

  .quick-contact__wa {
    border: 1px solid rgba(246, 239, 227, 0.28);
    background: rgba(246, 239, 227, 0.05);
    color: var(--light);
  }

  /* Shorter hero so both buttons sit above the fold on a 844 px phone */
  .hero {
    padding-block: calc(var(--header-h) + 3.25rem) 2.5rem;
  }

  .hero__meta {
    gap: 0.7rem;
  }

  a,
  button {
    touch-action: manipulation;
  }

  .brand {
    min-height: 44px;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
  }

  .site-footer nav a {
    padding-inline: 0.55rem;
  }

  .site-footer nav {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 0.1rem 1.4rem;
  }

  .field input,
  .field select,
  .field textarea {
    font-size: 1rem;
    padding: 0.95rem 1rem;
  }

  .field textarea {
    min-height: 8rem;
  }
}

