/* ============================================================
   AB UroCare — styles.css
   ============================================================ */

/* 1. Custom properties
   ---------------------------------------------------------- */
:root {
  --ink:      #2D2D2D;
  --charcoal: #3C3C3C;
  --slate:    #4E5D66;
  --cloud:    #F4F5F7;
  --white:    #FFFFFF;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --text-h1:   clamp(2.5rem, 6vw, 5rem);
  --text-h2:   clamp(1.75rem, 3.5vw, 2.75rem);
  --text-h3:   clamp(1.125rem, 2vw, 1.375rem);
  --text-body: 1.0625rem;
  --text-sm:   0.875rem;

  --section-py: clamp(80px, 10vw, 160px);
  --container:  1240px;
}

/* 2. Reset
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
ul[role="list"], ol[role="list"] { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
address { font-style: normal; }

/* 3. Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--charcoal);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  display: block;
}

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

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

.bg-cloud    { background: var(--cloud); }
.bg-charcoal { background: var(--charcoal); color: var(--white); }
.bg-charcoal h1,
.bg-charcoal h2,
.bg-charcoal h3 { color: var(--white); }

.section-intro { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-intro .eyebrow { margin-bottom: 0.75rem; }
.section-intro h2 { margin-top: 0.5rem; margin-bottom: 1rem; }
.text-muted { color: var(--slate); max-width: 560px; }

/* 5. Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 200ms ease, color 200ms ease, opacity 150ms ease;
  min-height: 44px;
  white-space: nowrap;
}

.btn-primary  { background: var(--white);    color: var(--charcoal); }
.btn-primary:hover  { background: var(--cloud); }

.btn-outline  { border: 1px solid rgba(255,255,255,0.45); color: var(--white); }
.btn-outline:hover  { background: rgba(255,255,255,0.08); }

.btn-accent   { background: var(--slate);    color: var(--white); }
.btn-accent:hover   { background: #8a97a0; }

.btn-dark     { background: var(--charcoal); color: var(--white); }
.btn-dark:hover     { background: var(--ink); }

/* 6. Skip link
   ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -200%;
  left: 1rem;
  z-index: 999;
  background: var(--charcoal);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 2px;
  font-size: var(--text-sm);
  font-weight: 500;
}

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

/* 7. Header + nav
   ---------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.site-header.scrolled {
  border-bottom-color: rgba(0,0,0,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 5vw, 3rem);
  max-width: var(--container);
  margin-inline: auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  z-index: 300;
  position: relative;
}

.nav-logo img { height: 64px; width: auto; }

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  color: #555555;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  z-index: 300;
  position: relative;
}

.hamburger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 90vw);
  height: 100dvh;
  height: 100vh;
  background: var(--charcoal);
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.4,0,0.2,1), visibility 300ms;
  z-index: 200;
  padding: 5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  overflow-y: auto;
  visibility: hidden;
}

.nav-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-links a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--white);
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--slate);
  transition: width 200ms ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--slate); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* Desktop nav */
@media (min-width: 768px) {
  .nav-toggle,
  .nav-backdrop { display: none; }

  .nav-drawer {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    background: transparent;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 0;
    overflow: visible;
    visibility: visible;
    transition: none;
  }

  .nav-links {
    flex-direction: row;
    gap: 0;
    align-items: center;
  }

  .nav-links a {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #555555;
    padding: 0.5rem 0.875rem;
  }

  .nav-links a::after {
    bottom: 2px;
    left: 0.875rem;
    width: 0;
    background: #555555;
  }

  .nav-links a:hover::after,
  .nav-links a[aria-current="page"]::after {
    width: calc(100% - 1.75rem);
  }

  .nav-cta { margin-left: 1.5rem; }
}

