/* Still Storm Co. — production PWA (Stage 1)
   Luxury wellness system, Brief 1 palette only (Leslie, 2026-10-28):
   Stone Sand #D6CBBF · Warm Taupe Clay #A89C8A · Deep Olive Sage #6F7F63 ·
   Soft Sage Mist #BFCBB8 · warm ivory #FAF7F1.
   Restraint: serif display headings, tracked-out caps labels, generous
   whitespace, hairline dividers, soft lift shadows only, NO boxes/panels.
   Washes are free-floating radial pools that reach full transparency well
   inside their layer — they melt into the ivory, never end at an edge. */

:root {
  color-scheme: light;
  --bg: #faf7f1;
  --surface: #fffcf6;
  --surface-alt: #efe9df;
  --text: #3f3a34;
  --dim: #6b6257;
  --border: #cbc0b1;
  --hairline: rgba(111, 127, 99, 0.35);
  --line: #a89c8a;
  --btn-ink: #faf7f1;
  --accent: #6f7f63;
  --olive-deep: #47543f;
  --sage-mist: #bfcbb8;
  --stone: #d6cbbf;
  --danger: #a03d2d;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: var(--accent); }

/* Page canvas — warm ivory washed with faint sage mist and stone sand,
   plus barely-there grain. Fixed attachment so washes never band. */
.lux-canvas {
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 55% at 85% -5%, rgba(191, 203, 184, 0.42), transparent 70%),
    radial-gradient(90% 45% at -10% 30%, rgba(214, 203, 191, 0.38), transparent 70%),
    linear-gradient(180deg, var(--bg), #f3eee3);
  background-attachment: fixed;
  min-height: 100vh;
}

.view-wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem calc(7.5rem + env(safe-area-inset-bottom));
  overflow-x: clip;
}
@media (min-width: 640px) { .view-wrap { padding-left: 2rem; padding-right: 2rem; } }

/* ---------- typography ---------- */
.font-display { font-family: var(--font-display); }
.lux-label {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
}
.label-accent { color: var(--accent); }
.label-olive { color: var(--olive-deep); }
.label-dim { color: var(--dim); }
.dim { color: var(--dim); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.italic-serif { font-family: var(--font-display); font-style: italic; }

.brand-lockup {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.42em; padding-left: 0.42em;
  text-align: center;
}
.brand-sub {
  margin-top: 0.5rem; text-align: center;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.3em; padding-left: 0.3em;
  color: var(--dim);
}
.page-title {
  font-family: var(--font-display);
  font-size: 38px; font-weight: 500; line-height: 1.25; margin-top: 1rem;
}
.page-subtitle { font-family: var(--font-display); font-size: 20px; font-style: italic; color: var(--dim); margin-top: 0.4rem; }
.section-title { font-family: var(--font-display); font-size: 30px; font-weight: 500; line-height: 1.3; }
.body-copy { line-height: 1.9; color: var(--text); }
.body-copy-dim { line-height: 1.9; color: var(--dim); }

/* ---------- dividers & washes ---------- */
.hairline { border: 0; border-top: 1px solid var(--hairline); margin: 0; }
.flow-line {
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='12' viewBox='0 0 140 12'%3E%3Cpath d='M0 6 Q 17.5 0.5, 35 6 T 70 6 T 105 6 T 140 6' fill='none' stroke='%236f7f63' stroke-opacity='0.38' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center; background-size: 140px 12px;
}
/* Free-floating pigment layers: absolutely positioned, bleeding past their
   section on every side, each pool fading to full transparency inside the
   layer — colour melts into ivory; there is no edge to see end. */
.wash-wrap { position: relative; }
.wash-begin, .wash-pooled, .wash-soft {
  position: absolute; pointer-events: none;
}
.wash-begin {
  inset: -7rem -2.5rem -5rem;
  background-image:
    radial-gradient(56% 54% at 50% 44%, rgba(191, 203, 184, 0.76), rgba(191, 203, 184, 0.32) 52%, transparent 74%),
    radial-gradient(42% 40% at 80% 72%, rgba(214, 203, 191, 0.52), transparent 70%),
    radial-gradient(40% 38% at 16% 66%, rgba(191, 203, 184, 0.44), transparent 70%);
}
.wash-pooled {
  inset: -4rem -2.5rem -4rem;
  background-image:
    radial-gradient(50% 46% at 26% 34%, rgba(191, 203, 184, 0.82), transparent 64%),
    radial-gradient(46% 44% at 80% 62%, rgba(214, 203, 191, 0.72), transparent 64%),
    radial-gradient(36% 32% at 52% 88%, rgba(191, 203, 184, 0.48), transparent 64%);
}
.wash-soft {
  inset: -3rem -2rem;
  background-image:
    radial-gradient(44% 52% at 30% 45%, rgba(191, 203, 184, 0.46), transparent 62%),
    radial-gradient(38% 46% at 74% 58%, rgba(214, 203, 191, 0.52), transparent 62%);
}
.wash-content { position: relative; }
/* Image whose edges dissolve into the page (crossed gradient masks). */
.img-blend {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24%, #000 76%, transparent), linear-gradient(to bottom, transparent, #000 26%, #000 74%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 24%, #000 76%, transparent), linear-gradient(to bottom, transparent, #000 26%, #000 74%, transparent);
  mask-composite: intersect;
}
.hero-top-fade {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%);
  mask-image: linear-gradient(to bottom, transparent, #000 12%);
}

/* ---------- buttons & fields ---------- */
.btn-solid, .btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 15px 30px 14px; border-radius: 999px; text-align: center; text-decoration: none;
}
.btn-solid { background: var(--accent); border: 1px solid var(--accent); color: var(--btn-ink); box-shadow: 0 12px 28px -10px rgba(111, 127, 99, 0.35); }
.btn-quiet { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-solid:disabled, .btn-quiet:disabled { opacity: 0.55; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.lux-field {
  border: 1px solid rgba(203, 192, 177, 0.6);
  background: var(--surface);
  border-radius: 999px; padding: 0.8rem 1.25rem; width: 100%;
}
.lux-field.flat { border-radius: 14px; }
textarea.lux-field { border-radius: 14px; resize: vertical; }
label.field-label { display: block; margin-top: 1.1rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.6rem 0; font-size: 14px; font-weight: 500; color: var(--accent); }

/* ---------- bottom nav (solid ground — nothing ghosts through) ---------- */
.lux-nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  background-color: #fdfaf4;
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -14px 34px -18px rgba(62, 56, 49, 0.28);
  padding-top: 0.6rem; padding-bottom: env(safe-area-inset-bottom);
}
.lux-nav .nav-grid { max-width: 42rem; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 0.25rem; }
.nav-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 0.55rem 0 0.7rem;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim);
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn.active { color: var(--accent); font-weight: 500; }
.nav-btn .nav-dot { height: 4px; width: 24px; border-radius: 999px; background: transparent; }
.nav-btn.active .nav-dot { background: var(--accent); }
.nav-badge {
  position: absolute; right: 10%; top: 0;
  min-width: 20px; height: 20px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--sage-mist); color: var(--olive-deep); font-size: 11px;
}

