/* ==========================================================================
   GEM Clinic — design tokens
   Concept: the clinic's three specialities (Gynaecology / ENT / Medicine)
   are treated as three facets of one cut gemstone — one identity, GEM,
   seen from three angles. Garnet / Teal / Amber map to the three depts.
   ========================================================================== */

:root {
  --ivory: #FAF8F4;
  --paper: #FFFFFF;
  --ink: #16213A;
  --body: #454B57;
  --muted: #7A8090;
  --line: #E7E2D8;

  --navy: #16324F;
  --navy-dark: #0F2438;

  --gy: #9C2748;      /* Gynaecology — garnet   */
  --gy-tint: #FBEBEF;
  --ent: #0E6E71;      /* ENT — teal             */
  --ent-tint: #E9F4F3;
  --med: #C97A2B;      /* Medicine — amber       */
  --med-tint: #FBF0E3;

  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 28px;
  --shadow: 0 20px 40px -24px rgba(22,33,58,.28);
  --shadow-soft: 0 12px 28px -18px rgba(22,33,58,.20);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 .5em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 .9em;
  font-weight: 500;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2.5px solid var(--ent);
  outline-offset: 3px;
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .8em 1.5em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--solid { background: var(--navy); color: #fff; }
.btn--solid:hover { background: var(--navy-dark); }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--ghost { color: var(--navy); padding: .6em 1em; }
.btn--ghost-invert { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost-invert:hover { background: rgba(255,255,255,.12); }
.btn--lg { padding: 1em 2em; font-size: 1rem; }
.btn--full { width: 100%; }

/* ==================== Top bar ==================== */
.topbar { background: var(--navy-dark); color: rgba(255,255,255,.85); font-size: .82rem; }
.topbar__inner {
  max-width: 1240px; margin: 0 auto; padding: .55em 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 1em;
  flex-wrap: wrap;
}
.topbar__info, .topbar__links { display: flex; align-items: center; gap: .9em; flex-wrap: wrap; }
.topbar__sep { opacity: .4; }
.topbar a:hover { color: #fff; }
.topbar__cta { font-weight: 600; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #E85D5D; margin-right: .4em; }
.dot--live { box-shadow: 0 0 0 0 rgba(232,93,93,.6); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232,93,93,.55); }
  70% { box-shadow: 0 0 0 6px rgba(232,93,93,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,93,93,0); }
}

/* ==================== Header ==================== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,244,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 2em;
}
.logo { display: flex; align-items: center; gap: .6em; margin-right: auto; }
.logo__mark { display: flex; color: var(--navy); }
.logo__text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  color: var(--ink); display: flex; flex-direction: column; line-height: 1;
}
.logo__text--light { color: #fff; }
.logo__sub {
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 500; color: var(--muted); margin-top: .35em;
}
.nav { display: flex; gap: 2em; }
.nav a { font-weight: 600; font-size: .93rem; color: var(--body); position: relative; padding: .3em 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--gy), var(--ent), var(--med));
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:hover::after { transform: scaleX(1); }
.nav a:hover { color: var(--ink); }
.header__actions { display: flex; align-items: center; gap: .6em; }

.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; background: none; border: none; cursor: pointer;
}
.hamburger span { width: 100%; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: .2em; padding: 0 24px 20px;
  background: var(--ivory);
}
.mobile-nav a { padding: .7em 0; font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: .8em; }
.mobile-nav.is-open { display: flex; }

/* ==================== Fixed facet rail (desktop signature accent) ==================== */
.facet-rail {
  position: fixed; right: 0; top: 0; bottom: 0; width: 6px; z-index: 40;
  display: flex; flex-direction: column;
}
.facet-rail .facet { flex: 1; }
.facet--gy { background: var(--gy); }
.facet--ent { background: var(--ent); }
.facet--med { background: var(--med); }
@media (max-width: 900px) { .facet-rail { display: none; } }

/* ==================== Hero ==================== */
.hero { padding: 72px 24px 40px; }
.hero__inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center;
}
.hero__title { font-size: clamp(2.3rem, 3.6vw, 3.4rem); }
.hero__sub { font-size: 1.08rem; max-width: 46ch; }
.hero__ctas { display: flex; gap: 1em; flex-wrap: wrap; margin: 1.6em 0 2.2em; }
.hero__trust {
  display: flex; gap: 2.4em; padding-top: 1.6em; border-top: 1px solid var(--line);
}
.hero__trust div { display: flex; flex-direction: column; }
.hero__trust strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--ink); }
.hero__trust span { font-size: .8rem; color: var(--muted); }

