/* ============================================================
   Butterfly Surgery — Design System
   Style base: landingpagemockup (dark editorial luxury clinic)
   Palette: extracted from project images (brand posters + mockups)
     - charcoal #101010-#202020 (mockups)
     - deep violet #3c3060, lavender #9084b4/#c0a0e0 (brand posters)
     - blush #e4b4a8 (brand posters, used sparingly)
   Radius rule: media frames 22px, cards/inputs 14px, buttons pill
   Theme lock: single dark theme (mockup is dark-only by design)
   ============================================================ */

:root {
  /* color tokens */
  --bg: #131118;
  --bg-elev: #1a1720;
  --bg-elev-2: #221e2a;
  --line: rgba(168, 155, 217, 0.16);
  --line-strong: rgba(168, 155, 217, 0.32);
  --text: #f3f1f7;
  --text-muted: #a9a2b8;
  --accent: #a89bd9;
  --accent-strong: #c0b5ec;
  --accent-deep: #3c3060;
  --accent-ink: #16121f;
  --blush: #e6c2b2;
  --ok: #8fd6b4;
  --err: #e79a9a;

  /* shape tokens */
  --r-media: 22px;
  --r-card: 14px;
  --r-pill: 999px;

  /* type */
  --font-display: "Outfit", "Noto Sans Thai", sans-serif;
  --font-body: "Noto Sans Thai", "Outfit", sans-serif;

  /* rhythm */
  --container: 1180px;
  --sect: clamp(4.25rem, 9vw, 8rem);
  --nav-h: 68px;

  --shadow-soft: 0 24px 64px rgba(0, 0, 0, 0.45);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--text); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0; }

::selection { background: var(--accent-deep); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--r-card) 0;
  z-index: 100;
  font-weight: 500;
}
.skip-link:focus { left: 0; color: var(--accent-ink); }

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding-block: var(--sect); }

.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--text-muted); margin-top: 0.9rem; max-width: 58ch; }

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

.h-display {
  font-size: clamp(2.75rem, 6vw, 4.6rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.h-section {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  font-weight: 400;
}

.lead { font-size: clamp(1.02rem, 1.4vw, 1.15rem); }

.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  padding: 1rem 1.75rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }

.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

.btn-sm { padding: 0.7rem 1.25rem; font-size: 0.92rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(19, 17, 24, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 26px; height: 26px; flex: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.4vw, 2.1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a:not(.btn) {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
  transition: color 0.2s ease;
}
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"] { font-weight: 500; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; padding-top: 0.9rem; }
  .nav-links a:not(.btn) {
    display: block;
    padding: 0.95rem 0.15rem;
    font-size: 1.05rem;
  }
  .nav-links .btn { width: 100%; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vh, 5.5rem));
  padding-bottom: clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52rem 30rem at 82% 8%, rgba(60, 48, 96, 0.5), transparent 62%),
    radial-gradient(40rem 26rem at -12% 88%, rgba(60, 48, 96, 0.34), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero-copy .lead {
  color: var(--text-muted);
  margin-top: 1.4rem;
  max-width: 34ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.hero-media { position: relative; }
.hero-frame {
  position: relative;
  border-radius: 300px 300px var(--r-media) var(--r-media);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 3 / 4;
  max-height: 620px;
  width: 100%;
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.hero-halo {
  position: absolute;
  inset: -8% -14%;
  background: radial-gradient(closest-side, rgba(168, 155, 217, 0.16), transparent 72%);
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 420px; }
  .hero-frame { border-radius: 260px 260px var(--r-card) var(--r-card); }
}

/* ---------- stats strip ---------- */
.stats { border-block: 1px solid var(--line); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.stat {
  padding: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1rem, 2.5vw, 2rem);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--accent-strong);
  line-height: 1;
}
.stat-label { color: var(--text-muted); margin-top: 0.6rem; font-size: 0.95rem; }
@media (max-width: 680px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--line); padding-block: 1.4rem; }
  .stat:first-child { border-top: 0; }
}

