/* ============================================================
   LYLA MEDICAL — Dr Pang Suet Ying, Sherby
   Palette drawn from the practice name card:
   caramel #936122 · cream #EAE2D7 · gold #CBC19D · espresso ink
   ============================================================ */

:root {
  --caramel: #936122;
  --caramel-deep: #7A4F1A;
  --caramel-soft: #B08449;
  --gold: #CBC19D;
  --gold-line: #D9CFAF;
  --cream: #F7F2EA;
  --cream-deep: #EAE2D7;
  --ink: #2B2117;
  --ink-soft: #5C4F3F;
  --white: #FFFFFF;
  /* Poppins matches the rounded geometric sans on the practice name card;
     --serif kept as the "display" slot so existing rules stay untouched */
  --serif: "Poppins", "Noto Sans TC", sans-serif;
  --sans: "Poppins", "Noto Sans TC", sans-serif;
  --shadow-soft: 0 18px 50px rgba(72, 48, 16, 0.10);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--caramel); text-decoration: none; }

.container {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

/* ---------- type ---------- */
h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 1.1rem;
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 1.2rem;
}


.section-lead {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 0.9rem 0;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

/* Blur lives on a pseudo-element: backdrop-filter on the header itself
   would make iOS Safari clip the fixed mobile-menu overlay into the bar. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 242, 234, 0);
  transition: background 0.35s ease;
}

.site-header.scrolled::before {
  background: rgba(247, 242, 234, 0.92);
  backdrop-filter: blur(14px);
}

.site-header.scrolled {
  box-shadow: 0 1px 0 rgba(147, 97, 34, 0.14);
  padding: 0.55rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand img { height: 52px; width: auto; transition: height 0.35s ease; }
.site-header.scrolled .brand img { height: 42px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding: 0.2rem 0;
}

.nav-links li:not(.lang-li) a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--caramel);
  transition: right 0.3s ease;
}

.nav-links li:not(.lang-li) a:hover::after { right: 0; }

.lang-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--caramel);
  border-radius: 999px;
  overflow: hidden;
  white-space: nowrap;
}

.lang-group a {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  padding: 0.34rem 0.85rem;
  color: var(--caramel);
  text-transform: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.lang-group a + a { border-left: 1px solid rgba(147, 97, 34, 0.35); }

.lang-group a.active { background: var(--caramel); color: var(--white); }

.lang-group a:not(.active):hover { background: rgba(147, 97, 34, 0.10); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 90% 65% at 85% 10%, rgba(203, 193, 157, 0.28), transparent 60%),
    linear-gradient(168deg, #FBF8F2 0%, var(--cream) 45%, var(--cream-deep) 100%);
  overflow: hidden;
  padding: 8rem 0 5rem;
}

/* Soft mark on the right, clear of the headline (no overlap with the words),
   a touch smaller. Vertically centred; float keyframes preserve the same
   translateY(-50%) so it's centred from frame 0 (no jump). */
.hero-motif {
  display: block;
  position: absolute;
  right: 8vw;
  top: 50%;
  width: min(38vw, 520px);
  aspect-ratio: 649 / 636;
  z-index: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-motif img {
  width: 100%;
  height: auto;
  display: block;
  /* Moonrise (Derek, 2026-09-23; replaces the July focus-in): the mark rises
     gently into place, then holds perfectly still — no float afterwards */
  opacity: 0;
  transform: translateY(34px);
  filter: blur(6px);
  animation: motifIn 3.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.45s forwards;
}

@keyframes motifIn {
  to { opacity: 0.5; transform: none; filter: none; }
}

/* Dusk: a warm light that belongs to the moon. It lives on the mark's own box
   and rises on exactly the moon's timing, so there is never dusk without a moon. */
.hero-motif { isolation: isolate; }
.hero-motif::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  left: -45%; right: -45%; top: -42%; bottom: -42%;
  background: radial-gradient(closest-side at 62% 52%, rgba(232, 198, 168, 0.82), rgba(236, 212, 190, 0.45) 48%, rgba(240, 226, 210, 0.15) 72%, transparent 100%);
  opacity: 0;
  animation: duskRise 3.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.45s forwards;
}

@keyframes duskRise {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: none; }
}

