/* ==========================================================================
   SZVTECH — homepage styles
   ========================================================================== */
@property --a1 { syntax: '<color>'; inherits: true; initial-value: #8b5cf6; }
@property --a2 { syntax: '<color>'; inherits: true; initial-value: #22d3ee; }
@property --a3 { syntax: '<color>'; inherits: true; initial-value: #e879f9; }

:root {
  --bg: #05050a;
  --bg-2: #0a0a14;
  --fg: #f3f1ff;
  --muted: rgba(226, 224, 255, .56);
  --dim: rgba(226, 224, 255, .34);
  --line: rgba(255, 255, 255, .09);
  --a1: #8b5cf6;
  --a2: #22d3ee;
  --a3: #e879f9;
  --glass: rgba(255, 255, 255, .04);
  --glass-2: rgba(255, 255, 255, .07);
  --glass-b: rgba(255, 255, 255, .11);
  --f-display: 'Syne', 'Inter', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gut: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --grad: linear-gradient(100deg, var(--a1), var(--a3) 45%, var(--a2));
  color-scheme: dark;
  transition: --a1 1s ease, --a2 1s ease, --a3 1s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); overflow-x: clip; -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: #2a2840 transparent; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; height: 100vh; }
::selection { background: var(--a1); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
kbd { font-family: var(--f-mono); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); }
.label { display: inline-flex; align-items: center; gap: .6em; color: var(--muted); }
.label::before { content: ''; width: 22px; height: 1px; background: var(--grad); }
.h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(2.1rem, 5vw, 4.6rem); line-height: .98; letter-spacing: -.035em; }
.is-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none; } }

html.has-cursor, html.has-cursor * { cursor: none !important; }

/* split text */
.sw { display: inline-block; white-space: nowrap; }
.sm { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em .04em .14em; margin: -.1em -.04em -.14em; }
.sc, .si { display: inline-block; will-change: transform; }
.unmask .sm { overflow: visible; }

/* ==========================================================================
   Global layers
   ========================================================================== */
.bg-fallback {
  position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42vmax 42vmax at 32% 38%, color-mix(in srgb, var(--a1) 30%, transparent), transparent 70%),
    radial-gradient(36vmax 36vmax at 72% 62%, color-mix(in srgb, var(--a2) 20%, transparent), transparent 70%),
    radial-gradient(28vmax 28vmax at 62% 18%, color-mix(in srgb, var(--a3) 16%, transparent), transparent 70%);
  opacity: .32;
}
.no-webgl .bg-fallback { opacity: 1; animation: drift 16s ease-in-out infinite alternate; }
.no-webgl #gl { display: none; }
@keyframes drift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(3%, -2%, 0) scale(1.08) rotate(4deg); } 100% { transform: translate3d(-3%, 2%, 0) scale(1.12) rotate(-6deg); } }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: block; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; display: none; }
.vignette { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(130% 95% at 50% 45%, transparent 50%, rgba(2, 2, 6, .7)); }
.grain {
  position: fixed; inset: -120px; z-index: 90; pointer-events: none; opacity: .065;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(6) infinite;
  will-change: transform;
}
@keyframes grain {
  0% { transform: translate3d(0,0,0); } 17% { transform: translate3d(-40px, 30px, 0); } 33% { transform: translate3d(50px, -60px, 0); }
  50% { transform: translate3d(-70px, -20px, 0); } 67% { transform: translate3d(30px, 70px, 0); } 83% { transform: translate3d(-20px, -80px, 0); } 100% { transform: translate3d(0,0,0); }
}
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px var(--a2); }

main { position: relative; z-index: 3; }

/* ==========================================================================
   Cursor
   ========================================================================== */
.cursor { position: fixed; inset: 0; z-index: 120; pointer-events: none; mix-blend-mode: difference; display: none; }
.has-cursor .cursor { display: block; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; will-change: transform; }
.cursor__dot-in { width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; transition: transform .35s var(--ease), opacity .3s; }
.cursor__ring-in {
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 1.5px solid #fff;
  display: grid; place-items: center; transition: transform .5s var(--ease), background-color .4s, border-color .4s, opacity .3s;
}
.cursor__label { font: 600 9px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: #000; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s var(--ease); }
.cursor.is-hover .cursor__ring-in { transform: scale(1.7); background: #fff; }
.cursor.is-hover .cursor__dot-in { transform: scale(0); }
.cursor.has-label .cursor__label { opacity: 1; transform: scale(.6); }
.cursor.is-down .cursor__ring-in { transform: scale(.75); }
.cursor.is-hover.is-down .cursor__ring-in { transform: scale(1.4); }
.cursor.is-hidden .cursor__ring-in, .cursor.is-hidden .cursor__dot-in { opacity: 0; }

/* ==========================================================================
   Loader
   ========================================================================== */
.loader {
  position: fixed; inset: 0; z-index: 200; background: #040408; color: var(--fg);
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--gut);
  clip-path: inset(0 0 0 0);
}
.no-js .loader, .no-gsap .loader { display: none; }
.loader__top { display: flex; justify-content: space-between; color: var(--muted); }
.loader__mid { text-align: center; color: var(--dim); font-family: var(--f-mono); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }
.loader__bottom { display: flex; flex-direction: column; gap: 18px; }
.loader__count { display: flex; align-items: flex-start; overflow: hidden; font-family: var(--f-display); font-weight: 800; line-height: .82; letter-spacing: -.05em; font-size: clamp(5rem, 22vw, 18rem); }
.loader__num { font-variant-numeric: tabular-nums; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; min-width: 1.9ch; }
.loader__pct { font-size: .25em; margin-top: .2em; color: var(--muted); }
.loader__bar { height: 1px; background: var(--line); }
.loader__bar span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 10px var(--a2); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px var(--gut); pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav::before { content: ''; position: absolute; inset: 0 0 -40px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(5,5,10,.85), rgba(5,5,10,.5) 55%, transparent); opacity: 0; transition: opacity .6s; }
.nav.is-scrolled::before { opacity: 1; }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; letter-spacing: .02em; font-size: 15px; }
.nav__mark { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(from 0deg, var(--a1), var(--a3), var(--a2), var(--a1)); box-shadow: 0 0 18px color-mix(in srgb, var(--a1) 70%, transparent); animation: spin 6s linear infinite; position: relative; }
.nav__mark::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg); }
@keyframes spin { to { transform: rotate(360deg); } }
.nav__links { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(12, 12, 22, .45); border: 1px solid var(--line); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.nav__links a { display: inline-flex; gap: 8px; align-items: baseline; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; transition: background-color .3s, color .3s; color: rgba(243,241,255,.82); }
.nav__links a .mono { font-size: 10px; color: var(--dim); }
.nav__links a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav__learn { position: relative; }
.nav__new { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--a3); box-shadow: 0 0 8px var(--a3); animation: pulse 2s ease-in-out infinite; }
.nav__time { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; min-width: 9ch; justify-content: flex-end; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 10px var(--a2); animation: pulse 2s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
@media (max-width: 860px) { .nav__links { display: none; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; display: grid; place-items: center; padding: 0 var(--gut); }
.hero__center { text-align: center; position: relative; will-change: transform; }
.hero__word {
  font-family: var(--f-display); font-weight: 800; line-height: .84; letter-spacing: -.045em;
  font-size: clamp(2.5rem, 11.4vw, 17rem); white-space: nowrap; user-select: none; cursor: pointer;
  position: relative;
}
.hero__word .sc {
  background: linear-gradient(180deg, #ffffff 20%, color-mix(in srgb, var(--a1) 35%, #e9e4ff) 75%, color-mix(in srgb, var(--a2) 40%, #dff) 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__center::before {
  content: ''; position: absolute; left: 50%; top: 42%; width: 110%; height: 90%; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--a1) 22%, transparent), transparent); filter: blur(10px);
}
.hero__tag { margin-top: clamp(14px, 2.4vw, 30px); font-size: clamp(1.05rem, 2vw, 1.7rem); font-weight: 300; letter-spacing: -.01em; color: rgba(243, 241, 255, .86); }
.hero__tag .sc { will-change: transform, opacity; }
.hero__meta { position: absolute; top: 92px; display: flex; gap: 10px; align-items: center; color: var(--muted); }
.hero__meta--tl { left: var(--gut); }
.hero__meta--tr { right: var(--gut); }
.hero__bottom { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(20px, 4vh, 40px); display: flex; justify-content: space-between; align-items: flex-end; color: var(--muted); }
.hero__scroll { display: flex; align-items: center; gap: 14px; }
.hero__scroll-line { position: relative; width: 1px; height: 46px; background: var(--line); overflow: hidden; }
.hero__scroll-line i { position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: var(--grad); animation: drip 2s var(--ease) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }
.hero__coords { font-variant-numeric: tabular-nums; }
.hero__coords span { color: var(--fg); display: inline-block; min-width: 6ch; }
@media (max-width: 640px) {
  .hero__meta { top: 76px; }
  .hero__coords { display: none; }
}

/* ==========================================================================
   Morph section (sticky stage)
   ========================================================================== */
