/* ============================================================
   BRAT Foundations Kit · styles
   Tokens come from clients/<slug>/tokens.json and are written to
   :root by app.js at boot. The values here are the fallbacks so
   the page always paints, even before tokens arrive.
   ============================================================ */

:root {
  --paper: #FFFFFF;
  --ink: #0A0A0A;
  --grey-1: #6E6E6E;
  --grey-2: #A3A3A3;
  --panel: #F2F2F2;
  --hair: rgba(10, 10, 10, .14);
  --hair-soft: rgba(10, 10, 10, .07);

  --font-display: "Neue Haas Grotesk Display Pro", "NeueHaasDisplay", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Neue Haas Grotesk Text Pro", "NeueHaasText", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --display-weight: 500;
  --display-tracking: -0.035em;
  --body-weight: 400;

  --ease: cubic-bezier(.77, 0, .18, 1);
  --dur-fast: .3s;
  --dur: .7s;
  --dur-slow: 1.2s;

  --gut: clamp(20px, 4vw, 72px);
  --max: 1520px;
  --header-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A0A0A;
    --ink: #FFFFFF;
    --grey-1: #9A9A9A;
    --grey-2: #5E5E5E;
    --panel: #141414;
    --hair: rgba(255, 255, 255, .16);
    --hair-soft: rgba(255, 255, 255, .08);
  }
}
:root[data-theme="dark"] {
  --paper: #0A0A0A;
  --ink: #FFFFFF;
  --grey-1: #9A9A9A;
  --grey-2: #5E5E5E;
  --panel: #141414;
  --hair: rgba(255, 255, 255, .16);
  --hair-soft: rgba(255, 255, 255, .08);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: var(--body-weight);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video, canvas { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.mono { font-family: var(--font-mono); }
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--grey-1);
  white-space: nowrap;
}
.num { font-variant-numeric: tabular-nums; }

/* ---------- wordmark ---------- */
.wordmark { display: inline-block; line-height: 0; }
.wordmark svg { display: block; height: 1em; width: auto; }
.wordmark svg * { fill: currentColor !important; stroke: none; }
.wordmark img { display: block; height: 1em; width: auto; }
.wordmark.is-text { line-height: 1; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.04em; }
.header .brand .wordmark { font-size: 22px; }
.header .brand .wordmark.is-text { font-size: 18px; letter-spacing: -0.01em; }
.home-hero .logo-line { display: block; margin-bottom: .06em; }
.home-hero .logo-line .wordmark { font-size: .82em; }
.home-hero .logo-line .wordmark.is-text { font-size: 1em; }
.spec .mark .wordmark { font-size: clamp(64px, 12vw, 200px); }
.spec-vars .v .wordmark { font-size: 28px; }
.spec-vars .v.small .wordmark { font-size: 14px; }
.spec-vars .v.small { display: flex; align-items: center; gap: 12px; }
.spec-vars .v.small::after { content: "24 px minimum"; font-family: var(--font-body); font-weight: 400; font-size: 11px; letter-spacing: .06em; color: var(--grey-1); }
.misuse .frame .wordmark { font-size: 40px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark img { filter: invert(1); } }
:root[data-theme="dark"] .wordmark img { filter: invert(1); }
.spec-vars .v.inv .wordmark img { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .spec-vars .v.inv .wordmark img { filter: none; } }
:root[data-theme="dark"] .spec-vars .v.inv .wordmark img { filter: none; }

/* ---------- chrome ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gut);
  mix-blend-mode: difference;
  color: #FFFFFF;
  pointer-events: none;
}
.header > * { pointer-events: auto; }
.header .brand {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: -0.01em;
  font-size: 17px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.header .brand span { font-family: var(--font-mono); font-size: 11px; opacity: .7; letter-spacing: .06em; }
.header .index-btn {
  font-size: 15px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.header .index-btn i {
  width: 8px; height: 8px;
  border: 1px solid currentColor;
  display: inline-block;
  transition: background var(--dur-fast) var(--ease), transform var(--dur) var(--ease);
}
body.index-open .header .index-btn i { background: currentColor; transform: rotate(45deg); }

.corner {
  position: fixed;
  left: var(--gut);
  bottom: 22px;
  z-index: 40;
  display: flex;
  gap: 16px;
  align-items: center;
  mix-blend-mode: difference;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
}
.corner .demo { border: 1px solid currentColor; padding: 2px 6px; opacity: .8; }

/* index overlay */
.index {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--paper);
  color: var(--ink);
  display: grid;
  grid-template-rows: var(--header-h) 1fr auto;
  padding: 0 var(--gut) 28px;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
