/* DAWArtist.ai public home page (ADR 0013), built from Design Lab R3-1 "Selection".
   Near-black page, one electric lime used only for what the studio is pointing at: corner brackets drawn
   over the gear in each photo, the way you would box eight bars of keys. Locked things get a quieter
   dashed box. Epilogue carries the voice, Martian Mono only the bracket and Kept/Changed labels.
   Tokens are documented in DESIGN.md, "Brand (site)"; keep the two in step. */
@font-face { font-family: "Epilogue"; src: url("/site/fonts/epilogue-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Epilogue"; src: url("/site/fonts/epilogue-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Epilogue"; src: url("/site/fonts/epilogue-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("/site/fonts/MartianMono-wdth-wght.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  /* primitives */
  --ink-9: oklch(0.165 0.008 270);
  --ink-8: oklch(0.215 0.01 270);
  --mist-0: oklch(0.97 0.004 270);
  --mist-2: oklch(0.8 0.012 270);
  --lime: oklch(0.92 0.2 124);
  --lime-hi: oklch(0.96 0.16 124);
  --steel: oklch(0.86 0.01 270);
  /* semantic */
  --page: var(--ink-9);
  --page-2: var(--ink-8);
  --plate: var(--ink-8);
  --text: var(--mist-0);
  --text-2: var(--mist-2);
  --accent: var(--lime);
  --accent-hi: var(--lime-hi);
  --accent-ink: var(--ink-9);
  --lock: var(--steel);
  --rule: oklch(0.97 0.004 270 / 0.16);
  --edge: oklch(0.97 0.004 270 / 0.4);
  --sel-edge: oklch(0.92 0.2 124 / 0.35);
  --lock-edge: oklch(0.9 0.01 270 / 0.6);
  /* type */
  --font: "Epilogue", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
  --w-head: 800;
  --w-mid: 600;
  --w-body: 400;
  /* shape, space, motion */
  --r: 3px;
  --pill: 999px;
  --side: clamp(20px, 4.5vw, 72px);
  --section: clamp(64px, 8vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* layers */
  --z-skip: 10;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--page); }
body { background: var(--page); color: var(--text); font: var(--w-body) 19px/1.6 var(--font); overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
:target { scroll-margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -80px; z-index: var(--z-skip); display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--text); color: var(--page); font-weight: var(--w-mid); border-radius: var(--r); }
.skip:focus { top: 8px; }

/* Header: the name and the one way in. */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--side); }
.name { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--w-head); font-size: 21px; letter-spacing: -0.02em; text-decoration: none; }
.signin { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1.5px solid var(--edge); border-radius: var(--pill); font-weight: var(--w-mid); font-size: 16px; text-decoration: none; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.signin:hover { border-color: var(--accent); }

/* Hero: the headline teaches the gesture, the frieze shows it on four rooms. */
.hero { padding: clamp(12px, 2vw, 28px) var(--side) clamp(48px, 6vw, 88px); }
.hero-copy { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 72px); align-items: end; }
h1 { font-weight: var(--w-head); font-size: clamp(42px, 5.4vw, 86px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.hero-side p { font-size: clamp(19px, 1.45vw, 22px); line-height: 1.45; color: var(--text-2); max-width: 32ch; }
.btn { display: inline-flex; align-items: center; min-height: 54px; margin-top: 24px; padding: 0 26px; border-radius: var(--pill); background: var(--accent); color: var(--accent-ink); font: var(--w-head) 17px/1 var(--font); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; transition: background-color .25s var(--ease), transform .25s var(--ease); }
.btn:hover { background: var(--accent-hi); }
.btn:active { transform: translateY(1px); }

.frieze { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1vw, 16px); margin-top: clamp(28px, 3.4vw, 48px); }
.frieze a { display: block; position: relative; overflow: hidden; border-radius: var(--r); background: var(--plate); text-decoration: none; }
.ph { display: block; position: relative; overflow: hidden; }
.frieze img, .portrait img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.frieze .cap { display: flex; align-items: center; min-height: 46px; padding: 10px 14px 11px; background: var(--plate); border-top: 2px solid var(--accent); font-weight: var(--w-mid); font-size: 16px; line-height: 1.3; }
.frieze a:hover .cap { text-decoration: underline; text-underline-offset: 4px; }
.label { margin-top: 12px; font-size: 14px; color: var(--text-2); }

/* The four stories: split, quote band, split flipped, centred stack. */
.note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 22px var(--side); border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.5; color: var(--text-2); }
.note-tag { font: 500 12px/1.4 var(--mono); color: var(--lock); padding: 3px 8px; border: 1px dashed var(--lock-edge); border-radius: 2px; }
.person { padding: var(--section) var(--side); border-top: 1px solid var(--rule); }
.portrait .ph { border-radius: var(--r); }
figcaption { margin-top: 8px; font-size: 13px; color: var(--text-2); }
blockquote p { font-weight: var(--w-head); font-size: clamp(30px, 3.2vw, 50px); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.person h3 { margin-top: 24px; font-weight: var(--w-body); font-size: clamp(18px, 1.35vw, 21px); line-height: 1.45; color: var(--text-2); max-width: 42ch; text-wrap: pretty; }
.kept { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule); }
.kept dt { font: 500 13px/1.4 var(--mono); color: var(--accent); }
.kept dd { margin-top: 2px; font-size: 18px; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 96px); align-items: center; }
.split.flip .portrait { order: 2; }
.split .portrait { max-width: 560px; }
.band blockquote p { font-size: clamp(38px, 5.2vw, 84px); line-height: 1; max-width: 20ch; }
.band-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: center; margin-top: clamp(32px, 4vw, 56px); }
.band .portrait { max-width: 480px; }
.stack { display: grid; justify-items: center; text-align: center; }
.stack .portrait { width: min(620px, 100%); }
.stack .words { max-width: 900px; margin-top: clamp(28px, 3vw, 44px); }
.stack h3 { margin-inline: auto; }
.stack .kept { justify-content: center; }

