/* ==========================================================================
   ELVORIX — website styles
   Concept: a high-altitude dawn sky as the environment, with frosted-glass
   windows floating in it (spatial interface). Light and dark follow the
   visitor's device setting.
   ========================================================================== */

/* ---------- Tokens: light (default) ---------- */
:root {
  --sky-top: #e7e3f0;      /* lilac haze */
  --sky-mid: #f1edf3;
  --sky-low: #f8e2d4;      /* dawn peach at the horizon */
  --sun: rgba(255, 158, 110, .55);
  --haze: rgba(123, 107, 244, .16);
  --ink: #17131f;          /* text */
  --ink-2: #4b4459;        /* secondary text */
  --ink-3: #7a7388;        /* tertiary text */
  --ember: #e4532a;        /* primary accent */
  --ember-soft: #ff8a5c;
  --iris: #5a49d4;         /* secondary accent */
  --glass: rgba(255, 255, 255, .5);
  --glass-hi: rgba(255, 255, 255, .72);
  --glass-edge: rgba(255, 255, 255, .78);
  --hair: rgba(23, 19, 31, .09);
  --shade: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 0 0 1px rgba(23, 19, 31, .045), 0 18px 44px -18px rgba(60, 38, 98, .26), 0 2px 6px -2px rgba(60, 38, 98, .08);
  --shade-hi: 0 1px 0 rgba(255, 255, 255, .95) inset, 0 0 0 1px rgba(23, 19, 31, .05), 0 30px 70px -24px rgba(60, 38, 98, .34), 0 4px 10px -4px rgba(60, 38, 98, .1);
  --btn: #17131f;
  --btn-ink: #fbf9fc;
  --field: rgba(255, 255, 255, .66);
  --stage: radial-gradient(110% 90% at 50% 25%, #ffffff 0%, #efeaf5 55%, #e4dcec 100%);
  --skel: rgba(23, 19, 31, .07);
  --skel-hi: rgba(255, 255, 255, .7);
  --grid-line: rgba(23, 19, 31, .07);
  --ok: #1f8a5b;
  --bad: #c8323b;
  color-scheme: light;

  --f-display: 'Red Hat Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, system-ui, sans-serif;
  --f-text: 'Red Hat Text', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, system-ui, sans-serif;
  --f-mono: 'Red Hat Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r-win: 30px;
  --r-card: 22px;
  --r-ctl: 14px;
  --blur: blur(26px) saturate(175%);
  --ease: cubic-bezier(.22, .72, .2, 1);
  --w: 1200px;
  --gut: clamp(18px, 5vw, 56px);
}

/* ---------- Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky-top: #0b0a15; --sky-mid: #131021; --sky-low: #2a1726;
    --sun: rgba(255, 112, 70, .32); --haze: rgba(123, 107, 244, .2);
    --ink: #f4f0f7; --ink-2: #bbb3c8; --ink-3: #857d95;
    --ember: #ff7a4a; --ember-soft: #ffa06f; --iris: #a193ff;
    --glass: rgba(255, 255, 255, .06); --glass-hi: rgba(255, 255, 255, .1); --glass-edge: rgba(255, 255, 255, .14); --hair: rgba(255, 255, 255, .09);
    --shade: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 0 0 1px rgba(0, 0, 0, .2), 0 22px 54px -22px rgba(0, 0, 0, .8);
    --shade-hi: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 0 0 1px rgba(0, 0, 0, .25), 0 34px 80px -26px rgba(0, 0, 0, .9);
    --btn: #f4f0f7; --btn-ink: #17131f; --field: rgba(0, 0, 0, .28);
    --stage: radial-gradient(110% 90% at 50% 25%, #2a2340 0%, #17132a 55%, #0e0b19 100%);
    --skel: rgba(255, 255, 255, .07); --skel-hi: rgba(255, 255, 255, .14); --grid-line: rgba(255, 255, 255, .07);
    --ok: #4fd39a; --bad: #ff7b82;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky-top: #0b0a15; --sky-mid: #131021; --sky-low: #2a1726;
  --sun: rgba(255, 112, 70, .32); --haze: rgba(123, 107, 244, .2);
  --ink: #f4f0f7; --ink-2: #bbb3c8; --ink-3: #857d95;
  --ember: #ff7a4a; --ember-soft: #ffa06f; --iris: #a193ff;
  --glass: rgba(255, 255, 255, .06); --glass-hi: rgba(255, 255, 255, .1); --glass-edge: rgba(255, 255, 255, .14); --hair: rgba(255, 255, 255, .09);
  --shade: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 0 0 1px rgba(0, 0, 0, .2), 0 22px 54px -22px rgba(0, 0, 0, .8);
  --shade-hi: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 0 0 1px rgba(0, 0, 0, .25), 0 34px 80px -26px rgba(0, 0, 0, .9);
  --btn: #f4f0f7; --btn-ink: #17131f; --field: rgba(0, 0, 0, .28);
  --stage: radial-gradient(110% 90% at 50% 25%, #2a2340 0%, #17132a 55%, #0e0b19 100%);
  --skel: rgba(255, 255, 255, .07); --skel-hi: rgba(255, 255, 255, .14); --grid-line: rgba(255, 255, 255, .07);
  --ok: #4fd39a; --bad: #ff7b82;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; background: var(--sky-top); }
body {
  min-height: 100vh; overflow-x: hidden; color: var(--ink); background: var(--sky-mid);
  font: 400 16.5px/1.65 var(--f-text); letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }
button { font: inherit; color: inherit; }
::selection { background: rgba(255, 122, 74, .28); }
:focus-visible { outline: 2px solid var(--iris); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 200; background: var(--btn); color: var(--btn-ink); padding: 10px 16px; border-radius: 12px; font-weight: 600; transition: top .2s; }
.skip:focus { top: 16px; }
.i { width: 20px; height: 20px; flex: none; }

/* ---------- Environment: the sky every window floats in ---------- */
.env { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(70% 55% at 82% 108%, var(--sun), transparent 70%),
    radial-gradient(60% 50% at 8% -6%, var(--haze), transparent 70%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-low) 100%); }
