/* ==========================================================================
   THIRD DOOR PICTURES — Design system
   Black / White / Red. Editorial. Minimal. Cinematic.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #0A0A0A;                       /* primary text / black */
  --paper: #FAFAF7;                     /* primary background / off-white */
  --paper-pure: #FFFFFF;
  --red: #D90429;                       /* signal red — used sparingly */
  --red-deep: #A8021E;
  --rule: rgba(10, 10, 10, 0.12);       /* hairline dividers */
  --rule-strong: rgba(10, 10, 10, 0.32);
  --mute: rgba(10, 10, 10, 0.58);       /* secondary text */
  --inverse-ink: #FAFAF7;               /* text on black */
  --inverse-mute: rgba(250, 250, 247, 0.62);
  --inverse-rule: rgba(250, 250, 247, 0.14);

  --serif: "Fraunces", "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
           "Helvetica Neue", Arial, sans-serif;

  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 10vw, 160px);

  --t-fast: 180ms cubic-bezier(.2,.6,.2,1);
  --t-med:  340ms cubic-bezier(.2,.6,.2,1);
  --t-slow: 720ms cubic-bezier(.2,.6,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Typography scale ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mute);
}
.eyebrow.is-red { color: var(--red); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(44px, 7.2vw, 104px); line-height: 0.98; letter-spacing: -0.025em; }
h2 { font-size: clamp(32px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.18; }
h4 { font-size: 18px; line-height: 1.3; letter-spacing: 0; }

p { margin: 0; }
.lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; color: var(--ink); max-width: 60ch; }
.muted { color: var(--mute); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--tight { padding-top: clamp(48px, 6vw, 96px); padding-bottom: clamp(48px, 6vw, 96px); }
.section--dark { background: var(--ink); color: var(--inverse-ink); }
.section--dark .muted { color: var(--inverse-mute); }
.section--dark .eyebrow { color: var(--inverse-mute); }
.section--dark .rule { background: var(--inverse-rule); }

.rule { height: 1px; background: var(--rule); width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 12px;
  text-transform: uppercase;
}
/* The door mark beside the wordmark — small, raised slightly so it
   optically aligns with the wordmark's cap-height. */
.brand__mark {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
  position: relative;
  top: -1px;
}
.brand { color: var(--ink); }
.section--dark .brand,
.hero .brand { color: var(--inverse-ink); }
.brand__name { white-space: nowrap; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 36px); }
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 2px;
  position: relative;
  transition: color var(--t-fast);
}
.nav a:hover { color: var(--red); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 2px;
  height: 1px; background: var(--ink);
}
.nav__cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
}
.nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after {
  display: block; width: 22px; height: 1.5px; background: var(--ink); position: relative;
  transition: transform var(--t-fast), top var(--t-fast);
}
.nav-toggle__icon::before, .nav-toggle__icon::after {
  content: ""; position: absolute; left: 0;
}
.nav-toggle__icon::before { top: -7px; }
.nav-toggle__icon::after { top: 7px; }

@media (max-width: 820px) {
  /* On mobile, drop backdrop-filter from the header — it creates a new
     containing block that traps the position:fixed nav inside the 60px header. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--paper);
  }
  .nav-toggle { display: inline-flex; }
  /* Dark mobile menu — readable over any section underneath (dark or light). */
  .nav {
    position: fixed !important;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);   /* dynamic viewport unit for iOS Safari */
    background: var(--ink) !important;
    color: var(--inverse-ink) !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 24px var(--gutter) 40px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-med), transform var(--t-med);
    border-bottom: 1px solid var(--inverse-rule);
    z-index: 9999;        /* well above the sticky header */
    overflow-y: auto;     /* scroll if nav content exceeds viewport */
  }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav a {
    font-size: 28px;
    font-family: var(--serif);
    padding: 14px 0;
    width: 100%;
    color: var(--inverse-ink) !important;
    border-bottom: 1px solid var(--inverse-rule) !important;
  }
  .nav a:hover { color: var(--red) !important; }
  .nav a[aria-current="page"]::after { background: var(--inverse-ink); }
  .nav__cta {
    margin-left: 0;
    margin-top: 24px;
    /* Keep the red CTA visually distinct in the dark menu */
    background: var(--red) !important;
    color: #fff !important;
    border-color: var(--red) !important;
  }
  .nav__cta:hover { background: var(--red-deep) !important; border-color: var(--red-deep) !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--inverse-ink);
  border-radius: 0;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--inverse-ink); }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn--small { padding: 10px 16px; font-size: 13px; }