/* ---------- benefits bento (3 cells: 1 tall + 2 stacked) ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.25rem;
}
.benefit {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.6rem, 3vw, 2.4rem);
}
.benefit-tall { grid-row: 1 / 3; display: flex; flex-direction: column; }
.benefit-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-card);
  background: rgba(60, 48, 96, 0.55);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  margin-bottom: 1.4rem;
}
.benefit-icon svg { width: 26px; height: 26px; }
.benefit h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }
.benefit p { color: var(--text-muted); font-size: 0.98rem; }
.benefit-tall .benefit-media {
  margin-top: auto;
  padding-top: 1.75rem;
}
.benefit-tall .benefit-media img {
  border-radius: var(--r-card);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
}
.benefit-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.5rem; }
@media (max-width: 880px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .benefit-tall { grid-row: auto; }
}

/* ---------- how it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  counter-reset: step;
}
.step { position: relative; padding-top: 1.4rem; }
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.step-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 300;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  line-height: 1;
}
.step h3 { font-size: 1.18rem; margin: 1rem 0 0.55rem; }
.step p { color: var(--text-muted); font-size: 0.95rem; }
.step-fineprint { margin-top: clamp(2rem, 4vw, 3rem); font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- procedure tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.tile {
  position: relative;
  display: block;
  border-radius: var(--r-media);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
  background: var(--bg-elev);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease, opacity 0.4s ease;
  opacity: 0.92;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(12, 10, 16, 0.88));
}
.tile:hover img { transform: scale(1.04); opacity: 1; }
.tile-label {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.4rem;
  z-index: 1;
}
.tile-label h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tile-label p { color: rgba(243, 241, 247, 0.75); font-size: 0.92rem; margin-top: 0.3rem; }
.tile-arrow {
  position: absolute;
  right: 1.35rem;
  top: 1.35rem;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(243, 241, 247, 0.35);
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(12, 10, 16, 0.35);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.tile:hover .tile-arrow { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile-arrow svg { width: 18px; height: 18px; }
@media (max-width: 880px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 4 / 3; }
}

/* ---------- quotes ---------- */
.quotes-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
}
.quote-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.quote-card:first-child { grid-row: 1 / 3; justify-content: space-between; }
.quote-mark { color: var(--blush); font-family: var(--font-display); font-size: 2.6rem; line-height: 0.6; }
.quote-body { font-size: 1.06rem; line-height: 1.8; }
.quote-meta { color: var(--text-muted); font-size: 0.9rem; }
.quote-meta strong { color: var(--text); font-weight: 500; display: block; }
.quotes-note { margin-top: 1.4rem; font-size: 0.82rem; color: var(--text-muted); }
@media (max-width: 880px) {
  .quotes-grid { grid-template-columns: 1fr; }
  .quote-card:first-child { grid-row: auto; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 0.15rem;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 0.15rem 1.5rem; color: var(--text-muted); max-width: 62ch; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border-radius: var(--r-media);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(46rem 24rem at 12% 0%, rgba(60, 48, 96, 0.65), transparent 62%),
    var(--bg-elev-2);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}
.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.cta-inner .lead { color: var(--text-muted); margin-top: 1rem; max-width: 46ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; align-items: center; }
.cta-line {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 500;
  font-size: 1.02rem;
  padding: 1rem 1.5rem;
  border-radius: var(--r-pill);
  border: 1px dashed var(--line-strong);
}
.cta-line:hover { border-color: var(--accent); color: var(--accent-strong); }
.cta-line svg { width: 20px; height: 20px; color: var(--accent-strong); }
.cta-qr {
  justify-self: center;
  background: #fff;
  border-radius: var(--r-card);
  padding: 1rem;
  width: 168px;
  box-shadow: var(--shadow-soft);
}
.cta-qr img { border-radius: 6px; }
.cta-qr figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--accent-deep);
  font-weight: 600;
  padding-top: 0.55rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
@media (max-width: 880px) {
  .cta-inner { grid-template-columns: 1fr; }
  .cta-qr { justify-self: start; }
}

/* ---------- page hero (subpages) ---------- */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(2.25rem, 5vh, 4rem));
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(44rem 22rem at 88% -10%, rgba(60, 48, 96, 0.45), transparent 62%);
  pointer-events: none;
}
.page-hero .container { position: relative; }
.page-hero .lead { color: var(--text-muted); margin-top: 1.1rem; max-width: 52ch; }

/* ---------- procedures page ---------- */
.proc-group { padding-block: clamp(2.75rem, 6vw, 4.75rem); }
.proc-group + .proc-group { border-top: 1px solid var(--line); }
.proc-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; }
.proc-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.proc-list { margin-top: 1.75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; }
.proc-item { padding-block: 1.1rem; border-top: 1px solid var(--line); }
.proc-item h3 { font-size: 1.1rem; font-weight: 500; font-family: var(--font-body); }
.proc-item p { color: var(--text-muted); font-size: 0.93rem; margin-top: 0.35rem; }
@media (max-width: 780px) { .proc-list { grid-template-columns: 1fr; gap: 0; } }

.pkg-panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-media);
  padding: clamp(1.75rem, 4vw, 3rem);
}
.pkg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 2.5rem;
  margin-top: 1.75rem;
}
.pkg-item {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding-block: 0.55rem;
  border-bottom: 1px dashed var(--line);
  font-size: 0.98rem;
}
.pkg-item svg { width: 17px; height: 17px; color: var(--accent); flex: none; transform: translateY(3px); }
.pkg-item small { color: var(--text-muted); }
@media (max-width: 720px) { .pkg-grid { grid-template-columns: 1fr; } }

