/* ==========================================================================
   Metavasi Group — metavasigroup.com.au (draft)
   Hand-built static site. No framework, no build step.
   Token system derived from the Concept 2 brand pack.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  /* Brand palette (extracted from Concept 2 assets) */
  --void: #030404;
  --ink: #191e22;
  --ink-raised: #21272c;
  --cream: #ece8d1;
  --paper: #efefeb;
  --paper-deep: #e6e3d4;
  --stone: #aaa696;
  --stone-deep: #655f52;

  /* Derived lines + tints */
  --line-on-dark: rgba(236, 232, 209, 0.16);
  --line-on-dark-soft: rgba(236, 232, 209, 0.09);
  --line-on-light: rgba(25, 30, 34, 0.18);
  --cream-06: rgba(236, 232, 209, 0.06);

  /* Type. Two voices, no third: Marcellus for display, Archivo for
     everything else. Label and data roles are set apart by size, weight,
     tracking and tabular figures rather than by a separate typeface. */
  --font-display: "Marcellus", "Times New Roman", Georgia, serif;
  --font-body: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;

  --text-xl: clamp(2.7rem, 6.8vw, 5.1rem);
  --text-lg: clamp(2rem, 4.2vw, 3.3rem);
  --text-md: clamp(1.45rem, 2.4vw, 1.9rem);
  --text-lede: clamp(1.05rem, 1.6vw, 1.25rem);

  /* Rhythm */
  --band-pad: clamp(5rem, 11vw, 9rem);
  --container: 1200px;
  --container-wide: 1320px;
  --gutter: clamp(1.4rem, 4.5vw, 3rem);

  --radius: 2px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset-ish ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--cream);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.band--paper :focus-visible {
  outline-color: var(--ink);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.85rem;
}

.skip-link:focus-visible {
  top: 1rem;
}

/* ---------- Type roles ---------- */

.display-1,
.display-2,
.display-3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.display-1 {
  font-size: var(--text-xl);
}

.display-2 {
  font-size: var(--text-lg);
}

.display-3 {
  font-size: var(--text-md);
  line-height: 1.2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}

.band--paper .eyebrow {
  color: var(--stone-deep);
}

.lede {
  font-size: var(--text-lede);
  line-height: 1.65;
  font-weight: 300;
  max-width: 34em;
  color: var(--stone);
}

.band--paper .lede {
  color: var(--stone-deep);
}

.body-copy {
  max-width: 38em;
  color: var(--stone);
}

.band--paper .body-copy {
  color: var(--stone-deep);
}

/* Document voice — registration data, record captions, stage marks.
   Tabular figures keep numbers aligned and reading as record data. */
.doc-line {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--stone);
}

/* ---------- Batten tick (signature fragment) ---------- */

.tick {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
  flex: none;
}

.tick span {
  display: block;
  width: 2px;
  background: currentColor;
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-out);
}

.tick span:nth-child(1) { height: 100%; }
.tick span:nth-child(2) { height: 45%; }
.tick span:nth-child(3) { height: 70%; }
.tick span:nth-child(4) { height: 45%; }
.tick span:nth-child(5) { height: 100%; }

/* ---------- Layout primitives ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: var(--container-wide);
}

.band {
  padding-block: var(--band-pad);
  background: var(--ink);
  color: var(--cream);
}

.band--void {
  background: var(--void);
}

.band--paper {
  background: var(--paper);
  color: var(--ink);
}

.band--hairline-top {
  border-top: 1px solid var(--line-on-dark-soft);
}

/* Follows a page-intro, which already carries the top space. */
.band--flush-top {
  padding-top: clamp(1rem, 3vw, 2rem);
}

.band-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.6rem 4rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.band-head .display-2 {
  max-width: 15em;
}

@media (min-width: 900px) {
  .band-head {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }

  .band-head .eyebrow {
    padding-top: 0.55em;
  }
}

.split {
  display: grid;
  gap: 2.5rem 5rem;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
  }
}

