/* Breathe: brand tokens */
:root {
  --ink: #0E2F3B;
  --teal: #0F7C82;
  --teal-dark: #0B5F64;
  --teal-mid: #5FB3BD;
  --sky: #BFE3EE;
  --mist: #E6F3F5;
  --ground: #F8FBFB;
  --white: #FFFFFF;
  --coral: #C8492E;
  --coral-dark: #A93B24;
  --muted: #456470;
  --line: #D3E4E8;
  --field: #9DBFC6;
  --radius: 24px;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Manrope', system-ui, sans-serif; margin: 0; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(2.6rem, 6vw, 4.25rem); letter-spacing: -0.03em; line-height: 1.03; }
h2 { font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.12; }
h3 { font-weight: 700; font-size: 1.5rem; line-height: 1.2; }
p { margin: 0; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--white); padding: 12px 16px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.75rem; letter-spacing: -0.03em; }
.logo:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 1.05rem; font-weight: 500; }
.nav a { text-decoration: none; color: var(--ink); padding: 12px 0; }
.nav a:hover { color: var(--teal); }
.nav a[aria-current="page"] { color: var(--teal); font-weight: 700; }
.nav-toggle { display: none; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 8px 20px 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a.btn { border-bottom: none; margin-top: 16px; text-align: center; }
}