#clouds { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; will-change: transform; }

/* ---------- First-visit loader ---------- */
#boot { position: fixed; inset: 0; z-index: 300; display: none; place-items: center;
  background: radial-gradient(70% 55% at 82% 108%, var(--sun), transparent 70%), linear-gradient(180deg, var(--sky-top), var(--sky-mid) 55%, var(--sky-low)); }
.booting #boot { display: grid; }
#boot.out { opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }
.boot-in { display: grid; justify-items: center; gap: 22px; }
.boot-tile { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; background: var(--glass-hi); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shade-hi); }
.boot-tile svg { width: 68px; height: 68px; animation: prop 1.1s cubic-bezier(.5, .1, .5, .9) infinite; }
.boot-wm { width: 168px; height: auto; color: var(--ink); }
.boot-bar { width: 168px; height: 3px; border-radius: 3px; background: var(--skel); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--ember), var(--iris)); transition: width .35s var(--ease); }
.boot-pc { font: 500 12.5px var(--f-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
@keyframes prop { to { transform: rotate(360deg); } }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2 * var(--gut), var(--w)); margin-inline: auto; }
.sec { padding-block: clamp(64px, 9vw, 120px); }
.sec + .sec { padding-top: 0; }
.sec-tight { padding-top: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: end; }
.split { display: grid; grid-template-columns: 1.08fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.split > *, .two > * { min-width: 0; }
.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; text-wrap: balance; color: var(--ink); }
.h1 { font-size: clamp(42px, 6.8vw, 88px); line-height: .98; letter-spacing: -.045em; max-width: 15ch; }
h2 { font-size: clamp(32px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -.04em; margin-bottom: 20px; max-width: 19ch; }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -.02em; margin-bottom: 8px; }
.lead { font-size: clamp(17px, 1.45vw, 19.5px); line-height: 1.6; color: var(--ink-2); max-width: 58ch; text-wrap: pretty; }
.hint { color: var(--ink-3); font-size: 14px; margin-top: 14px; }
.kicker { font: 600 15px var(--f-display); color: var(--ember); letter-spacing: -.01em; margin-bottom: 14px; }
.num { font: 500 12.5px/1 var(--f-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 15.5px/1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: transform .35s var(--ease), background .25s, box-shadow .35s var(--ease), color .25s, opacity .2s; }
.btn .i { width: 18px; height: 18px; }
.b1 { background: var(--btn); color: var(--btn-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 12px 28px -12px rgba(23, 19, 31, .55); }
.b1:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 18px 36px -14px rgba(23, 19, 31, .6); }
.b2 { background: var(--glass-hi); color: var(--ink); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shade); }
.b2:hover { transform: translateY(-2px); box-shadow: var(--shade-hi); }
.btn:active { transform: scale(.97); }
.btn-s { height: 40px; padding: 0 18px; font-size: 14.5px; }