.btn--link {
  background: none; border: 0; padding: 0; color: var(--ink); font-weight: 500;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}
.btn--link:hover { color: var(--red); border-color: var(--red); transform: none; background: none; }

.section--dark .btn { background: var(--inverse-ink); color: var(--ink); border-color: var(--inverse-ink); }
.section--dark .btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
.section--dark .btn--ghost { background: transparent; color: var(--inverse-ink); border-color: var(--inverse-ink); }
.section--dark .btn--ghost:hover { background: var(--inverse-ink); color: var(--ink); }

.arrow { display: inline-block; width: 14px; height: 14px; }
.arrow::before {
  content: "";
  display: block; width: 10px; height: 10px;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
  transform: rotate(45deg); margin: 1px 0 0 1px;
}

/* ---------- Badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-size: 12px; letter-spacing: 0.04em;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--ink);
}
.badge::before {
  content: ""; width: 5px; height: 5px; background: var(--red); border-radius: 50%;
}
.section--dark .badge { border-color: var(--inverse-rule); color: var(--inverse-ink); }

/* ---------- Hero ---------- */
/* Dark hero — the doors artwork has white fills on transparent, built for black. */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--inverse-ink);
  overflow: hidden;
}
.hero__inner {
  position: relative; z-index: 1;
  padding: clamp(96px, 14vw, 180px) 0 clamp(64px, 8vw, 120px);
}
/* Grand-image variant: single column for text — image is absolutely
   positioned in the upper-right corner of the hero. */
.hero__inner--grand {
  display: block;
}
.hero__text { position: relative; z-index: 2; max-width: 60ch; }
.hero__eyebrow { color: var(--red); }
.hero h1 { margin-top: 18px; max-width: 14ch; }
.hero h1 em { font-style: italic; color: var(--red); font-weight: 400; }
.hero__sub {
  margin-top: 24px;
  max-width: 56ch;
  color: var(--inverse-mute);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.5;
}
.hero__ctas { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero .badges { margin-top: 32px; }
.hero .badge { border-color: var(--inverse-rule); color: var(--inverse-ink); }
.hero__corners::before,
.hero__corners::after { border-color: var(--inverse-rule); }

/* Grand image — small mark pinned tight to the bottom-right corner of the hero. */
.hero__art {
  margin: 0;
  position: absolute;
  bottom: clamp(16px, 2.5vw, 32px);
  right: var(--gutter);
  width: clamp(130px, 16vw, 220px);
  z-index: 1;
  pointer-events: none;
}
.hero__art-img {
  width: 100%;
  height: auto;
  display: block;
}
/* Caption hidden — the image is small and reads on its own */
.hero__art-caption {
  display: none;
}
@media (max-width: 720px) {
  .hero__art {
    position: static;
    width: 50%;
    margin: 24px 0 0 auto;
  }
}

/* Hero corner marks — small editorial detail */
.hero__corners { position: absolute; inset: 16px; pointer-events: none; }
.hero__corners::before,
.hero__corners::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 1px solid var(--inverse-rule);
}
.hero__corners::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hero__corners::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* Grain texture — generated, no external asset */
:root {
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.85'/></svg>");
}

