/* ==========================================================================
   化学智教 — ReactBits-flavoured design system
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* surface ramp */
  --bg: #04040a;
  --bg-1: #07070f;
  --bg-2: #0b0b16;
  --ink: #f4f5fa;
  --dim: rgba(244, 245, 250, 0.56);
  --faint: rgba(244, 245, 250, 0.34);
  --hair: rgba(255, 255, 255, 0.08);
  --hair-soft: rgba(255, 255, 255, 0.045);

  /* accent tones */
  --c-cyan: #4fd2ff;
  --c-amber: #ffae63;
  --c-violet: #a78bfa;
  --c-mint: #3ee8b0;

  --tone: var(--c-cyan);
  --tone-rgb: 79, 210, 255;

  --font: "Inter", "Noto Sans SC", -apple-system, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --shell: clamp(20px, 5vw, 76px);
}

[data-tone="cyan"]   { --tone: var(--c-cyan);   --tone-rgb: 79, 210, 255; }
[data-tone="amber"]  { --tone: var(--c-amber);  --tone-rgb: 255, 174, 99; }
[data-tone="violet"] { --tone: var(--c-violet); --tone-rgb: 167, 139, 250; }
[data-tone="mint"]   { --tone: var(--c-mint);   --tone-rgb: 62, 232, 176; }

html {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html.has-cursor, html.has-cursor * { cursor: none !important; }

img { max-width: 100%; display: block; }
::selection { background: rgba(79, 210, 255, 0.26); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #05050b; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: rgba(79, 210, 255, 0.55); }

/* ==========================================================================
   Ambient layers
   ========================================================================== */

/* DotGrid — a dot field revealed by a soft mask around the pointer */
.dots {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0;
  transition: opacity 0.9s ease;
  -webkit-mask-image: radial-gradient(240px circle at var(--px, 50%) var(--py, 50%), #000 0%, transparent 72%);
  mask-image: radial-gradient(240px circle at var(--px, 50%) var(--py, 50%), #000 0%, transparent 72%);
}
body.past-hero .dots { opacity: 0.5; }

#aurora {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 1.2s ease;
}

#fx {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  mix-blend-mode: screen; opacity: 0.6;
}

.spark { position: fixed; inset: 0; z-index: 90; pointer-events: none; }

/* Noise — static film grain (an animated oversized layer costs too much) */
.grain {
  position: fixed; inset: 0; z-index: 55; pointer-events: none; opacity: 0.16;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

/* Scroll progress */
.prog {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 80;
  background: rgba(255, 255, 255, 0.05);
}
.prog i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-violet) 55%, var(--c-mint));
  box-shadow: 0 0 14px rgba(79, 210, 255, 0.6);
}

/* Blob cursor */
.cursor { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; opacity: 0; }
.cursor__ring {
  position: absolute; translate: -50% -50%;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
              border-color 0.35s ease, background 0.35s ease;
}
.cursor__dot {
  position: absolute; translate: -50% -50%;
  width: 5px; height: 5px; border-radius: 50%; background: #fff;
  transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
}
.cursor.is-hot .cursor__ring {
  width: 58px; height: 58px;
  border-color: rgba(79, 210, 255, 0.75);
  background: rgba(79, 210, 255, 0.08);
}
.cursor.is-hot .cursor__dot { opacity: 0.2; }

/* ==========================================================================
   Text primitives — SplitText / ShinyText / GradientText
   ========================================================================== */

.rb-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.rb-u { display: inline-block; }
[data-split]:not(.rb-ready), [data-reveal]:not(.rb-ready) { opacity: 0.999; }

/* background-clip:text can't reach inside the inline-block split spans,
   so gradient-inked headings re-apply the gradient per unit */
.sec-title .rb-u, .pd-copy__title .rb-u, .story__content h3 .rb-u {
  background-image: linear-gradient(180deg, #ffffff 16%, #a0a6b8 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.shiny {
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.42) 40%,
    #ffffff 50%, rgba(255, 255, 255, 0.42) 60%, rgba(255, 255, 255, 0.42) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shiny 5s linear infinite;
}
@keyframes shiny {
  0% { background-position: 160% 0; }
  100% { background-position: -60% 0; }
}

.grad-text {
  background: linear-gradient(90deg, var(--c-cyan), var(--c-violet), var(--c-mint), var(--c-cyan));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: grad 9s linear infinite;
}
@keyframes grad {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.sbtn {
  position: relative; display: inline-block; padding: 0; border-radius: 100px;
  overflow: hidden; text-decoration: none; isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: border-color 0.35s ease;
}
.sbtn__ray {
  display: none !important;
}
.sbtn__in {
  position: relative; display: block; border-radius: 100px;
  padding: 11px 24px; text-align: center; white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink); font-size: 0.8rem; font-weight: 400; letter-spacing: 0.1em;
  transition: color 0.35s ease, background 0.35s ease;
}
.sbtn:hover { border-color: rgba(255, 255, 255, 0.32); }
.sbtn:hover .sbtn__in { background: rgba(255, 255, 255, 0.12); color: #fff; }
.sbtn--lg .sbtn__in { padding: 18px 46px; font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 400; font-size: 0.85rem;
  letter-spacing: 0.16em; padding: 19px 46px; border-radius: 100px;
  text-transform: uppercase;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease),
              color 0.45s var(--ease);
}
.btn-ghost {
  color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: none;
}

/* ==========================================================================
   Surface — glass card with spotlight + proximity border glow
   ========================================================================== */

