/* ==========================================================================
   TrainTally — Editorial Luxury
   Fraunces (display serif) + Inter (grotesk) · dark · one gold accent
   Type scale: 1.25 ratio · spacing on an 8px system
   ========================================================================== */

:root {
  /* palette */
  --ink: #0B0B0E;
  --ink-raised: #121216;
  --bezel: #1A1A20;
  --text: #EDEAE3;
  --text-body: #C9C5BC;
  --text-muted: #97938B;
  --gold: #E0B24E;
  --gold-deep: #B07D1E;
  --hairline: rgba(255, 255, 255, 0.11);
  --hairline-strong: rgba(255, 255, 255, 0.16);

  /* type scale, ratio 1.25 */
  --fs--1: 0.8rem;
  --fs-0: 1rem;
  --fs-1: 1.25rem;
  --fs-2: 1.563rem;
  --fs-3: 1.953rem;
  --fs-4: 2.441rem;
  --fs-5: 3.052rem;
  --fs-6: 3.815rem;
  --fs-7: 4.768rem;

  /* spacing, 8px system */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;
  --s-8: 8rem;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --measure: 62ch;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ---------- reset & base ------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  overflow-x: clip;
  background: var(--ink);
  color: var(--text-body);
  font-family: var(--sans);
  font-size: var(--fs-0);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

em {
  font-style: italic;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid var(--ink);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(224, 178, 78, 0.5);
}

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

.nowrap {
  white-space: nowrap;
}

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

/* ---------- typography voices ------------------------------------------- */

.kicker {
  font-family: var(--sans);
  font-size: var(--fs--1);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(var(--fs-3), 4.5vw, var(--fs-5));
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: var(--s-3);
}

.section-title em,
.hero-title em,
.privacy-statement em {
  font-style: italic;
  font-weight: 340;
  color: var(--gold);
}

.section-head {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto;
}

/* ---------- header / nav ------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 11, 14, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.nav {
  max-width: 70rem;
  margin: 0 auto;
  padding: var(--s-2) var(--s-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  object-fit: contain;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 480;
  font-size: var(--fs-1);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(var(--s-2), 3vw, var(--s-4));
}

.nav-links a {
  font-size: var(--fs--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: var(--s-1) 0;
  border-bottom: 1px solid transparent;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  border-bottom-color: var(--gold);
}

/* ---------- hero -------------------------------------------------------- */

.hero {
  text-align: center;
  padding: clamp(var(--s-7), 12vh, 9rem) var(--s-3) 0;
}

/* Two-column hero from tablet up: copy left, phone right. Keeps the stacked,
   centered composition on phones where a side-by-side split would crush both. */
@media (min-width: 62rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(var(--s-4), 4vw, var(--s-6));
    text-align: left;
    max-width: 76rem;
    margin-inline: auto;
    padding-top: clamp(var(--s-5), 7vh, var(--s-7));
    padding-bottom: var(--s-6);
  }
  .hero-copy { max-width: 38rem; }
  .hero .kicker { text-align: left; }
  /* Size the display off the column, not the viewport, so it never crowds. */
  .hero-title {
    margin-inline: 0;
    max-width: 15ch;
    font-size: clamp(2.6rem, 4.6vw, 4.4rem);
  }
  .hero-sub { margin-inline: 0; max-width: 34rem; }
  .hero .store-chips { justify-content: flex-start; }
  .hero-phone {
    margin: 0;
    padding-bottom: 0;
    justify-self: center;
  }
}

.hero-title {
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(2.7rem, 9vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--text);
  margin: var(--s-3) auto 0;
  max-width: 18ch;
}

.hero-sub {
  max-width: 40rem;
  margin: var(--s-4) auto 0;
  font-size: var(--fs-1);
  line-height: 1.7;
  color: var(--text-body);
  text-wrap: balance;
}

/* store chips — deliberately not links: the app is still in testing */

.store-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-5);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.375rem 0.625rem 1.125rem;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  color: var(--text);
  cursor: default;
}

.chip-logo {
  width: 22px;
  height: 22px;
  color: var(--text);
  flex: none;
}

.chip-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
}

.chip-text small {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.chip-text strong {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* hero phone */

.hero-phone {
  position: relative;
  display: flex;
  justify-content: center;
  margin: var(--s-7) auto 0;
  padding-bottom: var(--s-8);
}

.glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(38rem, 94vw);
  height: min(38rem, 94vw);
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(224, 178, 78, 0.24),
    rgba(176, 125, 30, 0.10) 46%,
    rgba(224, 178, 78, 0) 72%
  );
  pointer-events: none;
}

