/* ==========================================================================
   久悦星·祥视明 | 视力健康养护 单页
   Mobile-first · soft light blue + warm cream · clean & calm
   ========================================================================== */

:root {
  --blue-50:  #eef6fb;
  --blue-100: #e0eef7;
  --blue-200: #cbe2f0;
  --blue-300: #a9cfe3;
  --blue-500: #5a9bc4;
  --blue-600: #3f7fa8;
  --cream:    #faf7f1;
  --cream-2:  #f4efe6;
  --ink:      #26333a;
  --ink-soft: #5c6b73;
  --ink-light:#8a979e;
  --warm:     #e5b98f;
  --warm-deep:#d09a63;
  --white:    #ffffff;
  --line:     #e3edf3;
  --shadow:   0 14px 40px -22px rgba(70,100,120,.4);
  --radius:   18px;

  --sans: "Noto Sans SC", -apple-system, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
  padding-bottom: 76px; /* for sticky bar */
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-size: 1rem; font-weight: 500; letter-spacing: .02em; text-align: center;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  min-height: 52px; /* thumb friendly */
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: #fff; box-shadow: 0 10px 24px -12px rgba(63,127,168,.7);
}
.btn-outline {
  background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.75); color: #fff;
  backdrop-filter: blur(4px);
}
.btn-outline-dark { background: var(--white); border-color: var(--blue-200); color: var(--blue-600); }
.btn.full { width: 100%; }

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; gap: 12px;
  background: rgba(250,247,241,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; flex-direction: column; line-height: 1.25; }
.brand .logo { font-size: 1.02rem; font-weight: 700; color: var(--blue-600); letter-spacing: .02em; }
.brand .logo .dot { color: var(--warm-deep); margin: 0 1px; }
.brand .tagline { font-size: .62rem; color: var(--ink-light); letter-spacing: .04em; font-weight: 400; }
.topbar-btn {
  flex: 0 0 auto; padding: 9px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: #fff; font-size: .84rem; font-weight: 500; white-space: nowrap;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; min-height: 92svh; display: flex; align-items: flex-end;
  overflow: hidden; color: #fff; padding-top: 64px;
}
.hero-media { position: absolute; inset: 0; z-index: 0; background: var(--blue-100); }
.hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(30,55,70,.25) 0%, rgba(30,55,70,.1) 38%, rgba(24,45,58,.78) 100%);
}
.video-toggle {
  position: absolute; z-index: 3; right: 14px; bottom: 200px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.24); border: 1px solid rgba(255,255,255,.5);
  color: #fff; backdrop-filter: blur(6px);
}
.video-toggle svg { width: 17px; height: 17px; }
.video-toggle .ico-play { display: none; }
.video-toggle.paused .ico-play { display: block; }
.video-toggle.paused .ico-pause { display: none; }

