/* 4k Weeks site (issue #22). Same structure as the GymBells site (~/Workspace/workouts/site/web).
   System font only; the accent is the app's AccentColor (#5bb7db light, #327da9 dark). */
:root {
  --page: #ffffff;
  --card: #f2f2f7;
  --label: #000000;
  --secondary: rgba(60, 60, 67, 0.72);
  --hairline: rgba(60, 60, 67, 0.16);
  --accent: #5bb7db;
  /* AccentColor is too light for text on white; this darker blue passes AA (5.6:1) */
  --accent-text: #1d6a90;
  --lived: rgba(142, 142, 147, 0.3);
  --now: #000000;
  --shot-edge: rgba(0, 0, 0, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #000000;
    --card: #1c1c1e;
    --label: #ffffff;
    --secondary: rgba(235, 235, 245, 0.66);
    --hairline: rgba(84, 84, 88, 0.6);
    --accent: #5bb7db;
    --accent-text: #7cc8e8;
    --lived: rgba(255, 255, 255, 0.34);
    --now: #ffffff;
    --shot-edge: rgba(255, 255, 255, 0.16);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .badge-light { display: none; }
  :root:not([data-theme="light"]) .badge-dark { display: block; }
}
:root[data-theme="dark"] {
  --page: #000000;
  --card: #1c1c1e;
  --label: #ffffff;
  --secondary: rgba(235, 235, 245, 0.66);
  --hairline: rgba(84, 84, 88, 0.6);
  --accent: #5bb7db;
  --accent-text: #7cc8e8;
  --lived: rgba(255, 255, 255, 0.34);
  --now: #ffffff;
  --shot-edge: rgba(255, 255, 255, 0.16);
  color-scheme: dark;
}
:root[data-theme="dark"] .badge-light { display: none; }
:root[data-theme="dark"] .badge-dark { display: block; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--card); color: var(--label); padding: 10px 14px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 10px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--label); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.top nav { display: flex; gap: 18px; font-size: 15px; }
.top nav a { color: var(--secondary); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--label); }

/* Hero */
.hero { text-align: center; padding-top: 36px; }
h1 { font-size: clamp(34px, 8vw, 60px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 800; margin: 0 auto 16px; max-width: 18ch; text-wrap: balance; }
.lede { color: var(--secondary); font-size: clamp(17px, 2.4vw, 20px); max-width: 32em; margin: 0 auto 10px; }
.lede strong { color: var(--label); font-weight: 600; }

/* The official App Store badge. Apple: at least 40 px high, clear space of a quarter of its height. */
.store { display: inline-block; padding: 14px; margin: 0; }
.store a { display: block; border-radius: 10px; }
.store img { width: 162px; height: 54px; }
.badge-dark { display: none; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; color: var(--secondary); font-size: 14px; }
.facts li { white-space: nowrap; }
.hero-shot { margin: 36px auto 0; }

/* Rhythm: a row of week dots between sections, as in the Dots style */
.rhythm { display: flex; justify-content: center; gap: 10px; padding: 56px 0; }
.rhythm i { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.rhythm i.l { background: var(--lived); }
.rhythm i.n { background: var(--now); }

/* Section heads */
h2 { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 12px; text-wrap: balance; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; margin: 0; }
.kicker { color: var(--accent-text); font-weight: 600; font-size: 15px; margin: 0 0 8px; }
.sub { color: var(--secondary); margin: 0 0 20px; max-width: 34em; }
.sub strong { color: var(--label); font-weight: 600; }
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }

/* Feature rows */
.feature { display: grid; gap: 28px; align-items: center; padding-top: 40px; padding-bottom: 40px; }
.feature ul { list-style: none; padding: 0; margin: 0 0 22px; }
.feature li { position: relative; padding-left: 22px; margin: 8px 0; color: var(--secondary); }
.feature li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.shot { width: min(300px, 78vw); margin: 0 auto; border-radius: 30px; box-shadow: 0 0 0 1px var(--shot-edge); }

/* The four styles */
.styles { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 14px; }
.styles figure { margin: 0; text-align: center; }
.styles img { width: 100%; border-radius: 22px; box-shadow: 0 0 0 1px var(--shot-edge); }
.styles figcaption { margin-top: 10px; font-weight: 600; }
.styles figcaption span { display: block; color: var(--secondary); font-weight: 400; font-size: 15px; }

/* Privacy strip */
.private { text-align: center; padding-top: 72px; }
.private .sub { margin-left: auto; margin-right: auto; }
.private h2 span { display: inline-block; }

/* Footer */
footer { border-top: 1px solid var(--hairline); margin-top: 72px; padding: 28px 0 44px; color: var(--secondary); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; justify-content: space-between; }
footer .brand { font-size: 16px; }
footer .brand img { width: 24px; height: 24px; border-radius: 6px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
footer a { color: var(--secondary); }

/* Support and Privacy pages */
.page { max-width: 720px; margin: 0 auto; padding: 32px 16px 0; }
.page h1 { font-size: clamp(34px, 7vw, 48px); margin: 0 0 14px; max-width: none; text-align: left; }
.page .lede { margin: 0 0 8px; text-align: left; max-width: none; }
.page h2 { font-size: 24px; margin: 40px 0 10px; }
.page p, .page li { color: var(--secondary); }
.page p strong, .page li strong { color: var(--label); font-weight: 600; }
.page ul { padding-left: 0; list-style: none; }
.page ul li { position: relative; padding-left: 22px; margin: 8px 0; }
.page ul li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.updated { font-size: 14px; margin: 0 0 18px; color: var(--secondary); }
.qa { background: var(--card); border-radius: 22px; padding: 18px 20px 4px; margin: 12px 0; }
.qa h3 { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.qa p { margin: 6px 0 14px; }

@media (min-width: 760px) {
  .hero { padding-top: 60px; }
  .feature { grid-template-columns: 1.1fr .9fr; gap: 56px; padding-top: 56px; padding-bottom: 56px; }
  .feature.flip > :first-child { order: 2; }
  .styles { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .rhythm { padding: 72px 0; }
}
@media (max-width: 380px) {
  .top nav { gap: 12px; font-size: 14px; }
  .brand { font-size: 17px; gap: 8px; }
  .top .brand img { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