/* ---------- list rows & accordions ---------- */
.row-btn { display: block; width: 100%; text-align: left; padding: 1.25rem 0.25rem; }
.row-title { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.35; }
.row-sub { margin-top: 0.2rem; line-height: 1.7; color: var(--dim); }
.row-meta { margin-top: 0.45rem; font-size: 14px; font-weight: 300; color: var(--dim); display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.lock-tag { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 11px; text-transform: uppercase; letter-spacing: 0.22em; color: var(--dim); }
.lock-tag svg { width: 12px; height: 12px; }
.free-tag { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.28em; color: var(--accent); }
.done-tag { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.22em; color: var(--olive-deep); }
.accordion-head {
  display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.4rem 0.25rem; text-align: left;
}
.accordion-head .acc-title { font-family: var(--font-display); font-size: 25px; font-weight: 500; }
.accordion-head .acc-count { font-size: 13px; color: var(--dim); white-space: nowrap; }
.accordion-head .acc-chev { color: var(--accent); font-size: 18px; }
.row-num { font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--line); }

/* ---------- exercise rows & logging ---------- */
.exercise { padding: 1.3rem 0 0.4rem; }
.exercise-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.exercise-name { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.35; }
.exercise-meta { margin-top: 0.3rem; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 14px; color: var(--dim); }
.exercise-meta .sr { font-weight: 400; color: var(--text); }
.help-btn {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--accent);
  font-family: var(--font-display); font-size: 17px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.sets-editor { margin: 0.8rem 0 0.6rem; }
.set-row { display: grid; grid-template-columns: 34px 1fr 1fr 52px; gap: 0.5rem; align-items: center; padding: 0.3rem 0; }
.set-row .set-no { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--dim); }
.set-row input {
  border: 0; border-bottom: 1px solid var(--border); background: transparent;
  padding: 0.45rem 0.2rem; width: 100%; text-align: center;
}
.set-row input:focus { outline: none; border-bottom-color: var(--accent); }
.set-done { display: flex; align-items: center; gap: 0.3rem; font-size: 12px; color: var(--dim); }
.set-done input { width: 20px; height: 20px; accent-color: var(--accent); }
.add-set { font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); padding: 0.4rem 0; }
.variation { padding: 1rem 0; }
.variation .var-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.24em; color: var(--accent); }