/* faux glass: semi-opaque fills instead of backdrop-filter — live blur over the
   animated canvases underneath forces a re-blur every frame and kills scrolling */
.surface, .bento__card, .res-card, .dual-card, .orbit__step {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 52%),
    linear-gradient(180deg, rgba(17, 17, 28, 0.72), rgba(8, 8, 15, 0.62));
  border: 1px solid var(--hair-soft);
  box-shadow: 0 20px 50px -26px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s var(--ease);
}
/* these two get JS-driven per-frame tilt — a CSS transform transition would smear it */
.bento__card { transition: border-color 0.5s ease, box-shadow 0.5s ease; }

/* pointer spotlight wash */
.bento__card::before, .res-card::before,
.orbit__step::before, .story__visual::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--tone-rgb), 0.14), transparent 68%);
  opacity: var(--spot, 0); transition: opacity 0.45s ease;
}

/* proximity border glow — the MagicBento signature */
.bento__card::after, .res-card::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--tone-rgb), 0.85), rgba(var(--tone-rgb), 0.16) 45%, transparent 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: var(--glow-i, 0); transition: opacity 0.3s ease;
}

.motes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.motes i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--tone); box-shadow: 0 0 8px rgba(var(--tone-rgb), 0.9);
}

.ripple {
  position: absolute; z-index: 3; pointer-events: none;
  width: 460px; height: 460px; margin: -230px 0 0 -230px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--tone-rgb), 0.32), transparent 62%);
}

/* ==========================================================================
   Topbar — GooeyNav
   ========================================================================== */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: clamp(14px, 2.2vw, 24px) var(--shell);
}
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 4, 10, 0.82), transparent);
  opacity: 0; transition: opacity 0.6s ease;
}
body.scrolled .topbar::before { opacity: 1; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: url(../assets/logo.png) center/contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(79, 210, 255, 0.35));
  transition: transform 0.6s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.brand__text { display: grid; gap: 3px; }
.brand__name { font-family: var(--serif); font-size: 0.98rem; font-weight: 600; letter-spacing: 0.16em; }
.brand__sub {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.3em;
  color: var(--faint); text-transform: uppercase;
}

.gnav {
  position: relative; display: flex; gap: 2px; padding: 5px; border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(12, 12, 20, 0.55);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 12px 30px -16px rgba(0, 0, 0, 0.9);
}
.gnav__blob {
  position: absolute; left: 0; top: 5px; height: calc(100% - 10px);
  border-radius: 100px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, #ffffff, #cfd6e6);
  box-shadow: 0 4px 18px -4px rgba(255, 255, 255, 0.45);
}
.gnav__item {
  position: relative; z-index: 1; border: 0; background: transparent; color: var(--faint);
  font: inherit; font-size: 0.78rem; font-weight: 400; letter-spacing: 0.08em;
  padding: 8px 17px; border-radius: 100px;
  transition: color 0.4s var(--ease);
}
.gnav__item:hover { color: rgba(255, 255, 255, 0.9); }
.gnav__item.is-active { color: #06060c; font-weight: 500; }

/* ==========================================================================
   Hero — pinned 3D story
   ========================================================================== */

#product {
  position: relative; z-index: 10; height: 100vh; height: 100svh;
  background: radial-gradient(120% 100% at 50% 0%, #0a0a15 0%, #04040a 55%);
  overflow: hidden;
}
.pd-stage { position: absolute; inset: 0; }
#pd3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pd-glow {
  position: absolute; left: 68%; top: 46%; translate: -50% -50%;
  width: min(72vw, 900px); aspect-ratio: 1.7; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(var(--tone-rgb), 0.09), transparent 70%);
  transition: background 1.2s ease, left 1.1s var(--ease);
}
.pd-fallback {
  display: none; position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.6;
}
body.pd-static .pd-fallback { display: block; }
body.pd-static #pd3d, body.pd-static .pd-hint { display: none; }

/* split layout — copy on one side, 3D model on the other, no cards */
.pd-copy {
  position: absolute; z-index: 5; width: min(88vw, 560px);
  opacity: 0; pointer-events: none;
}
.pd-copy.is-active { pointer-events: auto; }
.pd-copy--hero { left: var(--shell); top: 50%; translate: 0 -50%; opacity: 1; pointer-events: auto; }
.pd-copy--left { left: var(--shell); top: 50%; translate: 0 -50%; }
.pd-copy--right { right: var(--shell); top: 50%; translate: 0 -50%; text-align: right; }
.pd-copy--left, .pd-copy--right { width: min(88vw, 600px); }

.pd-copy__head { display: flex; align-items: center; gap: 16px; }
.pd-copy--right .pd-copy__head { flex-direction: row-reverse; }
.pd-copy--right .pd-live { margin-left: auto; }
.pd-copy__num {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--mono); color: var(--tone);
}
.pd-copy__num b { font-size: 1.05rem; font-weight: 500; letter-spacing: 0.06em; }
.pd-copy__num i { font-style: normal; font-size: 0.66rem; letter-spacing: 0.16em; color: var(--faint); }
.pd-copy__eyebrow {
  font-size: 0.72rem; font-weight: 400; letter-spacing: 0.18em;
  padding-left: 16px; position: relative;
}
.pd-copy__eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 1px;
  background: rgba(255, 255, 255, 0.3);
}
.pd-copy--right .pd-copy__eyebrow { padding-left: 0; padding-right: 16px; }
.pd-copy--right .pd-copy__eyebrow::before { left: auto; right: 0; }

