/* Perception's black, glass and hairline language, carrying Ally's sunset orb and acrylic pill. */
:root {
  --sun-0: #ff6b35;
  --sun-1: #f72585;
  --sun-2: #ffb347;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #fff;
  --dim: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.35);
  --glass: rgba(0, 0, 0, 0.35);
  --sans: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #000;
  color: var(--text);
  font: 300 14px/1.9 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; }
code, kbd, pre { font-family: var(--mono); }

.field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.label {
  margin: 0 0 22px;
  font: 400 10px/1.6 var(--mono);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.prose { margin: 0 0 18px; color: var(--dim); font-size: 14px; }
.prose.bright { color: rgba(255, 255, 255, 0.8); }
.prose a { border-bottom: 1px solid var(--line-strong); }
.prose b { font-weight: 500; color: var(--text); }
.glass { background: var(--glass); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* Ally's orb, as CSS: a sunset sphere that breathes. The rail's large orb is WebGL. */
.orb {
  --s: 30px;
  display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.85) 0 7%, transparent 26%),
    radial-gradient(circle at 50% 55%, var(--sun-2) 0%, var(--sun-0) 38%, var(--sun-1) 72%, #3a0820 100%);
  box-shadow: 0 0 calc(var(--s) * 0.6) rgba(247, 37, 133, 0.45), inset 0 0 calc(var(--s) * 0.2) rgba(255, 255, 255, 0.25);
  animation: breathe 3.4s ease-in-out infinite;
}
.orb-sm { --s: 20px; }
.orb-xs { --s: 12px; }
@keyframes breathe { 50% { transform: scale(1.07); filter: saturate(1.25); } }

/* Header */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 48px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark { font: 400 16px/1 Tanker, var(--sans); letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.85); padding-top: 2px; }
.brand:hover .wordmark { color: #fff; }
.nav nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.nav nav a:not(.pill-link) { font: 400 10px var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); transition: color 0.2s; }
.nav nav a:not(.pill-link):hover { color: rgba(255, 255, 255, 0.85); }

/* Acrylic pill: the one rounded shape on a square page, as in Ally. */
.pill-link, .pill-btn {
  display: inline-flex; align-items: center; gap: 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font: 400 10px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pill-link { padding: 6px 13px 6px 8px; }
.pill-btn { padding: 11px 20px; }
.pill-btn.primary { padding-left: 12px; }
.pill-link:hover, .pill-btn:hover { color: #fff; border-color: rgba(255, 179, 71, 0.5); background: rgba(255, 107, 53, 0.08); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Layout: sticky rail left, hero and story right. */
main {
  position: relative; z-index: 1;
  max-width: 1500px; margin: 0 auto; padding-top: 48px;
  display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.82fr); grid-template-rows: auto 1fr;
  align-items: start;
}
.hero { grid-column: 2; grid-row: 1; padding: 80px 48px 8px; }
.rail { grid-column: 1; grid-row: 1 / span 2; align-self: stretch; border-right: 1px solid var(--line); background: rgba(0, 0, 0, 0.1); }
.story { grid-column: 2; grid-row: 2; padding: 56px 48px 80px; display: grid; gap: 56px; }

h1 { margin: 0 0 28px; font-weight: 300; font-size: clamp(30px, 3.3vw, 46px); line-height: 1.08; letter-spacing: -0.025em; }
h1 + .label { font-size: 9px; color: rgba(255, 255, 255, 0.3); letter-spacing: 0.3em; }

.rail-pin { position: sticky; top: 48px; height: calc(100dvh - 48px); display: flex; flex-direction: column; justify-content: center; padding: 32px 40px; }
.rail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: rgba(255, 255, 255, 0.45); letter-spacing: 0.18em; }
.live { width: 6px; height: 6px; border-radius: 50%; background: var(--sun-2); box-shadow: 0 0 8px var(--sun-0); }

