/* ============================================================
   app-landing.css — page-scoped styles for app.html (Time To Train)
   Loaded LAST, after the 6 shared stylesheets, so equal-specificity
   rules win over components.css with no !important. Everything is
   built from the design tokens in tokens.css.
   ============================================================ */

/* Page-scoped additions to the shared tokens */
:root {
  --accent-text: #4C9AFF; /* AA-safe blue (~7:1 on --bg) for small/normal accent text */
}

/* Fixed nav is 64px tall — keep anchored sections clear of it */
#choose {
  scroll-margin-top: 80px;
}

/* ============================================================
   HERO — clean explainer video (no overlay). Copy sits above the
   video, CTAs below. Distinct class names keep main.js off it.
   ============================================================ */
.app-hero {
  padding-block: var(--space-12) var(--space-24);
  border-bottom: var(--border-width) solid var(--border);
}

.app-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  text-align: center;
}

.app-hero__copy {
  max-width: 50rem;
}

.app-hero__eyebrow {
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--accent-text);
  margin-bottom: var(--space-4);
}

.app-hero__title {
  /* Viewport-driven so "TIME TO / TRAIN" fills the screen as a dense two-line block on
     phones. 700 is the heaviest weight Space Grotesk loads, so size + tight tracking +
     tight leading carry the weight. Capped at 7rem so desktop stays put. */
  font-size: clamp(4.5rem, 22vw, 7rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
}


/* Contained 9:16 (phone-shaped) player — the walkthrough is a portrait video, so the
   frame matches it: never wider than the column or 26rem, and never taller than ~80% of
   the viewport so the CTA below stays within reach on phones. No overlay, no crop. */
.app-hero__video {
  position: relative;
  width: min(100%, 26rem, calc(80vh * 9 / 16));
  width: min(100%, 26rem, calc(80svh * 9 / 16));
  aspect-ratio: 9 / 16;
  border: var(--border-width) solid var(--border);
  background-color: var(--muted);
  overflow: hidden;
}

.app-hero__video video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.app-hero__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .app-hero__actions {
    width: 100%;
  }
  .app-hero__actions .btn {
    width: 100%;
  }
}

/* Page-scoped nav: hidden by default, revealed when the user scrolls up.
   Gated on `.js` so a no-JS visitor keeps the normal (visible) nav. */
.js .app-landing .site-nav {
  transform: translateY(-100%);
  transition: transform var(--transition-base);
  will-change: transform;
}
.js .app-landing .site-nav.site-nav--visible {
  transform: translateY(0);
}


/* ============================================================
   CHOICE CARDS — the two ways in: free app, or paid 8-week program
   ============================================================ */
.app-choose__heading {
  font-size: var(--text-section);
  text-align: center;
  margin-bottom: var(--space-12);
}

.app-choose__grid {
  max-width: var(--max-width-content);
  margin-inline: auto;
}

.app-choice {
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  border: var(--border-width) solid var(--border);
  background-color: var(--bg);
  transition: border-color var(--transition-base);
}

.app-choice:hover,
.app-choice:focus-within {
  border-color: var(--accent);
}

.app-choice__eyebrow {
  font-size: var(--text-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-text);
  margin-bottom: var(--space-4);
}

.app-choice__title {
  font-size: var(--text-card);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-6);
}

/* Flexes so both cards' buttons sit on the same baseline regardless of
   how many lines the copy above them runs to */
.app-choice__desc {
  flex: 1 0 auto;
  font-size: var(--text-body);
  color: var(--muted-fg);
  line-height: 1.5;
  margin-bottom: var(--space-6);
}

/* Price block — mirrors .program-card__pricing/__price/__period in components.css
   so the app page reads with the same rhythm as the program cards elsewhere. */
.app-choice__pricing {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-block: var(--space-4);
  margin-bottom: var(--space-6);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition-base);
}

.app-choice:hover .app-choice__pricing,
.app-choice:focus-within .app-choice__pricing {
  border-color: var(--accent);
}

.app-choice__price {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--fg);
}

.app-choice__period {
  font-size: var(--text-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-fg);
}

.app-choice__btn {
  width: 100%;
}

/* Platform note + manual store picker in one line, sat directly above the button
   (same slot as .app-choice__note) so both cards' buttons share a baseline. Always
   names both stores, so a desktop visitor or a missed UA sniff still has a way in. */
.app-choice__stores {
  margin-bottom: var(--space-4);
  font-size: var(--text-small);
  color: var(--muted-fg);
}

.app-choice__stores a {
  color: var(--muted-fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-base);
}

.app-choice__stores a:hover,
.app-choice__stores a:focus-visible {
  color: var(--accent-text);
}