.pd-copy__title {
  margin: 18px 0 0; font-family: var(--serif); font-size: clamp(2rem, 3.8vw, 3.05rem);
  font-weight: 700; line-height: 1.32; letter-spacing: 0.03em;
  color: #ffffff;
}
.pd-copy__body {
  margin: 16px 0 0; font-size: 0.94rem; font-weight: 300; line-height: 1.95;
  letter-spacing: 0.025em; color: var(--dim); text-wrap: pretty;
}
.pd-copy--hero .pd-copy__body { max-width: 46ch; }
.pd-copy--right .pd-copy__body { margin-left: auto; }

.pd-copy__chips {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0;
}
.pd-copy--right .pd-copy__chips { justify-content: flex-end; }
.pd-copy__chips li {
  font-size: 0.74rem; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.72);
  padding: 6px 13px; border-radius: 100px; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.4s ease, color 0.4s ease, background 0.4s ease;
}
.pd-copy__chips li:hover {
  border-color: rgba(var(--tone-rgb), 0.5);
  background: rgba(var(--tone-rgb), 0.1);
  color: #fff;
}

/* hero readout — mirrors the bond-angle arc shown on the 3D molecule */
.pd-readout {
  display: flex; flex-wrap: wrap;
  gap: 12px clamp(22px, 3.4vw, 42px);
  margin: 24px 0 0; padding: 18px 0 0; border-top: 1px solid var(--hair);
}
.pd-readout div { display: grid; gap: 7px; justify-items: start; }
.pd-readout dt {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--faint);
}
.pd-readout dd {
  margin: 0; font-size: 0.98rem; font-weight: 500; letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.92);
}
.pd-readout dd.hl {
  font-family: var(--mono); font-size: 1.05rem; color: var(--tone);
  text-shadow: 0 0 18px rgba(var(--tone-rgb), 0.55);
}

/* reaction condition sliders — values breathe to suggest they are turnable */
.pd-conds {
  display: grid; gap: 14px; margin: 24px 0 0; padding: 20px 0 0;
  border-top: 1px solid var(--hair);
}
.pd-cond {
  display: grid; grid-template-columns: 52px 1fr 86px; align-items: center; gap: 14px;
}
.pd-cond > span { font-size: 0.76rem; letter-spacing: 0.12em; color: var(--dim); }
.pd-cond > b {
  font-family: var(--mono); font-size: 0.74rem; font-weight: 400;
  letter-spacing: 0.04em; color: var(--tone); text-align: right; white-space: nowrap;
}
.pd-cond__bar {
  position: relative; display: block; height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
}
.pd-cond__bar::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px;
  width: calc(var(--v) * 100%);
  background: linear-gradient(90deg, rgba(var(--tone-rgb), 0.3), var(--tone));
  box-shadow: 0 0 10px rgba(var(--tone-rgb), 0.45);
  animation: cond-drift 3.6s var(--ease-io) infinite alternate;
}
.pd-cond__bar::after {
  content: ""; position: absolute; top: 50%; left: calc(var(--v) * 100%);
  width: 7px; height: 7px; border-radius: 50%; translate: -50% -50%;
  background: #fff; box-shadow: 0 0 10px rgba(var(--tone-rgb), 0.95), 0 0 3px #fff;
  animation: cond-drift-dot 3.6s var(--ease-io) infinite alternate;
}
.pd-cond:nth-child(2) .pd-cond__bar::before,
.pd-cond:nth-child(2) .pd-cond__bar::after { animation-delay: -1.4s; }
.pd-cond:nth-child(3) .pd-cond__bar::before,
.pd-cond:nth-child(3) .pd-cond__bar::after { animation-delay: -2.5s; }
@keyframes cond-drift {
  from { width: calc(var(--v) * 100% - 5%); }
  to { width: calc(var(--v) * 100% + 4%); }
}
@keyframes cond-drift-dot {
  from { left: calc(var(--v) * 100% - 5%); }
  to { left: calc(var(--v) * 100% + 4%); }
}

/* workshop steps */
.pd-steps {
  list-style: none; display: grid; gap: 12px; margin: 24px 0 0; padding: 20px 0 0;
  border-top: 1px solid var(--hair); text-align: left;
}
.pd-steps li {
  display: flex; align-items: baseline; gap: 16px;
  padding: 14px 18px; border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.022);
  transition: border-color 0.4s ease, transform 0.4s var(--ease), background 0.4s ease;
}
.pd-steps li:hover {
  border-color: rgba(var(--tone-rgb), 0.42); background: rgba(var(--tone-rgb), 0.05);
  transform: translateX(-4px);
}
.pd-steps li > i {
  font-style: normal; font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.08em; color: var(--tone); flex: none;
}
.pd-steps strong { display: block; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.94); margin-bottom: 4px; }
.pd-steps span { font-size: 0.76rem; line-height: 1.65; color: var(--faint); }