.stack-s > * + * { margin-top: 1rem; }
.stack-m > * + * { margin-top: 1.75rem; }
.stack-l > * + * { margin-top: 2.75rem; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(3, 4, 4, 0.55), rgba(3, 4, 4, 0));
}

.site-header.is-scrolled {
  background: rgba(3, 4, 4, 0.92);
  border-bottom-color: var(--line-on-dark-soft);
  backdrop-filter: blur(10px);
}

.site-header .container--wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 76px;
}

.brand img {
  height: 30px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.5vw, 2.4rem);
}

.site-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.72;
  padding: 0.4rem 0;
  background: linear-gradient(currentColor, currentColor) bottom left / 0 1px no-repeat;
  transition: opacity 0.25s ease, background-size 0.35s var(--ease-out);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  opacity: 1;
  background-size: 100% 1px;
}

.site-nav a[aria-current="page"] {
  opacity: 1;
  background-size: 100% 1px;
}

.header-phone {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--cream);
  opacity: 0.85;
  white-space: nowrap;
}

.header-phone:hover {
  opacity: 1;
}

.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--void);
  display: grid;
  place-content: center;
  gap: 0.4rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-overlay a {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  color: var(--cream);
  padding: 0.35rem 1rem;
  opacity: 0.85;
}

.nav-overlay a[aria-current="page"],
.nav-overlay a:hover {
  opacity: 1;
}

.nav-overlay .header-phone {
  margin-top: 2rem;
  font-size: 0.9rem;
}

@media (max-width: 899px) {
  .site-nav,
  .site-header .header-phone {
    display: none;
  }

  .nav-toggle {
    display: inline-block;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to bottom, var(--void) 0%, var(--ink) 46%);
  overflow: hidden;
}

.batten-field {
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 1.1vw, 16px);
  padding-inline: 2vw;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 55%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 55%);
}

.batten-field span {
  flex: none;
  width: 2px;
  background: var(--cream);
  transform-origin: bottom;
}

/* Light falls across the field from the left, so the copy always sits on
   solid ground while the battens stay visible beside it. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(3, 4, 4, 0.96) 0%,
    rgba(3, 4, 4, 0.93) 40%,
    rgba(3, 4, 4, 0.58) 57%,
    rgba(3, 4, 4, 0) 76%
  );
}

@media (max-width: 899px) {
  .hero::after {
    background: linear-gradient(
      to bottom,
      rgba(3, 4, 4, 0.94) 0%,
      rgba(3, 4, 4, 0.9) 58%,
      rgba(3, 4, 4, 0.3) 100%
    );
  }
}

.hero .container--wide {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 9rem;
  padding-bottom: clamp(3rem, 7vh, 5.5rem);
}

.hero-copy {
  max-width: 44em;
}

.hero-copy .display-1 {
  margin-top: 1.4rem;
  max-width: 10.5em;
}

.hero-copy .lede {
  margin-top: 1.8rem;
  color: #cdc9b6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.6rem;
}

.hero-facts {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-on-dark-soft);
  background: rgba(3, 4, 4, 0.55);
  backdrop-filter: blur(4px);
}

.hero-facts .container--wide {
  display: grid;
  gap: 0.8rem 2rem;
  padding-block: 1.15rem;
}

@media (min-width: 760px) {
  .hero-facts .container--wide {
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
  }
}

.hero-copy > * {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease-out) forwards;
}

.hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.24s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.36s; }

.batten-field span {
  transform: scaleY(0);
  animation: batten-rise 0.9s var(--ease-out) forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes batten-rise {
  to {
    transform: scaleY(1);
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 1em 1.85em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease,
    opacity 0.25s ease;
}

.btn--primary {
  background: var(--cream);
  color: var(--ink);
}

.btn--primary:hover {
  background: #fff;
}

.btn--ghost {
  border-color: rgba(236, 232, 209, 0.35);
  color: var(--cream);
}

.btn--ghost:hover {
  border-color: var(--cream);
  background: var(--cream-06);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

.band--paper .btn--primary {
  background: var(--ink);
  color: var(--cream);
}

.band--paper .btn--primary:hover {
  background: var(--void);
}

.band--paper .btn--ghost {
  border-color: rgba(25, 30, 34, 0.35);
  color: var(--ink);
}

.band--paper .btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(25, 30, 34, 0.05);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) bottom left / 100% 1px no-repeat;
  padding-bottom: 0.35em;
}

.text-link .arrow {
  transition: transform 0.3s var(--ease-out);
}

.text-link:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Capability cards ---------- */

