/* Primus landing page.
   Palette and type are lifted from the iOS app so the two read as one product:
   Primus/DesignSystem/Theme.swift and Typography.swift. Keep them in step. */

:root {
  --bg:          #06090E;   /* Theme.bg */
  --surface:     #0C1219;   /* Theme.surface */
  --surface-alt: #162130;   /* Theme.surfaceAlt */
  --border:      #1C2733;   /* Theme.border */
  --border-str:  #26323F;   /* Theme.borderStrong */
  --track:       #18222E;   /* Theme.track */

  --accent:      #FF6A2B;   /* Theme.accent */
  --accent-soft: #FF8A5C;   /* Theme.accentSoft */
  --accent-ink:  #0A0A0A;   /* Theme.accentInk */

  --text-hi:     #FFFFFF;   /* Theme.textHi */
  --text:        #EAF0F6;   /* Theme.textPrimary */
  --text-2:      #AEBDCF;   /* Theme.textSecondary */
  --text-muted:  #8A9BB0;   /* Theme.textMuted */
  --text-label:  #7A8AA0;   /* Theme.textLabel */
  --text-dim:    #5F7088;   /* Theme.textDim */
  --text-ghost:  #3A4757;   /* Theme.textGhost */

  --display: 'Saira Condensed', 'Helvetica Neue', Arial, sans-serif;
  --body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: 24px;
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }

h1, h2, h3, h4 {
  font-family: var(--display);
  text-transform: uppercase;
  color: var(--text-hi);
  margin: 0;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: 96px 0; }
.accent { color: var(--accent); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--text-label);
  margin: 0;
}
.eyebrow.tiny { font-size: 10px; letter-spacing: 1.8px; }
/* Compound selector on purpose: bare `.accent` has the same specificity as
   `.eyebrow` and loses to it on source order. */
.eyebrow.accent { color: var(--accent); }

h2 { font-size: clamp(36px, 5vw, 60px); line-height: 0.92; margin-top: 14px; max-width: 22ch; }
h2.narrow { max-width: 18ch; }

.sub {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 56ch;
}

/* ---------- Buttons ---------- */
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 3px;
  transition: background .15s ease;
}
.btn-accent:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn-sm { height: 40px; padding: 0 20px; font-size: 15px; letter-spacing: 2.4px; flex: none; }
.btn-lg {
  height: 58px;
  width: min(420px, 100%);
  margin: 32px auto 0;
  font-size: 19px;
  letter-spacing: 3px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 9, 14, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #141C25;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 6px;
  color: #fff;
}
.wordmark.dim { font-size: 18px; letter-spacing: 5px; color: var(--text-dim); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-label);
}
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('/assets/photos/hero.jpg');
  background-size: cover;
  background-position: center 30%;
  filter: grayscale(.5) contrast(1.1);
  opacity: .6;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,9,14,.35) 0%, rgba(6,9,14,.6) 45%, var(--bg) 96%);
}
.hero-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 120px var(--gutter) 80px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(52px, 8.4vw, 104px);
  line-height: .86;
  letter-spacing: -1px;
  max-width: 14ch;
  text-wrap: balance;
}
.lede {
  margin: 22px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 52ch;
}
.badge-link { margin-top: 40px; display: block; width: min(250px, 70vw); }
.badge-link:hover { opacity: .85; }
.badge-link img { width: 100%; height: auto; display: block; }

.underlink {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-label);
  border-bottom: 1px solid var(--border-str);
  padding-bottom: 3px;
}
.underlink:hover { color: var(--text); border-color: var(--text-dim); }

.hero-facts {
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-label);
}
.hero-facts .sep { color: var(--border-str); }

/* ---------- Stakes ---------- */
.stakes { border-top: 1px solid #141C25; border-bottom: 1px solid #141C25; }
.stakes-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.stake { padding: 34px 0 34px 34px; border-right: 1px solid #141C25; }
.stake:first-child { padding-left: 0; }
.stake:last-child { border-right: 0; }
.stake-num { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; color: #fff; }
.stake-num.accent { color: var(--accent); }
.stake-label {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- Program cards ---------- */
.cards {
  margin-top: 46px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
}
.card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  filter: grayscale(.4) contrast(1.08);
}
.card-body { padding: 22px; }
.card-body h3 {
  margin-top: 8px;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 1px;
}
.card-body p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }

/* ---------- App split ---------- */
.split {
  display: grid;
  gap: 56px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
}
.feature-list { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.feature {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  padding: 16px 18px;
}
.feature h4 { font-weight: 700; font-size: 20px; letter-spacing: .8px; }
.feature p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }

/* ---------- Phone mockup (renders the app's Today's Mission screen) ---------- */
.phone-col { position: relative; display: flex; justify-content: center; overflow: hidden; }
.phone-glow {
  /* Inset only vertically. Bleeding sideways pushed the decorative glow past
     the viewport on a phone and widened the page's scroll area. */
  position: absolute;
  inset: -40px 0;
  background: radial-gradient(60% 50% at 50% 40%, rgba(255,106,43,.13), transparent 70%);
}
.phone {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 320 / 545;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 12px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
}
.phone-screen {
  height: 100%;
  border-radius: 20px;
  background: var(--bg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.ph-head { display: flex; align-items: flex-start; justify-content: space-between; }
.ph-time {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #6E7E92;
  text-transform: uppercase;
}
.ph-greet {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .5px;
  color: var(--text-hi);
  text-transform: uppercase;
  margin-top: 2px;
}
.ph-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  flex: none;
}

.ph-streak { display: flex; align-items: center; gap: 14px; }
.ph-ring {
  width: 54px; height: 54px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  /* 12 of 30 days — mirrors HomeViewModel.ringFraction */
  background: conic-gradient(var(--accent) 0 40%, var(--track) 40% 100%);
}
.ph-ring span {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-hi);
}
.ph-streak p { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--text-2); }
.ph-streak b { color: var(--accent); }

.ph-eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6E7E92;
}

