/* Ampora — landing page
   Palette is taken from the object and its setting: a concrete bike garage
   at night, the hub's enamel shell, its green status light, and the heat
   colour that only appears in the fire-safety sequence. */
:root {
  --concrete: #0E1113;      /* garage at night: page base */
  --concrete-2: #1A1F22;    /* raised surfaces on dark */
  --shell: #ECE8DF;         /* hub enamel, primary text on dark */
  --ash: #A3A9AC;           /* secondary text on dark (6.4:1 on concrete) */
  --signal: #52D18D;        /* locker status light: only for "ok" states */
  --thermal: #FF5A1F;       /* heat: only for the fire sequence */
  --ink: #1E2224;           /* text on light */
  --ink-2: #4A5155;         /* secondary text on light (7.0:1) */

  --font: "Montserrat", system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 56px);
  --measure: 34rem;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--concrete);
  color: var(--shell);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: var(--pad); top: -60px; z-index: 50;
  background: var(--shell); color: var(--ink); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- 3D stage ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#hub { width: 100%; height: 100%; display: block; }
.stage-fallback { position: absolute; inset: 0; }
.stage-fallback img { width: 100%; height: 100%; object-fit: cover; opacity: .35; }

main, .foot, .nav { position: relative; z-index: 1; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.nav.is-solid { background: rgba(14, 17, 19, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 1.1rem; letter-spacing: -.02em;
}
.wordmark svg { width: 22px; height: 22px; color: var(--signal); }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); font-size: .95rem; }
.nav nav a { text-decoration: none; padding: 10px 0; }
.nav nav a:not(.nav-cta):hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-cta { border: 1px solid currentColor; padding: 10px 16px !important; border-radius: 999px; transition: background .2s, color .2s; }
.nav-cta:hover { background: var(--shell); color: var(--ink); }
@media (max-width: 640px) { .nav nav a:not(.nav-cta) { display: none; } }

/* ---------- Type ---------- */
.display {
  font-weight: 500;
  font-size: clamp(2.6rem, 7.2vw, 6.6rem);
  line-height: .98;
  letter-spacing: -.035em;
  margin: 0 0 .35em;
  text-wrap: balance;
}
.display-2 {
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h3 { font-size: 1.2rem; font-weight: 600; margin: 0 0 .35em; line-height: 1.25; }
p { margin: 0 0 1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--shell); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .2s var(--ease), background .2s;
}
.btn:hover { background: #fff; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: progress; }
.link { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; padding: 14px 0; }
.link:hover { text-decoration-thickness: 2px; }

/* ---------- Specs (OTTO-style dimension labels) ---------- */
.specs { margin: 0; display: grid; gap: 14px 28px; }
.specs div { display: grid; gap: 2px; }
.specs dt { font-size: .8rem; color: var(--ash); }
.specs dd { margin: 0; font-size: .98rem; }

/* ---------- Hero: object first, one line of copy (SLX / Cosmic-style restraint) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 110px var(--pad) 48px;
}
.hero-copy { width: 100%; }
.hero .display { font-size: clamp(2.4rem, 5vw, 4.6rem); max-width: 14ch; margin-bottom: .45em; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; border-top: 1px solid rgba(236,232,223,.16); padding-top: 22px; }
.lede { margin: 0; color: var(--ash); font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; }
.hero .btn { min-height: 46px; padding: 0 22px; font-size: .95rem; }
.hero .link { font-size: .95rem; }
@media (max-width: 860px) {
  .hero { padding-top: 52vh; }
  .hero-copy { background: linear-gradient(to bottom, transparent, rgba(14,17,19,.7) 20%); }
}

/* ---------- Problem: marquee, scroll-read sentence, focus rows ---------- */
.problem { padding: 14vh 0 18vh; overflow: hidden; }
.problem > :not(.marquee) { margin-left: var(--pad); margin-right: var(--pad); }

.marquee { overflow: hidden; margin-bottom: 14vh; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-track span {
  display: flex; align-items: center; gap: .5em; padding-right: .5em; white-space: nowrap;
  font-size: clamp(3.4rem, 11vw, 10rem); font-weight: 600; letter-spacing: -.05em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(236,232,223,.32);
}
.marquee-track b { display: inline-block; width: .22em; height: .22em; border-radius: 50%; background: var(--thermal); }

.sec-head { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid rgba(236,232,223,.16); font-size: .8rem; color: var(--ash); margin-bottom: 6vh; }
.sec-head span:last-child { color: var(--shell); font-weight: 600; }

.read { font-size: clamp(1.8rem, 4.2vw, 3.6rem); line-height: 1.12; letter-spacing: -.035em; font-weight: 400; max-width: 22ch; margin-bottom: 16vh; }
.read strong { font-weight: 700; }
.js-motion .read .rw { opacity: .16; transition: opacity .35s linear; }
.js-motion .read .rw.lit { opacity: 1; }
.js-motion .read strong .rw.lit { color: #fff; }

.rows { border-top: 1px solid rgba(236,232,223,.16); }
.row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, .9fr); gap: 16px 40px; align-items: center;
  padding: 5vh 0; border-bottom: 1px solid rgba(236,232,223,.16);
}
.row-fig { margin: 0; font-size: clamp(4.4rem, 12vw, 11rem); font-weight: 600; letter-spacing: -.06em; line-height: .85; font-variant-numeric: tabular-nums; }
.row-text { margin: 0 0 10px; font-size: clamp(1.05rem, 1.6vw, 1.35rem); max-width: 26ch; }
.src { margin: 0; font-size: .78rem; color: var(--ash); }
.js-motion .row { opacity: .22; transition: opacity .6s var(--ease); }
.js-motion .row.is-active { opacity: 1; }
.js-motion .row-fig { transition: transform .8s var(--ease), color .6s; transform: translateX(-12px); }
.js-motion .row.is-active .row-fig { transform: none; }
@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; padding: 6vh 0; }
  .read { margin-bottom: 10vh; }
}

