/* ───────────────────────────────────────────────────────────────
   Helios — website, one screen, on the Helios design system.

   Everything here is a var() from helios-ds/tokens — this file lays
   the page out, the system decides how it looks. The rules that came
   with the tokens:

     · Sun yellow FILLS shapes; anything READ is --amber-ink or darker.
     · Everything the page SAYS is Lora; everything it LABELS is Outfit.
     · Sentence case everywhere. HELIOS is the only all-caps text.
     · Nothing interactive under 17px; often-pressed things clear 56px.
     · Ember means risk. It is never decoration.
     · Entrances/exits ease-out, movement ease-in-out. No ease-in.

   One page, no scrolling: the screen is a header / main / footer
   column pinned to the viewport. On a phone-sized window it gives up
   the pin and scrolls — cutting content off would be worse.
   ─────────────────────────────────────────────────────────────── */

[hidden] { display: none !important; }

html, body { height: 100%; }

/* Sunrise on paper: the page itself carries the light. */
body {
  overflow: hidden;
  background:
    linear-gradient(var(--paper-top) 0, var(--paper) 55%, var(--surface-deep) 100%)
    fixed no-repeat;
  color: var(--ink);
  font-family: var(--font-label);
  text-rendering: optimizeLegibility;
}

h1 { font-family: var(--font-display); margin: 0; text-wrap: pretty; }
p { margin: 0; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon { width: 1em; height: 1em; flex: none; display: block; }

/* ── the one screen ──────────────────────────────────────────── */

.screen {
  height: 100dvh;
  display: flex; flex-direction: column;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
  max-width: 1440px; margin: 0 auto;
}

.main {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(2rem, 6vw, 6.5rem);
}

/* ── marks and idle life ─────────────────────────────────────── */

.mark { width: 40px; height: 40px; flex: none; }

/* The crown turns once every 12s — linear on purpose: an eased spin reads
   as something being turned, a constant one as something that simply
   turns. The keyframes carry the translate as well, because a CSS
   transform replaces the attribute one wholesale; under Reduce Motion the
   animation drops away and the attribute transform holds the ring still,
   centred, exactly where it should be. */
.sun__crown { animation: crown-spin var(--period-crown-spin) var(--ease-linear) infinite; }
@keyframes crown-spin {
  from { transform: translate(80px, 115px) rotate(0deg); }
  to   { transform: translate(80px, 115px) rotate(360deg); }
}

/* Blink on 4.2s, the second eye lagging 0.06s. */
.sun__eye {
  animation: blink var(--period-blink) var(--ease-in-out) infinite;
  transform-box: fill-box; transform-origin: center;
}
.sun__eye:nth-of-type(2) { animation-delay: .06s; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(.08); }
}

/* Breathe: 4.5s ease-in-out, translateY 0 → −6, scale 1 → 1.02. */
.sun--idle { animation: breathe var(--period-breathe) var(--ease-in-out) infinite; }
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-6px) scale(1.02); }
}

/* HELIOS — the only all-caps text, Lora 600 at the wordmark tracking. */
.wordmark {
  font-family: var(--font-display);
  font-size: var(--size-wordmark); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wordmark); text-transform: uppercase;
  color: var(--ink);
}

/* ── header and footer ───────────────────────────────────────── */

.top {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 10px;
}
.top__brand { display: flex; align-items: center; gap: 10px; }
/* Status, not navigation — a quiet pill, so it cannot be mistaken for a
   link. Bare amber text top-right read as one. */
.top__note {
  display: inline-flex; align-items: center;
  min-height: 36px; padding: 0 15px; border-radius: var(--radius-pill);
  background: var(--petal-bed);
  font-size: var(--size-hint); font-weight: var(--weight-medium);
  color: var(--amber-ink);
}

/* ── the lede ────────────────────────────────────────────────── */

.lede {
  max-width: 560px;
  display: flex; flex-direction: column; gap: clamp(14px, 2.2vh, 22px);
}

h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  font-weight: var(--weight-semibold);
  /* Tracking is size-specific: display text this large wants it negative. */
  line-height: 1.12; letter-spacing: -.018em;
}

.lede__sub {
  font-size: clamp(1.0625rem, 1.35vw, var(--size-body));
  line-height: 1.6; color: var(--ink-soft);
}

/* The app's four doors, compressed to chips — the .helios-myday scope
   supplies the hues; a glyph on a coloured bed is the door's own hue,
   never white. */