.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.capability-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: clamp(1.6rem, 2.5vw, 2.3rem);
  background: var(--ink-raised);
  border: 1px solid var(--line-on-dark-soft);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.capability-card:hover {
  border-color: var(--line-on-dark);
  transform: translateY(-4px);
}

.capability-card:hover .tick span:nth-child(2),
.capability-card:hover .tick span:nth-child(4) {
  transform: scaleY(1.55);
}

.capability-card:hover .tick span:nth-child(3) {
  transform: scaleY(1.3);
}

.capability-card .tick {
  color: var(--stone);
}

.capability-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.25;
}

.capability-card p {
  color: var(--stone);
  font-size: 0.95rem;
}

.coverage {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-on-dark-soft);
  display: grid;
  gap: 0.5rem;
}

.coverage li {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}

.coverage li::before {
  content: "— ";
  opacity: 0.6;
}

/* ---------- Feature rows (services page) ---------- */

.feature-row {
  display: grid;
  gap: 1.5rem 5rem;
  padding-block: clamp(2.2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line-on-dark-soft);
}

.feature-row:last-of-type {
  border-bottom: 1px solid var(--line-on-dark-soft);
}

@media (min-width: 900px) {
  .feature-row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.feature-row h3 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.2;
  max-width: 12em;
}

.feature-row .coverage {
  border-top: 0;
  padding-top: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ---------- Staged sequences ---------- */

.stages {
  display: grid;
  border-top: 1px solid var(--line-on-light);
}

.band:not(.band--paper) .stages {
  border-top-color: var(--line-on-dark-soft);
}

.stage {
  display: grid;
  gap: 0.9rem 3rem;
  padding-block: 1.9rem;
  border-bottom: 1px solid var(--line-on-light);
}

.band:not(.band--paper) .stage {
  border-bottom-color: var(--line-on-dark-soft);
}

@media (min-width: 860px) {
  .stage {
    grid-template-columns: 170px 260px minmax(0, 1fr);
    align-items: baseline;
  }
}

.stage-no {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--stone-deep);
}

.band:not(.band--paper) .stage-no {
  color: var(--stone);
}

.stage h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
}

.stage p {
  color: var(--stone-deep);
  max-width: 34em;
}

.band:not(.band--paper) .stage p {
  color: var(--stone);
}

/* ---------- Working structure strip ---------- */

.role-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .role-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.role-item {
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-on-dark);
}

.band--paper .role-item {
  border-top-color: var(--line-on-light);
}

.role-item h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.role-item p {
  color: var(--stone);
  font-size: 0.95rem;
  max-width: 30em;
}

.band--paper .role-item p {
  color: var(--stone-deep);
}

/* ==========================================================================
   Projects gallery

   Two layouts from one set of markup.

   Without JavaScript the deck is a plain stacked gallery: every project, every
   photograph, headings in place. main.js adds .is-enhanced, which collapses the
   same markup into a single stage — all eight projects overlaid in one grid
   cell, one visible at a time.

   Moving between projects closes the outgoing photograph like a set of louvres
   while the incoming one is already sitting behind them, led by a cream line
   travelling across the frame — a string line pulled across a set-out.
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Deck: the no-JS layout ---------- */

.deck {
  display: grid;
  gap: clamp(3.5rem, 8vw, 6.5rem);
}

.project {
  display: grid;
  gap: 1.1rem;
}

.project-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-md);
  line-height: 1.2;
}