/* classroom live strip */
.pd-live {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
  width: fit-content; margin: 24px 0 0; padding: 13px 22px; border-radius: 100px;
  border: 1px solid rgba(var(--tone-rgb), 0.24);
  background: rgba(var(--tone-rgb), 0.055);
}
.pd-live__pulse {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--tone);
  animation: live-pulse 2.1s ease-out infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--tone-rgb), 0.55); }
  100% { box-shadow: 0 0 0 13px rgba(var(--tone-rgb), 0); }
}
.pd-live__item { font-size: 0.78rem; letter-spacing: 0.07em; color: var(--dim); white-space: nowrap; }
.pd-live__item strong { font-family: var(--mono); font-weight: 500; color: #fff; }
.pd-live__sep { width: 1px; height: 14px; background: rgba(255, 255, 255, 0.14); }
.pd-live__eq { display: flex; align-items: flex-end; gap: 3px; height: 15px; margin-left: 6px; }
.pd-live__eq i {
  width: 3px; height: 100%; border-radius: 2px; transform-origin: bottom;
  background: var(--tone); box-shadow: 0 0 6px rgba(var(--tone-rgb), 0.6);
  animation: live-eq 1.15s ease-in-out infinite alternate;
}
.pd-live__eq i:nth-child(1) { animation-delay: 0s; }
.pd-live__eq i:nth-child(2) { animation-delay: -0.35s; }
.pd-live__eq i:nth-child(3) { animation-delay: -0.7s; }
.pd-live__eq i:nth-child(4) { animation-delay: -0.2s; }
.pd-live__eq i:nth-child(5) { animation-delay: -0.55s; }
@keyframes live-eq {
  from { transform: scaleY(0.25); opacity: 0.6; }
  to { transform: scaleY(1); opacity: 1; }
}

.pd-copy__flow {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--hair); text-align: left;
}
.pd-copy__flow li { position: relative; }
.pd-copy__flow li:not(:last-child)::after {
  content: ""; position: absolute; right: -8px; top: 6px; width: 5px; height: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  transform: rotate(45deg);
}
.pd-copy__flow strong {
  display: block; font-family: var(--mono); font-size: 0.72rem; font-weight: 400;
  color: var(--tone); margin-bottom: 5px; letter-spacing: 0.04em;
}
.pd-copy__flow span { display: block; font-size: 0.66rem; line-height: 1.45; color: var(--faint); padding-right: 10px; }

.pd-hint {
  position: absolute; left: 50%; bottom: 22px; translate: -50% 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.3em; color: rgba(255, 255, 255, 0.3);
  transition: opacity 0.8s ease;
}
.pd-hint i {
  width: 1px; height: 42px; overflow: hidden;
  background: rgba(255, 255, 255, 0.14); position: relative;
}
.pd-hint i::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: linear-gradient(180deg, transparent, var(--c-cyan));
  animation: hint 2.1s var(--ease-io) infinite;
}
@keyframes hint {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(250%); }
}

/* ==========================================================================
   ScrollVelocity marquee
   ========================================================================== */

.velo {
  position: relative; z-index: 20; padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft);
  background: linear-gradient(180deg, rgba(10, 10, 18, 0.6), transparent);
  overflow: hidden; display: grid; gap: 6px;
}
.velo__row { display: flex; width: max-content; will-change: transform; }
.velo__track { display: flex; align-items: center; gap: 34px; padding-right: 34px; }
.velo__track span {
  font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 5rem); font-weight: 600;
  letter-spacing: 0.04em; line-height: 1; white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 20%, #6a7085 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.velo__track em {
  font-style: normal; font-size: clamp(1.2rem, 2.6vw, 2.2rem);
  color: rgba(79, 210, 255, 0.55);
}
.velo__row--ghost .velo__track span {
  font-family: var(--mono); font-weight: 300;
  font-size: clamp(1.1rem, 2.6vw, 2rem); letter-spacing: 0.24em;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.16);
  background: none;
}
.velo__row--ghost .velo__track em { color: rgba(167, 139, 250, 0.4); }

/* ==========================================================================
   Page shell + section heads
   ========================================================================== */

.page { position: relative; z-index: 20; max-width: 1360px; margin: 0 auto; padding: 0 var(--shell); }
.sec { padding: clamp(96px, 15vh, 190px) 0 clamp(56px, 8vh, 100px); }
.sec-head { margin-bottom: clamp(52px, 7vw, 92px); max-width: 860px; }
.sec-eyebrow {
  display: inline-flex; align-items: center; gap: 16px; margin-bottom: 26px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.34em;
  color: var(--faint); text-transform: uppercase;
}
.sec-eyebrow::before {
  content: ""; width: 40px; height: 1px;
  background: linear-gradient(90deg, rgba(79, 210, 255, 0.8), transparent);
}
.sec-title {
  margin: 0; font-family: var(--serif); font-size: clamp(2.1rem, 4.4vw, 2.8rem);
  font-weight: 600; line-height: 1.38; letter-spacing: 0.02em;
  color: #ffffff;
}
.sec-sub {
  margin: 26px 0 0; color: var(--dim); font-size: 1rem; font-weight: 300;
  line-height: 2; max-width: 56ch; letter-spacing: 0.02em; text-wrap: pretty;
}

/* ==========================================================================
   Teaching loop
   ========================================================================== */

.design-orbit {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
}
.design-orbit::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--hair-soft), var(--hair), var(--hair-soft));
}
.design-orbit-step {
  position: relative;
  padding-top: 60px;
}
.design-orbit-step::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 12px rgba(var(--tone-rgb), 0.8);
}
.design-orbit-step .orbit__idx {
  position: absolute;
  top: -10px;
  left: 0;
  font-family: var(--mono);
  font-size: 4rem;
  font-weight: 300;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--tone-rgb), 0.2);
  opacity: 0.5;
  transition: opacity 0.4s ease, -webkit-text-stroke-color 0.4s ease;
}
.design-orbit-step:hover .orbit__idx {
  opacity: 1;
  -webkit-text-stroke-color: rgba(var(--tone-rgb), 0.6);
}
.design-orbit-step h3 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.05em;
}
.design-orbit-step p {
  margin: 0;
  color: var(--dim);
  font-size: 0.9rem;
  line-height: 1.9;
  letter-spacing: 0.015em;
}
.design-orbit-step .orbit__tag {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--tone);
  padding: 4px 12px;
  border: 1px solid rgba(var(--tone-rgb), 0.3);
  border-radius: 100px;
}