.morph { position: relative; height: 480vh; }
.morph__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.morph__stages { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(48px, 12vh, 120px); }
.stage { position: absolute; left: 0; bottom: 0; max-width: min(820px, 100%); }
.stage__label { display: inline-flex; gap: 10px; align-items: center; color: var(--a2); margin-bottom: 18px; }
.stage__label::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.stage__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(2.2rem, 5.6vw, 5.4rem); line-height: .98; letter-spacing: -.035em; text-shadow: 0 2px 40px rgba(0,0,0,.55); }
.js .stage { visibility: hidden; }
.morph__num { position: absolute; top: clamp(90px, 14vh, 140px); right: var(--gut); height: 1em; overflow: hidden; font-family: var(--f-display); font-weight: 800; font-size: clamp(5rem, 15vw, 15rem); line-height: 1; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.22); padding: 0 .06em; }
.morph__num-in { display: flex; flex-direction: column; will-change: transform; }
.morph__num-in span { height: 1em; display: block; }
.morph__rail { position: absolute; right: var(--gut); bottom: clamp(48px, 12vh, 120px); display: grid; gap: 14px; justify-items: end; color: var(--dim); font-size: 10px; }
.morph__rail span { transition: color .4s; }
.morph__rail span.is-on { color: var(--fg); }
.morph__rail-bar { position: absolute; right: -14px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.morph__rail-bar i { position: absolute; inset: 0; background: var(--grad); transform-origin: 50% 0; transform: scaleY(0); }
@media (max-width: 640px) {
  .morph__rail { display: none; }
  .morph__stages { bottom: 84px; }
}

/* ==========================================================================
   Kinetic type
   ========================================================================== */
.kinetic { position: relative; padding: 18vh 0 12vh; overflow: hidden; }
.kinetic__label { position: absolute; top: 8vh; left: var(--gut); }
.kline { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.045em; line-height: .92; font-size: clamp(2.3rem, 10vw, 13rem); white-space: nowrap; }
.kline > span { display: inline-block; will-change: transform; }
.k1 { padding-left: var(--gut); }
.k2 { text-align: right; padding-right: var(--gut); }
.k3 { text-align: center; }
.k4 { text-align: center; }
.k4 > span { transform-origin: 50% 60%; padding: 0 .05em; }
.is-outline > span { color: transparent; -webkit-text-stroke: 1.5px rgba(243,241,255,.8); }
.k3 .sc { will-change: transform, opacity; }
.kinetic__note { max-width: 34ch; margin: 8vh auto 0; padding: 0 var(--gut); text-align: center; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.25rem); }

/* ==========================================================================
   Bands (marquee)
   ========================================================================== */
.bands { position: relative; padding: 10vh 0 16vh; overflow: hidden; }
.band { position: relative; white-space: nowrap; overflow: hidden; padding: 18px 0; }
.band--a { transform: rotate(-3.5deg) scale(1.06); background: var(--grad); color: #07060f; z-index: 2; box-shadow: 0 0 60px color-mix(in srgb, var(--a1) 35%, transparent); }
.band--b { transform: rotate(2.5deg) scale(1.06); margin-top: -14px; background: rgba(14, 13, 26, .65); border-block: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.band__track { display: inline-flex; align-items: center; gap: 2.2rem; will-change: transform; padding-right: 2.2rem; }
.band__track span { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 4.2vw, 3.8rem); letter-spacing: -.03em; text-transform: uppercase; line-height: 1; }
.band__track i { font-style: normal; font-size: clamp(1.2rem, 2.4vw, 2rem); opacity: .7; }
.band--b .band__track span { color: transparent; -webkit-text-stroke: 1px rgba(243,241,255,.75); }
.band--b .band__track i { color: var(--a2); }

/* ==========================================================================
   Pinned horizontal cards
   ========================================================================== */
.horiz { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.horiz__track { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); height: 100%; padding: 0 var(--gut); width: max-content; will-change: transform; }
.horiz__intro { width: clamp(280px, 36vw, 560px); flex: none; display: grid; gap: 22px; padding-right: 3vw; }
.horiz__intro p { max-width: 34ch; }
.horiz__arrow { font-size: 26px; color: var(--a2); animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(14px); } }
.horiz__end { width: 10vw; flex: none; height: 1px; }
.horiz__progress { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(24px, 6vh, 56px); height: 1px; background: var(--line); }
.horiz__progress span { display: block; height: 100%; background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; }

.card {
  --mx: 50%; --my: 30%;
  position: relative; flex: none; width: clamp(270px, 28vw, 420px); height: clamp(400px, 64vh, 580px);
  border-radius: 28px; transform-style: preserve-3d; will-change: transform;
}
.card__in {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; padding: clamp(22px, 2.2vw, 32px);
  display: flex; flex-direction: column;
  background:
    radial-gradient(520px circle at var(--mx) var(--my), color-mix(in srgb, var(--a1) 16%, transparent), transparent 45%),
    linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.015) 55%, rgba(255,255,255,.035));
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 30px 80px -30px rgba(0,0,0,.8);
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: 2; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx) var(--my), var(--a2), transparent 45%), linear-gradient(var(--glass-b), var(--glass-b));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(255,255,255,.1), transparent 60%);
}
.card:hover::after { opacity: 1; }
.card__top { display: flex; justify-content: space-between; color: var(--muted); }
.card__art { position: relative; flex: 1; margin: 18px 0; display: grid; place-items: center; transform: translateZ(40px); }
.card__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.7rem, 2.6vw, 2.5rem); letter-spacing: -.03em; line-height: 1; transform: translateZ(30px); }
.card__txt { margin-top: 12px; color: var(--muted); font-size: 15px; max-width: 30ch; transform: translateZ(20px); }

/* card art: orbit */
.art-orbit i { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); }
.art-orbit i:nth-child(1) { width: 62%; aspect-ratio: 1; animation: spin 9s linear infinite; }
.art-orbit i:nth-child(2) { width: 42%; aspect-ratio: 1; animation: spin 6s linear infinite reverse; }
.art-orbit i:nth-child(3) { width: 22%; aspect-ratio: 1; animation: spin 4s linear infinite; }
.art-orbit i::after { content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 16px var(--a2); }
.art-orbit i:nth-child(2)::after { background: var(--a3); box-shadow: 0 0 16px var(--a3); }
.art-orbit i:nth-child(3)::after { background: #fff; box-shadow: 0 0 16px #fff; width: 7px; height: 7px; margin-left: -3.5px; top: -3.5px; }
.art-orbit b { width: 9%; aspect-ratio: 1; border-radius: 50%; background: var(--grad); box-shadow: 0 0 40px var(--a1); }

/* card art: grid */
.art-grid {
  background-image: radial-gradient(circle, rgba(255,255,255,.55) 1.2px, transparent 1.6px); background-size: 18px 18px;
  -webkit-mask: radial-gradient(160px circle at var(--mx) var(--my), #000 0, rgba(0,0,0,.18) 70%); mask: radial-gradient(160px circle at var(--mx) var(--my), #000 0, rgba(0,0,0,.18) 70%);
  border-radius: 16px;
}
.art-grid::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120px circle at var(--mx) var(--my), color-mix(in srgb, var(--a2) 55%, transparent), transparent 70%); mix-blend-mode: screen; }

/* card art: cube */
.art-cube { perspective: 600px; }
.cube { width: 96px; height: 96px; position: relative; transform-style: preserve-3d; animation: cube 10s linear infinite; }
.cube i { position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--a2) 70%, transparent); background: color-mix(in srgb, var(--a1) 10%, transparent); box-shadow: inset 0 0 30px color-mix(in srgb, var(--a1) 30%, transparent); }
.cube i:nth-child(1) { transform: translateZ(48px); }
.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(48px); }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(48px); }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(48px); }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(48px); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(48px); }
@keyframes cube { from { transform: rotateX(-24deg) rotateY(0); } to { transform: rotateX(-24deg) rotateY(360deg); } }

/* card art: bars */
.art-bars { display: flex; align-items: center; justify-content: center; gap: 6px; }
.art-bars i { width: 5px; height: 70%; border-radius: 4px; background: linear-gradient(var(--a2), var(--a1)); transform: scaleY(.04); transform-origin: 50% 50%; animation: bar 3.2s ease-in-out infinite; }
.art-bars i:nth-child(odd) { animation-duration: 4.1s; }
.art-bars i:nth-child(3n) { animation-duration: 5.3s; }
.art-bars i:nth-child(1) { animation-delay: -.2s } .art-bars i:nth-child(2) { animation-delay: -1.1s } .art-bars i:nth-child(3) { animation-delay: -2.3s }
.art-bars i:nth-child(4) { animation-delay: -.7s } .art-bars i:nth-child(5) { animation-delay: -1.9s } .art-bars i:nth-child(6) { animation-delay: -3s }
.art-bars i:nth-child(7) { animation-delay: -.4s } .art-bars i:nth-child(8) { animation-delay: -2.7s } .art-bars i:nth-child(9) { animation-delay: -1.4s }
.art-bars i:nth-child(10) { animation-delay: -3.6s } .art-bars i:nth-child(11) { animation-delay: -.9s } .art-bars i:nth-child(12) { animation-delay: -2s }
.art-bars i:nth-child(13) { animation-delay: -3.3s } .art-bars i:nth-child(14) { animation-delay: -1.6s }
@keyframes bar { 0%, 100% { transform: scaleY(.04); } 45% { transform: scaleY(.06); } 55% { transform: scaleY(.85); } 65% { transform: scaleY(.1); } }

