/* Ondaline — tokens */
:root {
  --bg: #e4e8ec;
  --bg-2: #d8dee4;
  --surface: #f3f5f7;
  --ink: #0d1626;
  --ink-2: #2a3446;
  --muted: #4a5568;
  --line: rgba(13, 22, 38, 0.16);
  --line-strong: rgba(13, 22, 38, 0.42);
  --accent: #2433d6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(36, 51, 214, 0.1);
  --scrim: rgba(13, 22, 38, 0.38);
  --focus: #2433d6;
  --error: #b3192b;
  --art-bg: #eef1f4;
  --p-tidewell: #0a7480;
  --p-mesa: #9a5c00;
  --p-fernhaus: #2d7431;
  --p-kilnworks: #ac2d3c;
  --p-orbit: #5636cc;
  --p-halcyon: #ad1d73;
  --shadow: 0 1px 0 rgba(13, 22, 38, 0.06), 0 18px 40px -24px rgba(13, 22, 38, 0.45);
  color-scheme: light;

  --bar: 52px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --gut: 20px;
  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.65, 0, .25, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1b;
    --bg-2: #0f1626;
    --surface: #121a2c;
    --ink: #e3e8f1;
    --ink-2: #c3cad8;
    --muted: #9aa5b8;
    --line: rgba(227, 232, 241, 0.14);
    --line-strong: rgba(227, 232, 241, 0.4);
    --accent: #8d98ff;
    --accent-ink: #0a0f1b;
    --accent-soft: rgba(141, 152, 255, 0.14);
    --scrim: rgba(3, 6, 12, 0.6);
    --focus: #a9b2ff;
    --error: #ff8d98;
    --art-bg: #0e1524;
    --p-tidewell: #44cfd4;
    --p-mesa: #ffb547;
    --p-fernhaus: #88d27c;
    --p-kilnworks: #ff8b95;
    --p-orbit: #ab98ff;
    --p-halcyon: #ff7dc4;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f1b;
  --bg-2: #0f1626;
  --surface: #121a2c;
  --ink: #e3e8f1;
  --ink-2: #c3cad8;
  --muted: #9aa5b8;
  --line: rgba(227, 232, 241, 0.14);
  --line-strong: rgba(227, 232, 241, 0.4);
  --accent: #8d98ff;
  --accent-ink: #0a0f1b;
  --accent-soft: rgba(141, 152, 255, 0.14);
  --scrim: rgba(3, 6, 12, 0.6);
  --focus: #a9b2ff;
  --error: #ff8d98;
  --art-bg: #0e1524;
  --p-tidewell: #44cfd4;
  --p-mesa: #ffb547;
  --p-fernhaus: #88d27c;
  --p-kilnworks: #ff8b95;
  --p-orbit: #ab98ff;
  --p-halcyon: #ff7dc4;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

@media (min-width: 560px) {
  :root { --gut: 30px; --bar: 60px; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-snap-type: y mandatory;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 15px;
  line-height: 1.45;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
body.locked { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.mono {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-stretch: 87.5%;
}
::selection { background: var(--accent); color: var(--accent-ink); }

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

.skip {
  position: fixed; left: 12px; top: calc(var(--sat) + 8px); z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 4px;
  transform: translateY(-160%); transition: transform .2s var(--ease);
  font-size: 14px;
}
.skip:focus-visible { transform: none; }

/* Top bar */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: calc(var(--bar) + var(--sat));
  padding: var(--sat) calc(var(--gut) + var(--sar)) 0 calc(var(--gut) + var(--sal));
  display: flex; align-items: center; gap: 16px;
  color: var(--ink);
  pointer-events: none;
}
.bar::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(var(--bg) 35%, transparent);
  opacity: .92; z-index: -1;
}
.bar > * { pointer-events: auto; }
.bar-brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.bar-mark { width: 24px; height: 24px; }
.bar-brand span { opacity: 0; transform: translateY(4px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
body[data-at="2"] .bar-brand span, body[data-at="3"] .bar-brand span { opacity: 1; transform: none; }
.bar-nav { margin-left: auto; display: flex; gap: 4px; }
.bar-nav a {
  display: flex; align-items: baseline; gap: 6px;
  padding: 8px 8px; border-radius: 4px; color: var(--muted);
  font-size: 13px; transition: color .25s;
  position: relative; min-height: 36px; align-items: center;
}
.bar-nav a b { font-family: var(--f-mono); font-weight: 400; font-size: 10px; letter-spacing: .04em; }
.bar-nav a span { display: none; }
.bar-nav a::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 4px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.bar-nav a[aria-current="true"] { color: var(--ink); }
.bar-nav a[aria-current="true"]::after { transform: scaleX(1); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink);
  transition: transform .5s var(--ease), border-color .2s;
}
.theme-toggle svg { width: 18px; height: 18px; transition: transform .6s var(--ease); }
:root[data-theme="dark"] .theme-toggle svg { transform: rotate(180deg); }
.theme-toggle:hover { border-color: var(--line-strong); }
@media (min-width: 560px) {
  .bar-nav a span { display: inline; }
  .bar-nav { gap: 8px; }
  .bar-brand { font-size: 17px; }
}

/* Screens */
main { display: block; }
.screen {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  padding: calc(var(--bar) + var(--sat)) calc(var(--gut) + var(--sar)) calc(var(--sab) + 18px) calc(var(--gut) + var(--sal));
}
.screen + .screen { border-top: 1px solid var(--line); }
.label { color: var(--muted); margin-bottom: 7px; display: flex; align-items: center; gap: 10px; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Morph when fold state changes */
body.morph .screen > *:not(canvas), body.morph .detail-panel { animation: morph .55s var(--ease) both; }
@keyframes morph { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

/* ============ SCREEN 1: HOME ============ */
.s-home { display: grid; grid-template-rows: auto 1fr auto auto; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.hero-meta {
  position: relative; display: flex; justify-content: space-between; gap: 12px;
  color: var(--muted); padding-top: 6px; pointer-events: none;
}
.hero-copy { position: relative; align-self: end; pointer-events: none; }
.wordmark {
  font-weight: 760; font-stretch: 75%;
  font-size: clamp(76px, 21.5vw, 104px);
  line-height: .82; letter-spacing: -.012em;
  margin-left: -.04em;
  font-variation-settings: "opsz" 96;
}
.lede {
  margin-top: 14px; max-width: 15ch;
  font-size: clamp(24px, 6.6vw, 31px); line-height: 1.04; font-weight: 400; letter-spacing: -.02em;
  font-stretch: 87%;
}
.hero-index {
  position: relative; margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line-strong);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  font-size: 13px; line-height: 1.2; color: var(--ink-2); pointer-events: none;
}
.hero-index li { display: flex; flex-direction: column; gap: 6px; }
.hero-index .mono { color: var(--accent); }
.swipe-cue {
  position: relative; margin-top: 18px; align-self: end;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0 4px; color: var(--ink);
  border-radius: 4px;
}
.swipe-cue svg { width: 16px; height: 28px; animation: nudge 2.4s var(--ease-io) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(5px); } }

@media (min-width: 560px) {
  .s-home { grid-template-rows: auto auto 1fr auto auto; }
  .hero-copy { grid-row: 2; align-self: start; margin-top: 40px; }
  .wordmark { font-size: clamp(120px, 24vw, 156px); }
  .lede { max-width: 13ch; font-size: clamp(32px, 6vw, 40px); margin-top: 20px; margin-left: auto; text-align: right; }
  .hero-index { grid-row: 4; grid-template-columns: repeat(3, 1fr); font-size: 15px; gap: 18px; }
  .swipe-cue { grid-row: 5; }
}

/* ============ SCREEN 2: WORK ============ */
.s-work { display: flex; flex-direction: column; padding-left: 0; padding-right: 0; }
.work-head { padding: 4px calc(var(--gut) + var(--sar)) 0 calc(var(--gut) + var(--sal)); display: flex; flex-direction: column; gap: 12px; }
.work-head h2, .studio-head h2 {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 30px; font-weight: 700; font-stretch: 75%; letter-spacing: -.01em; line-height: 1; white-space: nowrap;
}
.work-head h2 .mono, .studio-head h2 .mono { color: var(--accent); font-size: 11px; letter-spacing: .04em; }
.filters { display: flex; gap: 6px; flex-wrap: nowrap; }
.filters button {
  flex: 1 1 auto; min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s;
}
.filters sup { font-family: var(--f-mono); font-size: 9px; vertical-align: super; margin-left: 2px; opacity: .7; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters button:hover:not([aria-pressed="true"]) { background: var(--accent-soft); }

/* folded: carousel */
.stage { display: none; }
.track {
  flex: 1; min-height: 0;
  margin-top: 16px;
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 0 calc(var(--gut) + var(--sar)) 0 calc(var(--gut) + var(--sal));
  scroll-padding: 0 calc(var(--gut) + var(--sar)) 0 calc(var(--gut) + var(--sal));
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.card {
  --hue: var(--p-tidewell);
  position: relative; flex: 0 0 calc(100% - 34px); scroll-snap-align: start;
  display: flex; flex-direction: column;
  border-top: 2px solid var(--hue);
  background: var(--surface);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.card[hidden] { display: none; }
.card-art { position: relative; flex: 1; min-height: 0; background: var(--art-bg); overflow: hidden; }
.card-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-no {
  position: absolute; left: 10px; top: 8px; color: var(--hue); font-weight: 500;
  background: var(--art-bg); padding: 3px 5px; line-height: 1;
}
.card-info { padding: 14px 14px 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: end; }
.card-tags { grid-column: 1 / -1; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.card-tags span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card-title { font-size: 30px; font-weight: 700; font-stretch: 75%; letter-spacing: -.005em; line-height: 1; }
.card-line { grid-column: 1; font-size: 14px; color: var(--ink-2); line-height: 1.35; max-width: 32ch; }
.card-open {
  grid-column: 2; grid-row: 2 / span 2; align-self: end;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  transition: transform .3s var(--ease), background-color .25s;
}
.card-open svg { width: 20px; height: 20px; }
.card-open:hover { transform: rotate(-45deg); }
.card-open::before { content: ""; position: absolute; inset: 0 0 auto 0; height: calc(100% - 0px); }
.card-pick { display: none; }

.pager {
  display: flex; align-items: center; gap: 12px;
  padding: 14px calc(var(--gut) + var(--sar)) 0 calc(var(--gut) + var(--sal));
}
.pager-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--ink); flex: none;
  transition: background-color .2s, opacity .2s;
}
.pager-btn svg { width: 18px; height: 18px; }
.pager-btn:disabled { opacity: .35; cursor: default; }
.pager-btn:hover:not(:disabled) { background: var(--accent-soft); }
.pager-rail { flex: 1; display: flex; gap: 4px; }
.pager-rail i { flex: 1; height: 3px; background: var(--line); border-radius: 2px; position: relative; overflow: hidden; }
.pager-rail i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.pager-rail i.on::after { transform: scaleX(1); }
.pager-count { color: var(--muted); min-width: 52px; text-align: center; }

/* unfolded: stage + index grid */
@media (min-width: 560px) {
  .work-head { flex-direction: row; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 16px; }
  .work-head h2 { font-size: 36px; }
  .filters { gap: 5px; }
  .filters button { flex: none; padding: 0 11px; font-size: 13.5px; min-height: 38px; }

  .stage {
    display: grid; grid-template-columns: 1.25fr 1fr; gap: 0;
    margin: 20px calc(var(--gut) + var(--sar)) 0 calc(var(--gut) + var(--sal));
    flex: 1 1 auto; min-height: 0; max-height: 440px;
    background: var(--surface);
    border-top: 2px solid var(--hue, var(--accent));
    transition: border-color .4s var(--ease);
  }
  .stage-art { position: relative; background: var(--art-bg); overflow: hidden; }
  .stage-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .3s var(--ease); }
  .stage-art.swap canvas { opacity: 0; }
  .stage-no { position: absolute; left: 14px; top: 12px; color: var(--hue); }
  .stage-meta { padding: 20px 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
  .stage-tags { color: var(--muted); }
  .stage-title { font-size: 40px; font-weight: 700; font-stretch: 75%; letter-spacing: -.01em; line-height: .95; }
  .stage-line { font-size: 15px; color: var(--ink-2); line-height: 1.4; }
  .stage-figure { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
  .stage-figure b { font-size: 34px; font-weight: 650; font-stretch: 80%; letter-spacing: -.03em; color: var(--hue); line-height: 1; }
  .stage-figure span { font-size: 13px; color: var(--muted); }
  .stage-open { align-self: flex-start; }
  .stage-meta > * { transition: opacity .3s var(--ease), transform .3s var(--ease); }
  .stage.swap .stage-meta > *:not(.stage-open) { opacity: 0; transform: translateY(6px); }

  .track {
    flex: none; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 10px;
    overflow: visible; scroll-snap-type: none; margin-top: 12px;
    height: clamp(230px, 31dvh, 300px);
  }
  .card { flex: none; background: transparent; border-top-width: 1px; border-top-color: var(--line-strong); }
  .card[hidden] { display: flex; }
  .card[aria-disabled="true"] { opacity: .32; }
  .card-art { border-radius: 0; }
  .card-info { padding: 8px 0 0; grid-template-columns: 1fr; }
  .card-tags { font-size: 9px; }
  .card-title { font-size: 20px; }
  .card-line, .card-open { display: none; }
  .card-no { left: 8px; top: 6px; font-size: 9px; }
  .card-pick { display: block; position: absolute; inset: 0; z-index: 2; border-radius: 0; }
  .card-pick:focus-visible { outline-offset: 2px; }
  .card.is-current { border-top: 3px solid var(--hue); }
  .card.is-current .card-title { color: var(--ink); }
  .card:not(.is-current) .card-title { color: var(--ink-2); }
  .card:not(.is-current):not([aria-disabled="true"]):hover { transform: translateY(-3px); }
  .pager { display: none; }
}

/* ============ SCREEN 3: STUDIO ============ */
.s-studio { display: flex; flex-direction: column; gap: 12px; }
.studio-head { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.statement { font-size: 17.5px; line-height: 1.2; letter-spacing: -.015em; max-width: 30ch; font-stretch: 90%; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.facts > div { padding: 6px 0; display: flex; flex-direction: column-reverse; gap: 2px; }
.facts > div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { font-size: 30px; font-weight: 700; font-stretch: 75%; line-height: 1; letter-spacing: -.005em; }
.facts > div:first-child dd { color: var(--accent); }
.studio-body { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.services { display: grid; gap: 5px; margin-bottom: 10px; }
.services li { display: grid; grid-template-columns: 1fr; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.services b { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.approach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; font-size: 13px; line-height: 1.25; }
.approach li { display: flex; flex-direction: column; gap: 4px; }
.approach .mono { color: var(--accent); }
.contact { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
.contact > .label, .contact > .email-row { grid-column: 1 / -1; }
.contact > .compose-open { grid-column: 2; grid-row: 3; }
.email-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.email {
  font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-stretch: 88%;
  user-select: all; -webkit-user-select: all;
}
.address { color: var(--muted); font-size: 13.5px; margin: 2px 0 0; grid-column: 1; grid-row: 3; }
.email-row { flex-wrap: nowrap; }
.clients { margin-top: auto; padding-top: 4px; }
.clients p { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.clients i { font-style: normal; color: var(--accent); padding: 0 3px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; font-size: 14.5px; font-weight: 550; white-space: nowrap;
  transition: background-color .2s, color .2s, transform .2s var(--ease), border-color .2s;
}
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-ghost:hover { background: var(--accent-soft); }
.copy-btn.done { border-color: var(--accent); color: var(--accent); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--ink); flex: none; transition: background-color .2s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--accent-soft); }

/* compose: bottom sheet when folded */
.compose {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  padding: 0 0 var(--sab);
  background: var(--surface);
  border-top: 2px solid var(--accent);
  box-shadow: 0 -30px 60px -20px var(--scrim);
  transform: translateY(105%);
  visibility: hidden;
  transition: transform .45s var(--ease), visibility 0s linear .45s;
}
.compose.open { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
.compose-inner { padding: 16px var(--gut) 18px; }
.compose-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.compose-title { font-size: 24px; font-weight: 700; font-stretch: 75%; letter-spacing: -.02em; }
.sheet-scrim {
  position: fixed; inset: 0; z-index: 39; background: var(--scrim);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
}
.sheet-scrim.on { opacity: 1; pointer-events: auto; }
.brief { display: grid; gap: 10px; }
.brief[hidden] { display: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field .mono { color: var(--muted); }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 1.5px solid var(--line-strong); background: transparent;
  padding: 8px 0; font-size: 16px; border-radius: 0; resize: none; color: var(--ink);
  transition: border-color .2s;
}
.field textarea::placeholder { color: var(--muted); opacity: .8; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1.5px 0 var(--accent); border-radius: 0; }
.field.invalid input, .field.invalid textarea { border-bottom-color: var(--error); }
.form-error { color: var(--error); font-size: 13px; min-height: 0; }
.form-error:empty { display: none; }
.brief .btn { justify-self: start; }
.draft { display: grid; gap: 10px; }
.draft[hidden] { display: none; }
.draft-flag { color: var(--accent); display: flex; align-items: center; gap: 8px; }
.draft-flag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.draft-text { font-size: 14px; color: var(--ink-2); }
.draft-body {
  margin: 0; padding: 10px 12px; background: var(--bg); border-left: 2px solid var(--accent);
  font-family: var(--f-mono); font-size: 11px; line-height: 1.55; white-space: pre-wrap; color: var(--ink-2);
  max-height: 120px; overflow: auto;
}
.draft-actions { display: flex; gap: 8px; }

@media (min-width: 560px) {
  .s-studio { gap: 20px; }
  .studio-head { flex-direction: row; align-items: flex-start; gap: 28px; }
  .studio-head h2 { font-size: 40px; flex: none; }
  .statement { font-size: 23px; max-width: none; padding-top: 4px; }
  .facts dd { font-size: 52px; letter-spacing: -.01em; }
  .facts > div { padding: 12px 0; }
  .facts > div + div { padding-left: 18px; }
  .studio-body { display: grid; grid-template-columns: 1fr 1.08fr; gap: 28px; }
  .services { gap: 12px; margin-bottom: 20px; }
  .services b { font-size: 17px; }
  .services li { font-size: 14px; }
  .approach { grid-template-columns: 1fr; gap: 8px; font-size: 14.5px; }
  .approach li { flex-direction: row; gap: 10px; align-items: baseline; }
  .contact { display: block; background: var(--surface); padding: 16px 18px 18px; border-top: 2px solid var(--accent); align-self: start; }
  .email { font-size: 19px; }
  .address { margin: 6px 0 4px; }
  .compose-open, .compose-close, .compose-top { display: none; }
  .compose {
    position: static; transform: none; visibility: visible; background: transparent; border: 0; box-shadow: none; padding: 0;
    transition: none;
  }
  .compose-inner { padding: 6px 0 0; }
  .sheet-scrim { display: none; }
  .clients p { font-size: 15px; }
}

/* ============ DETAIL OVERLAY ============ */
.detail {
  --hue: var(--accent);
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  clip-path: inset(var(--ct, 0px) var(--cr, 0px) var(--cb, 0px) var(--cl, 0px));
  transition: clip-path .6s var(--ease-io);
}
.detail[hidden] { display: none; }
.detail.closing, .detail.opening { pointer-events: none; }
.detail-panel { height: 100%; display: flex; flex-direction: column; }
.detail-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--sat) + 8px) calc(var(--gut) + var(--sar)) 8px calc(var(--gut) + var(--sal));
  border-bottom: 1px solid var(--line);
}
.detail-count { color: var(--muted); }
.detail-count b { color: var(--hue); font-weight: 500; }
.detail-nav { display: flex; gap: 8px; }
.detail-close { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.detail-close:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.detail-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 calc(var(--gut) + var(--sar)) calc(var(--sab) + 28px) calc(var(--gut) + var(--sal));
  display: grid; grid-template-columns: 1fr; align-content: start; gap: 18px;
}
.detail-art {
  position: relative; height: clamp(190px, 34dvh, 300px);
  margin: 0 calc(-1 * (var(--gut) + var(--sar))) 0 calc(-1 * (var(--gut) + var(--sal)));
  background: var(--art-bg); border-bottom: 2px solid var(--hue);
}
.detail-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.detail-head { display: flex; flex-direction: column; gap: 6px; }
.detail-tags { color: var(--hue); }
.detail-title { font-size: 46px; font-weight: 760; font-stretch: 75%; letter-spacing: -.012em; line-height: .9; }
.detail-client { color: var(--muted); font-size: 14px; }
.detail-figures { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.detail-figures > div { padding: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.detail-figures > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.detail-figures dd { order: -1; font-size: 34px; font-weight: 700; font-stretch: 78%; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.detail-figures dt { font-size: 13px; color: var(--muted); line-height: 1.3; }
.detail-body { display: grid; gap: 16px; }
.detail-body section { display: grid; grid-template-columns: 82px 1fr; gap: 12px; }
.detail-body h3 { padding-top: 4px; color: var(--muted); }
.detail-body p { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.detail-body section:last-child p { color: var(--ink); }

.detail-scroll > * { animation: rise .6s var(--ease) both; }
.detail-scroll > *:nth-child(2) { animation-delay: .08s; }
.detail-scroll > *:nth-child(3) { animation-delay: .14s; }
.detail-scroll > *:nth-child(4) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (min-width: 560px) {
  .detail-scroll { grid-template-columns: 1fr 1fr; column-gap: 28px; row-gap: 22px; }
  .detail-art { grid-column: 1 / -1; height: clamp(260px, 40dvh, 380px); }
  .detail-head { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: flex-end; column-gap: 20px; }
  .detail-tags { width: 100%; }
  .detail-title { font-size: 68px; }
  .detail-client { padding-bottom: 6px; }
  .detail-figures { grid-column: 1; grid-template-columns: 1fr; align-self: start; }
  .detail-figures > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .detail-figures dd { font-size: 48px; }
  .detail-body { grid-column: 2; }
  .detail-body section { grid-template-columns: 1fr; gap: 4px; }
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--sab) + 20px); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 999px;
  transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Short real viewports (~10% smaller) */
@media (max-height: 640px) and (max-width: 559.98px) {
  .wordmark { font-size: clamp(68px, 19vw, 92px); }
  .statement { font-size: 17px; }
  .facts dd { font-size: 28px; }
  .services li span { display: none; }
  .card-line { display: none; }
  .statement { font-size: 16px; }
  .s-studio, .studio-body { gap: 9px; }
  .facts dd { font-size: 24px; }
  .compose-open { min-height: 38px; padding: 0 14px; }
  .approach { font-size: 12.5px; }
}
@media (max-height: 820px) and (min-width: 560px) {
  .services li span { font-size: 13px; }
  .facts dd { font-size: 44px; }
  .statement { font-size: 21px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .18s !important; }
  .detail { clip-path: none !important; transition: opacity .25s !important; }
  .swipe-cue svg { animation: none; }
}