/* mini charts */
.viz-bars { display: grid; gap: 8px; }
.bar { height: 26px; width: calc(var(--w) * 100%); background: rgba(236,232,223,.14); border-radius: 2px; display: flex; align-items: center; padding-left: 8px; font-size: .72rem; color: var(--ash); transform-origin: left; }
.bar-hot { background: var(--thermal); color: #1a0d07; }
.viz-dots { display: grid; grid-template-columns: repeat(17, 1fr); gap: 5px; max-width: 320px; }
.viz-dots i { aspect-ratio: 1; border-radius: 50%; background: var(--thermal); }
.viz-share { height: 26px; background: rgba(236,232,223,.14); border-radius: 2px; overflow: hidden; }
.share { height: 100%; width: calc(var(--w) * 100%); background: var(--signal); transform-origin: left; }
.js-motion .bar, .js-motion .share { transform: scaleX(0); transition: transform 1.4s var(--ease); }
.js-motion .bar-hot { transition-delay: .35s; }
.js-motion .is-in .bar, .js-motion .is-in .share { transform: scaleX(1); }
.js-motion .viz-dots i { opacity: .12; transform: scale(.4); transition: opacity .3s, transform .4s var(--ease); transition-delay: calc(var(--d) * 14ms + 200ms); }
.js-motion .is-in .viz-dots i { opacity: 1; transform: none; }

/* page ruler on the right edge */
.ruler { position: fixed; right: 10px; top: 20vh; bottom: 20vh; width: 10px; z-index: 15; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(236,232,223,.35) 0 1px, transparent 1px 12px); }
.ruler-dot { position: absolute; right: -1px; width: 12px; height: 2px; background: var(--thermal); top: calc(var(--p, 0) * 100%); }
@media (max-width: 860px) { .ruler { display: none; } }

/* ---------- Safety (sticky sequence) ---------- */
.safety { height: 420vh; position: relative; }
.safety-sticky {
  position: sticky; top: 0; height: 100svh;
  display: grid; grid-template-columns: minmax(0, 30rem) 1fr; grid-template-rows: auto 1fr auto;
  padding: 96px var(--pad) 28px; column-gap: 40px;
}
.safety-head { grid-column: 1; }
.meter {
  width: min(100%, 22rem); padding: 14px 16px 12px; border-radius: 12px;
  border: 1px solid rgba(236,232,223,.16); background: rgba(14,17,19,.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .4s, box-shadow .4s;
}
.meter-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.meter-label { font-size: .8rem; color: var(--ash); }
.meter-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; color: var(--signal); background: rgba(82,209,141,.1); transition: color .3s, background .3s; white-space: nowrap; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: meterPulse 1.8s ease-out infinite; }
@keyframes meterPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
.meter-temp { margin: 8px 0 2px; font-weight: 500; letter-spacing: -.04em; font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; transition: color .3s; }
.meter-temp .unit { font-size: .45em; margin-left: 4px; color: var(--ash); letter-spacing: 0; vertical-align: .9em; }
.meter-graph { position: relative; margin: 6px 0 10px; }
.meter-graph svg { display: block; width: 100%; height: auto; aspect-ratio: 300 / 80; overflow: visible; }
.cutoff { stroke: rgba(255,90,31,.55); stroke-width: 1; stroke-dasharray: 4 4; }
.cutoff-label { position: absolute; right: 0; top: calc(22 / 80 * 100% - 18px); font-size: .68rem; color: rgba(255,138,95,.85); }
#thead { fill: var(--signal); transition: fill .3s; }
.meter-map { display: flex; align-items: center; gap: 4px; font-size: .72rem; color: var(--ash); }
.meter-map i { width: 8px; height: 8px; border-radius: 2px; background: var(--signal); opacity: .85; transition: background .3s; }
.meter-map span { margin-left: auto; }

