/* =========================================================
   知她 · 女性健康科普
   Design tokens — warm editorial, one accent, serif display
   ========================================================= */

:root {
  /* Surface & ink */
  --paper:      #F8F5F0;
  --paper-tint: #F1EBE2;
  --card:       #FFFFFF;
  --ink:        #1F1B16;
  --ink-soft:   #57504A;
  --muted:      #6F665C;
  --line:       #E7E0D5;
  --line-soft:  #F0EAE1;
  --line-strong:#DED2C3;

  /* Accent (berry / plum) + phase palette */
  --accent:      #A8456B;
  --accent-ink:  #853353;
  --accent-soft: #F6E8EE;
  --sage:        #5F7A63;
  --amber:       #C08A3E;
  --plum:        #6B4E7A;

  /* Type */
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "Songti TC", Georgia, "Times New Roman", serif;
  --sans:  "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1140px;
  --narrow: 720px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(31,27,22,.05), 0 4px 14px -8px rgba(31,27,22,.18);
  --shadow:    0 2px 4px rgba(31,27,22,.04), 0 18px 40px -24px rgba(31,27,22,.30);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 0 0 10px 10px;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- Shared type ---------- */
.eyebrow {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.section__title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -.01em;
  text-wrap: balance;
}
.section__lede {
  color: var(--ink-soft); max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.08rem);
}
.section__foot {
  margin-top: 32px; color: var(--muted); font-size: .86rem;
}
.section__head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 70ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 24px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: var(--card); }
.btn--sm { min-height: 38px; padding: 8px 18px; font-size: .88rem; }
.btn--lg { min-height: 54px; padding: 15px 34px; font-size: 1.02rem; }

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--paper) 94%, transparent); }
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .nav { background: rgba(248,245,240,.9); }
}

.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand__mark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.brand__name { font-family: var(--serif); font-size: 1.18rem; letter-spacing: .01em; display: flex; align-items: baseline; gap: 8px; }
.brand__sub { font-family: var(--sans); font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: .08em; }

.nav__links { margin-left: auto; display: flex; gap: 26px; }
.nav__links a {
  font-size: .92rem; color: var(--ink-soft); position: relative; padding: 4px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--accent); transition: width .22s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  background: var(--card); border-radius: 10px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__toggle span { width: 18px; height: 1.6px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.3px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.hero__copy { display: grid; gap: 20px; }
.hero__title {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 1.15; letter-spacing: -.015em;
  text-wrap: balance;
}
.hero__lede { color: var(--ink-soft); font-size: clamp(1rem, 1.9vw, 1.15rem); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero__note { color: var(--muted); font-size: .82rem; margin-top: 4px; }

/* Cycle card */
.cycle-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--shadow); display: grid; gap: 18px;
}
.cycle-card__head { display: grid; gap: 2px; justify-items: center; text-align: center; }
.cycle-card__label { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.cycle-card__value { font-family: var(--serif); font-size: 2rem; color: var(--ink); line-height: 1.1; }
.cycle-card__value strong { color: var(--accent); }
.cycle-ring { width: min(220px, 62%); margin: 0 auto; }
.cycle-ring circle { transition: stroke-width .25s ease; }
.cycle-ring:hover circle { stroke-width: 19; }
.cycle-legend { display: grid; gap: 10px; }
.cycle-legend li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-soft); }
.cycle-legend i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex: none; }
.cycle-legend span { margin-left: auto; color: var(--muted); font-size: .82rem; }
.cycle-card__foot { font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 14px; }

/* =========================================================
   Section shell
   ========================================================= */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--tint { background: var(--paper-tint); }
.section__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section__inner--narrow { max-width: var(--narrow); }