/* card art: blob */
.art-blob i { position: absolute; width: 58%; aspect-ratio: 1; filter: blur(18px); opacity: .85; mix-blend-mode: screen; animation: blob 9s ease-in-out infinite alternate; background: var(--a1); border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
.art-blob i:nth-child(2) { background: var(--a2); width: 44%; animation-duration: 7s; animation-direction: alternate-reverse; }
@keyframes blob {
  0% { transform: translate(-14%, -8%) rotate(0); border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  50% { transform: translate(10%, 6%) rotate(120deg) scale(1.1); border-radius: 63% 37% 34% 66% / 55% 62% 38% 45%; }
  100% { transform: translate(-4%, 12%) rotate(240deg) scale(.92); border-radius: 37% 63% 51% 49% / 30% 40% 60% 70%; }
}

@media (max-width: 640px) {
  .horiz__intro { width: 84vw; }
  .card { width: 78vw; height: min(68svh, 520px); }
}

/* ==========================================================================
   Stats
   ========================================================================== */
.stats { position: relative; padding: 22vh var(--gut) 14vh; }
.stats__head { display: grid; gap: 22px; max-width: 900px; margin-bottom: 9vh; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.stat { background: rgba(7, 7, 14, .82); padding: clamp(24px, 3vw, 44px) clamp(20px, 2.4vw, 36px); min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; transition: background-color .5s; }
.stat::before { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 80%; background: radial-gradient(closest-side, color-mix(in srgb, var(--a1) 30%, transparent), transparent); opacity: 0; transition: opacity .6s; }
.stat:hover::before { opacity: 1; }
.stat__num { font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 5.6vw, 6.5rem); line-height: .9; letter-spacing: -.05em; font-variant-numeric: tabular-nums; position: relative; display: flex; align-items: baseline; }
.stat__num span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.stat__num small { font-size: .4em; color: var(--muted); margin-left: .08em; letter-spacing: -.02em; }
.stat__label { color: var(--muted); max-width: 22ch; position: relative; }
@media (max-width: 900px) { .stats__grid { grid-template-columns: repeat(2, 1fr); } .stat { min-height: 200px; } }
@media (max-width: 420px) { .stat { padding: 20px 16px; } }

/* ==========================================================================
   Learn the terminal (teaser)
   ========================================================================== */
.learn {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); align-items: center;
  gap: clamp(36px, 5vw, 88px); padding: 18vh var(--gut) 16vh; overflow: hidden;
}
.learn__bg {
  position: absolute; z-index: -1; right: -2vw; top: 50%; transform: translateY(-50%); pointer-events: none; white-space: nowrap;
  font-family: var(--f-display); font-weight: 800; font-size: clamp(8rem, 30vw, 34rem); line-height: .8; letter-spacing: -.06em; text-transform: none;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.07);
}
.learn__bg span { display: inline-block; will-change: transform; }
.learn__copy { position: relative; display: grid; gap: 26px; justify-items: start; min-width: 0; }
.learn__title { font-size: clamp(2.3rem, 4.3vw, 4.6rem); }
.learn__l1 { display: block; }
.learn__l2 { display: block; margin-top: .06em; padding-bottom: .1em; }
.learn__l2 .is-grad { display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.learn__l2.is-typing::after { content: ''; display: inline-block; width: .5em; height: .8em; margin-left: .06em; vertical-align: -.04em; background: var(--a2); box-shadow: 0 0 18px var(--a2); animation: blink 1.05s steps(1) infinite; }
.learn__txt { color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.15rem); max-width: 44ch; }
.learn__spells { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; max-width: 520px; }
.learn__spells li {
  padding: 7px 11px; border-radius: 8px; font-size: 11.5px; text-transform: none; letter-spacing: .02em; color: rgba(243,241,255,.78);
  background: rgba(255,255,255,.035); border: 1px solid var(--line); box-shadow: inset 0 -2px 0 rgba(255,255,255,.04);
  transition: color .5s, border-color .5s, background-color .5s, box-shadow .5s;
}
.learn__spells li.is-more { color: var(--dim); border-style: dashed; }
.learn__spells li.is-done { color: #05050a; background: var(--a2); border-color: transparent; box-shadow: 0 0 22px -4px var(--a2); }
.learn__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin-top: 6px; }
.learn__alt { display: grid; gap: 8px; color: var(--dim); font-size: 10.5px; }
.learn__alt kbd { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin: 0 1px; border-radius: 5px; border: 1px solid var(--glass-b); background: var(--glass); color: var(--fg); font-size: 10.5px; box-shadow: 0 2px 0 rgba(255,255,255,.08); }
.learn__alt kbd:first-child { margin-left: 5px; }
.learn__free { color: var(--muted); transition: color .3s; justify-self: start; }
.learn__free:hover { color: var(--a2); }
@media (hover: none) { .hide-touch { display: none; } }

/* solid + ghost buttons */
.btn--solid .btn__in { background: var(--grad); color: #07060f; font-weight: 600; border-color: rgba(255,255,255,.18); box-shadow: 0 12px 44px -12px color-mix(in srgb, var(--a1) 80%, transparent), 0 0 60px -18px var(--a2); }
.btn--solid:hover .btn__in { background: var(--grad); border-color: rgba(255,255,255,.4); box-shadow: 0 16px 56px -10px color-mix(in srgb, var(--a1) 90%, transparent), 0 0 80px -10px var(--a2); }
.btn__ps { font-family: var(--f-mono); font-size: 13px; font-weight: 500; opacity: .75; }
.btn--ghost .btn__ps { color: var(--a2); opacity: 1; }
.outro__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* fake terminal window */
.learn__stage { position: relative; perspective: 1400px; min-width: 0; }
.lterm { --ink: rgba(236, 234, 255, .88); --hi: var(--a2); position: relative; display: block; transform-style: preserve-3d; will-change: transform; }
.lterm__glow { position: absolute; inset: 8% 4% -6%; z-index: -1; border-radius: 40px; background: radial-gradient(closest-side, color-mix(in srgb, var(--a1) 55%, transparent), transparent), radial-gradient(60% 50% at 80% 80%, color-mix(in srgb, var(--a2) 40%, transparent), transparent); filter: blur(46px); opacity: .7; transition: opacity .6s, background .8s; }
.lterm:hover .lterm__glow { opacity: 1; }
.lterm__win {
  position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 18, 36, .82), rgba(7, 7, 14, .9));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 50px 120px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  transition: border-color .5s, box-shadow .5s;
}
.lterm:hover .lterm__win { border-color: color-mix(in srgb, var(--hi) 45%, rgba(255,255,255,.12)); }
.lterm__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025); }
.lterm__bar .term__dots { flex: none; }
.lterm__title { flex: 1; min-width: 0; text-align: center; color: var(--muted); text-transform: none; font-size: 11.5px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lterm__xp { flex: none; color: var(--dim); font-size: 10.5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; }
.lterm__xp b { color: var(--hi); font-weight: 500; font-variant-numeric: tabular-nums; transition: color .6s; }
.lterm__body { display: block; height: clamp(340px, 46vh, 450px); overflow: hidden; padding: 18px 20px; font-family: var(--f-mono); font-size: 13px; line-height: 1.62; color: var(--ink); transition: color .6s; }
.lterm__out { display: block; }
.ll { display: block; white-space: pre; min-height: 1.62em; }
.ll.in { animation: tl-in .3s var(--ease) both; }
.ll .p { color: var(--a1); transition: color .6s; }
.ll .h { color: var(--hi); transition: color .6s; }
.ll .d { color: var(--dim); }
.ll .ok { color: #7dffb3; }
.ll .xp { color: #05050a; background: var(--hi); padding: 0 6px; border-radius: 4px; font-size: .86em; transition: background-color .6s; }
.ll .k { display: none; min-width: .6em; background: var(--hi); animation: blink 1.05s steps(1) infinite; border-radius: 1px; }
.ll.is-active .k { display: inline-block; }
.lterm__foot { display: flex; align-items: center; gap: 16px; padding: 11px 16px 13px; border-top: 1px solid var(--line); color: var(--dim); font-size: 10.5px; }
.lterm__mission { flex: none; white-space: nowrap; }
.lterm__mission b { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.lterm__mission em { font-style: normal; color: var(--muted); }
.lterm__meter { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.lterm__meter i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 10px var(--a2); transition: transform .9s var(--ease); }
.lterm__scan { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: repeating-linear-gradient(180deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
/* `color 0a` — phosphor mode */
.lterm.is-green { --ink: #4dff8e; --hi: #4dff8e; }
.lterm.is-green .lterm__body { text-shadow: 0 0 8px rgba(77,255,142,.45); }
.lterm.is-green .ll .p, .lterm.is-green .ll .d { color: rgba(77,255,142,.6); }
.lterm.is-green .ll .ok { color: #b9ffd2; }
.lterm.is-green .lterm__glow { background: radial-gradient(closest-side, rgba(77,255,142,.35), transparent), radial-gradient(60% 50% at 80% 80%, color-mix(in srgb, var(--a2) 40%, transparent), transparent); }
.lterm.is-green .lterm__meter i { background: #4dff8e; box-shadow: 0 0 10px #4dff8e; }
.lterm.flash .lterm__body { animation: crt .5s steps(2) 1; }
@keyframes crt { 0% { filter: brightness(2.4) contrast(1.4); } 40% { filter: brightness(.4); } 100% { filter: none; } }

@media (max-width: 1024px) {
  .learn { grid-template-columns: minmax(0, 1fr); padding-top: 14vh; }
  .learn__bg { top: 30%; }
}
@media (max-width: 640px) {
  .learn { gap: 44px; padding-bottom: 12vh; }
  .learn__title { font-size: clamp(2.05rem, 9.4vw, 3rem); }
  .lterm__body { height: 330px; padding: 14px 14px; font-size: 10.6px; }
  .lterm__bar { gap: 10px; padding: 10px 12px; }
  .lterm__title { font-size: 10px; }
  .lterm__foot { gap: 12px; padding: 10px 12px 12px; font-size: 9.5px; }
  .learn__spells li { padding: 6px 9px; font-size: 11px; }
  .learn__actions { gap: 18px; }
}

/* ==========================================================================
   Outro + footer
   ========================================================================== */
.outro { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 30px; padding: 12vh var(--gut); }
.outro__big { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 9.4vw, 13rem); line-height: .9; letter-spacing: -.05em; white-space: nowrap; perspective: 800px; }
.outro__big .sc { background: linear-gradient(180deg, #fff 30%, color-mix(in srgb, var(--a3) 45%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; transform-origin: 50% 100%; }
.outro__sub { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.3rem); max-width: 36ch; }
.btn { position: relative; display: inline-flex; padding: 0; border-radius: 999px; }
.btn__in {
  display: inline-flex; align-items: center; gap: 10px; padding: 18px 30px; border-radius: 999px; font-weight: 500; font-size: 15px;
  background: rgba(255,255,255,.06); border: 1px solid var(--glass-b); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.btn:hover .btn__in { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); box-shadow: 0 0 40px -6px color-mix(in srgb, var(--a1) 70%, transparent); }
.foot { position: relative; display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: center; padding: 28px var(--gut) 34px; border-top: 1px solid var(--line); color: var(--dim); }
.foot .mono { font-size: 11px; }
.foot__hint kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin: 0 4px; border-radius: 6px; border: 1px solid var(--glass-b); background: var(--glass); color: var(--fg); font-size: 12px; box-shadow: 0 2px 0 rgba(255,255,255,.08); }
.foot__mid { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; }
.foot__learn { display: inline-flex; align-items: center; gap: 7px; text-transform: none; letter-spacing: .02em; color: var(--muted); padding: 4px 10px 4px 9px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.02); transition: color .3s, border-color .3s, box-shadow .4s; }
.foot__ps { color: var(--a2); }
.foot__caret { display: inline-block; width: 7px; height: 12px; background: var(--a2); box-shadow: 0 0 8px var(--a2); animation: blink 1.05s steps(1) infinite; }
.foot__learn:hover { color: var(--fg); border-color: var(--glass-b); box-shadow: 0 0 24px -6px var(--a2); }
@media (max-width: 640px) { .foot { justify-content: center; text-align: center; } }

/* ==========================================================================
   Terminal
   ========================================================================== */
.term-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(3, 3, 8, .45); opacity: 0; pointer-events: none; transition: opacity .45s var(--ease); }
.term-open .term-backdrop { opacity: 1; pointer-events: auto; }
.term {
  position: fixed; z-index: 101; top: 16px; left: 50%; width: min(880px, calc(100% - 32px)); height: min(58vh, 560px);
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 18, 36, .74), rgba(8, 8, 16, .82));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.4), 0 0 80px -30px var(--a1);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  transform: translate3d(-50%, calc(-100% - 40px), 0); visibility: hidden;
  transition: transform .6s var(--ease), visibility 0s linear .6s;
}
.term-open .term { transform: translate3d(-50%, 0, 0); visibility: visible; transition: transform .6s var(--ease), visibility 0s; }
.term__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025); }
.term__dots { display: flex; gap: 7px; }
.term__dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3850; }
.term__dots i:nth-child(1) { background: var(--a3); } .term__dots i:nth-child(2) { background: var(--a1); } .term__dots i:nth-child(3) { background: var(--a2); }
.term__title { flex: 1; text-align: center; color: var(--muted); text-transform: none; font-size: 12px; }
.term__close { color: var(--dim); font-size: 11px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }
.term__close:hover { color: var(--fg); border-color: var(--glass-b); }
.term__body { flex: 1; overflow-y: auto; padding: 16px 18px 20px; font-family: var(--f-mono); font-size: 13.5px; line-height: 1.65; overscroll-behavior: contain; scrollbar-width: thin; }
.term__out .tl { white-space: pre-wrap; word-break: break-word; color: rgba(236, 234, 255, .86); animation: tl-in .35s var(--ease) both; }
@keyframes tl-in { from { opacity: 0; transform: translateY(4px); } }
.tl .c1 { color: var(--a1); } .tl .c2 { color: var(--a2); } .tl .c3 { color: var(--a3); } .tl .dim { color: var(--dim); } .tl .err { color: #ff6b8b; } .tl .ok { color: #7dffb3; }
.tl .cmd { color: var(--fg); }
.tl a.c2 { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--a2) 45%, transparent); text-underline-offset: 3px; }
.tl a.c2:hover { text-decoration-color: var(--a2); }
.tl.echo { color: var(--dim); }
.tl .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 500; }
.term__line { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; margin-top: 4px; cursor: text; }
.term__prompt { text-transform: none; font-size: 13.5px; color: var(--a2); white-space: nowrap; letter-spacing: 0; }
.term__prompt b { color: var(--dim); font-weight: 400; } .term__prompt em { font-style: normal; color: var(--a1); }
.term__field { position: relative; flex: 1; min-width: 40%; text-transform: none; font-size: 13.5px; letter-spacing: 0; white-space: pre; color: var(--fg); min-height: 1.65em; }
.term__caret { display: inline-block; min-width: .6em; background: var(--a2); color: #05050a; animation: blink 1.05s steps(1) infinite; border-radius: 1px; }
@keyframes blink { 50% { background: transparent; color: var(--fg); } }
.term__input { position: absolute; inset: 0; width: 100%; opacity: 0; border: 0; outline: 0; background: transparent; color: transparent; font: inherit; caret-color: transparent; }
.term.is-gaming .term__line { display: none; }
.snake { margin: 10px 0 6px; display: grid; gap: 8px; justify-items: start; }
.snake canvas { border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.35); max-width: 100%; touch-action: none; }
.snake__hud { color: var(--muted); font-size: 12px; }

