/* ==========================================================================
   Dr SC Fayers Medical Centre
   Editorial, hairline-driven design system. No frameworks.
   ========================================================================== */

:root {
  --ink: #1c2b33;
  --ink-soft: #3b4a52;
  --paper: #faf8f4;
  --teal: #0c7aa6;
  --teal-deep: #085e82;
  --footer-bg: #0d3a4d;
  --mist: #e9f1f5;
  --line: #ddd6c9;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 4px;
  --wrap: 1180px;
}

@media (prefers-color-scheme: dark) {
  /* Brand is intentionally light-paper across modes; no dark override. */
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

ul, ol, dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

dd {
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Focus states, visible everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Eyebrows & lede text ---- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin: 0 0 0.9em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  line-height: 1.12;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35em;
}

.lede {
  font-size: 1.1rem;
  max-width: 46ch;
}

/* ---- Buttons & links ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  min-height: 44px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--teal-deep);
}

.btn-whatsapp {
  gap: 0.55em;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-whatsapp .wa-icon {
  color: #25d366;
  flex-shrink: 0;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.7);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15em;
}

.link-arrow span {
  color: var(--teal);
  transition: transform 0.2s ease;
}

.link-arrow:hover span,
.link-arrow:focus-visible span {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .link-arrow span {
    transition: none;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

/* Blur lives on a pseudo-element, not the header itself, so the header
   never becomes a containing block for its fixed-position mobile nav
   (backdrop-filter on an ancestor would otherwise collapse that box). */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(250, 248, 244, 0.92);
}

@supports (backdrop-filter: blur(6px)) {
  .site-header::before {
    backdrop-filter: blur(6px);
  }
}

.site-header.is-scrolled::before {
  background: rgba(250, 248, 244, 0.98);
}

.site-header.is-scrolled {
  border-bottom-color: #c9c0ac;
}

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

.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
}

.wordmark-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}

.wordmark-sub {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal);
  margin-top: 0.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn):focus-visible {
  border-bottom-color: var(--teal);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    top: 68px;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem 2rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    border-top: 1px solid var(--line);
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  .site-nav a:not(.btn) {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
  }

  .nav-cta {
    margin-top: 1.25rem;
    width: 100%;
  }

  @media (prefers-reduced-motion: reduce) {
    .site-nav {
      transition: none;
    }
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 0;
}

.hero-main {
  position: relative;
  overflow: hidden;
  background: #0d2a38;
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img,
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(9, 30, 41, 0.94) 0%, rgba(9, 30, 41, 0.82) 45%, rgba(9, 30, 41, 0.55) 100%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-main .eyebrow {
  color: #8fd0e8;
}

.hero-main h1 {
  color: #ffffff;
}

.hero-copy .lede {
  max-width: 50ch;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 1.75rem;
}

.hero-photo img {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  position: relative;
}

.hero-photo {
  position: relative;
  padding: 0 0 14px 14px;
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 14px 0 0 0;
  border: 1px solid #4da7cc;
  border-radius: var(--radius);
}

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

  .hero-photo {
    max-width: 320px;
    margin: 0.5rem 0 0;
  }
}

/* ---- Fact strip ---- */
.fact-strip {
  border-bottom: 1px solid var(--line);
}

.fact-strip-inner {
  display: flex;
  flex-wrap: wrap;
}

.fact {
  flex: 1 1 260px;
  padding: 1.75rem 2rem 1.75rem 0;
  border-left: 1px solid var(--line);
  padding-left: 2rem;
}

.fact:first-child {
  border-left: none;
  padding-left: 0;
}

.fact-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin: 0 0 0.5em;
}

.fact-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0;
}

.fact-value--num {
  font-size: 1.6rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .fact {
    flex: 1 1 100%;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
  }

  .fact:first-child {
    border-top: none;
    padding-top: 1.75rem;
  }
}

/* ==========================================================================
   Section shells
   ========================================================================== */

section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

[id] {
  scroll-margin-top: 88px;
}

.about {
  background: var(--mist);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 3rem;
}

/* ==========================================================================
   About
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about-photo img {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-copy p {
  max-width: 58ch;
}

.detail-list {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.detail-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-left: 1.4rem;
}

.detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.55rem;
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 50%;
}

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

  .about-photo img {
    aspect-ratio: 16 / 10;
    max-width: min(420px, 100%);
  }
}

/* ==========================================================================
   Services, editorial index
   ========================================================================== */

.service-index {
  border-bottom: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.5rem 3rem;
  align-items: baseline;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.service-name {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.35rem;
  color: var(--ink);
}

.service-desc {
  color: var(--ink-soft);
  max-width: 52ch;
}

@media (max-width: 720px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 1.5rem 0;
  }
}

/* ==========================================================================
   First visit
   ========================================================================== */

.first-visit {
  background: var(--mist);
}

.first-visit-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.first-visit-photo img {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.step-list {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.step-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  color: var(--teal);
  line-height: 1;
}

.step-body h3 {
  margin-bottom: 0.35em;
}

.step-body p {
  margin: 0;
  max-width: 48ch;
}

.closing-line {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}

.closing-line a {
  font-weight: 600;
}

@media (max-width: 860px) {
  .first-visit-grid {
    grid-template-columns: 1fr;
  }

  .first-visit-photo {
    max-width: 380px;
  }
}

/* ==========================================================================
   Advice band
   ========================================================================== */

.advice-band {
  padding: clamp(2rem, 4vw, 2.75rem) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.advice-inner p {
  margin: 0 0 0.6em;
  max-width: 72ch;
}

.advice-inner p:last-child {
  margin-bottom: 0;
}

.fine-print {
  font-size: 0.88rem;
  color: var(--ink-soft);
  opacity: 0.85;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-list {
  border-top: 1px solid var(--line);
}

.contact-row {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
}

.contact-row dt {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
}

.contact-row dd {
  color: var(--ink);
}

.contact-row a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.contact-row a:hover,
.contact-row a:focus-visible {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.contact-map iframe {
  width: 100%;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
}

.map-link {
  margin-top: 1rem;
}

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

  .contact-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--footer-bg);
  color: #d7e4ea;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.site-footer a {
  color: #d7e4ea;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-wordmark {
  margin: 0 0 1rem;
}

.footer-wordmark .wordmark-name {
  color: #ffffff;
}

.footer-wordmark .wordmark-sub {
  color: #7fc4e0;
}

.footer-col p {
  color: #b9cdd6;
}

.footer-heading {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7fc4e0;
  margin-bottom: 1.1rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  color: #9db8c3;
}

.footer-bottom p {
  margin: 0;
  color: inherit;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