/* ---------- device frame ------------------------------------------------ */

.device {
  position: relative;
  width: min(19rem, 80vw);
  padding: 0.625rem;
  border-radius: 2.75rem;
  background: linear-gradient(180deg, #212127, var(--bezel) 30%, #101014);
  border: 1px solid var(--hairline-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 1.5rem 3.5rem -1rem rgba(0, 0, 0, 0.75),
    0 3.5rem 7rem -2rem rgba(0, 0, 0, 0.6);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.device img {
  width: 100%;
  height: auto;
  border-radius: 2.125rem;
  background: var(--ink-raised);
}

.device:hover {
  transform: translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 2rem 4rem -1rem rgba(0, 0, 0, 0.8),
    0 4.5rem 8rem -2rem rgba(0, 0, 0, 0.65),
    0 0 5rem -1rem rgba(224, 178, 78, 0.18);
}

.device-sm {
  width: min(16.5rem, 100%);
}

/* ---------- gold hairline rules between sections ------------------------ */

.rule {
  border: 0;
  height: 1px;
  max-width: 70rem;
  margin: 0 auto;
  background: linear-gradient(
    90deg,
    rgba(224, 178, 78, 0) 0%,
    rgba(224, 178, 78, 0.34) 24%,
    rgba(224, 178, 78, 0.34) 76%,
    rgba(224, 178, 78, 0) 100%
  );
}

/* ---------- features ---------------------------------------------------- */

.features {
  max-width: 70rem;
  margin: 0 auto;
  padding: clamp(var(--s-7), 10vw, var(--s-8)) var(--s-3);
}

.feature-list {
  counter-reset: feature;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(var(--s-5), 6vw, var(--s-7));
  row-gap: var(--s-6);
  margin-top: clamp(var(--s-6), 8vw, var(--s-7));
}

.feature {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--s-2);
  border-top: 1px solid var(--hairline);
  padding-top: var(--s-3);
}

.feature-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 340;
  font-size: var(--fs-2);
  line-height: 1;
  color: var(--gold-deep);
  transition: color 200ms var(--ease);
}

.feature:hover .feature-num {
  color: var(--gold);
}

.feature-kicker {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.feature-body h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: var(--fs-2);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: var(--s-1);
}

.feature-body p:last-child {
  margin-top: var(--s-2);
  max-width: 44ch;
}

/* ---------- screens gallery --------------------------------------------- */

.screens {
  max-width: 70rem;
  margin: 0 auto;
  padding: clamp(var(--s-7), 10vw, var(--s-8)) var(--s-3);
}

.screen-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(var(--s-4), 4vw, var(--s-6));
  margin-top: clamp(var(--s-6), 8vw, var(--s-7));
  justify-items: center;
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.screen-caption {
  margin-top: var(--s-3);
  text-align: center;
  font-size: var(--fs--1);
  color: var(--text-muted);
  line-height: 1.6;
}

.screen-label {
  display: block;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  color: var(--gold);
  margin-bottom: var(--s-1);
}

/* ---------- privacy — the centerpiece ----------------------------------- */

.privacy {
  text-align: center;
  padding: clamp(var(--s-8), 14vw, 11rem) var(--s-3);
}

.privacy-statement {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(var(--fs-2), 4.6vw, 3.4rem);
  line-height: 1.28;
  letter-spacing: -0.012em;
  color: var(--text);
  max-width: 62rem;
  margin: var(--s-4) auto 0;
}

.privacy-sub {
  max-width: 38rem;
  margin: var(--s-5) auto 0;
  font-size: var(--fs-0);
  color: var(--text-muted);
}

/* ---------- support ----------------------------------------------------- */

.support {
  max-width: 70rem;
  margin: 0 auto;
  padding: clamp(var(--s-7), 10vw, var(--s-8)) var(--s-3);
}

.support-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  margin-top: clamp(var(--s-5), 6vw, var(--s-7));
  text-align: center;
}

.support-item {
  border-top: 1px solid var(--hairline);
  padding-top: var(--s-3);
}

.support-mail {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(var(--fs-0), 1.7vw, var(--fs-1));
  color: var(--text);
  margin-top: var(--s-2);
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 2px;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}

.support-mail:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.support-note {
  margin-top: var(--s-1);
  font-size: var(--fs--1);
  color: var(--text-muted);
}