/* ---------- Glass surfaces ---------- */
.glass, .card, .window, .glassp, .band, .next-p {
  position: relative; background: var(--glass); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shade); }
.card { border-radius: var(--r-card); padding: 28px; transform-style: preserve-3d; transition: transform .6s var(--ease), box-shadow .4s var(--ease), opacity .9s var(--ease), filter .9s var(--ease), translate .9s var(--ease); }
.card:hover { box-shadow: var(--shade-hi); }
.window { border-radius: var(--r-win); }
.glassp { border-radius: var(--r-win); padding: clamp(24px, 3vw, 36px); }
/* specular light that follows the pointer */
.card::before, .window::before, .glassp::before, .next-p::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 255, 255, .34), transparent 60%); opacity: 0; transition: opacity .4s; mix-blend-mode: soft-light; }
.card:hover::before, .window:hover::before, .glassp:hover::before, .next-p:hover::before { opacity: 1; }
.card > *, .glassp > *, .next-p > * { position: relative; z-index: 1; }
/* visionOS window grabber */
.window::after { content: ""; position: absolute; left: 50%; bottom: -15px; width: 72px; height: 5px; border-radius: 5px; transform: translateX(-50%);
  background: var(--ink); opacity: .18; transition: opacity .3s, width .35s var(--ease); }
.window:hover::after { opacity: .32; width: 92px; }
.ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px; color: var(--ink);
  background: var(--glass-hi); border: 1px solid var(--glass-edge); box-shadow: var(--shade); transform: translateZ(26px); }
.ico .i { width: 22px; height: 22px; }
.card h3 { margin-top: 2px; }
.card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }

/* Reveal */
.rv { opacity: 0; translate: 0 22px; filter: blur(5px); transition: opacity .9s var(--ease), translate .9s var(--ease), filter .9s var(--ease); }
.rv.on { opacity: 1; translate: none; filter: none; }

/* ---------- Navigation: floating glass ornament ---------- */
.nav { position: fixed; z-index: 60; left: 50%; top: max(14px, env(safe-area-inset-top)); translate: -50% 0;
  width: min(100% - 24px, 1200px); display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shade);
  transition: background .3s, box-shadow .3s; }
.nav.sc { background: var(--glass-hi); box-shadow: var(--shade-hi); }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); }
.brand .mk { width: 34px; height: 34px; transition: transform .8s var(--ease); }
.brand:hover .mk { transform: rotate(90deg); }
.brand .wm { height: 13px; width: auto; }
.links { display: flex; gap: 2px; list-style: none; }
.links a { display: block; padding: 10px 15px; border-radius: 999px; font: 500 15px var(--f-display); letter-spacing: -.01em; color: var(--ink-2); transition: color .2s, background .25s, box-shadow .25s; }
.links a:hover { color: var(--ink); background: var(--glass-hi); }
.links a[aria-current="page"] { color: var(--ink); background: var(--glass-hi); box-shadow: var(--shade); }
.nav-cta { margin-left: 6px; }
.menu-btn { display: none; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--glass-edge); background: var(--glass-hi); cursor: pointer; color: var(--ink); }
/* while the next page loads, the propeller in the logo spins */
.is-loading .brand .mk { animation: prop .75s linear infinite; }

/* Mobile dock (shown under 900px) */
.dock { display: none; }

/* Full-screen menu */
.sheet { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
  padding: calc(104px + env(safe-area-inset-top)) var(--gut) calc(120px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--sky-top), var(--sky-mid) 60%, var(--sky-low)); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s; }
.sheet.open { opacity: 1; visibility: visible; }
.sheet-in { display: grid; gap: 2px; }
.sheet-in a { font: 600 clamp(30px, 8.6vw, 46px)/1.2 var(--f-display); letter-spacing: -.045em; color: var(--ink-3); opacity: 0; translate: 0 16px;
  transition: opacity .5s var(--ease), translate .5s var(--ease), color .2s; transition-delay: calc(var(--i) * 35ms); }
.sheet.open .sheet-in a { opacity: 1; translate: none; }
.sheet-in a[aria-current="page"], .sheet-in a:hover { color: var(--ink); }
.sheet-foot { display: grid; gap: 10px; margin-top: 32px; color: var(--ink-2); font-size: 15.5px; }
.sheet-foot a { display: inline-flex; gap: 10px; align-items: center; }
body.lock { overflow: hidden; }

