/* ==========================================================================
   The Royal Medical Centre — stylesheet
   Palette is taken from the supplied logo (see README → "Brand colours").
   ========================================================================== */
:root {
  /* Logo-derived brand colours */
  --navy-900: #15153a;      /* darkest navy: footer base, deep overlays   */
  --navy-700: #242351;      /* LOGO BANNER COLOUR (sampled): header text, buttons, icons, links */
  --navy-500: #3a3a7a;      /* hover / lighter navy                        */
  --navy-100: #e8e8f3;      /* tint: borders on cards, soft panels         */
  --gold-300: #f7c846;      /* LOGO EMBLEM YELLOW (sampled): accents on dark */
  --gold-500: #b8923a;      /* muted gold: gradient band, hover accents    */
  --gold-700: #8a6a1f;      /* dark gold: gold text on white (AA)          */

  /* Neutrals */
  --white: #ffffff;
  --off-white: #f9f9fb;
  --grey-200: #e4e5ea;
  --grey-600: #55576a;      /* body text on white (AA)                     */
  --ink: #12122b;           /* headings                                    */
  --charcoal: #0e1520;      /* footer background (as in the original)      */

  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(18, 18, 43, .08);
  --shadow-md: 0 8px 24px rgba(18, 18, 43, .10);
  --header-h: 80px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.7; color: var(--grey-600); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--navy-700); }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; }
.container { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--navy-700); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 8px; }

/* ---------- Headings: light weight + bold keyword, as in the original ---------- */
.title-light { font-weight: 300; font-size: clamp(1.7rem, 3.4vw, 2.9rem); letter-spacing: -.01em; }
.title-light strong { font-weight: 800; }
.title-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 32px; font: 600 1rem/1 var(--font); text-decoration: none; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--gold-300); color: var(--navy-900); }
.btn--outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.85); }
.btn--outline-light:hover { background: var(--white); color: var(--navy-700); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 2px 10px rgba(18,18,43,.08); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 24px; }
.brand { display: block; width: clamp(190px, 32vw, 380px); flex: none; line-height: 0; }
.brand img { width: 100%; height: auto; }          /* natural ratio: never stretched */
.primary-nav ul { display: flex; gap: 8px; }
.primary-nav a { display: block; padding: 8px 14px; font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.primary-nav a:hover { color: var(--navy-500); }
.primary-nav a.is-active { color: var(--navy-700); border-bottom-color: var(--navy-700); }
.nav-toggle { display: none; width: 48px; height: 48px; border: 1px solid var(--grey-200); border-radius: var(--radius); background: var(--white); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 22px; height: 2px; background: var(--navy-700); position: relative; transition: transform .2s, background-color .2s; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; } .nav-toggle__bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy-700); color: var(--white); overflow: hidden; min-height: min(82vh, 700px); display: flex; align-items: center; }
.hero__media { position: absolute; inset: 0 0 0 auto; width: min(48%, 680px); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy-700) 0%, rgba(36,35,81,.55) 38%, rgba(36,35,81,0) 75%); }
.hero__inner { position: relative; padding-block: 72px; }
.hero__copy { max-width: 620px; }
.eyebrow { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; color: var(--gold-300); margin-bottom: 14px; }
.hero h1 { color: var(--white); font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; margin-bottom: 22px; }
.hero__lead { font-size: clamp(1rem, 1.5vw, 1.2rem); color: rgba(255,255,255,.92); margin-bottom: 36px; max-width: 54ch; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }

/* About */
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__media { position: relative; padding-bottom: 120px; }
.about__media > img { width: 100%; max-width: 584px; aspect-ratio: 800 / 1029; object-fit: cover; border-radius: 12px; }
.appointment-card { position: absolute; left: min(30%, 172px); bottom: 0; width: min(84%, 485px); background: var(--white); border-radius: 10px; box-shadow: var(--shadow-md); padding: 28px 32px; }
.appointment-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.appointment-card p { margin-bottom: 14px; }
.appointment-card__phone { display: inline-flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.appointment-card__phone svg { color: var(--navy-700); }
.about__copy .title-light { margin-bottom: 40px; }
.about__quote { font-style: italic; font-weight: 600; font-size: 1.15rem; color: var(--ink); margin-bottom: 36px; }

/* Mission / Vision */
.mv { padding-top: clamp(24px, 4vw, 48px); }
.mv .title-light { margin-bottom: clamp(40px, 6vw, 72px); }
.mv__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); }
.mv__item { text-align: left; }
.mv__item h3 { text-align: center; font-size: 1.9rem; font-weight: 700; margin-bottom: 24px; }
.mv__icon { display: block; margin: 0 auto 20px; color: var(--navy-700); height: 68px; width: auto; }
.mv__item ul li { padding-left: 1em; text-indent: -1em; margin-bottom: .25em; }
.mv__item ul li::before { content: "* "; }

/* Treatments scroller */
.treatments { background: var(--off-white); }
.treatments .title-light { margin-bottom: clamp(32px, 5vw, 56px); }
.scroller { position: relative; }
.scroller__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--navy-500) var(--grey-200); padding: 6px 2px 18px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; cursor: grab; }
.scroller__viewport.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.scroller__viewport.is-dragging a { pointer-events: none; }
.scroller__track { display: flex; gap: 28px; }
.card { flex: 0 0 calc((100% - 4 * 28px) / 4.3); min-width: 250px; scroll-snap-align: start; background: var(--white); border: 1px solid var(--navy-100); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card > img { width: 100%; aspect-ratio: 1; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: 12px; }
.card p { font-size: .95rem; line-height: 1.75; margin-bottom: 18px; }
.card__link { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy-700); text-decoration: none; }
.card__link:hover { color: var(--gold-700); }
.card__link:hover svg { transform: translateX(3px); }
.card__link svg { transition: transform .2s; }
.scroller__controls { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.scroller__btn { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--navy-700); background: var(--white); color: var(--navy-700); display: grid; place-items: center; cursor: pointer; transition: background-color .2s, color .2s; }
.scroller__btn:hover:not(:disabled) { background: var(--navy-700); color: var(--white); }
.scroller__btn:disabled { opacity: .35; cursor: default; }
.scroller__pause .ico-play { display: none; }
.scroller__pause[aria-pressed="true"] .ico-play { display: inline; }
.scroller__pause[aria-pressed="true"] .ico-pause { display: none; }