/* Twinkling stars (js/main.js places them): one upright four-point shape,
   warm luminous gold, never on the logo's lines or over the words. They fade
   in just after the moon starts to rise. */
.hero-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation: starsIn 3s ease 1s forwards;
}

@keyframes starsIn { to { opacity: 1; } }

/* star-map lines: BELOW the logo (z 0, earlier in the page than the logo) and
   below the words (z 2); main.js also cuts them out along the moon's lines */
.hero-constellation { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.hero-star {
  position: absolute;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  color: #DDB463; /* 2026-09-23: "slightly darker" than the first #F1D593 */
  filter: drop-shadow(0 0 calc(var(--s) * 0.3) rgba(255, 240, 204, 0.9)) drop-shadow(0 0 calc(var(--s) * 0.55) rgba(212, 164, 78, 0.75));
  opacity: 0.08;
  transform: scale(0.45);
  animation: starTwinkle var(--d) ease-in-out var(--delay) infinite;
  /* the cursor pull (main.js) uses `translate`, separate from the twinkle's transform */
  transition: translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-star svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* starts and ends fully faded out: at that moment main.js moves the star to
   a new random spot, so the sky keeps changing without anything jumping */
@keyframes starTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.45); }
  50% { opacity: var(--o); transform: scale(1); }
}

/* Hero entrance sequence */
.hero .eyebrow,
.hero h1,
.hero .hero-sub,
.hero .hero-ctas {
  opacity: 0;
  animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero h1 { animation-delay: 0.18s; }
.hero .hero-sub { animation-delay: 0.38s; }
.hero .hero-ctas { animation-delay: 0.56s; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.hero-inner { position: relative; z-index: 2; max-width: 640px; }

.hero .eyebrow { margin-bottom: 1.4rem; }

.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hero .hero-zh-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--caramel);
  letter-spacing: 0.22em;
  margin-bottom: 1.6rem;
}

.hero-sub {
  font-size: 1.06rem;
  color: var(--ink-soft);
  max-width: 50ch;
  margin-bottom: 2.4rem;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  /* reset the native control chrome — otherwise iOS Safari paints <button>
     submit controls with its default system-blue tint/background */
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary {
  background: var(--caramel);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(147, 97, 34, 0.30);
}

.btn-primary:hover { background: var(--caramel-deep); transform: translateY(-2px); }

.btn-ghost {
  border: 1px solid var(--caramel);
  color: var(--caramel);
}

.btn-ghost:hover { background: rgba(147, 97, 34, 0.08); transform: translateY(-2px); }

.btn svg { width: 17px; height: 17px; flex: none; }

/* ---------- credentials ribbon ---------- */
.cred-ribbon {
  background: var(--caramel);
  color: var(--cream);
  padding: 2.2rem 0;
  position: relative;
  overflow: hidden;
}

/* one-off gold light sweep when the ribbon first scrolls into view */
.cred-ribbon.shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 246, 224, 0.22) 50%, transparent 68%);
  transform: translateX(-100%);
  animation: shimmer 1.7s ease 0.4s forwards;
  pointer-events: none;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

/* The About and What-to-Expect flower accents were removed at Derek's request
   (2026-09-23, round 2). */

/* ---------- scroll progress line ---------- */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0;
  background: linear-gradient(90deg, var(--caramel), var(--caramel-soft));
  z-index: 200;
}

body.nav-open #scrollProgress { display: none; }

.cred-grid {
  display: grid;
  /* fixed counts, not auto-fit: auto-fit put three on an upright iPad and left
     FHKAM (Surgery) alone on a row (Derek, 2026-09-23) */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem 2.4rem;
}
@media (max-width: 900px) { .cred-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .cred-grid { grid-template-columns: 1fr; } }

.cred-item { text-align: center; }