.ph-mission {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.ph-mission-img {
  height: 132px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image:
    /* Top stop is darker than the app's card: the eyebrow sits over the photo
       here and needs the contrast to stay readable at mockup scale. */
    linear-gradient(180deg, rgba(6,9,14,.78), rgba(6,9,14,.3) 45%, rgba(6,9,14,.92)),
    url('/assets/photos/swim.jpg');
  background-size: cover;
  background-position: center;
}
.ph-mission-num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--accent);
}
.ph-mission-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .5px;
  color: var(--text-hi);
  text-transform: uppercase;
}
.ph-mission-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--text-muted);
}
.ph-start {
  margin-left: auto;
  flex: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 8px 16px;
  border-radius: 3px;
}

.ph-stats { display: flex; gap: 8px; margin-top: auto; }
.ph-stat {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  padding: 10px 8px;
  text-align: center;
}
.ph-stat b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-hi);
}
.ph-stat b.accent { color: var(--accent); }
.ph-stat span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- Quote ---------- */
.quote { margin-top: 96px; position: relative; overflow: hidden; }
.quote-bg {
  position: absolute; inset: 0;
  background-image: url('/assets/photos/surf.jpg');
  background-size: cover;
  background-position: center;
  filter: grayscale(.7) contrast(1.05);
  opacity: .32;
}
.quote-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(6,9,14,.72) 50%, var(--bg) 100%);
}
.quote-inner { position: relative; padding-block: 120px; text-align: center; }
.quote-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: .98;
  text-transform: uppercase;
  color: var(--text-hi);
  max-width: 24ch;
  margin: 0 auto;
  text-wrap: balance;
}
.quote-inner .eyebrow { margin-top: 20px; letter-spacing: 2.4px; }

/* ---------- Price ---------- */
.price-head { max-width: 560px; margin: 0 auto; text-align: center; }
.price-head h2 { margin-inline: auto; }
.price-head .sub { margin-inline: auto; }

.plans {
  margin-top: 40px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.plan {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  padding: 26px 22px;
}
.plan-featured { border-color: var(--accent); }
.plan-name {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-label);
}
.tag {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px;
  letter-spacing: 1.2px;
}
.plan-price { margin: 10px 0 0; display: flex; align-items: baseline; gap: 8px; }
.plan-price .amt { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1; color: #fff; }
.plan-price .per { font-size: 14px; color: var(--text-label); }
.plan-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }

.includes {
  margin: 34px auto 0;
  padding: 0;
  list-style: none;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-2);
}
.includes li { padding-left: 22px; position: relative; }
.includes li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

.price-fine {
  margin: 18px auto 0;
  max-width: 560px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ---------- Footer ---------- */
.footer { margin-top: 96px; border-top: 1px solid #141C25; }
.footer-inner {
  padding-block: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-label);
}
.footer-links a:hover { color: var(--text); }
.disclaimer {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-ghost);
  max-width: 60ch;
}

/* ---------- Narrow screens ---------- */
@media (max-width: 720px) {
  .section { padding-block: 64px 0; }
  .nav-links { display: none; }
  .stake { padding-left: 0; border-right: 0; border-bottom: 1px solid #141C25; }
  .stake:last-child { border-bottom: 0; }
  .quote-inner { padding-block: 80px; }
  .footer-inner { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Legal pages ---------- */
.legal { padding-block: 72px 96px; max-width: 760px; }
.legal h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: .92;
  margin-top: 14px;
}
.legal h2 {
  font-size: 28px;
  line-height: 1.05;
  margin-top: 48px;
  max-width: none;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.legal h3 {
  font-size: 19px;
  letter-spacing: .6px;
  margin-top: 30px;
  color: var(--text);
}
.legal p { font-size: 15.5px; line-height: 1.7; color: var(--text-2); margin: 12px 0 0; }
.legal p b { color: var(--text-hi); font-weight: 600; }
.legal a { border-bottom: 1px solid rgba(255, 106, 43, .4); }

.legal-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 16px;
}
.legal-lede { font-size: 17px; line-height: 1.65; color: var(--text); margin-top: 24px; }

.legal-list { margin: 14px 0 0; padding: 0; list-style: none; }
.legal-list li {
  position: relative;
  padding-left: 22px;
  margin-top: 10px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-2);
}
.legal-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

/* Wrapped in its own scroll container so a narrow screen scrolls the table,
   never the page. */
.legal-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}
.legal-table th, .legal-table td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.legal-table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-label);
  background: var(--surface);
  font-weight: 500;
}
.legal-table td { color: var(--text-2); line-height: 1.55; }
.legal-table td:first-child { color: var(--text-hi); white-space: nowrap; }

.legal-contact {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
}

a.wordmark { display: inline-block; }
a.wordmark:hover { color: #fff; }
a.wordmark.dim:hover { color: var(--text-label); }
