﻿/* ---------------------------------------------------------------
   ANTHOS — botanical interface
   Type, grain and light are part of the instrument.
   --------------------------------------------------------------- */

@font-face {
  font-family: "Cormorant";
  src: url("vendor/fonts/cormorant-roman.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("vendor/fonts/cormorant-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("vendor/fonts/plex-mono-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("vendor/fonts/plex-mono-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #08070a;
  --ink-soft: #0e0c10;
  --ivory: #f3e8d7;
  --ivory-dim: rgba(243, 232, 215, 0.56);
  --ivory-faint: rgba(243, 232, 215, 0.28);
  --line: rgba(243, 232, 215, 0.15);
  --line-strong: rgba(243, 232, 215, 0.28);
  --coral: #ef7c67;
  --coral-bright: #ffb18e;
  --gold: #ffd49a;
  --wine: #74182e;
  --sage: #79907a;
  --serif: "Cormorant", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --mono: "Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
}

body {
  color: var(--ivory);
  font-family: var(--sans-cn);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a { -webkit-tap-highlight-color: transparent; }

button {
  color: inherit;
  font: inherit;
}

a { color: inherit; text-decoration: none; }

::selection { color: var(--ink); background: var(--gold); }

#app {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 67% 44%, #191012 0%, transparent 38%),
    #08070a;
}

#webgl {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: grab;
  touch-action: none;
  touch-action: none;
  cursor: crosshair;
}

.ambient,
.vignette,
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ambient {
  z-index: 1;
  opacity: 0.96;
  background:
    radial-gradient(ellipse 34% 43% at 67% 43%, rgba(189, 91, 65, 0.12), transparent 68%),
    radial-gradient(ellipse 27% 40% at 30% 82%, rgba(72, 96, 71, 0.11), transparent 72%),
    radial-gradient(ellipse 50% 32% at 52% 108%, rgba(140, 84, 55, 0.1), transparent 70%);
  mix-blend-mode: screen;
}

.vignette {
  z-index: 2;
  background:
    radial-gradient(ellipse at 50% 44%, transparent 29%, rgba(7, 6, 9, 0.18) 57%, rgba(5, 4, 7, 0.68) 100%),
    linear-gradient(to bottom, rgba(5, 4, 7, 0.26), transparent 16%, transparent 78%, rgba(5, 4, 7, 0.52));
}

.grain {
  z-index: 3;
  opacity: 0.062;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.62'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

/* ---------------------------------------------------------------
   Chrome
   --------------------------------------------------------------- */

.ui {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(22px, 2.7vw, 42px) clamp(22px, 3.4vw, 54px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.brand-mark {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ivory);
  stroke-width: 0.85;
  opacity: 0.86;
}

.brand-mark circle { fill: rgba(239, 124, 103, 0.15); }

.brand-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.38em;
  line-height: 1;
}

.brand-edition {
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  line-height: 1.2;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 40px);
}

.system-note {
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.25em;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 12, 16, 0.32);
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  transition: border-color 260ms var(--ease-soft), color 260ms var(--ease-soft), background 260ms var(--ease-soft);
}

.status-chip:hover {
  border-color: var(--line-strong);
  color: var(--ivory);
  background: rgba(22, 17, 23, 0.5);
}

.status-chip:focus-visible,
.primary-button:focus-visible,
.text-button:focus-visible,
.brand:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 5px;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(243, 232, 215, 0.28);
  box-shadow: 0 0 0 0 rgba(243, 232, 215, 0);
  transition: background 300ms, box-shadow 300ms;
}

.status-chip.is-live .status-dot {
  background: var(--coral);
  box-shadow: 0 0 10px rgba(239, 124, 103, 0.8);
  animation: status-breathe 2.4s ease-in-out infinite;
}

.status-chip.is-loading .status-dot {
  background: var(--gold);
  animation: status-blink 900ms steps(2, end) infinite;
}

.chip-separator {
  width: 1px;
  height: 10px;
  background: var(--line);
}

.chip-action { color: var(--ivory); }

/* ---------------------------------------------------------------
   Editorial composition
   --------------------------------------------------------------- */

.interface {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 clamp(22px, 3.4vw, 54px) clamp(20px, 2.8vw, 38px);
}

.editorial {
  position: absolute;
  left: clamp(22px, 3.4vw, 54px);
  bottom: clamp(108px, 14vh, 146px);
  width: min(33vw, 430px);
  pointer-events: none;
  text-shadow: 0 2px 28px rgba(5, 4, 7, 0.48);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 20px;
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.26em;
  line-height: 1;
}