.doors {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin: 0; padding: 0; list-style: none;
  background: none;
}
/* The scoped --card paper is tuned for My day's duller page; on THIS paper
   it is a 0.4% difference and only the shadow was separating. A door on the
   standard paper is the night system's: white, a drawn edge stepped back to
   edge-soft because the card also carries a shadow, and a soft lift. */
.doors li {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 8px 14px;
  border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--edge-soft);
  box-shadow: var(--lift-door);
  font-size: 1.0625rem; font-weight: var(--weight-semibold); color: var(--text);
}
.door__tile {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: var(--radius-tile); font-size: 18px;
}
.door--sage     .door__tile { background: var(--sage-bed);     color: var(--sage); }
.door--coral    .door__tile { background: var(--coral-bed);    color: var(--coral); }
.door--lavender .door__tile { background: var(--lavender-bed); color: var(--lavender); }
.door--amber    .door__tile { background: var(--amber-bed);    color: var(--amber-hue); }

/* ── the waitlist ────────────────────────────────────────────── */

.signup { display: flex; flex-direction: column; gap: 10px; }
.signup__form { display: flex; gap: 10px; flex-wrap: wrap; }
/* A field is a WELL — sunk by being a warmer colour, never embossed. */
.signup__input {
  flex: 1; min-width: 200px; min-height: var(--hit-target); padding: 0 22px;
  /* A capsule like the button beside it, so the pair reads as one control. */
  border: 1px solid var(--edge); border-radius: var(--radius-pill);
  background: var(--surface-deep);
  font-family: var(--font-label); font-size: var(--size-action); color: var(--ink);
}
.signup__input::placeholder { color: var(--ink-faint); }
.signup__input:focus { outline: none; border-color: var(--sun); box-shadow: var(--focus-ring); }

/* A full capsule, as the system draws its often-pressed primary actions.
   The warm shadow is the chosen-slab lift, and the bright inset top edge
   is light catching the material. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--hit-target); padding: 0 30px; border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-label); font-size: var(--size-action);
  font-weight: var(--weight-semibold);
  cursor: pointer; white-space: nowrap;
  transition: transform var(--duration-press) var(--ease-out),
              box-shadow var(--duration-press) var(--ease-out),
              filter var(--duration-press) var(--ease-out);
}
/* The check-in's "chosen" treatment, not a sun fill: a barely-off-white
   bed EDGED in amber, with the label in the deep amber that belongs to the
   edge. Soft, and still unmistakably the one thing to press. */
.btn--sun {
  background: var(--chosen-bed, #FFFAF0);
  border: 2px solid var(--chosen, #D4900A);
  color: var(--chosen-label, #92600A);
  box-shadow: var(--lift-slab-chosen);
}
.btn--sun:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212, 144, 10, 0.24);
}
/* The arrow leans the way the action goes. */
.btn .icon { transition: transform var(--duration-move) var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }
/* A finger going down: 2% of give — 3% reads as a lurch. */
.btn:active { transform: scale(var(--press-scale-card)); }

.signup__done {
  display: flex; align-items: center; gap: 12px;
  min-height: var(--hit-target); padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--calm);
  font-size: 1.0625rem; font-weight: var(--weight-semibold);
  line-height: 1.35; color: var(--calm);
  /* It enters like everything else in the system — a short rise on the
     strong ease-out — rather than flipping into place. */
  animation: enter var(--duration-enter) var(--ease-out);
}
@keyframes enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.signup__done .icon { font-size: 20px; }

/* Ember, because something needs the person's attention — and the same
   entry as everything else. */
.signup__error {
  font-size: var(--size-hint); font-weight: var(--weight-medium);
  color: var(--ember);
  animation: enter var(--duration-enter) var(--ease-out);
}

/* Posting: the button holds still and quiets down rather than vanishing. */
.btn[disabled] { opacity: .62; cursor: default; pointer-events: none; }

.signup__note { font-size: var(--size-hint); color: var(--ink-soft); }

/* ── the phone ───────────────────────────────────────────────── */

.stage { flex: none; display: flex; align-items: center; }

/* 402×874, the size the voice surface is tuned to, scaled to the room the
   viewport gives it. */
.phone {
  height: min(78dvh, 720px);
  aspect-ratio: 402 / 874;
  padding: 10px;
  border-radius: 56px;
  background: var(--ink);
  box-shadow: var(--lift-hero);
}
.phone__screen {
  height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(14px, 2.6dvh, 24px) 16px 12px;
  border-radius: 46px;
  background: linear-gradient(var(--paper-top) 0, var(--paper) 55%, var(--surface-deep) 100%);
  overflow: hidden;
}

