:root {
  --bg: #000000;
  --card: #141414;
  --line: #262626;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --lime: #8bd706;
  --gold: #ffcc40;
  --maxw: 760px;
}

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

html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header / brand */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  z-index: 10;
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-header a.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-header img.logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
}
.brand {
  font-family: "Allerta Stencil", "Arial Black", sans-serif;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text);
}
.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 15px;
}
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--lime); text-decoration: none; }

/* Layout */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Hero */
.hero { text-align: center; padding: 56px 0 40px; }
.hero img.app-mark {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin-bottom: 24px;
  box-shadow: 0 0 0 1px var(--line);
}
.hero h1 {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.hero p.tagline {
  color: var(--muted);
  font-size: 19px;
  max-width: 520px;
  margin: 0 auto;
}

.cta {
  display: inline-block;
  margin-top: 28px;
  padding: 13px 26px;
  background: var(--lime);
  color: #000;
  font-weight: 600;
  border-radius: 12px;
}
.cta:hover { text-decoration: none; opacity: 0.9; }

/* Features */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature h3 .dot { color: var(--lime); }
.feature p { color: var(--muted); font-size: 15px; }

/* Legal / text pages */
.doc h1 { font-size: 32px; letter-spacing: -0.02em; margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.doc h2 {
  font-size: 21px;
  margin: 34px 0 10px;
  color: var(--text);
}
.doc h3 { font-size: 17px; margin: 22px 0 8px; }
.doc p, .doc li { color: #d9d9d9; margin-bottom: 12px; }
.doc ul { padding-left: 22px; margin-bottom: 12px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--text); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}
.site-footer nav { display: flex; gap: 18px; margin-left: auto; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--lime); }

/* ==================== RankTime landing additions ==================== */

@font-face {
  font-family: "Allerta Stencil";
  src: url("/assets/AllertaStencil.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --olive: #6b7d3e;
  --glassline: rgba(255, 255, 255, 0.14);
}

.stencil {
  font-family: "Allerta Stencil", "Arial Black", sans-serif;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

/* Small uppercase military label above sections */
.mil-label {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Liquid glass base */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03) 60%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glassline);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Glass CTA button: black glass with lime text, like the app */
.cta-glass {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 32px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glassline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: var(--lime);
  font-family: "Allerta Stencil", "Arial Black", sans-serif;
  letter-spacing: 0.14em;
  font-size: 15px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
.cta-glass:hover {
  text-decoration: none;
  border-color: rgba(139, 215, 6, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 24px rgba(139, 215, 6, 0.15);
  transform: translateY(-1px);
}

/* ---------- Hero: logo + wordmark, like the app splash ---------- */
.hero { padding-top: 48px; }
.hero h1 { font-size: 34px; }
.hero-mark { margin-bottom: 30px; }
.hero-mark .app-mark {
  width: 110px;
  height: 110px;
  border-radius: 26px;
  margin-bottom: 16px;
  box-shadow: 0 0 0 1px var(--line), 0 0 60px rgba(139, 215, 6, 0.18);
}
.hero-wordmark {
  font-size: 40px;
  color: var(--text);
  letter-spacing: 0.14em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
  text-transform: none;
}
.ring-stage {
  position: relative;
  width: 330px;
  height: 330px;
  margin: 0 auto 6px;
  -webkit-tap-highlight-color: transparent;
}
.ring-stage svg#ringSvg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 14px rgba(139, 215, 6, 0.35));
}
.ring-stage::before {
  content: "";
  position: absolute;
  inset: -90px;
  background: radial-gradient(circle, rgba(139, 215, 6, 0.10) 0%, rgba(139, 215, 6, 0.04) 45%, transparent 70%);
  pointer-events: none;
}
.ring-timer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 26px 10px;
  border-radius: 20px;
  text-align: center;
}
.ring-timer span#ringTimer {
  display: block;
  font-size: 50px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}
.ring-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.28em;
  margin-top: 2px;
  white-space: nowrap;
}
.ring-timer-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.ring-hint {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-bottom: 26px;
  opacity: 0.7;
}

