/* ==========================================================================
   FactorPrep info site — design system
   Colours, cards and type mirror the FactorPrep app (factorprep repo):
   primary #008ed3, cards 12px radius + soft shadow, Roboto Flex, hub pods.
   ========================================================================== */

:root {
  --blue: #008ed3;
  --blue-hover: #0077b3;
  --blue-dark: #005d8a;
  --bg: #f8fafc;
  --ink: #1f2937;
  --text: #555;
  --faint: #888;
  --card-border: #ddd;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 6px 20px rgba(0, 0, 0, 0.1);
  --green: #2e7d32;
  --amber: #f59e0b;
  --orange: #e65100;
  --yellow: #d3ca17;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Roboto Flex', 'Roboto', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--ink);
}

img { max-width: 100%; }

/* ---------- Header (matches the app's blue AppShell bar) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--blue);
  padding: 10px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 28px; width: auto; display: block; }
.brand span { color: #fff; font-weight: 700; font-size: 17px; letter-spacing: 0.5px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; margin-right: 8px; }
.nav-links a { color: rgba(255, 255, 255, 0.92); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn-outline {
  display: inline-block; padding: 7px 16px;
  border: 2px solid #fff; border-radius: 4px;
  color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  text-decoration: none; transition: background 0.2s;
  white-space: nowrap;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

/* Shop pill — mirrors the app's in-app "ShopPill" entry point */
.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: #fff; color: var(--blue);
  font-size: 13px; font-weight: 700;
  text-decoration: none; border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-pill:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); }

.btn-primary {
  display: inline-block; padding: 14px 28px;
  background: var(--blue); color: #fff;
  border: none; border-radius: 6px;
  font-size: 16px; font-weight: 700; text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 142, 211, 0.35); }

.btn-ghost {
  display: inline-block; padding: 12px 24px;
  background: #fff; color: var(--blue);
  border: 2px solid var(--blue); border-radius: 6px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-ghost:hover { background: rgba(0, 142, 211, 0.08); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 84px 24px 72px;
  background:
    radial-gradient(circle at 85% -10%, rgba(0, 142, 211, 0.10), transparent 45%),
    radial-gradient(circle at 8% 110%, rgba(134, 59, 255, 0.08), transparent 45%),
    var(--bg);
}
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(0, 142, 211, 0.10); color: var(--blue-dark);
  font-size: 13px; font-weight: 600;
}
.hero h1 {
  font-size: clamp(36px, 6.5vw, 58px);
  line-height: 1.08; margin: 18px 0 0; font-weight: 700;
}
.hero .lede { max-width: 640px; margin: 18px auto 0; color: var(--text); font-size: 18px; line-height: 1.6; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--faint); }
.mobile-br { display: none; }

/* ---------- Sections ---------- */
.section { padding: 72px 24px; scroll-margin-top: 70px; }
.section-alt { background: #fff; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto; }
.kicker {
  display: block; font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--blue); margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; }
.section-head p { color: var(--text); font-size: 16px; line-height: 1.6; margin: 0; }

/* ---------- Video cards ---------- */
.video-card {
  background: #fff; border: 1px solid var(--card-border); border-radius: 12px;
  padding: 16px; box-shadow: var(--shadow);
  max-width: 860px; margin: 36px auto 0;
}
.video-shell {
  position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg, #04314b, #005d8a);
}
.video-shell video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border: 0; display: block; background: transparent;
}
.video-shell.no-video video { display: none; }
.video-fallback {
  display: none; position: absolute; inset: 0; z-index: 1;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: rgba(255, 255, 255, 0.9); text-align: center; padding: 16px;
}
.video-fallback p { margin: 8px 0 0; font-weight: 700; font-size: 17px; }
.video-fallback span { font-size: 13px; color: rgba(255, 255, 255, 0.65); }
.video-fallback code { background: rgba(255, 255, 255, 0.12); padding: 2px 6px; border-radius: 4px; }
.video-shell.no-video .video-fallback { display: flex; }
.video-caption { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--faint); }

/* ---------- The Hub: demo video centre, pods around it ---------- */
.hub-grid {
  display: grid; grid-template-columns: 1fr 1.7fr 1fr; gap: 24px;
  align-items: center; margin-top: 44px;
}
.hub-col { display: grid; gap: 24px; }
.hub-video .video-card { margin-top: 0; }

.pod {
  background: #fff; border: 1px solid var(--card-border); border-radius: 12px;
  padding: 20px; box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pod:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.pod-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; color: #fff;
}
.pod h3 { margin: 0 0 6px; font-size: 17px; color: #333; }
.pod p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--faint); }

.pod--builder  .pod-icon { background: var(--blue); }
.pod--results  .pod-icon { background: var(--blue-dark); }
.pod--schedule .pod-icon { background: var(--amber); }
.pod--library  .pod-icon { background: var(--yellow); }
.pod--athlete  .pod-icon { background: var(--orange); }
.pod--wellness .pod-icon { background: var(--green); }

/* ---------- Results & experience ---------- */
.results {
  background: linear-gradient(135deg, #04314b 0%, #005d8a 100%);
  color: #fff;
}
.results .kicker { color: #7fd4ff; }
.results .section-head h2 { color: #fff; }
.results .section-head p { color: rgba(255, 255, 255, 0.78); }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 44px;
}
.stat {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px; padding: 26px 18px; text-align: center;
}
.stat-num { display: block; font-size: 40px; font-weight: 700; color: #5ec3f0; line-height: 1.1; }
.stat-label { display: block; margin-top: 8px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.85); }

/* Result video gallery */
.gallery-title {
  text-align: center; color: #fff;
  font-size: clamp(20px, 3vw, 26px);
  margin: 64px 0 4px;
}
.results-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 24px;
}
.result-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px; padding: 12px;
}
.result-card .video-fallback p { font-size: 14px; }
.result-card .video-fallback span { font-size: 11px; }
.result-caption {
  margin: 10px 4px 2px; text-align: center;
  font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.75);
}

.results-link-row { text-align: center; margin-top: 24px; }
.results-link { color: #7fd4ff; font-weight: 600; font-size: 15px; text-decoration: none; }
.results-link:hover { text-decoration: underline; }

/* ---------- Footer (matches the app's dark footer) ---------- */
.site-footer { background: #333; color: #ccc; padding: 36px 24px 28px; }
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 24px; width: auto; }
.footer-brand span { color: #fff; font-weight: 700; letter-spacing: 0.5px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: rgba(255, 255, 255, 0.72); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-copy { max-width: 1100px; margin: 18px auto 0; font-size: 12px; color: #999; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .hub-video { grid-column: 1 / -1; order: -1; width: 100%; max-width: 640px; margin: 0 auto; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .results-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .site-header { padding: 10px 16px; }
  .section { padding: 56px 16px; }
}
@media (max-width: 420px) {
  /* Keep brand + both header buttons fitting on very narrow phones */
  .brand span { display: none; }
  .btn-outline { padding: 6px 10px; font-size: 12px; }
  .btn-pill { padding: 5px 10px; font-size: 12px; }
}
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .stats { grid-template-columns: 1fr; }
  .results-gallery { grid-template-columns: 1fr; }
  .hero { padding: 64px 16px 56px; }
  .mobile-br { display: block; }
}