:root {
  --paper: #F3F1EA;
  --paper-2: #E7E2D6;
  --paper-3: #DDD6C8;
  --ink: #161412;
  --ink-2: #2A2622;
  --muted: #5C564F;
  --steel: #5E6764;
  --red: #C4161C;
  --red-deep: #9A1015;
  --bronze: #8A5A3A;
  --hair: rgba(22, 20, 18, 0.10);
  --hair-strong: rgba(22, 20, 18, 0.18);
  --paper-dim: rgba(243, 241, 234, 0.72);
  --paper-faint: rgba(243, 241, 234, 0.42);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1.125rem;
  --space-4: 1.75rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 9rem;
  --nav-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
::selection { background: var(--red); color: var(--paper); }

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.42s;
  animation-timing-function: var(--ease-out);
}

/* Language swap: fade copy only. Photos, chrome, and layout stay put. */
html.lang-anim [data-i18n] {
  transition: opacity 0.42s var(--ease);
}
html.lang-out [data-i18n] {
  opacity: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
  html.lang-anim [data-i18n] { transition: none; }
}

.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 80;
  background: var(--red); color: var(--paper); padding: 0.7rem 1.2rem;
  font-weight: 600;
}
.skip:focus { left: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

h1, h2, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 1.2rem + 6vw, 6.4rem); line-height: 1.12; }
h2 { font-size: clamp(2rem, 1.1rem + 3.2vw, 3.6rem); }
h3 { font-family: var(--font-body); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); line-height: 1.55; max-width: 38rem; color: var(--ink-2); }

.wrap {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}
@media (max-width: 767px) {
  .wrap { width: calc(100% - 2rem); }
}