/* toast */
.toast {
  position: fixed; z-index: 130; left: 0; right: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 32px); bottom: 28px; opacity: 0;
  padding: 14px 22px 14px 18px; border-radius: 14px; display: flex; align-items: center; gap: 12px;
  background: rgba(16, 15, 30, .78); border: 1px solid var(--glass-b); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  font-family: var(--f-mono); font-size: 13px; box-shadow: 0 20px 60px -10px rgba(0,0,0,.8), 0 0 40px -10px var(--a1);
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 12px var(--a2); }

/* warp flash */
.warping .vignette { animation: warpv 2.6s ease-in-out; }
@keyframes warpv { 0%, 100% { background: radial-gradient(130% 95% at 50% 45%, transparent 50%, rgba(2,2,6,.7)); } 30%, 70% { background: radial-gradient(60% 50% at 50% 50%, transparent 30%, rgba(2,2,6,.9)); } }

/* `cmd` unlock: glitch flash */
body.glitching main, body.glitching .nav { animation: glitch .62s steps(1) 1; }
body.glitching::after {
  content: ''; position: fixed; inset: 0; z-index: 95; pointer-events: none; mix-blend-mode: screen;
  background:
    linear-gradient(transparent 0 18%, color-mix(in srgb, var(--a2) 55%, transparent) 18% 21%, transparent 21% 47%, color-mix(in srgb, var(--a3) 45%, transparent) 47% 48.5%, transparent 48.5% 72%, rgba(255,255,255,.5) 72% 72.6%, transparent 72.6%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px);
  animation: glitchbars .62s steps(1) 1 both;
}
@keyframes glitch {
  0% { transform: translate3d(-6px, 0, 0) skewX(-4deg); filter: hue-rotate(80deg) saturate(2); }
  15% { transform: translate3d(8px, 2px, 0); filter: invert(.08) hue-rotate(-60deg); clip-path: inset(10% 0 40% 0); }
  30% { transform: translate3d(-3px, -2px, 0) skewX(6deg); filter: none; clip-path: inset(50% 0 5% 0); }
  45% { transform: translate3d(4px, 0, 0); filter: hue-rotate(160deg) brightness(1.4); clip-path: none; }
  60% { transform: translate3d(-2px, 1px, 0); filter: none; }
  80% { transform: translate3d(1px, 0, 0); }
  100% { transform: none; filter: none; clip-path: none; }
}
@keyframes glitchbars {
  0% { opacity: 1; transform: translateY(0); } 20% { opacity: .2; transform: translateY(-12%); } 35% { opacity: 1; transform: translateY(9%); }
  55% { opacity: .5; transform: translateY(-4%); } 75% { opacity: .9; transform: translateY(16%); } 100% { opacity: 0; transform: none; }
}

/* no gsap fallback: just show everything */
.no-gsap .stage { visibility: visible; position: relative; margin-top: 30px; }
.no-gsap .morph { height: auto; }
.no-gsap .morph__sticky { position: relative; height: auto; padding: 20vh 0; }
.no-gsap .morph__stages { position: relative; bottom: auto; }
.no-gsap .horiz { height: auto; overflow-x: auto; }
.no-gsap .horiz__track { padding-block: 10vh; }

/* Reduced motion = calmer, not dead. Ambient loops keep running, slower and
   smaller; only the vestibular stuff (grain jitter, CRT flash) is removed. */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .lterm.flash .lterm__body { animation: none; }
  .art-orbit i:nth-child(1) { animation-duration: 27s; }
  .art-orbit i:nth-child(2) { animation-duration: 18s; }
  .art-orbit i:nth-child(3) { animation-duration: 12s; }
  .cube { animation-duration: 30s; }
  .art-bars i { animation-duration: 9s !important; }
  .art-blob i { animation-duration: 24s; }
  .art-blob i:nth-child(2) { animation-duration: 19s; }
  .nav__mark { animation-duration: 18s; }
  .hero__scroll-line i { animation-duration: 4s; }
  .horiz__arrow { animation-duration: 3.6s; }
  .live-dot, .nav__new { animation-duration: 4s; }
}

/* ==========================================================================
   Mobile burger + overlay menu (shown when the desktop nav pill is hidden)
   ========================================================================== */