.project-credit {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--stone-deep);
}

.shot {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  /* --tone is the photograph's own average colour, so the frame is already
     roughly the right weight before the image decodes. */
  background: var(--tone, var(--ink-raised));
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.shot--lead {
  aspect-ratio: 3 / 2;
}

.project-more {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.7rem;
}

.project-more .shot {
  aspect-ratio: 4 / 3;
}

.shot-open {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

.shot-open:not([disabled]) {
  cursor: pointer;
}

/* ---------- Deck: the enhanced layout ---------- */

.deck.is-enhanced {
  position: relative;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;

  --slats: 14;
  --slat-step: 34ms;
  --slat-dur: 620ms;
  --ease-blind: cubic-bezier(0.62, 0.02, 0.24, 1);
}

/* Every project collapses into the deck's own grid, so all eight leads land in
   the same cell and all eight strips in the one below. No element moves. */
.deck.is-enhanced .project {
  display: contents;
}

.deck.is-enhanced .shot--lead,
.deck.is-enhanced .stage-scrim,
.deck.is-enhanced .stage-hud,
.deck.is-enhanced .stage-nav,
.deck.is-enhanced .setout {
  grid-area: 1 / 1;
}

.deck.is-enhanced .project-more {
  grid-area: 2 / 1;
  margin-top: 0.7rem;
}

.deck.is-enhanced .shot--lead {
  z-index: 1;
  aspect-ratio: 3 / 2;
}

@media (min-width: 700px) {
  .deck.is-enhanced .shot--lead {
    aspect-ratio: 16 / 9;
    /* Width must be definite. Left auto, a clamped height feeds back through
       the ratio and narrows the frame, leaving the overlay and scrim — which
       stretch to the full column — hanging off its right edge. */
    width: 100%;
    /* Keeps the strip and the rail near the fold on a laptop. The photograph
       simply crops a little harder rather than pushing them off screen. */
    max-height: min(72vh, 720px);
  }
}

.deck.is-enhanced .project-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The stage caption carries this once the carousel is running. */
.deck.is-enhanced .project-credit {
  display: none;
}

/* display: none, not visibility: hidden. Every project shares one grid cell,
   so hidden projects are still "in the viewport" as far as loading="lazy" is
   concerned — the whole set would download at once. Taken out of layout, they
   don't load until they're shown, and main.js warms the neighbours ahead. */
.deck.is-enhanced .project:not(.is-current) > .shot--lead,
.deck.is-enhanced .project:not(.is-current) > .project-more {
  display: none;
}

/* The photograph settles out of a slight over-scale as it arrives, so the
   frame keeps moving for a beat after the louvres have closed. */
.deck.is-enhanced .project.is-current > .shot--lead img {
  animation: shot-settle 1.6s var(--ease-out) both;
}

@keyframes shot-settle {
  from { transform: scale(1.055); }
  to { transform: none; }
}

/* ---------- Stage furniture ---------- */

.stage-scrim,
.stage-hud,
.stage-nav,
.setout {
  display: none;
}

.deck.is-enhanced .stage-scrim,
.deck.is-enhanced .stage-hud,
.deck.is-enhanced .stage-nav,
.deck.is-enhanced .setout {
  display: block;
}

.stage-scrim {
  z-index: 4;
  pointer-events: none;
  border-radius: var(--radius);
  background:
    linear-gradient(to top, rgba(3, 4, 4, 0.86) 0%, rgba(3, 4, 4, 0.44) 27%, rgba(3, 4, 4, 0) 56%),
    linear-gradient(to right, rgba(3, 4, 4, 0.5) 0%, rgba(3, 4, 4, 0) 44%);
}

.deck.is-enhanced .stage-hud {
  z-index: 5;
  align-self: end;
  justify-self: start;
  pointer-events: none;
  padding: clamp(1.25rem, 3.4vw, 2.75rem);
  /* Room for the longest suburb on one line, minus the arrows' corner. */
  max-width: calc(100% - 8.5rem);
}

.stage-index {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
  color: var(--stone);
}

.stage-index-rule {
  width: clamp(28px, 5vw, 54px);
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.stage-name {
  position: relative;
  display: block;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.4vw, 4rem);
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: var(--cream);
}

/* Outgoing name sits over the incoming one while both roll. */
.stage-name .roll {
  display: block;
  white-space: nowrap;
}

.stage-name .roll--out {
  position: absolute;
  inset: 0;
}

.stage-name .ch {
  display: inline-block;
  height: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
}

.stage-name .ch > i {
  display: inline-block;
  font-style: normal;
  transition: transform 0.72s var(--ease-out);
  transition-delay: calc(var(--i) * 24ms);
}

.stage-name .roll--in .ch > i { transform: translateY(115%); }
.stage-name .roll--in.is-rolled .ch > i { transform: none; }
.stage-name .roll--out.is-rolled .ch > i { transform: translateY(-115%); }

/* ---------- Stage arrows ---------- */

.deck.is-enhanced .stage-nav {
  z-index: 6;
  align-self: end;
  justify-self: end;
  display: flex;
  gap: 0.5rem;
  padding: clamp(1.25rem, 3.4vw, 2.75rem);
}

.stage-arrow {
  display: grid;
  place-items: center;
  width: clamp(42px, 5vw, 54px);
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(236, 232, 209, 0.28);
  border-radius: var(--radius);
  background: rgba(3, 4, 4, 0.3);
  color: var(--cream);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}

.stage-arrow:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}

.stage-arrow:active {
  transform: scale(0.94);
}

/* ---------- The set-out: louvre transition ---------- */

.setout {
  /* Positioned, so the louvres are laid out against the stage cell rather than
     the whole deck — and so overflow actually clips them. */
  position: relative;
  z-index: 3;
  overflow: hidden;
  border-radius: var(--radius);
  pointer-events: none;
  visibility: hidden;
}

.setout.is-running {
  visibility: visible;
}

.setout.is-armed,
.setout.is-running {
  visibility: visible;
}

.setout-slats {
  position: absolute;
  inset: 0;
}

.slat {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  will-change: clip-path;
  transition: clip-path var(--slat-dur) var(--ease-blind);
  transition-delay: var(--d, 0ms);
}

.setout.is-running .slat[data-close="up"] { clip-path: inset(0 0 100% 0); }
.setout.is-running .slat[data-close="down"] { clip-path: inset(100% 0 0 0); }

/* Each slat is a window onto a full-size copy of the outgoing photograph, so
   the slats together reconstruct it exactly as object-fit: cover rendered it.
   A real <img> of the already-decoded file, not a background — a background
   is a fresh resource load and can paint a frame late. */
.slat-view {
  position: absolute;
  top: 0;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* The string line, running just ahead of the closing louvres. */
.setout-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cream);
  box-shadow: 0 0 22px 3px rgba(236, 232, 209, 0.55), 0 0 80px 12px rgba(236, 232, 209, 0.2);
  opacity: 0;
}