body.index-open .index { transform: none; visibility: visible; transition: transform var(--dur) var(--ease); }
.index ol {
  list-style: none; margin: 0; padding: 0;
  align-self: center;
  display: grid;
  gap: 2px;
  max-width: 1100px;
}
.index li a {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hair-soft);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(26px, 4.6vw, 58px);
  line-height: 1;
  transition: opacity var(--dur-fast) ease;
}
.index li a:hover { opacity: .5; }
.index li a b { font-family: var(--font-mono); font-weight: 400; font-size: 12px; letter-spacing: .06em; color: var(--grey-1); }
.index li a span:last-child { font-family: var(--font-mono); font-size: 11px; color: var(--grey-1); letter-spacing: .06em; }
.index li.current a { color: var(--grey-2); }
.index .foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--grey-1);
}
.index .foot button { text-decoration: underline; text-underline-offset: 3px; }

/* page transition veil */
.veil {
  position: fixed; inset: 0; z-index: 60;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

/* ---------- page ---------- */
#app { min-height: 100vh; }
.page { padding-bottom: 96px; }

/* HOME */
.home-hero {
  min-height: calc(100vh - 0px);
  position: relative;
  display: grid;
  align-content: center;
  padding: calc(var(--header-h) + 40px) var(--gut) 60px;
  overflow: hidden;
}
.home-hero .gl { position: absolute; inset: 0; z-index: 0; opacity: .9; width: 100%; height: 100%; }
.home-hero .inner { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; width: 100%; }
.home-hero h1 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(56px, 12vw, 190px);
  line-height: .9;
  margin: 0 0 32px;
  text-wrap: balance;
}
.home-hero h1 span { display: block; }
.home-hero h1 > span:last-child { color: var(--grey-1); }
.home-hero p { max-width: 44ch; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.4; margin: 0; }
.home-hero .hint { margin-top: 48px; }

.home-chapters { padding: 0 var(--gut) 40px; max-width: var(--max); margin: 0 auto; }
.home-chapters ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.home-chapters li a {
  display: grid;
  grid-template-columns: 60px 1fr 1.2fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--hair-soft);
  transition: padding-left var(--dur-fast) var(--ease);
}
.home-chapters li a:hover { padding-left: 8px; }
.home-chapters li a .t {
  font-family: var(--font-display); font-weight: var(--display-weight);
  letter-spacing: -0.02em; font-size: clamp(22px, 3vw, 40px); line-height: 1;
}
.home-chapters li a .d { color: var(--grey-1); font-size: 14px; max-width: 48ch; }
.home-chapters li a .a { font-family: var(--font-mono); font-size: 13px; }
@media (max-width: 760px) {
  .home-chapters li a { grid-template-columns: 44px 1fr auto; }
  .home-chapters li a .d { display: none; }
}

/* CHAPTER HERO */
.ch-hero {
  min-height: 92vh;
  position: relative;
  display: grid;
  align-content: end;
  padding: calc(var(--header-h) + 40px) var(--gut) 56px;
  overflow: hidden;
}
.ch-hero .bg { position: absolute; inset: 0; z-index: 0; }
.ch-hero .bg canvas, .ch-hero .bg img, .ch-hero .bg video { width: 100%; height: 100%; object-fit: cover; }
.ch-hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--paper) 0%, transparent 55%); }
.ch-hero .inner { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; width: 100%; display: grid; gap: 28px; grid-template-columns: 1fr; }
.ch-hero h1 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(56px, 11vw, 168px);
  line-height: .9;
  margin: 0;
}
.ch-hero .thesis { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; max-width: 720px; }
.ch-hero .thesis p { margin: 0; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.4; max-width: 52ch; }
.ch-hero .thesis .label { padding-top: 6px; }

/* generic block spacing */
.block { padding: clamp(64px, 9vw, 140px) var(--gut) 0; }
.block .in { max-width: var(--max); margin: 0 auto; }