/* ---------- Skeleton shown while the next page loads ---------- */
#skel { display: none; }
.is-loading #skel { display: block; animation: skin .3s var(--ease); }
.is-loading main { display: none; }
@keyframes skin { from { opacity: 0; } }
.sk { border-radius: 12px; background: linear-gradient(100deg, var(--skel) 30%, var(--skel-hi) 50%, var(--skel) 70%) 0 0 / 300% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-head { padding: calc(clamp(132px, 18vh, 190px) + env(safe-area-inset-top)) 0 clamp(48px, 7vw, 80px); display: grid; gap: 16px; }
.sk-crumb { width: 140px; height: 14px; margin-bottom: 12px; }
.sk-h { height: clamp(40px, 6vw, 76px); width: min(720px, 90%); border-radius: 16px; }
.sk-h.s { width: min(460px, 62%); }
.sk-l { height: 15px; width: min(560px, 92%); }
.sk-l.s { width: min(400px, 70%); }
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 120px; }
.sk-card { border-radius: var(--r-card); padding: 26px; display: grid; gap: 14px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shade); }
.sk-ico { width: 46px; height: 46px; border-radius: 14px; }
.sk-hero { height: min(74vh, 700px); margin-top: calc(100px + env(safe-area-inset-top)); border-radius: var(--r-win); margin-bottom: 60px; }

/* ---------- Home: hero ---------- */
.hero { position: relative; height: 230vh; }
.stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
#c1 { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
#c1:active { cursor: grabbing; }
.hero-t { position: relative; z-index: 2; width: min(100% - 2 * var(--gut), var(--w)); margin-inline: auto; pointer-events: none; opacity: 0; }
.hero-t > * { max-width: 600px; }
.hero-h { margin: 0 0 24px; }
.wmh { width: min(580px, 84vw); height: auto; overflow: visible; color: var(--ink); }
.wmh path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.wmh path:nth-of-type(2) { transition-delay: .07s; } .wmh path:nth-of-type(3) { transition-delay: .14s; } .wmh path:nth-of-type(4) { transition-delay: .21s; }
.wmh path:nth-of-type(5) { transition-delay: .28s; } .wmh path:nth-of-type(6) { transition-delay: .35s; } .wmh path:nth-of-type(7) { transition-delay: .42s; } .wmh path:nth-of-type(8) { transition-delay: .5s; }
.wmh .lens { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .8s .9s cubic-bezier(.3, 1.6, .5, 1); }
.hero-t.drawn .wmh path { stroke-dashoffset: 0; }
.hero-t.drawn .wmh .lens { transform: scale(1); }
.tagline { font: 600 clamp(24px, 2.6vw, 34px)/1.15 var(--f-display); letter-spacing: -.035em; margin-bottom: 14px; }
.hero-p { color: var(--ink-2); font-size: clamp(16px, 1.35vw, 18.5px); max-width: 50ch !important; }
.hero-t .acts { pointer-events: auto; }
.intro { position: absolute; left: 0; right: 0; bottom: 6vh; z-index: 2; display: grid; justify-items: center; gap: 12px; pointer-events: none; }
.intro .wm { height: 18px; width: auto; color: var(--ink); }
.intro small { color: var(--ink-2); font-size: 14px; }
.cue { width: 26px; height: 40px; border-radius: 14px; border: 1.5px solid var(--ink-3); position: relative; }
.cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink-2); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; translate: 0 0; } 30% { opacity: 1; } 100% { opacity: 0; translate: 0 12px; } }
.hud { position: absolute; right: var(--gut); bottom: 9vh; z-index: 2; font: 500 12px/1.95 var(--f-mono); color: var(--ink-3); padding: 16px 20px; border-radius: 20px; min-width: 236px;
  background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shade); opacity: 0; }
.hud b, .hud2 b { color: var(--ink); font-weight: 500; }
.hud .live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 8px; }

/* Built-with strip */
.stack-strip { overflow: hidden; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.tk { display: inline-flex; gap: 10px; animation: mq 60s linear infinite; padding: 6px 0; }
.tk span { flex: none; padding: 9px 16px; border-radius: 999px; font: 500 14px var(--f-display); color: var(--ink-2); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shade); white-space: nowrap; }
@keyframes mq { to { transform: translateX(-50%); } }
.strip-label { font: 500 14.5px var(--f-display); color: var(--ink-3); margin-bottom: 10px; }