.setout.is-running .setout-line {
  animation: setout-sweep var(--sweep, 520ms) linear forwards;
}

@keyframes setout-sweep {
  0% { opacity: 0; transform: translateX(0); }
  10% { opacity: 1; }
  84% { opacity: 1; }
  100% { opacity: 0; transform: translateX(var(--sweep-to, 100%)); }
}

/* ---------- Strip ---------- */

.deck.is-enhanced .project-more {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.deck.is-enhanced .project-more::-webkit-scrollbar {
  display: none;
}

.deck.is-enhanced .project-more .shot {
  flex: 0 0 clamp(104px, 13vw, 176px);
  aspect-ratio: 4 / 3;
  border-top: 1px solid transparent;
  transition: border-color 0.4s var(--ease-out);
}

.deck.is-enhanced .project-more .shot img {
  opacity: 0.68;
  transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out);
}

.deck.is-enhanced .project-more .shot:hover img,
.deck.is-enhanced .project-more .shot:focus-within img {
  opacity: 1;
  transform: scale(1.05);
}

/* Photographs cascade in behind the stage once a project lands. */
.deck.is-enhanced .project.is-current > .project-more .shot {
  animation: strip-rise 0.7s var(--ease-out) both;
  animation-delay: calc(320ms + var(--n, 0) * 55ms);
}