.eyebrow-line {
  width: 31px;
  height: 1px;
  background: linear-gradient(90deg, var(--coral), transparent);
}

.editorial h1 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(58px, 6.6vw, 104px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.78;
}

.editorial h1 span { display: block; }
.editorial h1 em {
  color: var(--coral-bright);
  font-weight: 400;
}

.editorial-copy {
  margin: 28px 0 0;
  color: var(--ivory-dim);
  font-family: var(--sans-cn);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.13em;
  line-height: 2.05;
}

.gesture-key {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 196px;
  margin-top: 27px;
}

.key-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.key-number { color: var(--coral); font-size: 7px; }
.key-rule { display: block; width: 16px; height: 1px; background: var(--line-strong); }

/* ---------------------------------------------------------------
   Right-hand gesture rail
   --------------------------------------------------------------- */

.gesture-rail {
  position: absolute;
  top: 41%;
  right: clamp(30px, 4.8vw, 76px);
  width: 192px;
  transform: translateY(-50%);
  padding: 17px 0 17px 18px;
  border-left: 1px solid var(--line);
  pointer-events: none;
}

.rail-heading {
  margin-bottom: 23px;
  color: var(--ivory-faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.24em;
}

.rail-item {
  display: grid;
  grid-template-columns: 25px 1fr 16px;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  opacity: 0.38;
  transition: opacity 360ms var(--ease-soft);
}

.rail-item.is-active { opacity: 1; }

.rail-index,
.rail-copy strong,
.rail-copy span {
  font-family: var(--mono);
  letter-spacing: 0.13em;
}

.rail-index { align-self: start; padding-top: 3px; color: var(--coral); font-size: 7px; }
.rail-copy { display: flex; flex-direction: column; gap: 4px; }
.rail-copy strong { color: var(--ivory); font-size: 9px; font-weight: 500; }
.rail-copy span { color: var(--ivory-dim); font-size: 7px; }

.rail-signal {
  position: relative;
  width: 16px;
  height: 1px;
  background: var(--line);
  transition: background 300ms;
}

.rail-item.is-active .rail-signal { background: var(--coral); }

.rail-connector {
  width: 1px;
  height: 24px;
  margin: 2px 0 2px 32px;
  background: linear-gradient(var(--line), var(--line-strong), var(--line));
}

.rail-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.meter-ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}

.meter-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.meter-track,
.meter-progress {
  fill: none;
  stroke-width: 1.2;
}

.meter-track { stroke: rgba(243, 232, 215, 0.12); }
.meter-progress {
  stroke: url("#meterGradient");
  stroke-dasharray: 163.36;
  stroke-dashoffset: 163.36;
  stroke-linecap: round;
  transition: stroke-dashoffset 140ms linear;
}

.meter-ring > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ivory);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.meter-copy { display: flex; flex-direction: column; gap: 5px; }
.meter-copy span:first-child {
  color: var(--ivory);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}
.meter-copy span:last-child {
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.17em;
}

/* ---------------------------------------------------------------
   Camera preview
   --------------------------------------------------------------- */

.hand-panel {
  position: absolute;
  right: clamp(24px, 3.4vw, 54px);
  bottom: clamp(72px, 9.2vh, 102px);
  width: 232px;
  padding: 11px;
  border: 1px solid var(--line);
  background: rgba(12, 10, 13, 0.46);
  backdrop-filter: blur(16px) saturate(0.8);
  opacity: 0.78;
  transition: opacity 500ms var(--ease-soft), border-color 500ms;
}

.hand-panel.is-live { opacity: 1; border-color: rgba(239, 124, 103, 0.22); }

.panel-head,
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.17em;
  line-height: 1;
}

.panel-head { margin-bottom: 9px; color: var(--ivory-dim); }
.panel-head span:last-child { color: var(--coral); }
.panel-foot { margin-top: 8px; color: var(--ivory-faint); }

.panel-window {
  position: relative;
  height: 130px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(243, 232, 215, 0.018) 4px),
    #0b090d;
}

#handCanvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 500ms;
}

.hand-panel.is-live #handCanvas { opacity: 1; }

.viz-offline {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--ivory-faint);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.18em;
  transition: opacity 400ms;
}

.viz-offline svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: rgba(239, 124, 103, 0.5);
  stroke-width: 1.1;
}

.hand-panel.is-live .viz-offline { opacity: 0; }

.scanline {
  position: absolute;
  right: 0;
  left: 0;
  top: -30%;
  height: 28%;
  background: linear-gradient(transparent, rgba(255, 190, 145, 0.08), transparent);
  animation: scan 4.5s linear infinite;
  pointer-events: none;
}