.nav__burger { display: none; }
@media (max-width: 860px) {
  .nav__burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 46px; margin: -8px -10px -8px 0; padding: 0 11px; border-radius: 12px;
    pointer-events: auto; -webkit-tap-highlight-color: transparent;
  }
  .nav__burger span { display: block; height: 1.5px; width: 24px; border-radius: 2px; background: var(--fg); transition: transform .4s var(--ease), opacity .3s, width .4s var(--ease); transform-origin: center; }
  .nav__burger span:nth-child(2) { width: 17px; align-self: flex-end; }
  .menu-open .nav__burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .menu-open .nav__burger span:nth-child(2) { opacity: 0; width: 24px; }
  .menu-open .nav__burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

.menu {
  position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; justify-content: center;
  padding: max(96px, env(safe-area-inset-top)) var(--gut) max(40px, env(safe-area-inset-bottom));
  background: linear-gradient(170deg, rgba(10,9,20,.86), rgba(5,5,10,.94));
  backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
  opacity: 0; visibility: hidden; transform: translateY(-2%);
  transition: opacity .5s var(--ease), transform .55s var(--ease), visibility 0s linear .55s;
}
.menu::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background: radial-gradient(60vmax 60vmax at 80% 10%, color-mix(in srgb, var(--a1) 24%, transparent), transparent 70%),
              radial-gradient(50vmax 50vmax at 10% 90%, color-mix(in srgb, var(--a2) 18%, transparent), transparent 70%);
}
.menu-open .menu { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease), transform .55s var(--ease), visibility 0s; }
/* keep the header (logo + burger X) above the overlay so close is always visible */
.menu-open .nav { z-index: 120; }
.menu__inner { display: flex; flex-direction: column; gap: clamp(28px, 7vh, 60px); }
.menu__nav { display: grid; gap: clamp(6px, 1.4vh, 14px); }
.menu__nav > a {
  display: flex; align-items: baseline; gap: 14px; padding: 6px 2px; position: relative;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.04em; line-height: 1;
  font-size: clamp(1.75rem, 8.8vw, 3.6rem); color: var(--fg); white-space: nowrap;
  opacity: 0; transform: translateY(18px);
}
.menu-open .menu__nav > * { animation: menuIn .6s var(--ease) forwards; }
.menu-open .menu__nav > :nth-child(1) { animation-delay: .08s; }
.menu-open .menu__nav > :nth-child(2) { animation-delay: .13s; }
.menu-open .menu__nav > :nth-child(3) { animation-delay: .18s; }
.menu-open .menu__nav > :nth-child(4) { animation-delay: .23s; }
.menu-open .menu__nav > :nth-child(5) { animation-delay: .28s; }
.menu-open .menu__nav > :nth-child(6) { animation-delay: .33s; }
.menu-open .menu__nav > :nth-child(7) { animation-delay: .38s; }
@keyframes menuIn { to { opacity: 1; transform: none; } }
.menu__nav > a .mono { font-size: 12px; color: var(--a2); opacity: .8; flex: none; align-self: center; }
.menu__nav > a:active { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.menu__learn { position: relative; }
.menu__learn .nav__new { position: static; margin-left: 4px; align-self: center; }
.menu__foot { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.menu__theme { display: inline-flex; align-items: center; gap: 12px; color: var(--dim); margin-top: calc(-1 * clamp(14px, 4vh, 40px)); }
.foot__theme { margin: -6px -4px; }

/* ==========================================================================
   Touch affordance: floating button that opens the hidden terminal
   ========================================================================== */
.term-fab {
  position: fixed; z-index: 85; right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--a2);
  background: rgba(14, 13, 26, .6); border: 1px solid var(--glass-b);
  backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.8), 0 0 30px -14px var(--a2), inset 0 1px 0 rgba(255,255,255,.1);
  -webkit-tap-highlight-color: transparent; transition: transform .5s var(--ease), opacity .4s, box-shadow .4s;
  opacity: .92;
}
.term-fab[hidden] { display: none; } /* desktop keeps the ` / Ctrl+K shortcut */
.term-fab::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--a2) 30%, transparent); opacity: 0; transition: opacity .4s; }
.term-fab:active { transform: scale(.9); }
.term-open .term-fab, .menu-open .term-fab { opacity: 0; pointer-events: none; transform: scale(.6); }
/* tucked away while scrolling down and near the footer; back on scroll-up / when idle */
.term-fab.is-tucked { opacity: 0; pointer-events: none; transform: translateY(18px) scale(.82); }

/* visibility helpers for touch vs fine-pointer copy */
.only-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .only-touch { display: inline; }
  .only-fine { display: none; }
}

/* lock background scroll while an overlay owns the screen (no Lenis on touch) */
.menu-open, .menu-open body { overflow: hidden; }
@media (pointer: coarse) { .term-open body { overflow: hidden; } }

/* ==========================================================================
   Phone tuning: typography, gutters, safe areas, section rhythm
   ========================================================================== */
@media (max-width: 560px) {
  :root { --gut: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); }

  /* hero wordmark: leave breathing room at the edges */
  .hero__word { font-size: clamp(2.2rem, 10vw, 4rem); }
  .hero__tag { font-size: clamp(1rem, 4.4vw, 1.4rem); }
  .hero__meta--tr .hide-sm { display: none; }

  /* kinetic lines: sized so even the longest line ("a language") stays on
     screen through its parallax drift, reading as intentional not clipped */
  .kline { font-size: clamp(1.5rem, 8.6vw, 4.4rem); line-height: 1.02; }
  .k1 { padding-left: var(--gut); }
  .k2 { padding-right: var(--gut); }
  .kinetic { padding: 14vh 0 10vh; }
  .kinetic__label { top: 6vh; }
  .kinetic__note { margin-top: 6vh; max-width: 30ch; }

  /* morph stage titles */
  .stage__title { font-size: clamp(1.9rem, 8.4vw, 3.4rem); }
  .morph__num { font-size: clamp(4rem, 22vw, 9rem); top: clamp(80px, 12vh, 120px); }

  /* bands sit tighter */
  .band__track span { font-size: clamp(1.6rem, 8vw, 2.6rem); }

  /* learn title + teaser already have rules; give the heading section air */
  .learn { padding-top: 12vh; }
  .outro__big { font-size: clamp(2.6rem, 15vw, 6rem); white-space: normal; }
  .outro__sub { max-width: 26ch; }

  /* magnetic buttons: comfortable tap targets, full-ish width primary */
  .btn__in { padding: 16px 24px; }
  .learn__actions .btn--solid { width: 100%; }
  .learn__actions .btn--solid .btn__in { width: 100%; justify-content: center; }
}

/* small phones */
@media (max-width: 380px) {
  .nav__time { display: none; }
  .hero__word { font-size: clamp(2rem, 11vw, 3.4rem); }
}