/* Stats */
.band-w { margin-top: clamp(40px, 6vw, 72px); }
.band { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-win); overflow: hidden; }
.band > div { padding: clamp(22px, 3vw, 36px); border-left: 1px solid var(--hair); }
.band > div:first-child { border-left: 0; }
.band strong { display: block; font: 600 clamp(38px, 4.6vw, 62px)/1 var(--f-display); letter-spacing: -.05em; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.band span { color: var(--ink-2); font-size: 15px; }

/* Explore list */
.idx { margin-top: 28px; display: grid; gap: 10px; }
.idx a { position: relative; display: grid; grid-template-columns: 52px minmax(160px, .8fr) 2fr auto; gap: 24px; align-items: center; padding: 18px; border-radius: var(--r-card);
  border: 1px solid transparent; transition: background .35s, border-color .35s, box-shadow .4s var(--ease), opacity .9s var(--ease), translate .9s var(--ease), filter .9s var(--ease); }
.idx a:hover { background: var(--glass); border-color: var(--glass-edge); box-shadow: var(--shade); }
.idx a + a::before { content: ""; position: absolute; left: 18px; right: 18px; top: -6px; height: 1px; background: var(--hair); }
.idx-i { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--ink); background: var(--glass-hi); border: 1px solid var(--glass-edge); box-shadow: var(--shade); }
.idx-t { font: 600 clamp(24px, 2.8vw, 36px)/1.1 var(--f-display); letter-spacing: -.04em; }
.idx-d { color: var(--ink-2); font-size: 16px; }
.go { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--glass-hi); border: 1px solid var(--glass-edge); box-shadow: var(--shade); transition: background .3s, color .3s, transform .5s var(--ease); }
.idx a:hover .go, .next-p:hover .go { background: var(--btn); color: var(--btn-ink); transform: rotate(-45deg); }

/* Feature window */
.feature { display: grid; grid-template-columns: 1fr 1fr; }
.feat-t { padding: clamp(28px, 4.5vw, 64px); position: relative; z-index: 1; }
.feat-v { position: relative; z-index: 1; min-height: 440px; border-radius: 0 var(--r-win) var(--r-win) 0; overflow: hidden; background: var(--stage); border-left: 1px solid var(--hair); }
.feat-v canvas, .phead-v canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.stage-tip { position: absolute; left: 16px; bottom: 16px; z-index: 2; display: inline-flex; gap: 8px; align-items: center; font: 500 13px var(--f-display); color: var(--ink-2); padding: 8px 14px; border-radius: 999px;
  background: var(--glass-hi); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shade); pointer-events: none; }
.stage-tip .i { width: 16px; height: 16px; }

/* CTA window */
.cta { padding: clamp(32px, 6vw, 80px); overflow: hidden; }
.cta > :not(.cta-glow) { position: relative; z-index: 1; }
.cta-glow { position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(520px circle at 95% 0%, rgba(255, 138, 92, .26), transparent 62%), radial-gradient(480px circle at 0% 110%, rgba(123, 107, 244, .2), transparent 62%); }

/* ---------- Inner page header ---------- */
.phead { position: relative; padding: calc(clamp(132px, 18vh, 190px) + env(safe-area-inset-top)) 0 clamp(52px, 7vw, 92px); isolation: isolate; overflow: hidden; }
.floor { position: absolute; left: -50%; right: -50%; bottom: -14%; height: 72%; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 72px 72px, linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 72px 72px;
  transform: perspective(520px) rotateX(74deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 85%); mask-image: linear-gradient(to top, #000, transparent 85%); animation: floor 6s linear infinite; }
@keyframes floor { to { background-position: 0 72px, 0 0; } }
.phead-in { display: grid; gap: 40px; align-items: center; }
.phead-3d .phead-in { grid-template-columns: 1.1fr .9fr; }
.phead-v { position: relative; height: clamp(320px, 38vw, 480px); }
.crumb { display: flex; flex-wrap: wrap; gap: 10px; font: 500 14.5px var(--f-display); color: var(--ink-3); margin-bottom: 26px; }
.crumb a { color: var(--ink-2); } .crumb a:hover { color: var(--ink); }
.crumb [aria-current] { color: var(--ink); }
.phead .lead { margin-top: 24px; }
.phead .rv:nth-child(2) { transition-delay: .08s; } .phead .rv:nth-child(3) { transition-delay: .16s; } .phead .rv:nth-child(4) { transition-delay: .24s; }

/* ---------- 3D stages ---------- */
.stage { position: relative; overflow: hidden; background: var(--stage); }
.stage canvas { width: 100%; height: clamp(320px, 40vw, 470px); touch-action: pan-y; }
.stage canvas.tall { height: clamp(380px, 46vw, 560px); }
#c2 { cursor: grab; } #c2:active { cursor: grabbing; }
.hud2 { position: absolute; left: 16px; top: 16px; z-index: 2; font: 500 11.5px/1.85 var(--f-mono); color: var(--ink-3); padding: 12px 16px; border-radius: 16px;
  background: var(--glass-hi); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shade); }

/* Segmented control */
.tabs { display: flex; gap: 4px; padding: 5px; border-radius: 999px; width: fit-content; max-width: 100%; margin: 0 0 22px; overflow-x: auto; scrollbar-width: none;
  background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shade); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; background: transparent; color: var(--ink-2); font: 500 14.5px var(--f-display); padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: color .2s, background .3s, box-shadow .3s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--btn); color: var(--btn-ink); box-shadow: 0 8px 20px -10px rgba(23, 19, 31, .6); }

