:root {
  --bg: hsl(30 6% 5%);
  --text: hsl(36 14% 92%);
  --muted: hsl(30 6% 64%);
  --rule: hsl(30 6% 18%);
  --accent: hsl(158 52% 70%);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: hsl(30 8% 96%);
    --text: hsl(30 8% 8%);
    --muted: hsl(30 6% 36%);
    --rule: hsl(30 6% 84%);
    --accent: hsl(160 60% 28%);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
main { max-width: 680px; margin: 0 auto; padding: 56px 20px 72px; }
nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 40px; font-size: 0.95rem; }
nav a[aria-current="page"] { color: var(--text); text-decoration: none; font-weight: 600; }
h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 40px 0 8px; }
h3 { font-size: 1rem; margin: 24px 0 4px; }
.meta, .muted { color: var(--muted); }
.meta { margin: 0 0 32px; font-size: 0.95rem; }
.lead { font-size: 1.1rem; }
ul { padding-left: 1.2em; }
li { margin: 6px 0; }
a { color: var(--accent); }
footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 0.9rem; }

/* Cabecera: anillos de sueño, esfuerzo y estrés con los colores de la app (AppTheme.swift).
   Sin JS: el SVG ya está en su estado final, así que con «reducir movimiento» o sin animaciones se ve fijo. */
:root {
  --sleep: #bdb8ff; --sleep-soft: #45426e;
  --activity: #ffc799; --activity-soft: #664a36;
  --stress: #a3ebcc; --stress-soft: #335447;
}
@media (prefers-color-scheme: light) {
  :root {
    --sleep: #6b66db; --sleep-soft: #d6d4f7;
    --activity: #d1803d; --activity-soft: #f7dec4;
    --stress: #338f70; --stress-soft: #ccebde;
  }
}
.hero { display: flex; align-items: center; gap: 20px; margin: 0 0 16px; }
.hero h1 { margin: 0; }
.rings { width: 88px; height: 88px; flex: none; transform: rotate(-90deg); overflow: visible; }
.rings circle { fill: none; stroke-width: 10; }
.rings .track.sleep { stroke: var(--sleep-soft); }
.rings .track.activity { stroke: var(--activity-soft); }
.rings .track.stress { stroke: var(--stress-soft); }
.rings .ring { stroke-linecap: round; stroke-dasharray: var(--fill) 200; }
.rings .ring.sleep { stroke: var(--sleep); }
.rings .ring.activity { stroke: var(--activity); }
.rings .ring.stress { stroke: var(--stress); }
.breathe { transform-origin: 60px 60px; }

@media (prefers-reduced-motion: no-preference) {
  .rings .ring { animation: draw 1.1s cubic-bezier(.2, .9, .25, 1.05) both; }
  .rings .ring.activity { animation-delay: .12s; }
  .rings .ring.stress { animation-delay: .24s; }
  .breathe { animation: breathe 4.6s ease-in-out 1.4s infinite; }
}
/* Con un hueco de 200 y desplazamiento 100 el trazo queda oculto; animar solo el desplazamiento evita interpolar var(). */
@keyframes draw { from { stroke-dashoffset: 100; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

@media (min-width: 560px) {
  .rings { width: 112px; height: 112px; }
  .hero h1 { font-size: 2.4rem; }
}