/* ---------- Section head ---------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 60px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head__title { max-width: 18ch; }
.section-head__body { max-width: 52ch; }
@media (max-width: 720px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- Service cards (3-5) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.card {
  background: var(--paper);
  padding: 32px 28px;
  display: flex; flex-direction: column;
  min-height: 240px;
  transition: background var(--t-fast);
}
.card:hover { background: var(--ink); color: var(--inverse-ink); }
.card:hover .card__num { color: var(--red); }
.card:hover .card__arrow { color: var(--red); }
.card__num { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--mute); transition: color var(--t-fast); }
.card h3 { margin-top: 14px; }
.card p { margin-top: 12px; font-size: 14.5px; color: var(--mute); }
.card:hover p { color: var(--inverse-mute); }
.card__arrow { margin-top: auto; padding-top: 24px; color: var(--ink); transition: color var(--t-fast); }
.card:hover .card__arrow { color: var(--inverse-ink); }
.section--dark .card { background: var(--ink); color: var(--inverse-ink); }
.section--dark .card p { color: var(--inverse-mute); }
.section--dark .cards { background: var(--inverse-rule); border-color: var(--inverse-rule); }
.section--dark .card:hover { background: var(--paper); color: var(--ink); }
.section--dark .card:hover p { color: var(--mute); }

/* ---------- Process / How we work ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
@media (max-width: 760px) { .process { grid-template-columns: 1fr; } }
.process__step { border-top: 1px solid var(--ink); padding-top: 20px; }
.process__num { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--red); letter-spacing: 0.02em; }
.process__title { margin-top: 8px; font-family: var(--serif); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -0.02em; }
.process__body { margin-top: 14px; color: var(--mute); max-width: 38ch; font-size: 15px; }

/* ---------- Featured work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .work-grid { grid-template-columns: 1fr; } }

.tile {
  display: block;
  text-align: left;
  width: 100%;
  background: transparent;
  cursor: pointer;
  transition: transform var(--t-med);
}
.tile:hover { transform: translateY(-2px); }
.tile__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--ink);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.tile__art {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--inverse-mute);
  font-family: var(--serif); font-style: italic;
  background-image: var(--grain);
  background-blend-mode: overlay;
  transition: transform var(--t-slow), filter var(--t-med);
}
.tile:hover .tile__art { transform: scale(1.03); filter: brightness(1.05); }
.tile__art--a { background-color: #0A0A0A; }
.tile__art--b { background-color: #141414; }
.tile__art--c { background-color: #1C1C1C; }
.tile__art--d {
  background-color: #0A0A0A;
  background-image:
    linear-gradient(180deg, rgba(217,4,41,0.0) 60%, rgba(217,4,41,0.18) 100%),
    var(--grain);
}
.tile__art--e {
  background-color: #0A0A0A;
  background-image:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,0.08), transparent 60%),
    var(--grain);
}
.tile__art--f {
  background-color: #0A0A0A;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 8px),
    var(--grain);
}
.tile__art--g {
  background-color: #0A0A0A;
  background-image:
    radial-gradient(ellipse at 50% 100%, rgba(217,4,41,0.25), transparent 55%),
    var(--grain);
}
.tile__art--h {
  background-color: #0A0A0A;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.06) 0 50%, transparent 50% 100%),
    var(--grain);
}

.tile__meta {
  margin-top: 14px;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
}
.tile__title { font-family: var(--serif); font-size: 20px; letter-spacing: -0.01em; }
.tile__format { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.tile__status { margin-top: 2px; font-size: 12px; color: var(--mute); }

.section--dark .tile__frame { border-color: var(--inverse-rule); }
.section--dark .tile__title { color: var(--inverse-ink); }
.section--dark .tile__format, .section--dark .tile__status { color: var(--inverse-mute); }

/* ---------- CTA band ---------- */
.cta-band {
  display: grid; grid-template-columns: 1.4fr auto; gap: 24px; align-items: end;
}
.cta-band h2 { max-width: 16ch; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Capabilities sections ---------- */
.cap {
  display: grid;
  grid-template-columns: 0.45fr 0.55fr;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--rule);
}
.cap:last-child { border-bottom: 1px solid var(--rule); }
@media (max-width: 820px) { .cap { grid-template-columns: 1fr; } }
.cap__index { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--red); }
.cap__title { margin-top: 6px; }
.cap__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.cap__list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15.5px;
  display: grid; grid-template-columns: 16px 1fr; gap: 12px; align-items: baseline;
}
.cap__list li::before {
  content: "+"; color: var(--red); font-family: var(--serif); font-size: 18px; line-height: 1;
}
.cap__intro { color: var(--mute); margin-top: 18px; max-width: 48ch; }

