/* ==========================================================================
   onllm.dev - "Intelligence, shaped."
   One field of points that takes six shapes; one cloth of threads that
   takes shape as you work with us. Dye (VAT) tints the whole studio.
   ========================================================================== */

@property --dye { syntax: '<color>'; inherits: true; initial-value: #a873ff; }
@property --dye-deep { syntax: '<color>'; inherits: true; initial-value: #522aa8; }
@property --dye-light { syntax: '<color>'; inherits: true; initial-value: #e2d1ff; }

:root {
  --ink: #090c18;
  --ink-2: #0e1324;
  --ink-3: #151b31;
  --ink-line: rgba(220, 228, 255, .10);
  --on-ink: #eef0f7;
  --on-ink-2: #a3a9c2;
  --on-ink-3: #6e7591;
  --paper: #efece5;
  --paper-2: #e6e2d8;
  --paper-3: #f7f5f0;
  --paper-line: rgba(20, 22, 32, .12);
  --on-paper: #11131b;
  --on-paper-2: #4d5163;
  --on-paper-3: #7d8193;

  --dye: #a873ff;
  --dye-deep: #522aa8;
  --dye-light: #e2d1ff;

  --live: #3fbf6a;
  --beta: #e9a93a;
  --soon: #8b90a6;

  --f-sans: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-serif: 'Instrument Serif', 'Times New Roman', serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* motion tokens */
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-inout: cubic-bezier(.65, 0, .35, 1);
  --e-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .22s;
  --t-med: .55s;
  --t-slow: 1.1s;

  --rail: 88px;
  --pad: clamp(20px, 4.4vw, 72px);
  --maxw: 1440px;

  transition: --dye .9s var(--e-inout), --dye-deep .9s var(--e-inout), --dye-light .9s var(--e-inout);
}

html[data-dye="cobalt"]     { --dye: #4d6bff; --dye-deep: #1f33b0; --dye-light: #b9c6ff; }
html[data-dye="periwinkle"] { --dye: #8f97ff; --dye-deep: #3f3fb0; --dye-light: #dadcff; }
html[data-dye="ember"]      { --dye: #ff6a3d; --dye-deep: #a8331a; --dye-light: #ffcdb9; }
html[data-dye="saffron"]    { --dye: #f2b134; --dye-deep: #7d5200; --dye-light: #ffe2a4; }
html[data-dye="rose"]       { --dye: #ff5a8a; --dye-deep: #9c1d4b; --dye-light: #ffc6d7; }
html[data-dye="violet"]     { --dye: #a873ff; --dye-deep: #522aa8; --dye-light: #e2d1ff; }

/* --------------------------------------------------------------------------
   THEME - semantic tokens. "ink" sections swap to a cool light paper in light
   mode, while the existing paper sections warm up slightly so the rhythm of
   the page survives. The belief section stays saturated in both.
   -------------------------------------------------------------------------- */
:root {
  --bg: var(--ink);
  --fg: var(--on-ink);
  --fg-2: var(--on-ink-2);
  --fg-3: var(--on-ink-3);
  --line: var(--ink-line);
  --card: rgba(21, 27, 49, .86);
  --card-2: rgba(9, 12, 24, .9);
  --card-solid: rgba(9, 12, 24, .78);
  --glass: rgba(14, 19, 36, .6);
  --field: rgba(255, 255, 255, .05);
  --field-2: rgba(255, 255, 255, .07);
  --mark-1: var(--dye-light);
  --mark-2: var(--dye);
  --mark-3: #20263f;
  --accent: var(--dye-light);
  --scrim: 9, 12, 24;
}

html[data-theme="light"] {
  --ink: #f6f5f1;
  --ink-2: #eceef5;
  --ink-3: #e3e7f0;
  --ink-line: rgba(17, 19, 27, .14);
  --on-ink: #11131b;
  --on-ink-2: #454a5b;
  --on-ink-3: #5f6577;

  --paper: #f2f0eb;
  --paper-2: #e8e5de;
  --paper-3: #fffdfa;
  --paper-line: rgba(17, 19, 27, .15);
  --on-paper: #11131b;
  --on-paper-2: #454a5b;
  --on-paper-3: #5f6577;

  --card: rgba(255, 255, 255, .72);
  --card-2: rgba(255, 255, 255, .62);
  --card-solid: rgba(250, 249, 245, .82);
  --glass: rgba(255, 255, 255, .62);
  --field: rgba(17, 19, 27, .045);
  --field-2: rgba(17, 19, 27, .07);
  --mark-1: var(--dye-deep);
  --mark-2: var(--dye);
  --mark-3: #b9bac6;

  --live: #1f7a42;
  --beta: #8a5e00;
  --soon: #5f6577;

  --accent: var(--dye-deep);
  --scrim: 246, 245, 241;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea { font: inherit; color: inherit; }
::selection { background: var(--dye); color: #fff; }
:focus-visible { outline: 2px solid var(--dye); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--dye); color: #fff; padding: 10px 14px; border-radius: 10px; transition: top .2s; }
.skip:focus { top: 12px; }

.mono { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.dash { display: inline-block; width: 28px; height: 1px; background: currentColor; opacity: .45; vertical-align: middle; margin: 0 10px; }
.eyebrow { margin: 0 0 22px; color: var(--dye); }
[data-tone="paper"] .eyebrow { color: var(--dye-deep); }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

/* ---------- section titles ---------- */
.sec-title {
  font-weight: 600;
  font-size: clamp(2.6rem, 6.6vw, 6.4rem);
  line-height: .95;
  letter-spacing: -.045em;
  margin: 0;
}
.sec-title em { font-size: 1.08em; color: var(--accent); padding-right: .04em; }
[data-tone="paper"] .sec-title em { color: var(--dye-deep); }
.sec-lede { max-width: 34ch; font-size: clamp(1.05rem, 1.35vw, 1.25rem); color: var(--on-ink-2); margin: 26px 0 0; }
[data-tone="paper"] .sec-lede { color: var(--on-paper-2); }

/* split lines */
[data-split] .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .line > .li { display: inline-block; will-change: transform; }
.js [data-split] .line > .li { transform: translateY(110%) rotate(2deg); transition: transform 1.2s var(--e-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-split].is-in .line > .li { transform: none; }
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--e-out), transform 1.1s var(--e-out); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- buttons ---------- */
.btn {
  --h: 56px;
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  height: var(--h); padding: 0 8px 0 26px; border-radius: 999px;
  font-weight: 500; font-size: 16px; letter-spacing: -.01em;
  isolation: isolate; overflow: hidden;
  transition: transform .5s var(--e-out), background-color .3s, color .3s;
}
.btn::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; transform: translateY(101%); transition: transform .5s var(--e-out); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:active { transform: scale(.96); }
.btn-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-style: normal; transition: transform .5s var(--e-out); }
.btn:hover .btn-arrow { transform: translateX(3px) rotate(-8deg); }
.btn--dye { background: var(--dye); color: #fff; }
.btn--dye::before { background: #fff; }
.btn--dye:hover { color: var(--ink); }
html[data-theme="light"] .btn--dye::before { background: var(--on-ink); }
.btn--dye .btn-arrow { background: rgba(255,255,255,.18); }
.btn--ghost { color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); background: rgba(var(--scrim), .35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn--ghost::before { background: var(--fg); }
.btn--ghost:hover { color: var(--bg); }
.btn--ghost .btn-arrow { box-shadow: inset 0 0 0 1px var(--line); }
.btn--ink { background: var(--on-paper); color: var(--paper-3); }
.btn--ink::before { background: var(--dye); }
.btn--ink .btn-arrow { background: rgba(255,255,255,.12); }
.link { border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: color .25s; }
.link:hover { color: var(--dye-deep); }

/* ---------- intro ---------- */
.intro { display: none; }
.js .intro {
  position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px;
  background: var(--ink); color: var(--on-ink);
  transition: clip-path 1.1s var(--e-inout), visibility 0s 1.2s;
  clip-path: inset(0 0 0 0);
}
.js .intro.is-done { clip-path: inset(0 0 100% 0); visibility: hidden; }
.intro-mark { font-weight: 600; font-size: clamp(2.4rem, 7vw, 5rem); letter-spacing: -.05em; display: flex; gap: .06em; }
.intro-mark span { display: inline-block; animation: introUp 1s var(--e-out) both; }
.intro-mark span:nth-child(2) { animation-delay: .08s; }
.intro-mark i { font-family: var(--f-serif); font-weight: 400; color: var(--dye); animation: introUp 1s .16s var(--e-out) both; margin-left: .03em; }
.intro-mark .im-dot { font-family: var(--f-sans); font-style: normal; font-weight: 600; letter-spacing: 0; color: var(--dye); margin: 0 .07em 0 .03em; animation: introUp 1s .16s var(--e-out) both; }
.intro-count { display: flex; gap: 14px; align-items: baseline; font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-3); }
.intro-count b { color: var(--on-ink); font-weight: 500; min-width: 2ch; }
@keyframes introUp { from { transform: translateY(60%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .js .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 140; pointer-events: none; mix-blend-mode: difference; }
  .js body.has-cursor, .js body.has-cursor a, .js body.has-cursor button { cursor: none; }
  .js body.has-cursor input, .js body.has-cursor textarea { cursor: text; }
  .cursor-dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }
  .cursor-ring { position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); display: grid; place-items: center; transition: width .45s var(--e-out), height .45s var(--e-out), margin .45s var(--e-out), background-color .3s; }
  .cursor-label { font-style: normal; font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .2s; }
  .cursor.is-hover .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .cursor.is-label .cursor-ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: #fff; }
  .cursor.is-label .cursor-label { opacity: 1; }
  .cursor.is-down .cursor-ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
}

/* ---------- rail (desktop) ---------- */
.rail { display: none; }
@media (min-width: 1024px) {
  body { padding-left: var(--rail); }
  .rail {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail); z-index: 60;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    padding: 26px 0 22px; background: color-mix(in oklab, var(--ink) 92%, transparent); border-right: 1px solid var(--line);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .rail-logo img { width: 30px; height: 30px; border-radius: 8px; transition: transform .6s var(--e-spring); }
  .rail-logo:hover img { transform: rotate(-12deg) scale(1.08); }
  .rail { row-gap: 24px; }
  .rail > .rail-tools { flex-shrink: 0; gap: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .rail-nav { display: flex; flex: 1; min-height: 0; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 1.5vh, 16px); }
  .rail-nav a {
    position: relative; writing-mode: vertical-rl; transform: rotate(180deg);
    font-size: 14px; letter-spacing: .02em; color: var(--on-ink-3); transition: color .3s;
  }
  .rail-nav a::after {
    content: ''; position: absolute; right: -14px; top: 0; width: 1px; height: 100%;
    background: var(--dye); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--e-out);
  }
  .rail-nav a:hover { color: var(--on-ink); }
  .rail-nav a.is-on { color: var(--on-ink); }
  .rail-nav a.is-on::after { transform: scaleY(1); }
  .rail-start {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--on-ink-2); padding: 14px 0 0; border-bottom: 1px solid var(--ink-line); transition: color .3s;
  }
  .rail-start:hover { color: var(--dye); }
  .mbar, .menu { display: none !important; }
}

@media (min-width: 1024px) and (max-height: 800px) {
  .rail { row-gap: 12px; padding-top: 16px; padding-bottom: 16px; }
  .rail > .rail-tools { gap: 24px; padding-bottom: 12px; }
  .rail .rail-nav { gap: 4px; }
  .rail .rail-nav a { font-size: 13px; }
  .rail-start { font-size: 9.5px; letter-spacing: .14em; }
}

/* Dye */
.vat { display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-3); }
.vat-dot {
  position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--dye);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--dye) 22%, transparent), 0 0 24px color-mix(in oklab, var(--dye) 60%, transparent);
  transition: transform .5s var(--e-spring);
}
.vat-dot::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed color-mix(in oklab, var(--dye) 55%, transparent); animation: spin 9s linear infinite; }
.vat:hover .vat-dot { transform: scale(1.18); }
.vat:active .vat-dot { transform: scale(.85); }
.vat.is-dipping .vat-dot { animation: dip .7s var(--e-out); }
@keyframes dip { 0% { transform: scale(1); } 35% { transform: scale(.55) translateY(4px); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
.dye-wash { position: fixed; z-index: 130; width: 40px; height: 40px; border-radius: 50%; pointer-events: none; background: var(--dye); mix-blend-mode: color; opacity: .55; transform: translate(-50%, -50%) scale(0); animation: wash 1s var(--e-out) forwards; }
@keyframes wash { to { transform: translate(-50%, -50%) scale(90); opacity: 0; } }

/* theme change uses a circular reveal driven from landing.js */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* THEME TOGGLE */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 40px; height: 40px; border-radius: 50%; color: var(--on-ink-2);
  box-shadow: inset 0 0 0 1px var(--ink-line);
  transition: color .3s, box-shadow .3s, background-color .3s, transform .5s var(--e-spring);
}
.theme-toggle:hover { color: var(--on-ink); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--dye) 55%, transparent); }
.theme-toggle:active { transform: scale(.92); }
.tt-ico { width: 19px; height: 19px; overflow: visible; }
.tt-core { transition: r .6s var(--e-spring), transform .7s var(--e-out), fill .3s; transform-origin: center; }
.tt-cut { transition: transform .6s var(--e-out); }
.tt-rays { stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; transform-origin: center; transition: opacity .4s, transform .7s var(--e-out); }
/* dark mode: a moon; light mode: a sun */
html[data-theme="dark"] .tt-cut { transform: translate(-6.4px, 3.4px); }
html[data-theme="light"] .tt-cut { transform: translate(15px, -6px); }
html[data-theme="light"] .tt-rays { opacity: 1; transform: rotate(0deg); }
html[data-theme="dark"] .tt-rays { opacity: 0; transform: rotate(-45deg) scale(.6); }
html[data-theme="light"] .tt-core { r: 5.1; }
html[data-theme="dark"] .tt-core { r: 7; }
.rail-tools { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.theme-toggle--bar { width: 44px; height: 44px; }
.theme-toggle--menu {
  width: 100%; height: 44px; justify-content: flex-start; gap: 14px; padding: 0 4px; border-radius: 10px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-2);
  box-shadow: none;
}
.theme-toggle--menu:hover { color: var(--on-ink); box-shadow: none; }

/* ---------- mobile bar + menu ---------- */
.mbar {
  position: fixed; inset: 0 0 auto 0; z-index: 70; height: 62px; padding: 0 16px 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--fg);
  /* clean glass: tint is sampled from whatever section is underneath */
  background: color-mix(in srgb, var(--bar-tint, #090c18) 68%, transparent);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: transform .5s var(--e-out);
}
.mbar.is-hidden { transform: translateY(-100%); }
.mbar-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.03em; font-size: 18px; }
.mbar-logo img { border-radius: 7px; }
.mbar-logo i { font-family: var(--f-serif); font-weight: 400; color: var(--dye); margin-left: .02em; }
.mbar-logo .mb-dot { font-family: var(--f-sans); font-style: normal; font-weight: 600; letter-spacing: 0; color: var(--dye); margin: 0 .05em 0 .02em; }
.mbar-actions { display: flex; align-items: center; gap: 8px; }
.vat--bar { width: 44px; height: 44px; justify-content: center; border-radius: 50%; }
.vat--bar .vat-dot { width: 18px; height: 18px; }
.mbar-menu { width: 44px; height: 44px; display: grid; place-content: center; gap: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.mbar-menu span:not(.sr) { display: block; width: 18px; height: 1.5px; background: var(--fg); transition: transform .45s var(--e-out); }
.mbar-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
.mbar-menu[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 65; background: var(--bg); padding: 96px 24px 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: circle(0 at calc(100% - 38px) 31px); transition: clip-path .8s var(--e-inout);
}
.menu[hidden] { display: flex; visibility: hidden; }
.menu.is-open { clip-path: circle(150% at calc(100% - 38px) 31px); visibility: visible; }
.menu { gap: 24px; overflow-y: auto; }
.menu > * { flex-shrink: 0; }
.menu-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.menu-controls .theme-toggle { margin-left: 0; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { display: flex; align-items: baseline; gap: 16px; font-size: clamp(2.2rem, 10vw, 3.4rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.12; padding: 6px 0; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(30px); transition: opacity .6s var(--e-out), transform .7s var(--e-out), color .2s; }
.menu.is-open nav a { opacity: 1; transform: none; }
.menu nav a:nth-child(2) { transition-delay: .05s; } .menu nav a:nth-child(3) { transition-delay: .1s; } .menu nav a:nth-child(4) { transition-delay: .15s; } .menu nav a:nth-child(5) { transition-delay: .2s; } .menu nav a:nth-child(6) { transition-delay: .25s; color: var(--dye); }
.menu nav a:active { color: var(--dye); }
.menu nav small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--on-ink-3); font-weight: 400; }
.menu-foot { display: flex; flex-direction: column; gap: 18px; color: var(--on-ink-2); }
.vat--menu { flex-direction: row; gap: 14px; font-size: 11px; color: var(--on-ink-2); min-height: 44px; }
.vat--menu b { color: var(--dye); font-weight: 500; }

/* ==========================================================================
   01 HERO
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh; display: grid;
  grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); padding: 32px var(--pad) 28px;
  overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 70% 40%, var(--ink-2), var(--ink) 70%);
}
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; touch-action: pan-y; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(var(--scrim), .82) 0%, rgba(var(--scrim), .35) 42%, transparent 70%), linear-gradient(0deg, rgba(var(--scrim), .75), transparent 28%); }
html[data-theme="light"] .hero { background: radial-gradient(ellipse 25% 35% at 92% 18%, rgba(255,255,255,.9), transparent 75%), radial-gradient(ellipse 65% 80% at 78% 38%, color-mix(in srgb, var(--dye-light) 65%, transparent), transparent 72%), #faf9f6; }
html[data-theme="light"] .field { mix-blend-mode: multiply; }
html[data-theme="light"] .hero-scrim { background: linear-gradient(90deg, rgba(var(--scrim), .9) 0%, rgba(var(--scrim), .5) 44%, transparent 74%), linear-gradient(0deg, rgba(var(--scrim), .88), transparent 34%); }
.hero-top { display: flex; justify-content: space-between; color: var(--fg-3); pointer-events: none; }
.hero-top p { margin: 0; }
.hero-copy { align-self: center; max-width: 1100px; padding: 6vh 0 4vh; pointer-events: none; }
.hero-copy a, .hero-copy button { pointer-events: auto; }
.hero-title { margin: 0; font-weight: 600; font-size: clamp(3.1rem, 8.2vw, 9.4rem); line-height: .9; letter-spacing: -.055em; }
.hero-title em { color: var(--accent); font-size: 1.06em; }
.hero-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 26px; color: var(--on-ink-2); }
.hero-lede { display: flex; align-items: flex-start; gap: clamp(24px, 4vw, 64px); margin-top: 34px; }
.hero-angle { margin: 0; flex: none; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.1; color: var(--accent); }
.hero-sub { max-width: 40ch; margin: 0; font-size: clamp(1.05rem, 1.35vw, 1.28rem); color: var(--on-ink-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; border-top: 1px solid var(--ink-line); padding-top: 20px; }
.hero-facts { margin: 0; color: var(--on-ink-2); font-size: 15px; }
.hero-facts b { color: var(--on-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-facts i { font-style: normal; color: var(--on-ink-3); margin: 0 8px; }
.hero-scroll { position: absolute; right: var(--pad); top: 50%; writing-mode: vertical-rl; color: var(--on-ink-3); display: flex; align-items: center; gap: 12px; }
.hero-scroll span { width: 1px; height: 56px; background: linear-gradient(var(--dye), transparent); animation: drip 2.4s var(--e-inout) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* modes */
.modes { pointer-events: auto; min-width: 0; max-width: 100%; }
.hero-foot > * { min-width: 0; }
.modes-hint { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--on-ink-2); }
.hint-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dye); box-shadow: 0 0 0 0 var(--dye); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--dye) 70%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.hint-touch { display: none; }
@media (hover: none) { .hint-pointer { display: none; } .hint-touch { display: inline; } }
.modes-row { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.modes-row button {
  position: relative; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; color: var(--on-ink-2); overflow: hidden;
  transition: color .3s, background-color .3s;
}
.modes-row button i { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 1.5px; background: var(--dye); transform: scaleX(var(--prog, 0)); transform-origin: left; border-radius: 2px; }
.modes-row button:hover { color: var(--on-ink); }
.modes-row button[aria-pressed="true"] { color: var(--ink); background: var(--on-ink); }
.modes-row button[aria-pressed="true"] i { background: var(--dye); }
.modes-pause { width: 40px; padding: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; gap: 4px; }
.modes-pause span { width: 2px; height: 11px; background: currentColor; border-radius: 1px; }
.modes-pause[aria-pressed="true"] span:first-child { width: 0; height: 0; background: none; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.modes-pause[aria-pressed="true"] span:last-child { display: none; }
.modes-meta { display: flex; justify-content: space-between; margin: 10px 4px 0; color: var(--on-ink-3); font-size: 10.5px; }

/* ==========================================================================
   THESIS (pinned)
   ========================================================================== */
[data-pin] { position: relative; }
.thesis { height: 420vh; background: var(--ink); }
.pin-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.thesis .pin-stage { padding: 12vh var(--pad) 8vh; display: grid; grid-template-rows: auto 1fr auto auto; }
.thesis-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.thesis-title { font-weight: 500; font-size: clamp(2.2rem, 4.8vw, 4.6rem); line-height: 1.02; letter-spacing: -.04em; margin: 0; }
.thesis-aside { max-width: 22ch; color: var(--on-ink-2); margin: 10px 0 0; }
.thesis-words { position: relative; display: grid; align-items: center; }
.tw {
  grid-area: 1 / 1; margin: 0; font-weight: 500; font-size: clamp(3.4rem, 9.2vw, 10rem); line-height: .9; letter-spacing: -.06em;
  color: var(--accent); padding-left: 0; position: relative; z-index: 1;
  opacity: 0; filter: blur(14px); transform: translateY(18%) scale(.96);
  transition: opacity .7s var(--e-out), filter .8s var(--e-out), transform .9s var(--e-out);
}
.tw em { color: var(--dye); font-size: 1.05em; }
.tw.is-on { opacity: 1; filter: none; transform: none; }
.tw.is-past { opacity: 0; filter: blur(10px); transform: translateY(-16%) scale(1.02); }
.thesis-rule { height: 1px; background: var(--ink-line); margin: 0 0 24px; }
.thesis-rule span { display: block; height: 100%; background: var(--dye); transform-origin: left; transform: scaleX(var(--p, 0)); }
.thesis-caps { position: relative; min-height: 3.2em; padding-left: 0; }
.becoming { position: absolute; right: var(--pad); top: 50%; width: min(42vw, 600px); aspect-ratio: 1; transform: translateY(-46%); pointer-events: none; }
.thesis-caps p { position: absolute; margin: 0; max-width: 46ch; color: var(--on-ink-2); opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .6s var(--e-out); }
.thesis-caps p.is-on { opacity: 1; transform: none; }
.thesis-count { position: absolute; right: var(--pad); bottom: 8vh; color: var(--on-ink-3); }
.thesis-count b { color: var(--on-ink); font-weight: 500; }
.thesis-phases, .thesis-nudge { display: none; }

/* ==========================================================================
   BELIEF (dye environment)
   ========================================================================== */
.belief {
  position: relative; padding: 16vh var(--pad) 12vh; overflow: hidden;
  background: var(--dye-deep); color: #fff;
}
.belief::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 72% 40%, color-mix(in oklab, var(--dye) 70%, transparent), transparent 70%); pointer-events: none; }
.belief-grid { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: auto 1fr; gap: 0 40px; min-height: 64vh; }
.belief-title { grid-column: 1; grid-row: 1 / 3; margin: 0; font-weight: 600; font-size: clamp(2.8rem, 6.4vw, 6.6rem); line-height: .94; letter-spacing: -.05em; }
.belief-title .accent { color: var(--dye-light); }
.belief-aside { grid-column: 2; grid-row: 1; justify-self: end; max-width: 30ch; margin: 0; color: rgba(255,255,255,.82); font-size: 17px; }
.orbits { grid-column: 2; grid-row: 2; position: relative; align-self: center; justify-self: center; width: min(560px, 100%); aspect-ratio: 1; }
.orbits svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbits ellipse { fill: none; stroke: rgba(255,255,255,.38); stroke-width: 1; transition: stroke .4s, stroke-width .4s; vector-effect: non-scaling-stroke; }
.orbits .sat { fill: #fff; transition: r .3s; }
.orbits .orb.is-hot ellipse { stroke: var(--dye-light); stroke-width: 2; }
.orbits .orb.is-hot .sat { fill: var(--dye-light); }
.orb-label { position: absolute; left: 0; top: 0; font-size: 13px; white-space: nowrap; color: #fff; transform: translate(-50%, -150%); pointer-events: none; transition: color .3s; }
.orb-label.is-hot { color: var(--dye-light); }
.orbits-core {
  position: absolute; left: 50%; top: 50%; width: 31%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%) scale(var(--core, 1)); background: var(--dye-light); color: var(--dye-deep);
  display: grid; place-items: center; text-align: center; font-size: clamp(14px, 1.5vw, 19px); line-height: 1.15; font-weight: 500;
  box-shadow: 0 0 80px color-mix(in oklab, var(--dye-light) 45%, transparent); transition: transform .8s var(--e-spring);
}
.tenets { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin-top: 7vh; }
.tenet { text-align: left; display: grid; gap: 12px; padding: 22px 0 6px; border-top: 1px solid rgba(255,255,255,.28); position: relative; }
.tenet::before { content: ''; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--dye-light); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--e-out); }
.tenet.is-hot::before { transform: none; }
.tenet-n { color: rgba(255,255,255,.6); }
.tenet-t { font-size: clamp(1.25rem, 1.7vw, 1.6rem); font-weight: 600; letter-spacing: -.025em; transition: color .3s; }
.tenet.is-hot .tenet-t { color: var(--dye-light); }
.tenet-d { color: rgba(255,255,255,.8); max-width: 38ch; font-size: 15.5px; }

/* ==========================================================================
   02 SERVICES (cloth)
   ========================================================================== */
.services { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; background: var(--ink); padding: 14vh var(--pad) 10vh; }
.cloth { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; touch-action: pan-y; }
.cloth-labels { position: absolute; left: var(--pad); right: var(--pad); bottom: 22px; display: flex; justify-content: space-between; color: var(--on-ink-3); pointer-events: none; font-size: 10.5px; }
.cloth-labels::before { content: ''; position: absolute; left: 90px; right: 90px; top: 50%; height: 1px; background: var(--ink-line); }
.services-inner { position: relative; display: grid; grid-template-columns: 1fr; gap: 7vh; pointer-events: none; }
.services-inner .loom, .services-inner .loom * { pointer-events: auto; }
.services-head { max-width: 900px; }
.services .sec-lede { max-width: 44ch; }
.loom { display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr); gap: 4vw; align-items: stretch; }
.loom-threads { display: flex; flex-direction: column; justify-content: space-between; }
.loom-threads button {
  position: relative; display: flex; align-items: baseline; gap: 18px; text-align: left;
  padding: 15px 0 15px 20px; font-size: clamp(1.1rem, 1.6vw, 1.5rem); font-weight: 500; letter-spacing: -.02em; color: var(--on-ink-3);
  transition: color .35s, padding .5s var(--e-out);
  isolation: isolate; /* the thread sits behind the text, never on top of it */
}
.loom-threads button::before { /* the thread */
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: repeating-linear-gradient(90deg, var(--ink-line) 0 10px, transparent 10px 14px);
  z-index: -1;
}
.loom-threads button::after { content: ''; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--on-ink-3); transition: background .3s, transform .5s var(--e-spring); }
.loom-threads button b {
  position: relative; z-index: 1; font-family: var(--f-mono); font-size: 11px; font-weight: 400; letter-spacing: .1em; color: var(--on-ink-3);
  padding-right: 6px;
  text-shadow: 0 0 2px var(--bg), 0 0 4px var(--bg), 0 0 8px var(--bg);
  transition: color .3s, font-weight .3s;
}
.loom-threads button span { position: relative; z-index: 1; text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg), 0 0 10px var(--bg); transition: transform .5s var(--e-out); }
.loom-threads button:hover { color: var(--on-ink-2); }
.loom-threads button[aria-selected="true"] { color: var(--on-ink); padding-left: 32px; }
.loom-threads button[aria-selected="true"]::before { background: linear-gradient(90deg, var(--dye), transparent); height: 1.5px; }
.loom-threads button[aria-selected="true"]::after { background: var(--dye); transform: scale(1.6); box-shadow: 0 0 18px var(--dye); }
.loom-threads button[aria-selected="true"] b {
  color: var(--fg); font-weight: 600;
  text-shadow: 0 0 2px var(--bg), 0 0 4px var(--bg), 0 0 8px var(--bg), 0 0 12px var(--bg);
}
.loom-panel { position: relative; display: grid; min-height: 330px; }
.swatch {
  grid-area: 1 / 1; padding: clamp(24px, 3vw, 42px); border-radius: 22px;
  background: linear-gradient(160deg, var(--card), var(--card-2)); box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px -30px rgba(0,0,0,.7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(24px) rotate(-1deg); visibility: hidden;
  transition: opacity .5s var(--e-out), transform .7s var(--e-out), visibility 0s .5s;
}
.swatch.is-on { opacity: 1; transform: none; visibility: visible; transition-delay: .08s, .08s, 0s; }
.swatch::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(90deg, transparent 0 7px, color-mix(in oklab, var(--dye) 9%, transparent) 7px 8px), repeating-linear-gradient(0deg, transparent 0 7px, color-mix(in oklab, var(--dye) 6%, transparent) 7px 8px); -webkit-mask: linear-gradient(130deg, #000, transparent 55%); mask: linear-gradient(130deg, #000, transparent 55%); pointer-events: none; }
.swatch-n { color: var(--dye); margin: 0 0 40px; }
.swatch h3 { margin: 0 0 16px; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1; letter-spacing: -.04em; font-weight: 600; }
.swatch > p:not(.swatch-n):not(.swatch-tags) { margin: 0; color: var(--on-ink-2); max-width: 44ch; font-size: 17px; }
.swatch-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; }
.swatch-tags span { padding: 7px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--ink-line); color: var(--on-ink-2); font-size: 10.5px; }
.cloth-hint { position: absolute; right: 0; bottom: -6vh; display: flex; align-items: center; gap: 12px; color: var(--on-ink-2); background: color-mix(in oklab, var(--dye) 22%, transparent); padding: 6px 12px 6px 6px; border-radius: 999px; font-size: 10.5px; }
.hint-ring { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--on-ink-2); position: relative; }
.hint-ring::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; left: 50%; top: 50%; margin: -2.5px; animation: orbitDot 2.6s linear infinite; }
@keyframes orbitDot { from { transform: rotate(0) translateX(7px); } to { transform: rotate(360deg) translateX(7px); } }