.panel-window .corner {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: rgba(243, 232, 215, 0.38);
  border-style: solid;
  pointer-events: none;
}
.corner-tl { top: 5px; left: 5px; border-width: 1px 0 0 1px; }
.corner-tr { top: 5px; right: 5px; border-width: 1px 1px 0 0; }
.corner-bl { bottom: 5px; left: 5px; border-width: 0 0 1px 1px; }
.corner-br { bottom: 5px; right: 5px; border-width: 0 1px 1px 0; }

/* ---------------------------------------------------------------
   Lower status line
   --------------------------------------------------------------- */

.mode-line {
  position: absolute;
  bottom: clamp(20px, 2.8vw, 35px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.15em;
  white-space: nowrap;
  text-transform: uppercase;
}

.mode-pulse {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 9px rgba(239, 124, 103, 0.8);
}

.mode-separator { color: var(--ivory-faint); }
#modeHint { color: var(--ivory-faint); }

.footer-note {
  position: absolute;
  right: clamp(24px, 3.4vw, 54px);
  bottom: clamp(21px, 2.8vw, 36px);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ivory-faint);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.15em;
}

.footer-line { width: 20px; height: 1px; background: var(--line); }

.toast {
  position: fixed;
  z-index: 90;
  bottom: 92px;
  left: 50%;
  max-width: min(90vw, 500px);
  padding: 11px 16px;
  border: 1px solid rgba(239, 124, 103, 0.22);
  background: rgba(18, 12, 15, 0.86);
  color: var(--ivory);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  line-height: 1.55;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  backdrop-filter: blur(14px);
  transition: opacity 280ms, transform 280ms var(--ease-out);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------
   Intro
   --------------------------------------------------------------- */

.intro {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(22px, 2.7vw, 42px) clamp(22px, 3.8vw, 60px) clamp(20px, 2.7vw, 36px);
  background:
    radial-gradient(ellipse 34% 45% at 68% 42%, rgba(132, 55, 47, 0.13), transparent 70%),
    linear-gradient(115deg, rgba(8, 7, 10, 0.94) 0%, rgba(8, 7, 10, 0.84) 48%, rgba(8, 7, 10, 0.9) 100%);
  backdrop-filter: blur(15px) saturate(0.72);
  transition: opacity 900ms var(--ease-out), visibility 900ms;
}

.intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro.is-leaving .intro-copy,
.intro.is-leaving .intro-visual {
  transform: translateY(-14px);
  opacity: 0;
  transition: transform 700ms var(--ease-out), opacity 500ms;
}

.intro-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.intro-head,
.intro-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-intro { pointer-events: auto; }

.intro-index {
  color: var(--ivory-faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.23em;
}

.intro-index span { padding: 0 8px; color: var(--coral); }

.intro-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(400px, 1.05fr) minmax(350px, 0.95fr);
  align-items: center;
  gap: 3vw;
  width: min(100%, 1540px);
  margin: 0 auto;
}

.intro-copy {
  padding: 2vh 0 3vh;
  max-width: 760px;
}

.intro-eyebrow {
  margin-bottom: 25px;
  animation: reveal-up 900ms 240ms var(--ease-out) both;
}

.intro-copy h2 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(75px, 8.4vw, 144px);
  font-weight: 400;
  letter-spacing: -0.052em;
  line-height: 0.73;
  animation: reveal-up 1100ms 340ms var(--ease-out) both;
}

.intro-copy h2 span { display: block; }
.intro-copy h2 em { color: var(--coral-bright); font-weight: 400; }

.intro-lede {
  margin: clamp(28px, 4vh, 43px) 0 0;
  color: var(--ivory-dim);
  font-family: var(--sans-cn);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.13em;
  line-height: 2;
  animation: reveal-up 950ms 560ms var(--ease-out) both;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: clamp(28px, 4.4vh, 48px);
  animation: reveal-up 950ms 700ms var(--ease-out) both;
}

.primary-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 19px;
  min-width: 218px;
  height: 58px;
  padding: 0 18px 0 24px;
  border: 1px solid var(--ivory);
  border-radius: 1px;
  background: var(--ivory);
  color: #100d10;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 350ms var(--ease-soft), color 350ms var(--ease-soft), border-color 350ms, transform 350ms var(--ease-out);
}

.primary-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  transition: transform 350ms var(--ease-out);
}

.primary-button:hover {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(243, 232, 215, 0.5);
  transform: translateY(-2px);
}

.primary-button:hover svg { transform: translateX(4px); }