/* ---------- Topics list (editorial numbered rows) ---------- */
.topics { border-top: 1px solid var(--line); }
.topic {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 24px;
  padding: 26px 8px; border-bottom: 1px solid var(--line);
  transition: padding-left .22s ease, background .22s ease;
}
.topic:hover { padding-left: 20px; background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.topic__num {
  font-family: var(--serif); font-size: 1.35rem; color: var(--muted);
  transition: color .22s ease;
}
.topic:hover .topic__num { color: var(--accent); }
.topic__title { font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.topic__desc { color: var(--ink-soft); font-size: .94rem; margin-top: 4px; max-width: 62ch; }
.topic__tag {
  font-size: .74rem; letter-spacing: .06em; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 999px; padding: 5px 12px; white-space: nowrap;
}

/* ---------- Phases (cycle deep dive) ---------- */
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.phase { background: var(--card); padding: 28px 24px 34px; display: grid; gap: 10px; align-content: start; position: relative; }
.phase__bar { height: 4px; width: 44px; border-radius: 4px; background: var(--c); }
.phase__days { font-size: .8rem; color: var(--muted); letter-spacing: .04em; margin-top: 6px; }
.phase__title { font-family: var(--serif); font-size: 1.3rem; }
.phase__desc { color: var(--ink-soft); font-size: .92rem; line-height: 1.75; }

/* ---------- Myths ---------- */
.myths { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.myth {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 28px; display: grid; gap: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.myth:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.myth__claim {
  font-family: var(--serif); font-size: 1.18rem; color: var(--ink);
  text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px;
}
.myth__truth { color: var(--ink-soft); font-size: .95rem; position: relative; padding-left: 22px; }
.myth__truth::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--sage); font-weight: 700; font-size: .95rem;
}

/* ---------- Timeline (screening) ---------- */
.timeline { position: relative; display: grid; gap: 4px; padding-left: 4px; }
.timeline::before {
  content: ""; position: absolute; left: 11px; top: 18px; bottom: 18px; width: 2px;
  background: var(--line);
  background: linear-gradient(180deg, rgba(168,69,107,.28), rgba(168,69,107,.14));
}
.timeline__item {
  display: grid; grid-template-columns: 200px 1fr; gap: 28px;
  padding: 20px 0 20px 40px; position: relative;
}
.timeline__item::before {
  content: ""; position: absolute; left: 4px; top: 30px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--paper-tint);
}
.timeline__age { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); display: grid; gap: 2px; }
.timeline__age span { font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.timeline__body h3 { font-size: 1.02rem; margin-bottom: 4px; }
.timeline__body p { color: var(--ink-soft); font-size: .94rem; max-width: 60ch; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 22px 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-family: var(--serif); font-size: 1.12rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; font-family: var(--sans); font-size: 1.5rem; font-weight: 300;
  color: var(--accent); transition: transform .22s ease; line-height: 1;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__answer { padding: 0 4px 24px; color: var(--ink-soft); font-size: .96rem; max-width: 68ch; }

/* ---------- CTA ---------- */
.cta { padding: clamp(56px, 8vw, 96px) 0; }
.cta__inner {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter);
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius-lg); text-align: center;
  display: grid; gap: 18px; justify-items: center;
  margin-left: var(--gutter); margin-right: var(--gutter);
  max-width: calc(var(--maxw) - var(--gutter) * 2);
}
.cta__title { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.5rem); color: var(--paper); text-wrap: balance; }
.cta__text { color: #C9C2B8; max-width: 46ch; }
.cta .btn--primary { background: var(--paper); color: var(--ink); }
.cta .btn--primary:hover { background: var(--accent); color: #fff; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) 0 40px; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 36px; }
.footer__brand { display: flex; align-items: flex-start; gap: 14px; }
.footer__brand .brand__mark { width: 30px; height: 30px; margin-top: 2px; }
.footer__name { font-family: var(--serif); font-size: 1.15rem; }
.footer__tagline { color: var(--muted); font-size: .9rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.footer__nav a { font-size: .92rem; color: var(--ink-soft); }
.footer__nav a:hover { color: var(--accent); }
.footer__disclaimer {
  background: var(--paper-tint); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; display: grid; gap: 6px; max-width: 88ch;
}
.footer__disclaimer strong { font-size: .86rem; color: var(--accent-ink); letter-spacing: .04em; }
.footer__disclaimer p { font-size: .86rem; color: var(--ink-soft); }
.footer__copy { color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line-soft); padding-top: 24px; }

/* =========================================================
   Motion — subtle reveal, disabled for reduced motion / no-JS
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .cycle-card { max-width: 460px; }
  .phases { grid-template-columns: 1fr 1fr; }
  .myths { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 1rem; }
  .nav__links a::after { display: none; }
  .nav__toggle { display: flex; margin-left: auto; }
  .nav__actions .btn--ghost { display: none; }

  .topic { grid-template-columns: 40px 1fr; gap: 16px; padding: 22px 4px; align-items: start; }
  .topic__tag { display: none; }
  .topic:hover { padding-left: 4px; }

  .timeline__item { grid-template-columns: 1fr; gap: 6px; padding-left: 36px; }
  .timeline::before { left: 9px; }
  .timeline__item::before { left: 2px; top: 26px; }
}

@media (max-width: 520px) {
  .phases { grid-template-columns: 1fr; }
  .brand__sub { display: none; }
  .cta__inner { border-radius: var(--radius); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}

/* Print */
@media print {
  .nav, .cta, .skip-link { display: none; }
  body { background: #fff; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