.cred-item .cred-abbr {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--white);
}

.cred-item .cred-full {
  font-size: 0.78rem;
  color: var(--gold-line);
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* ---------- generic section ---------- */
.section { padding: 6.5rem 0; }
.section.alt { background: var(--white); }

.split {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

/* ---------- about ---------- */
.portrait-frame {
  position: relative;
  max-width: 420px;
  margin-inline: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: linear-gradient(160deg, var(--cream-deep), #E0D5C2);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(147, 97, 34, 0.35);
  border-radius: 10px;
  pointer-events: none;
}

.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }

/* portrait settle: eases from a zoom as the section reveals */
.reveal .portrait-frame img { transform: scale(1.14); transition: transform 2.4s cubic-bezier(0.33, 0, 0.2, 1) 0.1s; will-change: transform; }
.reveal.visible .portrait-frame img { transform: scale(1); }

.portrait-placeholder {
  text-align: center;
  padding: 2rem;
  color: var(--caramel-soft);
}

.portrait-placeholder svg { width: 90px; margin: 0 auto 1rem; opacity: 0.8; }

/* Hairline between the doctor section and the clinic. */
.section-rule {
  border: 0;
  height: 1px;
  background: var(--gold-line);
  margin: 0;
}

/* Section header grid (layout C): eyebrow + title left, opening text right.
   Used by every section from "The Doctor" down, so the page reads as one system.
   The wide grids below each header stay full width. */
.sec-head {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.sec-head .section-title {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.12;
}

.sec-head .section-lead { max-width: 68ch; }

/* Appointments, under the biography in the right-hand column. */
.appt-inline {
  margin-top: 2.6rem;   /* the full-width rule above the list was removed (Derek, 2026-09-23) */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.9rem 2.4rem;
  list-style: none;
}

.appt-inline li { display: grid; gap: 0.15rem; position: relative; }

/* Reveal in turn (Derek, 2026-09-23): as the section comes into view each
   appointment rises in, one after another, under its own gold line that draws
   across. main.js adds .appt-anim (so nothing is hidden without JS) and then
   .is-in when the list is on screen. */
.appt-inline li::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -0.8rem;
  height: 1px;
  background: linear-gradient(90deg, var(--caramel), rgba(201, 164, 98, 0.12));
}
.appt-inline.appt-anim li { opacity: 0; transform: translateY(12px); }
.appt-inline.appt-anim li::before { transform: scaleX(0); transform-origin: left center; }
.appt-inline.appt-anim.is-in li { animation: apptIn 0.9s cubic-bezier(0.33, 1, 0.68, 1) calc(var(--i) * 0.22s + 0.1s) forwards; }
.appt-inline.appt-anim.is-in li::before { animation: apptLine 1.1s cubic-bezier(0.33, 1, 0.68, 1) calc(var(--i) * 0.22s) forwards; }
@keyframes apptIn { to { opacity: 1; transform: none; } }
@keyframes apptLine { to { transform: scaleX(1); } }
.appt-inline .appt-role { font-size: 0.88rem; color: var(--ink); }
.appt-inline .appt-where { font-size: 0.82rem; color: var(--ink-soft); }

@media (max-width: 900px) {
  .sec-head, .appt-inline { grid-template-columns: 1fr; }
}

.about-quals {
  margin-top: 2rem;
  border-top: 1px solid var(--gold-line);
  padding-top: 1.6rem;
  display: grid;
  gap: 0.55rem;
}

.about-quals li {
  list-style: none;
  display: flex;
  gap: 0.8rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.about-quals li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--caramel);
  margin-top: 0.62em;
}

/* ---------- services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.6rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(147, 97, 34, 0.14);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  transition: transform 0.8s ease, opacity 0.8s ease, translate 0.35s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.section.alt .service-card { background: var(--cream); }

.service-card:hover {
  translate: 0 -5px; /* `translate`, not `transform`: .reveal.visible owns transform and used to cancel this lift */
  box-shadow: var(--shadow-soft);
  border-color: rgba(147, 97, 34, 0.35);
}

