/* GeniePS site — night drive palette from the app. */
:root {
  --night: #0e0c1a;
  --dusk: #1b1830;
  --line: #2c2847;
  --brass: #c9a227;
  --glow: #f3d37a;
  --jade: #2e9e7e;
  --ember: #d4623c;
  --paper: #ece6d6;
  --smoke: #a39fb8;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font: 400 1.0625rem/1.6 var(--body);
}
a { color: var(--glow); text-underline-offset: 3px; }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font: 700 1.25rem/1 var(--display); letter-spacing: -0.01em; }
.brand svg { width: 34px; height: 34px; }
.top nav a { color: var(--smoke); text-decoration: none; margin-left: 22px; font-size: 0.95rem; }
.top nav a:hover { color: var(--paper); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding: 48px 0 88px; }
.hero h1 {
  font: 800 clamp(2.6rem, 6vw, 4.6rem)/0.98 var(--display);
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  font-variation-settings: 'wdth' 92;
}
.hero p.lede { font-size: 1.2rem; color: var(--paper); max-width: 34ch; margin: 0 0 32px; opacity: 0.88; }

.join { display: flex; gap: 10px; max-width: 520px; flex-wrap: wrap; }
.join input {
  flex: 1 1 220px; min-width: 0; min-height: 54px; padding: 0 18px;
  background: var(--dusk); color: var(--paper);
  border: 1px solid var(--line); border-radius: 14px;
  font: inherit;
}
.join input::placeholder { color: var(--smoke); }
.join button {
  min-height: 54px; padding: 0 24px; border: 0; border-radius: 14px;
  background: var(--brass); color: var(--night);
  font: 700 1.05rem/1 var(--display); cursor: pointer;
}
.join button:hover { background: var(--glow); }
.join button[disabled] { opacity: 0.6; cursor: progress; }
.join-note { min-height: 1.6em; margin: 12px 0 0; font-size: 0.95rem; color: var(--smoke); }
.join-note.ok { color: var(--glow); }
.join-note.err { color: var(--ember); }

/* The drive transcript: directions and the Genie, strung along a route. */
.drive { position: relative; padding: 8px 0 8px 46px; }
.drive::before {
  content: ''; position: absolute; left: 15px; top: 14px; bottom: 30px; width: 0;
  border-left: 4px dotted var(--brass);
  transform-origin: top; animation: draw 2.2s ease-out both;
}
.drive .end {
  position: absolute; left: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%;
  border: 4px solid var(--brass); background: var(--night);
}
.stop { position: relative; margin: 0 0 16px; animation: arrive 0.5s ease-out both; }
.stop::before {
  content: ''; position: absolute; left: -38px; top: 14px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--night); border: 3px solid var(--brass);
}
.stop.nav p {
  display: inline-block; margin: 0; padding: 12px 16px; border-radius: 14px;
  background: var(--brass); color: var(--night); font: 700 1.05rem/1.3 var(--display);
}
.stop.nav small { display: block; font: 800 1.5rem/1 var(--display); letter-spacing: -0.02em; margin-bottom: 4px; }
.stop.genie::before { border-color: var(--jade); }
.stop.genie p {
  margin: 0; padding: 12px 16px; border-radius: 14px; max-width: 40ch;
  background: var(--dusk); border: 1px solid var(--line); font-style: italic; color: var(--paper);
}
.stop.genie span { display: block; font: 700 0.85rem/1 var(--display); color: var(--jade); margin-bottom: 6px; font-style: normal; }
.stop.arrive p { background: transparent; color: var(--glow); padding-left: 0; font: 700 1.1rem/1.3 var(--display); }
.stop:nth-child(1) { animation-delay: 0.2s; }
.stop:nth-child(2) { animation-delay: 0.6s; }
.stop:nth-child(3) { animation-delay: 1.0s; }
.stop:nth-child(4) { animation-delay: 1.4s; }
.stop:nth-child(5) { animation-delay: 1.8s; }
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .drive::before, .stop { animation: none; }
}

/* Sections */
section { padding: 72px 0; border-top: 1px solid var(--line); }
section h2 { font: 800 clamp(1.9rem, 3.6vw, 2.6rem)/1.05 var(--display); letter-spacing: -0.025em; margin: 0 0 14px; max-width: 22ch; }
section > .wrap > p.intro { max-width: 60ch; color: var(--paper); opacity: 0.85; margin: 0 0 40px; }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.rules h3 { font: 700 1.25rem/1.2 var(--display); margin: 0 0 8px; }
.rules p { margin: 0; color: var(--smoke); }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.mode { padding: 36px; }
.mode + .mode { border-left: 1px solid var(--line); }
.mode h3 { font: 800 1.8rem/1 var(--display); letter-spacing: -0.02em; margin: 0 0 6px; }
.mode .who { margin: 0 0 18px; font-weight: 700; }
.mode.tour h3, .mode.tour .who { color: var(--jade); }
.mode.ride h3, .mode.ride .who { color: var(--ember); }
.mode p { margin: 0 0 12px; max-width: 46ch; }
.mode ul { margin: 0; padding-left: 1.1em; color: var(--smoke); }
.mode li { margin-bottom: 6px; }
.lamp { display: flex; gap: 18px; align-items: center; margin-top: 28px; color: var(--smoke); max-width: 62ch; }
.lamp svg { flex: none; width: 52px; height: 52px; }

.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }
.faq h3 { font: 700 1.15rem/1.3 var(--display); margin: 0 0 6px; }
.faq p { margin: 0; color: var(--smoke); }

.cta { text-align: left; }
.cta .join { margin-top: 8px; }

footer { border-top: 1px solid var(--line); padding: 36px 0 56px; color: var(--smoke); font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer a { color: var(--smoke); }

/* Legal pages */
.legal { max-width: 70ch; padding: 24px 0 80px; }
.legal h1 { font: 800 2.6rem/1.05 var(--display); letter-spacing: -0.02em; margin: 0 0 8px; }
.legal h2 { font: 700 1.35rem/1.25 var(--display); margin: 36px 0 8px; }
.legal p, .legal li { color: var(--paper); opacity: 0.9; }
.legal .meta { color: var(--smoke); margin-bottom: 28px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 24px; }
  .rules, .faq { grid-template-columns: 1fr; gap: 28px; }
  .modes { grid-template-columns: 1fr; }
  .mode + .mode { border-left: 0; border-top: 1px solid var(--line); }
  .top nav a:not(:last-child) { display: none; }
}