.stage {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.energy {
  position: absolute; left: 50%; top: 50%; width: min(78%, 120vh); aspect-ratio: 1; transform: translate(-50%, -50%);
  opacity: 0.9; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.35), rgba(247, 37, 133, 0.18) 35%, transparent 62%);
}
.energy.is-gl { background: none; }
.scenes { position: absolute; inset: 0; }
.scene {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 6%;
  opacity: 0; transform: translateY(8px); transition: opacity 0.6s ease, transform 0.6s ease; pointer-events: none;
}
.scene.is-on { opacity: 1; transform: none; }

.pill {
  display: flex; align-items: center; gap: 14px; width: min(440px, 100%);
  padding: 10px 12px 10px 10px; border-radius: 999px;
  background: rgba(20, 20, 24, 0.55); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.pill .orb { --s: 34px; }
.pill-text { flex: 1; font-size: 15px; color: rgba(255, 255, 255, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill kbd { font-size: 9px; letter-spacing: 0.12em; color: var(--faint); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
.pill-top { width: auto; padding: 6px 14px 6px 6px; gap: 10px; justify-self: start; }
.pill-top .orb { --s: 20px; }
.pill-top .pill-text { font: 400 10px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }

.panel {
  width: min(520px, 100%); display: grid; gap: 12px; padding: 14px; border-radius: 22px;
  background: rgba(16, 16, 20, 0.6); border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3);
  font-size: 13px; line-height: 1.7;
}
.panel p { margin: 0; }
.bubble-you { justify-self: end; max-width: 80%; padding: 8px 14px; border-radius: 16px 16px 4px 16px; background: rgba(255, 107, 53, 0.16); border: 1px solid rgba(255, 107, 53, 0.25); color: rgba(255, 255, 255, 0.9); }
.reply { display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: rgba(255, 255, 255, 0.78); }
.reply code, .panel code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); }
.status { display: flex; align-items: center; gap: 8px; font: 400 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }
.dot.warn { background: var(--sun-2); box-shadow: 0 0 8px var(--sun-0); }
.chips { display: flex; gap: 8px; }
.chips span { font: 400 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--dim); }
.accounts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.accounts li { padding: 8px 10px; background: rgba(0, 0, 0, 0.6); font: 400 11px var(--mono); color: var(--dim); }
.accounts span { display: block; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.accounts .spent { opacity: 0.5; }
.accounts .active { color: #fff; box-shadow: inset 0 -2px 0 var(--sun-0); }
.accounts .active span { color: var(--sun-2); }

.phone { width: min(250px, 62%); aspect-ratio: 9 / 17; border-radius: 30px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(10, 10, 12, 0.75); padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.phone-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 107, 53, 0.12); border: 1px solid rgba(255, 107, 53, 0.3); font-size: 11px; line-height: 1.3; color: rgba(255, 255, 255, 0.85); }
.phone-bar b { margin-left: auto; font: 500 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sun-2); }
.phone-body { display: grid; gap: 8px; align-content: start; }
.phone-step { margin: 0; padding: 8px 10px; border: 1px solid var(--line); font-size: 12px; line-height: 1.4; color: var(--dim); }
.phone-step.done { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.2); }
.phone-step.now { color: #fff; border-color: rgba(255, 179, 71, 0.45); }
.phone-note { margin: 4px 0 0; font: 400 9px/1.6 var(--mono); letter-spacing: 0.08em; color: var(--faint); }

.shot { margin: 0; height: 100%; display: grid; place-items: center; }
.shot img { max-height: 100%; width: auto; border: 1px solid var(--line-strong); }

.captions { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-top: 0; background: rgba(0, 0, 0, 0.45); }
.captions > div { padding: 16px; }
.captions > div + div { border-left: 1px solid var(--line); }
.captions .label { margin-bottom: 8px; font-size: 9px; letter-spacing: 0.24em; color: var(--faint); }
.captions p:not(.label) { margin: 0; font-size: 13px; line-height: 1.75; color: rgba(255, 255, 255, 0.65); }
.scene-dots { list-style: none; display: flex; gap: 6px; margin: 16px 0 0; padding: 0; }
.scene-dots li { width: 18px; height: 2px; background: var(--line-strong); transition: background 0.4s; }
.scene-dots li.is-on { background: var(--sun-0); }

/* Story */
.story > section { scroll-margin-top: 80px; min-width: 0; }
.hero, .rail, .story { min-width: 0; }
.cells { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cells p { margin: 0; padding: 12px 16px; background: rgba(0, 0, 0, 0.6); font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, 0.7); }
.items { display: grid; gap: 34px; }
.items h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; font: 500 11px var(--sans); letter-spacing: 0.15em; text-transform: uppercase; }
.items p { margin: 0; color: rgba(255, 255, 255, 0.52); }
.tag { border: 1px solid var(--line-strong); padding: 1px 8px; font: 400 8px/1.8 var(--mono); letter-spacing: 0.22em; color: var(--faint); }
.frame { margin: 8px 0 0; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.45); overflow-x: auto; }
.frame img { min-width: 600px; width: 100%; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ticks li { padding: 12px 16px 12px 36px; background: rgba(0, 0, 0, 0.6); position: relative; font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, 0.7); }
.ticks li::before { content: ""; position: absolute; left: 16px; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--sun-0); box-shadow: 0 0 8px var(--sun-1); }
pre { margin: 0 0 18px; padding: 18px 20px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.6); overflow-x: auto; font-size: 13px; line-height: 1.8; color: rgba(255, 255, 255, 0.8); }

