/* ===== 享森活 Sleep Health — shared design system ===== */
:root {
  --sage: #7d9a7e;
  --sage-dark: #5e7a60;
  --sage-light: #aebfa6;
  --sage-soft: #e8efe4;
  --warm: #c9a07a;
  --warm-dark: #a87f57;
  --cream: #faf6ef;
  --cream-2: #f3ece0;
  --ink: #3a3a34;
  --muted: #6f6f64;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(94, 122, 96, .12);
  --shadow-sm: 0 4px 14px rgba(94, 122, 96, .10);
  --container: 1140px;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --pad-x: clamp(1.2rem, 5vw, 3rem);
  --font: "Helvetica Neue", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; font-weight: 700; color: var(--ink); }

/* ---- layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tinted { background: var(--sage-soft); }
.section-warm { background: var(--cream-2); }
.eyebrow {
  display: inline-block;
  color: var(--sage-dark);
  font-weight: 700;
  letter-spacing: .15em;
  font-size: .8rem;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.section-head { max-width: 640px; margin-inline: auto; text-align: center; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.section-head p { color: var(--muted); margin-top: .8rem; }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  padding: .75em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--sage); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--sage-dark); transform: translateY(-2px); }
.btn-warm { background: var(--warm); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-warm:hover { background: var(--warm-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--sage); color: var(--sage-dark); }
.btn-ghost:hover { background: var(--sage); color: var(--white); }

/* ---- header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(125, 154, 126, .18);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .9rem;
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.25rem; color: var(--sage-dark); }
.brand .leaf { width: 30px; height: 30px; background: var(--sage); border-radius: 50% 50% 50% 0; transform: rotate(45deg); display: inline-block; }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); list-style: none; }
.nav-links a { color: var(--ink); font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--sage-dark); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--sage-dark); cursor: pointer; }

/* ---- hero ---- */
.hero {
  position: relative;
  min-height: clamp(420px, 70vh, 620px);
  display: flex; align-items: center;
  color: var(--white);
  background: linear-gradient(120deg, rgba(58,58,52,.55), rgba(94,122,96,.35)), var(--cream-2) center/cover no-repeat;
}
.hero .container { padding-block: clamp(3rem, 8vw, 5rem); }
.hero-inner { max-width: 620px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); color: var(--white); }
.hero p { font-size: clamp(1rem, 2.2vw, 1.2rem); margin-top: 1rem; color: rgba(255,255,255,.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* page banner (sub pages) */
.page-banner {
  color: var(--white); text-align: center;
  background: linear-gradient(120deg, rgba(58,58,52,.5), rgba(94,122,96,.35)), var(--sage) center/cover no-repeat;
  padding-block: clamp(3rem, 8vw, 5rem);
}
.page-banner h1 { color: var(--white); font-size: clamp(1.8rem, 5vw, 2.8rem); }
.page-banner p { color: rgba(255,255,255,.9); margin-top: .6rem; }

/* ---- grid cards ---- */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 4/3; background: var(--sage-soft) center/cover no-repeat; }
.card-body { padding: 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body h3 { font-size: 1.2rem; }
.card-body p { color: var(--muted); font-size: .95rem; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: .6rem; }
.price { font-weight: 800; color: var(--warm-dark); font-size: 1.15rem; }

/* feature icon blocks */
.feature { text-align: center; padding: 1.5rem; }
.feature .ico {
  width: 64px; height: 64px; margin: 0 auto 1rem;
  border-radius: 50%; background: var(--sage-soft); color: var(--sage-dark);
  display: grid; place-items: center; font-size: 1.7rem;
}
.feature h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.feature p { color: var(--muted); font-size: .95rem; }

/* split media + text */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin-bottom: 1rem; }
.split p { color: var(--muted); margin-bottom: 1rem; }
.split ul { list-style: none; display: grid; gap: .6rem; }
.split ul li { padding-left: 1.6rem; position: relative; color: var(--ink); }
.split ul li::before { content: "✓"; position: absolute; left: 0; color: var(--sage); font-weight: 800; }

/* store list */
.store-list { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.store-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.store-card .card-body { gap: .35rem; }
.store-card .meta { display: flex; gap: .5rem; align-items: flex-start; color: var(--muted); font-size: .92rem; }
.store-card .meta strong { color: var(--sage-dark); min-width: 3.2em; }

/* forms */
.form-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 2.5rem); max-width: 720px; margin-inline: auto; }
.form-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; padding: .7em .9em;
  border: 1.5px solid var(--sage-light); border-radius: var(--radius-sm);
  background: var(--cream); color: var(--ink); transition: border .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(125,154,126,.18);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { color: var(--muted); font-size: .88rem; margin-top: 1rem; text-align: center; }

/* steps */
.steps { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: step; }
.step { text-align: center; padding: 1.2rem; }
.step .num {
  counter-increment: step; width: 54px; height: 54px; margin: 0 auto .9rem;
  border-radius: 50%; background: var(--warm); color: var(--white);
  display: grid; place-items: center; font-weight: 800; font-size: 1.3rem;
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .92rem; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--sage), var(--sage-dark)); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); font-size: clamp(1.6rem, 4vw, 2.3rem); }
.cta-band p { color: rgba(255,255,255,.9); margin: .8rem auto 1.8rem; max-width: 540px; }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.footer-grid { display: grid; gap: var(--gap); grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h4 { color: var(--white); margin-bottom: 1rem; font-size: 1.05rem; }
.site-footer .brand { color: var(--white); margin-bottom: .8rem; }
.site-footer ul { list-style: none; display: grid; gap: .5rem; }
.site-footer a:hover { color: var(--sage-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2.5rem; padding-top: 1.3rem; text-align: center; font-size: .85rem; color: rgba(255,255,255,.6); }

/* ---- responsive ---- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid rgba(125,154,126,.2);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 340px; }
  .nav-links li { border-top: 1px solid rgba(125,154,126,.12); }
  .nav-links a { display: block; padding: .9rem var(--pad-x); }
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: -1; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
