/* ==========================================================
   New Sherwood Medical Clinic — Stylesheet
   Colors/typography derived from design.md
   ========================================================== */

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

:root {
  --green:        #2C4A3B;
  --green-hover:  #3A6150;
  --green-light:  #E8F0EB;
  --sage:         #6B8A5A;
  --earth:        #5B4632;
  --earth-hover:  #6F5540;
  --bg:           #FDFBF8;
  --surface:      #F3EFE8;
  --white:        #FFFFFF;
  --border:       #D9D3C8;
  --border-sub:   #EAE6DF;
  --text:         #2B2B28;
  --muted:        #5C5C55;
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;
  --max:   1200px;
  --pad:   48px;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.eyebrow { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.eyebrow.light { color: rgba(253,251,248,0.65); }
.rule { width: 40px; height: 3px; background: var(--earth); margin: 16px 0 28px; }
.rule.center { margin: 16px auto 28px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--green); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; font-size: 15px; font-family: var(--sans); font-weight: 500;
  border-radius: 6px; border: 1.5px solid var(--green);
  background: var(--green); color: #fff; text-decoration: none; cursor: pointer;
  transition: all 200ms ease; line-height: 1; white-space: nowrap;
}
.btn:hover { background: var(--green-hover); transform: translateY(-1px); }
.btn.lg { padding: 14px 32px; font-size: 16px; }
.btn.sm { padding: 6px 16px; font-size: 14px; }
.btn.uppercase { text-transform: uppercase; letter-spacing: 0.07em; }
.btn.outline { background: transparent; color: var(--green); }
.btn.outline:hover { background: var(--green-light); }
.btn.outline-light { background: transparent; color: #fff; border-color: rgba(253,251,248,0.85); }
.btn.outline-light:hover { background: rgba(253,251,248,0.15); }
.btn.earth { background: var(--earth); border-color: var(--earth); color: #fff; }
.btn.earth:hover { background: var(--earth-hover); }

/* Topbar + Nav */
.topbar {
  background: var(--green); color: #fff; font-size: 12px; padding: 7px 0;
}
.topbar .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.topbar span { display: flex; align-items: center; gap: 5px; opacity: 0.75; }

header { position: sticky; top: 0; z-index: 200; }
nav.main-nav {
  background: #fff; border-bottom: 1px solid transparent; transition: all 200ms ease;
}
nav.main-nav.scrolled { border-bottom: 1px solid var(--border-sub); box-shadow: 0 2px 8px rgba(44,74,59,0.08); }
nav.main-nav .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 32px; }
.logo-link { display: flex; align-items: center; gap: 20px; text-decoration: none; margin-left: -32px; }
.logo-icon { height: 48px; width: auto; display: block; }
.logo-divider { width: 2px; height: 44px; background: var(--earth); flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.logo-text-primary { font-family: 'Playfair Display', serif; font-size: 21px; font-weight: 700; color: var(--green); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.logo-text-secondary { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 500; letter-spacing: 0.2em; color: var(--earth); text-transform: uppercase; margin-top: 5px; white-space: nowrap; }
.logo-rule { width: 14px; height: 1px; background: var(--earth); display: inline-block; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 15px; color: var(--text); text-decoration: none; transition: color 120ms ease; }
.nav-links a:hover { color: var(--sage); }
.nav-links-book { display: none; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: -8px;
  background: transparent; border: none; border-radius: 6px;
  color: var(--green); cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Hero */
.hero {
  position: relative; height: 88vh; min-height: 560px; background: var(--green); overflow: hidden;
}
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.28; }
.hero .content {
  position: absolute; bottom: 12%; left: max(48px, calc(50% - 560px));
  background: rgba(44,74,59,0.90); padding: 44px 52px; max-width: 530px;
}
.hero h1 { color: #fff; font-size: clamp(2rem,3.5vw,2.75rem); line-height: 1.2; margin-bottom: 8px; }
.hero p { color: rgba(253,251,248,0.85); margin-bottom: 32px; font-size: 17px; }

/* Welcome */
.welcome { background: var(--green); padding: 80px 0; position: relative; overflow: hidden; }
.welcome .wrap { display: grid; grid-template-columns: 260px 1fr; gap: 64px; align-items: center; }
.welcome img.logo-ghost { width: 220px; height: auto; filter: brightness(0) invert(1); opacity: 0.88; }
.welcome h2 { color: #fff; font-size: clamp(1.75rem,2.5vw,2.25rem); }
.welcome p { color: rgba(253,251,248,0.8); margin-bottom: 32px; font-size: 17px; }

/* Services */
.services { padding: 80px 0; background: var(--bg); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.75rem,2.5vw,2.25rem); }
.service-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.service-card {
  position: relative; display: block; border-radius: 10px; overflow: hidden; height: 280px; cursor: pointer;
  color: inherit; text-decoration: none;
  transition: transform 200ms ease;
}
.service-card:hover { transform: scale(1.02); }
.service-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 350ms ease;
}
.service-card:hover img { transform: scale(1.06); }
.service-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(44,74,59,0.78) 0%, rgba(44,74,59,0.3) 60%, transparent 100%);
  transition: background 200ms ease;
}
.service-card:hover .overlay {
  background: linear-gradient(to top, rgba(44,74,59,0.88) 0%, rgba(44,74,59,0.5) 60%, transparent 100%);
}
.service-card .info { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; }
.service-card h3 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.service-card p { font-size: 13px; color: rgba(253,251,248,0.85); margin-bottom: 14px; }
.service-card .tag {
  display: inline-block; padding: 7px 18px; border: 1.5px solid rgba(253,251,248,0.7);
  color: #fff; font-size: 13px; font-weight: 500; border-radius: 6px; transition: background 120ms ease;
}
.service-card:hover .tag { background: rgba(253,251,248,0.15); }

/* Approach */
.approach { padding: 80px 0; background: var(--surface); }
.approach-grid {
  display: grid; grid-template-columns: repeat(3,1fr); background: var(--white);
  border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px rgba(44,74,59,0.10);
}
.approach-step {
  padding: 40px 28px; text-align: center; position: relative;
  border-right: 1px solid var(--border-sub);
}
.approach-step:last-child { border-right: none; }
.approach-step .num {
  position: absolute; top: 8px; left: 0; right: 0; font-family: var(--serif);
  font-size: 110px; font-weight: 700; color: var(--border-sub); line-height: 1;
}
.approach-step .body { position: relative; z-index: 1; padding-top: 48px; }
.approach-step h3 { font-size: 20px; margin-bottom: 12px; }
.approach-step p { font-size: 14px; color: var(--muted); }
.center-cta { text-align: center; margin-top: 40px; }

/* Accepting Patients / Why Choose Us (two-column) */
.two-col { padding: 80px 0; }
.two-col.surface { background: var(--surface); }
.two-col .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.two-col h2 { font-size: clamp(1.75rem,2.5vw,2.25rem); line-height: 1.2; }
.two-col p { color: var(--muted); margin-bottom: 16px; font-size: 16px; }
.two-col .media { border-radius: 24px; overflow: hidden; box-shadow: 0 8px 32px rgba(44,74,59,0.12); }
.two-col .media img { width: 100%; height: 100%; object-fit: cover; }

/* Feature list (Why Choose Us) */
.feature-list { display: flex; flex-direction: column; gap: 24px; margin-bottom: 24px; }
.feature-item { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--green-light);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
}
.feature-item h4 { font-family: var(--serif); font-size: 17px; color: var(--green); margin-bottom: 4px; }
.feature-item p { font-size: 14px; color: var(--muted); margin: 0; }

/* Contact CTA + Book CTA */
.contact-cta {
  background: var(--green); padding: 80px 0; text-align: center; color: #fff;
}
.contact-cta h2 { color: #fff; font-size: clamp(1.75rem,2.5vw,2.5rem); }
.contact-cta p { color: rgba(253,251,248,0.8); margin: 0 auto 36px; max-width: 520px; font-size: 17px; }
.contact-cta .actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.book-cta { position: relative; overflow: hidden; padding: 100px 0; }
.book-cta img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.22; }
.book-cta .tint { position: absolute; inset: 0; background: rgba(44,74,59,0.82); }
.book-cta .wrap { position: relative; z-index: 1; max-width: 580px; }
.book-cta h2 { color: #fff; font-size: clamp(1.75rem,3vw,2.75rem); line-height: 1.2; }
.book-cta p { color: rgba(253,251,248,0.85); margin-bottom: 36px; font-size: 17px; }

/* Location / Find Us */
.location { padding: 80px 0; background: var(--bg); }
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.location-info p { margin-bottom: 16px; font-size: 16px; color: var(--muted); line-height: 1.5; }
.location-info p strong { display: block; color: var(--green); font-family: var(--serif); font-size: 15px; margin-bottom: 2px; }
.location-info a { color: var(--green); text-decoration: none; font-weight: 500; }
.location-info a:hover { color: var(--sage); }
.map-embed { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 32px rgba(44,74,59,0.12); }
.map-embed iframe { display: block; width: 100%; height: 360px; border: 0; }

/* Partners */
.partners { padding: 64px 0; background: var(--bg); }
.partner-row { display: flex; justify-content: center; align-items: center; gap: 48px; flex-wrap: wrap; }
.partner-row span {
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-align: center; max-width: 160px; line-height: 1.4;
}

/* Footer */
footer { background: var(--green); color: #fff; position: relative; overflow: hidden; }
footer .wrap { position: relative; z-index: 1; padding: 64px var(--pad) 32px; }
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px; padding-bottom: 40px;
  border-bottom: 1px solid rgba(253,251,248,0.12); margin-bottom: 24px;
}
.footer-grid img { height: 64px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: 0.85; }
.footer-grid p { font-size: 14px; color: rgba(253,251,248,0.72); }
.footer-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(253,251,248,0.65); margin-bottom: 14px;
}
.footer-grid a { color: rgba(253,251,248,0.75); text-decoration: none; font-size: 14px; display: block; margin-bottom: 8px; }
.footer-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.hours-row { display: flex; justify-content: space-between; margin-bottom: 10px; gap: 16px; }
.hours-row span:first-child { font-size: 14px; color: rgba(253,251,248,0.65); }
.hours-row span:last-child { font-size: 14px; font-weight: 500; white-space: nowrap; }
.copyright { font-size: 12px; color: rgba(253,251,248,0.6); text-align: center; }

/* Responsive */
@media (max-width: 900px) {
  :root { --pad: 24px; }
  .service-grid, .approach-grid, .two-col .wrap, .welcome .wrap, .footer-grid, .location-grid {
    grid-template-columns: 1fr;
  }
  .approach-step { border-right: none; border-bottom: 1px solid var(--border-sub); }
  .approach-step:last-child { border-bottom: none; }

  .nav-toggle { display: flex; }
  .nav-book-inline { display: none; }
  .logo-link { gap: 14px; margin-left: -16px; }
  .logo-icon { height: 36px; }
  .logo-divider { height: 32px; }
  .logo-text-primary { font-size: 16px; letter-spacing: 0.03em; }
  .logo-text-secondary { font-size: 8px; letter-spacing: 0.14em; gap: 5px; margin-top: 3px; }
  .logo-rule { width: 10px; }
  .nav-links {
    flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border-sub);
    box-shadow: 0 12px 24px rgba(44,74,59,0.14);
    padding: 4px 24px 0; max-height: 0; overflow: hidden;
    transition: max-height 250ms ease, padding 250ms ease;
  }
  .nav-links.open { max-height: 420px; padding: 12px 24px 20px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--border-sub); }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-links-book { display: block; margin-top: 12px; }
  .nav-links-book .btn { width: 100%; }

  .hero .content { left: 24px; right: 24px; max-width: none; padding: 32px; }
}

/* Focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
  border-radius: 4px;
}
.service-card:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--sage);
}