/* ---------- intro lockup ---------- */
body.intro-on { overflow: hidden; }
.intro {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  pointer-events: none;
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.intro.is-out {
  opacity: 0;
  transform: translateY(-10%);
}
.intro-lockup { text-align: center; padding: 1.5rem; }
.intro-logo {
  width: min(132px, 34vw);
  height: auto;
  margin: 0 auto 1.15rem;
  mix-blend-mode: screen;
  opacity: 0;
  transform: scale(0.92);
  animation: intro-mark 0.9s var(--ease) 0.08s forwards;
}
.intro-word {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 7vw, 4.6rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
  color: var(--paper);
  clip-path: inset(0 100% 0 0);
  animation: intro-word 1.15s var(--ease) 0.28s forwards;
}
.intro-sub {
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243,241,234,0.55);
  opacity: 0;
  animation: intro-mark 0.7s var(--ease) 0.7s forwards;
}
@keyframes intro-mark {
  to { opacity: 1; transform: none; }
}
@keyframes intro-word {
  to { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  body.intro-on { overflow: auto; }
}

/* ---------- nav — full-bleed bar (skill §3C) ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1.25rem;
  width: 100%;
  min-height: 3.6rem;
  padding: 0  clamp(1.1rem, 4vw, 2.75rem);
  border-radius: 0;
  background: rgba(14, 12, 10, 0.78);
  border: 0;
  border-bottom: 1px solid rgba(243,241,234,0.14);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  view-transition-name: site-nav;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
}
.nav-end {
  display: flex; align-items: center; flex-wrap: nowrap;
  gap: 1.5rem; margin-left: auto; flex-shrink: 0;
}
.nav.is-light {
  background: rgba(243, 241, 234, 0.92);
  border-bottom-color: var(--hair);
}
.nav .mark {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.nav.is-light .mark { color: var(--ink); }
.nav .mark span { color: var(--red); font-weight: 400; }
.nav ul {
  display: flex; align-items: center; flex-wrap: nowrap;
  gap: 1.6rem; list-style: none; margin: 0;
}
.nav ul a {
  color: rgba(243, 241, 234, 0.92);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.35rem 0;
  transition: color 0.45s var(--ease);
}
.nav.is-light ul a { color: var(--ink); }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--red); }

.lang {
  display: flex; align-items: center; gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  flex-shrink: 0;
}
.lang button {
  color: rgba(243,241,234,0.5);
  min-width: 36px; min-height: 44px;
  padding: 0 0.15rem;
  transition: color 0.4s var(--ease);
}
.nav.is-light .lang button { color: var(--muted); }
.lang button[aria-pressed="true"] { color: var(--red); }
.lang i { font-style: normal; opacity: 0.35; pointer-events: none; }

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.5s var(--ease), background 0.5s var(--ease), color 0.5s var(--ease);
  min-height: 44px;
}
.btn:hover { transform: scale(0.97); }
.btn .dot {
  width: 1.7rem; height: 1.7rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s var(--ease);
}
.btn:hover .dot { transform: translateX(2px) translateY(-1px) scale(1.05); }
.nav .btn { white-space: nowrap; flex-shrink: 0; }
.nav .btn .short { display: none; }
@media (max-width: 1100px) {
  .nav .btn-fill .full { display: none; }
  .nav .btn-fill .short { display: inline; }
}
@media (max-width: 860px) {
  .nav ul { display: none; }
  .nav-toggle { display: block; }
}
.btn-fill {
  background: var(--paper); color: var(--ink);
  padding: 0.4rem 0.45rem 0.4rem 1.05rem;
  font-size: 0.82rem;
}
.btn-fill .dot { background: rgba(22,20,18,0.1); }
.btn-fill:hover { background: var(--red); color: var(--paper); }
.btn-fill:hover .dot { background: rgba(243,241,234,0.16); }
.btn-ink {
  background: var(--ink); color: var(--paper);
  padding: 0.85rem 0.7rem 0.85rem 1.35rem;
}
.btn-ink .dot { background: rgba(243,241,234,0.12); }
.btn-ink:hover { background: var(--red); }
.btn-ghost {
  position: relative;
  padding: 0.85rem 0.2rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  min-height: 44px;
  font-weight: 600;
}
.btn-ghost:hover { background-size: 100% 1px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute; left: 12px; width: 20px; height: 1.5px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}
.nav.is-light .nav-toggle span,
.nav.is-light .nav-toggle span::before,
.nav.is-light .nav-toggle span::after { background: var(--ink); }
.nav-toggle span { top: 21px; }
.nav-toggle span::before { content: ""; top: -6px; }
.nav-toggle span::after { content: ""; top: 6px; }
body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { top: 0; transform: rotate(45deg); background: var(--paper); }
body.menu-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); background: var(--paper); }

.menu-overlay {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(14,12,10,0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2rem 1.5rem 3rem;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}
body.menu-open .menu-overlay { opacity: 1; pointer-events: auto; visibility: visible; }
.menu-overlay a {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 10vw, 3.5rem);
  color: var(--paper);
  text-decoration: none;
  display: block;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}
body.menu-open .menu-overlay a { transform: translateY(0); opacity: 1; }
body.menu-open .menu-overlay a:nth-child(1) { transition-delay: 0.08s; }
body.menu-open .menu-overlay a:nth-child(2) { transition-delay: 0.14s; }
body.menu-open .menu-overlay a:nth-child(3) { transition-delay: 0.2s; }
body.menu-open .menu-overlay a:nth-child(4) { transition-delay: 0.26s; }

@media (max-width: 767px) {
  .nav ul { display: none; }
  .nav-toggle { display: block; }
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: visible;
  background: var(--ink);
}
.hero-media {
  position: absolute; inset: 0;
  overflow: hidden;
  view-transition-name: hero-plate;
}
.hero-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
  opacity: 0;
  transform: scale(1.06);
  animation: ken 22s var(--ease) infinite;
}
.hero-media img:nth-child(1) { animation-name: ken-a; opacity: 1; }
.hero-media img:nth-child(2) { animation-name: ken-b; }
@keyframes ken-a {
  0% { opacity: 1; transform: scale(1.04); }
  40% { opacity: 1; transform: scale(1.1); }
  50% { opacity: 0; transform: scale(1.12); }
  90% { opacity: 0; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1.04); }
}
@keyframes ken-b {
  0% { opacity: 0; transform: scale(1.06); }
  40% { opacity: 0; transform: scale(1.06); }
  50% { opacity: 1; transform: scale(1.06); }
  90% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.04); }
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,12,10,0.42) 0%, rgba(14,12,10,0.22) 32%, rgba(14,12,10,0.88) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 8rem 0 clamp(2.5rem, 6vh, 4.5rem);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: end;
}
.hero .eyebrow { color: rgba(243,241,234,0.7); }
.hero h1 { color: var(--paper); max-width: 12ch; margin: 0.6rem 0 1.1rem; text-shadow: 0 2px 28px rgba(0,0,0,0.45); }
.hero .lede { color: var(--paper-dim); text-shadow: 0 1px 16px rgba(0,0,0,0.4); }
.hero-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(243,241,234,0.14);
  background: rgba(14,12,10,0.28);
}
.hero-meta div {
  padding: 1rem 1.1rem;
  border-right: 1px solid rgba(243,241,234,0.12);
  border-bottom: 1px solid rgba(243,241,234,0.12);
}
.hero-meta div:nth-child(2n) { border-right: 0; }
.hero-meta dt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243,241,234,0.55);
  margin-bottom: 0.3rem;
}
.hero-meta dd { font-weight: 600; font-size: 0.95rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; margin-top: 1.6rem; }
.hero-actions .btn-ghost { color: var(--paper); }

@media (max-width: 767px) {
  .hero-inner { grid-template-columns: 1fr; width: calc(100% - 2rem); padding: 6.5rem 0 2rem; gap: 1.2rem; }
  .hero h1 { max-width: 11ch; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero .lede { font-size: 1.02rem; }
}

/* ---------- chapters ---------- */
.chapter {
  padding: var(--space-7) 0;
  position: relative;
}
.chapter.tight { padding: var(--space-6) 0; }
.chapter-head {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: var(--space-6);
  max-width: 46rem;
}
.chapter-head h2 {
  max-width: none;
  text-wrap: pretty;
}
.stack-lines {
  text-wrap: unset;
}
.stack-lines span {
  display: block;
}
@media (max-width: 767px) {
  .chapter { padding: var(--space-6) 0; }
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 767px) { .split { grid-template-columns: 1fr; } }

.bezel {
  background: rgba(22,20,18,0.045);
  border: 1px solid var(--hair);
  border-radius: 2rem;
  padding: 0.4rem;
}
.bezel-inner {
  border-radius: calc(2rem - 0.35rem);
  overflow: hidden;
  background: var(--ink);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.12);
}
.bezel-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  transition: transform 0.9s var(--ease);
}
.bezel:hover img { transform: scale(1.04); }
.caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--bronze);
  margin-top: 0.85rem;
  max-width: 36ch;
}