/* ==========================================================================
   paper sections + sheet unfold
   ========================================================================== */
[data-tone="paper"] { position: relative; color: var(--on-paper); isolation: isolate; }
.sheet { position: absolute; inset: 0; z-index: -1; background: var(--paper); clip-path: inset(0 calc(var(--fold, 0) * 6%) 0 calc(var(--fold, 0) * 6%) round calc(var(--fold, 0) * 56px) calc(var(--fold, 0) * 56px) 0 0); }
.sheet::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: repeating-linear-gradient(-45deg, var(--dye) 0 2px, transparent 2px 7px); opacity: .9; }

/* ==========================================================================
   03 WORK
   ========================================================================== */
.work { padding: 16vh 0 10vh; background: var(--ink); }
.work-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; padding: 0 var(--pad); }
.work-head .eyebrow { grid-column: 1 / -1; }
.work-side p { margin: 0; color: var(--on-paper-2); max-width: 36ch; }
.legend { display: flex; gap: 18px; margin-top: 18px !important; }
.st { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st--live { color: var(--live); } .st--beta { color: var(--beta); } .st--soon { color: var(--soon); }
.st--live::before { animation: pulseLive 2s infinite; }
@keyframes pulseLive { 0% { box-shadow: 0 0 0 0 rgba(63,191,106,.6); } 100% { box-shadow: 0 0 0 7px transparent; } }

.work-filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 var(--pad); margin: 7vh 0 28px; }
.work-filters button { height: 42px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--paper-line); font-size: 14px; color: var(--on-paper-2); transition: background-color .3s, color .3s, box-shadow .3s; }
.work-filters button sup { font-family: var(--f-mono); font-size: 9.5px; margin-left: 3px; }
.work-filters button:hover { box-shadow: inset 0 0 0 1px var(--on-paper); color: var(--on-paper); }
.work-filters button[aria-pressed="true"] { background: var(--on-paper); color: var(--paper-3); box-shadow: none; }

