:root {
  --bg: #ffffff;
  --text: #000000;
  --muted: rgba(60, 60, 67, 0.6);
  --surface: #f2f2f7;
  --separator: rgba(60, 60, 67, 0.2);
  --green: #34c759;

  /* Type scale. Everything on the page pulls from these. */
  --display: clamp(1.75rem, 1.1rem + 2.7vw, 2.125rem);  /* 28 → 34 */
  --title: clamp(1.375rem, 1rem + 1.6vw, 1.625rem);     /* 22 → 26 */
  --lede: 1.0625rem;                                    /* 17 */
  --body: 0.9375rem;                                    /* 15 */
  --small: 0.875rem;                                    /* 14 */
  --caption: 0.8125rem;                                 /* 13 */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #ffffff;
    --muted: rgba(235, 235, 245, 0.6);
    --surface: #1c1c1e;
    --separator: rgba(84, 84, 88, 0.65);
    --green: #30d158;
  }
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 24px;
}

a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Hero */

.hero {
  padding: 96px 0 64px;
}

.week {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
}

.ring {
  width: 26px;
  height: 26px;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 2.4;
}

.ring .track { stroke: var(--separator); }

.ring .arc {
  stroke: var(--text);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.3s ease-in-out, stroke 0.3s ease-in-out;
}

.ring.done .arc { stroke: var(--green); }

h1 {
  font-size: var(--display);
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.1;
  text-wrap: balance;
}

.lede {
  margin-top: 10px;
  font-size: var(--lede);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--muted);
  text-wrap: pretty;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: var(--body);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.button:focus-visible { outline-offset: 2px; }
.button:active { transform: scale(0.97); }

.button.primary {
  background: var(--text);
  color: var(--bg);
}

@media (hover: hover) {
  .button:hover { opacity: 0.82; }
}

/* Features */

.features {
  display: grid;
  gap: 8px;
  padding-bottom: 80px;
}

.feature {
  background: var(--surface);
  border-radius: 18px;
  padding: 15px 18px;
}

.feature h2 {
  font-size: var(--body);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature p {
  margin-top: 2px;
  font-size: var(--small);
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}

/* CTA */

.cta {
  margin-bottom: 40px;
  padding: 48px 24px;
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
}

.cta .cta-ring {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  display: block;
}

.cta h2 {
  font-size: var(--title);
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.1;
  text-wrap: balance;
}

.cta .lede {
  margin-top: 6px;
  font-size: var(--body);
}

.cta .buttons {
  justify-content: center;
  margin-top: 24px;
}

/* Footer */

footer {
  padding: 24px 24px 40px;
  text-align: center;
  font-size: var(--caption);
}

.credit {
  color: var(--muted);
  text-decoration: none;
}

.credit .handle { color: var(--text); }
.credit .name { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .ring .arc { transition: none; }
  .button { transition: none; }
}

@media (max-width: 480px) {
  .hero { padding: 64px 0 52px; }
  .week { gap: 8px; margin-bottom: 22px; }
  .ring { width: 24px; height: 24px; }
  .features { padding-bottom: 64px; }
  .cta { padding: 40px 20px; }
}
