/* Zen Reader — Still Bloom palette
   Brand source of truth: /Branding/README.txt */
:root {
  --ink:        #1F2A33;
  --water:      #2C5E7E;
  --water-light:#3C7A9C;
  --sky:        #5FA7C6;
  --mist:       #D7ECF8;
  --lotus:      #F2A9BC;
  --lotus-deep: #E0809B;
  --petal-soft: #F9D6DF;
  --paper:      #FBF7F2;
  --leaf:       #7FB079;
  --stone:      #8A97A0;
  --white:      #FFFFFF;

  --radius:   18px;
  --radius-sm:12px;
  --maxw:     1080px;
  --shadow:   0 18px 48px rgba(31, 42, 51, 0.12);
  --shadow-sm:0 6px 20px rgba(31, 42, 51, 0.08);
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.2; color: var(--water); font-weight: 800; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--water-light); text-decoration: none; }
a:hover { color: var(--lotus-deep); text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 242, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(44, 94, 126, 0.10);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; color: var(--water); font-size: 1.25rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 40px; height: 40px; display: block; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink); font-weight: 700; }
.nav a:hover { color: var(--water); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--water); color: var(--white);
  padding: 11px 20px; border-radius: 999px; font-weight: 800;
  border: 0; cursor: pointer; transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--water-light); color: var(--white); text-decoration: none; transform: translateY(-1px); }
.btn.lotus { background: var(--sky); color: var(--ink); }
.btn.lotus:hover { background: #4E97B8; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--water); box-shadow: none; border: 2px solid rgba(44,94,126,.25); }
.btn.ghost:hover { background: rgba(44,94,126,.06); color: var(--water); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(120% 120% at 22% 12%, var(--sky) 0%, var(--water-light) 42%, var(--water) 78%, #234e68 100%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 90px;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 100%, 100% 38%, 0 78%);
}
.hero .wrap {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding: 84px 24px 132px;
}
.hero h1 { color: var(--white); margin-bottom: .35em; letter-spacing: -0.5px; }
.hero .lead { font-size: 1.2rem; color: rgba(255,255,255,.92); max-width: 36ch; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  background: rgba(255,255,255,.16); color: #fff; font-weight: 800; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px;
}
.hero-note { margin-top: 18px; font-size: .92rem; color: rgba(255,255,255,.8); }

/* App preview mock */
.preview {
  background: var(--paper); color: var(--ink);
  border-radius: 26px; box-shadow: var(--shadow); padding: 22px;
  transform: rotate(-1.4deg);
}
.preview .bar { display: flex; gap: 6px; margin-bottom: 14px; }
.preview .bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--mist); display: block; }
.preview .bar i:first-child { background: var(--lotus); }
.preview .page-title { font-weight: 800; color: var(--water); margin-bottom: 4px; }
.preview .level { font-size: .8rem; color: var(--stone); font-weight: 700; margin-bottom: 14px; }
.hanzi { font-size: 2rem; letter-spacing: .14em; line-height: 1.9; }
.hanzi span { padding: 2px 4px; border-radius: 8px; }
.hanzi .ok  { background: rgba(127,176,121,.22); color: #2f6b32; }
.hanzi .bad { background: rgba(224,128,155,.20); color: var(--lotus-deep); text-decoration: underline wavy var(--lotus-deep); }
.preview .score { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.preview .ring {
  width: 56px; height: 56px; border-radius: 50%;
  background: conic-gradient(var(--leaf) 0 86%, var(--mist) 86% 100%);
  display: grid; place-items: center; flex: 0 0 auto;
}
.preview .ring b { background: var(--paper); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; color: var(--water); }
.preview .score small { color: var(--stone); font-weight: 700; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.section-head p { color: var(--stone); font-size: 1.08rem; }

.grid { display: grid; gap: 24px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid rgba(44,94,126,.10);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .ic {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  background: var(--petal-soft); margin-bottom: 16px;
}
.card .ic svg { width: 26px; height: 26px; }
.card h3 { color: var(--ink); }
.card p { color: #4a565f; margin: 0; font-size: .98rem; }

/* alt background band */
.band { background: linear-gradient(180deg, #fff 0%, var(--petal-soft) 100%); }
.band-water { background: var(--water); color: #fff; }
.band-water h2 { color: #fff; }
.band-water p { color: rgba(255,255,255,.9); }

/* steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step .n {
  counter-increment: step; flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 50%; background: var(--water); color: #fff;
  display: grid; place-items: center; font-weight: 900; font-size: 1.2rem;
}
.step .n::before { content: counter(step); }
.step h3 { color: var(--ink); margin-bottom: .25em; }
.step p { color: #4a565f; margin: 0; }

/* platforms */
.platforms { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.platform {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--water);
  background: #fff; border: 1px solid rgba(44,94,126,.14); border-radius: 999px; padding: 12px 22px;
  box-shadow: var(--shadow-sm);
}
.platform svg { width: 22px; height: 22px; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .cta { justify-content: center; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.74); padding: 56px 0 30px; font-size: .95rem; }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: #fff; }
.footer-top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-weight: 900; font-size: 1.15rem; }
.footer-brand svg { width: 38px; height: 38px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-cols h4 { color: #fff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 12px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 8px; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center;
  color: rgba(255,255,255,.6); font-size: .88rem;
}

/* ---------- Legal pages ---------- */
.page-hero { background: linear-gradient(180deg, var(--water) 0%, var(--water-light) 100%); color: #fff; padding: 64px 0 56px; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero .crumb { color: rgba(255,255,255,.8); font-weight: 700; margin-bottom: 10px; }
.page-hero .crumb a { color: rgba(255,255,255,.85); }
.legal { padding: 56px 0 72px; }
.legal h2 { font-size: 1.3rem; color: var(--ink); margin-top: 2em; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: #36424b; font-size: 1.02rem; }
.legal ul { padding-left: 1.2em; }
.legal .updated { color: var(--stone); font-weight: 700; font-size: .95rem; margin-bottom: 2em; }
.legal .lead-quote { font-size: 1.1rem; color: var(--water); font-weight: 700; }

/* support */
.support-card { background:#fff; border:1px solid rgba(44,94,126,.12); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.support-card a.email { font-size: 1.25rem; font-weight: 800; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 64px 24px 120px; }
  .preview { transform: none; max-width: 440px; margin: 8px auto 0; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; gap: 8px; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--paper); padding: 18px 24px 24px; border-bottom: 1px solid rgba(44,94,126,.12);
  }
  .nav.open a { padding: 8px 0; }
  .nav-toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: transparent; border: 1px solid rgba(44,94,126,.2); cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--water); position: relative;
  }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after { position: absolute; top: 6px; }
}
@media (max-width: 540px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  body { font-size: 17px; }
}