/* Why choose */
.why { position: relative; background: linear-gradient(120deg, var(--navy-900), var(--navy-700) 60%, #34336f); color: var(--white); padding-top: clamp(56px, 7vw, 96px); overflow: hidden; }
.why__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; padding-bottom: clamp(48px, 6vw, 80px); }
.why h2 { color: var(--white); text-transform: uppercase; font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 3rem); margin-bottom: 28px; }
.why__tag { font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 700; color: var(--gold-300); }
.why p { color: rgba(255,255,255,.92); }
.why .btn { margin-top: 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 24px; text-align: center; }
.stats__num { display: block; font-size: clamp(2.3rem, 4.4vw, 3.8rem); font-weight: 800; line-height: 1.05; color: var(--white); font-variant-numeric: tabular-nums; }
.stats__label { display: block; margin-top: 6px; text-transform: uppercase; font-size: .85rem; letter-spacing: .06em; color: var(--gold-300); }
.why__strip { position: relative; height: clamp(90px, 14vw, 170px); }
.why__strip img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.why__strip::before { content: ""; position: absolute; inset: 0 0 auto; height: 55%; background: linear-gradient(var(--navy-700), rgba(36,35,81,0)); z-index: 1; }

/* Visit now band: navy → gold, as in the original */
.visit { background: linear-gradient(90deg, var(--navy-700) 0%, #5a4b56 35%, var(--gold-500) 85%); color: var(--white); padding-block: clamp(36px, 5vw, 56px); }
.visit__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.visit h2 { color: var(--white); font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; text-transform: uppercase; }
.visit p { margin: 4px 0 0; font-size: 1.1rem; }
.visit__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.visit__phone { display: inline-flex; align-items: center; gap: 10px; color: var(--white); font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 700; text-decoration: none; text-shadow: 0 1px 2px rgba(0,0,0,.3); }

/* Footer */
.site-footer { background: var(--charcoal); color: rgba(255,255,255,.78); padding-top: clamp(48px, 6vw, 80px); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h2 { color: var(--white); font-size: 1.5rem; font-weight: 600; margin-bottom: 28px; min-height: 1.2em; }
.site-footer address { font-style: normal; }
.site-footer address p { margin-bottom: 1em; }
.site-footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.site-footer address a { border-bottom: 1px solid rgba(255,255,255,.5); }
.site-footer a:hover { color: var(--gold-300); }
.site-footer nav li a, .footer__last li a { display: block; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.35); }
.footer__logo { display: block; width: min(100%, 238px); margin-bottom: 24px; border-bottom: 0 !important; line-height: 0; }
.footer__logo img { width: 100%; height: auto; }
.footer__copy { text-align: center; margin: clamp(40px, 6vw, 72px) 0 0; padding: 24px var(--gutter) 28px; font-size: .95rem; }
.footer__copy a { color: var(--gold-300); }

/* Floating contact rail + to-top */
.float-rail { position: fixed; right: 4px; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.float-rail__a { display: block; width: 40px; height: 40px; border-radius: 50%; transition: transform .2s; }
.float-rail__a:hover { transform: scale(1.1); }
.to-top { position: fixed; right: 20px; bottom: 28px; z-index: 90; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--navy-700); color: var(--white); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-md); transition: background-color .2s; }
.to-top:hover { background: var(--navy-500); }
.to-top[hidden] { display: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .card { flex-basis: calc((100% - 3 * 28px) / 3.3); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: inline-flex; }
  .primary-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-top: 1px solid var(--grey-200); box-shadow: var(--shadow-md); display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .primary-nav a { padding: 14px 4px; border-bottom: 1px solid var(--grey-200); }
  .primary-nav a.is-active { border-bottom-color: var(--navy-700); }
  .hero { min-height: 0; }
  .hero__media { width: 100%; opacity: .5; }
  .hero__media::after { background: linear-gradient(180deg, rgba(36,35,81,.85), rgba(36,35,81,.55)); }
  .about__grid, .mv__grid, .why__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 584px; margin-inline: auto; padding-bottom: 0; }
  .appointment-card { position: relative; left: auto; bottom: auto; width: 88%; margin: -72px auto 0; }
  .card { flex-basis: calc((100% - 2 * 28px) / 2.3); }
  .stats { max-width: 560px; margin-inline: auto; width: 100%; }
}
/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .btn-row .btn { flex: 1 1 100%; }
  .card { flex-basis: 82%; min-width: 0; }
  .scroller__track { gap: 16px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer h2 { margin-bottom: 14px; }
  .visit__cta { width: 100%; }
  .visit__cta .btn { flex: 1 1 100%; }
  .float-rail { top: auto; bottom: 16px; left: 14px; right: auto; transform: none; flex-direction: row; }
  .float-rail__a { width: 40px; height: 40px; }
  .float-rail__a svg { width: 100%; height: 100%; }
  .to-top { right: 14px; bottom: 16px; width: 46px; height: 46px; }
  .appointment-card { padding: 20px; }
  .appointment-card__phone { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
