:root {
  --bg: #f5efe6;
  --bg-card: #ffffff;
  --ink: #2a2620;
  --ink-soft: #6b6359;
  --ink-mute: #9a9087;
  --line: #e8dfd2;
  --line-soft: #efe7da;

  --olive: #3d4137;
  --olive-deep: #2c2f27;
  --olive-edge: #525649;
  --gold: #b87939;
  --gold-light: #d4a574;
  --gold-soft: rgba(184, 121, 57, 0.45);
  --cream-warm: #ffddd0;

  --shadow: 0 1px 2px rgba(42, 38, 32, 0.04), 0 12px 30px rgba(42, 38, 32, 0.06);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  position: relative;
}

/* ---------- Site nav ---------- */
.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 4px 0 18px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
  padding: 4px 6px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--gold);
}
.site-nav .dot { color: var(--ink-mute); }

/* ---------- Header ---------- */
header {
  text-align: center;
  padding: 4px 0 18px;
}
.logo-wrap {
  width: 100%;
  max-width: clamp(200px, 38vw, 280px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
header .logo {
  width: 100%;
  height: auto;
  display: block;
}
header h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 36px;
  margin: 0 0 6px;
  color: var(--gold);
}
header .tagline {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 4px 0 0;
}

/* ---------- Presets ---------- */
.presets {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 8px 0 36px;
}
.preset-group, .duration-group {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow);
}
.preset-btn, .duration-btn {
  appearance: none;
  border: none;
  background: transparent;
  font-family: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.duration-btn { padding: 8px 18px; font-size: 11px; }
.preset-btn:hover, .duration-btn:hover { color: var(--ink); }
.preset-btn.active {
  background: var(--olive);
  color: var(--gold-light);
}
.duration-btn.active {
  background: var(--gold);
  color: #fff;
}

/* ---------- Stage ---------- */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 20px 0 8px;
}

/* ---------- Timer ---------- */
.timer {
  position: absolute;
  top: 0;
  right: 4px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.timer-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
}
.timer-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 100.53;
  transition: stroke-dashoffset 0.5s linear;
}
.timer-text {
  position: relative;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- Orb ---------- */
.orb-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 28px;
}

@media (min-width: 480px) {
  .orb-wrap { width: 260px; height: 260px; }
}

.orb-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(212, 165, 116, 0.35) 0%,
    rgba(212, 165, 116, 0.18) 35%,
    rgba(212, 165, 116, 0.06) 60%,
    transparent 75%);
  transform: scale(1);
  transition: transform 60ms linear;
  pointer-events: none;
}

.orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, #f0d4a8 0%, var(--gold-light) 35%, var(--gold) 75%, #8a5824 100%);
  box-shadow:
    0 0 24px rgba(184, 121, 57, 0.35),
    0 0 60px rgba(184, 121, 57, 0.20),
    inset 0 -10px 20px rgba(138, 88, 36, 0.30),
    inset 0 6px 14px rgba(255, 235, 205, 0.45);
  transform: scale(1);
  transform-origin: center;
  will-change: transform;
}

@media (min-width: 480px) {
  .orb { width: 140px; height: 140px; }
}

/* ---------- Cue ---------- */
.cue {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  min-height: 32px;
  letter-spacing: 0.5px;
  opacity: 0.9;
  transition: opacity 0.4s ease;
}
.cue.fading { opacity: 0; }

/* ---------- Controls ---------- */
.controls {
  display: flex;
  justify-content: center;
  margin: 8px 0 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s ease;
  min-width: 140px;
}
.btn:hover { opacity: 0.85; }
.btn.stop {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.btn.stop:hover { color: var(--ink); border-color: var(--ink-soft); }

/* ---------- Practice note ---------- */
.practice-note {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 16px 0;
  border-top: 1px solid var(--line-soft);
}
.practice-note p {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 32px 16px 0;
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.3px;
}
footer p { margin: 4px 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .orb, .orb-halo {
    transition: transform 200ms linear;
  }
}