/* change request 2026-09-23: the card's background glows on mouse-over */
.service-card { position: relative; isolation: isolate; overflow: hidden; }
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 95% at 22% 0%, rgba(236, 202, 146, 0.55), rgba(242, 222, 190, 0.28) 45%, transparent 78%),
    radial-gradient(90% 70% at 100% 100%, rgba(236, 202, 146, 0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .service-card:hover::before { opacity: 1; }
  .service-card:hover { box-shadow: 0 18px 46px rgba(201, 160, 92, 0.28), 0 0 0 1px rgba(221, 180, 99, 0.35); }
}

.service-card .icon {
  width: 46px; height: 46px;
  margin-bottom: 1.3rem;
  color: var(--caramel);
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.service-card .zh {
  font-size: 0.86rem;
  color: var(--caramel-soft);
  letter-spacing: 0.1em;
  margin-bottom: 0.9rem;
}

.service-card p { font-size: 0.93rem; color: var(--ink-soft); }

.learn-more {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--caramel);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.learn-more:hover { border-bottom-color: var(--caramel); }

.services-note {
  margin-top: 2.4rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  max-width: 72ch;
}

/* ---------- journey ---------- */
.journey-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
  margin-top: 3.2rem;
  counter-reset: step;
}

.journey-step { position: relative; padding-top: 1rem; }

.journey-step .step-num {
  font-family: var(--serif);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.journey-step h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.journey-step p { font-size: 0.9rem; color: var(--ink-soft); }

.journey-step::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 44px; height: 1px;
  background: var(--caramel);
}

.journey-step.reveal::before { width: 0; transition: width 0.7s ease 0.35s; }
.journey-step.reveal.visible::before { width: 44px; }

/* ---------- clinic / practical ---------- */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem;
  margin-top: 3rem;
}

.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(147, 97, 34, 0.12);
  position: relative;
  overflow: hidden;
  transition: transform 0.8s ease, opacity 0.8s ease, translate 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

/* change request 2026-09-23: on mouse-over the card lifts and glows gold
   (the sweep of light was removed in round 2) */
.info-card h3 { transition: color 0.5s ease; }
@media (hover: hover) {
  .info-card:hover {
    translate: 0 -5px;
    border-color: rgba(201, 164, 98, 0.55);
    box-shadow: 0 16px 40px rgba(201, 160, 92, 0.26), 0 0 0 1px rgba(221, 180, 99, 0.25);
  }
  .info-card:hover h3 { color: var(--caramel); }
}

.info-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.info-card h3 svg { width: 20px; height: 20px; color: var(--caramel); flex: none; }

.info-card p, .info-card li { font-size: 0.92rem; color: var(--ink-soft); }
.info-card ul { list-style: none; display: grid; gap: 0.35rem; }

.hours-table { width: 100%; font-size: 0.92rem; color: var(--ink-soft); border-collapse: collapse; }
.hours-table td { padding: 0.3rem 0; vertical-align: top; }
.hours-table td:first-child { color: var(--ink); padding-right: 1rem; white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 2.6rem; max-width: 820px; }

.faq-item {
  border-bottom: 1px solid var(--gold-line);
  position: relative;
}

/* change request 2026-09-23: a gold line draws itself under the open question */
.faq-item::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--caramel), rgba(201, 164, 98, 0.15));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}
.faq-item.is-open::after { transform: scaleX(1); }
.faq-item summary { transition: color 0.7s ease; }
.faq-item.is-open summary { color: var(--caramel-deep); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.18rem;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--caramel);
  transition: transform 0.55s cubic-bezier(0.33, 1, 0.68, 1);
  flex: none;
}

.faq-item.is-open summary::after { transform: rotate(225deg); }

/* Round 2 (2026-09-23): the height+blur animation stuttered, because it
   re-laid-out the page and re-blurred the text every frame. Now the answer's
   row grows from 0fr to 1fr (one smooth transition the browser handles well),
   and the text fades in with a small lift — opacity and transform only. */