/* ---------- Section headers ---------- */
.section-title {
  font-size: 28px;
  text-align: center;
  margin-bottom: 10px;
}
.section-sub {
  color: var(--muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 34px;
  font-size: 16px;
}
.rank-section, .cards-section, .medal-section, .deep-section { margin-top: 100px; }

/* ---------- Modes: real app screens ---------- */
.modes-section { margin-top: 100px; }
.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  max-width: 640px;
  margin: 0 auto;
}
.mode-fig { margin: 0; }
.mode-fig img {
  width: 100%;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65), 0 0 40px rgba(139, 215, 6, 0.06);
  display: block;
}
.mode-fig figcaption { padding: 14px 4px 0; }
.mode-fig figcaption strong {
  display: block;
  color: var(--lime);
  font-size: 15px;
  letter-spacing: 0.22em;
  margin-bottom: 6px;
}
.mode-fig figcaption span { color: var(--muted); font-size: 14px; line-height: 1.55; display: block; }

/* ---------- Rank carousel (full-bleed marquee) ---------- */
.rank-carousel {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow-x: auto;
  padding: 8px 0 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  cursor: grab;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rank-carousel::-webkit-scrollbar { display: none; }
.rank-carousel.grabbing { cursor: grabbing; }
.rank-track {
  display: flex;
  gap: 14px;
  width: max-content;
}
.rk-cell {
  width: 128px;
  flex: none;
  text-align: center;
  background: linear-gradient(160deg, #191a17, #0c0c0c);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 10px 12px;
}
.rk-badge {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.rk-badge img, .rk-badge svg { max-height: 48px; max-width: 48px; }
.rk-badge-text {
  font-family: "Allerta Stencil", sans-serif;
  font-size: 20px;
  letter-spacing: 0.12em;
  color: #b7a35c;
}
.rk-abbr {
  font-family: "Allerta Stencil", sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--text);
}
.rk-name {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
  min-height: 28px;
  margin: 2px 0;
}
.rk-reps {
  font-size: 13px;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.rk-max { border-color: rgba(139, 215, 6, 0.45); }
.rk-max .rk-abbr { color: var(--lime); }

/* ---------- Achievement card gallery ---------- */
.card-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 10px 0;
}
.card-gallery img {
  width: 34%;
  max-width: 300px;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65);
  transition: transform 0.35s ease;
}
.card-gallery img:first-child { transform: rotate(-6deg) translateX(16px) scale(0.92); z-index: 1; }
.card-gallery img.gallery-center { z-index: 2; transform: scale(1.04); }
.card-gallery img:last-child { transform: rotate(6deg) translateX(-16px) scale(0.92); z-index: 1; }
.card-gallery img:hover { transform: rotate(0) scale(1.07); z-index: 3; }
.card-caption {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
  margin-top: 18px;
}

/* ---------- Medal ladder ---------- */
.medal-ladder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}
.medal-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(160deg, #171815, #0b0b0b);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 18px;
}
.medal-row img { height: 54px; width: auto; }
.medal-info { display: flex; flex-direction: column; }
.medal-info strong { font-size: 16px; }
.medal-info span { color: var(--muted); font-size: 14px; }
.medal-row-honor { border-color: rgba(139, 215, 6, 0.4); }
.medal-row-honor strong { color: var(--lime); }

/* ---------- Intel blocks: real analytics/performance/widget screens ---------- */
.intel-block { margin-bottom: 64px; }
.intel-title {
  font-size: 19px;
  color: var(--lime);
  text-align: center;
  margin-bottom: 8px;
}
.intel-sub {
  color: var(--muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 24px;
  font-size: 15px;
}
.shots { display: grid; gap: 16px; }
.shots-3 { grid-template-columns: repeat(3, 1fr); }
.shots-2 { grid-template-columns: 1fr 1fr; max-width: 620px; margin: 0 auto; }
.shots img {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65), 0 0 40px rgba(139, 215, 6, 0.05);
  display: block;
}

/* ---------- Deep feature cards (analytics, coach, widgets) ---------- */
.deep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mil-card {
  background: linear-gradient(150deg, #1b1c19 0%, #0a0a0a 70%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 22px;
}
.mil-card-head {
  font-family: "Allerta Stencil", sans-serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--lime);
  margin-bottom: 10px;
}
.mil-card h3 { font-size: 18px; margin-bottom: 8px; }
.mil-card p { color: var(--muted); font-size: 14.5px; }

