/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding-top: 40px;
}
.hero::before {
  content: "";
  position: absolute;
  left: 50%; top: 40px;
  width: min(1100px, 150vw); height: 760px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 26%, transparent), transparent 72%);
  transition: background 1.2s;
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.vio-big {
  position: relative;
  cursor: grab;
  touch-action: none;
  width: min(460px, 92vw);
  height: min(460px, 92vw);
  flex: none;
  cursor: pointer;
  margin-bottom: -40px;
  -webkit-tap-highlight-color: transparent;
}
.vio-big canvas.gl, .vio-big .css-orb, .vio-big svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vio-big.dragging { cursor: grabbing; }
.vio-big svg { transform-origin: 50% 50%; }
.vio-big canvas.fx { position: absolute; left: -40%; top: -40%; width: 180%; height: 180%; pointer-events: none; }
.vio-big .css-orb { margin: 21%; width: 58% !important; height: 58% !important; }
.nogl .css-orb { display: block; }
.nogl canvas.gl { display: none; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(64px, 14vw, 176px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 10%, var(--blue-pale) 45%, color-mix(in srgb, var(--glow) 80%, #fff) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline { font: 700 clamp(20px, 3vw, 30px)/1.25 var(--display); max-width: 24ch; margin-top: 10px; }
.hero .lede { margin: 18px auto 0; font-size: 17px; }
.readout { font: 13px/1.5 var(--mono); color: var(--muted); min-height: 3em; max-width: 46ch; margin-top: 28px; }
.readout b { color: var(--text); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.chip:hover { border-color: #34496f; }
.anims { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.anims-label { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.anims .chip { padding: 6px 13px; background: color-mix(in srgb, var(--vioso-navy) 30%, var(--panel)); }
.anims .chip span { font-size: 14px; line-height: 1; }
.drag-hint { font: 12px var(--mono); color: var(--muted); margin-top: 8px; }
.controls { display: flex; flex-direction: column; align-items: center; }

/* The focus ring follows the orb, not the square box around it. */
.vio-big:focus-visible { outline: none; }
.vio-big:focus-visible::after { content: ""; position: absolute; inset: 19%; border-radius: 50%; outline: 2px solid var(--blue); outline-offset: 6px; pointer-events: none; }

/* Desktop: Vio on the left, the words and every control on the right, so Vio
   and what moves it are on one screen (a click never scrolls away from it). */
@media (min-width: 1000px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(380px, 460px) minmax(0, 640px);
    column-gap: 56px;
    justify-content: center;
    align-items: center;
    align-content: center;
    text-align: left;
    min-height: min(820px, calc(100vh - 60px));
    padding-top: 20px;
  }
  /* The glow belongs to Vio here: the hero's own would be cut at its edge. */
  .hero::before { display: none; }
  .hero .vio-big::before { content: ""; position: absolute; inset: -22%; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 26%, transparent), transparent 72%); transition: background 1.2s; }
  .hero > * { grid-column: 2; }
  .hero .vio-big { grid-column: 1; grid-row: 1 / span 5; margin: 0; width: 460px; height: 460px; }
  .hero h1 { font-size: clamp(88px, 8.4vw, 136px); }
  .hero .tagline { margin-top: 12px; }
  .hero .lede { margin: 14px 0 0; }
  .hero .controls { align-items: flex-start; }
  .hero .readout { margin-top: 20px; }
  .hero .chips, .hero .anims { justify-content: flex-start; }
  .hero .more { grid-column: 1 / -1; justify-self: center; margin-top: 8px; }
}

/* Phones: Vio and everything that moves Vio share one screen. The title
   comes first, then Vio, then the controls as two swipeable rows, and the
   story text after them. Tapping a control is useless if Vio is off screen. */
@media (max-width: 700px) {
  .hero { padding-top: 12px; gap: 4px; }
  .hero .eyebrow { order: 1; }
  .hero h1 { order: 2; font-size: clamp(48px, 15vw, 64px); }
  .vio-big { order: 3; width: min(68vw, 42vh, 300px); height: min(68vw, 42vh, 300px); margin: -6px 0 -10px; }
  .hero .controls { order: 4; width: calc(100% + 32px); margin-inline: -16px; }
  .hero .tagline { order: 5; margin-top: 18px; }
  .hero .lede { order: 6; }
  .hero .more { order: 7; margin-top: 18px; }
  .readout { margin-top: 0; min-height: 3.2em; padding-inline: 16px; font-size: 12.5px; }
  .controls .chips, .controls .anims { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px 16px 6px; width: 100%; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); }
  .controls .chips::-webkit-scrollbar, .controls .anims::-webkit-scrollbar { display: none; }
  .controls .chip { flex: none; scroll-snap-align: start; padding: 9px 14px 9px 10px; font-size: 14px; }
  .controls .anims { gap: 8px; margin-top: 6px; }
  .controls .anims .chips { overflow: visible; padding: 0; width: auto; -webkit-mask-image: none; mask-image: none; }
  .anims-label { flex: none; align-self: center; }
  .drag-hint { margin-top: 4px; }
}
.chip[aria-pressed="true"] { border-color: var(--dot); background: var(--panel-2); }
.chip i { width: 12px; height: 12px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 10px var(--dot); }
