/* ============================================================
   Telos — Pre-launch landing page
   Color tokens & type per design handoff. Mobile-first responsive.
   ============================================================ */

:root {
  --ink: #251E2E;
  --dusk: #2A2236;
  --plum: #6D5380;
  --plum-deep: #3F3153;
  --plum-deep-hover: #4C3B65;
  --lavender: #C9B9DC;
  --paper: #FAF8FB;
  --text-muted: #5C5269;
  --text-muted-2: #6F6580;
  --text-muted-3: #8A7F98;
  --heading-on-dusk: #EDE7F3;
  --body-on-dusk: #A496B5;
  --body-on-dusk-2: #BBAECB;
  --border: #D9D1E2;
  --border-2: #DDD4E6;
  --confirm-bg: #F0EAF5;

  --max: 1140px;
  --pad: 32px;
  --star-clip: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);

  --font-sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
}

* { box-sizing: border-box; }

/* The hidden attribute must win over display:flex/grid utilities below. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* support notched phones in landscape */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

::placeholder { color: #9A8FA8; opacity: 1; }

img, svg { display: block; max-width: 100%; }

.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;
}

:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Shared atoms ---------- */

.star {
  display: block;
  width: 0.34em;
  height: 0.34em;
  background: var(--plum);
  clip-path: var(--star-clip);
}
.star--lavender { background: var(--lavender); }
.star--22 { width: 22px; height: 22px; }
.star--12 { width: 12px; height: 12px; }

.eyebrow {
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--plum);
  font-weight: 600;
}

.display-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Wordmark ---------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark--footer { font-size: 18px; }
.wordmark__o {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.56em;
  height: 0.56em;
  border: 0.065em solid currentColor;
  border-radius: 50%;
  margin: 0 0.05em;
}

/* ---------- Nav ---------- */

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav__cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav__cta:hover { border-color: var(--plum); color: var(--plum); }

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--pad) 96px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero__title {
  margin: 0 0 24px;
  font-size: 64px;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.hero__subhead {
  margin: 0 0 36px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 480px;
  text-wrap: pretty;
}
.hero__fineprint {
  margin: 20px 0 0;
  font-size: 13.5px;
  color: var(--text-muted-3);
}

/* ---------- Waitlist form ---------- */

.waitlist-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  flex-wrap: wrap;
}
.waitlist-form--cta { width: 100%; margin: 0 auto; }
.waitlist-form__input {
  flex: 1 1 200px;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 16px; /* >=16px prevents iOS zoom-on-focus */
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
}
.waitlist-form__input:focus { border-color: var(--plum); }
.waitlist-form__input[aria-invalid="true"] { border-color: #C0556B; }
.waitlist-form__btn {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 26px;
  border: none;
  border-radius: 999px;
  background: var(--plum-deep);
  color: #F4EFF8;
  cursor: pointer;
  transition: background 0.2s ease;
}
.waitlist-form__btn:hover { background: var(--plum-deep-hover); }
.waitlist-form__btn:disabled { opacity: 0.7; cursor: default; }
.waitlist-form__error {
  flex-basis: 100%;
  margin: 2px 0 0 18px;
  font-size: 13px;
  color: #B14A60;
  min-height: 0;
}

/* Honeypot: off-screen (not display:none, so bots still fill it), hidden from AT. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Turnstile widget drops onto its own line under the input + button. */
.turnstile-mount {
  flex-basis: 100%;
}
.turnstile-mount:empty { margin: 0; }

.waitlist-confirm {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 460px;
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--confirm-bg);
  color: var(--plum-deep);
  font-size: 15px;
  font-weight: 500;
}
.cta .waitlist-confirm { margin: 0 auto; }
.waitlist-confirm__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px; height: 18px;
  border: 2px solid var(--plum);
  border-radius: 50%;
}
.waitlist-confirm__dot {
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--plum);
}

/* ---------- Phone mockup ---------- */

