/* =========================================================================
   Gentleman Lite — gentleman.coach
   One stylesheet. Dark-first. Tokens extracted verbatim from the app.
   No webfonts, no external requests. The native SF stack IS the brand.
   ========================================================================= */

/* ---- Tokens: dark is the primary theme -------------------------------- */
:root {
  --background: #000000;
  --card: #1C1C1E;
  --card-secondary: #2C2C2E;
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-prominent: rgba(255, 255, 255, 0.09);
  --separator: rgba(84, 84, 88, 0.65);
  --shadow: rgba(0, 0, 0, 0.45);

  --accent: #9BA3E8;
  --accent-fill: #5E64B8;
  --accent-tint: rgba(155, 163, 232, 0.13);

  --text-primary: #FFFFFF;
  --text-secondary: rgba(235, 235, 245, 0.60);
  --text-tertiary: rgba(235, 235, 245, 0.45);
  --text-quaternary: rgba(235, 235, 245, 0.30);
  --text-on-accent: #FFFFFF;

  --positive: #30D158;
  --caution: #FF9F0A;
  --alert: #FF453A;

  --phase-period: #C56B72;
  --phase-follicular: #6FA08B;
  --phase-ovulation: #C79A5B;
  --phase-luteal: #8087CC;

  /* metrics */
  --radius-card: 22px;
  --radius-tile: 20px;
  --radius-small: 8px;
  --gutter: 20px;
  --maxw: 1100px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ---- Light theme via media query (light column of the token table) ---- */
@media (prefers-color-scheme: light) {
  :root {
    --background: #F2F1ED;
    --card: #FFFFFF;
    --card-secondary: #E9E8E3;
    --hairline: rgba(0, 0, 0, 0.07);
    --hairline-prominent: rgba(0, 0, 0, 0.10);
    --separator: rgba(60, 60, 67, 0.29);
    --shadow: rgba(0, 0, 0, 0.18);

    --accent: #5E64B8;
    --accent-fill: #5E64B8;
    --accent-tint: rgba(94, 100, 184, 0.12);

    --text-primary: #111113;
    --text-secondary: rgba(60, 60, 67, 0.78);
    --text-tertiary: rgba(60, 60, 67, 0.60);
    --text-quaternary: rgba(60, 60, 67, 0.40);
    --text-on-accent: #FFFFFF;

    --positive: #248A3D;
    --caution: #B25900;
    --alert: #CC2F26;

    --phase-period: #B25560;
    --phase-follicular: #4E7D68;
    --phase-ovulation: #9A6F33;
    --phase-luteal: #5F66AD;
  }
}

/* ---- Reset / base ----------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.018em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, p { margin: 0; }

/* ---- Focus states in --accent ---------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--card);
  color: var(--text-primary);
  border: 0.5px solid var(--hairline-prominent);
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 100;
  transition: top 0.16s ease;
}
.skip-link:focus { top: 16px; text-decoration: none; }

/* ---- Layout ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(56px, 9vw, 104px); }

/* ---- Type scale (from the app's tracking table) ----------------------- */
.eyebrow,           /* SECTION HEADER: 13/400 +0.023em uppercase */
.section-header {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.023em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.section-label {    /* in-card label: 11/600 +0.064em uppercase */
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.064em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.display {
  font-size: clamp(34px, 6.2vw, 56px);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.04;
}

.title {
  font-size: clamp(26px, 4vw, 29px);
  font-weight: 700;
  letter-spacing: -0.017em;
  line-height: 1.08;
}

.heading {
  font-size: clamp(22px, 3.2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.017em;
  line-height: 1.12;
}

.subheading {
  font-size: clamp(19px, 2.4vw, 20px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.body { font-size: 17px; letter-spacing: -0.018em; }

.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  letter-spacing: -0.015em;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footnote {
  font-size: 13px;
  letter-spacing: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding-inline: 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  border: 0.5px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease, background 0.14s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent-fill);
  color: var(--text-on-accent);
}
.btn-primary:hover { opacity: 0.92; }

.btn-secondary {
  background: var(--card-secondary);
  color: var(--text-primary);
  border-color: var(--hairline-prominent);
}
.btn-secondary:hover { background: var(--card); }

/* App Store badge (self-hosted SVG) */
.badge-appstore {
  display: inline-flex;
  border-radius: 12px;
  transition: transform 0.14s ease, opacity 0.14s ease;
  line-height: 0;
}
.badge-appstore:hover { opacity: 0.9; text-decoration: none; }
.badge-appstore:active { transform: scale(0.98); }
.badge-appstore img { height: 52px; width: auto; }

.todo-pill {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--caution);
  background: color-mix(in srgb, var(--caution) 14%, transparent);
  border-radius: 999px;
  padding: 4px 10px;
}

/* ---- Cards & pills ---------------------------------------------------- */
.card {
  background: var(--card);
  border: 0.5px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: clamp(20px, 3vw, 32px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-tint);
  color: var(--text-primary);
  border-radius: var(--radius-tile);
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.013em;
}
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* icon tile 30x30 radius 8, like the app rows */
.tile {
  width: 30px; height: 30px;
  border-radius: var(--radius-small);
  background: var(--accent-tint);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tile svg { width: 17px; height: 17px; display: block; }

/* =========================================================================
   Floating nav capsule — the app's tab-bar motif
   ========================================================================= */
.nav-wrap {
  position: sticky;
  top: 12px;
  z-index: 50;
  padding-inline: var(--gutter);
  margin-top: 12px;
}
.nav {
  max-width: var(--maxw);
  margin-inline: auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px 0 20px;
  background: var(--card);
  border: 0.5px solid var(--hairline-prominent);
  border-radius: 999px;
  box-shadow: 0 8px 12px var(--shadow);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand .wordmark {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a.nav-link {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.013em;
  padding: 10px 12px;
  border-radius: 999px;
}
.nav-links a.nav-link:hover {
  color: var(--text-primary);
  background: var(--card-secondary);
  text-decoration: none;
}
.nav-cta {
  height: 40px;
  padding-inline: 18px;
  font-size: 15px;
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero { padding-top: clamp(40px, 7vw, 72px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy { max-width: 34ch; }
.hero .display { margin-bottom: 20px; }
.hero .lede { margin-bottom: 32px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.hero-note {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0;
}
.hero-art { justify-self: center; }

/* =========================================================================
   Device frame for screenshots
   ========================================================================= */
.device {
  position: relative;
  width: min(300px, 74vw);
  padding: 10px;
  background: #0a0a0b;
  border: 0.5px solid var(--hairline-prominent);
  border-radius: 46px;
  box-shadow:
    0 30px 60px -20px var(--shadow),
    0 8px 20px -8px var(--shadow);
}
@media (prefers-color-scheme: light) {
  .device { background: #d8d7d1; }
}
.device img {
  width: 100%;
  height: auto;
  aspect-ratio: 1320 / 2868;
  border-radius: 38px;
  display: block;
}
.device.tilt { transform: rotate(-1.4deg); }
@media (prefers-reduced-motion: reduce) {
  .device.tilt { transform: none; }
}

/* =========================================================================
   Feature sections — alternating text / screenshot
   ========================================================================= */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.feature:nth-of-type(even) .feature-media { order: -1; }
.feature-copy .section-header { margin-bottom: 14px; }
.feature-copy .heading { margin-bottom: 18px; }
.feature-copy p + p { margin-top: 14px; }
.feature-copy p { color: var(--text-secondary); }
.feature-copy .lede { color: var(--text-secondary); }
.feature-media { justify-self: center; }

/* small labelled key that mirrors the app's phase legend */
.phase-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
}
.phase-legend .key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
}
.phase-legend .swatch {
  width: 10px; height: 10px; border-radius: 3px; flex: none;
}

/* =========================================================================
   Privacy section — quiet, important
   ========================================================================= */
.privacy-section .privacy-card {
  text-align: center;
  padding: clamp(32px, 5vw, 56px);
}
.privacy-section .heading { margin: 16px auto 14px; max-width: 20ch; }
.privacy-section .lede { max-width: 46ch; margin-inline: auto; }
.privacy-lock {
  width: 44px; height: 44px;
  margin-inline: auto;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.privacy-lock svg { width: 24px; height: 24px; }
.fact-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

/* =========================================================================
   Pricing
   ========================================================================= */
.pricing-card {
  max-width: 520px;
  margin-inline: auto;
  text-align: center;
  padding: clamp(28px, 4vw, 44px);
}
.price {
  font-size: clamp(44px, 8vw, 60px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.price .once { color: var(--text-secondary); font-weight: 700; }
.price-sub { color: var(--text-secondary); margin-top: 10px; }

.price-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  text-align: left;
  margin: 32px 0;
}
.price-lists ul { list-style: none; margin: 0; padding: 0; }
.price-lists li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 15px;
  letter-spacing: -0.013em;
  color: var(--text-secondary);
}
.price-lists .ico { flex: none; margin-top: 2px; }
.price-lists .included .ico { color: var(--positive); }
.price-lists .excluded .ico { color: var(--text-quaternary); }
.price-lists li strong { color: var(--text-primary); font-weight: 600; }
.price-lists .col-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.064em;
  text-transform: uppercase; color: var(--text-secondary);
  padding-bottom: 4px;
}
.pricing-card .hero-actions { justify-content: center; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  border-top: 0.5px solid var(--hairline);
  padding-block: 48px;
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}
.footer-brand:hover { text-decoration: none; }
.footer-brand .mark { width: 26px; height: 26px; }
.footer-brand .wordmark { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.footer-links { display: flex; gap: 12px; margin-left: auto; }
.footer-links a {
  color: var(--text-secondary);
  font-size: 15px;
  padding: 6px 8px;
  border-radius: 8px;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-meta {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 13px;
}
.footer-tagline { color: var(--text-secondary); }

/* =========================================================================
   Long-form content pages (privacy / support)
   ========================================================================= */
.doc {
  max-width: 720px;
  margin-inline: auto;
  padding-block: clamp(40px, 6vw, 72px);
}
.doc .display { font-size: clamp(32px, 5vw, 44px); margin-bottom: 8px; }
.doc .doc-meta { color: var(--text-secondary); font-size: 13px; margin-bottom: 8px; }
.doc-lede {
  color: var(--text-secondary);
  font-size: clamp(17px, 2.2vw, 19px);
  letter-spacing: -0.015em;
  margin: 20px 0 8px;
}
.doc h2 {
  font-size: clamp(20px, 2.6vw, 22px);
  font-weight: 700;
  letter-spacing: -0.017em;
  margin: 40px 0 12px;
}
.doc h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 24px 0 6px;
}
.doc p { color: var(--text-secondary); margin: 12px 0; }
.doc p strong, .doc li strong { color: var(--text-primary); font-weight: 600; }
.doc a { color: var(--accent); }
.doc ul { margin: 12px 0; padding-left: 0; list-style: none; }
.doc ul li {
  position: relative;
  padding-left: 22px;
  margin: 10px 0;
  color: var(--text-secondary);
}
.doc ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.doc .card { margin: 20px 0; padding: clamp(20px, 3vw, 28px); }

/* FAQ */
.faq { margin-top: 8px; }
.faq details {
  border-bottom: 0.5px solid var(--hairline);
  padding: 4px 0;
}
.faq details:first-of-type { border-top: 0.5px solid var(--hairline); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev {
  flex: none;
  width: 18px; height: 18px;
  color: var(--text-tertiary);
  transition: transform 0.18s ease;
}
@media (prefers-reduced-motion: reduce) {
  .faq summary .chev { transition: none; }
}
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq details p {
  margin: 0 4px 18px;
  color: var(--text-secondary);
}

/* 404 */
.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding-block: 80px;
}
.notfound .display { font-size: clamp(30px, 5vw, 40px); }
.notfound p { color: var(--text-secondary); max-width: 40ch; }
.notfound .hero-actions { justify-content: center; margin-top: 20px; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: 40ch; margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { margin-top: 8px; }   /* copy leads, screenshot follows */

  .feature-grid { grid-template-columns: 1fr; text-align: center; }
  .feature:nth-of-type(even) .feature-media { order: 0; }
  .phase-legend { justify-content: center; }
}

/* On phones the primary CTA is the hero badge, so the sticky nav stays
   calm: wordmark + the two content links, no redundant button. */
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .nav { height: 58px; padding: 0 16px; gap: 10px; }
  .nav-cta { display: none; }
  .nav-links { gap: 2px; }
  .nav-links a.nav-link { padding: 8px 10px; font-size: 15px; }
  .brand .wordmark { font-size: 19px; }
  .price-lists { grid-template-columns: 1fr; }
  .footer-links { margin-left: 0; width: 100%; }
}

/* keep the nav honest down to 320px */
@media (max-width: 380px) {
  .brand .mark { width: 26px; height: 26px; }
  .brand .wordmark { font-size: 18px; }
  .nav-links a.nav-link { padding: 8px 8px; font-size: 14px; }
}