/* Product info */
.panel { min-height: 430px; }
.panel.sw > * { animation: fi .6s var(--ease) both; }
.panel.sw > :nth-child(2) { animation-delay: .05s; } .panel.sw > :nth-child(3) { animation-delay: .1s; } .panel.sw > :nth-child(4) { animation-delay: .15s; } .panel.sw > :nth-child(5) { animation-delay: .2s; }
@keyframes fi { from { opacity: 0; translate: 16px 0; filter: blur(4px); } }
.panel h3 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; line-height: 1.04; margin: 16px 0 14px; }
.panel p { color: var(--ink-2); }
.st { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--f-display); color: var(--ember); padding: 6px 12px; border-radius: 999px; background: var(--glass-hi); border: 1px solid var(--glass-edge); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.panel .acts { margin-top: 24px; }

/* Lists */
.list { list-style: none; margin-top: 18px; }
.list li { position: relative; padding: 13px 0 13px 28px; border-bottom: 1px solid var(--hair); color: var(--ink-2); }
.list li:last-child { border-bottom: 0; }
.list li::before { content: ""; position: absolute; left: 2px; top: 21px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ember); }
.list li b { color: var(--ink); font-weight: 600; }

/* Pipeline (a real sequence, so it is numbered) */
.pipe { list-style: none; display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.pipe li { position: relative; padding: 18px 14px; border-radius: 18px; font: 600 15px var(--f-display); letter-spacing: -.015em; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shade);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); animation: hl 8s infinite; }
.pipe li .num { display: block; margin-bottom: 14px; color: inherit; opacity: .6; }
.pipe li:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -10px; width: 10px; height: 1.5px; background: var(--ink-3); opacity: .5; }
@keyframes hl { 0%, 14%, 100% { background: var(--glass); color: var(--ink); } 5% { background: var(--btn); color: var(--btn-ink); } }

/* Sensor grid */
.sg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sg div { border-radius: 18px; padding: 14px 16px; font-size: 14px; color: var(--ink-2); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shade); transition: transform .4s var(--ease), box-shadow .4s; }
.sg div:hover { transform: translateY(-3px); box-shadow: var(--shade-hi); }
.sg b { display: block; color: var(--ink); font: 600 15.5px var(--f-display); letter-spacing: -.015em; margin-bottom: 2px; }
.sub-h { font: 600 21px var(--f-display); letter-spacing: -.03em; margin-bottom: 16px; }

/* Team */
.team { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 16px; margin-top: 34px; }
.person { padding: 12px 12px 22px; }
.ph { width: 100%; aspect-ratio: 1 / 1.08; border-radius: 16px; background: var(--skel) center top / cover no-repeat; position: relative; overflow: hidden; margin-bottom: 18px; transform: translateZ(20px); }
.ph::after { content: ""; position: absolute; left: 0; right: 0; height: 40%; top: -40%; background: linear-gradient(transparent, rgba(255, 255, 255, .28), transparent); animation: scan 4s linear infinite; }
@keyframes scan { to { top: 100%; } }
.person h3, .person .role { padding-inline: 8px; }
.role { color: var(--ink-3); font: 500 14.5px var(--f-display); }
.incub { display: flex; flex-direction: column; }
.incub b { color: var(--ink); font-weight: 600; }
.incub .addr { margin: 12px 0 22px; }
.incub .btn { margin-top: auto; align-self: flex-start; }