/* Promotion bar, styled after the achievement card footer */
.promo-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.promo-left, .promo-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: none;
}
.promo-abbr {
  font-family: "Allerta Stencil", sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
}
.promo-thresh { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.promo-track {
  flex: 1;
  height: 34px;
  background: #161613;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.promo-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #55622f, var(--olive));
  border-radius: 10px 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: width 2.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 2px 0 12px rgba(255, 255, 255, 0.35);
}
.promo-fill span {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding-right: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.promo-fill.go { width: 56%; }
.promo-eta {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 10px;
}

/* ---------- Quote band ---------- */
.quote-band { margin-top: 90px; }
.quote {
  text-align: center;
  color: var(--lime);
  font-size: 18px;
  font-style: italic;
  min-height: 30px;
  transition: opacity 0.4s ease;
}
.quote.fade { opacity: 0; }

/* ---------- FAQ ---------- */
.faq-section { margin-top: 100px; }
.faq { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: linear-gradient(150deg, #17181530, #0a0a0a);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 0;
  font-weight: 600;
  font-size: 16px;
  position: relative;
  padding-right: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lime);
  font-size: 20px;
  font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); font-size: 14.5px; padding-bottom: 16px; }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; margin-top: 90px; }
.final-cta .section-title { margin-bottom: 4px; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .promo-fill { transition: none; }
  .rank-track { animation: none; }
}

@media (max-width: 560px) {
  .site-header .inner { padding: 10px 12px; gap: 8px; }
  .site-header nav { gap: 10px; font-size: 13px; }
  .site-header img.logo { width: 28px; height: 28px; }
  .brand { font-size: 17px; }
  main { padding: 24px 16px 60px; }
  .features { grid-template-columns: 1fr; gap: 12px; margin-top: 36px; }
  .hero { padding: 24px 0 28px; }
  .ring-stage { width: 260px; height: 260px; }
  .ring-stage::before { inset: -60px; }
  .ring-timer { padding: 9px 16px 7px; border-radius: 16px; }
  .ring-timer span#ringTimer { font-size: 34px; }
  .ring-label { font-size: 8px; letter-spacing: 0.18em; }
  .hero h1 { font-size: 22px; letter-spacing: 0.07em; }
  .hero p.tagline { font-size: 15px; }
  .cta-glass { padding: 12px 26px; font-size: 13px; }
  .section-title { font-size: 19px; letter-spacing: 0.07em; }
  .section-sub { font-size: 14px; margin-bottom: 26px; }
  .mil-label { font-size: 10px; letter-spacing: 0.28em; }
  .deep-grid { grid-template-columns: 1fr; gap: 12px; }
  .mil-card { padding: 20px 18px; border-radius: 18px; }
  .rank-section, .cards-section, .medal-section, .deep-section, .modes-section { margin-top: 64px; }
  .quote-band, .final-cta { margin-top: 64px; }

  /* Modes: keep the two phones side by side, captions under each */
  .modes-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mode-fig img { border-radius: 18px; }
  .mode-fig figcaption { padding: 10px 2px 0; }
  .mode-fig figcaption strong { font-size: 12px; letter-spacing: 0.16em; }
  .mode-fig figcaption span { font-size: 12.5px; }

  /* Achievement cards: swipeable snap carousel instead of the fan */
  .card-gallery {
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 6px 4px 14px;
    scrollbar-width: none;
  }
  .card-gallery::-webkit-scrollbar { display: none; }
  .card-gallery img,
  .card-gallery img:first-child,
  .card-gallery img.gallery-center,
  .card-gallery img:last-child {
    transform: none;
    width: 78%;
    max-width: 300px;
    flex: none;
    scroll-snap-align: center;
    border-radius: 20px;
  }
  .card-caption { font-size: 13.5px; margin-top: 8px; }

  /* Intel screenshots: 3-up becomes a swipeable row, 2-up stays side by side */
  .shots-3 {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 4px 2px 12px;
    scrollbar-width: none;
  }
  .shots-3::-webkit-scrollbar { display: none; }
  .shots-3 img { width: 72%; max-width: 280px; flex: none; scroll-snap-align: center; border-radius: 18px; }
  .shots-2 { gap: 12px; }
  .shots-2 img { border-radius: 16px; }
  .intel-block { margin-bottom: 48px; }
  .intel-title { font-size: 16px; }
  .intel-sub { font-size: 13.5px; }

  .rk-cell { width: 112px; padding: 13px 8px 10px; }
  .medal-row { padding: 10px 14px; gap: 12px; }
  .medal-row img { height: 44px; }
  .medal-info strong { font-size: 15px; }
  .promo-abbr { font-size: 12px; }
  .promo-track { height: 30px; }
  .quote { font-size: 15px; }
}