.hero-content { position: relative; z-index: 2; padding: 0 22px 54px; max-width: 720px; margin: 0 auto; width: 100%; }
.hero-eyebrow {
  display: inline-block; font-size: .76rem; letter-spacing: .16em;
  color: #ffe6cc; margin-bottom: 14px;
  background: rgba(255,255,255,.16); padding: 5px 14px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: clamp(2.3rem, 9vw, 3.4rem); font-weight: 700; line-height: 1.2;
  letter-spacing: .02em; text-shadow: 0 4px 24px rgba(0,0,0,.28);
}
.hero-sub {
  margin-top: 16px; font-size: 1rem; font-weight: 300; line-height: 1.85;
  color: rgba(255,255,255,.94); text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.hero-actions { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.hero-note { margin-top: 16px; font-size: .8rem; color: rgba(255,255,255,.8); letter-spacing: .03em; }

/* ==========================================================================
   SECTION COMMON
   ========================================================================== */
section { padding: 56px 0; }
.section-eyebrow {
  font-size: .78rem; letter-spacing: .2em; color: var(--blue-500);
  font-weight: 500; margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.5rem, 5.5vw, 2rem); font-weight: 700; line-height: 1.35;
  color: var(--ink); letter-spacing: .01em;
}
.section-lead { margin-top: 14px; font-size: .96rem; color: var(--ink-soft); }

/* ==========================================================================
   STORY
   ========================================================================== */
.story { background: var(--cream); }
.story-img { margin: 26px 0 22px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.story-img img { width: 100%; height: 240px; object-fit: cover; }
.story-text p { font-size: .98rem; color: var(--ink-soft); line-height: 1.9; margin-bottom: 16px; }
.story-text p:last-of-type { margin-bottom: 0; }
.story-sign { margin-top: 20px; font-size: 1rem; color: var(--blue-600); font-weight: 500; text-align: right; }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services { background: var(--blue-50); }
.service-list { margin-top: 28px; display: grid; gap: 14px; }
.service-card {
  background: var(--white); border-radius: var(--radius); padding: 22px 20px;
  box-shadow: 0 8px 26px -20px rgba(70,100,120,.5);
  border: 1px solid var(--line);
}
.service-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.service-head h3 { font-size: 1.06rem; font-weight: 600; color: var(--ink); }
.service-free {
  flex: 0 0 auto; font-size: .72rem; font-weight: 500; color: #fff;
  background: var(--warm-deep); padding: 3px 10px; border-radius: 999px;
}
.service-tag {
  flex: 0 0 auto; font-size: .72rem; font-weight: 500; color: var(--blue-600);
  background: var(--blue-100); padding: 3px 10px; border-radius: 999px;
}
.service-card p { font-size: .92rem; color: var(--ink-soft); line-height: 1.8; }

/* packages */
.packages { margin-top: 30px; display: grid; gap: 18px; }
.package {
  border-radius: var(--radius); padding: 28px 24px; position: relative;
  box-shadow: var(--shadow);
}
.package-entry { background: var(--white); border: 2px solid var(--blue-200); }
.package-long { background: linear-gradient(160deg, var(--blue-600), #356b8f); color: #fff; }
.pkg-badge {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  padding: 5px 13px; border-radius: 999px; margin-bottom: 16px;
  background: var(--warm); color: #fff;
}
.badge-soft { background: rgba(255,255,255,.2); color: #fff; }
.package h3 { font-size: 1.2rem; font-weight: 700; }
.pkg-price { margin: 10px 0 18px; font-size: 2rem; font-weight: 700; color: var(--blue-600); line-height: 1; }
.package-long .pkg-price { color: #ffe6cc; font-size: 1.4rem; }
.pkg-price small { font-size: .8rem; font-weight: 400; color: var(--ink-light); }
.package-long .pkg-price small { color: rgba(255,255,255,.72); }
.package ul { list-style: none; margin-bottom: 22px; }
.package li {
  position: relative; padding-left: 26px; font-size: .92rem; margin-bottom: 10px; line-height: 1.6;
}
.package li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--blue-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%233f7fa8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4 9-9'/%3E%3C/svg%3E") center/11px no-repeat;
}
.package-long li::before {
  background: rgba(255,255,255,.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23ffe6cc' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4 9-9'/%3E%3C/svg%3E") center/11px no-repeat;
}
.package-long li { color: rgba(255,255,255,.94); }
.compliance-note {
  margin-top: 22px; font-size: .76rem; color: var(--ink-light);
  line-height: 1.7; padding: 12px 14px; background: rgba(255,255,255,.6);
  border-radius: 12px; border-left: 3px solid var(--blue-300);
}

/* ==========================================================================
   CASES
   ========================================================================== */
.cases { background: var(--cream); }
.case-grid { margin-top: 26px; display: grid; gap: 14px; }
.case-card {
  background: var(--white); border-radius: var(--radius); padding: 22px 22px;
  box-shadow: 0 8px 26px -20px rgba(70,100,120,.5); border: 1px solid var(--line);
  position: relative;
}
.case-card::before {
  content: "\201C"; font-family: Georgia, serif; font-size: 3rem; line-height: 1;
  color: var(--blue-200); position: absolute; top: 8px; right: 20px;
}
.case-card p { font-size: .94rem; color: var(--ink-soft); line-height: 1.85; }
.case-card footer { margin-top: 14px; font-size: .8rem; color: var(--blue-500); font-weight: 500; }
.case-note { margin-top: 18px; font-size: .76rem; color: var(--ink-light); text-align: center; }

/* ==========================================================================
   VISIT
   ========================================================================== */
.visit { background: var(--blue-50); }
.visit-card {
  margin-top: 26px; background: var(--white); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.visit-list { list-style: none; display: grid; gap: 18px; }
.visit-list li { display: flex; gap: 14px; align-items: flex-start; }
.v-ico {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--blue-100); color: var(--blue-600);
}
.v-ico svg { width: 20px; height: 20px; }
.v-label { display: block; font-size: .74rem; color: var(--ink-light); letter-spacing: .04em; }
.v-value { display: block; font-size: .96rem; color: var(--ink); font-weight: 500; margin-top: 2px; line-height: 1.5; }
.v-link { color: var(--blue-600); }
.visit-actions { margin-top: 24px; display: grid; gap: 12px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.foot { background: var(--ink); color: rgba(255,255,255,.72); padding: 44px 0 40px; text-align: center; }
.foot-brand { font-size: 1.15rem; font-weight: 700; color: #fff; letter-spacing: .04em; }
.foot-slogan { margin-top: 8px; font-size: .88rem; color: rgba(255,255,255,.8); }
.foot-disclaimer {
  margin-top: 18px; font-size: .74rem; line-height: 1.8; color: rgba(255,255,255,.5);
  max-width: 560px; margin-left: auto; margin-right: auto;
}
.foot-copy { margin-top: 18px; font-size: .74rem; color: rgba(255,255,255,.4); }

/* ==========================================================================
   STICKY BAR
   ========================================================================== */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px -14px rgba(70,100,120,.4);
}
.sticky-info { display: flex; flex-direction: column; line-height: 1.3; }
.sticky-title { font-size: .95rem; font-weight: 700; color: var(--ink); }
.sticky-sub { font-size: .72rem; color: var(--warm-deep); font-weight: 500; }
.sticky-bar .btn { flex: 0 0 auto; padding: 12px 22px; min-height: 46px; font-size: .92rem; }

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.modal.open { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(30,45,58,.5); backdrop-filter: blur(4px); }
.modal-box {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: var(--cream); border-radius: 22px; padding: 30px 24px 24px;
  box-shadow: 0 30px 80px -30px rgba(20,40,50,.6);
  animation: popIn .35s var(--ease);
  max-height: 92svh; overflow-y: auto;
}
@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border-radius: 50%; border: 0; background: var(--blue-100); color: var(--blue-600);
  display: grid; place-items: center;
}
.modal-close svg { width: 17px; height: 17px; }
.modal-title { font-size: 1.24rem; font-weight: 700; color: var(--ink); padding-right: 30px; }
.modal-sub { margin-top: 8px; font-size: .88rem; color: var(--ink-soft); }

#bookForm { margin-top: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .86rem; color: var(--ink-soft); margin-bottom: 7px; font-weight: 500; }
.field input {
  width: 100%; padding: 13px 15px; font-family: var(--sans); font-size: 1rem;
  color: var(--ink); background: var(--white); border: 1.5px solid var(--blue-200);
  border-radius: 12px; transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field input::placeholder { color: #b3bec4; }
.field input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(90,155,196,.18); }
#bookForm .btn { margin-top: 6px; }
.form-note { margin-top: 14px; font-size: .88rem; min-height: 1.2em; text-align: center; }
.form-note.ok { color: #3f8a5c; }
.form-note.err { color: #c0554a; }
.modal-privacy { margin-top: 14px; font-size: .74rem; color: var(--ink-light); text-align: center; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  z-index: 70; background: var(--ink); color: #fff; font-size: .9rem;
  padding: 12px 22px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  box-shadow: 0 12px 30px -14px rgba(0,0,0,.5); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   DESKTOP ENHANCE (mobile-first; scale up gracefully)
   ========================================================================== */
@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
  section { padding: 84px 0; }
  .hero { min-height: 88svh; align-items: center; }
  .hero-content { padding-bottom: 0; }
  .video-toggle { bottom: auto; top: 90px; }
  .hero-actions { flex-direction: row; }
  .hero-sub br { display: none; }
  .story-img img { height: 320px; }
  .service-list { grid-template-columns: 1fr 1fr; }
  .packages { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .case-grid { grid-template-columns: 1fr 1fr; }
  .case-grid .case-card:first-child { grid-column: 1 / -1; }
  .visit-actions { grid-template-columns: 1fr 1fr; }
  .sticky-bar { display: none; }
  body { padding-bottom: 0; }
}

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

.v-hint { display: block; font-size: .74rem; color: var(--ink-light); margin-top: 3px; }

/* ==========================================================================
   MUSIC TOGGLE
   ========================================================================== */
.music-toggle {
  position: fixed; left: 14px; bottom: 84px; z-index: 45;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.9); border: 1px solid var(--blue-200);
  color: var(--blue-600); box-shadow: 0 8px 22px -12px rgba(70,100,120,.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.music-toggle:active { transform: scale(.94); }
.music-toggle svg { width: 20px; height: 20px; }
.music-toggle .ico-off { display: none; }
.music-toggle.muted .ico-on { display: none; }
.music-toggle.muted .ico-off { display: block; }
.music-toggle.playing { color: var(--warm-deep); border-color: var(--warm); }
.music-toggle.playing svg { animation: musicBob 1.5s ease-in-out infinite; }
@keyframes musicBob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-2px)} }

@media (min-width: 720px) {
  .music-toggle { left: 24px; bottom: 24px; width: 46px; height: 46px; }
}

/* ==========================================================================
   WECHAT QR
   ========================================================================== */
.wechat-block {
  margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 18px;
}
.qr-figure {
  flex: 0 0 120px; width: 120px; height: 120px; border-radius: 12px;
  overflow: hidden; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 6px 18px -12px rgba(70,100,120,.5);
}
.qr-figure img { width: 100%; height: 100%; object-fit: contain; }
.qr-title { font-size: 1rem; font-weight: 700; color: var(--blue-600); }
.qr-sub { font-size: .84rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.6; }

.modal-qr {
  margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line);
  text-align: center;
}
.modal-qr-label { display: block; font-size: .82rem; color: var(--ink-soft); margin-bottom: 12px; }
.modal-qr img {
  width: 150px; height: 150px; object-fit: contain; margin: 0 auto;
  border-radius: 10px; background: #fff; border: 1px solid var(--line);
}