/* phase 1: overheating — everything warms and the pulse speeds up */
.safety[data-phase="1"] .meter { border-color: rgba(255,90,31,.55); box-shadow: 0 0 40px -10px rgba(255,90,31,.5); }
.safety[data-phase="1"] .meter-temp { color: var(--thermal); }
.safety[data-phase="1"] .meter-pill { color: var(--thermal); background: rgba(255,90,31,.12); }
.safety[data-phase="1"] .pulse { animation-duration: .7s; }
.safety[data-phase="1"] #thead, .safety[data-phase="2"] #thead { fill: var(--thermal); }
.safety[data-phase="1"] .meter-map .hot { background: var(--thermal); animation: hotBlink .5s steps(2) infinite; }
@keyframes hotBlink { 50% { opacity: .3; } }
/* phase 2: power cut — red, steady, the locker drops out of the map */
.safety[data-phase="2"] .meter { border-color: rgba(214,38,27,.6); }
.safety[data-phase="2"] .meter-pill { color: #FF6B5E; background: rgba(214,38,27,.16); }
.safety[data-phase="2"] .pulse { animation: none; }
.safety[data-phase="2"] .meter-map .hot, .safety[data-phase="3"] .meter-map .hot { background: #D6261B; }
/* phase 3: isolated, the rest keep charging */
.safety[data-phase="3"] #thead { fill: var(--ash); }
.safety[data-phase="3"] .meter-map i:not(.hot) { animation: mapWave 1.6s ease-in-out infinite; }
.safety[data-phase="3"] .meter-map i:nth-child(odd):not(.hot) { animation-delay: .3s; }
@keyframes mapWave { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .pulse, .meter-map i { animation: none !important; } }
/* phones: a compact readout so the hub stays visible behind it */
@media (max-width: 860px) {
  .meter { width: 100%; padding: 10px 12px 8px; }
  .meter-top { order: 0; }
  .meter-temp { font-size: 2rem; margin: 4px 0 0; }
  .meter-graph { margin: 2px 0 4px; }
  .meter-graph svg { height: 40px; }
  #thead, .meter-map { display: none; }
}

.steps { grid-column: 1; list-style: none; margin: 28px 0 0; padding: 0; align-self: center; display: grid; gap: 6px; }
.step { padding: 14px 0 14px 20px; border-left: 2px solid rgba(236,232,223,.15); opacity: .38; transition: opacity .4s var(--ease), border-color .4s var(--ease); }
.step p { margin: 0; max-height: 0; overflow: hidden; color: var(--ash); transition: max-height .5s var(--ease); }
.step.is-active { opacity: 1; border-color: var(--shell); }
.step.is-active p { max-height: 9em; }
.step[data-step="1"].is-active, .step[data-step="2"].is-active { border-color: var(--thermal); }
.step[data-step="3"].is-active { border-color: var(--signal); }
.safety-note { grid-column: 1; font-size: .85rem; color: var(--ash); max-width: 30rem; margin: 0; }
@media (max-width: 860px) {
  .safety-sticky { grid-template-columns: 1fr; padding-top: 80px; }
  .safety-head .display-2 { font-size: 2.1rem; }
  .steps { align-self: end; background: linear-gradient(to bottom, transparent, rgba(14,17,19,.85) 12%); padding-top: 24px; }
}

/* ---------- Riders ---------- */
.riders { padding: 20vh var(--pad); display: grid; grid-template-columns: 1fr minmax(0, 36rem); }
.riders > * { grid-column: 2; }
.rider-grid { display: grid; gap: 28px; }
.rider-grid > div { padding-left: 20px; border-left: 2px solid var(--signal); }
.rider-grid p { color: var(--ash); margin: 0; }
@media (max-width: 860px) { .riders { grid-template-columns: 1fr; } .riders > * { grid-column: 1; } .rider-grid > div { background: rgba(14,17,19,.75); padding: 14px 16px; } }

/* ---------- Sign up ---------- */
.signup { padding: 18vh var(--pad) 16vh; display: grid; grid-template-columns: 1fr minmax(0, 36rem); gap: 64px; align-items: start; }
.signup-copy { max-width: 30rem; }
.signup-copy p { color: var(--ash); font-size: 1.05rem; }
@media (max-width: 960px) { .signup { grid-template-columns: 1fr; gap: 40px; } }

/* form: open, editorial, no boxes; underline fields with floating labels */
.form { border-top: 1px solid rgba(236,232,223,.16); padding-top: 28px; }
.field { margin: 0 0 26px; border: 0; padding: 0; min-width: 0; }
legend { display: block; padding: 0; margin-bottom: 14px; font-size: .85rem; color: var(--ash); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 560px) { .pair { grid-template-columns: 1fr; } }
.opt { color: var(--ash); }

.line { position: relative; padding-top: 18px; }
.line input, .line textarea {
  width: 100%; font: inherit; font-size: 1.15rem; color: var(--shell); background: transparent;
  border: 0; border-bottom: 1px solid rgba(236,232,223,.28); border-radius: 0;
  padding: 10px 0 10px; min-height: 48px; outline: none; resize: none; overflow: hidden;
}
.line label {
  position: absolute; left: 0; top: 30px; font-size: 1.05rem; color: var(--ash); pointer-events: none;
  transform-origin: left top; transition: transform .35s var(--ease), color .3s;
}
.line input:focus + label, .line input:not(:placeholder-shown) + label,
.line textarea:focus + label, .line textarea:not(:placeholder-shown) + label { transform: translateY(-26px) scale(.78); }
.line input:focus + label, .line textarea:focus + label { color: var(--shell); }
/* focus line draws in from the left (as a background so it follows a growing textarea) */
.line input, .line textarea { background: linear-gradient(var(--signal), var(--signal)) no-repeat left bottom / 0% 2px; transition: background-size .5s var(--ease), border-color .2s; }
.line input:focus, .line textarea:focus { background-size: 100% 2px; }
.line input:hover, .line textarea:hover { border-bottom-color: rgba(236,232,223,.5); }
[aria-invalid="true"] { border-bottom-color: var(--thermal) !important; }
.error { color: #FF8A5F; font-size: .85rem; margin: 8px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; font-size: .92rem;
  border: 1px solid rgba(236,232,223,.22); transition: background .25s, color .25s, border-color .25s;
}
.chips span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(236,232,223,.35); transition: background .25s, transform .25s var(--ease); }
.chips label:hover span { border-color: rgba(236,232,223,.6); }
.chips input:checked + span { background: var(--shell); color: var(--ink); border-color: var(--shell); }
.chips input:checked + span::before { background: var(--thermal); transform: scale(1.3); }
.chips input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }

.consent { position: relative; display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; color: var(--ash); cursor: pointer; margin: 6px 0 4px; }
.consent input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.consent .box { flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1px solid rgba(236,232,223,.45); border-radius: 4px; display: grid; place-items: center; color: var(--ink); transition: background .2s, border-color .2s; }
.consent .box svg { width: 14px; height: 14px; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s var(--ease); }
.consent input:checked + .box { background: var(--signal); border-color: var(--signal); }
.consent input:checked + .box svg { opacity: 1; transform: none; }
.consent input:focus-visible + .box { outline: 2px solid var(--signal); outline-offset: 2px; }

/* submit: a wide bar that fills with light from the left on hover */
.submit {
  position: relative; overflow: hidden; width: 100%; margin-top: 26px; min-height: 60px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--shell); background: transparent; color: var(--shell); font: inherit; font-size: 1.05rem; font-weight: 600;
  transition: color .4s var(--ease);
}
.submit::before { content: ""; position: absolute; inset: 0; background: var(--shell); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.submit-label { position: relative; }
.submit:hover, .submit:focus-visible { color: var(--ink); }
.submit:hover::before, .submit:focus-visible::before { transform: scaleX(1); }
.submit:active { transform: scale(.99); }
.submit[disabled] { opacity: .6; cursor: progress; }

.form-status { margin: 16px 0 0; font-size: .95rem; min-height: 1.5em; }
.form-status.ok { color: var(--signal); }
.form-status.fail { color: #FF8A5F; }
.form.is-done .field, .form.is-done .pair, .form.is-done .consent, .form.is-done .submit { display: none; }
.form.is-done .form-status { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.25; letter-spacing: -.02em; color: var(--shell); margin: 0; }

/* ---------- Footer ---------- */
.foot { padding: 48px var(--pad) 40px; border-top: 1px solid rgba(236,232,223,.14); background: var(--concrete); color: var(--ash); font-size: .92rem; }
.foot-mark { font-weight: 600; font-size: clamp(3.2rem, 15vw, 12rem); line-height: .85; color: var(--shell); margin: 0 0 24px; letter-spacing: -.05em; }
.foot-small { font-size: .8rem; }

/* ---------- Motion (apekon-style: words sharpen out of a blur) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
[data-dissolve] { will-change: opacity, filter, transform; }
.js-motion .display .w, .js-motion .display-2 .w, .js-motion .kicker-line .w {
  display: inline-block;
  opacity: 0; filter: blur(14px); transform: translate3d(0, .35em, 0);
  transition: opacity .9s var(--ease), filter 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i) * 70ms + 120ms);
}
.js-motion .is-in .w { opacity: 1; filter: blur(0); transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
