/* ===========================================================================
   安心桥 CareBridge — shared styles
   Palette: cream / sage / warm neutral. Mobile-first. System fonts only.
   =========================================================================== */

:root {
  --cream:        #FAF6EF;
  --cream-2:      #F3ECDE;
  --card:         #FFFFFF;
  --sage:         #5A7160;   /* primary, AA on cream */
  --sage-deep:    #44574A;   /* hover / dark text-on-cream */
  --sage-soft:    #E4ECE3;
  --terracotta:   #B45B3E;   /* warm accent, AA on cream */
  --ink:          #2C2A24;   /* body text */
  --ink-soft:     #57534A;   /* secondary text */
  --line:         #E3DACB;   /* hairlines */
  --gold:         #9A7B3F;   /* subtle emphasis */
  --focus:        #2C5E8A;
  --maxw:         760px;
  --radius:       14px;
  --shadow:       0 1px 2px rgba(44,42,36,.06), 0 8px 28px rgba(44,42,36,.07);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Georgia", "Songti SC", "STSong", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
           "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sage-deep); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- Skip link ---- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--sage-deep); color: #fff; padding: 10px 16px; z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---- Top bar ---- */
.topbar {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .brand-txt { min-width: 0; }
.brand b { font-size: 18px; letter-spacing: .01em; white-space: nowrap; }
.brand span { color: var(--ink-soft); font-size: 12.5px; font-weight: 500; }
.topbar .nav-cta {
  font-size: 14px; font-weight: 600; white-space: nowrap;
  color: #fff; background: var(--sage); padding: 9px 16px;
  border-radius: 999px; text-decoration: none;
}
.topbar .nav-cta:hover { background: var(--sage-deep); }

/* ---- Sections ---- */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }
:target, section[id] { scroll-margin-top: 72px; }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sage); margin: 0 0 14px;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); font-weight: 600; }
h2 { font-size: clamp(26px, 5vw, 34px); margin: 0 0 26px; }
h3 { font-size: 20px; margin: 0 0 8px; }
p { margin: 0 0 16px; }
.lead { font-size: 19px; color: var(--ink); }
.en { color: var(--ink-soft); font-style: italic; }
.muted { color: var(--ink-soft); font-size: 15px; }

/* ---- Hero ---- */
.hero { background: linear-gradient(180deg, var(--sage-soft) 0%, var(--cream) 78%); padding-top: 44px; }
.hero h1 {
  font-size: clamp(30px, 7vw, 48px);
  margin: 6px 0 6px;
}
.hero .sub {
  font-family: var(--serif); font-size: clamp(20px, 4vw, 26px);
  color: var(--sage-deep); font-weight: 600; margin: 0 0 22px;
}
.hero p { font-size: 18px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 17px; font-weight: 700;
  color: #fff; background: var(--terracotta);
  padding: 15px 28px; border-radius: 999px;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .12s ease, background .2s ease;
}
.btn:hover { background: #9a4c33; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.full { width: 100%; }
.btn.sage { background: var(--sage); }
.btn.sage:hover { background: var(--sage-deep); }
.btn-note { font-size: 14px; color: var(--ink-soft); margin-top: 10px; }

/* ---- Image placeholders ---- */
.imgph {
  position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(90,113,96,.05) 0 12px, rgba(90,113,96,.10) 12px 24px),
    var(--sage-soft);
  border: 1px dashed #9fb0a3;
  border-radius: var(--radius);
  color: var(--sage-deep);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; min-height: 200px; font-size: 13px; line-height: 1.5;
}
.imgph.hero-img { min-height: 300px; }
.imgph b { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }

/* ---- Pain list ---- */
.checklist { list-style: none; margin: 0 0 22px; padding: 0; }
.checklist li {
  position: relative; padding: 12px 0 12px 36px;
  border-bottom: 1px solid var(--line); font-size: 17px;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: 18px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--terracotta);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/14px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/14px no-repeat;
}

