/* ==========================================================================
   心語 · 情感心理諮詢 | HeartWords Counseling
   Warm, calm, healing. Cream + misty blue + soft gold.
   ========================================================================== */

:root {
  --cream:      #f7f2ea;
  --cream-2:    #efe7db;
  --ink:        #2c2a28;
  --ink-soft:   #5c5751;
  --mist:       #7d97a3;
  --mist-deep:  #4f6b78;
  --gold:       #b99a6b;
  --rose:       #c98b7d;
  --line:       #e2d8c9;
  --white:      #fffdf9;
  --shadow:     0 24px 60px -30px rgba(60,50,40,.4);

  --serif: "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "Noto Sans SC", -apple-system, "Helvetica Neue", Arial, sans-serif;

  --maxw: 1160px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.8;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }

/* ==========================================================================
   MUSIC TOGGLE
   ========================================================================== */
.topbar-tools { display: flex; align-items: center; gap: 10px; }
.music-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px;
  background: rgba(255,253,249,.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  color: var(--mist-deep); cursor: pointer;
  font-family: var(--sans); font-size: .76rem; letter-spacing: .08em;
  transition: all .3s var(--ease);
  box-shadow: 0 8px 24px -14px rgba(60,50,40,.4);
}
.music-toggle:hover { transform: translateY(-2px); border-color: var(--gold); }
.music-toggle svg { width: 17px; height: 17px; }
.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(--gold); }
.music-toggle.playing svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-2px)} }

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  transition: background .4s var(--ease), border-color .4s var(--ease), padding .4s var(--ease);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(30,24,20,.42), rgba(30,24,20,0));
}
.topbar .brand .mark { color: var(--white); }
.topbar .navlinks a { color: rgba(255,253,249,.92); }
.topbar.scrolled .brand .mark { color: var(--ink); }
.topbar.scrolled .navlinks a { color: var(--ink-soft); }
.topbar.scrolled {
  background: rgba(247,242,234,.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding: 11px 28px;
}
.brand .mark {
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem;
  letter-spacing: .12em; color: var(--ink);
  display: flex; align-items: baseline; gap: 9px;
}
.brand .mark small {
  font-family: var(--sans); font-size: .56rem; letter-spacing: .34em;
  color: var(--gold); font-weight: 400;
}
.navlinks { display: flex; gap: 28px; align-items: center; }
.navlinks a {
  font-size: .84rem; letter-spacing: .06em; color: var(--ink-soft);
  position: relative; padding: 4px 0; transition: color .3s var(--ease);
}
.navlinks a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px;
  background: var(--rose); transition: width .35s var(--ease);
}
.navlinks a:hover { color: var(--rose); }
.navlinks a:hover::after { width: 100%; }
.menutoggle { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); }

@media (max-width: 900px) {
  .navlinks {
    position: fixed; top: 62px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--cream);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .4s var(--ease);
  }
  .navlinks.open { max-height: 400px; }
  .navlinks a { padding: 15px 28px; width: 100%; border-bottom: 1px solid var(--line); }
  .menutoggle { display: block; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  color: var(--white);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video {
  width: 100%; height: 100%; object-fit: cover;
  /* portrait video: keep subject centered, fill with blur */
  filter: saturate(.92) brightness(.92);
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(40,32,26,.18), rgba(40,32,26,.62) 78%),
    linear-gradient(180deg, rgba(40,32,26,.42) 0%, rgba(40,32,26,.28) 40%, rgba(40,32,26,.72) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 0 24px; max-width: 760px; }
.hero-kicker {
  font-size: .74rem; letter-spacing: .5em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 26px;
  opacity: 0; animation: rise .9s var(--ease) .2s forwards;
}
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.18;
  letter-spacing: .04em; text-shadow: 0 6px 40px rgba(0,0,0,.3);
  opacity: 0; animation: rise 1s var(--ease) .35s forwards;
}
.hero-sub {
  margin: 26px auto 0; max-width: 40ch;
  font-size: clamp(.95rem, 1.6vw, 1.1rem); font-weight: 300;
  color: rgba(255,253,249,.9); line-height: 1.9;
  opacity: 0; animation: rise 1s var(--ease) .5s forwards;
}
.hero-cta {
  margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  opacity: 0; animation: rise 1s var(--ease) .65s forwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border-radius: 999px;
  font-family: var(--sans); font-size: .86rem; letter-spacing: .06em; font-weight: 400;
  border: 1px solid transparent; cursor: pointer;
  transition: all .3s var(--ease);
}
.btn.primary { background: var(--rose); color: #fff; }
.btn.primary:hover { background: #b97a6c; transform: translateY(-2px); box-shadow: 0 16px 34px -16px rgba(201,139,125,.8); }
.btn.ghost { border-color: rgba(255,253,249,.55); color: var(--white); }
.btn.ghost:hover { background: rgba(255,253,249,.14); transform: translateY(-2px); }
.btn.full { width: 100%; }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2; width: 1px; height: 46px;
  background: linear-gradient(rgba(255,253,249,.7), transparent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 0%,100%{opacity:.3} 50%{opacity:1} }

/* ==========================================================================
   SECTION SHELL
   ========================================================================== */
.sec { padding: 110px 0; position: relative; }
.sec.alt { background: var(--cream-2); }
.sec-head { max-width: 720px; margin-bottom: 56px; }
.eyebrow {
  display: inline-block; font-size: .74rem; letter-spacing: .34em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 18px;
}
.sec-head h2, .counselor-copy h2, .book-copy h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.35;
  color: var(--ink); letter-spacing: .02em;
}
.sec-head p { margin-top: 20px; font-size: 1.02rem; color: var(--ink-soft); max-width: 60ch; }

/* ==========================================================================
   EMPATHY
   ========================================================================== */
.empathy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 860px) { .empathy-grid { grid-template-columns: 1fr; } }
.empathy-card {
  background: var(--white); padding: 38px 32px;
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.empathy-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.e-ico {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 22px;
  background: rgba(125,151,163,.12); color: var(--mist-deep);
}
.e-ico svg { width: 26px; height: 26px; }
.empathy-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.24rem; margin-bottom: 12px; }
.empathy-card p { font-size: .95rem; color: var(--ink-soft); }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.service-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .service-list { grid-template-columns: 1fr; } }
.service {
  display: flex; gap: 24px; padding: 34px 30px;
  border-bottom: 1px solid var(--line);
  transition: background .35s var(--ease);
}
.service:nth-child(odd) { border-right: 1px solid var(--line); }
@media (max-width: 760px) { .service:nth-child(odd) { border-right: 0; } }
.service:hover { background: rgba(255,253,249,.6); }
.s-num {
  font-family: var(--serif); font-size: 1.5rem; color: var(--gold);
  line-height: 1; flex: 0 0 auto; padding-top: 4px;
}
.service h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin-bottom: 8px; }
.service p { font-size: .95rem; color: var(--ink-soft); }