/* 8. Hero (index.html)
   ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100dvh;
  min-height: 100vh;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: calc(4rem + clamp(80px, 10vw, 160px));
  padding-bottom: var(--section-py);
  width: 100%;
}

.hero-content { max-width: 680px; }

.hero .eyebrow { margin-bottom: 1rem; color: rgba(255,255,255,0.75); }
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero-line1 { white-space: normal; }

@media (min-width: 768px) {
  .hero-line1 { white-space: nowrap; }
}

.hero-sub {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 2.5rem;
  max-width: 480px;
  line-height: 1.65;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-monogram {
  font-family: var(--font-display);
  font-size: clamp(12rem, 30vw, 24rem);
  font-weight: 600;
  color: rgba(255,255,255,0.04);
  letter-spacing: -0.05em;
  line-height: 1;
  position: absolute;
  right: -1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* 9. Page header (inner pages)
   ---------------------------------------------------------- */
.page-header {
  background: var(--cloud);
  padding-top: calc(4.5rem + clamp(48px, 6vw, 80px));
  padding-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid rgba(157,170,179,0.25);
}

.page-header .eyebrow { margin-bottom: 0.75rem; }
.page-header h1 { margin-bottom: 0.5rem; }
.page-header .lead {
  font-size: 1.0625rem;
  color: var(--slate);
  max-width: 480px;
}

/* 10. Intro strip
   ---------------------------------------------------------- */
.intro-strip { padding-block: clamp(48px, 6vw, 80px); }

.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.intro-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.intro-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  color: var(--slate);
}

.intro-item h3 { font-size: 1.125rem; margin-bottom: 0.3rem; }
.intro-item p   { font-size: var(--text-sm); color: var(--slate); }

@media (min-width: 768px) {
  .intro-grid { grid-template-columns: repeat(3, 1fr); }

  .intro-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 1024px) {
  .intro-item { align-items: flex-start; }
}

/* 11. Services
   ---------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.service-card {
  border: 1px solid rgba(157,170,179,0.3);
  border-radius: 2px;
  padding: 1.75rem;
  background: var(--white);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.07);
}

.service-card h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(157,170,179,0.3);
}

.service-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }

.service-card ul li {
  font-size: var(--text-sm);
  color: var(--slate);
  padding-left: 1.25rem;
  position: relative;
}

.service-card ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--slate);
  opacity: 0.55;
}

@media (min-width: 768px)  { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

/* 12. Chips
   ---------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--slate);
  border-radius: 100px;
  font-size: var(--text-sm);
  letter-spacing: 0.03em;
  color: var(--charcoal);
  min-height: 44px;
}

/* 13. Doctor teaser
   ---------------------------------------------------------- */
.doctor-teaser {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.doctor-portrait {
  width: 100%;
  aspect-ratio: 2/3;
  max-height: 520px;
  object-fit: cover;
  object-position: top center;
  border-radius: 2px;
  border: 2px solid #3C3C3C;
}

.doctor-bio .eyebrow { margin-bottom: 0.75rem; }
.doctor-bio h2 { margin-bottom: 0.4rem; }

.doctor-bio .quals {
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  color: var(--slate);
  margin-bottom: 1.5rem;
}

.doctor-bio p { margin-bottom: 1.5rem; max-width: 540px; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--slate);
  padding-bottom: 2px;
  transition: gap 200ms ease, border-color 200ms ease;
}

.read-more:hover { gap: 0.75rem; border-color: var(--charcoal); }

@media (min-width: 768px) {
  .doctor-teaser { grid-template-columns: 1fr 2fr; }
}

/* 14. CTA band
   ---------------------------------------------------------- */
.cta-band {
  padding-block: clamp(60px, 8vw, 100px);
  text-align: center;
}

.cta-band h2 { color: var(--white); margin-bottom: 0.75rem; }

.cta-band p {
  color: rgba(255,255,255,0.65);
  max-width: 420px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

/* 15. About — bio
   ---------------------------------------------------------- */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.bio-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}

.bio-content p { margin-bottom: 1.25rem; }
.bio-content p:last-child { margin-bottom: 0; }

@media (min-width: 1024px) {
  .bio-grid { grid-template-columns: 180px 1fr; gap: 4rem; }
  .bio-label-wrap { position: sticky; top: 7rem; }
}

/* 16. Timeline
   ---------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--slate);
  opacity: 0.35;
}

.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.4rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--slate);
}

.timeline-item h3 { font-size: 1.0625rem; margin-bottom: 0.25rem; }
.timeline-item p  { font-size: var(--text-sm); color: var(--slate); }

/* 17. Expertise grid (about)
   ---------------------------------------------------------- */
