/* ---------------------------------------------------------------------------
   Replapse — static site styles
   Palette mirrors the app's unistyles.ts: near-black neutrals, white CTAs,
   subtle plum tint as the only accent. Status green is used sparingly.
--------------------------------------------------------------------------- */
:root {
  --bg: #0A0A0A;          /* neutral900 / appBackground */
  --surface: #212121;     /* neutral800 / container.primary */
  --surface-2: #2A2A2A;   /* neutral700 */
  --border: #262626;      /* neutral600 */
  --border-soft: #585858; /* neutral400 */
  --text: #FBFBFB;        /* neutral50 / typography.primary */
  --secondary: #CACACA;   /* neutral200 / typography.secondary */
  --muted: #8C8C8C;        /* between neutral400 and neutral200 for readable muted */
  --dim: #585858;         /* neutral400 / typography.muted */
  --green: #32D74B;       /* status green (good / ready) */
  --radius: 16px;
  --max: 1280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* --- Nav --------------------------------------------------------------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; display: block; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--secondary); font-size: 15px; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a.btn { color: var(--bg); }

/* Hamburger toggle (mobile only) */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px; padding: 9px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Buttons ----------------------------------------------------------- */
/* Primary mirrors app button.primary: white fill, dark text. */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text); color: var(--bg);
  font-weight: 650; font-size: 15px;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--text);
  transition: transform .12s ease, background .15s, border-color .15s;
}
.btn:hover { background: var(--secondary); border-color: var(--secondary); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-soft);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--secondary); }

/* --- Hero -------------------------------------------------------------- */
.hero { position: relative; padding: 96px 0 64px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 520px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(255,255,255,0.05), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--surface-2);
  color: var(--text); font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(50,215,75,0.16); }