/* ==========================================================================
   MagicBento — 3D Bento Cards Grid
   ========================================================================== */

.bento {
  position: relative;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px;
  margin-top: clamp(48px, 6vw, 80px);
}
/* container-wide spotlight that drifts under the cards */
.bento::before {
  content: ""; position: absolute; inset: -60px; z-index: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--sx, 50%) var(--sy, 50%),
    rgba(120, 160, 255, 0.075), transparent 70%);
  opacity: var(--sd, 0); transition: opacity 0.6s ease;
}
.bento__card {
  position: relative; grid-column: span 4; min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.bento__card:nth-child(1) { grid-column: span 7; min-height: 420px; }
.bento__card:nth-child(2) { grid-column: span 5; min-height: 420px; }
.bento__card:nth-child(3) { grid-column: span 5; }
.bento__card:nth-child(4) { grid-column: span 7; }
.bento__card:hover { border-color: rgba(var(--tone-rgb), 0.2); }

.bento__media {
  position: absolute; inset: 0; z-index: 0; opacity: 0.5;
  filter: saturate(0.8) contrast(1.06);
  background: #0a0f18 center/cover no-repeat;
  transition: transform 0.9s var(--ease), opacity 0.5s ease, filter 0.5s ease;
}
.media-reel { width: 100%; height: 100%; object-fit: cover; display: block; }
.bento__card:hover .bento__media { opacity: 0.82; filter: saturate(1.05) contrast(1.02); transform: scale(1.05); }

.bento__body {
  position: relative; z-index: 4; padding: 34px 28px 28px;
  background: linear-gradient(to top, rgba(4, 4, 10, 0.96) 0%, rgba(4, 4, 10, 0.6) 55%, transparent 100%);
}
.bento__card h3 { margin: 0; font-family: var(--serif); font-size: 1.34rem; font-weight: 600; letter-spacing: 0.05em; color: #fff; }
.bento__card p { margin: 14px 0 0; font-size: 0.88rem; line-height: 1.9; letter-spacing: 0.015em; color: var(--dim); max-width: 46ch; }
.bento__card ul { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.bento__card li {
  position: relative; padding-left: 13px; font-size: 0.75rem;
  letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.6);
}
.bento__card li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 4px; height: 4px;
  border-radius: 50%; background: var(--tone); box-shadow: 0 0 6px rgba(var(--tone-rgb), 0.8);
}

/* ==========================================================================
   Labs strip — High-Tech Feature Rail for 05 & 06 (Borderless Stream Rail)
   ========================================================================== */

.labs-strip {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: stretch;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: clamp(40px, 5vw, 64px);
}

/* top subtle beam divider with center pulse glow */
.labs-strip::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.08) 15%, 
    rgba(79, 210, 255, 0.35) 50%, 
    rgba(167, 139, 250, 0.35) 70%, 
    rgba(255, 255, 255, 0.08) 85%, 
    transparent 100%
  );
}

.labs-note {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 12px;
}

.labs-note__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.labs-note__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tone);
}

.pulse-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 8px rgba(var(--tone-rgb), 0.9);
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(var(--tone-rgb), 0.6);
  animation: pulse-ring 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.labs-note h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.3;
}

.labs-note__desc {
  margin: 14px 0 0;
  font-size: 0.88rem;
  line-height: 1.9;
  letter-spacing: 0.015em;
  color: var(--dim);
  max-width: 48ch;
}

/* 05 Stats */
.labs-note__metrics {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.5vw, 48px);
  margin-top: clamp(28px, 4vw, 40px);
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.labs-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.labs-metric__val {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 600;
  line-height: 1;
  color: var(--tone);
  letter-spacing: -0.02em;
}

.labs-metric__val strong {
  font-family: inherit;
  font-weight: inherit;
}

.labs-metric__val .unit {
  font-size: 0.85rem;
  font-family: var(--sans);
  font-weight: 400;
  margin-left: 4px;
  opacity: 0.8;
  color: var(--faint);
  bottom: 0;
}

.labs-metric__label {
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.labs-metric__sep {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Dual panes -> Design Dual
   ========================================================================== */

/* ==========================================================================
   Roles Section — Cardless Architectural Split (#roles)
   ========================================================================== */

.roles-split {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: stretch;
  margin-top: clamp(54px, 7vw, 90px);
}

.role-col {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px 4px;
}

/* Head */
.role-col__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
  gap: 16px 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.role-col__num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 3.5vw, 3.4rem);
  font-weight: 300;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--tone-rgb), 0.5);
  letter-spacing: -0.02em;
}

.role-col__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.role-col__kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--tone);
  font-weight: 500;
}

.role-col__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.03em;
}

.role-col__tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--dim);
  padding: 3px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

/* Intro Paragraph */
.role-col__intro {
  margin: 24px 0 0;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--dim);
  letter-spacing: 0.015em;
  max-width: 48ch;
}