.primary-button.is-loading {
  pointer-events: none;
  background: transparent;
  color: var(--ivory);
  border-color: var(--line-strong);
}

.primary-button.is-loading svg { display: none; }

.button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(243, 232, 215, 0.22);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.primary-button.is-loading .button-spinner { display: block; }

.text-button {
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--ivory-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  cursor: pointer;
  transition: color 280ms;
}

.text-button span {
  display: inline-block;
  margin-left: 7px;
  color: var(--coral);
  transition: transform 280ms var(--ease-out);
}

.text-button:hover { color: var(--ivory); }
.text-button:hover span { transform: translateX(4px); }

.intro-status {
  min-height: 15px;
  margin: 20px 0 0;
  color: var(--ivory-faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  animation: reveal-up 900ms 800ms var(--ease-out) both;
}

.intro-status.is-error { color: var(--coral); }

.intro-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4vh;
  color: rgba(243, 232, 215, 0.29);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.16em;
  animation: reveal-up 900ms 900ms var(--ease-out) both;
}

.intro-privacy svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.intro-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  animation: intro-fade 1500ms 400ms var(--ease-out) both;
}

.intro-visual::before {
  content: "";
  position: absolute;
  width: min(38vw, 570px);
  aspect-ratio: 1;
  border: 1px solid rgba(243, 232, 215, 0.055);
  border-radius: 50%;
  box-shadow: inset 0 0 120px rgba(204, 92, 63, 0.04);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(243, 232, 215, 0.09);
  border-radius: 50%;
  transform-origin: 50% 50%;
}

.orbit-one {
  width: min(33vw, 505px);
  aspect-ratio: 1;
  border-left-color: transparent;
  border-bottom-color: transparent;
  animation: orbit-spin 28s linear infinite;
}

.orbit-two {
  width: min(27vw, 410px);
  aspect-ratio: 1;
  border-top-color: transparent;
  border-right-color: rgba(239, 124, 103, 0.26);
  animation: orbit-spin 19s linear infinite reverse;
}

.orbit-dot {
  position: absolute;
  top: 9%;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: 1px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 14px rgba(239, 124, 103, 0.9);
}

.hand-diagram {
  position: relative;
  z-index: 2;
  width: min(27vw, 380px);
  transform: rotate(-4deg);
  filter: drop-shadow(0 0 25px rgba(199, 94, 67, 0.08));
}

.hand-diagram svg { display: block; width: 100%; height: auto; overflow: visible; }

.hand-bones path {
  fill: none;
  stroke: rgba(243, 232, 215, 0.31);
  stroke-width: 0.8;
  stroke-linecap: round;
  stroke-dasharray: 2 7;
  animation: bone-flow 9s linear infinite;
}

.hand-joints circle {
  fill: rgba(243, 232, 215, 0.1);
  stroke: rgba(243, 232, 215, 0.75);
  stroke-width: 0.65;
}

.hand-tips circle {
  fill: none;
  stroke: rgba(239, 124, 103, 0.24);
  stroke-width: 0.7;
  transform-origin: center;
  transform-box: fill-box;
  animation: tip-pulse 3s ease-in-out infinite;
}

.hand-tips circle:nth-child(2) { animation-delay: 0.4s; }
.hand-tips circle:nth-child(3) { animation-delay: 0.8s; }
.hand-tips circle:nth-child(4) { animation-delay: 1.2s; }
.hand-tips circle:nth-child(5) { animation-delay: 1.6s; }

.diagram-label {
  position: absolute;
  color: var(--ivory-faint);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.diagram-label::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 25px;
  height: 1px;
  background: var(--line);
}

.label-a { right: 100%; top: 83%; margin-right: 18px; }
.label-a::before { left: 100%; }
.label-b { left: 84%; top: 21%; margin-left: 16px; }
.label-b::before { right: 100%; }
.label-c { left: 44%; bottom: -12%; }
.label-c::before { display: none; }

.visual-caption {
  position: absolute;
  right: 3%;
  bottom: 2%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--ivory-faint);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.15em;
  text-align: right;
}

.intro-foot {
  color: var(--ivory-faint);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.17em;
}

.intro-foot-line {
  flex: 1;
  height: 1px;
  margin: 0 3vw;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ---------------------------------------------------------------
   Fallback + motion
   --------------------------------------------------------------- */

.webgl-fallback {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--ink);
  text-align: center;
}

.webgl-fallback[hidden] { display: none; }
.webgl-fallback span { color: var(--coral); font-family: var(--mono); font-size: 8px; letter-spacing: 0.22em; }
.webgl-fallback h2 { margin: 20px 0 10px; font-family: var(--serif); font-size: 48px; font-weight: 400; }
.webgl-fallback p { color: var(--ivory-dim); font-size: 12px; }