/* ---------- About ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.values {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.values__item {
  padding: 28px 20px 28px 0;
  border-right: 1px solid var(--rule);
}
.values__item:last-child { border-right: 0; }
.values__num { font-family: var(--serif); font-style: italic; color: var(--mute); font-size: 13px; }
.values__name { margin-top: 8px; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.015em; }
.values__body { margin-top: 10px; color: var(--mute); font-size: 14.5px; }
@media (max-width: 820px) {
  .values { grid-template-columns: repeat(2, 1fr); }
  .values__item { padding: 22px 18px 22px 0; border-bottom: 1px solid var(--rule); }
  .values__item:nth-child(2n) { border-right: 0; }
  .values__item:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 480px) {
  .values { grid-template-columns: 1fr; }
  .values__item { border-right: 0; }
}

.team {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px);
}
@media (max-width: 820px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team { grid-template-columns: 1fr; } }
.member__portrait {
  aspect-ratio: 4 / 5;
  background: var(--ink);
  background-image: var(--grain);
  background-blend-mode: overlay;
  border: 1px solid var(--rule);
  position: relative; overflow: hidden;
}
.member__portrait::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.06), transparent 60%);
}
.member__name { margin-top: 16px; font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; }
.member__role { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); margin-top: 4px; }
.member__bio { margin-top: 10px; color: var(--mute); font-size: 14.5px; max-width: 36ch; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color var(--t-fast);
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--red); }
.field textarea { min-height: 120px; resize: vertical; padding: 14px 0; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .field--row { grid-template-columns: 1fr; } }
.form__submit { margin-top: 8px; }
.form__hint { font-size: 12px; color: var(--mute); margin-top: 4px; }

.contact-aside h3 { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); }
.contact-aside p { color: var(--mute); margin-top: 8px; }
.contact-aside ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.contact-aside ul li { padding-left: 18px; position: relative; font-size: 14.5px; color: var(--ink); }
.contact-aside ul li::before { content: "+"; position: absolute; left: 0; color: var(--red); font-family: var(--serif); }
.contact-direct { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
.contact-direct a { border-bottom: 1px solid var(--ink); }
.contact-direct a:hover { color: var(--red); border-color: var(--red); }

.form-confirm {
  display: none;
  padding: 28px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--inverse-ink);
}
.form-confirm.is-visible { display: block; }
.form-confirm h3 { color: var(--inverse-ink); font-family: var(--serif); }
.form-confirm p { color: var(--inverse-mute); margin-top: 10px; }

/* ---------- Modal (Work detail) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal.is-open { display: flex; animation: fade var(--t-med); }
.modal__panel {
  background: var(--paper);
  color: var(--ink);
  max-width: 720px;
  width: 100%;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid var(--rule);
  position: relative;
  animation: rise var(--t-med);
}
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  font-size: 18px;
}
.modal__close:hover { background: var(--ink); color: var(--inverse-ink); border-color: var(--ink); }
.modal__eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.modal__title { margin-top: 8px; font-family: var(--serif); font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.02em; }
.modal__logline { margin-top: 16px; font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.6vw, 20px); color: var(--mute); }
.modal__meta { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 560px) { .modal__meta { grid-template-columns: 1fr; } }
.modal__meta dt { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.modal__meta dd { margin: 4px 0 0; font-size: 14.5px; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--inverse-ink);
  padding: clamp(60px, 8vw, 100px) 0 32px;
  position: relative;
  overflow: hidden;
}
/* Doors mark pinned to bottom-right of the footer (bottom of the site). */
.footer-doors {
  position: absolute;
  bottom: 16px;
  right: var(--gutter);
  width: clamp(140px, 16vw, 220px);
  height: auto;
  display: block;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 720px) {
  .footer-doors { width: 110px; bottom: 12px; right: 16px; opacity: 0.85; }
}
.site-footer .rule { background: var(--inverse-rule); margin: clamp(40px, 5vw, 64px) 0 24px; }
.footer-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(20px, 3vw, 48px); }
@media (max-width: 820px) { .footer-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-row { grid-template-columns: 1fr; } }
.footer-row h4 { font-family: var(--sans); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--inverse-mute); font-weight: 500; }
.footer-row ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.footer-row ul a { color: var(--inverse-ink); border-bottom: 1px solid transparent; padding-bottom: 1px; }
.footer-row ul a:hover { border-bottom-color: var(--red); color: var(--red); }
.footer-claim { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.01em; max-width: 22ch; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 24px;
  color: var(--inverse-mute);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding-right: clamp(160px, 18vw, 240px);   /* leave room for footer-doors */
}
@media (max-width: 720px) {
  .footer-bottom { padding-right: 130px; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--t-slow), transform var(--t-slow); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ---------- Page header (sub pages) ---------- */
.page-head {
  padding-top: clamp(80px, 10vw, 140px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.page-head h1 { max-width: 16ch; }
.page-head .lede { margin-top: 24px; }

/* ---------- Utility ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.no-scroll { overflow: hidden; }

/* ---------- Focus visible ---------- */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.section--dark :focus-visible { outline-color: var(--paper); }
