/* ==========================================================================
   Clay — documentation site (galactic luxury shell)
   The site chrome uses --s-* tokens; the component stages use the library's --clay-* tokens.
   ========================================================================== */
:root {
  --s-bg: #05050f;
  --s-bg-2: #0b0b1d;
  --s-glass: rgba(255, 255, 255, 0.04);
  --s-glass-2: rgba(255, 255, 255, 0.075);
  --s-line: rgba(255, 255, 255, 0.09);
  --s-line-2: rgba(255, 255, 255, 0.16);
  --s-text: #f3f1fb;
  --s-text-2: #b7b3d3;
  --s-text-3: #918db5;
  --s-accent: #9d8bff;
  --s-accent-2: #ff9f80;
  --s-teal: #5ee6d0;
  --s-gold: #f1d7a6;
  --s-grad: linear-gradient(120deg, #b3a6ff 0%, #ff9f80 55%, #f1d7a6 100%);
  --s-glow: 0 0 0 1px rgba(157, 139, 255, 0.45), 0 14px 50px -12px rgba(157, 139, 255, 0.6);
  --s-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9);
  --s-r: 20px;
  --s-font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --s-serif: "Instrument Serif", "Times New Roman", serif;
  --s-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --s-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --s-nav-h: 76px;
  --s-pad: clamp(16px, 4vw, 48px);
  --s-max: 1260px;
}
:root:root { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
html::-webkit-scrollbar { width: 8px; background: transparent; }
html::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 8px; }
html.smooth { scroll-behavior: auto; }
body.site { margin: 0; background: var(--s-bg); color: var(--s-text); font-family: var(--s-font); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: clip; min-height: 100vh; }
body.site.no-scroll { overflow: hidden; }
:where(.site) a { color: inherit; }
.site ::selection { background: rgba(157, 139, 255, 0.35); }
.site :focus-visible { outline: 2px solid var(--s-accent); outline-offset: 3px; border-radius: 8px; }
.site h1, .site h2, .site h3, .site h4 { margin: 0; line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.site p { margin: 0; }
.site em.serif, .serif { font-family: var(--s-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.grad-text { background: var(--s-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 14px; border-radius: 10px; background: var(--s-accent); color: #0b0b1d; font-weight: 700; text-decoration: none; transition: top .2s; }
.skip:focus { top: 16px; }

/* ---------- Backdrop: calm, static — ink, two clay glows, a fading dot grid ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
  radial-gradient(1100px 560px at 78% -12%, rgba(236, 111, 85, .13), transparent 62%),
  radial-gradient(900px 520px at 6% -6%, rgba(125, 102, 245, .12), transparent 60%),
  linear-gradient(180deg, #08080f 0%, var(--s-bg) 55%); }
.backdrop::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .075) 1px, transparent 1.3px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 70% at 50% 0%, #000 10%, transparent 72%); mask-image: radial-gradient(120% 70% at 50% 0%, #000 10%, transparent 72%); }
.backdrop::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 180, 142, .35), rgba(139, 118, 255, .35), transparent); }
.site main, .site footer, .site header { position: relative; z-index: 2; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--s-max); margin-inline: auto; padding-inline: var(--s-pad); }
.section { padding-block: clamp(72px, 11vw, 150px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--s-line); background: var(--s-glass); color: var(--s-text-2); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.eyebrow b { padding: 2px 9px; border-radius: 999px; background: var(--s-grad); color: #160f2b; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--s-accent); }
.sec-head { max-width: 760px; display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head.center { margin-inline: auto; text-align: center; align-items: center; }
.sec-head h2 { font-size: clamp(34px, 5.4vw, 64px); }
.sec-head p { color: var(--s-text-2); font-size: clamp(15px, 1.4vw, 18px); max-width: 620px; }

/* ---------- Buttons (site) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--s-line-2); background: var(--s-glass); color: var(--s-text); font: 600 14.5px/1 var(--s-font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .5s var(--s-ease), background .3s, border-color .3s, box-shadow .4s var(--s-ease); }
.btn:hover { background: var(--s-glass-2); border-color: rgba(255,255,255,.28); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--s-text); color: #0b0a1a; border-color: transparent; box-shadow: 0 10px 40px -10px rgba(179, 166, 255, 0.7); }
.btn-primary:hover { background: #fff; box-shadow: 0 16px 50px -10px rgba(179, 166, 255, 0.9); }
.btn-grad { background: var(--s-grad); color: #160f2b; border: 0; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--s-line); background: var(--s-glass); color: var(--s-text); cursor: pointer; transition: background .3s, border-color .3s; }
.icon-btn:hover { background: var(--s-glass-2); border-color: var(--s-line-2); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 80; pointer-events: none; }
.nav-inner { pointer-events: auto; display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 10px 0 18px; border-radius: 999px; border: 1px solid var(--s-line); background: rgba(10, 9, 26, 0.55); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); box-shadow: 0 20px 60px -30px rgba(0,0,0,.8); transition: background .4s, border-color .4s; }
.nav.scrolled .nav-inner { background: rgba(10, 9, 26, 0.78); border-color: var(--s-line-2); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.brand em { font-family: var(--s-serif); font-style: italic; font-weight: 400; font-size: 22px; color: var(--s-text-2); }
.brand-logo { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 4px 14px rgba(236,111,85,.35)); transition: transform .6s var(--s-ease); }
.brand:hover .brand-logo { transform: rotate(-12deg) scale(1.06); }
.nav-links { display: flex; gap: 2px; margin-left: 18px; }
.nav-links a { padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--s-text-2); font-size: 14px; font-weight: 600; transition: color .25s, background .25s; }
.nav-links a:hover { color: var(--s-text); background: var(--s-glass); }
.nav-links a[aria-current="page"] { color: var(--s-text); background: var(--s-glass-2); }
.nav-spacer { flex: 1; }
.nav .btn { height: 42px; }
.ver { font: 600 11px/1 var(--s-mono); color: var(--s-text-3); padding: 5px 8px; border: 1px solid var(--s-line); border-radius: 999px; }
.menu-btn { display: none; }
.menu-panel { position: fixed; z-index: 79; top: 84px; left: 12px; right: 12px; padding: 10px; border-radius: 24px; border: 1px solid var(--s-line-2); background: rgba(12, 11, 30, .92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); display: flex; flex-direction: column; gap: 2px; animation: menuIn .4s var(--s-ease); }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; color: var(--s-text); text-decoration: none; font: 600 16px var(--s-font); background: none; border: 0; text-align: left; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--s-glass-2); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@media (max-width: 700px) { .toolbar [data-sync-os] span { display: none; } .toolbar [data-sync-os] button { padding: 0 11px; } }
@media (max-width: 900px) {
  .nav-links, .nav .hide-sm { display: none; }
  .menu-btn { display: inline-grid; }
}

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--s-nav-h) + clamp(40px, 7vw, 90px)); padding-bottom: clamp(60px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(46px, 7.6vw, 104px); line-height: .98; letter-spacing: -.045em; margin: 22px 0 22px; }
.hero h1 .serif { font-size: 1.06em; }
.hero .lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--s-text-2); max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 44px; color: var(--s-text-3); font-size: 13px; }
.hero-meta b { display: block; font-size: 26px; color: var(--s-text); letter-spacing: -.03em; font-weight: 700; }
.os-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.os-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--s-line); background: var(--s-glass); color: var(--s-text-2); font: 600 13px var(--s-font); cursor: pointer; transition: all .4s var(--s-ease); }
.os-pill svg { width: 18px; height: 18px; }
.os-pill:hover { color: var(--s-text); border-color: var(--s-line-2); }
.os-pill[aria-pressed="true"] { color: #0b0a1a; background: var(--s-text); border-color: transparent; box-shadow: 0 10px 30px -10px rgba(179,166,255,.8); }
.hero-stage { position: relative; height: clamp(560px, 62vw, 680px); display: grid; place-items: center; perspective: 1600px; }
.hero-stage .orbit { position: absolute; inset: 6% 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); transform: rotateX(72deg); pointer-events: none; }
@keyframes orbit { to { offset-distance: 100%; } }
.stage-swap { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .7s var(--s-ease), transform .9s var(--s-ease), filter .7s; }
.stage-swap.out { opacity: 0; transform: translateY(24px) scale(.94) rotateY(-8deg); filter: blur(8px); pointer-events: none; }
.hero-stage .clay-device { transform: rotateY(-10deg) rotateX(4deg); transition: transform 1.2s var(--s-ease); box-shadow: 0 0 0 1.5px #3c3c46, 0 60px 120px -40px rgba(0,0,0,.9), 0 0 120px -30px rgba(157,139,255,.5); }
.hero-stage:hover .clay-device { transform: rotateY(-4deg) rotateX(2deg); }
.hero-stage .clay-window { width: min(100%, 600px); height: 430px; transform: rotateY(-8deg) rotateX(3deg); box-shadow: 0 60px 120px -40px rgba(0,0,0,.9), 0 0 120px -30px rgba(157,139,255,.45), 0 0 0 .5px rgba(255,255,255,.2); }
.float-card { position: absolute; z-index: 3; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--s-line-2); background: rgba(22, 20, 48, .88); box-shadow: var(--s-shadow); font-size: 12.5px; color: var(--s-text-2); display: flex; align-items: center; gap: 10px; }
.float-card b { color: var(--s-text); display: block; font-size: 13.5px; }
.float-card .dot { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--s-grad); color: #160f2b; }
.float-card .dot svg { width: 16px; height: 16px; }
.fc-1 { top: 12%; left: -2%; } .fc-2 { bottom: 16%; right: -3%; animation-delay: -3s; } .fc-3 { bottom: 4%; left: 6%; animation-delay: -5s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { height: 600px; }
  .fc-1 { left: 0; } .fc-2 { right: 0; }
}
@media (max-width: 520px) {
  .hero-stage { height: 560px; }
  .hero-stage .clay-device { width: 260px; }
  .hero-stage .clay-window { height: 380px; }
  .float-card { display: none; }
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--s-line); padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { display: inline-flex; align-items: center; gap: 12px; color: var(--s-text-3); font-weight: 600; font-size: 15px; white-space: nowrap; }
.marquee span::before { content: "✦"; color: var(--s-accent); font-size: 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Glass cards & grids ---------- */
.glass { border: 1px solid var(--s-line); background: linear-gradient(180deg, rgba(22,20,48,.72), rgba(12,11,30,.6)); border-radius: var(--s-r); }
.feat-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.feat { grid-column: span 4; padding: 28px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; transition: transform .7s var(--s-ease), border-color .4s; }
.feat:hover { transform: translateY(-4px); border-color: var(--s-line-2); }
.feat::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(179,166,255,.5), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .4s; pointer-events: none; }
.feat:hover::before { opacity: 1; }
.feat.wide { grid-column: span 8; }
.feat h3 { font-size: 21px; letter-spacing: -.02em; }
.feat p { color: var(--s-text-2); font-size: 14.5px; }
.feat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(157,139,255,.14); color: var(--s-accent); border: 1px solid rgba(157,139,255,.25); }
.feat-ic svg { width: 22px; height: 22px; }
@media (max-width: 900px) { .feat, .feat.wide { grid-column: span 12; } }
@media (min-width: 640px) and (max-width: 900px) { .feat { grid-column: span 6; } }

/* Platform gallery (6 OS) */
.os-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.os-card { padding: 18px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; transition: transform .7s var(--s-ease), border-color .4s; }
.os-card:hover { transform: translateY(-6px); border-color: var(--s-line-2); }
.os-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.os-card-head h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.os-card-head h3 svg { width: 20px; height: 20px; color: var(--s-accent); }
.os-card-head small { color: var(--s-text-3); font: 500 11.5px var(--s-mono); }
.os-card-stage { border-radius: 16px; padding: 18px; min-height: 290px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.06); }
@media (max-width: 1000px) { .os-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .os-gallery { grid-template-columns: 1fr; } }

/* Customize showcase */
.cz-show { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.cz-controls { padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.cz-preview { padding: clamp(18px, 3vw, 34px); border-radius: var(--s-r); overflow: hidden; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; transition: background .5s var(--s-ease); }
@media (max-width: 1000px) { .cz-show { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .cz-preview { grid-template-columns: 1fr; } }

/* Install steps */
.install-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.install-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.install-card h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.install-card .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--s-grad); color: #160f2b; font-size: 13px; font-weight: 800; }
.install-card p { color: var(--s-text-2); font-size: 14px; }
@media (max-width: 900px) { .install-grid { grid-template-columns: 1fr; } }

/* Platform targets list */
.targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.target { padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.target svg { width: 22px; height: 22px; color: var(--s-accent); flex: none; }
.target b { display: block; font-size: 14.5px; }
.target small { color: var(--s-text-3); font-size: 12px; }

/* CTA band */
.cta-band { padding: clamp(36px, 6vw, 72px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(closest-side, rgba(157,139,255,.35), transparent); pointer-events: none; }
.cta-band h2 { font-size: clamp(34px, 5.5vw, 68px); position: relative; }
.cta-band p { color: var(--s-text-2); max-width: 560px; position: relative; }
.cta-band .cta { justify-content: center; margin-top: 8px; position: relative; }

/* ---------- Code blocks ---------- */
.code { position: relative; border-radius: 16px; border: 1px solid var(--s-line); background: rgba(6, 6, 18, .72); overflow: hidden; min-width: 0; }
.code-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--s-line); font: 600 11.5px var(--s-mono); color: var(--s-text-3); }
.code-head .tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.code-head .tabs button { border: 0; background: none; color: var(--s-text-3); font: inherit; padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.code-head .tabs button[aria-selected="true"] { color: var(--s-text); background: var(--s-glass-2); }
.code-head .sp { flex: 1; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--s-line); background: var(--s-glass); color: var(--s-text-2); font: 600 11.5px var(--s-font); cursor: pointer; transition: all .25s; flex: none; }
.copy-btn:hover { color: var(--s-text); border-color: var(--s-line-2); }
.copy-btn.done { color: var(--s-teal); border-color: rgba(94,230,208,.4); }
.copy-btn svg { width: 13px; height: 13px; }
.code pre { margin: 0; padding: 16px 18px; overflow: auto; font: 12.8px/1.7 var(--s-mono); color: #d9d6f0; max-height: 460px; tab-size: 2; }
.code pre code { font: inherit; white-space: pre; }
.tk-tag { color: #ff9f80; } .tk-attr { color: #b3a6ff; } .tk-str { color: #5ee6d0; } .tk-com { color: #6e6a90; font-style: italic; } .tk-key { color: #f1d7a6; } .tk-num { color: #ffb4c8; } .tk-fn { color: #8fc7ff; }
code.inline { font: 500 .88em var(--s-mono); padding: 2px 7px; border-radius: 7px; background: var(--s-glass-2); border: 1px solid var(--s-line); color: var(--s-text); }

/* ---------- Docs layout (components / foundations / docs pages) ---------- */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-top: calc(var(--s-nav-h) + 40px); }
.docs-side { position: sticky; top: calc(var(--s-nav-h) + 30px); align-self: start; max-height: calc(100vh - var(--s-nav-h) - 50px); overflow: auto; padding-right: 6px; scrollbar-width: none; }
.docs-side::-webkit-scrollbar { display: none; }
.docs-side h4 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--s-text-3); margin: 22px 0 8px 12px; font-weight: 700; }
.docs-side h4:first-child { margin-top: 0; }
.docs-side a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--s-text-2); text-decoration: none; font-size: 13.5px; font-weight: 500; transition: color .2s, background .2s; position: relative; }
.docs-side a:hover { color: var(--s-text); background: var(--s-glass); }
.docs-side a.active { color: var(--s-text); background: var(--s-glass-2); }
.docs-side a.active::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 14px; border-radius: 3px; transform: translateY(-50%); background: var(--s-grad); }
.docs-main { min-width: 0; padding-bottom: 120px; }
.docs-hero { padding: 10px 0 36px; display: flex; flex-direction: column; gap: 16px; }
.docs-hero h1 { font-size: clamp(40px, 6vw, 76px); letter-spacing: -.045em; }
.docs-hero p { color: var(--s-text-2); font-size: 17px; max-width: 680px; }
@media (max-width: 1000px) {
  .docs { grid-template-columns: 1fr; }
  .docs-side { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-inline: calc(var(--s-pad) * -1); padding-inline: var(--s-pad); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .docs-side h4 { display: none; }
  .docs-side a { white-space: nowrap; flex: none; border: 1px solid var(--s-line); }
}

/* Sticky toolbar with platform switcher */
.toolbar { position: sticky; top: calc(var(--s-nav-h) + 8px); z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px; margin-bottom: 30px; border-radius: 20px; border: 1px solid var(--s-line); background: rgba(10, 9, 26, .72); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--s-line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: none; color: var(--s-text-2); font: 600 13px var(--s-font); cursor: pointer; white-space: nowrap; transition: color .25s, background .35s var(--s-ease); }
.seg button svg { width: 15px; height: 15px; }
.seg button:hover { color: var(--s-text); }
.seg button[aria-pressed="true"] { background: var(--s-text); color: #0b0a1a; }
.toolbar .sp { flex: 1; }

/* Doc sections & demos */
.doc-sec { padding-top: 36px; scroll-margin-top: calc(var(--s-nav-h) + 90px); }
.doc-sec + .doc-sec { margin-top: 40px; border-top: 1px solid var(--s-line); }
.doc-sec > h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 8px 0 10px; }
.doc-sec > p.desc { color: var(--s-text-2); max-width: 720px; margin-bottom: 22px; }
.doc-sec h3.sub { font-size: 18px; margin: 30px 0 12px; letter-spacing: -.01em; }
.demo { border-radius: 20px; border: 1px solid var(--s-line); background: rgba(255,255,255,.025); overflow: hidden; margin-top: 16px; }
.demo-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--s-line); }
.demo-head .t { font-size: 13px; font-weight: 700; color: var(--s-text-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-head .seg button { height: 28px; padding: 0 11px; font-size: 12px; }
.demo-stage { padding: clamp(20px, 3.4vw, 40px); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; min-height: 120px; transition: background-color .5s var(--s-ease), color .5s; position: relative; }
.demo-stage.col { flex-direction: column; align-items: stretch; }
.demo-stage.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.demo-stage.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.demo-stage.center { justify-content: center; }
@media (max-width: 760px) { .demo-stage.grid2, .demo-stage.grid3 { grid-template-columns: 1fr; } }
.demo .code { border-radius: 0; border: 0; border-top: 1px solid var(--s-line); }
.demo .code-head { display: none; }

/* API table */
.api { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 14px; }
.api-wrap { overflow-x: auto; border: 1px solid var(--s-line); border-radius: 16px; background: rgba(255,255,255,.02); }
.api th, .api td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--s-line); vertical-align: top; }
.api th { color: var(--s-text-3); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.api tr:last-child td { border-bottom: 0; }
.api td:first-child { white-space: nowrap; }
.api td { color: var(--s-text-2); }

/* Callout */
.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(157,139,255,.3); background: rgba(157,139,255,.08); color: var(--s-text-2); font-size: 14px; margin: 18px 0; }
.callout svg { width: 20px; height: 20px; color: var(--s-accent); flex: none; margin-top: 2px; }
.callout b { color: var(--s-text); }

