:root {
  /* 42Runs brand palette — shared with the iOS app. Named tokens below, mapped onto the
     semantic roles the rest of this file already uses. */
  --ink: #14141a;
  --cloud: #ffffff;
  --pulse-blue: #2f6fed;
  --ember: #ff6b35;
  --mist-blue: #dce8fb;

  --bg: var(--cloud);
  --text: #1c1c1e;
  --text-secondary: #6b6b70;
  --accent: var(--pulse-blue);
  --accent-warm: var(--ember);
  --border: #e5e5ea;
  --navbar-bg: var(--ink);
  --navbar-text: #f2f2f3;
  --footer-bg: #eef3fc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: var(--accent);
}

/* Navbar */
.navbar {
  background: var(--navbar-bg);
  color: var(--navbar-text);
}

.navbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.navbar .logo img {
  display: block;
  height: 28px;
  width: auto;
}

.navbar nav a {
  color: rgba(242, 242, 243, 0.75);
  text-decoration: none;
  font-size: 14px;
  margin-left: 28px;
}

.navbar nav a:hover {
  color: var(--navbar-text);
}

.beta-badge {
  display: inline-block;
  background: var(--ember);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}

.navbar nav .beta-badge {
  margin-left: 4px;
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--navbar-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.nav-toggle span {
  top: 15px;
}

.nav-toggle span::before {
  content: "";
  top: -8px;
}

.nav-toggle span::after {
  content: "";
  top: 8px;
}

.navbar.nav-open .nav-toggle span {
  background: transparent;
}

.navbar.nav-open .nav-toggle span::before {
  top: 0;
  transform: rotate(45deg);
}

.navbar.nav-open .nav-toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .navbar-inner {
    flex-wrap: wrap;
  }

  .navbar nav {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: max-height 0.25s ease;
  }

  .navbar.nav-open nav {
    max-height: 400px;
  }

  .navbar nav a {
    margin-left: 0;
    padding: 12px 0;
    width: 100%;
    border-top: 1px solid rgba(242, 242, 243, 0.12);
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 140px 24px 160px;
  text-align: center;
}

/* A separate absolutely-positioned layer, not a plain CSS background on .hero itself, so the
   scroll-driven parallax below (index.html's inline script) can transform just this layer.
   The -220px top/bottom bleed keeps the edges covered through the transform's full travel
   range — must stay >= the max possible translateY (hero height * the script's factor). */
.hero-bg {
  position: absolute;
  top: -220px;
  left: 0;
  right: 0;
  bottom: -220px;
  background:
    linear-gradient(rgba(10, 10, 12, 0.35), rgba(10, 10, 12, 0.65)),
    url("images/hero-runner.jpg") center 30% / cover no-repeat;
  will-change: transform;
}

.hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: 0.01em;
  color: #fff;
}

.hero h1 .highlight {
  color: var(--ember);
}

.hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 36px;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.app-store-badge svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.app-store-badge-text {
  text-align: left;
  line-height: 1.2;
}

.app-store-badge-text .small {
  display: block;
  font-size: 10px;
  color: var(--ember);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.app-store-badge-text .big {
  display: block;
  font-size: 18px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Shared section wrapper — hero/footer keep their own full-bleed backgrounds, everything
   between them uses this for consistent max-width/padding. */
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px;
  text-align: center;
}

.section-inner h2 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}

.section-inner > p {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--text-secondary);
  font-size: 16px;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  text-align: left;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-warm);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Showcase carousel — a native horizontally-scrolling, scroll-snapping row (works via touch/
   trackpad swipe with zero JS); the arrow buttons are just a mouse-user convenience on top. */
.showcase-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.showcase-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 12px;
  /* Hide the scrollbar — scroll-snap + the arrow buttons are the intended way to navigate,
     a visible scrollbar here would just be visual noise under the phone screenshots. */
  scrollbar-width: none;
}

.showcase-carousel::-webkit-scrollbar {
  display: none;
}

.showcase-shot {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 220px;
  aspect-ratio: 1284 / 2778;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Coach platform screenshots are wide desktop browser captures, not phone portraits — same
   carousel behavior as .showcase-shot, but sized/fit for landscape instead. `contain` (not
   `cover`) so a dense dashboard screenshot never gets cropped into unreadable text. */
.coach-showcase-shot {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: min(560px, 82vw);
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--bg);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.showcase-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.showcase-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Arrow buttons only make sense with a mouse/trackpad — on a touchscreen the row is already
   swipeable directly, so showing them there is just clutter. */
@media (hover: hover) and (pointer: fine) {
  .showcase-arrow {
    display: flex;
  }
}

/* Coach landing page intro — same dark treatment as .founding, just its own class since the
   content isn't about the Founding Member offer. */
.coach-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding: 140px 24px 160px;
}