/* Next-page panel */
.nextw { padding-bottom: clamp(64px, 9vw, 120px); }
.next-p { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: center; padding: clamp(26px, 4vw, 44px); border-radius: var(--r-win); transition: box-shadow .4s, transform .5s var(--ease), opacity .9s var(--ease), translate .9s var(--ease), filter .9s var(--ease); }
.next-p:hover { box-shadow: var(--shade-hi); transform: translateY(-3px); }
.next-k { grid-column: 1; color: var(--ink-3); font: 500 15px var(--f-display); }
.next-t { grid-column: 1; font: 600 clamp(24px, 3.2vw, 40px)/1.1 var(--f-display); letter-spacing: -.045em; }
.next-p .go { grid-column: 2; grid-row: 1 / span 2; width: 62px; height: 62px; }

/* ---------- Contact ---------- */
.cgrid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.cgrid > * { min-width: 0; }
.enqbox { padding: clamp(22px, 3.4vw, 40px); }
.enqbox > * { position: relative; z-index: 1; }
.enq { display: grid; gap: 18px; }
.fr { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.enq label { display: grid; gap: 8px; font: 500 14.5px var(--f-display); color: var(--ink-2); }
.enq input:not([type=checkbox]), .enq select, .enq textarea { width: 100%; min-height: 52px; background: var(--field); border: 1px solid var(--hair); border-radius: var(--r-ctl); color: var(--ink);
  font: 400 16px var(--f-text); padding: 13px 16px; transition: border-color .2s, box-shadow .2s, background .2s; outline: none; -webkit-appearance: none; appearance: none; box-shadow: inset 0 1px 2px rgba(23, 19, 31, .06); }
.enq select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 22px) 23px, calc(100% - 16px) 23px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.enq textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.enq select option { color: #17131f; background: #fff; }
.enq input::placeholder, .enq textarea::placeholder { color: var(--ink-3); }
.enq input:focus, .enq select:focus, .enq textarea:focus { border-color: var(--iris); box-shadow: 0 0 0 4px rgba(123, 107, 244, .2); }
.enq .bad { border-color: var(--bad) !important; }
.enq .ck { display: flex; gap: 12px; align-items: flex-start; font: 400 15px var(--f-text); color: var(--ink-2); cursor: pointer; }
.ck input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ember); flex: none; }
.hp { position: absolute; left: -9999px; opacity: 0; width: 1px; height: 1px; }
.sub { width: 100%; height: 54px; }
.sub.load { opacity: .6; pointer-events: none; }
.fstat { font-size: 14.5px; min-height: 20px; }
.fstat.err { color: var(--bad); } .fstat.info { color: var(--ink-2); }
.done { text-align: center; padding: 30px 10px; }
.done[hidden] { display: none; }
.done svg { margin: 0 auto; color: var(--ok); }
.done svg circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: dr .8s forwards; }
.done svg path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: dr .6s .6s forwards; }
@keyframes dr { to { stroke-dashoffset: 0; } }
.done h3 { font-size: 26px; margin: 18px 0 8px; letter-spacing: -.035em; }
.done p { color: var(--ink-2); max-width: 44ch; margin-inline: auto; }
.done .btn { margin-top: 22px; }
.refn { font: 500 22px var(--f-mono); letter-spacing: .06em; color: var(--ember); margin: 12px 0; }
.contact { display: grid; gap: 10px; }
.contact .card { display: flex; gap: 16px; align-items: center; padding: 16px 18px; }
.contact .ico { margin: 0; flex: none; }
.contact h3 { font-size: 16px; margin: 0 0 2px; }
.contact p { font-size: 15px; overflow-wrap: anywhere; }
.next { margin-top: 10px; }
.next ol { margin: 10px 0 0 20px; color: var(--ink-2); font-size: 15.5px; display: grid; gap: 8px; }
.next ol li::marker { color: var(--ember); font: 600 14px var(--f-display); }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; display: flex; align-items: center; }
.nf-code { font: 600 16px var(--f-mono); color: var(--ember); margin-bottom: 18px; }

/* ---------- Footer ---------- */
.foot { position: relative; padding: clamp(40px, 6vw, 72px) 0 calc(28px + env(safe-area-inset-bottom)); }
.foot-glass { border-radius: var(--r-win); padding: clamp(28px, 4vw, 52px); }
.foot-glass > * { position: relative; z-index: 1; }
.foot-g { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 32px; }
.foot-g > * { min-width: 0; }
.foot .brand { margin: 0 0 18px; }
.foot .foot-tag { color: var(--ink); font: 600 19px var(--f-display); letter-spacing: -.03em; margin-bottom: 10px; }
.foot p, .foot a:not(.brand) { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 9px; max-width: 36ch; overflow-wrap: anywhere; }
.foot a:not(.brand):hover { color: var(--ink); }
.foot-h { font: 600 15px var(--f-display); letter-spacing: -.015em; margin-bottom: 16px; color: var(--ink); }
.foot-wm { width: 100%; height: auto; margin: clamp(40px, 6vw, 72px) 0 0; color: var(--ink); opacity: .08; }
.cp { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--ink-3); }