/* ==========================================================================
   Pinned horizontal -> graceful vertical glass stack on touch devices
   (JS skips the pin/scrub on coarse pointers; CSS lays the cards out here)
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
  .horiz { height: auto; overflow: visible; padding: 4vh 0 2vh; }
  .horiz__track { flex-direction: column; align-items: stretch; width: auto; height: auto; gap: 20px; padding: 0 var(--gut); transform: none !important; will-change: auto; }
  .horiz__intro { width: auto; padding-right: 0; gap: 18px; margin-bottom: 6px; }
  .horiz__intro p { max-width: 32ch; }
  .horiz__arrow { font-size: 30px; }
  .card { width: 100%; height: auto; min-height: 56vh; transform: none; }
  .card__in { backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); }
  .card__txt { max-width: none; }
  .horiz__end, .horiz__progress { display: none; }

  /* lighten the heaviest blurs so scrolling stays smooth */
  .band--b { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .lterm__win, .term { backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
}

/* landscape phones: keep the hero usable when short */
@media (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
  .hero { min-height: 100svh; }
  .hero__word { font-size: clamp(2rem, 11vh, 5rem); }
  .menu__nav > a { font-size: clamp(1.6rem, 8vh, 3rem); }
  .menu { justify-content: flex-start; padding-top: max(80px, env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  .menu__nav > * { animation: none !important; opacity: 1; transform: none; }
}

/* ==========================================================================
   Mobile round 2: nav backdrop, section rhythm, stats, teaser, terminal
   ========================================================================== */
@media (max-width: 860px) {
  /* slim header; once past the hero it gets a blurred bar that fades out at
     its lower edge, so content never collides with the logo / clock / burger */
  .nav { padding: max(12px, env(safe-area-inset-top)) var(--gut) 12px; }
  .nav::after {
    content: ''; position: absolute; inset: 0 0 -22px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease);
    background: linear-gradient(180deg, rgba(6,6,12,.86), rgba(6,6,12,.74) calc(100% - 22px), rgba(6,6,12,0));
    backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent);
  }
  .nav.is-solid::after { opacity: 1; }
  .nav.is-solid::before, .menu-open .nav::after, .menu-open .nav::before { opacity: 0; }
  .hero__meta { top: 70px; }

  /* menu / anchor jumps land below the header, not under it */
  #tools, #type, #obsessions, #numbers, #learn, #outro { scroll-margin-top: 58px; }

  /* iOS zooms the page when an input under 16px gets focus (input is invisible) */
  .term__input { font-size: 16px; }
}

@media (max-width: 560px) {
  /* tighter section rhythm: no blank screens between sections */
  .bands { padding: 7vh 0 6vh; }
  .stats { padding: 9vh var(--gut) 6vh; }
  .stats__head { margin-bottom: 30px; gap: 16px; }
  .learn { padding-top: 8vh; padding-bottom: 7vh; gap: 34px; }
  .outro { min-height: 0; padding: 11vh var(--gut) 9vh; gap: 24px; }

  /* stats: four separate glass tiles (no shared grey grid backing that
     flashes through while a tile fades in) with compact heights */
  .stats__grid { background: none; border: 0; border-radius: 0; overflow: visible; gap: 10px; }
  .stat { min-height: 0; padding: 18px 16px 16px; gap: 22px; border-radius: 18px; border: 1px solid var(--line); background: rgba(10, 10, 20, .8); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
  .stat__num { font-size: clamp(2.5rem, 12vw, 3.4rem); }
  .stat__label { font-size: 14px; line-height: 1.4; }

  /* learn teaser: compact window, no ghost glyph behind the copy */
  .learn__bg { display: none; }
  .lterm__body { height: 200px; padding: 12px 14px; }

  /* footer: the touch hint is itself a button */
  .foot { padding-bottom: max(30px, env(safe-area-inset-bottom)); }
}

.foot__tap { padding: 10px 4px; margin: -10px 0; -webkit-tap-highlight-color: transparent; }
.foot__tap kbd { color: var(--a2); min-width: 30px; }
.foot__tap:active kbd { border-color: var(--a2); box-shadow: 0 0 16px -4px var(--a2); }

/* terminal on touch: size to the *visible* viewport so the prompt stays above
   the on-screen keyboard (--vvh / --vvt come from visualViewport in JS) */
@media (pointer: coarse) {
  .term {
    top: calc(var(--vvt, 0px) + max(10px, env(safe-area-inset-top)));
    height: min(560px, calc(var(--vvh, 100dvh) - 20px - env(safe-area-inset-top)));
  }
  .term__body { font-size: 12.5px; padding: 14px 14px 18px; }
  .term__prompt, .term__field { font-size: 12.5px; }
  .term__close { padding: 8px 12px; }
}

/* ==========================================================================
   Round 3: touch-playable particles, morph stage cue, living glass cards
   ========================================================================== */

/* ---- hero + morph as a touch surface ---------------------------------- */
.hero, .morph__sticky {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
/* while a hold-drag owns the finger: no pull-to-refresh, no rubber band */
html.is-gesturing, html.is-gesturing body { overscroll-behavior: none; }

.touchfx { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.touchfx__ping {
  position: absolute; left: 0; top: 0; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--a2) 80%, #fff);
  box-shadow: 0 0 24px color-mix(in srgb, var(--a2) 60%, transparent), inset 0 0 24px color-mix(in srgb, var(--a1) 50%, transparent);
  animation: ping .9s cubic-bezier(.2, .7, .3, 1) forwards;
}
.touchfx__ping::after { content: ''; position: absolute; inset: 42%; border-radius: 50%; background: #fff; box-shadow: 0 0 22px 8px var(--a2); opacity: .9; animation: pingcore .5s ease-out forwards; }
@keyframes ping { from { transform: scale(.08); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.touchfx__ping.is-calm { animation-duration: 1.2s; width: 100px; height: 100px; margin: -50px 0 0 -50px; }
@keyframes pingcore { to { opacity: 0; transform: scale(.4); } }
.touchfx__hold {
  position: absolute; left: 0; top: 0; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--a2) 38%, transparent), color-mix(in srgb, var(--a1) 14%, transparent) 60%, transparent);
  border: 1px dashed color-mix(in srgb, var(--a2) 55%, transparent);
  transition: opacity .25s;
}
.touchfx__hold.is-on { opacity: 1; animation: holdspin 3s linear infinite; }
@keyframes holdspin { to { rotate: 360deg; } }

/* one-time touch hint under "scroll to wake it up" */
.hero__scroll-txt { display: grid; gap: 6px; }
.hero__hint { align-items: center; gap: 8px; color: var(--a2); opacity: .9; transition: opacity .8s var(--ease), transform .8s var(--ease); }
@media (hover: none) and (pointer: coarse) { .hero__hint.only-touch { display: inline-flex; } }
.hero__hint i { width: 6px; height: 6px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 10px var(--a2); animation: pulse 1.6s ease-in-out infinite; }
.hero__hint.is-gone { opacity: 0; transform: translateY(6px); }

/* ---- morph: stage counter that promises more is coming ---------------- */
.morph__step { display: none; }
@media (max-width: 640px), (hover: none) and (pointer: coarse) {
  .morph__rail { display: none; }
  .morph__step {
    position: absolute; left: var(--gut); bottom: max(26px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px;
    color: var(--muted); font-size: 10.5px; padding: 8px 12px; border-radius: 999px;
    background: rgba(10, 10, 20, .5); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .morph__stages { bottom: 84px; }
}
.morph__dots { display: inline-flex; gap: 5px; }
.morph__dots i { width: 14px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.16); transition: background-color .4s, width .4s var(--ease); }
.morph__dots i.is-on { background: var(--a2); box-shadow: 0 0 8px var(--a2); width: 22px; }
.morph__dots i.is-past { background: color-mix(in srgb, var(--a2) 50%, transparent); }
.morph__count { color: var(--fg); font-variant-numeric: tabular-nums; }
.morph__count b { font-weight: 500; color: var(--a2); }
.morph__cue { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; transition: opacity .4s; }
.morph__cue em { font-style: normal; color: var(--a2); display: inline-block; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .morph__cue em { animation-duration: 2.8s; } }

/* ---- glass cards: shared ---------------------------------------------- */
.card__art { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.card__hint {
  position: absolute; right: 0; bottom: -6px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; pointer-events: none;
  font-size: 9.5px; letter-spacing: .1em; color: var(--muted); padding: 4px 8px; border-radius: 999px;
  background: rgba(8, 8, 16, .78); border: 1px solid var(--line); transition: opacity .6s, color .4s;
}
.card__hint::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 8px var(--a2); animation: pulse 2s ease-in-out infinite; }
.card__art.was-touched .card__hint { opacity: .6; }
.card.is-off .card__art *, .card.is-off .card__art *::before, .card.is-off .card__art *::after { animation-play-state: paused !important; }

/* ---- 01 Motion: JS-driven orbits with comet trails --------------------- */
.art-orbit i::before {
  content: ''; position: absolute; inset: -2px; border-radius: 50%; opacity: var(--trail, .25);
  background: conic-gradient(from 270deg, transparent, var(--tc, var(--a2)) 90deg, transparent 90deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.art-orbit i:nth-child(2)::before { --tc: var(--a3); background: conic-gradient(from 0deg, var(--tc), transparent 90deg); }
.art-orbit i:nth-child(3)::before { --tc: #fff; }
.cards-live .art-orbit i, .cards-live .cube, .cards-live .art-bars i { animation: none !important; }
.cards-live .art-orbit i { will-change: transform; }
.art-orbit b { will-change: transform; }

/* ---- 02 Interaction: canvas dot field --------------------------------- */
.art-grid canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 16px; }
.cards-live .art-grid { background: none; -webkit-mask: none; mask: none; touch-action: pan-y; }
.cards-live .art-grid::after { display: none; }

/* ---- 03 3D: draggable cube that can explode --------------------------- */
.art-cube { cursor: grab; touch-action: pan-y; }
.art-cube.is-dragging { cursor: grabbing; }
.cube { --ex: 0; }
.cube i:nth-child(1) { transform: translateZ(calc(48px + var(--ex) * 58px)) rotate(calc(var(--ex) * 14deg)); }
.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(calc(48px + var(--ex) * 58px)) rotate(calc(var(--ex) * -12deg)); }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(48px + var(--ex) * 58px)) rotate(calc(var(--ex) * 18deg)); }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(48px + var(--ex) * 58px)) rotate(calc(var(--ex) * -16deg)); }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(calc(48px + var(--ex) * 58px)) rotate(calc(var(--ex) * 10deg)); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(48px + var(--ex) * 58px)) rotate(calc(var(--ex) * -20deg)); }

/* ---- 04 Sound of silence ---------------------------------------------- */
.art-bars { touch-action: pan-y; }
.cards-live .art-bars i { transform: scaleY(.1); will-change: transform; }

/* ---- 05 Entropy -------------------------------------------------------- */
.art-blob canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.art-blob i { transition: opacity .5s; }
.blob__state {
  position: absolute; left: 0; top: 0; z-index: 3; font-size: 10px; letter-spacing: .16em; color: var(--a2);
  opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s var(--ease);
}
.blob__state.is-on { opacity: 1; transform: none; }
.blob__state::before { content: '\25CF\00a0'; font-size: 8px; vertical-align: 1px; }
.art-blob i { transition: opacity .6s, scale .7s cubic-bezier(.16, 1, .3, 1); }
.art-blob.is-order i { scale: .72; }
.art-blob.is-scattered i { opacity: 0; scale: 1.4; transition-duration: .35s, .5s; }

/* touch: the sticky morph is ~25% shorter so a stage change never feels stuck */
@media (hover: none) and (pointer: coarse) { .morph { height: 380vh; } }

/* 03 cube: a solid of tinted glass — violet->cyan faces, a fine etched grid,
   an inset "chip" outline and edge glow; each face tinted a little differently
   so the rotation always reads. No digits. */