.hero__device-wrap { display: flex; justify-content: center; }
.device {
  width: 284px;
  height: 592px;
  border-radius: 44px;
  padding: 9px;
  background: #14101A;
  box-shadow: 0 28px 70px -26px rgba(42, 34, 54, 0.45), inset 0 0 0 1.5px #34293F;
}
.device__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  background: linear-gradient(180deg, #2E2539 0%, #241D2F 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.device__glow {
  position: absolute;
  top: 120px; left: 50%;
  transform: translateX(-50%);
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(141, 107, 168, 0.34) 0%, rgba(141, 107, 168, 0) 68%);
  pointer-events: none;
}
.device__statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px 0;
  position: relative;
}
.device__time { font-size: 12px; font-weight: 600; color: var(--heading-on-dusk); }
.device__signal { display: flex; align-items: center; gap: 5px; }
.device__signal .dot { width: 5px; height: 5px; border-radius: 50%; background: #9A8BAC; }
.device__signal .battery { width: 16px; height: 9px; border: 1.5px solid #9A8BAC; border-radius: 2px; }
.device__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 0;
  position: relative;
}
.device__header-text { display: flex; flex-direction: column; gap: 3px; }
.device__kicker {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: #8E7CA3;
}
.device__title { font-size: 16px; font-weight: 600; color: var(--heading-on-dusk); }
.device__stage {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 30px;
  position: relative;
  text-align: center;
}
.device__nowplaying {
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: #8E7CA3; margin-bottom: 18px;
}
.device__affirmation {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic; font-weight: 500;
  font-size: 23px; line-height: 1.42;
  color: var(--heading-on-dusk);
}
.waveform { display: flex; align-items: center; gap: 3px; height: 40px; margin-top: 26px; }
.waveform span { width: 3px; border-radius: 2px; }
.device__controls { padding: 0 28px 12px; position: relative; }
.device__progress-labels {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.device__progress-labels span { font-size: 10px; color: #9A8BAC; font-variant-numeric: tabular-nums; }
.device__progress { height: 3px; border-radius: 2px; background: #3C3049; overflow: hidden; margin-bottom: 22px; }
.device__progress-fill { width: 32%; height: 100%; border-radius: 2px; background: var(--lavender); }
.device__transport { display: flex; align-items: center; justify-content: center; gap: 30px; }
.device__prev, .device__next { width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.device__prev { border-right: 11px solid var(--body-on-dusk); }
.device__next { border-left: 11px solid var(--body-on-dusk); }
.device__play {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--lavender);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  box-shadow: 0 8px 22px -6px rgba(201, 185, 220, 0.55);
}
.device__play span { width: 5px; height: 20px; border-radius: 2px; background: var(--dusk); }
.device__chime {
  margin: 0 16px 18px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(109, 83, 128, 0.22);
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
}
.device__chime-left { display: flex; align-items: center; gap: 10px; }
.device__chime-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(201, 185, 220, 0.16);
}
.device__chime-text { display: flex; flex-direction: column; gap: 2px; }
.device__chime-title { font-size: 12px; font-weight: 600; color: var(--heading-on-dusk); }
.device__chime-sub { font-size: 10px; color: #9A8BAC; }
.device__chime-on { font-size: 11px; font-weight: 600; color: var(--lavender); }

/* ---------- How it works ---------- */

.how { padding-top: 0; padding-bottom: 112px; }
.how__title { margin: 0 0 48px; font-size: 34px; font-weight: 600; letter-spacing: -0.015em; }
.how__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.step {
  border-top: 2px solid var(--border-2);
  padding-top: 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.step__num { font-size: 13px; font-weight: 700; color: var(--plum); letter-spacing: 0.12em; }
.step__title { margin: 0; font-size: 19px; font-weight: 600; }
.step__body { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted-2); }

/* ---------- Differentiator (dark) ---------- */

.differentiator { background: var(--dusk); color: var(--heading-on-dusk); }
.differentiator__inner { max-width: var(--max); margin: 0 auto; padding: 104px var(--pad); }
.differentiator__lead { max-width: 680px; }
.differentiator__title { margin: 0 0 24px; font-size: 42px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; }
.differentiator__intro { margin: 0 0 56px; font-size: 18px; line-height: 1.65; color: var(--body-on-dusk-2); text-wrap: pretty; }
.differentiator__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 72px;
}
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature__title { margin: 6px 0 0; font-size: 18px; font-weight: 600; color: var(--heading-on-dusk); }
.feature__body { margin: 0; font-size: 15px; line-height: 1.6; color: var(--body-on-dusk); }
.differentiator__memorial {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  color: var(--lavender);
  max-width: 560px;
  line-height: 1.6;
}

/* ---------- FAQ ---------- */

.faq { padding-top: 0; padding-bottom: 112px; }
.faq__title { margin: 0 0 40px; font-size: 34px; font-weight: 600; letter-spacing: -0.015em; }
.faq__list { display: flex; flex-direction: column; max-width: 760px; }
.faq__item { border-top: 1px solid var(--border-2); padding: 26px 0; }
.faq__q { margin: 0 0 10px; font-size: 19px; font-weight: 600; color: var(--ink); }
.faq__a { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--text-muted-2); max-width: 680px; text-wrap: pretty; }

/* ---------- Final CTA ---------- */

.cta {
  padding-top: 120px;
  padding-bottom: 120px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.cta__title { margin: 0 0 16px; font-size: 40px; font-weight: 600; letter-spacing: -0.015em; }
.cta__subhead { margin: 0 0 36px; font-size: 17px; color: var(--text-muted-2); max-width: 440px; line-height: 1.6; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid #E5DEEC; }
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.footer__domain { font-size: 14px; color: var(--text-muted-3); font-weight: 500; }
.footer__copy { font-size: 13px; color: #A99FB6; }

/* ============================================================
   Responsive — tablet
   ============================================================ */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 40px;
    padding-bottom: 72px;
  }
  .hero__copy { order: 1; }
  .hero__device-wrap { order: 2; }
  .hero__subhead { max-width: 560px; }

  .hero__title { font-size: 52px; }

  .how__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 36px; }
  .differentiator__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================================
   Responsive — phone
   ============================================================ */

@media (max-width: 640px) {
  :root { --pad: 22px; }

  .nav { padding-top: 20px; padding-bottom: 20px; }
  .nav__cta { padding: 9px 16px; font-size: 13px; }

  .hero { padding-top: 24px; padding-bottom: 56px; gap: 40px; }
  .hero__title { font-size: 42px; }
  .hero__subhead { font-size: 17px; }
  .eyebrow { margin-bottom: 16px; }

  .how { padding-bottom: 80px; }
  .how__title { font-size: 28px; margin-bottom: 36px; }
  .how__grid { grid-template-columns: 1fr; gap: 28px; }

  .faq { padding-bottom: 80px; }
  .faq__title { font-size: 28px; margin-bottom: 32px; }

  .differentiator__inner { padding-top: 72px; padding-bottom: 72px; }
  .differentiator__title { font-size: 32px; }
  .differentiator__intro { font-size: 16px; margin-bottom: 40px; }
  .differentiator__grid { margin-bottom: 56px; }
  .differentiator__memorial { font-size: 19px; }

  .cta { padding-top: 80px; padding-bottom: 80px; }
  .cta__title { font-size: 32px; }

  .footer__inner {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

/* ---------- Very narrow: stack form input + button ---------- */

@media (max-width: 420px) {
  .waitlist-form { flex-direction: column; flex-wrap: nowrap; }
  .waitlist-form__input { flex: 1 1 auto; }
  .waitlist-form__btn { width: 100%; }
  .waitlist-form__error { margin-left: 18px; }

  .hero__title { font-size: 38px; }

  /* let the device shrink to fit small screens */
  .device { transform: scale(0.92); transform-origin: top center; margin-bottom: -48px; }
}

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