.faq-item .faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.33, 1, 0.68, 1);
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 68ch;
}
.faq-item.is-open .faq-body { grid-template-rows: 1fr; }
.faq-body > .faq-clip { min-height: 0; overflow: hidden; }
.faq-clip > .faq-text {
  padding: 0 0 1.5rem;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.33, 1, 0.68, 1);
}
.faq-item.is-open .faq-text { opacity: 1; transform: none; transition-delay: 0.1s, 0.05s; }


/* ---------- contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  margin-top: 3rem;
  align-items: start;
}

.contact-rows { display: grid; gap: 1.5rem; }

.contact-row { display: flex; gap: 1.1rem; align-items: flex-start; }

.contact-row .ic {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(147, 97, 34, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--caramel);
}

.contact-row .ic svg { width: 19px; height: 19px; }

.contact-row h3 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.contact-row p, .contact-row a.plain { font-size: 0.95rem; color: var(--ink-soft); }
.contact-row a { font-weight: 400; }

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(147, 97, 34, 0.15);
}

.map-frame iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
  filter: sepia(0.22) saturate(0.85);
}

/* ---------- enquiry form ---------- */
.enquiry {
  margin-top: 4rem;
  background: var(--white);
  border: 1px solid rgba(147, 97, 34, 0.16);
  border-radius: var(--radius);
  padding: 2.6rem;
  max-width: 720px;
}

.enquiry h3 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.enquiry-sub { color: var(--ink-soft); font-size: 0.93rem; margin-bottom: 1.6rem; }

.enquiry-form { display: grid; gap: 1.1rem; }
.enquiry-form .ef-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.enquiry-form label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--caramel-deep);
  display: grid;
  gap: 0.4rem;
}

.enquiry-form input, .enquiry-form select, .enquiry-form textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gold-line);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}

.enquiry-form input:focus, .enquiry-form select:focus, .enquiry-form textarea:focus {
  outline: 2px solid var(--caramel-soft);
}

.enquiry-form .ef-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.4rem; }
.enquiry-form .ef-actions .btn { border: 1px solid var(--caramel); cursor: pointer; }
.enquiry-form .ef-hint { font-size: 0.78rem; color: var(--ink-soft); }

@media (max-width: 640px) { .enquiry-form .ef-row { grid-template-columns: 1fr; } .enquiry { padding: 1.8rem; } }

/* ---------- scrollspy ---------- */
.nav-links li:not(.lang-li) a.active { color: var(--caramel); }
.nav-links li:not(.lang-li) a.active::after { right: 0; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--caramel);
  color: var(--cream-deep);
  padding: 3.6rem 0 2.2rem;
  position: relative;
  overflow: hidden;
}

/* A few stars in the footer (Derek, 2026-09-23), so the page opens and closes
   under the same sky. Same shape and rules as the hero's: random, never on the
   logo or the words, a new spot after each twinkle (main.js). Warm white here,
   because gold has too little contrast on the caramel. */
.site-footer .container { position: relative; z-index: 1; }
.footer-stars { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.footer-star {
  position: absolute;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  color: #FFF1D2;
  filter: drop-shadow(0 0 calc(var(--s) * 0.35) rgba(255, 238, 200, 0.9)) drop-shadow(0 0 calc(var(--s) * 0.6) rgba(236, 196, 112, 0.6));
  opacity: 0;
  transform: scale(0.45);
  animation: starTwinkle var(--d) ease-in-out var(--delay) infinite;
}
.footer-star svg { display: block; width: 100%; height: 100%; fill: currentColor; }

.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2.5rem;
  align-items: center;
}

.site-footer img { height: 64px; width: auto; }

.footer-lines { font-size: 0.85rem; line-height: 1.9; color: var(--gold-line); }
.footer-lines strong { color: var(--white); font-weight: 400; }

