/* Minimal scaffold CSS. Full design deferred. */

:root {
  --fg: #1a1a1a;
  --bg: #fafafa;
  --muted: #666;
  --accent: #2b6cb0;
  --border: #e5e5e5;
  --breath-nose: #2b6cb0;
  --breath-mouth: #c53030;
  --breath-start: #2f855a;
  --max-w: 42rem;
  --space: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e5e5e5;
    --bg: #111;
    --muted: #888;
    --accent: #63b3ed;
    --border: #2a2a2a;
    --breath-nose: #63b3ed;
    --breath-mouth: #fc8181;
    --breath-start: #48bb78;
  }
}

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

html { font-size: 16px; }
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1rem;
}

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

h1, h2, h3 { line-height: 1.25; margin-top: 2rem; margin-bottom: 0.5rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
p { margin: 0 0 1rem; }

/* Site chrome */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.site-header .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--fg);
}
.site-header nav a { margin-left: 1rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.875rem;
}

/* Home */
.hero { padding: 3rem 0; }
.hero h1 { font-size: 2.5rem; margin-top: 0; }
.hero .pitch { font-size: 1.125rem; color: var(--muted); }
.hero .cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: white;
  border-radius: 0.375rem;
}
.hero .cta:hover { text-decoration: none; opacity: 0.9; }

/* Sequences index */
.sequence-list { list-style: none; padding: 0; }
.sequence-list li { border-bottom: 1px solid var(--border); }
.sequence-list li:last-child { border-bottom: none; }
.sequence-list a {
  display: block;
  padding: 1.25rem 0;
  color: var(--fg);
}
.sequence-list a:hover { text-decoration: none; }
.sequence-list a:hover h2 { color: var(--accent); }
.sequence-list h2 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.sequence-list p { margin: 0; color: var(--muted); }

/* Sequence page */
.sequence article header .summary {
  font-size: 1.125rem;
  color: var(--muted);
}

.empty { color: var(--muted); }

/* Breath player */
.breath-player {
  margin: 1.5rem 0 2rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.breath-list {
  flex: 1;
  min-width: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: breath;
}

.breath-list-item {
  padding: 0.35rem 0;
  line-height: 1.5;
  color: var(--muted);
  counter-increment: breath;
}

.breath-list-item::before {
  content: counter(breath) ".";
  margin-right: 0.5rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

.breath-list-phase {
  transition: color 0.25s ease;
}

.breath-list-phase.breath-nose  { color: color-mix(in srgb, var(--breath-nose)  22%, var(--muted)); }
.breath-list-phase.breath-mouth { color: color-mix(in srgb, var(--breath-mouth) 22%, var(--muted)); }

.breath-list-phase.breath-nose.is-current  { color: var(--breath-nose); }
.breath-list-phase.breath-mouth.is-current { color: var(--breath-mouth); }

.breath-list-sep {
  opacity: 0.6;
}

.breath-main {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.breath-main .breath-phase {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
  min-height: 1.4em;
  text-align: center;
  transition: color 0.25s ease;
}

.breath-main .breath-phase.breath-nose  { color: var(--breath-nose); }
.breath-main .breath-phase.breath-mouth { color: var(--breath-mouth); }

.breath-stage {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breath-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 2px solid var(--accent);
  transform-origin: center center;
  transition: transform 1s ease-in-out, background-color 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.breath-circle.breath-nose {
  background: color-mix(in srgb, var(--breath-nose) 18%, transparent);
  border-color: var(--breath-nose);
}

.breath-circle.breath-mouth {
  background: color-mix(in srgb, var(--breath-mouth) 18%, transparent);
  border-color: var(--breath-mouth);
}

.breath-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.breath-toggle {
  appearance: none;
  border: 1px solid var(--breath-start);
  background: var(--breath-start);
  color: white;
  padding: 0.6rem 1.75rem;
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
}

.breath-toggle:hover { opacity: 0.9; }
.breath-toggle[data-state="paused"] { background: transparent; color: var(--breath-start); }

.breath-fallback {
  padding-left: 1.25rem;
  color: var(--muted);
}
.breath-fallback li { margin: 0.25rem 0; }

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

@media (max-width: 36rem) {
  .breath-player {
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }
  .breath-list { width: 100%; }
  .breath-main .breath-phase { display: none; }
}