/* Buttons */
.btn { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; text-align: center; border-radius: 999px; padding: 16px 28px; min-height: 52px; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--coral); color: var(--white); }
.btn-primary:hover { background: var(--coral-dark); color: var(--white); }
.btn-outline { background: var(--white); color: var(--teal); border-color: var(--teal); }
.btn-outline:hover { background: var(--mist); color: var(--teal-dark); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); color: var(--white); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-white:hover { background: var(--mist); color: var(--ink); }
.nav a.btn { padding: 12px 22px; min-height: 0; color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.link-strong { font-weight: 700; padding: 10px 0; display: inline-block; }

/* Sections */
.band { padding-top: 72px; padding-bottom: 72px; }
.band-mist { background: var(--mist); }
.band-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-ink { background: var(--ink); color: var(--white); }
.band-ink .lead { color: var(--sky); }
.lead { font-size: 1.3rem; color: var(--muted); max-width: 46ch; }
.pill { display: inline-block; font-size: 0.85rem; font-weight: 700; color: var(--teal-dark); background: var(--white); border-radius: 999px; padding: 8px 16px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hero-art { flex: 1 1 340px; min-width: 0; display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 420px; height: auto; display: block; }
/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.card-plain { border: none; }
.card-feature { background: var(--teal); color: var(--white); border-color: var(--teal); }
.card-feature .muted, .card-feature li { color: var(--mist); }
.card-feature .price span { color: var(--mist); }
.card .push { margin-top: auto; }
.card ul { margin: 0; padding-left: 22px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.icon { width: 40px; height: 40px; color: var(--teal); }
.price { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 2.6rem; letter-spacing: -0.02em; line-height: 1.1; }
.price span { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 1.05rem; letter-spacing: 0; color: var(--muted); }
.price-sm { font-size: 1.75rem; }

/* Steps */
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.steps li { display: flex; flex-direction: column; gap: 10px; }
.steps-col { grid-template-columns: 1fr; gap: 20px; }
.steps-col li { flex-direction: row; gap: 16px; align-items: flex-start; }
.steps-col li > div { display: flex; flex-direction: column; gap: 4px; }
.num { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: var(--white); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps strong { font-size: 1.15rem; }

/* Two-column */
.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split > * { flex: 1 1 400px; min-width: 0; }
.facts { display: flex; flex-direction: column; gap: 20px; }
.facts div { display: flex; flex-direction: column; gap: 4px; }

/* Forms */
.form { background: var(--mist); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 16px; align-self: flex-start; }
.band-mist .form { background: var(--white); }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 0.95rem; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"], .form input[type="date"], .form select, .form textarea { font: inherit; font-weight: 400; width: 100%; padding: 14px; border: 1px solid var(--field); border-radius: 12px; background: var(--white); color: var(--ink); min-height: 52px; }
.form textarea { min-height: 110px; resize: vertical; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.form .check { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 400; font-size: 0.95rem; color: var(--muted); }
.form .check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--teal); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-weight: 700; margin: 0; }
.form-status.ok { color: var(--teal-dark); }
.form-status.err { color: var(--coral-dark); }
.form [hidden] { display: none; }

/* Footer */
.site-footer { background: var(--ink); color: var(--white); padding-top: 48px; padding-bottom: 48px; font-size: 0.95rem; }
.site-footer .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer .cols > div { display: flex; flex-direction: column; gap: 8px; color: var(--sky); max-width: 360px; }
.site-footer .logo { color: var(--white); font-size: 1.6rem; }
.site-footer a { color: var(--sky); }
.site-footer a:hover { color: var(--white); }

/* Article pages */
.prose { max-width: 70ch; display: flex; flex-direction: column; gap: 18px; }
.prose h2 { font-size: 1.6rem; margin-top: 16px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

/* Cart, account and Learn pages */
[hidden] { display: none !important; }
.form input[type="password"], .form input[type="number"] { font: inherit; font-weight: 400; width: 100%; padding: 14px; border: 1px solid var(--field); border-radius: 12px; background: var(--white); color: var(--ink); min-height: 52px; }
.btn-cart { background: var(--ink); color: var(--white); }
.btn-cart:hover, .btn-cart[data-added] { background: var(--teal-dark); color: var(--white); }
.card-feature .btn-cart { border-color: var(--white); }
.nav a[data-cart-link] { font-weight: 700; }
.cart-lines { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-info { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; min-width: 0; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty input { font: inherit; width: 64px; min-height: 48px; text-align: center; border: 1px solid var(--field); border-radius: 12px; background: var(--white); color: var(--ink); }
.qty-btn { font: inherit; font-weight: 700; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--field); background: var(--white); color: var(--ink); cursor: pointer; }
.qty-btn:hover { background: var(--mist); }
.cart-sum { min-width: 6ch; text-align: right; }
.cart-qty { justify-self: start; }
.cart-remove { font: inherit; font-size: 0.9rem; background: none; border: none; color: var(--teal); text-decoration: underline; cursor: pointer; padding: 12px 4px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; }
.cart-total strong { font-family: 'Manrope', sans-serif; font-size: 2rem; }
.cart-notes { display: flex; flex-direction: column; gap: 8px; }
.cart-notes p, .note { background: var(--mist); border-radius: 16px; padding: 16px 20px; font-size: 0.95rem; }
.orders { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.order { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.order-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.order-status { font-weight: 700; color: var(--teal-dark); }
.order ul { margin: 0; padding-left: 22px; color: var(--muted); }
.card-link { text-decoration: none; color: var(--ink); }
.card-link:hover { color: var(--ink); }
.card-link .link-strong { color: var(--teal); }
.prose .lead { max-width: none; }
.sources { font-size: 0.95rem; overflow-wrap: anywhere; }

.stars { color: var(--coral); font-size: 1.35rem; letter-spacing: 3px; line-height: 1; }
.review p { overflow-wrap: anywhere; }

/* ---------- Motion ---------- */
/* One breathe = 10 seconds: 4 in, 6 out. Everything below is off for people who ask for reduced motion. */
.breather { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.breather svg circle, .logo svg .dot { transform-box: fill-box; transform-origin: center; }
.b-ripple { opacity: 0; }
.b-cue { display: none; margin: 0; font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-dark); }
.b-cue span { grid-area: 1 / 1; text-align: center; opacity: 0; }
.band-art { position: relative; overflow: hidden; }
.band-art > .wrap { position: relative; z-index: 1; }
.card, .btn { transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.2s ease, color 0.2s ease; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes b-outer { 0%, 100% { transform: scale(0.84); opacity: 0.7; } 40% { transform: scale(1); opacity: 1; } }
  @keyframes b-mid   { 0%, 100% { transform: scale(0.80); opacity: 0.75; } 40% { transform: scale(1); opacity: 1; } }
  @keyframes b-plate { 0%, 100% { transform: scale(0.86); } 40% { transform: scale(1.04); } }
  @keyframes b-core  { 0%, 100% { transform: scale(0.78); } 40% { transform: scale(1.22); } }
  @keyframes b-halo  { 0%, 100% { transform: scale(0.80); opacity: 0.25; } 40% { transform: scale(1); opacity: 0.6; } }
  @keyframes b-ripple { 0%, 40% { transform: scale(1); opacity: 0; } 46% { opacity: 0.7; } 100% { transform: scale(2.15); opacity: 0; } }
  @keyframes b-in  { 0% { opacity: 0; } 6%, 34% { opacity: 1; } 40%, 100% { opacity: 0; } }
  @keyframes b-out { 0%, 42% { opacity: 0; } 48%, 90% { opacity: 1; } 98%, 100% { opacity: 0; } }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

  .b-outer, .b-mid, .b-plate, .b-core, .b-halo, .b-ripple, .b-cue span, .logo svg .dot, .band-art::before, .band-art::after {
    animation-duration: 10s; animation-iteration-count: infinite; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1);
  }
  .b-outer { animation-name: b-outer; animation-delay: 0.35s; }
  .b-mid { animation-name: b-mid; animation-delay: 0.18s; }
  .b-plate { animation-name: b-plate; }
  .b-core { animation-name: b-core; }
  .b-halo { animation-name: b-halo; animation-delay: 0.5s; }
  .b-ripple { animation-name: b-ripple; animation-timing-function: ease-out; }
  .b-ripple-2 { animation-delay: 1.4s; }
  .b-cue { display: grid; }
  .b-in { animation-name: b-in; }
  .b-out { animation-name: b-out; }
  .logo svg .dot { animation-name: b-core; }

  /* Soft rings behind the heading on inner pages */
  .band-art::before, .band-art::after { content: ''; position: absolute; top: 50%; border-radius: 50%; pointer-events: none; animation-name: b-mid; }
  .band-art::before { right: -90px; width: 420px; height: 420px; margin-top: -210px; border: 12px solid rgba(95, 179, 189, 0.28); animation-delay: 0.3s; }
  .band-art::after { right: 0; width: 240px; height: 240px; margin-top: -120px; border: 12px solid rgba(95, 179, 189, 0.4); }
  .band-ink.band-art::before { border-color: rgba(191, 227, 238, 0.14); }
  .band-ink.band-art::after { border-color: rgba(191, 227, 238, 0.22); }

  /* Hero copy arrives in order on load */
  .hero-copy > * { animation: rise 0.7s ease-out both; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
  .hero-copy > *:nth-child(5) { animation-delay: 0.32s; }
  .hero-art { animation: rise 0.9s ease-out 0.15s both; }

  /* Sections fade up as you scroll (class added by app.js) */
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
  .reveal.in { opacity: 1; transform: none; }

  .card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(14, 47, 59, 0.10); }
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(0) scale(0.98); }
}
@media (max-width: 820px) { .band-art::before, .band-art::after { display: none; } }

/* Logo: the two rings follow the centre dot, one after the other. Same 10 second breath. */
.logo svg circle { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .logo svg .ring-m, .logo svg .ring-o { animation-duration: 10s; animation-iteration-count: infinite; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  .logo svg .ring-m { animation-name: b-mid; animation-delay: 0.18s; }
  .logo svg .ring-o { animation-name: b-outer; animation-delay: 0.35s; }
}