.hero h1 {
  font-size: clamp(34px, 5vw, 56px); line-height: 1.05;
  letter-spacing: -0.025em; font-weight: 720; margin-bottom: 20px;
}
.hero h1 .accent { color: var(--secondary); }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: var(--secondary); max-width: 30em; margin-bottom: 26px; }
.disciplines { color: var(--muted); font-size: 14px; font-weight: 550; letter-spacing: 0.01em; margin-bottom: 32px; }
.disciplines .sep { color: var(--dim); margin: 0 7px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta-note { color: var(--muted); font-size: 14px; }

/* --- Phone mockup ------------------------------------------------------ */
.phone-stage { display: flex; justify-content: center; }
.phone {
  position: relative; width: 280px; height: 580px;
  background: #050505; border: 2px solid var(--surface-2); border-radius: 42px;
  padding: 12px; box-shadow: 0 40px 80px -30px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.02) inset;
}
.phone .notch { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 110px; height: 26px; background: #050505; border-radius: 0 0 16px 16px; z-index: 3; }
.screen { width: 100%; height: 100%; background: var(--bg); border-radius: 32px; overflow: hidden; padding: 38px 16px 18px; display: flex; flex-direction: column; gap: 12px; }

/* Top header: biometric pills + date, mirroring the app's Today screen */
.s-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.s-metrics { display: flex; flex-direction: column; gap: 6px; }
.s-metric { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 4px; padding: 5px 9px; min-width: 80px; }
.s-mlabel { font-size: 9px; letter-spacing: 0.07em; color: var(--secondary); }
.s-mval { font-size: 13px; font-weight: 700; }
.s-date { text-align: right; line-height: 1.05; }
.s-today { display: block; font-size: 26px; font-weight: 900; letter-spacing: -0.01em; }
.s-dsub { display: block; font-size: 13px; color: var(--secondary); margin-top: 3px; }

/* Workout summary cards */
.s-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.s-whead { display: flex; align-items: baseline; gap: 8px; }
.s-wnum { font-size: 15px; font-weight: 900; }
.s-wname { flex: 1; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-time { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 3px 8px; font-size: 10px; color: var(--secondary); white-space: nowrap; flex-shrink: 0; }
.s-ico { width: 11px; height: 11px; stroke: var(--secondary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.s-rows { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; padding: 0 2px; }
.s-row, .s-srow { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--secondary); }
.s-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-meta { font-weight: 600; flex-shrink: 0; }
.s-sec { display: inline-flex; align-items: baseline; gap: 6px; overflow: hidden; }
.s-sectype { font-weight: 700; letter-spacing: 0.02em; }
.s-sec i { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-cmeta { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; font-weight: 600; }
.s-badge { display: inline-flex; align-items: center; gap: 3px; }
.s-badge .s-ico { stroke: var(--text); }

/* --- Sections ---------------------------------------------------------- */
section { padding: 72px 0; }
.section-head { max-width: 36em; margin-bottom: 44px; }
.section-head .eyebrow { color: var(--muted); font-weight: 650; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(26px, 3.5vw, 36px); letter-spacing: -0.02em; margin-top: 12px; }
.section-head p { color: var(--secondary); margin-top: 14px; font-size: 17px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: border-color .15s, transform .15s;
}
.feature:hover { border-color: var(--border-soft); transform: translateY(-2px); }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature .ico svg { width: 21px; height: 21px; stroke: var(--text); fill: none; stroke-width: 2; }
.feature h3 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14.5px; }
/* --- Disciplines carousel (Swiper) ------------------------------------- */
.covers { --swiper-theme-color: var(--text); }
/* Single, clean gap between the heading and the carousel. Nothing else. */
#covers .section-head { margin-bottom: 56px; }
.covers-carousel .swiper-slide { height: auto; }
/* Slide content is inset into the panel's side gutters so the arrows never sit over the text */
.cover {
  display: flex; flex-direction: column; gap: 16px;
  padding: 0 92px;
}
.cover h3 { font-size: clamp(30px, 4.5vw, 48px); letter-spacing: -0.025em; line-height: 1.05; margin: 0; }
.cover p { color: var(--secondary); font-size: clamp(16px, 1.4vw, 19px); margin: 0; max-width: 52em; }

/* Arrows: vertically centered on the carousel, in the side gutters */
.covers-carousel .swiper-button-prev,
.covers-carousel .swiper-button-next {
  top: 50%; transform: translateY(-50%); margin: 0;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-soft);
  color: var(--text); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.covers-carousel .swiper-button-prev { left: 22px; }
.covers-carousel .swiper-button-next { right: 22px; }
.covers-carousel .swiper-button-prev:hover,
.covers-carousel .swiper-button-next:hover { background: var(--surface-2); border-color: var(--secondary); }
.covers-carousel .swiper-button-prev::after,
.covers-carousel .swiper-button-next::after { font-size: 15px; font-weight: 700; }

/* Pagination dots, centered below the carousel */
.covers .swiper-pagination { position: static; text-align: center; margin-top: 30px; }
.covers .swiper-pagination-bullet { background: var(--border-soft); opacity: 1; }
.covers .swiper-pagination-bullet-active { background: var(--text); }

/* --- Closing CTA band -------------------------------------------------- */
.cta-band { background: none; border: none; padding: 56px 40px; text-align: center; }
.cta-band h2 { font-size: clamp(26px, 3.5vw, 34px); letter-spacing: -0.02em; margin-bottom: 12px; }
.cta-band p { color: var(--secondary); font-size: 17px; max-width: 34em; margin: 0 auto 28px; }

/* --- About ------------------------------------------------------------- */
.about { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 48px; text-align: center; }
.about h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; margin-bottom: 16px; }
.about p { color: var(--secondary); font-size: 17px; max-width: 44em; margin: 0 auto; }

/* --- Footer ------------------------------------------------------------ */
footer { border-top: 1px solid var(--border); padding: 48px 0 56px; margin-top: 40px; }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.foot-links { display: flex; gap: 28px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-size: 14px; transition: color .15s; }
.foot-links a:hover { color: var(--text); }
.legal { color: var(--dim); font-size: 13px; margin-top: 24px; line-height: 1.7; }
.legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* --- Legal/content pages ----------------------------------------------- */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 80px; }
.doc h1 { font-size: 36px; letter-spacing: -0.02em; margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 40px; }
.doc h2 { font-size: 21px; margin: 36px 0 12px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--secondary); font-size: 16px; margin-bottom: 12px; }
.doc ul { padding-left: 22px; }
.doc a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.notice { background: var(--surface); border: 1px solid var(--surface-2); border-left: 3px solid var(--border-soft); border-radius: 10px; padding: 16px 18px; color: var(--secondary); font-size: 14px; margin-bottom: 36px; }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .phone-stage { order: -1; }
  .features { grid-template-columns: 1fr; }
  .about, .cta-band { padding: 32px 22px; }
  .cover { gap: 12px; padding: 0; }
  .covers-carousel .swiper-button-prev,
  .covers-carousel .swiper-button-next { display: none; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 24px 22px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 15px 2px; font-size: 16px; color: var(--text); border-bottom: 1px solid var(--border); }
  .nav-links a.btn { margin-top: 16px; justify-content: center; border-bottom: none; }
}