.coach-hero-bg {
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  bottom: -220px;
  background:
    linear-gradient(rgba(10, 10, 12, 0.58), rgba(10, 10, 12, 0.84)),
    url("images/coach-hero-trackrunner.jpg") center 38% / cover no-repeat;
  will-change: transform;
}

.coach-hero .section-inner {
  position: relative;
  padding: 0;
}

.coach-hero .section-inner h1 {
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}

.coach-hero .section-inner > p {
  color: rgba(255, 255, 255, 0.85);
}

/* Founding member */
.founding {
  background: var(--ink);
  color: #fff;
}

.founding .section-inner h2 {
  color: #fff;
}

.founding .section-inner > p {
  color: rgba(255, 255, 255, 0.75);
}

.cta-button {
  display: inline-block;
  background: var(--ember);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 999px;
}

/* Waitlist */
.waitlist-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.waitlist-form input {
  font: inherit;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  min-width: 260px;
}

.waitlist-form button {
  font: inherit;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: var(--accent-warm);
  color: #fff;
  cursor: pointer;
}

.waitlist-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Light effect, shared by every primary amber CTA (Claim your spot, Join the waitlist, the
   currently-hidden Elite waitlist button, Sign Up / Sign In) — a soft ambient glow at rest
   that intensifies on hover, plus a diagonal light streak that sweeps across the button
   surface. Scoped to :not(:disabled) so a submitting waitlist button doesn't glow/shine. */
.cta-button,
.waitlist-form button:not(:disabled) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
  transition: box-shadow 0.25s ease, transform 0.15s ease;
}

.cta-button:hover,
.waitlist-form button:not(:disabled):hover {
  box-shadow: 0 8px 26px rgba(255, 107, 53, 0.5);
  transform: translateY(-1px);
}

.cta-button::after,
.waitlist-form button:not(:disabled)::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.cta-button:hover::after,
.waitlist-form button:not(:disabled):hover::after {
  left: 125%;
}

#waitlist-message {
  margin: 16px 0 0;
  font-size: 14px;
  min-height: 1.4em;
}

.waitlist-success {
  color: #2e7d32;
}

.waitlist-error {
  color: #d1293d;
}

/* Pricing */
.pricing {
  background: var(--footer-bg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}

.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.pricing-card-highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.pricing-card h3 {
  margin: 0 0 16px;
  font-size: 20px;
}

.pricing-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-card li:first-child {
  border-top: none;
}

.pricing-table-wrap {
  max-width: 640px;
  margin: 0 auto;
  overflow-x: auto;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  background: var(--bg);
}

.pricing-table th,
.pricing-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  white-space: nowrap;
}

.pricing-table thead th {
  border-top: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.pricing-table-pro-col {
  background: rgba(255, 107, 53, 0.06);
}

.pricing-table thead .pricing-table-pro-col {
  color: var(--accent-warm);
}

.pricing-table th:nth-child(2),
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(2),
.pricing-table td:nth-child(3) {
  text-align: center;
  width: 110px;
}

.pricing-table td.check {
  color: #2e7d32;
  font-weight: 700;
}

.pricing-table td.cross {
  color: var(--text-secondary);
}

/* FAQ */
.faq-item {
  max-width: 640px;
  margin: 0 auto 24px;
  text-align: left;
}

.faq-item h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

.faq-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Generic content pages (privacy/terms) */
main.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

main.page h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

main.page h2 {
  font-size: 19px;
  margin-top: 32px;
  margin-bottom: 8px;
}

main.page p {
  margin: 0 0 14px;
}

main.page ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

main.page li {
  margin-bottom: 6px;
}

.verify-page {
  text-align: center;
  padding-top: 72px;
  padding-bottom: 96px;
}

.verify-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 12px;
}

.verify-page h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
}

.verify-page #verify-body {
  max-width: 420px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.verify-status {
  margin-top: 28px;
  height: 4px;
  max-width: 120px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 999px;
}

.verify-status-ok {
  background: var(--ember);
}

.verify-status-error {
  background: #c0392b;
}

.verify-status-info {
  background: var(--border);
}

.last-updated {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 28px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.card h2 {
  margin-top: 0;
}

/* Footer */
.site-footer {
  /* Its own color, not --footer-bg — that variable is shared with .pricing, and this is a
     footer-only change (--footer-bg's dark-mode override below would also need touching if
     this used the variable instead). */
  background: #f5f5f5;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.footer-col h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.footer-col a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px 32px;
  color: var(--text-secondary);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --text: #f2f2f3;
    --text-secondary: #9b9ba0;
    --border: #2a2a2d;
    --navbar-bg: #000000;
    --footer-bg: #16191f;
  }

  /* .site-footer's light-mode background is a direct #f5f5f5, not --footer-bg (see its own
     rule above) — needs its own dark-mode override here so it doesn't stay light-gray. */
  .site-footer {
    background: var(--footer-bg);
  }
}