.hero__visual { display: flex; flex-direction: column; align-items: center; }
.gem-svg { width: 100%; max-width: 380px; filter: drop-shadow(0 24px 34px rgba(22,33,58,.18)); }
.gem-face { transition: transform .4s ease; transform-origin: center; }
.gem-face--top { fill: #EFE7DA; }
.gem-face--gy { fill: var(--gy); }
.gem-face--ent { fill: var(--ent); }
.gem-face--med { fill: var(--med); }
.hero__visual:hover .gem-face--gy { transform: translateY(-4px); }
.hero__visual:hover .gem-face--ent { transform: translateX(4px); }
.hero__visual:hover .gem-face--med { transform: translateX(-4px); }
.gem-caption {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-top: 1em;
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 260px; margin: 0 auto; }
}

/* ==================== Quick strip ==================== */
.quickstrip { background: var(--navy); padding: 8px 24px 0; margin-top: 20px; }
.quickstrip__inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255,255,255,.12); border-radius: var(--radius-m) var(--radius-m) 0 0; overflow: hidden;
  transform: translateY(28px);
}
.qcard { background: var(--paper); padding: 28px 24px; }
.qcard__icon { font-size: 1.5rem; }
.qcard h3 { font-size: 1.02rem; margin: .5em 0 .35em; font-family: var(--font-body); font-weight: 700; }
.qcard p { font-size: .88rem; color: var(--muted); margin: 0; }
.qcard a { color: var(--ent); font-weight: 600; }
@media (max-width: 900px) {
  .quickstrip__inner { grid-template-columns: repeat(2, 1fr); transform: translateY(0); border-radius: var(--radius-m); }
  .quickstrip { padding-bottom: 20px; }
}

/* ==================== Section shells ==================== */
main > section { padding: 100px 24px 40px; }
.quickstrip + .departments { padding-top: 68px; }
.section__head { max-width: 1240px; margin: 0 auto 48px; }
.section__head h2 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); max-width: 18ch; }
.section__sub { max-width: 60ch; font-size: 1.02rem; }