.expertise-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.expertise-card {
  border: 1px solid rgba(157,170,179,0.3);
  border-radius: 2px;
  padding: 1.5rem 1.75rem;
}

.expertise-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(157,170,179,0.25);
}

.expertise-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.375rem; }

.expertise-card ul li {
  font-size: var(--text-sm);
  color: var(--ink);
  padding-left: 1.25rem;
  position: relative;
}

.expertise-card ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--slate);
}

@media (min-width: 768px)  { .expertise-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .expertise-grid { grid-template-columns: repeat(3, 1fr); } }

/* 18. Values (about)
   ---------------------------------------------------------- */
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(157,170,179,0.2);
  border: 1px solid rgba(157,170,179,0.2);
  border-radius: 2px;
  overflow: hidden;
}

.value-item {
  background: var(--cloud);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.value-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--slate);
  opacity: 0.45;
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
}

.value-item h3 { margin-bottom: 0.5rem; }
.value-item p  { font-size: var(--text-sm); color: var(--slate); max-width: 240px; margin-inline: auto; }

@media (min-width: 768px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }

/* 19. Contact
   ---------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-details h2 { margin-bottom: 2rem; }

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  color: var(--slate);
}

.contact-line a {
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.contact-line a:hover { border-color: var(--slate); }

.contact-line p { font-size: 0.9375rem; line-height: 1.65; }

.hours-note {
  background: var(--cloud);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  border-left: 2px solid var(--slate);
}

.hours-note h3 { font-size: 0.9375rem; margin-bottom: 0.3rem; }
.hours-note p  { font-size: var(--text-sm); color: var(--slate); }

.map-wrapper {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(157,170,179,0.3);
  aspect-ratio: 16/10;
}

.map-wrapper iframe { width: 100%; height: 100%; display: block; border: none; }

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .map-wrapper  { aspect-ratio: 4/3; }
}

/* 20. Footer
   ---------------------------------------------------------- */
.site-footer {
  background: var(--charcoal);
  color: var(--white);
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(48px, 6vw, 80px) clamp(1.25rem, 5vw, 3rem);
  border-bottom: 1px solid rgba(157,170,179,0.15);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.75rem;
}

.footer-brand p { font-size: var(--text-sm); color: rgba(255,255,255,0.5); max-width: 260px; }

.footer-col h3 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 1rem;
}

.footer-col address {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  line-height: 1.9;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-col address a,
.footer-col ul a {
  color: rgba(255,255,255,0.65);
  transition: color 200ms ease;
}

.footer-col address a:hover,
.footer-col ul a:hover { color: var(--white); }

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul a { font-size: var(--text-sm); }

.footer-bottom {
  max-width: var(--container);
  margin-inline: auto;
  padding: 1.25rem clamp(1.25rem, 5vw, 3rem);
}

.footer-bottom p { font-size: var(--text-sm); color: rgba(255,255,255,0.3); }

@media (min-width: 768px) {
  .footer-main { grid-template-columns: 2fr 1fr 1fr; }
}

/* 21. Legal pages
   ---------------------------------------------------------- */
.legal-content {
  max-width: 760px;
}

.legal-content h2 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(157,170,179,0.25);
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p,
.legal-content ul,
.legal-content address {
  color: var(--ink);
  margin-bottom: 1rem;
  max-width: 65ch;
}

.legal-content ul {
  padding-left: 1.4rem;
  list-style: disc;
}

.legal-content ul li { margin-bottom: 0.35rem; }

.legal-content a {
  color: var(--charcoal);
  border-bottom: 1px solid var(--slate);
  transition: border-color 200ms ease;
}

.legal-content a:hover { border-color: var(--charcoal); }

.legal-content address { font-style: normal; line-height: 1.9; }

/* 22. Animations
   ---------------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.stagger.visible > * { opacity: 1; transform: translateY(0); }

.stagger.visible > *:nth-child(1) { transition-delay:   0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 100ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 200ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 300ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 400ms; }

/* 22. Focus + reduced-motion
   ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--slate);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .fade-in,
  .stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