/* Foundations visuals */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.swatch { border-radius: 16px; overflow: hidden; border: 1px solid var(--s-line); background: rgba(255,255,255,.03); cursor: pointer; transition: transform .5s var(--s-ease); text-align: left; padding: 0; color: inherit; font: inherit; }
.swatch:hover { transform: translateY(-3px); }
.swatch i { display: block; height: 76px; }
.swatch div { padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; }
.swatch b { font-size: 13px; }
.swatch small { font: 500 11px var(--s-mono); color: var(--s-text-3); }
.ramp { display: grid; grid-template-columns: repeat(10, 1fr); border-radius: 16px; overflow: hidden; border: 1px solid var(--s-line); }
.ramp div { height: 84px; display: flex; align-items: flex-end; padding: 8px; font: 600 10.5px var(--s-mono); }
.type-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--clay-border); }
.type-row small { font: 500 11.5px var(--s-mono); color: var(--clay-text-3); }
.scale-row { display: flex; align-items: center; gap: 16px; padding: 8px 0; font: 500 12px var(--s-mono); color: var(--s-text-3); }
.scale-row i { display: block; height: 14px; border-radius: 4px; background: var(--s-grad); }
.radius-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.radius-grid div { aspect-ratio: 1.3; border: 1.5px solid var(--clay-primary); background: var(--clay-primary-soft); display: grid; place-items: end start; padding: 10px; font: 600 11.5px var(--s-mono); color: var(--clay-text-2); }
.elev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
.elev-grid div { aspect-ratio: 1.4; border-radius: var(--clay-radius-lg); background: var(--clay-surface); display: grid; place-items: center; font: 600 12px var(--s-mono); color: var(--clay-text-2); }
.motion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.motion-card { padding: 18px; border-radius: 16px; border: 1px solid var(--s-line); background: rgba(255,255,255,.03); cursor: pointer; }
.motion-card .track { height: 40px; border-radius: 10px; background: rgba(255,255,255,.04); position: relative; margin-top: 12px; overflow: hidden; }
.motion-card .ball { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 8px; background: var(--s-grad); }
.motion-card.play .ball { left: calc(100% - 32px); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.icon-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px 10px; border-radius: 14px; border: 1px solid var(--s-line); background: rgba(255,255,255,.02); color: var(--s-text-2); font: 500 10.5px var(--s-mono); cursor: pointer; transition: all .3s var(--s-ease); }
.icon-tile:hover { color: var(--s-text); border-color: var(--s-line-2); transform: translateY(-2px); }
.icon-tile svg { width: 24px; height: 24px; }
.cmp-table td:not(:first-child), .cmp-table th:not(:first-child) { font-family: var(--s-mono); font-size: 12.5px; }