@keyframes strip-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Tape rail ---------- */

.tape {
  display: flex;
  margin-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line-on-dark-soft);
}

.tape-stop {
  flex: 1 1 0;
  display: grid;
  /* Fixed tick row, so a growing tick never nudges the labels off a
     common baseline. */
  grid-template-rows: 26px auto;
  align-items: start;
  justify-items: start;
  min-width: 0;
  min-height: 44px;
  padding: 0 0.5rem 0 0;
  border: 0;
  background: none;
  color: var(--stone-deep);
  cursor: pointer;
  text-align: left;
  transition: color 0.45s var(--ease-out);
}

.tape-tick {
  width: 1px;
  height: 9px;
  background: currentColor;
  transition: height 0.5s var(--ease-out);
}

.tape-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tape-stop:hover {
  color: var(--stone);
}

.tape-stop:hover .tape-tick {
  height: 15px;
}

.tape-stop[aria-current="true"] {
  color: var(--cream);
}

.tape-stop[aria-current="true"] .tape-tick {
  height: 24px;
}

.stage-credit {
  margin-top: 1.1rem;
  text-align: right;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--stone-deep);
}

.stage-credit:empty {
  display: none;
}

@media (max-width: 699px) {
  .tape-label {
    display: none;
  }

  .tape-stop {
    padding-bottom: 0.5rem;
  }

  .stage-credit {
    text-align: left;
  }

  /* The stage runs edge to edge on a phone. Inside the gutter it was barely
     220px tall, which is no way to show a building. Scoped to the carousel so
     the plain stacked fallback keeps its margins. */
  .deck.is-enhanced {
    margin-inline: calc(var(--gutter) * -1);
  }

  .deck.is-enhanced .shot--lead,
  .deck.is-enhanced .stage-scrim {
    border-radius: 0;
  }

  .deck.is-enhanced .shot--lead {
    aspect-ratio: 5 / 4;
  }

  .deck.is-enhanced .project-more {
    padding-inline: var(--gutter);
  }

  .stage-arrow {
    width: 38px;
  }
}

/* ---------- Home page: selected work ---------- */

.work-teaser {
  display: grid;
  gap: 0.8rem;
}

@media (min-width: 760px) {
  .work-teaser {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* The link carries the frame, so the caption sits outside the cropped box. */
.work-teaser .shot {
  background: none;
  overflow: visible;
}

.work-teaser a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tone, var(--ink-raised));
}

.work-teaser a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.work-teaser a:hover img {
  transform: scale(1.06);
}

.work-teaser figcaption {
  margin-top: 0.75rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone-deep);
}

/* ---------- Etymology block ---------- */

.etymology {
  border-left: 2px solid var(--line-on-light);
  padding-left: clamp(1.4rem, 3vw, 2.2rem);
  display: grid;
  gap: 0.6rem;
}

.band:not(.band--paper) .etymology {
  border-left-color: var(--line-on-dark);
}

.etymology .greek {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
}

.etymology .pron {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone-deep);
}

.band:not(.band--paper) .etymology .pron {
  color: var(--stone);
}

.mark-figure {
  justify-self: center;
  width: min(240px, 55%);
  opacity: 0.92;
}

/* ---------- CTA band ---------- */

.cta-band .display-2 {
  max-width: 13em;
}

.cta-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3.5rem;
  margin-top: 2.4rem;
  align-items: baseline;
}

.cta-contacts a {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--cream);
  background: linear-gradient(currentColor, currentColor) bottom left / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease-out);
  padding-bottom: 0.15em;
}

.cta-contacts a:hover {
  background-size: 100% 1px;
}