/* No WebGL / three.js: everything still reads correctly */
.no3d .hero { height: auto; }
.no3d .stick { position: relative; min-height: 100svh; }
.no3d .hero-t { opacity: 1 !important; transform: none !important; pointer-events: auto; }
.no3d .wmh path { stroke-dashoffset: 0; } .no3d .wmh .lens { transform: none; }
.no3d .intro, .no3d .stage-tip { display: none; }
.no3d canvas { visibility: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .links { display: none; }
  .menu-btn { display: grid; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .pipe { grid-template-columns: repeat(4, 1fr); }
  .pipe li:nth-child(4)::after { display: none; }
  .foot-g { grid-template-columns: 1fr 1fr 1fr; }
  .foot-b { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .two, .split, .feature, .cgrid, .phead-3d .phead-in { grid-template-columns: 1fr; }
  .two { align-items: start; }
  .g3, .sk-grid { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr 1fr; }
  .incub { grid-column: 1 / -1; }
  .feat-v { min-height: 340px; border-left: 0; border-top: 1px solid var(--hair); border-radius: 0 0 var(--r-win) var(--r-win); }
  .band { grid-template-columns: 1fr 1fr; }
  .band > div:nth-child(3) { border-left: 0; }
  .band > div:nth-child(n+3) { border-top: 1px solid var(--hair); }
  .idx a { grid-template-columns: 46px 1fr auto; gap: 4px 16px; padding: 16px 12px; }
  .idx-i { width: 46px; height: 46px; grid-row: 1 / span 2; }
  .idx-d { grid-column: 2; grid-row: 2; font-size: 15px; }
  .go { grid-column: 3; grid-row: 1 / span 2; width: 44px; height: 44px; }
  .stick { align-items: flex-end; padding-bottom: calc(14vh + env(safe-area-inset-bottom)); }
  .hud { display: none; }
  .panel { min-height: 0; }
  .h1 { max-width: none; }

  /* phones and tablets: primary navigation moves to a floating glass dock */
  .nav { padding: 6px 6px 6px 14px; }
  .nav-cta, .menu-btn { display: none; }
  .dock { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 58; left: 50%; translate: -50% 0; bottom: max(12px, env(safe-area-inset-bottom));
    width: min(100% - 20px, 520px); padding: 6px; border-radius: 26px; background: var(--glass-hi); border: 1px solid var(--glass-edge);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shade-hi); }
  .dock a, .dock button { display: grid; justify-items: center; gap: 3px; padding: 8px 2px 7px; border-radius: 20px; border: 0; background: transparent; cursor: pointer;
    font: 600 11px/1.1 var(--f-display); letter-spacing: -.005em; color: var(--ink-3); -webkit-tap-highlight-color: transparent; transition: color .2s, background .25s; }
  .dock .i { width: 22px; height: 22px; }
  .dock [aria-current="page"], .dock button[aria-expanded="true"] { color: var(--ink); background: var(--glass-hi); box-shadow: var(--shade); }
  body { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .fr, .sg { grid-template-columns: 1fr; }
  .g4, .team { grid-template-columns: 1fr; }
  .pipe { grid-template-columns: 1fr 1fr; }
  .pipe li:nth-child(2n)::after { display: none; }
  .card { padding: 22px; }
  .acts .btn { flex: 1 1 auto; }
  .brand .mk { width: 30px; height: 30px; }
  .brand .wm { height: 11.5px; }
  .foot-g { grid-template-columns: 1fr 1fr; }
  .foot-g > div:last-child { grid-column: 1 / -1; }
  .next-p .go { width: 50px; height: 50px; }
  .tagline { margin-bottom: 10px; }
}

/* Reduced motion: still, and fully visible */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .rv { opacity: 1; translate: none; filter: none; }
  .wmh path { stroke-dashoffset: 0; } .wmh .lens { transform: none; }
}

/* Logo mark: the hub colour follows the theme */
.mk-d { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mk-l { display: none !important; }
  :root:not([data-theme="light"]) .mk-d { display: block !important; }
}
:root[data-theme="dark"] .mk-l { display: none !important; }
:root[data-theme="dark"] .mk-d { display: block !important; }