.footer-legal a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-legal a:hover { color: #fff; }

.footer-legal {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(234, 226, 215, 0.25);
  font-size: 0.75rem;
  color: rgba(234, 226, 215, 0.75);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}

/* ---------- whatsapp pill ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #25D366;
  color: #fff;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s ease;
}

.wa-float:hover { transform: translateY(-3px) scale(1.03); color: #fff; }
.wa-float svg { width: 20px; height: 20px; }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* cards that scroll in AND lift on hover: keep both motions' transitions */
.service-card.reveal, .info-card.reveal {
  transition: opacity 0.8s ease, transform 0.8s ease, translate 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none !important; }
  .hero .eyebrow, .hero h1, .hero .hero-sub, .hero .hero-ctas { opacity: 1; animation: none; }
  .hero-motif { animation: none; transform: translateY(-50%); }
  .hero-motif img { opacity: 0.5; transform: none; filter: none; animation: none; }
  .hero-motif::before { animation: none; opacity: 1; }
  .hero-stars { animation: none; opacity: 1; }
  .hero-star, .footer-star { animation: none; opacity: calc(var(--o) * 0.7); transform: none; }
  .faq-item .faq-body, .faq-clip > .faq-text { transition: none; }
  .faq-item::after, .faq-item summary::after, .info-card, .service-card::before { transition: none; }
  .journey-step.reveal::before { width: 44px; transition: none; }
  .reveal .portrait-frame img { transform: none; transition: none; }
  .cred-ribbon.shine::after { animation: none; opacity: 0; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .split, .contact-wrap, .footer-grid { grid-template-columns: 1fr; }
  .portrait-frame { max-width: 420px; margin: 0 auto; }
  .hero-motif { right: -22vw; width: min(90vw, 460px); opacity: 0.45; }
  .footer-grid { text-align: center; justify-items: center; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--cream);
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1rem; }
  .lang-group a { font-size: 0.95rem; padding: 0.45rem 1.2rem; }
  body.nav-open { overflow: hidden; }
  .nav-toggle { z-index: 110; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 820px) {
  .section { padding: 4.5rem 0; }
  .hero { min-height: 86vh; padding-top: 7rem; }
}

/* Narrow screens (iPhone, iPad portrait): the text fills the width, so the mark
   moves BELOW the buttons, clear of every word, instead of sitting behind the
   headline. Height of the mark = width x 0.98 (asset is 649 x 636); the hero's
   bottom padding reserves exactly that room. Must stay after the 820px block. */
@media (max-width: 900px) {
  .hero { min-height: 0; align-items: flex-start; padding-bottom: calc(min(66vw, 440px) * 0.98 + 2.5rem); }
  .hero-motif { top: auto; bottom: 1.5rem; right: -6vw; width: min(66vw, 440px); transform: none; opacity: 1; }
}

/* Small iPads in landscape (1024 wide): the headline reaches ~560px, so the
   mark is slightly smaller and further right to keep a clear gap. */
@media (min-width: 901px) and (max-width: 1100px) {
  .hero-motif { right: 4vw; width: min(34vw, 420px); }
}

/* Chinese page typography tuning */
html[lang="zh-Hant"] body, html[lang="zh-Hans"] body { letter-spacing: 0.03em; }
html[lang="zh-Hant"] .eyebrow, html[lang="zh-Hans"] .eyebrow { letter-spacing: 0.42em; }
html[lang="zh-Hant"] h1, html[lang="zh-Hant"] h2, html[lang="zh-Hant"] h3,
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2, html[lang="zh-Hans"] h3 { font-weight: 600; }
html[lang="zh-Hans"] { --serif: "Poppins", "Noto Sans SC", sans-serif; --sans: "Poppins", "Noto Sans SC", sans-serif; }

/* ===== Press & articles (rendered only when there are articles) ===== */
.press-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.press-item { background: var(--white); border: 1px solid var(--gold-line); border-radius: var(--radius); padding: 1.4rem 1.5rem; display: grid; gap: 0.5rem; align-content: start; }
.press-item h3 { font-size: 1.05rem; line-height: 1.45; }
.press-meta { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--caramel); }
.press-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.3rem; }