/* NOTES PULL */
.notes .in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(24px, 5vw, 96px);
  align-items: start;
}
.notes h2 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: -0.03em;
  font-size: clamp(34px, 5.5vw, 84px);
  line-height: .95;
  margin: 0;
  text-wrap: balance;
}
.notes .side { display: grid; gap: 14px; padding-top: 10px; }
.notes .side p { margin: 0; max-width: 46ch; font-size: 17px; line-height: 1.45; }
@media (max-width: 760px) { .notes .in { grid-template-columns: 1fr; } }

/* RULE BLOCK */
.rule .in { display: grid; gap: 34px; }
.rule .head {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  border-top: 1px solid var(--ink);
  padding-top: 16px;
  align-items: baseline;
}
.rule .head .n { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }
.rule .head .lab { font-family: var(--font-mono); font-size: 12px; color: var(--grey-1); letter-spacing: .06em; margin-bottom: 14px; }
.rule .head h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: -0.025em;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1;
  max-width: 20ch;
}
.rule .head p { margin: 0; max-width: 58ch; font-size: 17px; line-height: 1.45; }
.rule .art { border-top: 1px solid var(--hair-soft); padding-top: 26px; }

/* SPEC CANVAS (logo) */
.spec {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.spec .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--hair-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair-soft) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.spec.on .grid { opacity: 1; }
.spec .mark {
  position: relative;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: -0.04em;
  font-size: clamp(64px, 12vw, 200px);
  line-height: 1;
  padding: .3em .35em;
}
.spec .mark img, .spec .mark svg { height: clamp(64px, 12vw, 200px); width: auto; }
.spec .clear {
  position: absolute; inset: 0;
  border: 1px dashed var(--grey-1);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.spec.on .clear { opacity: 1; }
.spec .tag {
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--font-mono); font-size: 11px; color: var(--grey-1); letter-spacing: .06em;
}
.spec .toggle {
  position: absolute; right: 14px; top: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  border: 1px solid var(--hair); padding: 6px 10px;
  background: var(--paper);
}
.spec-vars { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); margin-top: 1px; }
.spec-vars > div { background: var(--paper); padding: 16px; display: grid; gap: 8px; }
.spec-vars .v { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 28px; letter-spacing: -0.03em; line-height: 1; padding: 20px 0; }
.spec-vars .v.inv { background: var(--ink); color: var(--paper); padding: 20px 14px; }

/* MISUSE GRID */
.misuse { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.misuse > div { background: var(--paper); padding: 18px; display: grid; gap: 14px; }
.misuse .frame {
  aspect-ratio: 4 / 3; background: var(--panel); display: grid; place-items: center; position: relative; overflow: hidden;
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.04em; font-size: 40px;
}
.misuse .frame img, .misuse .frame svg { height: 40px; width: auto; }
.misuse .no .frame::before, .misuse .no .frame::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 140%; height: 1px; background: var(--ink); transform: translate(-50%, -50%) rotate(45deg);
}
.misuse .no .frame::after { transform: translate(-50%, -50%) rotate(-45deg); }
.misuse .cap { font-size: 13px; line-height: 1.4; display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.misuse .cap b { font-family: var(--font-mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; color: var(--grey-1); }
.misuse .frame.skew { transform: none; }
.misuse .frame.skew .m { transform: skewX(-18deg) scaleX(1.25); display: inline-block; }
.misuse .frame.tilt .m { transform: rotate(-12deg); display: inline-block; }
.misuse .frame.outline .m { -webkit-text-stroke: 1px var(--ink); color: transparent; }
.misuse .frame.crowd .m { outline: 6px solid var(--grey-2); outline-offset: -2px; }

/* TYPE SPECIMEN */
.specimen { display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.specimen > div { background: var(--paper); padding: 22px 20px; display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: baseline; }
.specimen .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--grey-1); }
.specimen .s {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) { .specimen > div { grid-template-columns: 1fr; gap: 8px; } }
.glyphs {
  margin-top: 1px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(22px, 3.4vw, 46px);
  letter-spacing: .06em;
  line-height: 1.3;
  color: var(--ink);
  padding: 22px 20px;
  border: 1px solid var(--hair);
  border-top: 0;
  overflow-wrap: anywhere;
}

/* TYPE PLAYGROUND */
.play { border: 1px solid var(--ink); }
.play .stage {
  padding: clamp(28px, 5vw, 72px) clamp(18px, 3vw, 40px);
  min-height: 46vh;
  display: grid;
  align-content: center;
}
.play .stage [contenteditable] {
  font-family: var(--font-display);
  font-weight: var(--wt, 500);
  font-size: var(--sz, 96px);
  letter-spacing: var(--tr, -0.03em);
  line-height: var(--lh, .95);
  outline: none;
  overflow-wrap: anywhere;
  caret-color: var(--ink);
}
.play .bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--hair);
  border-top: 1px solid var(--ink);
}
.play .bar label { background: var(--paper); padding: 12px 14px; display: grid; gap: 10px; align-content: start; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--grey-1); }
.play .bar label output { color: var(--ink); }
.play input[type=range] { width: 100%; accent-color: var(--ink); }
.play .bar .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.play .bar .btns button { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--hair); padding: 6px 9px; }
.play .bar .btns button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* HIERARCHY */
.hier { display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.hier > div { background: var(--paper); padding: 22px 20px; display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: baseline; }
.hier .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--grey-1); line-height: 1.5; }
.hier .k small { display: block; color: var(--grey-2); }
@media (max-width: 640px) { .hier > div { grid-template-columns: 1fr; gap: 8px; } }