.cube { width: 104px; height: 104px; }
.cube i {
  --fa: var(--a1); --fb: var(--a2); --ang: 135deg; --lift: 0%; --glow: 0;
  overflow: hidden; border-radius: 4px; font-size: 0;
  background:
    linear-gradient(var(--ang), rgba(255,255,255,calc(.14 + var(--glow) * .1)), transparent 42%),
    linear-gradient(var(--ang), color-mix(in srgb, var(--fa) 40%, transparent), color-mix(in srgb, var(--fb) 22%, transparent)),
    color-mix(in srgb, #fff var(--lift), rgba(10, 8, 24, .35));
  border: 1px solid color-mix(in srgb, var(--a2) 75%, #fff);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.07),
    inset 0 0 26px color-mix(in srgb, var(--fb) 48%, transparent),
    0 0 calc(14px + var(--glow) * 22px) color-mix(in srgb, var(--a2) calc(28% + var(--glow) * 40%), transparent);
  backface-visibility: visible;
  transition: box-shadow .35s, border-color .35s;
}
/* fine etched grid, brightest at the edges */
.cube i::before {
  content: ''; position: absolute; inset: 0; opacity: .55;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.13) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.13) 0 1px, transparent 1px 13px);
  -webkit-mask: radial-gradient(closest-side, transparent 35%, #000 100%); mask: radial-gradient(closest-side, transparent 35%, #000 100%);
}
/* inset chip outline + a soft core of light */
.cube i::after {
  content: ''; position: absolute; inset: 26%; border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--fb) 70%, #fff 20%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--fb) 40%, transparent), transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--fb) 60%, transparent), inset 0 0 8px color-mix(in srgb, var(--fa) 50%, transparent);
  opacity: .8;
}
.cube i:nth-child(1) { transform: translateZ(calc(52px + var(--ex) * 62px)) rotate(calc(var(--ex) * 14deg)); }
.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(calc(52px + var(--ex) * 62px)) rotate(calc(var(--ex) * -12deg)); --fa: var(--a3); --fb: var(--a1); --ang: 225deg; }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(52px + var(--ex) * 62px)) rotate(calc(var(--ex) * 18deg)); --fa: var(--a2); --fb: var(--a1); --ang: 160deg; }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(52px + var(--ex) * 62px)) rotate(calc(var(--ex) * -16deg)); --fa: var(--a1); --fb: var(--a3); --ang: 110deg; }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(calc(52px + var(--ex) * 62px)) rotate(calc(var(--ex) * 10deg)); --fa: var(--a2); --fb: var(--a2); --lift: 14%; }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(52px + var(--ex) * 62px)) rotate(calc(var(--ex) * -20deg)); --fa: var(--a1); --fb: var(--a1); --ang: 315deg; }
.cube.is-hot i, .art-cube.is-dragging .cube i { --glow: 1; border-color: color-mix(in srgb, var(--a2) 60%, #fff); }
.cube__floor { position: absolute; left: 50%; top: 50%; width: 150px; height: 34px; margin: 78px 0 0 -75px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--a1) 45%, transparent), color-mix(in srgb, var(--a2) 12%, transparent) 70%, transparent); filter: blur(6px); opacity: .8; transition: opacity .3s; }
.art-cube.is-dragging .cube__floor { opacity: 1; }

/* The hover tilt rotates .card__in inside the card's preserve-3d context, so
   half of it dips behind the card's own plane and hit-testing landed on the
   empty <article>, swallowing clicks/drags meant for the art. Let the shell
   be transparent to hit-testing; its content stays interactive (events still
   bubble to the card for tilt + spotlight). */
.card { pointer-events: none; }
.card__in { pointer-events: auto; }

/* ==========================================================================
   Round 4: the whole glass card is the touch surface
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
  /* a long press must never select the "01 / 05" counter or pop a callout */
  .card, .card * {
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  }
  /* finger on the cube itself = spin it in any direction (no page scroll from
     that box; the card's text area still scrolls normally) */
  .art-cube { touch-action: none; }
}
/* glow pulse under the finger on every tap / hold */
.card__ping {
  position: absolute; left: 0; top: 0; z-index: 4; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, #fff 55%, var(--a2)), color-mix(in srgb, var(--a2) 45%, transparent) 38%, color-mix(in srgb, var(--a1) 18%, transparent) 70%, transparent);
  mix-blend-mode: screen; animation: cardping .7s cubic-bezier(.2, .7, .3, 1) forwards;
}
.card__ping.is-hold { width: 140px; height: 140px; margin: -70px 0 0 -70px; animation-duration: 1s; }
.card__ping.is-calm { animation-name: cardping-calm; animation-duration: .9s; }
@keyframes cardping { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@keyframes cardping-calm { from { transform: scale(.7); opacity: .9; } to { transform: scale(1); opacity: 0; } }

/* ==========================================================================
   Tools (cards, menu chips and footer row are rendered from /assets/tools.js)
   ========================================================================== */
.tools { position: relative; padding: 16vh var(--gut) 12vh; }
.tools::before {
  content: ''; position: absolute; inset: 4% 0 0; z-index: -1; pointer-events: none; opacity: .32;
  background:
    radial-gradient(40% 46% at 18% 62%, color-mix(in srgb, var(--a1) 22%, transparent), transparent 70%),
    radial-gradient(36% 40% at 86% 78%, color-mix(in srgb, var(--a2) 14%, transparent), transparent 70%);
}
.tools__head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: end; gap: 22px clamp(28px, 5vw, 80px); margin-bottom: clamp(28px, 6vh, 60px); }
.tools__intro { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.tools__aside { display: grid; gap: 16px; justify-items: start; min-width: 0; padding-bottom: .5em; }
.tools__sub { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.12rem); max-width: 40ch; }
/* section label row: quiet mono line instead of a pill */
.tools__count { display: inline-flex; align-items: center; gap: 10px; color: var(--dim); font-size: 10.5px; }

/* --- featured: three calm panels --- */
.tools__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); }
.tool {
  --ta: var(--a2);
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 20px; min-width: 0;
  min-height: clamp(260px, 34vh, 340px); padding: clamp(18px, 1.8vw, 26px); border-radius: 22px; color: var(--fg);
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  transition: transform .5s var(--ease), border-color .4s, background-color .4s;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.tool:nth-child(3n+2) { --ta: var(--a3); }
.tool:nth-child(3n+3) { --ta: var(--a1); }
.tool::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--ta) 50%, transparent); opacity: .28; transition: opacity .5s;
}
@media (hover: hover) and (pointer: fine) {
  .tool:hover, .tile:hover { border-color: color-mix(in srgb, var(--ta) 38%, rgba(255,255,255,.1)); background-color: rgba(255,255,255,.05); }
  .tool:hover { transform: translateY(-3px); }
  .tool:hover::before { opacity: .95; }
  .tool:hover .tool__go, .tile:hover .tool__go { transform: translate(3px, -3px); color: var(--ta); }
  .tile:hover .tile__icon { color: var(--ta); }
}
.tool:active, .tile:active { transform: scale(.98); transition-duration: .18s; border-color: color-mix(in srgb, var(--ta) 50%, transparent); }
.tool:focus-visible, .tile:focus-visible { outline: 2px solid var(--ta); outline-offset: 3px; }
.tool__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tool__icon { flex: none; display: grid; place-items: center; color: var(--ta); }
.tool__icon svg { width: 22px; height: 22px; display: block; }
.tool__path { margin-left: auto; color: var(--dim); font-size: 10.5px; text-transform: none; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tool__go { flex: none; color: var(--dim); font-size: 15px; line-height: 1; transition: transform .5s var(--ease), color .3s; }
.tool__live { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 76px; min-width: 0; }
.tool__body { display: grid; gap: 6px; min-width: 0; }
.tool__name { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.5rem, 2.1vw, 2rem); letter-spacing: -.035em; line-height: 1.04; }
.tool__blurb { color: var(--muted); font-size: 14px; line-height: 1.45; max-width: 34ch; }
.tool__live.is-glyph { align-items: flex-start; color: var(--ta); }
.tool__live.is-glyph svg { width: 44px; height: 44px; opacity: .7; }