/* How it works: a real three-step sequence, so the verbs carry the order. */
.how { background: var(--page-2); padding: clamp(64px, 8vw, 120px) var(--side); scroll-margin-top: 0; }
.how h2 { font-weight: var(--w-head); font-size: clamp(30px, 3vw, 46px); letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
.how ol { list-style: none; margin-top: clamp(28px, 3vw, 44px); }
.how li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(16px, 4vw, 64px); align-items: center; padding: clamp(18px, 2vw, 28px) 0; border-top: 1px solid var(--rule); }
.how b { font-weight: var(--w-head); font-size: clamp(56px, 8vw, 96px); line-height: 0.95; letter-spacing: -0.04em; color: var(--accent); }
.how li p { max-width: 52ch; font-size: clamp(18px, 1.4vw, 21px); text-wrap: pretty; }

.access { padding: clamp(72px, 10vw, 152px) var(--side); }
.access h2 { font-weight: var(--w-head); font-size: clamp(42px, 5.8vw, 92px); line-height: 0.98; letter-spacing: -0.04em; max-width: 14ch; text-wrap: balance; }
.access p { margin-top: 20px; max-width: 46ch; color: var(--text-2); text-wrap: pretty; }

.foot { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px 40px; padding: 28px var(--side) 44px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--text-2); }
.foot-name { font-weight: var(--w-head); color: var(--text); }

/* The AI layer: selection brackets. Coordinates are fractions of the photo (inline --x --y --w --h), so
   the box stays on the gear at any size as long as the photo keeps its 3:4 crop. */