/* The status bar: the time, the island, the indicators. Furniture, not
   content — everything in it is aria-hidden. */
.phone__status {
  align-self: stretch; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 10px 0;
  font-size: clamp(.75rem, 1.6dvh, .9375rem); font-weight: var(--weight-semibold);
  color: var(--ink);
}
.phone__island {
  width: 30%; height: clamp(18px, 3.4dvh, 26px);
  border-radius: var(--radius-pill); background: #100B06;
}
.phone__signal { display: flex; align-items: center; gap: 6px; }
.phone__signal .icon { font-size: 1.1em; }
.phone__battery {
  width: 1.5em; height: .72em; border-radius: 3px;
  background: var(--ink);
}

.phone__top {
  align-self: stretch; flex: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: clamp(8px, 1.6dvh, 16px) 4px 2px;
}
.phone__top .wordmark--phone { grid-column: 2; }
.wordmark--phone { font-size: 13px; letter-spacing: 4px; color: var(--ink-soft); }
.phone__gear { grid-column: 3; justify-self: end; font-size: 19px; color: var(--ink-soft); }

.phone .sun {
  width: clamp(130px, 26dvh, 200px); height: auto; flex: none;
  margin-top: clamp(6px, 2dvh, 20px);
}

/* The line Helios is speaking — serif, bright, bottom-anchored: it grows
   upward into the space under the sun, exactly as the transcript does. */
.phone__spoken {
  margin-top: auto; padding: 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 2.4dvh, 1.5rem); font-weight: var(--weight-semibold);
  line-height: var(--leading-spoken);
  color: var(--ink); text-align: center;
  text-wrap: pretty;
}
.phone__hint {
  flex: none; margin-top: clamp(8px, 1.8dvh, 16px);
  font-size: clamp(.8125rem, 1.7dvh, 1rem); color: var(--ink-faint); text-align: center;
}

/* Frosted glass, as the system describes it — the rail is one of exactly
   two translucent surfaces, so it actually blurs what passes beneath. */
.rail {
  display: flex; align-self: stretch; justify-content: space-between; gap: 4px;
  margin-top: clamp(10px, 2dvh, 18px); padding: var(--rail-padding);
  border-radius: var(--radius-pill);
  background: var(--rail-fill); border: 1px solid var(--rail-edge);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.rail__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--rail-item-gap);
  padding: var(--rail-item-padding-v) 6px; border-radius: var(--radius-pill);
  font-size: clamp(.6875rem, 1.5dvh, var(--size-tab-label));
  font-weight: var(--weight-semibold);
  color: var(--tab-inactive);
  /* A label never wraps: "My family" on two lines reads as a broken
     screen, and it drags the whole rail out of line with it. */
  white-space: nowrap;
}
.rail__item .icon { font-size: clamp(16px, 2.4dvh, var(--rail-icon)); }
.rail__item--on { background: var(--rail-active); color: var(--amber-ink); }

/* ── motion, reduced ─────────────────────────────────────────── */

/* Reduced motion means less movement, not less feedback. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* Translucency and blur are a preference, not a requirement: the rail
   goes frosty-solid, and the drawn edge keeps doing the separating. */
@media (prefers-reduced-transparency: reduce) {
  .rail { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .rail { background: var(--surface); border-color: var(--ink-soft); }
  .doors li { border-color: var(--ink-soft); }
  .signup__input { border-color: var(--ink-soft); }
}

/* ── smaller rooms ───────────────────────────────────────────── */

/* A short, wide window: shrink the phone before anything scrolls. */
@media (max-height: 620px) and (min-width: 901px) {
  .phone { height: min(84dvh, 560px); }
}

/* A phone-sized window gives up the no-scroll pin — cutting content off
   would be worse — and stacks. */
@media (max-width: 900px) {
  body { overflow: auto; }
  .screen { height: auto; min-height: 100dvh; }
  .main { flex-direction: column; padding: 8px 0 24px; gap: 32px; }
  .lede { text-align: center; align-items: center; }
  .doors { width: 100%; max-width: 460px; }
  .signup { align-items: center; }
  .phone { height: auto; width: min(86vw, 360px); }
}

@media (max-width: 520px) {
  .doors { grid-template-columns: 1fr; }
}