/* ---------- Customizer drawer ---------- */
.cz-fab { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border-radius: 999px; border: 0; background: var(--s-grad); color: #160f2b; font: 700 14px var(--s-font); cursor: pointer; box-shadow: 0 20px 50px -14px rgba(255, 159, 128, .7), 0 0 0 1px rgba(255,255,255,.3) inset; transition: transform .5s var(--s-ease); }
.cz-fab:hover { transform: translateY(-3px) scale(1.02); }
.cz-fab svg { width: 20px; height: 20px; animation: spin 12s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cz-scrim { position: fixed; inset: 0; z-index: 89; background: rgba(3, 3, 12, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .5s var(--s-ease); }
.cz-drawer { position: fixed; z-index: 90; top: 10px; right: 10px; bottom: 10px; width: min(420px, calc(100vw - 20px)); border-radius: 28px; border: 1px solid var(--s-line-2); background: rgba(12, 11, 30, .86); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%); box-shadow: -40px 0 120px -40px rgba(0,0,0,.9); display: flex; flex-direction: column; transform: translateX(calc(100% + 30px)); transition: transform .7s var(--s-ease); }
body.cz-open .cz-drawer { transform: none; }
body.cz-open .cz-scrim { opacity: 1; pointer-events: auto; }
.cz-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px 22px; border-bottom: 1px solid var(--s-line); }
.cz-head h3 { font-size: 18px; flex: 1; }
.cz-head h3 .serif { color: var(--s-text-2); }
.cz-tabs { display: flex; gap: 4px; padding: 12px 18px 0; }
.cz-tabs button { flex: 1; height: 36px; border: 1px solid var(--s-line); background: none; border-radius: 12px; color: var(--s-text-2); font: 600 13px var(--s-font); cursor: pointer; }
.cz-tabs button[aria-selected="true"] { background: var(--s-glass-2); color: var(--s-text); border-color: var(--s-line-2); }
.cz-body { flex: 1; overflow: auto; padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 24px; overscroll-behavior: contain; scrollbar-width: thin; }
.cz-group { display: flex; flex-direction: column; gap: 10px; }
.cz-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--s-text-3); }
.cz-label output { font: 600 12px var(--s-mono); letter-spacing: 0; text-transform: none; color: var(--s-text); }
.cz-os { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cz-os button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 14px; border: 1px solid var(--s-line); background: rgba(255,255,255,.025); color: var(--s-text-2); font: 600 12px var(--s-font); cursor: pointer; transition: all .3s var(--s-ease); }
.cz-os button svg { width: 22px; height: 22px; }
.cz-os button small { font: 500 10px var(--s-font); color: var(--s-text-3); }
.cz-os button:hover { border-color: var(--s-line-2); color: var(--s-text); }
.cz-os button[aria-pressed="true"] { border-color: transparent; background: var(--s-text); color: #0b0a1a; }
.cz-os button[aria-pressed="true"] small { color: #4b4766; }
.cz-themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cz-theme { aspect-ratio: 1; border-radius: 14px; border: 2px solid transparent; cursor: pointer; position: relative; padding: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); transition: transform .3s var(--s-ease); }
.cz-theme::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 38%; height: 38%; border-radius: 6px; background: var(--c2); box-shadow: 0 0 0 2px rgba(12,11,30,.6); }
.cz-theme:hover { transform: scale(1.06); }
.cz-theme[aria-pressed="true"] { border-color: var(--s-text); }
.cz-theme span { position: absolute; left: 0; right: 0; bottom: -18px; font-size: 10px; color: var(--s-text-3); text-align: center; text-transform: capitalize; }
.cz-color { display: flex; gap: 10px; align-items: center; }
.cz-color input[type="color"] { width: 46px; height: 46px; padding: 0; border: 0; border-radius: 14px; background: none; cursor: pointer; flex: none; }
.cz-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.cz-color input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(255,255,255,.2); border-radius: 14px; }
.cz-color input[type="color"]::-moz-color-swatch { border: 1px solid rgba(255,255,255,.2); border-radius: 14px; }
.cz-input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--s-line); background: rgba(255,255,255,.04); color: var(--s-text); font: 600 14px var(--s-mono); outline: none; }
.cz-input:focus { border-color: var(--s-accent); }
select.cz-input { font-family: var(--s-font); appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
select.cz-input option { background: #14122e; }
.cz-dots { display: flex; flex-wrap: wrap; gap: 8px; }
.cz-dots button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); transition: transform .25s var(--s-ease); }
.cz-dots button:hover { transform: scale(1.15); }
.cz-dots button[aria-pressed="true"] { border-color: var(--s-text); }
.cz-range { appearance: none; -webkit-appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; --v: 50%; }
.cz-range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #b3a6ff, #ff9f80 var(--v), rgba(255,255,255,.1) var(--v)); }
.cz-range::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); }
.cz-range::-moz-range-progress { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #b3a6ff, #ff9f80); }
.cz-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.5), 0 0 0 4px rgba(179,166,255,.25); }
.cz-range::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
.cz-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--s-text-2); }
.cz-toggle { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; cursor: pointer; transition: background .3s; flex: none; margin: 0; }
.cz-toggle::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .4s var(--s-ease); }
.cz-toggle:checked { background: linear-gradient(90deg, #9d8bff, #ff9f80); }
.cz-toggle:checked::before { transform: translateX(18px); }
.cz-foot { display: flex; gap: 8px; padding: 14px 18px 18px; border-top: 1px solid var(--s-line); }
.cz-foot .btn { flex: 1; height: 44px; }
.cz-formats { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-formats button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--s-line); background: none; color: var(--s-text-2); font: 600 12px var(--s-font); cursor: pointer; }
.cz-formats button[aria-pressed="true"] { background: var(--s-text); color: #0b0a1a; border-color: transparent; }
.cz-body .code pre { max-height: none; font-size: 11.5px; }
.contrast-chip { display: inline-flex; align-items: center; gap: 6px; font: 600 11.5px var(--s-mono); padding: 4px 9px; border-radius: 999px; background: rgba(94,230,208,.12); color: var(--s-teal); }
.contrast-chip.bad { background: rgba(255,125,151,.12); color: #ff7d97; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--s-line); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.footer h5 { margin: 0 0 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--s-text-3); }
.footer a { display: block; padding: 4px 0; color: var(--s-text-2); text-decoration: none; font-size: 14px; }
.footer a:hover { color: var(--s-text); }
.footer p { color: var(--s-text-3); font-size: 13.5px; max-width: 320px; margin-top: 14px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--s-line); color: var(--s-text-3); font-size: 12.5px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: span 2; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--s-ease), transform 1.1s var(--s-ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; }
  .marquee-track { animation: none !important; }
}

/* ---------- Toast for site actions ---------- */
.s-toast { position: fixed; left: 50%; bottom: 28px; z-index: 120; transform: translate(-50%, 20px); opacity: 0; padding: 10px 16px; border-radius: 999px; background: var(--s-text); color: #0b0a1a; font: 600 13px var(--s-font); pointer-events: none; transition: all .5s var(--s-ease); box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); }
.s-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Centred hero: copy → platform tabs → live preview → stats ---------- */
.hero-center { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-center h1 { margin: 22px 0 20px; }
.hero-center .lead { margin: 0 auto; max-width: 640px; }
.hero-center .cta { justify-content: center; }
.hero-tabs { justify-content: center; margin-top: 40px; padding: 5px; gap: 4px; border-radius: 999px; border: 1px solid var(--s-line); background: rgba(255,255,255,.03); }
.hero-tabs .os-pill { border-color: transparent; background: transparent; }
.hero-tabs .os-pill[aria-pressed="true"] { background: var(--s-text); }
.hero .hero-stage { width: 100%; max-width: 980px; margin: 28px auto 0; height: clamp(560px, 52vw, 640px); }
.hero .hero-stage .orbit { inset: 10% 6%; }
.hero .hero-stage .clay-window { width: min(100%, 720px); height: 470px; transform: none; }
.hero .hero-stage .clay-device { transform: none; }
.hero .hero-stage .stage-swap.out { transform: translateY(24px) scale(.96); }
.hero .fc-1 { top: 14%; left: 2%; } .hero .fc-2 { bottom: 22%; right: 2%; } .hero .fc-3 { bottom: 6%; left: 8%; }
.hero .hero-meta { justify-content: center; text-align: center; margin-top: 36px; gap: 48px; }
@media (max-width: 760px) {
  .hero-tabs { border-radius: 22px; }
  .hero .hero-stage .clay-window { height: 400px; }
  .hero .hero-meta { gap: 24px; }
}