/* SWATCHES */
.swatches { display: grid; gap: 34px; }
.swatch-group h3 { margin: 0 0 12px; font-family: var(--font-mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; color: var(--grey-1); display: flex; gap: 14px; }
.swatch-group h3 span { color: var(--ink); }
.swatch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.swatch {
  height: clamp(150px, 14vw, 210px);
  position: relative;
  display: grid;
  align-content: end;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-align: left;
  transition: transform var(--dur-fast) var(--ease);
}
.swatch:hover { transform: scale(.985); }
.swatch b { font-weight: 400; display: block; font-family: var(--font-body); font-size: 14px; letter-spacing: 0; margin-bottom: 4px; }
.swatch small { display: block; opacity: .75; }
.swatch .copied { position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity .2s; }
.swatch.did .copied { opacity: 1; }

/* PALETTE SHUFFLE */
.shuffle { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.shuffle .comp {
  --c-bg: var(--paper); --c-fg: var(--ink); --c-acc: var(--grey-1);
  background: var(--c-bg); color: var(--c-fg);
  aspect-ratio: 4 / 3;
  padding: clamp(18px, 3vw, 40px);
  display: grid; align-content: space-between;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.shuffle .comp .h {
  font-family: var(--font-display); font-weight: var(--display-weight);
  letter-spacing: -0.03em; font-size: clamp(28px, 4.5vw, 64px); line-height: .95; max-width: 12ch; margin: 0;
}
.shuffle .comp .row { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.shuffle .comp .row p { margin: 0; max-width: 28ch; font-size: 14px; line-height: 1.4; }
.shuffle .comp .cta { border: 1px solid var(--c-fg); padding: 10px 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
.shuffle .comp .acc { width: 46px; height: 46px; background: var(--c-acc); transition: background var(--dur) var(--ease); }
.shuffle .ctl { background: var(--paper); padding: 20px; display: grid; align-content: space-between; gap: 18px; }
.shuffle .ctl dl { margin: 0; display: grid; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; }
.shuffle .ctl dl div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: center; }
.shuffle .ctl dt { color: var(--grey-1); }
.shuffle .ctl dd { margin: 0; display: flex; gap: 10px; align-items: center; }
.shuffle .ctl dd i { width: 14px; height: 14px; border: 1px solid var(--hair); display: inline-block; }
.shuffle .ctl .go { justify-self: start; border: 1px solid var(--ink); padding: 12px 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
.shuffle .ctl .go:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) { .shuffle { grid-template-columns: 1fr; } }

/* MEDIA CAROUSEL */
.carousel { position: relative; }
.carousel .track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; padding-bottom: 6px; }
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .track.drag { cursor: grabbing; scroll-snap-type: none; }
.carousel .slide { flex: 0 0 min(78vw, 980px); scroll-snap-align: start; display: grid; gap: 12px; }
.carousel .slide .fr { aspect-ratio: 16 / 10; background: var(--panel); overflow: hidden; }
.carousel .slide .fr > * { width: 100%; height: 100%; object-fit: cover; }
.carousel .slide .cap { font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; color: var(--grey-1); display: flex; justify-content: space-between; gap: 12px; }
.carousel .bar { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }
.carousel .bar .arrows { display: flex; gap: 6px; }
.carousel .bar button { width: 44px; height: 36px; border: 1px solid var(--hair); display: grid; place-items: center; }
.carousel .bar button:hover { border-color: var(--ink); }
.carousel .bar .cnt { font-variant-numeric: tabular-nums; }

/* GALLERY WALL */
.wall-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--grey-1); }
.wall-bar div { display: flex; gap: 6px; }
.wall-bar button { border: 1px solid var(--hair); padding: 7px 11px; color: var(--ink); }
.wall-bar button:hover { border-color: var(--ink); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.wall .cell { background: var(--paper); position: relative; aspect-ratio: 1; overflow: hidden; }
.wall .cell.wide { grid-column: span 2; aspect-ratio: 2 / 1; }
.wall .cell > canvas, .wall .cell > img, .wall .cell > video { width: 100%; height: 100%; object-fit: cover; }
.wall .cell .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em;
  color: #FFFFFF; mix-blend-mode: difference;
  opacity: 0; transition: opacity var(--dur-fast);
}
.wall .cell:hover .cap { opacity: 1; }
@media (max-width: 640px) { .wall .cell.wide { grid-column: span 1; aspect-ratio: 1; } }

/* MOTION REEL */
.reel { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.reel .tile { background: var(--paper); position: relative; aspect-ratio: 16 / 10; overflow: hidden; cursor: pointer; }
.reel .tile > canvas, .reel .tile > video, .reel .tile > img { width: 100%; height: 100%; object-fit: cover; }
.reel .tile .cap { position: absolute; left: 12px; bottom: 10px; right: 12px; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em; color: #FFFFFF; mix-blend-mode: difference; }
.reel .tile .play { position: absolute; right: 12px; top: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: #FFFFFF; mix-blend-mode: difference; }

/* DOWNLOADS */
.dl { border-top: 1px solid var(--ink); }
.dl a { display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--hair-soft); }
.dl a:hover .n { text-decoration: underline; text-underline-offset: 4px; }
.dl a .n { font-size: 17px; }
.dl a .f, .dl a .s { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--grey-1); }
.dl-note { margin: 14px 0 0; font-size: 13px; color: var(--grey-1); max-width: 60ch; }

/* VOICE PAIRS */
.pairs { display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.pairs > div { background: var(--paper); display: grid; grid-template-columns: 1fr 1fr; gap: 1px; }
.pairs > div > div { padding: 22px 20px; display: grid; gap: 10px; align-content: start; }
.pairs .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--grey-1); }
.pairs p { margin: 0; font-size: 18px; line-height: 1.35; }
.pairs .no p { color: var(--grey-1); text-decoration: line-through; text-decoration-color: var(--grey-2); }
@media (max-width: 640px) { .pairs > div { grid-template-columns: 1fr; } }

/* STATEMENT */
.statement .in { display: grid; gap: 22px; }
.statement h2 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: -0.035em;
  font-size: clamp(38px, 7.5vw, 128px);
  line-height: .92;
  margin: 0;
  max-width: 14ch;
  text-wrap: balance;
}
.statement p { margin: 0; max-width: 54ch; font-size: 17px; line-height: 1.45; color: var(--grey-1); }

/* NEXT */
.next { padding: clamp(80px, 12vw, 180px) var(--gut) 0; }
.next a {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 60px 1fr auto; gap: 24px; align-items: baseline;
  border-top: 1px solid var(--ink); padding-top: 22px;
}
.next a b { font-family: var(--font-mono); font-weight: 400; font-size: 12px; letter-spacing: .06em; }
.next a .t {
  font-family: var(--font-display); font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(48px, 9vw, 150px); line-height: .9;
  transition: transform var(--dur) var(--ease);
}
.next a:hover .t { transform: translateX(12px); }
.next a .arr { font-size: 40px; line-height: 1; }

/* reveal */
.rv { will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
  .veil { display: none; }
}