/* ---- Steps ---- */
.steps { display: grid; gap: 18px; margin-top: 10px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 22px 70px; position: relative; box-shadow: var(--shadow);
}
.step .num {
  position: absolute; left: 20px; top: 22px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--sage); color: #fff; font-family: var(--serif); font-size: 19px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; font-size: 16px; }

/* ---- Help / feature list ---- */
.features { display: grid; gap: 16px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.feature.core { border-color: var(--sage); background: #FCFBF7; }
.feature .tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--sage-deep); background: var(--sage-soft); padding: 2px 9px; border-radius: 999px; margin-bottom: 8px;
}
.feature h3 { font-family: var(--sans); font-size: 17px; font-weight: 700; }
.feature p { margin: 0; font-size: 16px; color: var(--ink-soft); }

/* ---- Why list ---- */
.why { display: grid; gap: 14px; }
.why .item {
  padding: 16px 18px; background: var(--card); border-left: 4px solid var(--sage);
  border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow);
}
.why .item p { margin: 0; }
.why .item strong { color: var(--sage-deep); }

/* ---- FAQ ---- */
.faq { display: grid; gap: 10px; }
details.qa {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 18px; box-shadow: var(--shadow);
}
details.qa summary {
  cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative;
  font-weight: 700; font-size: 16px; color: var(--ink);
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 24px; color: var(--sage); font-weight: 400; line-height: 1;
}
details.qa[open] summary::after { content: "\2013"; }
details.qa .a { padding: 0 0 16px; color: var(--ink-soft); font-size: 16px; }
details.qa .a p:last-child { margin-bottom: 0; }

/* ---- Form ---- */
.form-section { background: var(--cream-2); }
.formcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 24px; box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.req { color: var(--terracotta); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sage); }
.field textarea { min-height: 90px; resize: vertical; }
select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%235A7160' d='M7 10l5 5 5-5z'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--sage); }
.consent label { font-weight: 400; margin: 0; }
/* honeypot — visually + a11y hidden */
.hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; font-size: 15px; font-weight: 600; }
.form-status.err { color: var(--terracotta); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--terracotta); }
.field .err-msg { color: var(--terracotta); font-size: 13px; margin-top: 5px; display: none; }
.field.invalid .err-msg { display: block; }

/* ---- Footer ---- */
.footer { background: var(--sage-deep); color: #DDE6DC; padding: 34px 0; font-size: 14px; }
.footer a { color: #fff; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.footer .sep { opacity: .5; }

/* ---- Thanks / Privacy simple pages ---- */
.simple { padding: 72px 0; min-height: 50vh; }
.simple h1 { font-size: clamp(28px, 6vw, 40px); margin-bottom: 18px; }
.callout {
  background: var(--sage-soft); border: 1px solid #c7d6c8; border-radius: var(--radius);
  padding: 22px; margin: 24px 0;
}
.qr-ph {
  width: 180px; height: 180px; margin: 16px auto; border: 1px dashed #9fb0a3; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--sage-soft); color: var(--sage-deep); font-size: 12px; padding: 12px;
}
.prose h2 { font-size: 22px; margin: 30px 0 12px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 22px; }

/* ---- Small phones: keep the sticky bar compact ---- */
@media (max-width: 460px) {
  .topbar .wrap { min-height: 54px; gap: 10px; }
  .brand b { font-size: 16px; }
  .brand .brand-txt > span { display: none; } /* hide tagline, keep brand on one line */
  .brand .brand-txt br { display: none; }
  .topbar .nav-cta { font-size: 13px; padding: 8px 13px; }
  :target, section[id] { scroll-margin-top: 62px; }
}

/* ---- Larger screens ---- */
@media (min-width: 720px) {
  body { font-size: 18px; }
  section { padding: 72px 0; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .feature.core { grid-column: 1 / -1; }
}