/* --- the rest: tidy tiles --- */
.tools__rule { display: flex; align-items: center; gap: 14px; margin: clamp(28px, 5vh, 48px) 0 clamp(14px, 2vh, 20px); color: var(--dim); font-size: 10.5px; }
.tools__rule i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.14), transparent); }
.tools__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1vw, 12px); }
.tile {
  --ta: var(--a2);
  position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; min-height: 112px; padding: 16px 16px 15px; border-radius: 18px; color: var(--fg);
  background: rgba(255,255,255,.022); border: 1px solid rgba(255,255,255,.07);
  transition: transform .4s var(--ease), border-color .35s, background-color .35s;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.tile:nth-child(3n+2) { --ta: var(--a3); }
.tile:nth-child(3n+3) { --ta: var(--a1); }
.tile__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tile__icon { display: block; color: var(--muted); transition: color .35s; }
.tile__icon svg { width: 22px; height: 22px; display: block; }
.tile__name { font-family: var(--f-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.025em; line-height: 1.1; }
.tile__blurb { color: var(--dim); font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .tool__go { font-size: 13px; }

/* -- live: NFC -- */
.tw-nfc { position: relative; display: flex; align-items: center; gap: 16px; }
.tw-nfc-arcs { position: relative; width: 64px; height: 64px; flex: none; }
.tw-nfc-arcs i { position: absolute; top: 50%; left: 8px; border-radius: 50%; border: 2px solid transparent; border-right-color: var(--ta); transform: translateY(-50%); }
.tw-nfc-arcs i:nth-child(1) { width: 20px; height: 20px; opacity: .95; }
.tw-nfc-arcs i:nth-child(2) { width: 38px; height: 38px; left: 2px; opacity: .6; }
.tw-nfc-arcs i:nth-child(3) { width: 56px; height: 56px; left: -4px; opacity: .3; }
.tw-nfc-t { color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.tw-nfc-t b { display: block; color: var(--fg); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .tw-nfc-arcs i { animation: twnfc 2.6s ease-in-out infinite; }
  .tw-nfc-arcs i:nth-child(2) { animation-delay: .25s; }
  .tw-nfc-arcs i:nth-child(3) { animation-delay: .5s; }
}
@keyframes twnfc { 0%, 100% { opacity: .15; } 40% { opacity: 1; } }

/* -- live: Time -- */
.tw-place { color: var(--ta); font-size: 10px; display: inline-flex; align-items: center; gap: 8px; }
.tw-place::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ta); box-shadow: 0 0 10px var(--ta); animation: pulse 2s ease-in-out infinite; }
.tw-clock { display: flex; align-items: baseline; gap: .12em; line-height: .9; white-space: nowrap; }
.tw-hm {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.045em; font-size: clamp(2.6rem, 6.4vw, 6.2rem); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, color-mix(in srgb, var(--ta) 45%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tw-s { font-family: var(--f-mono); font-size: clamp(1rem, 1.8vw, 1.6rem); color: var(--ta); font-variant-numeric: tabular-nums; }
.tw-ap { font-size: 11px; color: var(--muted); margin-left: .3em; }
.tw-date { color: var(--dim); font-size: 10.5px; }

/* -- live: Zmanim -- */
.tw-arc { position: relative; display: block; width: min(100%, 170px); aspect-ratio: 120 / 52; }
.tw-arc svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tw-arc-p { fill: none; stroke: color-mix(in srgb, var(--ta) 55%, transparent); stroke-width: 1.4; stroke-dasharray: 2 3; }
.tw-arc-h { stroke: rgba(255,255,255,.14); stroke-width: 1; }
.tw-arc-sun {
  position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 30%, var(--ta) 70%); box-shadow: 0 0 16px 3px color-mix(in srgb, var(--ta) 70%, transparent);
  offset-path: path('M6 48 Q60 -12 114 48'); offset-rotate: 0deg; animation: twsun 9s ease-in-out infinite alternate;
}
@supports not (offset-path: path('M0 0')) { .tw-arc-sun { left: 50%; top: 35%; animation: pulse 3s ease-in-out infinite; } }
@keyframes twsun { from { offset-distance: 12%; } to { offset-distance: 88%; } }
.tw-arc-l { display: flex; justify-content: space-between; width: min(100%, 170px); color: var(--dim); font-size: 8.5px; letter-spacing: .06em; }

/* -- live: Luach -- */
.tw-heb { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.tw-heb-d {
  font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: .9; letter-spacing: -.04em;
  background: linear-gradient(180deg, #fff 30%, color-mix(in srgb, var(--ta) 50%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tw-heb-m { font-size: 14px; color: rgba(243,241,255,.86); line-height: 1.25; min-width: 0; }
.tw-heb-c { color: var(--dim); font-size: 10px; }

/* -- live: Timer -- */
.tool--timer .tool__live { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.tw-ring { position: relative; width: 58px; height: 58px; flex: none; display: grid; place-items: center; }
.tw-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.tw-ring circle { fill: none; stroke-width: 2.4; }
.tw-ring-bg { stroke: rgba(255,255,255,.09); }
.tw-ring-fg { stroke: var(--ta); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 4px var(--ta)); animation: twring 6s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes twring { 0% { stroke-dashoffset: 100; } 70% { stroke-dashoffset: 0; opacity: 1; } 85%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.tw-ring-t { font-size: 11px; color: var(--fg); letter-spacing: 0; }
.tw-hint { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.tw-hint i { width: 6px; height: 6px; border-radius: 50%; background: var(--ta); box-shadow: 0 0 8px var(--ta); animation: pulse 1.6s ease-in-out infinite; flex: none; }

/* -- live: World -- */
.tw-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.25; }
.tw-row + .tw-row { padding-top: 5px; border-top: 1px solid rgba(255,255,255,.05); }
.tw-sun { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.18); transition: background-color .6s, box-shadow .6s; }
.tw-row.is-day .tw-sun { background: var(--ta); box-shadow: 0 0 8px var(--ta); }
.tw-city { color: rgba(243,241,255,.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-t { font-size: 11.5px; letter-spacing: 0; text-transform: none; color: var(--fg); font-variant-numeric: tabular-nums; }
.tw-t small { font-size: .82em; color: var(--dim); margin-left: 2px; }

/* -- live: QR -- */
.tool--qr .tool__live { align-items: flex-start; }
.tw-qr {
  position: relative; display: grid; grid-template-columns: repeat(13, 1fr); gap: 1px; width: 70px; aspect-ratio: 1; padding: 5px; border-radius: 9px; overflow: hidden;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08);
}
.tw-qr i { border-radius: 1px; background: var(--fg); opacity: .07; transition: opacity .6s; }
.tw-qr i.is-on { opacity: .82; }
.tw-qr i.is-fix { background: var(--ta); opacity: 1; box-shadow: 0 0 4px color-mix(in srgb, var(--ta) 60%, transparent); }
.tw-qr-scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--ta), transparent); box-shadow: 0 0 10px var(--ta); animation: twscan 2.8s ease-in-out infinite alternate; }
@keyframes twscan { from { transform: translateY(2px); } to { transform: translateY(66px); } }

/* -- live: demo text (Convert) -- */
.tw-conv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-height: 2.6em; }
.tw-conv > * { transition: opacity .3s, transform .35s var(--ease); }
.tw-conv.is-swap > * { opacity: 0; transform: translateY(-5px); }
.tw-in { font-size: 11.5px; color: var(--muted); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.tw-arrow { color: var(--ta); font-size: 13px; }
.tw-out { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.15rem, 1.6vw, 1.4rem); letter-spacing: -.02em; white-space: nowrap; }
.tw-dots { display: flex; gap: 4px; }
.tw-dots i { width: 10px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.14); transition: background-color .4s, width .4s var(--ease); }
.tw-dots i.is-on { width: 16px; background: var(--ta); }

/* off screen / hidden tab: no idle animation cost */
.tools.is-off .tool *, .tools.is-off .tool *::before { animation-play-state: paused !important; }

/* -- on the bench -- */
.tools__soon { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: clamp(18px, 3vh, 28px); }
.tools__soon[hidden] { display: none; }
.tools__soon-label { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 10.5px; }
.tools__soon-label::before { content: ''; width: 18px; height: 1px; background: var(--grad); opacity: .6; }
.tools__soon-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tools__soon-item {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: 999px; font-size: 13px; color: var(--muted);
  border: 1px dashed rgba(255,255,255,.13); background: rgba(10,10,20,.4);
}
.tools__soon-i svg { width: 15px; height: 15px; display: block; color: var(--dim); }
.tools__soon-item em { font-style: normal; font-size: 9px; color: var(--dim); letter-spacing: .12em; }

@media (max-width: 1000px) {
  .tools__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tools__head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .tools__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools__grid > .tool:first-child { grid-column: span 2; }
}
@media (max-width: 640px) {
  .tools__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools__list > .tile:last-child:nth-child(odd) { grid-column: span 2; }
}
@media (max-width: 560px) {
  .tools { padding: 9vh var(--gut) 6vh; }
  .tools__head { gap: 16px; margin-bottom: 26px; }
  .tools__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tools__grid > .tool:first-child { grid-column: auto; }
  .tool { min-height: 236px; padding: 18px; gap: 16px; border-radius: 20px; }
  .tool__blurb { font-size: 13.5px; }
  .tile { min-height: 104px; padding: 14px; }
  .tw-hm { font-size: clamp(2.5rem, 13vw, 3.6rem); }
  .tw-row { gap: 6px; font-size: 12px; }
  .tw-t { font-size: 11px; }
  .tw-ring { width: 50px; height: 50px; }
  .tools__soon { gap: 10px; }
  .tools__soon-item { font-size: 12.5px; }
}
@media (max-width: 380px) {
  .tool__path { display: none; }
  .tw-t small { display: none; }
}

/* mobile menu: the live tools as chips under "Tools" */
.menu__tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px 30px; opacity: 0; transform: translateY(18px); }
.menu__tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 15px 0 11px; border-radius: 999px;
  font: 500 14px/1 var(--f-body); color: var(--fg); background: rgba(255,255,255,.05); border: 1px solid var(--glass-b);
  -webkit-tap-highlight-color: transparent; transition: background-color .3s, border-color .3s;
}
.menu__tool-i svg { width: 18px; height: 18px; display: block; color: var(--a2); }
.menu__tool:active { background: color-mix(in srgb, var(--a2) 18%, transparent); border-color: var(--a2); }
.menu { overflow-y: auto; overscroll-behavior: contain; justify-content: safe center; }

/* footer: compact tools row */
.foot__tools { flex: 1 1 100%; order: -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; margin: -10px 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: .02em; }
.foot__tools-k { color: var(--a2); margin-right: 8px; }
.foot__tools a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; color: var(--muted); transition: color .3s; }
.foot__tools a:hover, .foot__tools a:active { color: var(--fg); }
.foot__tools a + a::before { content: '\00b7'; color: var(--dim); margin: 0 9px 0 -9px; }
@media (max-width: 640px) { .foot__tools { justify-content: center; } }

/* desktop nav pill: six items need a little less padding on mid widths */
@media (max-width: 1180px) {
  .nav__links { gap: 2px; }
  .nav__links a { padding: 8px 11px; gap: 6px; }
}
@media (max-width: 1000px) { .nav__links a .mono { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .tw-ring-fg { animation-duration: 16s; }
  .tw-arc-sun { animation-duration: 30s; }
  .tw-qr-scan { animation-duration: 8s; }
  .tw-qr i { transition-duration: 1.4s; }
  .tw-place::before, .tw-hint i { animation-duration: 4s; }
  .tw-conv.is-swap > * { transform: none; }
  .tw-conv > * { transition-duration: .45s; }
  .tool, .tile { transition-duration: .3s; }
  .tool:active, .tile:active { transform: scale(.985); }
}