.shelf { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; padding: 10px 0 30px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; touch-action: pan-x pan-y; outline: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf.is-drag { cursor: grabbing; scroll-snap-type: none; }
.shelf.is-drag .spec { pointer-events: none; }
.shelf-track { display: flex; gap: 18px; padding: 0 var(--pad); width: max-content; }
.spec {
  position: relative; width: clamp(280px, 25vw, 360px); flex: none; scroll-snap-align: start; scroll-margin-left: var(--pad);
  display: flex; flex-direction: column; border-radius: 22px; padding: 10px 10px 20px;
  background: var(--paper-3); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 0 0 1px var(--paper-line), 0 22px 50px -32px rgba(17,19,27,.45);
  transition: transform .6s var(--e-out), box-shadow .5s, opacity .5s, width .6s var(--e-out);
  transform: perspective(900px) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
}
.spec:hover { --ty: -8px; box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 0 0 1px color-mix(in oklab, var(--dye) 45%, transparent), 0 40px 70px -36px color-mix(in oklab, var(--dye-deep) 65%, transparent); }
.spec.is-out { display: none; }
.spec header { display: flex; justify-content: space-between; align-items: center; padding: 18px 10px 0; gap: 10px; }
.spec .cat { color: var(--on-paper-3); font-size: 10px; }
.spec h3 { display: flex; align-items: center; gap: 12px; margin: 14px 10px 8px; font-size: 1.6rem; letter-spacing: -.035em; font-weight: 600; }
.spec h3 img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.spec > p { margin: 0 10px; color: var(--on-paper-2); font-size: 14.5px; line-height: 1.5; flex: 1; }
.spec footer { display: flex; gap: 18px; margin: 18px 10px 0; padding-top: 14px; border-top: 1px solid var(--paper-line); font-size: 14px; font-weight: 500; }
.spec footer a { position: relative; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 1023px), (hover: none) {
  .spec footer { gap: 12px; }
  .spec footer a { min-height: 44px; padding: 12px 4px; margin: -12px -4px; }
}
.spec footer a::after { content: '↗'; transition: transform .4s var(--e-out); }
.spec footer a:hover { color: var(--dye-deep); }
.spec footer a:hover::after { transform: translate(2px, -2px); }
.gh { display: inline-flex; align-items: center; align-self: center; gap: 5px; margin: -3px 0 -3px auto; padding: 4px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--paper-line); font-family: var(--f-mono); font-size: 11px; color: var(--on-paper-2); font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gh-sym { font-size: 10px; opacity: .85; }
.gh-sep { opacity: .4; }
/* cards get a stats pill: keep it on the meta row, wrapping only on tiny screens */
.spec footer:has(.gh) { flex-wrap: wrap; row-gap: 4px; }
@media (min-width: 761px) and (max-width: 1179px) {
  .spec footer:has(.gh) { gap: 12px; }
}
@media (max-width: 340px) {
  .spec footer:has(.gh) .gh { margin-left: auto; }
}

/* real product screenshots in a browser frame */
.shot { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--paper-line), 0 14px 30px -22px rgba(17,19,27,.5); isolation: isolate; }
.shot-bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; background: #f1efe9; border-bottom: 1px solid var(--paper-line); }
.shot-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d9d5cb; }
.shot-bar em { flex: 1; margin: 0 6px 0 8px; height: 16px; border-radius: 6px; background: #fff; font-family: var(--f-mono); font-style: normal; font-size: 9px; line-height: 16px; letter-spacing: .02em; color: var(--on-paper-3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform 1.2s var(--e-out); transform-origin: top center; }
.spec:hover .shot img { transform: scale(1.06); }
.shot::after { content: ''; position: absolute; inset: 26px 0 0; background: linear-gradient(160deg, transparent 60%, color-mix(in oklab, var(--dye) 18%, transparent)); opacity: 0; transition: opacity .5s; pointer-events: none; }
.spec:hover .shot::after { opacity: 1; }

.shelf-ctrl { display: flex; align-items: center; gap: 28px; padding: 0 var(--pad); margin-top: 6px; }
.shelf-count { color: var(--on-paper-3); margin: 0; min-width: 72px; }
.shelf-count b { color: var(--on-paper); font-weight: 500; }
.shelf-progress { flex: 1; height: 1px; background: var(--paper-line); }
.shelf-progress span { display: block; height: 100%; background: var(--on-paper); transform-origin: left; transform: scaleX(var(--p, .1)); transition: transform .3s; }
.shelf-arrows { display: flex; gap: 8px; }
.shelf-arrows button { width: 52px; height: 52px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--paper-line); font-size: 18px; transition: background-color .3s, color .3s, transform .4s var(--e-spring); }
.shelf-arrows button:hover { background: var(--on-paper); color: var(--paper-3); }
.shelf-arrows button:active { transform: scale(.9); }
.shelf-arrows button:disabled { opacity: .3; pointer-events: none; }

/* --------------------------------------------------------------------------
   LIGHT MODE - component-level adjustments
   -------------------------------------------------------------------------- */
