/* Metamorphosis site — calm, fluid, dark. */
:root {
  --bg: #06080b;
  --bg-2: #0c1016;
  --ink: #eef3f7;
  --ink-2: #a8b4c0;
  --ink-3: #7d8a97;
  --line: rgba(238, 243, 247, 0.1);
  --line-2: rgba(238, 243, 247, 0.18);
  --accent: #ffb347;
  --cyan: #4fe3ff;
  --radius: 28px;
  --radius-sm: 16px;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --font: "Inter Tight", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(16px, 1.05vw + 10px, 18px)/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--font-mono); font-size: 0.86em; }
code { color: var(--ink); background: rgba(255,255,255,.06); padding: .1em .4em; border-radius: 6px; }
kbd { display: inline-block; padding: .05em .45em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; color: var(--ink); background: rgba(255,255,255,.04); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #111; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #111; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- Ambient gradient ---------- */
.aura { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aura span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .22; will-change: transform; }
.aura span:nth-child(1) { background: #1d6f8a; left: -20vmax; top: -25vmax; animation: drift1 26s var(--ease) infinite alternate; }
.aura span:nth-child(2) { background: #ffb347; right: -25vmax; top: 10vmax; opacity: .1; animation: drift2 32s var(--ease) infinite alternate; }
.aura span:nth-child(3) { background: #3b2b7a; left: 20vmax; bottom: -35vmax; opacity: .18; animation: drift3 28s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(12vmax, 8vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-10vmax, 12vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-8vmax, -10vmax) scale(1.15); } }
body::after { /* fine grain */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav-bar {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(calc(100% - 32px), 920px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 18px; border-radius: 999px;
  background: rgba(12, 16, 22, .62); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; color: var(--cyan); }
.brand span { color: var(--ink); font-size: 17px; }
.nav-bar ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-bar nav a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 15px; transition: color .2s, background .2s; }
.nav-bar nav a:hover { color: var(--ink); background: rgba(255,255,255,.06); }
@media (max-width: 760px) { .nav-bar nav { display: none; } }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; transition: transform .35s var(--ease), background .25s, box-shadow .35s var(--ease); }
.pill:hover { transform: translateY(-2px); }
.pill-accent { background: var(--accent); color: #1a1205; box-shadow: 0 10px 30px -10px rgba(255, 179, 71, .6); }
.pill-accent:hover { box-shadow: 0 16px 40px -10px rgba(255, 179, 71, .75); }
.pill-light { background: var(--ink); color: #0b0e12; padding: .6em 1.2em; font-size: 15px; }
.pill-ghost { border-color: var(--line-2); color: var(--ink); }
.pill-ghost:hover { background: rgba(255,255,255,.06); }
.pill-lg { font-size: 18px; padding: 1em 1.8em; }

/* ---------- Hero ---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(140px, 18vh, 200px) var(--gutter) 40px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); }
.eyebrow-link { color: var(--ink); text-decoration: none; margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--line-2); }
.eyebrow-link:hover { color: var(--accent); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #9cff6e; box-shadow: 0 0 10px #9cff6e; }
.display { font-size: clamp(44px, 8.4vw, 132px); line-height: .94; letter-spacing: -.045em; font-weight: 600; margin: 28px 0 28px; }
.display .line { display: block; overflow: hidden; padding-bottom: .06em; }
.display .line > span { display: inline-block; }
.display em { font-style: normal; background: linear-gradient(100deg, var(--accent) 10%, #ff8a5c 45%, var(--cyan) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { max-width: 640px; margin: 0 auto 36px; font-size: clamp(18px, 1.3vw + 10px, 22px); color: var(--ink-2); line-height: 1.5; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Live ring stage ---------- */
.stage { margin: clamp(60px, 9vw, 110px) auto 0; max-width: 980px; }
.stage-inner {
  position: relative; padding: clamp(20px, 3vw, 36px); border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(180deg, rgba(20, 28, 38, .78), rgba(8, 12, 18, .88));
  border: 1px solid var(--line); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255,255,255,.06);
  display: grid; justify-items: center; gap: 18px;
}
.stage-inner::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(79,227,255,.5), transparent 35%, transparent 65%, rgba(255,179,71,.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.stage-meta, .stage-readout { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font: 12px var(--font-mono); letter-spacing: .06em; color: var(--ink-3); }
.stage-meta b, .stage-readout b { color: #bdf4ff; font-weight: 500; margin-left: 6px; }
.stage-meta .armed, .stage-readout #hud-status { color: var(--accent); }
.hud-demo { width: min(100%, 470px); }
.hud-demo .hud-seg .hud-label { font-size: 17px; letter-spacing: 1px; }
.stage-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 24px; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.key { font: 500 14px var(--font); color: var(--ink-2); background: transparent; border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: background .25s, color .25s; }
.key kbd { font-size: 11px; margin-right: 4px; }
.key[aria-selected="true"] { background: var(--ink); color: #0b0e12; }
.key[aria-selected="true"] kbd { color: #0b0e12; border-color: rgba(0,0,0,.25); background: transparent; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); background: var(--sw); cursor: pointer; padding: 0; transition: transform .25s var(--ease); }
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 14px var(--sw); }
.stage figcaption { text-align: center; margin-top: 18px; color: var(--ink-3); font-size: 15px; }

/* ---------- Marquee ---------- */
.marquee { margin: clamp(70px, 9vw, 120px) 0 0; border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee ul { display: flex; list-style: none; margin: 0; padding: 0; }
.marquee li { font-size: clamp(22px, 2.6vw, 38px); font-weight: 500; letter-spacing: -.02em; color: var(--ink-3); padding: 0 .9em; white-space: nowrap; }
.marquee li::after { content: "✦"; font-size: .45em; color: var(--accent); margin-left: 1.8em; vertical-align: middle; opacity: .7; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(90px, 12vw, 170px) var(--gutter) 0; }
.section-head { max-width: 900px; margin-bottom: clamp(40px, 6vw, 72px); }
.label { font: 500 13px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.title { font-size: clamp(36px, 5.4vw, 80px); line-height: 1; letter-spacing: -.04em; font-weight: 600; margin: 0; }
.title-sm { font-size: clamp(32px, 4vw, 56px); margin-bottom: 24px; }

/* Steps */
.steps { list-style: none; margin: 0 0 clamp(50px, 7vw, 90px); padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.steps .num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); font: 500 14px var(--font-mono); color: var(--accent); margin-bottom: 26px; }
.steps h3 { font-size: 24px; letter-spacing: -.02em; font-weight: 600; margin: 0 0 10px; }
.steps p { color: var(--ink-2); margin: 0; }

/* Showcase */
.showcase { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .showcase { grid-template-columns: 1fr; } }
.shot { margin: 0; }
.shot picture { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px -40px rgba(0,0,0,.9); transition: transform .6s var(--ease); }
.shot:hover picture { transform: translateY(-4px) scale(1.01); }
.shot figcaption { margin-top: 14px; color: var(--ink-3); font-size: 15px; }
.shot figcaption b { color: var(--ink); font-weight: 600; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { position: relative; padding: clamp(24px, 2.6vw, 36px); border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.025); overflow: hidden; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; transition: border-color .3s, background .3s; }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(79,227,255,.12), transparent 60%); }
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card-wide { grid-column: span 2; }
.bento > .card-wide:last-child { grid-column: 1 / -1; }
.card-k { font: 500 13px var(--font-mono); color: var(--ink-3); margin: 0 0 auto; padding-bottom: 40px; letter-spacing: .04em; }
.card h3 { font-size: clamp(22px, 2vw, 30px); letter-spacing: -.025em; line-height: 1.1; font-weight: 600; margin: 0 0 12px; }
.card p { color: var(--ink-2); margin: 0; max-width: 560px; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } .bento > .card-wide:last-child { grid-column: span 2; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .card-wide { grid-column: auto; } }

/* Install */
.tab-list { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); margin-bottom: 28px; }
.tab-list button { font: 600 16px var(--font); color: var(--ink-2); background: transparent; border: 0; padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s; }
.tab-list button[aria-selected="true"] { background: var(--ink); color: #0b0e12; }
.install-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.install-card { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.install-card h3 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 600; }
.install-card p { color: var(--ink-2); }
.code { position: relative; border-radius: var(--radius-sm); background: #030507; border: 1px solid var(--line); }
.code pre { margin: 0; padding: 18px 90px 18px 18px; overflow-x: auto; }
.code code { background: none; padding: 0; color: #bdf4ff; font-size: 14px; }
.copy { position: absolute; top: 10px; right: 10px; font: 500 13px var(--font); color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.copy:hover { background: rgba(255,255,255,.14); }
.note { color: var(--ink-3); margin-top: 22px; font-size: 15px; }
.note a, .split a, .faq a { color: var(--ink); text-underline-offset: 3px; }
.js .tab-panel[hidden] { display: none; }

/* Wayland split */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.split p { color: var(--ink-2); }
.split p b { color: var(--ink); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%; background: rgba(79,227,255,.15); border: 1px solid var(--cyan); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 26px 50px 26px 0; position: relative; font-size: clamp(19px, 1.6vw, 24px); font-weight: 500; letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 28px; font-weight: 300; color: var(--ink-3); transition: transform .4s var(--ease), color .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--accent); }
.faq summary:hover { color: #fff; }
.faq details p { color: var(--ink-2); max-width: 760px; margin: -6px 0 26px; }

/* Closing */
.closing { max-width: var(--max); margin: clamp(110px, 14vw, 200px) auto 0; padding: 0 var(--gutter); text-align: center; display: grid; justify-items: center; gap: 40px; }

/* Footer */
.footer { max-width: var(--max); margin: clamp(110px, 14vw, 180px) auto 0; padding: 0 var(--gutter) 28px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 15px; }
.footer-row p { margin: 0; }
.footer ul { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; margin: 0; padding: 0; }
.footer ul a { color: var(--ink-2); text-decoration: none; }
.footer ul a:hover { color: var(--ink); }
.wordmark { font-size: clamp(56px, 15.5vw, 230px); font-weight: 600; letter-spacing: -.06em; line-height: .8; margin: 50px 0 16px; text-align: center;
  background: linear-gradient(180deg, rgba(238,243,247,.16), rgba(238,243,247,0)); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
.disclaimer { color: var(--ink-3); font-size: 13px; text-align: center; margin: 0; }

/* ---------- Reveal on scroll (only with JS; content stays visible without it) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .display .line > span { transform: translateY(105%); transition: transform 1.1s var(--ease); }
.js .display.in .line > span { transform: none; }
.js .display.in .line:nth-child(2) > span { transition-delay: .08s; }
.js .display.in .line:nth-child(3) > span { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aura span, .marquee-track { animation: none; }
  .js .reveal, .js .display .line > span { opacity: 1; transform: none; transition: none; }
  .pill, .shot picture, .swatch { transition: none; }
}
@media (max-width: 480px) { .eyebrow { font-size: 11px; letter-spacing: .04em; } .key { padding: 7px 10px; font-size: 13px; } }