/* ---------- footer ------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: var(--s-5) var(--s-3) var(--s-6);
}

.footer-inner {
  max-width: 70rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--serif);
  font-weight: 480;
  font-size: var(--fs-0);
  color: var(--text);
}

.footer-brand .brand-mark {
  width: 22px;
  height: 22px;
}

.footer-links {
  display: flex;
  gap: var(--s-4);
}

.footer-links a,
.footer-copy {
  font-size: var(--fs--1);
  color: var(--text-muted);
}

.footer-links a {
  transition: color 200ms var(--ease);
}

.footer-links a:hover {
  color: var(--gold);
}

/* ---------- scroll reveal (JS adds .reveal-ready; page works without) --- */

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 650ms var(--ease), transform 650ms var(--ease);
  }

  .reveal-ready [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .device,
  .device:hover {
    transition: none;
    transform: none;
  }
}

/* ---------- responsive -------------------------------------------------- */

@media (max-width: 56rem) {
  .feature-list {
    grid-template-columns: 1fr;
    row-gap: var(--s-5);
  }

  .support-list {
    grid-template-columns: 1fr;
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 43.75rem) {
  .screen-row {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  .device-sm {
    width: min(16.5rem, 76vw);
  }
}

@media (max-width: 30rem) {
  .brand-name {
    display: none;
  }

  .nav {
    padding-inline: var(--s-2);
  }

  .nav-links {
    gap: var(--s-2);
  }

  .feature {
    grid-template-columns: 2.75rem 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- launch list ---------------------------------------------------- */

.notify {
  padding: var(--s-7) var(--s-3);
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}

.notify-sub {
  margin-top: var(--s-2);
  color: var(--text-body);
  font-size: var(--fs-1);
  line-height: 1.7;
  text-wrap: balance;
}

.capture {
  margin-top: var(--s-4);
}

.capture-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  justify-content: center;
}

.capture-form input[type='email'] {
  flex: 1 1 20rem;
  min-width: 0;
  max-width: 24rem;
  padding: 0.875rem 1.125rem;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-0);
}

.capture-form input[type='email']::placeholder { color: var(--text-muted); }

.capture-form input[type='email']:focus-visible {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
}

.capture-btn {
  padding: 0.875rem 1.75rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--gold);
  color: #17130A;
  font-family: var(--sans);
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.capture-btn:hover { background: var(--gold-deep); transform: translateY(-1px); }
.capture-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* Honeypot: reachable to bots, invisible and unfocusable for people. */
.capture-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.capture-msg {
  margin-top: var(--s-2);
  min-height: 1.5rem;
  color: var(--gold);
  font-size: var(--fs--1);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}

.capture-msg.show { opacity: 1; }
.capture-msg.is-error { color: #E5806B; }

.capture-note {
  margin-top: var(--s-2);
  color: var(--text-muted);
  font-size: var(--fs--1);
  line-height: 1.6;
}

.capture-note a { color: var(--text-body); text-decoration: underline; }
.capture-note a:hover { color: var(--gold); }

@media (max-width: 30rem) {
  .capture-form input[type='email'],
  .capture-btn { flex: 1 1 100%; max-width: none; }
}

/* ---------- legal pages (privacy, terms) ---------------------------------- */

.legal-page {
  max-width: 46rem;
  margin-inline: auto;
  padding: var(--s-6) var(--s-3) var(--s-7);
}

.legal-header {
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--s-5);
}

.legal-title {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(var(--fs-3), 6vw, var(--fs-5));
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: var(--s-2);
}

.legal-updated {
  color: var(--text-muted);
  font-size: var(--fs--1);
  margin-top: var(--s-2);
}

.legal-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-2);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: var(--s-5) 0 var(--s-2);
}

.legal-body p {
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: var(--s-2);
  max-width: var(--measure);
}

.legal-body .lead {
  font-size: var(--fs-1);
  color: var(--text);
}

.legal-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.legal-body a:hover { color: var(--gold-deep); }

.legal-note {
  border-left: 2px solid var(--gold);
  background: rgba(224, 178, 78, 0.05);
  border-radius: 0 10px 10px 0;
  padding: var(--s-3);
  margin: var(--s-4) 0;
}

.legal-note p { margin-bottom: var(--s-1); }
.legal-note p:last-child { margin-bottom: 0; }

.legal-toc {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: var(--s-3);
  margin: var(--s-4) 0;
}

.legal-toc p {
  font-size: var(--fs--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-2);
}

.legal-toc ol {
  columns: 2;
  column-gap: var(--s-4);
  padding-left: 1.1rem;
  list-style: decimal;
}

.legal-toc li { margin: 0.3rem 0; color: var(--text-muted); }
.legal-toc a { color: var(--text-body); text-decoration: none; }
.legal-toc a:hover { color: var(--gold); }

@media (max-width: 34rem) {
  .legal-toc ol { columns: 1; }
}