/* ---------- about page ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split-media {
  border-radius: var(--r-media);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-soft);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.split-copy .lead { color: var(--text-muted); margin-top: 1.1rem; }
.split-copy p + p { margin-top: 1rem; color: var(--text-muted); }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split-media { max-width: 460px; }
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.value-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.value-card h3 { font-size: 1.2rem; margin-bottom: 0.55rem; }
.value-card p { color: var(--text-muted); font-size: 0.96rem; }
@media (max-width: 720px) { .value-grid { grid-template-columns: 1fr; } }

/* hospital standards list */
.std-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 3rem;
  margin-top: 1.75rem;
}
@media (max-width: 720px) { .std-list { grid-template-columns: 1fr; } }

/* ---------- contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.field { margin-bottom: 1.35rem; }
.field label {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.field .req { color: var(--blush); }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 0.85rem 1.05rem;
  min-height: 48px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.6rem; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(169, 162, 184, 0.75); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 155, 217, 0.18);
}
.field .helper { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.4rem; }
.field .error {
  display: none;
  font-size: 0.85rem;
  color: var(--err);
  margin-top: 0.45rem;
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--err); }
.field.invalid .error { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.consent input {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  accent-color: var(--accent);
  flex: none;
}

.form-status {
  display: none;
  border-radius: var(--r-card);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  margin-bottom: 1.35rem;
  border: 1px solid;
}
.form-status.success { display: block; background: rgba(143, 214, 180, 0.1); border-color: rgba(143, 214, 180, 0.4); color: var(--ok); }
.form-status.fail { display: block; background: rgba(231, 154, 154, 0.08); border-color: rgba(231, 154, 154, 0.4); color: var(--err); }
.form-status[hidden] { display: none; }

.contact-aside .aside-block { margin-bottom: 2.25rem; }
.contact-aside h2 { font-size: 1.25rem; margin-bottom: 0.85rem; }
.contact-line {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  padding-block: 0.65rem;
  color: var(--text-muted);
}
.contact-line svg { width: 18px; height: 18px; color: var(--accent); flex: none; transform: translateY(3px); }
.contact-line a { color: var(--text); }
.contact-qr {
  background: #fff;
  border-radius: var(--r-card);
  padding: 1rem;
  width: 180px;
}
.contact-qr img { border-radius: 6px; }
.contact-qr figcaption { text-align: center; font-size: 0.8rem; color: var(--accent-deep); font-weight: 600; padding-top: 0.5rem; font-family: var(--font-display); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.75rem, 5vw, 4rem) 2rem;
  background: var(--bg-elev);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 2.75rem;
}
.footer .brand { margin-bottom: 1rem; }
.footer-tag { color: var(--text-muted); font-size: 0.95rem; max-width: 34ch; }
.footer h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.footer ul a { color: var(--text-muted); font-size: 0.95rem; }
.footer ul a:hover { color: var(--accent-strong); }
.social-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.social-chip img { width: 16px; height: 16px; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
  display: grid;
  gap: 1rem;
}
.footer-disclaimer { color: var(--text-muted); font-size: 0.82rem; max-width: 88ch; line-height: 1.7; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; color: var(--text-muted); font-size: 0.82rem; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- reveal motion (JS-gated: content visible without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .js .reveal.in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ================= PARTNER MARQUEE (hospital logos) ================= */
.partner-marquee {
  padding: 2.5rem 0 3rem;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(168, 155, 217, 0.07), transparent 70%),
    var(--bg);
}
.mq-heading {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.mq-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.mq-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: mq-scroll 56s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}
.mq-viewport:hover .mq-track,
.mq-viewport:focus-within .mq-track { animation-play-state: paused; }
.mq-item {
  flex: 0 0 auto;
  width: 196px;
  height: 76px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 10px 16px;
  contain: layout paint;
}
.mq-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.82;
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.mq-item:hover img,
.mq-item:focus-visible img { filter: grayscale(0); opacity: 1; }
@keyframes mq-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ================= HOSPITAL REVIEW CARDS ================= */
#hospital-reviews .hosp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  grid-auto-flow: dense;
}
.hosp-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.hosp-card:hover,
.hosp-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--bg-elev-2);
}
.hosp-card-logo {
  display: grid;
  place-items: center;
  height: 116px;
  background: #fff;
  border-radius: calc(var(--r-card) - 6px);
  padding: 14px;
  overflow: hidden;
}
.hosp-card-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.88;
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.hosp-card:hover .hosp-card-logo img,
.hosp-card:focus-visible .hosp-card-logo img { filter: grayscale(0); opacity: 1; }
.hosp-card-name {
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.35;
}
.hosp-card-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--accent);
}
.hosp-card-count svg { width: 15px; height: 15px; transition: transform 0.35s ease; }
.hosp-card:hover .hosp-card-count svg { transform: translateX(4px); }
.hosp-note {
  margin: 1.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
.hosp-cta { margin-top: 1.75rem; text-align: center; }

/* marquee must not strobe when user prefers reduced motion (override global 0.01ms rule) */
@media (prefers-reduced-motion: reduce) {
  .mq-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .mq-viewport { -webkit-mask-image: none; mask-image: none; }
}