/* ==========================================================================
   COUNSELOR
   ========================================================================== */
.counselor-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: center; }
@media (max-width: 860px) { .counselor-grid { grid-template-columns: 1fr; gap: 40px; } }
.counselor-figure img {
  width: 100%; height: 560px; object-fit: cover; object-position: center top;
  box-shadow: var(--shadow);
}
@media (max-width: 860px) { .counselor-figure img { height: 420px; } }
.counselor-copy p { margin-top: 18px; font-size: 1rem; color: var(--ink-soft); }
.cred-list { list-style: none; margin-top: 26px; }
.cred-list li {
  position: relative; padding-left: 26px; margin-bottom: 12px;
  font-size: .96rem; color: var(--ink);
}
.cred-list li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--rose);
}
.disclaimer {
  margin-top: 26px; font-size: .8rem; color: #9a938a;
  border-left: 2px solid var(--line); padding-left: 14px; line-height: 1.7;
}

/* ==========================================================================
   VOICES
   ========================================================================== */
.voice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 860px) { .voice-grid { grid-template-columns: 1fr; } }
.voice {
  background: var(--white); padding: 36px 32px; border: 1px solid var(--line);
  position: relative;
}
.voice::before {
  content: "\201C"; font-family: var(--serif); font-size: 4rem; line-height: 1;
  color: var(--rose); opacity: .35; position: absolute; top: 14px; left: 24px;
}
.voice p {
  font-family: var(--serif); font-size: 1.05rem; line-height: 1.9;
  color: var(--ink); position: relative; z-index: 1; padding-top: 20px;
}
.voice footer { margin-top: 20px; font-size: .82rem; letter-spacing: .06em; color: var(--mist-deep); }

/* ==========================================================================
   BOOK
   ========================================================================== */
.book { background: var(--mist-deep); color: var(--white); }
.book .eyebrow { color: var(--gold); }
.book-copy h2 { color: var(--white); }
.book-copy p { margin-top: 18px; color: rgba(255,253,249,.82); font-size: 1rem; max-width: 46ch; }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
@media (max-width: 860px) { .book-grid { grid-template-columns: 1fr; gap: 40px; } }
.contact-lines { margin-top: 34px; display: grid; gap: 16px; }
.cline { display: flex; align-items: center; gap: 14px; font-size: .95rem; color: rgba(255,253,249,.9); }
.cline svg { width: 20px; height: 20px; color: var(--gold); flex: 0 0 auto; }

.book-form {
  background: var(--white); padding: 38px 34px; color: var(--ink);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: .84rem; letter-spacing: .04em;
  color: var(--ink-soft); margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  font-family: var(--sans); font-size: .95rem; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 6px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: #a8a199; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--mist); box-shadow: 0 0 0 3px rgba(125,151,163,.16);
}
.field textarea { resize: vertical; }
.form-note { margin-top: 16px; font-size: .88rem; min-height: 1.2em; }
.form-note.ok { color: #4f7a5c; }
.form-note.err { color: #b5564a; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.foot { background: #26221f; color: rgba(255,253,249,.7); padding: 56px 0 40px; }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.foot-brand { font-family: var(--serif); font-size: 1.4rem; letter-spacing: .1em; color: var(--white); }
.foot-brand span { color: var(--gold); }
.foot p { font-size: .9rem; margin-top: 10px; }
.foot-note {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,253,249,.14);
  font-size: .78rem; color: rgba(255,253,249,.5); line-height: 1.8;
}

/* ==========================================================================
   REVEAL
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

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