@keyframes status-breathe {
  0%, 100% { box-shadow: 0 0 7px rgba(239, 124, 103, 0.5); }
  50% { box-shadow: 0 0 16px rgba(239, 124, 103, 0.95); }
}
@keyframes status-blink { 50% { opacity: 0.2; } }
@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 0.8; }
  88% { opacity: 0.7; }
  100% { transform: translateY(470%); opacity: 0; }
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes tip-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 0.9; transform: scale(1.15); }
}
@keyframes bone-flow { to { stroke-dashoffset: -90; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes intro-fade {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1100px) {
  .editorial { width: min(37vw, 390px); }
  .editorial h1 { font-size: clamp(54px, 6.8vw, 82px); }
  .gesture-rail { right: 27px; width: 166px; }
  .hand-panel { width: 205px; }
  .system-note { display: none; }
  .intro-layout { grid-template-columns: minmax(360px, 1.1fr) minmax(300px, 0.9fr); }
}

@media (max-width: 860px) {
  .gesture-rail,
  .footer-note { display: none; }
  .editorial { width: min(48vw, 380px); }
  .hand-panel { width: 184px; bottom: 72px; }
  .panel-window { height: 104px; }

  .intro-layout { grid-template-columns: 1fr; }
  .intro-visual { position: absolute; right: -12vw; bottom: -10vh; width: 55vw; min-height: 420px; opacity: 0.38; }
  .intro-copy { position: relative; z-index: 3; max-width: 660px; }
  .intro-copy h2 { font-size: clamp(72px, 12vw, 118px); }
}

@media (max-width: 640px) {
  #app { min-height: 520px; }
  .topbar { padding: 18px 18px; }
  .brand-mark { width: 18px; height: 18px; }
  .brand-name { font-size: 10px; letter-spacing: 0.3em; }
  .brand-edition { display: none; }
  .status-chip { min-height: 29px; padding: 0 10px; font-size: 7px; }
  .status-chip .chip-separator { display: none; }
  .chip-action { color: var(--coral); }

  .interface { padding: 0 18px 18px; }
  .editorial {
    left: 18px;
    bottom: 80px;
    width: calc(100vw - 36px);
  }
  .eyebrow { margin-bottom: 13px; font-size: 6px; }
  .editorial h1 { font-size: clamp(42px, 12vw, 58px); line-height: 0.8; }
  .editorial-copy { display: none; }
  .gesture-key { display: none; }
  .hand-panel { display: none; }

  .mode-line {
    bottom: 18px;
    width: calc(100vw - 36px);
    justify-content: center;
    gap: 7px;
    font-size: 6px;
    letter-spacing: 0.08em;
  }
  #modeHint { overflow: hidden; text-overflow: ellipsis; }

  .intro { padding: 18px 20px 20px; }
  .intro-index { display: none; }
  .intro-layout { display: flex; align-items: center; }
  .intro-copy { padding: 0; max-width: 100%; }
  .intro-eyebrow { margin-bottom: 18px; font-size: 6px; }
  .intro-copy h2 { font-size: clamp(58px, 17vw, 90px); line-height: 0.75; }
  .intro-lede { margin-top: 26px; font-size: 11px; line-height: 1.9; }
  .intro-lede br { display: none; }
  .intro-actions { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 30px; }
  .primary-button { width: 100%; height: 54px; }
  .text-button { text-align: left; padding-left: 3px; }
  .intro-status { margin-top: 14px; font-size: 6px; }
  .intro-privacy { margin-top: 24px; font-size: 5.5px; }
  .intro-visual { display: none; }
  .intro-foot { font-size: 5.5px; }
  .intro-foot span:last-child { display: none; }
  .intro-foot-line { margin-right: 0; }

  .toast { bottom: 64px; font-size: 8px; }
}

@media (max-height: 700px) and (min-width: 861px) {
  .editorial { bottom: 90px; }
  .editorial h1 { font-size: clamp(48px, 5.7vw, 76px); }
  .editorial-copy { display: none; }
  .gesture-key { display: none; }
  .hand-panel { width: 190px; bottom: 64px; }
  .panel-window { height: 100px; }
  .intro-copy h2 { font-size: clamp(62px, 7vw, 110px); }
  .intro-visual { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .intro,
  .intro-copy,
  .intro-visual,
  .primary-button,
  .status-dot,
  .toast { transition-duration: 150ms !important; }
}