.sel {
  --c: var(--accent); --L: clamp(10px, 1.6vw, 20px); --t: 2px;
  position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%);
  width: calc(var(--w) * 100%); height: calc(var(--h) * 100%);
  background:
    linear-gradient(var(--c) 0 0) left top / var(--L) var(--t), linear-gradient(var(--c) 0 0) left top / var(--t) var(--L),
    linear-gradient(var(--c) 0 0) right top / var(--L) var(--t), linear-gradient(var(--c) 0 0) right top / var(--t) var(--L),
    linear-gradient(var(--c) 0 0) left bottom / var(--L) var(--t), linear-gradient(var(--c) 0 0) left bottom / var(--t) var(--L),
    linear-gradient(var(--c) 0 0) right bottom / var(--L) var(--t), linear-gradient(var(--c) 0 0) right bottom / var(--t) var(--L);
  background-repeat: no-repeat;
  outline: 1px solid var(--sel-edge); outline-offset: -1px;
  pointer-events: none;
}
.sel.lock { --c: var(--lock); outline: 1px dashed var(--lock-edge); }
.sel i {
  position: absolute; left: 0; bottom: 100%; margin-bottom: 5px;
  font: 500 12px/1.2 var(--mono); font-style: normal; white-space: nowrap;
  padding: 4px 7px; background: var(--ink-9); color: var(--accent); border-radius: 2px;
}
.sel.lock i { color: var(--mist-0); }
.portrait .sel i { font-size: 13px; }

/* The headline words get the same brackets, so the page teaches the gesture before the photos do. The
   brackets sit on a pseudo-element hugging the glyphs (cap height to just under the baseline), not on
   the inline box, so the lines above and below never run into them. */
.bx { position: relative; white-space: nowrap; margin-inline: 0.06em; }
.bx::before {
  --c: var(--accent); --L: 0.2em; --t: 0.05em;
  content: ""; position: absolute; left: -0.12em; right: -0.12em; top: var(--bx-top, 0.06em); bottom: var(--bx-bottom, 0.02em);
  background:
    linear-gradient(var(--c) 0 0) left top / var(--L) var(--t), linear-gradient(var(--c) 0 0) left top / var(--t) var(--L),
    linear-gradient(var(--c) 0 0) right top / var(--L) var(--t), linear-gradient(var(--c) 0 0) right top / var(--t) var(--L),
    linear-gradient(var(--c) 0 0) left bottom / var(--L) var(--t), linear-gradient(var(--c) 0 0) left bottom / var(--t) var(--L),
    linear-gradient(var(--c) 0 0) right bottom / var(--L) var(--t), linear-gradient(var(--c) 0 0) right bottom / var(--t) var(--L);
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Motion: the frieze hangs, then each bracket acquires its target; on hover the box tightens, the
   way the Studio's selection snaps to a part. All of it only when the visitor allows motion. */
@media (prefers-reduced-motion: no-preference) {
  .frieze li { animation: hang .9s var(--ease) both; }
  .frieze li:nth-child(2) { animation-delay: .08s; }
  .frieze li:nth-child(3) { animation-delay: .16s; }
  .frieze li:nth-child(4) { animation-delay: .24s; }
  .frieze .sel { animation: acquire .7s var(--ease) both; transition: scale .35s var(--ease); }
  .frieze li:nth-child(1) .sel { animation-delay: .55s; }
  .frieze li:nth-child(2) .sel { animation-delay: .7s; }
  .frieze li:nth-child(3) .sel { animation-delay: .85s; }
  .frieze li:nth-child(4) .sel { animation-delay: 1s; }
  .frieze a:hover .sel, .frieze a:focus-visible .sel { scale: 0.96; }
  @supports (animation-timeline: view()) {
    .portrait .sel { animation: acquire linear both; animation-timeline: view(); animation-range: entry 20% cover 40%; }
  }
  @keyframes hang { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes acquire { from { opacity: 0; transform: scale(1.14); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .signin { transition: none; }
}

@media (max-width: 900px) {
  .hero-copy, .split, .band-row { grid-template-columns: minmax(0, 1fr); }
  .split.flip .portrait { order: 0; }
  .split .portrait, .band .portrait { max-width: 520px; }
  .how li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-name { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .top { padding-block: 10px; }
  .frieze { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frieze .cap { font-size: 15px; padding: 9px 10px 10px; }
  .sel { --L: 10px; }
  .frieze .sel i { font-size: 11px; padding: 3px 5px; }
  .foot { grid-template-columns: minmax(0, 1fr); }
}