/* ---------- sheet (exercise help) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(63, 58, 52, 0.35); z-index: 40; }
.sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 41; display: flex; justify-content: center; }
.sheet-inner {
  position: relative; width: 100%; max-width: 34rem; max-height: 86vh; overflow-y: auto;
  border-radius: 28px 28px 0 0; padding: 1.6rem 1.5rem 2.6rem;
  box-shadow: 0 -18px 50px -20px rgba(62, 56, 49, 0.4);
}
@media (min-width: 640px) { .sheet { align-items: center; inset-block: 0; } .sheet-inner { border-radius: 28px; } }
.sheet-close { position: absolute; top: 0.7rem; right: 1rem; font-size: 28px; color: var(--dim); padding: 0.4rem; line-height: 1; }
.help-steps { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.help-steps li { counter-increment: step; position: relative; padding: 0.55rem 0 0.55rem 2.2rem; line-height: 1.85; }
.help-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.55rem;
  font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--accent);
}
.help-art { width: 100%; border-radius: 22px; margin-top: 1.1rem; }
.art-placeholder {
  margin-top: 1.1rem; padding: 2.2rem 1rem; text-align: center;
  font-family: var(--font-display); font-style: italic; color: var(--dim); font-size: 18px;
}

/* ---------- players ---------- */
.bloom-stage { position: relative; height: 300px; display: flex; align-items: center; justify-content: center; }
.breath-halo {
  position: absolute; width: 260px; height: 260px; border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(191, 203, 184, 0.72) 0%, rgba(214, 203, 191, 0.5) 55%, transparent 74%);
  filter: blur(18px);
}
.breath-bloom {
  position: absolute; width: 208px; height: 208px; border-radius: 999px; will-change: transform;
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.5) 0%, transparent 48%),
    radial-gradient(circle at 50% 50%, rgba(191, 203, 184, 0.92) 0%, rgba(191, 203, 184, 0.68) 50%, rgba(111, 127, 99, 0.38) 72%, transparent 82%);
  box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.32), 0 24px 70px -24px rgba(111, 127, 99, 0.55);
  filter: blur(3px);
}
.breath-bloom.drift { animation: bloom-drift 9s ease-in-out infinite alternate; }
@keyframes bloom-drift { from { transform: scale(0.97); } to { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .breath-bloom.drift { animation: none; } }
.phase-cue { font-family: var(--font-display); font-size: 30px; font-style: italic; font-weight: 500; text-align: center; }
.count-dots { display: flex; gap: 8px; justify-content: center; margin-top: 1rem; }
.count-dots span { width: 8px; height: 8px; border-radius: 999px; background: rgba(111, 127, 99, 0.22); transition: background 0.4s; }
.count-dots span.on { background: var(--accent); }
.player-controls { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.step-progress { text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: 0.24em; color: var(--dim); }
.audio-slot {
  margin-top: 2.2rem; text-align: center; padding: 1.2rem 0.5rem;
  font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--dim);
}

/* ---------- log ---------- */
.log-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.log-toggle button { padding: 0.55rem 1.3rem; font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--dim); }
.log-toggle button.active { background: var(--accent); color: var(--btn-ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 1rem; }
.cal-head { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--dim); padding: 0.4rem 0; }
.cal-day { min-height: 52px; padding: 0.3rem; font-size: 12px; color: var(--dim); border-top: 1px solid var(--hairline); }
.cal-day.today .cal-num { color: var(--accent); font-weight: 500; }
.cal-day .cal-num { font-size: 13px; }
.cal-dot { display: block; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); margin-top: 4px; }
.cal-dot.yoga { background: var(--line); }
.cal-dot.breathwork { background: var(--sage-mist); border: 1px solid var(--accent); }
.summary-num { font-family: var(--font-display); font-size: 44px; font-weight: 500; line-height: 1.1; }

/* ---------- misc ---------- */
.toast {
  position: fixed; inset-inline: 1rem; bottom: 7rem; z-index: 50; margin: 0 auto; max-width: 28rem;
  background: var(--text); color: var(--bg); border-radius: 999px; padding: 0.9rem 1.4rem;
  text-align: center; font-size: 14px; box-shadow: 0 12px 36px rgba(62, 56, 49, 0.25);
}
.boot { padding-top: 6rem; text-align: center; }
.boot-note { margin-top: 1rem; color: var(--dim); }
.error-note { padding: 2.5rem 0; text-align: center; color: var(--danger); }
.spacer-lg { margin-top: 3.5rem; }
.spacer-md { margin-top: 2.2rem; }
.center { text-align: center; }
.hero-img { display: block; width: 100vw; max-width: none; position: relative; left: 50%; transform: translateX(-50%); aspect-ratio: 16/10; max-height: 540px; object-fit: cover; object-position: bottom; }
.wash-img-band { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; pointer-events: none; }
.switch-row { display: flex; align-items: center; justify-content: center; gap: 0.7rem; margin-top: 1rem; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.footer-note { margin-top: 3rem; text-align: center; font-size: 12px; font-weight: 300; line-height: 1.9; color: var(--dim); }
select.lux-field { appearance: none; }