/* ==================== Departments triptych (signature) ==================== */
.triptych {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.facet-card {
  background: var(--paper); border-radius: var(--radius-l); overflow: hidden;
  box-shadow: var(--shadow-soft); display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.facet-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.facet-card__top { height: 8px; }
.facet-card--gy .facet-card__top { background: var(--gy); }
.facet-card--ent .facet-card__top { background: var(--ent); }
.facet-card--med .facet-card__top { background: var(--med); }
.facet-card__body { padding: 36px 32px 32px; flex: 1; display: flex; flex-direction: column; }
.facet-card__index {
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1;
  margin-bottom: .3em;
}
.facet-card--gy .facet-card__index { color: var(--gy); }
.facet-card--ent .facet-card__index { color: var(--ent); }
.facet-card--med .facet-card__index { color: var(--med); }
.facet-card__list { margin: 1em 0 1.4em; display: flex; flex-direction: column; gap: .5em; }
.facet-card__list li { font-size: .92rem; color: var(--body); padding-left: 1.2em; position: relative; }
.facet-card__list li::before {
  content: "•"; position: absolute; left: 0; font-weight: 700;
}
.facet-card--gy .facet-card__list li::before { color: var(--gy); }
.facet-card--ent .facet-card__list li::before { color: var(--ent); }
.facet-card--med .facet-card__list li::before { color: var(--med); }
.link-arrow { font-weight: 700; margin-top: auto; display: inline-block; }
.facet-card--gy .link-arrow { color: var(--gy); }
.facet-card--ent .link-arrow { color: var(--ent); }
.facet-card--med .link-arrow { color: var(--med); }
.link-arrow:hover { text-decoration: underline; }

@media (max-width: 900px) { .triptych { grid-template-columns: 1fr; } }

/* ==================== About ==================== */
.about { background: var(--paper); border-radius: var(--radius-l); max-width: 1240px; margin: 0 auto; box-shadow: var(--shadow-soft); }
.about__inner {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center;
  padding: 56px;
}
.about__frame {
  aspect-ratio: 1; border-radius: var(--radius-l); overflow: hidden;
  display: grid; grid-template-rows: repeat(3, 1fr);
}
.about__swatch--gy { background: linear-gradient(135deg, var(--gy), #C24467); }
.about__swatch--ent { background: linear-gradient(135deg, var(--ent), #159A9D); }
.about__swatch--med { background: linear-gradient(135deg, var(--med), #E0994F); }
.about__points { display: flex; flex-direction: column; gap: .8em; margin-top: 1.4em; font-weight: 600; color: var(--ink); font-size: .95rem; }
.about__points div { display: flex; align-items: center; gap: .7em; }
.chip { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.chip--gy { background: var(--gy); }
.chip--ent { background: var(--ent); }
.chip--med { background: var(--med); }

@media (max-width: 900px) {
  .about__inner { grid-template-columns: 1fr; padding: 32px; gap: 32px; }
}

/* ==================== Doctors ==================== */
.doctor-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.doctor-card {
  background: var(--paper); border-radius: var(--radius-m); padding: 32px;
  border-top: 4px solid transparent; box-shadow: var(--shadow-soft);
}
.doctor-card--gy { border-color: var(--gy); }
.doctor-card--ent { border-color: var(--ent); }
.doctor-card--med { border-color: var(--med); }
.doctor-card__photo {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 1em;
}
.doctor-card--gy .doctor-card__photo { background: var(--gy-tint); }
.doctor-card--ent .doctor-card__photo { background: var(--ent-tint); }
.doctor-card--med .doctor-card__photo { background: var(--med-tint); }
.doctor-card h3 { font-size: 1.2rem; margin-bottom: .2em; }
.doctor-card__role { font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: .9em; }
.doctor-card--gy .link-arrow { color: var(--gy); }
.doctor-card--ent .link-arrow { color: var(--ent); }
.doctor-card--med .link-arrow { color: var(--med); }

@media (max-width: 900px) { .doctor-grid { grid-template-columns: 1fr; } }

/* ==================== Testimonials ==================== */
.quote-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.quote-card {
  background: var(--paper); border-radius: var(--radius-m); padding: 32px; margin: 0;
  box-shadow: var(--shadow-soft);
}
.quote-card blockquote { margin: 0 0 1em; font-family: var(--font-display); font-size: 1.08rem; color: var(--ink); font-style: italic; }
.quote-card figcaption { font-size: .84rem; color: var(--muted); font-weight: 600; }
@media (max-width: 900px) { .quote-grid { grid-template-columns: 1fr; } }

/* ==================== Book / form ==================== */
.book { background: var(--navy); border-radius: var(--radius-l); max-width: 1240px; margin: 0 auto; color: #fff; }
.book__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 64px; }
.book .eyebrow { color: #C6D2DE; }
.book h2 { color: #fff; max-width: 16ch; }
.book__copy p { color: #C6D2DE; max-width: 42ch; }
.book__contacts { display: flex; gap: 1em; margin-top: 1.6em; flex-wrap: wrap; }

.book__form { background: var(--paper); border-radius: var(--radius-m); padding: 32px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.book__form label { display: flex; flex-direction: column; gap: .4em; font-size: .86rem; font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.book__form input, .book__form select, .book__form textarea {
  font-family: var(--font-body); font-size: .95rem; padding: .8em 1em; border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--ivory); color: var(--ink); resize: vertical;
}
.book__form input:focus, .book__form select:focus, .book__form textarea:focus { border-color: var(--ent); }
.form__note { font-size: .88rem; color: var(--ent); font-weight: 600; min-height: 1.4em; margin: .8em 0 0; }

@media (max-width: 900px) {
  .book__inner { grid-template-columns: 1fr; padding: 36px 24px; gap: 32px; }
  .form__row { grid-template-columns: 1fr; }
}

/* ==================== Contact cards ==================== */
.contact__inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.contact__card { background: var(--paper); border-radius: var(--radius-m); padding: 28px; box-shadow: var(--shadow-soft); }
.contact__card h3 { font-size: 1.05rem; margin-bottom: .5em; }
.contact__card p { margin: 0; font-size: .92rem; color: var(--body); }
@media (max-width: 900px) { .contact__inner { grid-template-columns: 1fr; } }

/* ==================== Footer ==================== */
.footer { background: var(--navy-dark); color: rgba(255,255,255,.7); margin-top: 100px; }
.footer__inner {
  max-width: 1240px; margin: 0 auto; padding: 64px 24px 40px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
}
.footer__brand p { max-width: 32ch; font-size: .9rem; margin: 1em 0; }
.footer__social { display: flex; gap: .8em; }
.footer__social a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 700;
}
.footer__social a:hover { background: rgba(255,255,255,.1); }
.footer__col h4 { color: #fff; font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.1em; }
.footer__col { display: flex; flex-direction: column; gap: .7em; font-size: .9rem; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 20px 24px; text-align: center; font-size: .82rem;
}
@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__inner { grid-template-columns: 1fr; }
}

/* ==================== Mobile sticky bar ==================== */
.mobile-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--paper); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 20px rgba(22,33,58,.08);
}
.mobile-bar { grid-template-columns: repeat(3, 1fr); }
.mobile-bar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 0; font-size: .72rem; font-weight: 700; color: var(--navy);
}
.mobile-bar a span { font-size: 1.15rem; }
.mobile-bar__cta { background: var(--navy); color: #fff !important; }

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav, .header__actions { display: none; }
  .mobile-bar { display: grid; }
  body { padding-bottom: 64px; }
  main > section { padding: 64px 20px 24px; }
  .facet-card__body, .book__inner, .about__inner { padding: 28px !important; }
}