/* ---------- Contact page ---------- */

.contact-layout {
  display: grid;
  gap: 3rem 5rem;
  align-items: stretch;
}

@media (min-width: 980px) {
  .contact-layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
}

.contact-tiles {
  display: grid;
  gap: 1.1rem;
  align-content: start;
}

.contact-tile {
  padding: 1.5rem clamp(1.3rem, 2vw, 1.8rem);
  background: var(--ink-raised);
  border: 1px solid var(--line-on-dark-soft);
  border-radius: var(--radius);
  display: grid;
  gap: 0.55rem;
}

.contact-tile h3 {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.contact-tile .role {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}

.contact-tile a {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--cream);
  opacity: 0.82;
  width: fit-content;
}

.contact-tile a:hover {
  opacity: 1;
}

.contact-tile address {
  font-style: normal;
  color: var(--stone);
  font-size: 0.95rem;
}

/* Form — stretches to meet the bottom of the tile column beside it. */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: clamp(1.8rem, 3vw, 2.6rem);
  background: var(--ink-raised);
  border: 1px solid var(--line-on-dark-soft);
  border-radius: var(--radius);
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field--grow {
  flex: 1 1 auto;
  grid-template-rows: auto 1fr;
}

.field-row {
  display: grid;
  gap: 1.4rem;
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
}

.field input,
.field select,
.field textarea {
  appearance: none;
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line-on-dark-soft);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  transition: border-color 0.25s ease;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--stone) 50%),
    linear-gradient(135deg, var(--stone) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.field textarea {
  min-height: 150px;
  height: 100%;
  resize: vertical;
}

.field ::placeholder {
  color: var(--stone);
  opacity: 0.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--stone);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #b4674f;
}

/* Honeypot — off-screen, never shown, never announced. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.form-status {
  font-size: 0.88rem;
  color: var(--stone);
}

.form-status[data-state="error"] {
  color: #d99b83;
}

/* Not an error — the form works, delivery just isn't switched on yet. */
.form-status[data-state="notice"] {
  color: var(--cream);
  opacity: 0.85;
}

.form-status[data-state="success"] {
  color: var(--cream);
}

.form-note {
  font-size: 0.82rem;
  color: var(--stone);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--void);
  border-top: 1px solid var(--line-on-dark-soft);
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.2rem;
}

.footer-grid {
  display: grid;
  gap: 3rem 4rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 860px) {
  .footer-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  }
}

.footer-brand img {
  width: 150px;
}

.footer-brand p {
  margin-top: 1.4rem;
  color: var(--stone);
  font-size: 0.92rem;
  max-width: 26em;
}

.footer-col h3 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1.2rem;
}

.footer-col ul {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col a,
.footer-col address {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--cream);
  opacity: 0.8;
  line-height: 1.55;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-legal {
  border-top: 1px solid var(--line-on-dark-soft);
  padding-top: 1.8rem;
  display: grid;
  gap: 1.1rem;
}

.footer-legal .registration {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--stone);
}

.footer-legal .acknowledgment,
.footer-legal .copyright {
  font-size: 0.8rem;
  color: var(--stone);
  max-width: 62em;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Page intro (subpages) ---------- */

.page-intro {
  padding-top: calc(76px + clamp(4rem, 9vw, 7rem));
  background: linear-gradient(to bottom, var(--void), var(--ink));
}

.page-intro .display-1 {
  max-width: 12em;
  margin-top: 1.4rem;
}

.page-intro .lede {
  margin-top: 1.6rem;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .hero-copy > *,
  .batten-field span {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  /* Projects change without the louvre transition — the photograph is simply
     replaced. JS skips building the slats too; this keeps the overlay out of
     the way regardless. */
  .setout {
    display: none !important;
  }

  .stage-name .ch > i {
    transform: none !important;
  }

  .deck.is-enhanced .project.is-current > .shot--lead img,
  .deck.is-enhanced .project.is-current > .project-more .shot {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