/* Feature Points — Pure Typography & Accent Bar, NO Card Fills */
.role-points {
  margin: clamp(32px, 4vw, 44px) 0 0;
  display: grid;
  gap: 24px;
  flex: 1;
}

.role-point {
  position: relative;
  display: flex;
  gap: 16px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.4s ease, transform 0.4s var(--ease);
}

.role-point::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 0%;
  background: var(--tone);
  box-shadow: 0 0 10px rgba(var(--tone-rgb), 0.8);
  transition: height 0.4s var(--ease);
}

.role-point__content h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  transition: color 0.35s ease;
}

.role-point__content p {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--faint);
  letter-spacing: 0.01em;
}

.role-point:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(4px);
}

.role-point:hover::before {
  height: 100%;
}

.role-point:hover .role-point__content h4 {
  color: var(--tone);
}

.role-col__stream {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.role-col__stream em {
  font-style: normal;
  color: var(--tone);
  opacity: 0.4;
}

/* ==========================================================================
   Stories -> Design Story
   ========================================================================== */

.design-story {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  margin-bottom: clamp(100px, 15vw, 200px);
}
.design-story:last-child {
  margin-bottom: 0;
}
.design-story:nth-child(odd) .design-story__visual { grid-column: 1 / 8; }
.design-story:nth-child(odd) .design-story__content { grid-column: 8 / 13; }
.design-story:nth-child(even) .design-story__visual { grid-column: 6 / 13; order: 2; }
.design-story:nth-child(even) .design-story__content { grid-column: 1 / 6; order: 1; }

.design-story__visual {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #080b10;
  aspect-ratio: 16/10;
}
.design-story__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 1.2s var(--ease);
}
.design-story:hover .design-story__visual img {
  transform: scale(1.04);
}
.design-story__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4,4,10,0.9) 0%, transparent 50%);
  pointer-events: none;
}
.design-story__caption {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 40px;
  z-index: 2;
}
.design-story__caption span {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--tone);
}
.design-story__caption strong {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.design-story__content h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1rem, 3vw, 1.6rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.design-story__content > p {
  margin: 24px 0 0;
  color: var(--dim);
  font-size: 1.05rem;
  line-height: 1.9;
}
.design-story .metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--hair);
}
.design-story .metrics strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}
.design-story .metrics div:first-child strong {
  color: var(--tone);
}
.design-story .metrics span {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--faint);
}

/* ==========================================================================
   Resources
   ========================================================================== */

.design-res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  perspective: 1000px;
}
.design-res-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  border-radius: var(--r-xl);
  background: rgba(10, 10, 18, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
  overflow: hidden;
}
.design-res-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--tone-rgb), 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 40px rgba(var(--tone-rgb), 0.1);
}
.design-res-card::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle at top right, rgba(var(--tone-rgb), 0.15), transparent 70%);
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
  opacity: 0.5;
}
.design-res-card:hover::before {
  opacity: 1;
}
.design-res-card .res-card__num {
  font-family: var(--mono);
  font-size: 3.5rem;
  font-weight: 200;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--tone-rgb), 0.5);
  margin-bottom: 24px;
  line-height: 1;
  transition: -webkit-text-stroke-color 0.4s ease, color 0.4s ease;
}
.design-res-card:hover .res-card__num {
  color: rgba(var(--tone-rgb), 0.1);
  -webkit-text-stroke: 1px rgba(var(--tone-rgb), 0.8);
}
.design-res-card h3 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
}
.design-res-card p {
  margin: 0 0 32px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--dim);
  flex-grow: 1;
}
.design-res-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.design-res-card li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  transition: color 0.3s ease;
}
.design-res-card:hover li {
  color: rgba(255,255,255,0.9);
}
.design-res-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 16px;
  height: 16px;
  background-color: var(--dim);
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: background-color 0.3s ease;
}
.design-res-card:hover li::before {
  background-color: var(--tone);
}

/* ==========================================================================
   CTA + footer
   ========================================================================== */

.design-cta-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  border-top: 1px solid var(--hair);
  padding-top: 60px;
  counter-reset: cta;
}
.design-cta-item {
  position: relative;
  counter-increment: cta;
}
.design-cta-item .cta-item__num {
  display: block;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--tone);
}
.design-cta-item .cta-item__num::before {
  content: "0" counter(cta);
}
.design-cta-item h3 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}
.design-cta-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--dim);
}
.cta-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: clamp(42px, 6vw, 70px); justify-content: center;}

footer {
  position: relative; z-index: 20; margin-top: clamp(90px, 14vh, 170px);
  padding: clamp(60px, 9vw, 110px) var(--shell) clamp(120px, 14vw, 150px);
  border-top: 1px solid var(--hair-soft);
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.foot-mark { display: flex; align-items: center; gap: 18px; }
.foot-mark img { width: 48px; height: 48px; object-fit: contain; opacity: 0.7; }
.foot-word { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600; letter-spacing: 0.16em; }
.foot-tag { margin: 0; color: var(--dim); font-size: 0.86rem; letter-spacing: 0.16em; }
.foot-meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center; margin-top: 14px;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.22); text-transform: uppercase;
}

/* ==========================================================================
   Loader
   ========================================================================== */

#loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(120% 100% at 50% 40%, #0a0a15, #030308 70%);
  transition: opacity 0.9s ease, filter 0.9s ease;
}
#loader.out { opacity: 0; filter: blur(14px); pointer-events: none; }
.ld-inner { display: flex; flex-direction: column; align-items: center; }
.ld-logo {
  width: 78px; height: 78px; object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(79, 210, 255, 0.4));
  animation: ld-float 3.2s ease-in-out infinite alternate;
}
@keyframes ld-float {
  from { transform: translateY(5px) scale(0.98); opacity: 0.6; }
  to { transform: translateY(-5px) scale(1); opacity: 1; }
}
.ld-name {
  margin-top: 30px; font-family: var(--serif); font-size: clamp(1rem, 2.2vw, 1.32rem);
  font-weight: 600; letter-spacing: 0.14em; color: #fff; text-align: center;
}
.ld-tag {
  margin-top: 12px; font-family: var(--mono); font-size: clamp(0.66rem, 1.4vw, 0.76rem);
  letter-spacing: 0.14em; color: var(--faint); text-align: center; min-height: 1.2em;
}
.ld-bar {
  position: relative; margin-top: 46px; width: min(58vw, 260px); height: 2px;
  border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden;
}
.ld-bar span {
  display: block; height: 100%; width: 0%; border-radius: 2px;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-violet));
  box-shadow: 0 0 16px rgba(79, 210, 255, 0.8);
  transition: width 0.35s ease;
}
.ld-meta {
  display: flex; justify-content: space-between; width: min(58vw, 260px); margin-top: 16px;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Entrance choreography
   ========================================================================== */

body.loading { overflow: hidden; }
body.pre-enter .topbar, body.pre-enter .pd-hint { opacity: 0 !important; }
body.pre-enter .topbar { transform: translateY(-18px); }
body.pre-enter .pd-stage { opacity: 0; transform: scale(1.03); }
body.enter .topbar {
  opacity: 1; transform: none;
  transition: opacity 1s ease 0.25s, transform 1.1s var(--ease) 0.25s;
}
body.enter .pd-hint { opacity: 1; transition: opacity 1s ease 1.2s; }
body.enter .pd-stage {
  opacity: 1; transform: scale(1);
  transition: opacity 1.5s ease, transform 1.8s var(--ease);
}
/* no blur on the hero copy — filter + background-clip:text ghosts the first glyph */
body.pre-enter .pd-copy--hero > * { opacity: 0 !important; transform: translateY(18px) !important; }
body.enter .pd-copy--hero > * {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.9s ease, transform 0.9s var(--ease);
}
body.enter .pd-copy--hero > *:nth-child(1) { transition-delay: 0.45s; }
body.enter .pd-copy--hero > *:nth-child(2) { transition-delay: 0.58s; }
body.enter .pd-copy--hero > *:nth-child(3) { transition-delay: 0.7s; }
body.enter .pd-copy--hero > *:nth-child(4) { transition-delay: 0.82s; }
body.enter .pd-copy--hero > *:nth-child(5) { transition-delay: 0.94s; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .design-orbit { grid-template-columns: 1fr 1fr; gap: 60px; }
  .design-orbit::before { display: none; }
  .bento__card, .bento__card:nth-child(n) { grid-column: span 6; min-height: 330px; }
  .roles-split { grid-template-columns: 1fr; gap: 48px; }
  .design-res-grid { grid-template-columns: 1fr; }
  .design-res-card { padding: 32px 24px; }
  .design-res-card .res-card__num { margin-bottom: 16px; }
  .design-cta-rail { grid-template-columns: 1fr 1fr; gap: 60px; }
  .pd-copy--left, .pd-copy--right { width: min(52vw, 480px); }
  .pd-copy--hero { width: min(52vw, 460px); }
}

@media (max-width: 900px) {
  :root { --shell: max(20px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }

  .topbar {
    width: 100%;
    max-width: 100vw;
    flex-wrap: nowrap;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) var(--shell) 10px;
  }
  .brand { min-width: 0; gap: 8px; }
  .brand__mark { width: 36px; height: 36px; }
  .brand__text { min-width: 0; }
  .brand__name { font-size: 0.9rem; letter-spacing: 0.08em; white-space: nowrap; }
  .topbar > .sbtn { flex: 0 0 auto; }
  .topbar > .sbtn .sbtn__in { padding: 8px 12px; font-size: 0.68rem; letter-spacing: 0.04em; }
  .gnav { display: none; }

  .pd-glow { left: 50% !important; top: 28%; width: min(160vw, 560px); }
  .pd-copy, .pd-copy--hero, .pd-copy--left, .pd-copy--right {
    width: auto; left: 0; right: 0;
    top: auto; bottom: 0;
    translate: 0 0; text-align: left;
    max-height: none;
    overflow: visible;
    padding: 32px var(--shell) max(16px, env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent 0%, rgba(4, 4, 10, 0.72) 18%, rgba(4, 4, 10, 0.92) 42%);
  }
  .pd-copy--right .pd-copy__head { flex-direction: row; }
  .pd-copy--right .pd-copy__eyebrow { padding-left: 16px; padding-right: 0; }
  .pd-copy--right .pd-copy__eyebrow::before { left: 0; right: auto; }
  .pd-copy--right .pd-copy__body, .pd-copy--right .pd-copy__chips { margin-left: 0; justify-content: flex-start; }
  .pd-copy--right .pd-live { margin-left: 0; }
  .pd-copy__title { margin-top: 10px; font-size: clamp(1.35rem, 6.4vw, 1.85rem); }
  .pd-copy__body { margin-top: 10px; font-size: 0.84rem; line-height: 1.7; }
  .pd-copy--hero .pd-copy__body { max-width: none; }
  .pd-copy__chips { margin-top: 14px; }
  .pd-copy__chips li { padding: 5px 10px; font-size: 0.68rem; }
  .pd-readout, .pd-conds, .pd-steps { margin-top: 14px; padding-top: 12px; }
  .pd-steps li { padding: 10px 12px; }
  .pd-live { margin-top: 14px; padding: 10px 14px; }
  .pd-copy__flow { grid-template-columns: 1fr 1fr; margin-top: 14px; padding-top: 12px; }
  .pd-copy__flow li:not(:last-child)::after { display: none; }
  .pd-hint { bottom: auto; top: calc(env(safe-area-inset-top) + 92px); }

  .velo { padding: 40px 0; }
  .page { padding: 0; }
  .page > .sec {
    padding: 72px max(20px, env(safe-area-inset-right, 0px)) 40px
      max(20px, env(safe-area-inset-left, 0px));
  }
  .sec-head { margin-bottom: 36px; }
  .sec-title { font-size: clamp(1.45rem, 7vw, 2.1rem); }
  .sec-sub { margin-top: 16px; font-size: 0.92rem; line-height: 1.75; }

  .bento { margin-top: 28px; gap: 12px; }
  .bento::before { inset: 0; }
  .bento__card, .bento__card:nth-child(n) { grid-column: span 12; min-height: 280px; }
  .bento__body { padding: 24px 20px 20px; }
  .labs-strip { gap: 32px; margin-top: 36px; padding-top: 32px; }
  .labs-note { padding: 0; }
  .design-story { grid-template-columns: 1fr; gap: 24px; margin-bottom: 72px; }
  .design-story:nth-child(n) .design-story__visual { grid-column: 1 / -1; order: 0; }
  .design-story:nth-child(n) .design-story__content { grid-column: 1 / -1; order: 1; }
  .design-story__caption { left: 16px; right: 16px; bottom: 16px; }
  .design-story__content > p { margin-top: 14px; font-size: 0.92rem; line-height: 1.75; }
  .design-story .metrics { gap: 18px; margin-top: 24px; padding-top: 20px; }
  .role-col__head { grid-template-columns: auto 1fr; }
  .role-col__tag { grid-column: 2; justify-self: start; }
  .role-col { padding: 0; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .sbtn, .cta-actions .btn { width: 100%; text-align: center; }
  .sbtn--lg .sbtn__in { padding: 16px 24px; }
  .btn { padding: 16px 24px; }
  footer { padding: 48px var(--shell) max(80px, env(safe-area-inset-bottom)); margin-top: 64px; }
  .foot-tag { letter-spacing: 0.08em; }
}

@media (max-width: 600px) {
  .pd-copy__chips { display: none; }
  .pd-copy__flow { grid-template-columns: 1fr 1fr; }
  .pd-readout { gap: 10px 18px; }
  .pd-cond { grid-template-columns: 44px 1fr 76px; gap: 10px; }
  .pd-live { width: 100%; padding: 10px 14px; border-radius: var(--r-md); }
  .metrics { grid-template-columns: 1fr; }
  .labs-note__metrics { flex-wrap: wrap; gap: 16px; padding: 14px 16px; }
  .labs-metric__sep { display: none; }
  .foot-mark { flex-direction: column; gap: 12px; }
  .design-orbit { grid-template-columns: 1fr; gap: 28px; }
  .design-orbit-step { padding-top: 48px; }
  .design-orbit-step .orbit__idx { font-size: 3rem; }
  .dual-grid { grid-template-columns: 1fr; }
  .dual-flow { flex-wrap: wrap; justify-content: center; gap: 8px 12px; }
  .design-cta-rail { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .design-story .metrics { grid-template-columns: 1fr 1fr; }
  .design-res-card { padding: 24px 18px; }
  .design-res-card .res-card__num { font-size: 2.4rem; }
  .ld-name { padding: 0 16px; letter-spacing: 0.08em; }
  .ld-tag { padding: 0 16px; }
}

@media (max-width: 900px) and (max-height: 520px) {
  .gnav { display: none; }
  .pd-copy__body, .pd-copy__chips, .pd-readout, .pd-conds, .pd-steps, .pd-live, .pd-copy__flow, .pd-hint { display: none; }
  .pd-copy, .pd-copy--hero, .pd-copy--left, .pd-copy--right { max-height: none; padding-top: 12px; background: none; }
  .pd-copy__title { font-size: 1.2rem; margin-top: 6px; }
}

/* ==========================================================================
   Motion / capability fallbacks
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
  #fx, #aurora, .dots, .grain { display: none; }
  .cursor { display: none; }
  .media-reel { display: none; }
  .lab-view[data-lab-view="0"] { background: url(../assets/molecule-space.webp) center/cover no-repeat; }
  .lab-view[data-lab-view="1"] { background: url(../assets/reaction-lab.webp) center/cover no-repeat; }
  .lab-view[data-lab-view="3"] { background: url(../assets/live-class.webp) center/cover no-repeat; }
  .bento__card:nth-child(1) .bento__media { background-image: url(../assets/molecule-space.webp); }
  .bento__card:nth-child(2) .bento__media { background-image: url(../assets/reaction-lab.webp); }
  .bento__card:nth-child(4) .bento__media { background-image: url(../assets/live-class.webp); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  #fx, #aurora, .grain, .dots, .cursor { display: none; }
  .velo { display: none; }
  html.has-cursor, html.has-cursor * { cursor: auto !important; }
  .pd-hint i::after, .ld-logo { animation: none !important; }
}