html[data-theme="light"] .sheet::before { opacity: 1; }
html[data-theme="light"] .intro { background: var(--ink); color: var(--on-ink); }
html[data-theme="light"] .intro-count b { color: var(--on-ink); }
html[data-theme="light"] .spec { box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 0 0 1px var(--paper-line), 0 22px 50px -32px rgba(17,19,27,.28); }
html[data-theme="light"] .spec:hover { box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 0 0 1px color-mix(in oklab, var(--dye-deep) 40%, transparent), 0 40px 70px -36px color-mix(in oklab, var(--dye-deep) 35%, transparent); }
html[data-theme="light"] .mac { box-shadow: 0 0 0 1px rgba(35,28,55,.1), 0 60px 120px -50px color-mix(in srgb, var(--dye-deep) 22%, transparent); }
html[data-theme="light"] .swatch { box-shadow: inset 0 0 0 1px var(--line), 0 30px 70px -40px rgba(17,19,27,.55); }
html[data-theme="light"] .step { box-shadow: inset 0 0 0 1px var(--line), 0 24px 50px -36px rgba(17,19,27,.35); }
html[data-theme="light"] .brief { box-shadow: 0 50px 100px -50px color-mix(in srgb, var(--dye-deep) 20%, transparent); }
html[data-theme="light"] .spec,
html[data-theme="light"] .swatch,
html[data-theme="light"] .step { background-color: #fffdfa; box-shadow: inset 0 0 0 1px rgba(35,28,55,.10), 0 12px 32px -18px color-mix(in srgb, var(--dye-deep) 18%, transparent); }
html[data-theme="light"] .brief-field { opacity: .35; }
html[data-theme="light"] .fld input,
html[data-theme="light"] .fld textarea { background: #fffdfa; }
html[data-theme="light"] .fld input:focus + span,
html[data-theme="light"] .fld textarea:focus + span,
html[data-theme="light"] .fld.has-val span,
html[data-theme="light"] .fld:has(input:focus) span,
html[data-theme="light"] .fld:has(textarea:focus) span { color: var(--dye-deep); }
html[data-theme="light"] .becoming { background: radial-gradient(ellipse, color-mix(in srgb, var(--dye-light) 28%, transparent), transparent 65%); }
html[data-theme="light"] .foot {
  --ink: #151327; --on-ink: #f5f2fc; --on-ink-2: #c7c2d5; --on-ink-3: #aaa3bc;
  --ink-line: rgba(238,231,255,.17); --line: rgba(238,231,255,.2);
  --fg: #f5f2fc; --mark-1: var(--dye-light); --mark-2: var(--dye); --mark-3: #716780;
  color: var(--on-ink);
}
html[data-theme="light"] .btn--dye,
html[data-theme="light"] .news button { background: var(--dye-deep); color: #fff; }
html[data-theme="light"][data-dye="saffron"] .btn--dye,
html[data-theme="light"][data-dye="saffron"] .news button { background: var(--dye); color: #241800; }
html[data-theme="light"][data-dye="saffron"] .btn--dye .btn-arrow { background: rgba(36,24,0,.08); }
html[data-theme="light"] .btn--dye:hover { color: #fff; }
html[data-theme="light"] .foot .news { background: rgba(255,255,255,.035); }
html[data-theme="light"] .foot .news button:hover { background: #fffdfa; color: #151327; }
html[data-theme="light"] .foot-mark .fm-dot { color: var(--dye-deep); }
html[data-theme="light"] .news { box-shadow: inset 0 0 0 1px var(--line); background: rgba(255,255,255,.5); }
html[data-theme="light"] .news button:hover { background: var(--on-ink); color: var(--paper-3); }
html[data-theme="light"] .ph-err,
html[data-theme="light"] .brief-msg.is-bad,
html[data-theme="light"] .news-msg.is-bad { color: #b3261e; }
html[data-theme="light"] .work-filters button[aria-pressed="true"] { background: var(--on-paper); color: var(--paper-3); }
html[data-theme="light"] .shelf-arrows button:hover { background: var(--on-paper); color: var(--paper-3); }
html[data-theme="light"] .btn--ink { background: var(--on-paper); color: var(--paper-3); }
html[data-theme="light"] .spec footer a:hover { color: var(--dye-deep); }
html[data-theme="light"] .mbar-menu span:not(.sr) { background: var(--fg); }
html[data-theme="light"] .hero-facts i { color: var(--fg-3); }
html[data-theme="light"] .st--live { color: #1f7a42; }
html[data-theme="light"] .st--beta { color: #8a5e00; }
html[data-theme="light"] .st--soon { color: #5f6577; }
/* dye used as *text* needs the deep shade on light paper for AA contrast */
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .swatch-n,
html[data-theme="light"] .step-n,
html[data-theme="light"] .tw em,
html[data-theme="light"] .menu nav a:nth-child(6),
html[data-theme="light"] .vat--menu b,
html[data-theme="light"] .rail-start:hover,
html[data-theme="light"] .foot-bottom a:hover,
html[data-theme="light"] .mail:hover { color: var(--dye-deep); }
html[data-theme="light"] .foot-mark .fm-dot { color: var(--dye-deep); }
.shelf-links { display: flex; flex-wrap: wrap; gap: 28px; padding: 0 var(--pad); margin: 40px 0 0; font-size: 15px; }
.shelf-links a { color: var(--on-paper-2); border-bottom: 1px solid var(--paper-line); padding-bottom: 3px; transition: color .25s, border-color .25s; }
.shelf-links a:hover { color: var(--on-paper); border-color: var(--on-paper); }

/* ==========================================================================
   04 ON-DEVICE
   ========================================================================== */
.device { background: var(--paper); padding: 12vh var(--pad) 16vh; }
.device-head { max-width: 1000px; margin-bottom: 9vh; }
.desk { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 5vw; align-items: center; }
.mac {
  position: relative; border-radius: 20px; overflow: hidden; display: flex; justify-content: flex-end; align-items: flex-start; padding: 40px 28px 30px;
  background: #1a1d2c; box-shadow: 0 0 0 1px rgba(17,19,27,.15), 0 60px 120px -50px rgba(17,19,27,.55);
}
.mac-wall { position: absolute; inset: 0; background:
  radial-gradient(70% 60% at 20% 90%, color-mix(in oklab, var(--dye) 75%, #000) , transparent 70%),
  radial-gradient(60% 60% at 90% 10%, color-mix(in oklab, var(--dye-light) 55%, transparent), transparent 70%),
  linear-gradient(160deg, var(--dye-deep), #0c0f1c); }
.mac-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 30px; display: flex; align-items: center; gap: 18px; padding: 0 14px; font-size: 13px; color: #fff; background: rgba(20,22,34,.35); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.mac-bar span:not(.mac-right):not(.mac-tray):not(.mac-apple) { opacity: .85; }
.mac-apple { width: 12px; height: 14px; border-radius: 6px 6px 5px 5px; background: #fff; opacity: .95; }
.mac-right { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.mac-term { position: absolute; left: 22px; bottom: 26px; z-index: 1; width: 372px; max-width: calc(100% - 44px); margin: 0; padding: 0 14px 12px; border-radius: 12px; background: rgba(12,14,24,.8); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 60px -20px rgba(0,0,0,.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #c9cde0; }
.mt-bar { display: flex; align-items: center; gap: 6px; padding: 9px 0 8px; margin: 0 0 6px; border-bottom: 1px solid rgba(255,255,255,.07); font-family: var(--f-mono); font-size: 10.5px; }
.mt-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; } .mt-bar i:nth-child(2) { background: #febc2e; } .mt-bar i:nth-child(3) { background: #28c840; }
.mt-bar span { margin-left: auto; color: #6e7591; }
.mt-out { margin: 0; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', 'Liberation Mono', monospace; font-size: 8.6px; line-height: 1.45; letter-spacing: 0; white-space: pre; overflow: hidden; }
.mt-l { opacity: 0; transition: opacity .25s; }
.device.is-in .mt-l { opacity: 1; }
.mt-out b { color: var(--dye-light); font-weight: 500; }
.mt-caret { display: inline-block; width: 6px; height: 10px; vertical-align: -1px; background: var(--dye-light); animation: blink 1s steps(2) infinite; }
.mac-right .mono { font-size: 11.5px; letter-spacing: .02em; text-transform: none; }
.mac-tray { display: inline-flex; gap: 5px; align-items: center; padding: 2px 8px; border-radius: 5px; background: rgba(255,255,255,.22); font-size: 12px; }
.mac-tray em { font-style: normal; font-family: var(--f-mono); font-size: 11px; }

/* the real onWatch panel, framed as a macOS popover */
.ow-frame {
  position: relative; z-index: 3; display: block; width: 380px; max-width: 100%; height: 640px; border: 0; border-radius: 14px;
  background: #0f0f10; color-scheme: dark;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 40px 80px -20px rgba(0,0,0,.75);
  transform-origin: 85% 0; opacity: 0; transform: translateY(-14px) scale(.96);
  transition: opacity .8s var(--e-out), transform 1s var(--e-out);
}
.device.is-in .ow-frame { opacity: 1; transform: none; }

.desk-copy h3, .pocket-copy h3 { font-size: clamp(2rem, 3.4vw, 3.4rem); line-height: 1; letter-spacing: -.045em; font-weight: 600; margin: 0 0 22px; }
.desk-copy h3 em, .pocket-copy h3 em { color: var(--dye-deep); }
.desk-copy > p, .pocket-copy > p { color: var(--on-paper-2); max-width: 42ch; margin: 0 0 16px; }
.desk-note { color: var(--on-paper-3) !important; font-size: 10.5px; }
.desk-stats { display: flex; flex-wrap: wrap; margin: 0 0 2px; }
.desk-stats .stat { display: flex; flex-direction: column; gap: 3px; padding-right: 22px; margin-right: 22px; border-right: 1px solid var(--paper-line); }
.desk-stats .stat:last-child { padding-right: 0; margin-right: 0; border-right: 0; }
.desk-stats b { color: var(--on-paper); font-size: clamp(1.45rem, 2.2vw, 1.9rem); line-height: 1; letter-spacing: -.035em; font-weight: 600; font-variant-numeric: tabular-nums; }
.desk-stats small { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-paper-3); }
.desk-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 28px !important; }
/* phone-only copy variants; the long forms are the desktop originals */
.dw-short, .dw-copy-short { display: none; }

.pocket { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 6vw; align-items: center; margin-top: 18vh; }
.pocket-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 8px; }
.pocket-tabs button { height: 38px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--paper-line); font-size: 13.5px; color: var(--on-paper-2); transition: background-color .3s, color .3s, box-shadow .3s; }
.pocket-tabs button:hover { color: var(--on-paper); }
.pocket-tabs button[aria-selected="true"] { background: var(--dye-deep); color: #fff; box-shadow: none; }
.onui-code { font-family: var(--f-mono); font-size: .82em; letter-spacing: -.01em; padding: 2px 6px; border-radius: 5px; background: color-mix(in oklab, var(--on-paper) 7%, transparent); box-shadow: inset 0 0 0 1px var(--paper-line); }

/* --------------------------------------------------------------------------
   onUI showcase. The overlay chrome below is a scoped port of the real
   extension styles (variables.css, toolbar.css, onui.css) so the toolbar,
   dialog, markers and region outlines match what ships in the browser.
   -------------------------------------------------------------------------- */
.onui-stage {
  --onui-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --onui-font-size-xs: 11px;
  --onui-font-size-sm: 12px;
  --onui-radius: 6px;
  --onui-radius-full: 9999px;
  --onui-bg: rgba(23, 23, 23, .95);
  --onui-bg-glass: rgba(38, 38, 38, .8);
  --onui-bg-hover: rgba(83, 87, 255, .16);
  --onui-bg-active: rgba(83, 87, 255, .24);
  --onui-border: rgba(255, 255, 255, .1);
  --onui-border-hover: rgba(130, 141, 255, .5);
  --onui-text: #fafafa;
  --onui-text-secondary: #b8bad1;
  --onui-text-muted: #71717a;
  --onui-primary: #5b63ff;
  --onui-primary-hover: #737dff;
  --onui-marker-bg: #5b63ff;
  --onui-marker-text: #fff;
  --onui-success: #22c55e;
  --onui-error: #ef4444;
  --onui-shadow: 0 18px 40px -18px rgba(0, 0, 0, .65);
  --onui-blur: 16px;
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: 14px;
}
.onui-window {
  position: relative; border-radius: 16px; overflow: hidden; background: #0f1015;
  box-shadow: 0 0 0 1px rgba(17, 19, 27, .18), 0 44px 90px -46px rgba(17, 19, 27, .55);
  opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .9s var(--e-out), transform 1.1s var(--e-out);
}
.device.is-in .onui-window { opacity: 1; transform: none; }
.onui-chrome { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; background: #191a20; border-bottom: 1px solid rgba(255, 255, 255, .06); color: #9b9eae; font-size: 11px; }
.onui-dots { display: flex; gap: 5px; flex-shrink: 0; }
.onui-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; }
.onui-dots i:nth-child(2) { background: #febc2e; }
.onui-dots i:nth-child(3) { background: #28c840; }
.onui-url { display: flex; align-items: center; gap: 6px; min-width: 0; height: 24px; padding: 0 10px; border-radius: 7px; background: #22232b; color: #b9bccb; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onui-url svg { width: 11px; height: 11px; flex-shrink: 0; opacity: .75; }
.onui-ext { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; color: #eef0f7; font-size: 10.5px; letter-spacing: .02em; }
.onui-ext img { border-radius: 4px; }

.onui-viewport { position: relative; aspect-ratio: 1.3; min-height: 280px; background: #fbfaf7; overflow: hidden; container-type: inline-size; }
.onui-page { position: absolute; inset: 0; overflow: hidden; color: #17181c; font-family: var(--f-sans); font-size: 12px; line-height: 1.4; user-select: none; }
.onui-page a { color: inherit; }

/* demo store page inside the browser frame */
.op-nav { display: flex; align-items: center; gap: 20px; height: 46px; padding: 0 20px; border-bottom: 1px solid #e6e3da; }
.op-brand { display: flex; align-items: center; gap: 7px; font-weight: 600; letter-spacing: -.02em; font-size: 13px; }
.op-mark { width: 13px; height: 13px; border-radius: 50%; background: conic-gradient(from 140deg, #1b1c21 0 55%, #b4552d 55% 100%); box-shadow: inset 0 0 0 3px #fbfaf7; }
.op-links { display: flex; gap: 16px; color: #6d6a63; font-size: 11.5px; }
.op-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.op-search { height: 26px; padding: 0 10px; border-radius: 999px; color: #6d6a63; font-size: 11px; box-shadow: inset 0 0 0 1px #dedad0; }
.op-bag { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: #17181c; color: #f7f5f0; font-size: 11px; }
.op-bag-n { display: inline-flex; align-items: center; justify-content: center; min-width: 14px; height: 14px; border-radius: 999px; background: #b4552d; color: #fff; font-size: 9px; font-weight: 600; }
.op-main { padding: 18px 20px 16px; }
.op-hero { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: 18px; align-items: center; }
.op-kicker { margin: 0 0 7px; color: #b4552d; font-family: var(--f-mono); font-size: 8.5px; letter-spacing: .13em; text-transform: uppercase; }
.op-title { margin: 0 0 8px; font-size: clamp(20px, 7.2cqw, 34px); line-height: .96; letter-spacing: -.045em; font-weight: 600; }
.op-lede { margin: 0 0 12px; max-width: 34ch; color: #5c5a55; font-size: 11.5px; line-height: 1.45; }
.op-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.op-btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 14px; border-radius: 8px; background: #17181c; color: #fbfaf7; font-size: 11.5px; font-weight: 500; }
.op-btn span { color: #b9b6ad; font-weight: 400; }
.op-link { color: #44423e; font-size: 11px; border-bottom: 1px solid #b9b6ad; padding-bottom: 1px; }
.op-shot { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.op-cam { position: relative; width: 100%; aspect-ratio: 1.25; border-radius: 12px; background: radial-gradient(120% 120% at 30% 15%, #3a3c44, #1b1c21 62%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 14px 24px -16px rgba(17, 19, 27, .6); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.op-cam::after { content: ''; position: absolute; inset: 12% 14%; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.op-lens { width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #6d7689 0 12%, #262a33 34%, #0b0c10 68%); box-shadow: 0 0 0 5px #22242a, 0 0 0 7px #4a4d57, 0 0 0 8px rgba(255, 255, 255, .12); }
.op-flash { position: absolute; top: 13%; right: 15%; width: 13%; aspect-ratio: 1; border-radius: 4px; background: #d8cba9; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.op-brandline { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); color: rgba(255, 255, 255, .42); font-size: 7px; font-style: normal; letter-spacing: .3em; text-transform: uppercase; }
.op-shot figcaption { color: #8b8780; font-family: var(--f-mono); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.op-shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.op-card { position: relative; padding: 7px 8px 8px; border-radius: 9px; background: #fff; box-shadow: inset 0 0 0 1px #e8e4da; }
.op-thumb { height: 38px; margin-bottom: 6px; border-radius: 6px; }
.op-thumb--a { background: linear-gradient(130deg, #2a2c33, #101115); }
.op-thumb--b { background: linear-gradient(130deg, #d8cbb2, #a8977b); }
.op-thumb--c { background: repeating-linear-gradient(115deg, #6d5a43 0 4px, #7d6a52 4px 8px); }
.op-card h3 { margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: -.01em; }
.op-card p { margin: 0; color: #8b8780; font-size: 9px; }
.op-price { position: absolute; right: 8px; bottom: 8px; color: #17181c; font-size: 10px; font-weight: 500; }

/* container-query version of the demo page for narrow frames */
@container (max-width: 460px) {
  .op-nav { height: 36px; padding: 0 12px; gap: 10px; }
  .op-links { display: none; }
  .op-search { display: none; }
  .op-main { padding: 14px 12px 10px; }
  .op-hero { grid-template-columns: 1fr; gap: 0; }
  .op-shot, .op-shelf { display: none; }
  .op-title { font-size: clamp(19px, 7.6cqw, 26px); }
  .op-lede { font-size: 11px; max-width: none; }
  .op-kicker { font-size: 8px; }
}

/* overlay layer sits above the demo page */
.onui-overlays { position: absolute; inset: 0; height: 100%; pointer-events: none; z-index: 5; }
.onui-highlight {
  position: absolute; box-sizing: border-box; border: 2px solid #6366f1; background: rgba(99, 102, 241, .125);
  border-radius: 2px; pointer-events: none; z-index: 6;
}
.onui-highlight.is-selected { border-color: #f97316; background: rgba(249, 115, 22, .125); }
.onui-regions { position: absolute; inset: 0; pointer-events: none; }
.onui-region-outline {
  position: absolute; box-sizing: border-box; border: 1.5px solid rgba(91, 99, 255, .85); background: rgba(91, 99, 255, .1);
  border-radius: 6px; pointer-events: none; z-index: 7;
}
.onui-region-outline.is-ellipse { border-radius: 9999px; }
.onui-region-outline.is-selected { border-color: rgba(249, 115, 22, .95); background: rgba(249, 115, 22, .16); box-shadow: 0 0 0 1px rgba(255, 255, 255, .65), 0 8px 18px rgba(0, 0, 0, .35); }
.onui-draw-capture { position: absolute; inset: 0; z-index: 8; cursor: crosshair; pointer-events: auto; touch-action: none; }
.onui-markers { position: absolute; inset: 0; pointer-events: none; z-index: 9; }
.onui-marker {
  position: absolute; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--onui-marker-bg); color: var(--onui-marker-text); font-family: var(--onui-font-family); font-size: 11px; font-weight: 600;
  cursor: pointer; pointer-events: auto; border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .92), 0 0 0 3px rgba(255, 255, 255, .96), 0 8px 18px rgba(0, 0, 0, .45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7); transition: transform 140ms ease;
}
.onui-marker:hover, .onui-marker:focus-visible { transform: scale(1.15); }
.onui-marker.is-region { background: #7c3aed; }

/* real onUI toolbar, scoped and anchored to the demo frame */
.onui-stage .onui-toolbar {
  position: absolute; bottom: 12px; right: 12px; display: flex; flex-direction: column-reverse; align-items: flex-end;
  gap: 8px; z-index: 20; pointer-events: auto; font-family: var(--onui-font-family);
  transform: scale(var(--onui-scale, 1)); transform-origin: bottom right;
}
.onui-stage .onui-toggle {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--onui-border); border-radius: 12px; background: var(--onui-bg);
  backdrop-filter: blur(var(--onui-blur)); -webkit-backdrop-filter: blur(var(--onui-blur));
  color: var(--onui-text); cursor: pointer; box-shadow: var(--onui-shadow); transition: all 150ms ease;
}
.onui-stage .onui-toggle:hover { background: linear-gradient(140deg, rgba(91, 99, 255, .34), rgba(73, 198, 255, .18)); border-color: var(--onui-border-hover); transform: scale(1.05); }
.onui-stage .onui-toggle:active { transform: scale(.98); }
.onui-stage .onui-toggle.active { background: linear-gradient(140deg, var(--onui-primary), #4ec7ff); border-color: var(--onui-primary); }
.onui-stage .onui-toggle.active:hover { background: linear-gradient(140deg, var(--onui-primary-hover), #6ad2ff); }
.onui-stage .onui-toggle:focus-visible { outline: 2px solid rgba(106, 210, 255, .7); outline-offset: 2px; }
.onui-stage .onui-toggle svg { width: 17px; height: 17px; }
.onui-stage .onui-toolbar-panel {
  display: flex; flex-direction: column; gap: 3px; width: 70px; padding: 4px;
  background: linear-gradient(165deg, rgba(23, 23, 23, .96), rgba(28, 31, 45, .96));
  backdrop-filter: blur(var(--onui-blur)); -webkit-backdrop-filter: blur(var(--onui-blur));
  border: 1px solid var(--onui-border); border-radius: 14px; box-shadow: var(--onui-shadow);
  box-sizing: border-box; transform-origin: bottom right; animation: onui-panel-in 420ms cubic-bezier(.16, 1, .3, 1);
}
@keyframes onui-panel-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.onui-stage .onui-toolbar-header { display: flex; align-items: center; justify-content: space-between; gap: 3px; }
.onui-stage .onui-toolbar-header-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.onui-stage .onui-toolbar-title { font-size: 13px; font-weight: 700; color: var(--onui-text); line-height: 1.1; letter-spacing: -.01em; }
.onui-stage .onui-toolbar-title-accent { color: #67d3ff; text-shadow: 0 0 10px rgba(103, 211, 255, .3); }
.onui-stage .onui-toolbar-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: var(--onui-radius-full); border: 1px solid rgba(130, 141, 255, .46); background: rgba(91, 99, 255, .2);
  color: #fff; font-size: 9px; font-weight: 600;
}
.onui-stage .onui-toolbar-count.is-empty { color: var(--onui-text-secondary); background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
.onui-stage .onui-toolbar-section { display: flex; flex-direction: column; gap: 3px; }
.onui-stage .onui-toolbar-section + .onui-toolbar-section { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 3px; }
.onui-stage .onui-toolbar-mode-stack, .onui-stage .onui-toolbar-action-stack, .onui-stage .onui-toolbar-draw-block { display: flex; flex-direction: column; gap: 3px; }
.onui-stage .onui-toolbar-mode-anchor { position: relative; }
.onui-stage .onui-toolbar-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 28px; padding: 5px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(20, 22, 32, .68);
  color: #dde2ff; font-family: inherit; font-size: var(--onui-font-size-sm); font-weight: 500; text-align: center;
  cursor: pointer; transition: all 140ms ease;
}
.onui-stage .onui-toolbar-btn:hover { background: linear-gradient(140deg, rgba(91, 99, 255, .22), rgba(78, 199, 255, .12)); border-color: rgba(130, 141, 255, .45); color: var(--onui-text); }
.onui-stage .onui-toolbar-btn:active { background: var(--onui-bg-active); }
.onui-stage .onui-toolbar-btn:disabled { opacity: .5; cursor: not-allowed; }
.onui-stage .onui-toolbar-btn:disabled:hover { background: rgba(20, 22, 32, .68); border-color: rgba(255, 255, 255, .12); color: #dde2ff; }
.onui-stage .onui-toolbar-btn:focus-visible, .onui-stage .onui-toolbar-shape-btn:focus-visible { outline: 2px solid rgba(106, 210, 255, .7); outline-offset: 2px; }
.onui-stage .onui-toolbar-btn.is-active, .onui-stage .onui-toolbar-shape-btn.is-active { background: linear-gradient(140deg, var(--onui-primary), #4ec7ff); border-color: var(--onui-primary); color: #fff; }
.onui-stage .onui-toolbar-btn.is-active:hover, .onui-stage .onui-toolbar-shape-btn.is-active:hover { background: linear-gradient(140deg, var(--onui-primary-hover), #6ad2ff); }
.onui-stage .onui-toolbar-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.onui-stage .onui-toolbar-btn--mode { font-weight: 600; }
.onui-stage .onui-toolbar-btn--subtle { color: #c7cce4; }
.onui-stage .onui-toolbar-shape-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; background: rgba(10, 12, 20, .56);
  animation: onui-shape-in 120ms ease;
}
@keyframes onui-shape-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.onui-stage .onui-toolbar-shape-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 24px; padding: 3px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 7px; background: rgba(21, 23, 34, .74);
  color: #d9def9; font: inherit; cursor: pointer; transition: all 140ms ease;
}
.onui-stage .onui-toolbar-shape-btn:hover { background: linear-gradient(140deg, rgba(91, 99, 255, .22), rgba(78, 199, 255, .12)); border-color: rgba(130, 141, 255, .45); color: var(--onui-text); }
.onui-stage .onui-toolbar-shape-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.onui-stage .onui-toolbar-hint-popup {
  display: none; position: absolute; top: 50%; right: calc(100% + 10px); width: max-content; max-width: 168px;
  padding: 7px 9px; border: 1px solid rgba(130, 141, 255, .34); border-radius: 10px;
  background: linear-gradient(160deg, rgba(20, 22, 31, .96), rgba(31, 35, 53, .96)); color: rgba(237, 240, 255, .98);
  font-size: 11px; font-weight: 500; line-height: 1.35; box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .78);
  backdrop-filter: blur(calc(var(--onui-blur) * .8)); -webkit-backdrop-filter: blur(calc(var(--onui-blur) * .8));
  transform: translate3d(0, -50%, 0); animation: onui-hint-in 220ms cubic-bezier(.22, 1, .36, 1) 70ms both;
  pointer-events: none; z-index: 1;
}
.onui-stage .onui-toolbar-mode-anchor.is-active .onui-toolbar-hint-popup { display: block; }
.onui-stage .onui-toolbar-hint-arrow {
  position: absolute; top: 50%; right: -5px; width: 10px; height: 10px;
  border-top: 1px solid rgba(130, 141, 255, .34); border-right: 1px solid rgba(130, 141, 255, .34);
  background: rgba(29, 33, 49, .98); transform: translateY(-50%) rotate(45deg);
}
@keyframes onui-hint-in { from { opacity: 0; transform: translate3d(8px, -50%, 0); } to { opacity: 1; transform: translate3d(0, -50%, 0); } }
.onui-stage .onui-toolbar-settings {
  display: flex; flex-direction: column; gap: 8px; width: 152px; max-width: min(152px, calc(100vw - 32px));
  align-self: flex-end; padding: 8px; box-sizing: border-box; border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 9px; background: rgba(11, 14, 24, .9);
}
.onui-stage .onui-toolbar-setting-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.onui-stage .onui-toolbar-setting-label { font-size: 11px; line-height: 1.25; color: #d8ddf2; }
.onui-stage .onui-toolbar-setting-toggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 24px; cursor: pointer; }
.onui-stage .onui-toolbar-setting-toggle .onui-toolbar-setting-label { white-space: nowrap; }
.onui-stage .onui-toolbar-setting-checkbox { margin: 0; accent-color: var(--onui-primary); cursor: pointer; }
.onui-stage .onui-toolbar-select {
  width: 100%; min-width: 0; min-height: 30px; padding: 0 24px 0 8px; box-sizing: border-box;
  background: rgba(15, 18, 28, .98); border: 1px solid rgba(130, 141, 255, .38); border-radius: 7px;
  color: #f3f5ff; font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer; outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.onui-stage .onui-toolbar-select:focus { border-color: var(--onui-primary); box-shadow: 0 0 0 1px rgba(91, 99, 255, .45); }
.onui-stage [hidden] { display: none !important; }

/* real onUI annotation dialog */
.onui-stage .onui-dialog-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .52); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 21; animation: onui-fade-in 150ms ease; pointer-events: auto; }
@keyframes onui-fade-in { from { opacity: 0; } to { opacity: 1; } }
.onui-stage .onui-dialog {
  position: absolute; z-index: 22; display: flex; flex-direction: column; width: 300px; max-height: calc(100% - 16px);
  padding: 14px; background: linear-gradient(165deg, rgba(14, 15, 20, .985), rgba(21, 24, 36, .985));
  backdrop-filter: blur(var(--onui-blur)); -webkit-backdrop-filter: blur(var(--onui-blur));
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 14px; box-shadow: var(--onui-shadow);
  font-family: var(--onui-font-family); animation: onui-dialog-in 200ms ease; overflow-y: auto; overflow-x: hidden; pointer-events: auto;
}
@keyframes onui-dialog-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
.onui-stage .onui-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.onui-stage .onui-dialog-title { font-size: 14px; font-weight: 600; color: var(--onui-text); }
.onui-stage .onui-dialog-subtitle { margin-top: 4px; font-family: 'SF Mono', 'Monaco', monospace; font-size: 10px; color: var(--onui-text-muted); word-break: break-all; }
.onui-stage .onui-dialog-close { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; padding: 0; border: none; border-radius: 8px; background: transparent; color: var(--onui-text-secondary); cursor: pointer; transition: all 100ms ease; }
.onui-stage .onui-dialog-close:hover { background: var(--onui-bg-hover); color: var(--onui-text); }
.onui-stage .onui-dialog-close svg { width: 15px; height: 15px; }
.onui-stage .onui-textarea-label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 600; color: #d6daf2; letter-spacing: .01em; }
.onui-stage .onui-textarea {
  width: 100%; min-height: 54px; padding: 8px 10px; box-sizing: border-box; display: block; margin: 0;
  background: rgba(10, 12, 18, .7); border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px;
  color: var(--onui-text); font-family: inherit; font-size: 13px; line-height: 1.45; resize: vertical; outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25); transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.onui-stage .onui-textarea::placeholder { color: var(--onui-text-muted); }
.onui-stage .onui-textarea:hover { border-color: rgba(130, 141, 255, .35); }
.onui-stage .onui-textarea:focus { background: rgba(14, 16, 24, .85); border-color: rgba(99, 108, 255, .7); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2), 0 0 0 2.5px rgba(99, 102, 241, .25); }
.onui-stage .onui-selector { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.onui-stage .onui-selector-label { width: 100%; margin-bottom: 2px; font-size: 12px; font-weight: 500; color: var(--onui-text-secondary); }
.onui-stage .onui-chip {
  display: flex; align-items: center; gap: 4px; padding: 4px 9px; border: 1px solid var(--onui-border);
  border-radius: 20px; background: transparent; color: var(--onui-text-secondary); font-family: inherit;
  font-size: 11px; font-weight: 500; cursor: pointer; outline: none; transition: all 140ms ease;
}
.onui-stage .onui-chip:hover { background: rgba(255, 255, 255, .08); border-color: var(--onui-border-hover); color: var(--onui-text); transform: translateY(-1px); }
.onui-stage .onui-chip:active { transform: translateY(0); }
.onui-stage .onui-chip:focus-visible { border-color: var(--onui-primary); box-shadow: 0 0 0 2px rgba(99, 102, 241, .45); }
.onui-stage .onui-chip.is-selected { background: var(--onui-primary); border-color: var(--onui-primary); color: #fff; box-shadow: 0 0 0 1px rgba(129, 140, 248, .55), 0 8px 20px -10px rgba(99, 102, 241, .65); }
.onui-stage .onui-chip.is-selected:hover { background: var(--onui-primary-hover); border-color: var(--onui-primary-hover); color: #fff; }
.onui-stage .onui-chip svg { width: 13px; height: 13px; }
.onui-stage .onui-dialog-footer {
  position: sticky; bottom: -12px; display: flex; justify-content: flex-end; gap: 7px; flex-shrink: 0;
  margin: 10px -14px -12px; padding: 9px 14px 12px; border-top: 1px solid var(--onui-border);
  background: linear-gradient(180deg, rgba(17, 19, 28, .86), rgba(17, 19, 28, .99) 38%);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.onui-stage .onui-btn-secondary { padding: 8px 13px; border: 1px solid var(--onui-border); border-radius: 8px; background: transparent; color: var(--onui-text-secondary); font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 100ms ease; }
.onui-stage .onui-btn-secondary:hover { background: var(--onui-bg-hover); color: var(--onui-text); }
.onui-stage .onui-btn-primary { padding: 8px 16px; border: none; border-radius: 8px; background: var(--onui-primary); color: #fff; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 100ms ease; }
.onui-stage .onui-btn-primary:hover { background: var(--onui-primary-hover); }
.onui-stage .onui-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.onui-stage .onui-dialog-footer [data-onui-dialog-delete] { margin-right: auto; color: var(--onui-error); }

/* agent panel and stage footer */
.onui-agent { border-radius: 12px; overflow: hidden; background: #121319; color: #c3c7d8; font-family: var(--f-mono); font-size: 10px; line-height: 1.55; box-shadow: 0 0 0 1px rgba(17, 19, 27, .18), 0 18px 40px -32px rgba(17, 19, 27, .5); }
.onui-agent-bar { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); color: #8a90a8; letter-spacing: .02em; }
.onui-agent-dots { display: flex; gap: 4px; }
.onui-agent-dots i { width: 6px; height: 6px; border-radius: 50%; background: #ff5f57; }
.onui-agent-dots i:nth-child(2) { background: #febc2e; }
.onui-agent-dots i:nth-child(3) { background: #28c840; }
.onui-agent-bar b { color: #eef0f7; font-weight: 500; }
.onui-agent-bar em { margin-left: auto; font-style: normal; color: #59d38a; }
.onui-agent-out { margin: 0; padding: 9px 10px 10px; max-height: 126px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 9.5px; line-height: 1.5; color: #b9bfd4; scrollbar-width: thin; }
.onui-agent-out .ag-dim { color: #6e7590; }
.onui-agent-out .ag-tool { color: #9ea7ff; }
.onui-agent-out .ag-ok { color: #59d38a; }
.onui-agent-out .ag-key { color: #d8c69c; }
.onui-stage.is-agent .onui-agent { box-shadow: 0 0 0 1px color-mix(in oklab, var(--dye-deep) 32%, transparent), 0 18px 40px -30px rgba(17, 19, 27, .5); }
.onui-stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--on-paper-3); }
.onui-stage-foot p { margin: 0; }
.onui-video-btn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; color: var(--on-paper-2); font-size: 12px; border-bottom: 1px solid var(--paper-line); transition: color .25s, border-color .25s; }
.onui-video-btn:hover { color: var(--on-paper); border-color: var(--on-paper); }
.onui-video-btn span { font-size: 8px; color: var(--dye-deep); }
.onui-video { display: none; width: 100%; border-radius: 12px; background: #000; box-shadow: 0 0 0 1px rgba(17, 19, 27, .18); }
.onui-stage.is-video .onui-video { display: block; }
.onui-stage.is-video .onui-window { display: none; }

@media (max-width: 1180px) {
  .onui-stage { justify-self: stretch; }
  .onui-viewport { aspect-ratio: 1.5; }
}
@media (max-width: 640px) {
  .onui-stage { --onui-scale: .84; }
  .onui-viewport { aspect-ratio: auto; height: 400px; min-height: 0; }
  .onui-stage .onui-dialog { width: min(300px, calc(100% - 16px)); }
  .onui-agent-out { max-height: 112px; }
  .onui-chrome { gap: 8px; }
  .onui-ext { font-size: 10px; }
}
@media (hover: none) {
  .onui-stage .onui-toolbar-hint-popup { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .onui-window, .onui-stage .onui-toolbar-panel, .onui-stage .onui-dialog { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ==========================================================================
   05 PROCESS (pinned cloth)
   ========================================================================== */
.process { height: 460vh; background: var(--ink); }
.process .pin-stage { isolation: isolate; }
.process-inner { position: relative; height: 100%; display: grid; grid-template-columns: 1fr minmax(320px, 520px); gap: 5vw; align-items: center; padding: 10vh var(--pad); pointer-events: none; }
.process-head .sec-lede { max-width: 30ch; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; min-height: 280px; pointer-events: auto; }
.step { grid-area: 1 / 1; align-self: center; padding: 34px; border-radius: 22px; background: var(--card-solid); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transform: translateY(40px); filter: blur(6px); transition: opacity .6s var(--e-out), transform .8s var(--e-out), filter .6s; }
.step.is-on { opacity: 1; transform: none; filter: none; }
.step.is-past { opacity: 0; transform: translateY(-40px); }
.step-n { color: var(--dye); }
.step h3 { font-size: clamp(1.8rem, 2.8vw, 2.6rem); line-height: 1; letter-spacing: -.04em; font-weight: 600; margin: 22px 0 14px; }
.step p { margin: 0; color: var(--on-ink-2); }
.steps-dots { position: absolute; right: var(--pad); top: 50%; display: grid; gap: 12px; transform: translateY(-50%); }
.steps-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--on-ink-3); transition: background .3s, transform .4s var(--e-spring); }
.steps-dots i.is-on { background: var(--dye); transform: scale(1.7); }
.process .cloth-hint { right: var(--pad); bottom: 56px; position: absolute; }
.tools { display: flex; align-items: center; gap: 28px; padding: 26px 0 26px var(--pad); border-top: 1px solid var(--ink-line); color: var(--on-ink-3); position: relative; z-index: 2; background: var(--ink); }
.tools > span { white-space: nowrap; }
.marquee { overflow: hidden; flex: 1; min-width: 0; align-self: stretch; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track b { font-family: var(--f-sans); text-transform: none; letter-spacing: -.02em; font-size: 22px; font-weight: 500; color: var(--on-ink-2); }
.tools:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   06 CONTACT
   ========================================================================== */
.contact { background: var(--ink); padding: 16vh var(--pad) 14vh; }
.contact-grid { display: grid; grid-template-columns: 1fr minmax(320px, 560px); gap: 6vw; align-items: start; }
.contact-title { font-size: clamp(3.4rem, 9vw, 9.6rem); }
.mail { display: inline-block; margin-top: 40px; font-size: clamp(1.4rem, 2.4vw, 2.2rem); font-weight: 500; letter-spacing: -.03em; border-bottom: 2px solid var(--dye); padding-bottom: 4px; transition: color .3s; }
.mail:hover { color: var(--dye-deep); }
.contact-meta { color: var(--on-paper-3); margin-top: 14px; }
.brief { position: relative; border-radius: 26px; overflow: hidden; background: var(--bg); color: var(--fg); box-shadow: 0 50px 100px -50px rgba(17,19,27,.7); isolation: isolate; }
.brief-field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.brief-inner { position: relative; z-index: 1; padding: clamp(24px, 3vw, 40px); display: grid; gap: 14px; }
.brief h3 { margin: 0 0 10px; font-size: 1.9rem; letter-spacing: -.035em; font-weight: 600; }
.fld { position: relative; display: block; }
.fld span { position: absolute; left: 16px; top: 17px; color: var(--on-ink-3); font-size: 15px; pointer-events: none; transform-origin: left; transition: transform .35s var(--e-out), color .3s; }
.fld input, .fld textarea { width: 100%; border: 0; border-radius: 14px; padding: 26px 16px 10px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); outline: none; resize: vertical; transition: box-shadow .3s, background-color .3s; font-size: 16px; }
.fld textarea { min-height: 128px; }
.fld input:focus, .fld textarea:focus { box-shadow: inset 0 0 0 1.5px var(--dye); background: var(--field-2); }
.fld input:focus + span, .fld textarea:focus + span, .fld.has-val span { transform: translateY(-10px) scale(.76); color: var(--dye-light); }
.fld:has(input:focus) span, .fld:has(textarea:focus) span { transform: translateY(-10px) scale(.76); color: var(--dye-light); }
.fld.is-bad input, .fld.is-bad textarea { box-shadow: inset 0 0 0 1.5px #ff6b6b; }
.brief-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.brief-foot p { margin: 0; color: var(--on-ink-3); font-size: 10.5px; max-width: 24ch; }
.brief-msg { margin: 0; min-height: 1.4em; font-size: 15px; color: var(--dye-light); }
.brief-msg.is-bad { color: #ff8b8b; }
.brief.is-sent .brief-inner > *:not(.brief-msg):not(h3) { opacity: .3; pointer-events: none; transition: opacity .6s; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
/* Footer component: assets/css/footer.css. */

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) {
  .loom { grid-template-columns: 1fr; }
  .process-inner { grid-template-columns: 1fr; align-content: center; gap: 4vh; }
  .desk, .pocket { grid-template-columns: 1fr; }
  .desk-copy { order: -1; }
  .pocket .onui-stage { order: 2; }
  .belief-grid { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 30px; }
  .belief-title, .belief-aside, .orbits { grid-column: 1; grid-row: auto; justify-self: start; }
  .orbits { justify-self: center; }
}

@media (max-width: 1023px) {
  body { padding-top: 0; }
  .hero { padding-top: 84px; }
  .hero-scroll { display: none; }
  .hero-foot { flex-direction: column; align-items: stretch; gap: 22px; }
  .modes-row { overflow: visible; }
  .modes-row button { flex: 1 1 auto; min-width: 0; height: 44px; }
  .thesis .pin-stage { padding-top: 96px; }
  .thesis-head { flex-direction: column; gap: 14px; }
  .becoming { right: 50%; transform: translate(50%, -42%); width: min(92vw, 520px); opacity: .55; }
  .work-head { grid-template-columns: 1fr; }
  .tenets { grid-template-columns: 1fr; gap: 0; }
  .foot-top { grid-template-columns: 1fr; gap: 56px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  /* mobile hero: a dedicated art stage, then the shape controls, then copy */
  .hero { display: flex; flex-direction: column; min-height: 100svh; grid-template-rows: none; padding-top: 68px; padding-bottom: 10px; }
  .hero-scrim { background: linear-gradient(180deg, rgba(var(--scrim), .18), rgba(var(--scrim), .55) 42%, rgba(var(--scrim), .92) 62%); }
  html[data-theme="light"] .hero-scrim { background: linear-gradient(180deg, rgba(var(--scrim), .08), rgba(var(--scrim), .35) 35%, rgba(var(--scrim), .97) 54%, rgba(var(--scrim), 1) 72%); }
  .hero-top { order: 1; position: relative; z-index: 2; }
  .hero-top .mono { text-shadow: 0 0 8px var(--bg), 0 0 14px var(--bg); }
  .hero-top .mono:last-child { display: none; }
  .hero-copy { order: 3; padding: 8px 0 0; margin-top: 0; }
  .hero-kicker { margin-bottom: 8px; }
  .hero-lede { flex-direction: column; gap: 6px; margin-top: 10px; }
  .hero-title { font-size: clamp(1.75rem, 8.6vw, 2.35rem); line-height: .95; }
  .hero-angle { font-size: 1rem; }
  .hero-sub { font-size: .88rem; line-height: 1.4; }
  .hero-cta { margin-top: 12px; gap: 8px; }
  .hero-cta .btn { --h: 46px; font-size: 13.5px; padding-left: 16px; gap: 8px; flex: 1 1 0; min-width: 0; justify-content: space-between; white-space: nowrap; }
  .hero-cta .btn-arrow { width: 32px; height: 32px; flex: 0 0 32px; }
  .hero-foot { display: contents; }
  .modes { order: 2; margin-top: clamp(200px, 33svh, 275px); }
  .hero-facts { order: 4; font-size: 11.5px; border-top: 1px solid var(--line); padding-top: 9px; margin-top: 12px; }
  .hero-facts i { margin: 0 6px; }
  .modes-hint { margin-bottom: 6px; font-size: 11.5px; min-height: 1.3em; }
  .modes-hint .hint-touch { white-space: nowrap; }
  .modes-row { gap: 1px; padding: 3px; }
  .modes-row button { height: 38px; padding: 0 clamp(4px, 1.5vw, 8px); font-size: clamp(10px, 3.05vw, 12px); white-space: nowrap; }
  .modes-row button i { left: 6px; right: 6px; bottom: 5px; }
  .modes-pause { width: 36px; flex: 0 0 36px; }
  .modes-pause span { height: 10px; }
  .modes-meta { margin-top: 4px; }
  .modes-meta span:last-child { display: none; }
  .thesis { height: 380vh; }
  .tw { font-size: clamp(3rem, 15vw, 5.2rem); }
  .belief { padding-top: 12vh; }
  .orbits { width: 100%; }
  .services { padding-top: 12vh; padding-bottom: 14vh; }
  .loom-threads button { padding: 13px 0 13px 18px; min-height: 48px; }
  .loom-threads button[aria-selected="true"] { padding-left: 26px; }
  .loom-panel { min-height: 360px; }
  .cloth-hint { left: 0; right: auto; bottom: -9vh; }
  .spec { width: 80vw; }
  .shelf-ctrl { gap: 16px; }
  .shelf-arrows button { width: 46px; height: 46px; }
  .mac { padding: 44px 10px 14px; }
  .ow-frame { width: 100%; height: 600px; margin: 0 auto; }
  .mac-term { display: none; }
  .mac-bar { gap: 12px; font-size: 12px; }
  .mac-bar > span:nth-of-type(3), .mac-bar > span:nth-of-type(4) { display: none; }
  .process { height: 420vh; }
  .process-inner { padding: 88px var(--pad) 140px; }
  .process-head .sec-title { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .process-head .sec-lede { display: none; }
  .step { padding: 24px; }
  .steps { min-height: 250px; }
  .steps-dots { display: none; }
  .process .cloth-hint { left: var(--pad); right: auto; bottom: 30px; }
  .cloth-labels { display: none; }
  .tools { flex-direction: column; align-items: flex-start; gap: 12px; padding-right: 0; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-mark { font-size: 25vw; }
  .contact-title { font-size: clamp(3rem, 15vw, 5rem); }
}

@media (max-width: 380px) {
  .hero { padding-top: 64px; }
  .hero-copy { padding: 0; }
  .hero-kicker { margin-bottom: 10px; }
  .hero-title { font-size: clamp(2.35rem, 11.6vw, 3rem); }
  .hero-lede { gap: 8px; margin-top: 12px; }
  .hero-angle { font-size: 1.1rem; }
  .hero-sub { font-size: .95rem; line-height: 1.45; }
  .hero-cta { margin-top: 12px; gap: 8px; }
  .hero-cta .btn { --h: 46px; }
  .hero-facts { font-size: 12px; }
  .modes-hint { font-size: 11.5px; }
}

/* ==========================================================================
   MOBILE FIT - phones only. Desktop and laptop layouts stay untouched.
   Each scene is meant to be read as a unit, so it is condensed to roughly
   one viewport (100svh minus the 62px bar) instead of scrolling for screens.
   ========================================================================== */
@media (max-width: 760px) {
  /* Hero: copy first, an elastic art band, then controls and the next step.
     Flatten wrappers only on phones; the desktop composition is untouched. */
  .hero {
    display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto minmax(180px, 1fr) auto auto auto;
    height: 100svh; min-height: 700px;
    padding: 82px 24px 16px; gap: 0; align-content: stretch;
  }
  .hero-top, .hero-scroll { display: none; }
  .hero-copy, .hero-foot { display: contents; }
  .hero-kicker { grid-row: 1; margin: 0 0 14px; font-size: 9px; letter-spacing: .09em; }
  .hero-title { grid-row: 2; font-size: clamp(1.9rem, 8.7vw, 3.6rem); line-height: 1.02; }
  .hero-lede { grid-row: 3; display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin: 16px 0 0; }
  .hero-angle { font-size: clamp(.98rem, 4.38vw, 1.8rem); white-space: nowrap; line-height: 1.2; }
  .hero-angle br { display: none; }
  .hero-sub { font-size: 13px; line-height: 1.5; max-width: 43ch; margin: 0; }
  .hero-cta { grid-row: 6; display: flex; flex-wrap: nowrap; margin: 12px 0 0; gap: 8px; pointer-events: auto; }
  .hero-cta .btn { --h: 46px; font-size: 13px; padding-left: 16px; gap: 8px; flex: 1 1 0; min-width: 0; justify-content: space-between; white-space: nowrap; }
  .hero-cta .btn-arrow { width: 32px; height: 32px; flex: 0 0 32px; }
  .modes { grid-row: 5; order: initial; margin: 0; align-self: end; }
  .modes-hint { display: none; }
  .modes-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) 32px; gap: 0; padding: 3px; overflow: hidden; }
  .modes-row button { width: auto; min-width: 0; height: 40px; padding: 0 2px; font-size: 10px; white-space: nowrap; }
  .modes-row button i { left: 6px; right: 6px; bottom: 6px; }
  .modes-row .modes-pause { width: 32px; }
  .modes-meta { margin: 6px 0 0; font-size: 8px; }
  .modes-meta span:last-child { display: none; }
  .hero-facts { grid-row: 7; order: initial; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 9px; white-space: nowrap; }
  .hero-facts i { margin: 0 3px; }
  .hero-facts .hf-a, .hero-facts .hf-b { font-size: 0; }
  .hero-facts .hf-a b, .hero-facts .hf-b b { font-size: 9px; }
  .hero-facts .hf-a::after { content: ' products shipped'; font-size: 9px; }
  .hero-facts .hf-b::after { content: ' live'; font-size: 9px; }
  .hero-scrim, html[data-theme="light"] .hero-scrim {
    background: linear-gradient(180deg, rgba(var(--scrim), .98) 0%, rgba(var(--scrim), .94) 33%, transparent 45%, transparent 76%, rgba(var(--scrim), .95) 85%);
  }

  /* services: compact rows + a short detail card in one view */
  .services { padding: 7vh var(--pad) 8vh; min-height: 0; }
  .services-inner { gap: 3vh; }
  .services-head .sec-title { font-size: clamp(1.9rem, 9.2vw, 2.6rem); }
  .services .sec-lede { font-size: 14.5px; margin-top: 12px; max-width: 38ch; }
  .loom { gap: 2.4vh; }
  .loom-threads button { padding: 8px 0 8px 18px; min-height: 38px; font-size: clamp(.95rem, 4.2vw, 1.06rem); gap: 12px; }
  .services .eyebrow { margin-bottom: 12px; }
  .services .sec-lede { font-size: 13.5px; }
  .loom-threads button[aria-selected="true"] { padding-left: 26px; }
  .loom-panel { min-height: 0; }
  /* mobile: the active card opens inline under its row (accordion) */
  .loom-threads .loom-panel { display: block; margin: 0 0 6px; }
  .loom-threads .swatch { grid-area: auto; display: none; transform: none; }
  .loom-threads .swatch.is-on { display: block; margin-top: 2px; opacity: 1; visibility: visible; }
  .loom-threads button[aria-selected="true"] { margin-bottom: 0; }
  .swatch { padding: 18px 16px; border-radius: 16px; }
  .swatch-n { margin: 0 0 12px; font-size: 9.5px; }
  .swatch h3 { font-size: clamp(1.3rem, 5.6vw, 1.6rem); margin-bottom: 8px; }
  .swatch > p:not(.swatch-n):not(.swatch-tags) { font-size: 14px; line-height: 1.5; }
  .swatch-tags { margin-top: 14px; gap: 6px; }
  .swatch-tags span { padding: 5px 9px; font-size: 9.5px; }
  .cloth-hint { display: none; }

  /* onUI: the demo frame should start on the first screen */
  .pocket { gap: 2.4vh; margin-top: 7vh; }
  .pocket .eyebrow { margin-bottom: 12px; }
  .pocket-copy h3 { font-size: clamp(1.5rem, 6.8vw, 1.95rem); margin-bottom: 10px; }
  .pocket-copy > p { font-size: 14.5px; margin-bottom: 10px; }
  .pocket-copy .desk-note { display: none; }
  .pocket-lede-full { display: none; }
  .pocket-lede-mobile[hidden] { display: inline; }
  .pocket-tabs { margin: 12px 0 4px; gap: 0; padding: 3px; border: 1px solid var(--paper-line); border-radius: 999px; flex-wrap: nowrap; }
  .pocket-tabs button { min-height: 38px; height: auto; flex: 1; padding: 0 8px; font-size: 12.5px; box-shadow: none; }
  .pocket .desk-links { margin-top: 12px !important; gap: 16px; flex-wrap: nowrap; }
  .pocket .desk-links .btn { --h: 46px; }
  .onui-stage { --onui-scale: .8; }
  .onui-viewport { aspect-ratio: auto; height: 300px; min-height: 0; }

  /* work: keep the shelf, tighten the frame around it */
  .work { padding: 9vh 0 7vh; }
  .work-head { gap: 18px; }
  .work .sec-title { font-size: clamp(1.7rem, 8.4vw, 2.35rem); }
  .work-head { gap: 12px; }
  .work .eyebrow { margin-bottom: 12px; }
  .work-side p { font-size: 13.5px; }
  .legend { margin-top: 8px !important; gap: 12px; }
  .work-filters { margin: 2.4vh 0 12px; gap: 6px; }
  .work-filters button { height: 36px; padding: 0 12px; font-size: 12.5px; }
  .shelf { padding: 4px 0 12px; }
  .shelf-ctrl { margin-top: 0; }
  .shelf-links { margin-top: 18px; gap: 14px; font-size: 13.5px; }

  /* open source: the device frame and desk copy are condensed by their owner */
  .device { padding: 8vh var(--pad) 9vh; }
  .device-head { margin-bottom: 2.6vh; }
  .device .sec-title { font-size: clamp(1.9rem, 9.2vw, 2.6rem); }
  .device .sec-lede { font-size: 14px; margin-top: 10px; }
  .pocket-copy h3 { font-size: clamp(1.4rem, 6.6vw, 1.85rem); margin-bottom: 10px; }
  .pocket-copy > p { font-size: 14px; line-height: 1.45; margin-bottom: 10px; }

  /* onWatch desk: one-line eyebrow, short copy, compact stats, one CTA row */
  .device .desk .desk-copy .eyebrow { margin-bottom: 8px; }
  .dw-long, .dw-copy-long { display: none; }
  .dw-short, .dw-copy-short { display: inline; }
  .desk-copy h3 { font-size: clamp(1.45rem, 6.6vw, 1.85rem); margin-bottom: 8px; }
  .desk-copy > p { font-size: 13.5px; line-height: 1.42; margin-bottom: 8px; }
  .device .desk .desk-note { display: none; }
  .device .desk .desk-stats { gap: 0; margin: 2px 0 0; }
  .device .desk .desk-stats .stat { padding-right: 14px; margin-right: 14px; gap: 2px; }
  .device .desk .desk-stats b { font-size: 1.15rem; }
  .device .desk .desk-stats small { font-size: 8px; letter-spacing: .1em; }
  .device .desk .desk-links { flex-wrap: nowrap; gap: 14px; margin-top: 14px !important; }
  .device .desk .desk-links .btn { --h: 44px; flex: 0 1 auto; font-size: 14px; padding-left: 16px; gap: 8px; }
  .device .desk .desk-links .btn-arrow { width: 32px; height: 32px; flex: 0 0 32px; }
  .device .desk .desk-links .link { white-space: nowrap; font-size: 13.5px; }

  /* belief: one reading column, with a compact interactive orbit */
  .belief { padding: 48px var(--pad); }
  .belief-grid { gap: 16px; min-height: 0; }
  .belief-title { font-size: clamp(2rem, 8.8vw, 2.6rem); line-height: 1; }
  .belief-aside { font-size: 14px; max-width: none; line-height: 1.5; text-wrap: pretty; }
  .orbits { width: min(280px, 78vw); margin-block: 4px; }
  .orb-label { font-size: 12px; z-index: 1; text-shadow: 2px 0 var(--dye-deep), -2px 0 var(--dye-deep), 0 2px var(--dye-deep), 0 -2px var(--dye-deep), 0 0 4px var(--dye-deep), 0 0 8px var(--dye-deep); }
  .orbits-core { width: 35%; padding: 10px; font-size: 12px; }
  .tenets { margin-top: 16px; gap: 0; }
  .tenet { grid-template-columns: 34px 1fr; align-items: baseline; column-gap: 0; row-gap: 8px; padding: 16px 0 20px; }
  .tenet-n { font-size: 10px; }
  .tenet-t { font-size: 1.0625rem; line-height: 1.25; }
  .tenet-d { grid-column: 1 / -1; max-width: none; font-size: 13px; line-height: 1.5; text-wrap: pretty; }
  .tenet::before { height: 1px; }

  /* process: the pinned stage fits the viewport */
  .process { height: 300vh; }
  .process-inner { padding: 78px var(--pad) 80px; gap: 2.5vh; align-content: center; }
  .process-head .sec-title { font-size: clamp(2rem, 9.5vw, 2.8rem); }
  .steps { min-height: 210px; }
  .step { padding: 20px; }
  .step h3 { font-size: clamp(1.4rem, 6.4vw, 1.9rem); margin: 14px 0 8px; }
  .step p { font-size: 14.5px; }
  .tools { padding: 16px 0 16px var(--pad); gap: 10px; }
  .marquee-track b { font-size: 16px; }

  /* contact: heading, email and the form reachable in one short scroll */
  .contact { padding: 7vh var(--pad) 8vh; }
  .contact-grid { gap: 18px; }
  .contact .eyebrow { margin-bottom: 12px; }
  .contact-title { font-size: clamp(2.1rem, 10.6vw, 3rem); }
  .mail { margin-top: 12px; font-size: clamp(1.1rem, 5.2vw, 1.35rem); }
  .contact-title + .sec-lede, .mail + .contact-meta { margin-top: 10px; }
  .contact-meta { margin-top: 8px; font-size: 10px; }
  .brief-inner { padding: 18px; gap: 10px; }
  .brief h3 { font-size: 1.45rem; margin-bottom: 2px; }
  .fld span { top: 14px; font-size: 14px; }
  .fld input, .fld textarea { padding: 22px 14px 8px; border-radius: 12px; }
  .fld input { height: 48px; }
  .fld textarea { min-height: 84px; height: 84px; }
  .fld input:focus + span, .fld textarea:focus + span, .fld.has-val span,
  .fld:has(input:focus) span, .fld:has(textarea:focus) span { transform: translateY(-8px) scale(.78); }
  .brief-foot { display: grid; grid-template-columns: 1fr; margin-top: 0; gap: 10px; }
  .brief-foot p { max-width: none; font-size: 9.5px; text-align: center; }
  .brief-foot .btn { --h: 48px; grid-row: 1; width: 100%; justify-content: space-between; }
  /* the constellation stays in the margins, never through the fields */
  html[data-theme="dark"] .fld input, html[data-theme="dark"] .fld textarea { background: #141a2e; }
  html[data-theme="light"] .fld input, html[data-theme="light"] .fld textarea { background: #fffdfa; }

  /* Thesis: the illustration takes the elastic space, not a blank footer. */
  .thesis { height: 300vh; }
  .thesis .pin-stage {
    top: 62px; height: calc(100svh - 62px); padding: 24px var(--pad) 20px;
    display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto 4.4em 20px; gap: 14px;
  }
  .thesis-head { grid-row: 1; flex-direction: column; gap: 10px; }
  .thesis-title { font-size: clamp(1.8rem, 8.6vw, 2.5rem); }
  .thesis-aside { margin: 0; font-size: 14px; max-width: 40ch; }
  .becoming {
    grid-row: 2; position: relative; inset: auto; min-height: 0; max-width: 100%;
    width: auto; height: 100%; aspect-ratio: 1; justify-self: center; margin: 0;
    transform: none; opacity: 1;
  }
  .thesis-words { grid-row: 3; margin: 0; }
  .thesis .tw { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .thesis-rule, .thesis-count { display: none; }
  .thesis-phases { grid-row: 4; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .thesis-phases > span { display: grid; gap: 8px; font: 9px/1.2 var(--f-mono); color: var(--on-ink-3); white-space: nowrap; }
  .thesis-phases i { display: block; height: 3px; background: var(--ink-line); overflow: hidden; border-radius: 2px; }
  .thesis-phases i::after { content: ''; display: block; height: 100%; background: var(--dye); transform: scaleX(var(--phase, 0)); transform-origin: left; }
  .thesis-phases [aria-current="step"] { color: var(--dye); }
  .thesis-caps { grid-row: 5; min-height: 0; font-size: 14px; }
  .thesis-caps p { font-size: inherit; line-height: 1.45; max-width: 40ch; }
  .thesis-nudge { grid-row: 6; display: flex; justify-self: end; align-items: center; gap: 10px; color: var(--on-ink-3); font-size: 9px; margin: 0; }
  .thesis-nudge[data-last] { visibility: hidden; }
  .thesis-nudge i { font-style: normal; font-size: 14px; animation: thesis-nudge 2s ease-in-out infinite; }
  @keyframes thesis-nudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(2px); } }
  @media (prefers-reduced-motion: reduce) { .thesis-nudge i { animation: none; } }

  /* footer: three tight columns, newsletter and wordmark sized to fit one screen */
  .foot { padding: 7vh var(--pad) 20px; }
  .foot-top { gap: 22px; }
  .foot-news h3 { font-size: clamp(1.55rem, 6.8vw, 2rem); }
  .foot-news > p { font-size: 13px; line-height: 1.42; margin-bottom: 0; }
  .news { margin-top: 10px; }
  .news button { height: 42px; padding: 0 15px; font-size: 13.5px; }
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
  .foot-cols div { gap: 0; }
  .foot-cols h4 { margin: 0 0 4px; font-size: 9.5px; letter-spacing: .1em; }
  .foot-cols a { display: flex; align-items: center; min-height: 36px; font-size: 12.5px; line-height: 1.2; }
  .foot-mark { margin: 3.5vh 0 2vh; font-size: 22vw; }
  .foot-bottom { flex-direction: column; align-items: flex-start; padding-top: 12px; gap: 4px; font-size: 10px; line-height: 1.35; }
}

/* the top bar adapts to what is under it. The tint is sampled from the
   section beneath (JS), so it reads as glass over ink, paper or dye. */
.mbar .vat--bar, .mbar .mbar-menu, .mbar .theme-toggle--bar { box-shadow: inset 0 0 0 1px var(--line); }
.mbar .mbar-menu span:not(.sr) { background: var(--fg); }
.mbar.is-dark { --fg: #f5f2fc; --line: rgba(255, 255, 255, .2); }
.mbar.is-light { --fg: #11131b; --line: rgba(17, 19, 27, .14); }

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-split] .line > .li, .js [data-reveal] { transform: none !important; opacity: 1 !important; }
  .js .intro { display: none; }
  .cursor { display: none !important; }
  .thesis, .process { height: auto; }
  .pin-stage { position: relative; height: auto; min-height: 100svh; }
  .becoming { display: none; }
  .tw { position: relative; opacity: 1 !important; filter: none !important; transform: none !important; grid-area: auto; font-size: clamp(2.6rem, 7vw, 6rem); }
  .thesis-words { gap: 10px; padding: 6vh 0; }
  .thesis-caps p { position: relative; opacity: 1; transform: none; margin-bottom: 8px; }
  .steps { gap: 16px; }
  .step { grid-area: auto; opacity: 1 !important; transform: none !important; filter: none !important; }
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: auto !important; }
}