/* services grid */
.grid-struct {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--hair-strong);
  border-left: 1px solid var(--hair-strong);
}
.cell {
  padding: 1.6rem 1.5rem 1.8rem;
  border-right: 1px solid var(--hair-strong);
  border-bottom: 1px solid var(--hair-strong);
  background: var(--paper);
  transition: background 0.5s var(--ease);
}
.cell:hover { background: var(--paper-2); }
.cell .num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--red);
  display: block;
  margin-bottom: 0.7rem;
}
.cell h3 { margin-bottom: 0.45rem; }
.cell p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 767px) { .grid-struct { grid-template-columns: 1fr; } }

/* work strip */
.work-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 1rem;
}
.work-row .bezel-inner img { aspect-ratio: auto; min-height: 280px; max-height: 520px; }
@media (max-width: 767px) {
  .work-row { grid-template-columns: 1fr; }
  .work-row .bezel-inner img { min-height: 220px; max-height: 420px; }
}

/* process */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--hair-strong);
}
.process article {
  padding: 2rem 1.4rem 2.2rem;
  border-right: 1px solid var(--hair-strong);
  border-bottom: 1px solid var(--hair-strong);
}
.process article:last-child { border-right: 0; }
.process .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--red);
  line-height: 1;
  display: block;
  margin-bottom: 0.8rem;
}
@media (max-width: 900px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767px) { .process { grid-template-columns: 1fr; } .process article { border-right: 0; } }

/* emergency band */
.band {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-7) 0;
}
.band h2 { color: var(--paper); }
.band p { color: var(--paper-dim); max-width: 36rem; }
.band .eyebrow { color: rgba(243,241,234,0.55); }

/* footer — compact, no giant name */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-6) 0 6.5rem;
}
footer .mark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
}
footer .mark span { color: var(--red); }
footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(243,241,234,0.12);
}
footer a { color: var(--paper-dim); text-decoration: none; }
footer a:hover { color: var(--red); }
footer .meta {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.4rem;
  font-size: 0.8rem;
  color: rgba(243,241,234,0.5);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
footer .logo-mark { width: 56px; height: 56px; object-fit: contain; mix-blend-mode: screen; }
@media (max-width: 767px) { footer .cols { grid-template-columns: 1fr; } }

/* contact form */
.field { position: relative; display: block; margin-bottom: 1rem; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 1.35rem 1rem 0.55rem;
  background: var(--paper);
  border: 1px solid var(--hair-strong);
  border-radius: 4px;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.2s var(--ease);
}
.field textarea { min-height: 8rem; resize: vertical; padding-top: 1.6rem; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--ink);
}
.field input:focus:not(:focus-visible),
.field textarea:focus:not(:focus-visible) {
  outline: none;
}
.field span {
  position: absolute; left: 1rem; top: 1.05rem;
  color: var(--muted); pointer-events: none;
  transition: transform 0.2s var(--ease), font-size 0.2s var(--ease);
}
.field input:focus + span,
.field input:not(:placeholder-shown) + span,
.field textarea:focus + span,
.field textarea:not(:placeholder-shown) + span {
  transform: translateY(-0.7rem) scale(0.82);
  transform-origin: left;
}
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--red); }

/* reveals enhance, never hide. Capture harness and no-JS both see the copy. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: fade-up 0.9s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}
@keyframes fade-up {
  from { opacity: 1; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .hero-media img { animation: none !important; opacity: 0; transform: none; }
  .hero-media img:nth-child(1) { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
  .bezel-inner img { transition: none; }
}

.sticky-call {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: 1rem;
  z-index: 48;
  display: block;
}
body.menu-open .sticky-call,
body.intro-on .sticky-call { display: none; }
@media (max-width: 767px) {
  .sticky-call { left: 1rem; right: 1rem; }
  .sticky-call .btn { width: 100%; justify-content: center; }
}