/* Footer */
.footer {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 24px clamp(16px, 4vw, 48px) 32px; border-top: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.giant {
  font: 400 clamp(80px, 15vw, 190px)/0.82 Tanker, var(--sans); letter-spacing: -0.01em; user-select: none; cursor: default;
  background: linear-gradient(100deg, #fff 0 42%, var(--sun-2) 62%, var(--sun-0) 78%, var(--sun-1));
  background-size: 260% 100%; background-position: 0 0; -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-position 1.1s ease;
}
.giant:hover { background-position: 100% 0; }
.giant .caret { -webkit-text-fill-color: rgba(255, 255, 255, 0.7); font-weight: 300; animation: blink 0.65s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.footer-meta { display: grid; gap: 10px; text-align: right; justify-items: end; }
.footer-meta .label { margin: 0; font-size: 9px; color: var(--faint); }
.footer-meta > a { font-size: 12px; color: rgba(255, 255, 255, 0.5); }
.footer-meta > a:hover { color: #fff; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font: 400 9px var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.3); }
.footer-links a:hover { color: rgba(255, 255, 255, 0.7); }

/* Trailing dot in place of the pointer, only once the script is running. */
.cursor-dot { position: fixed; left: 0; top: 0; z-index: 100; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none; background: var(--sun-2); box-shadow: 0 0 12px var(--sun-0), 0 0 22px rgba(247, 37, 133, 0.5); transition: width 0.2s, height 0.2s, margin 0.2s; }
.cursor-dot.is-link { width: 22px; height: 22px; margin: -11px 0 0 -11px; background: rgba(255, 179, 71, 0.25); }
.has-dot, .has-dot * { cursor: none; }

@media (max-width: 1023px) {
  main { grid-template-columns: 1fr; grid-template-rows: none; }
  .hero, .rail, .story { grid-column: 1; grid-row: auto; }
  .hero { padding: 48px 24px 40px; }
  .rail { border-right: 0; border-top: 1px solid var(--line); }
  .rail-pin { position: static; height: auto; padding: 48px 20px; }
  .story { padding: 48px 24px 64px; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .nav nav a:not(.pill-link) { display: none; }
  .stage { aspect-ratio: 4 / 5; }
  .captions { grid-template-columns: 1fr; }
  .captions > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .pill kbd { display: none; }
  .footer { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; justify-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .giant .caret { animation: none; }
  .scene { transition: none; }
}
