/* ============================================
   Doctors To Home (D2H) — Redesign
   Design tokens — distinct from Artificial Eyes Uganda
   ============================================ */
:root {
  --forest: #0E3E39;
  --forest-deep: #082B27;
  --paper: #FBF7EF;
  --paper-deep: #F2ECDC;
  --coral: #E8643A;
  --coral-deep: #C24E28;
  --sun: #7FE0C6;
  --line: rgba(31, 61, 46, 0.13);
  --line-light: rgba(251, 247, 239, 0.16);
  --ink-soft: #3A4A3F;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1180px;
}

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 14.6px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--coral); display: inline-block; border-radius: 2px; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 100px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--forest-deep); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--forest);
  flex-shrink: 0; position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px;
  border: 2px dashed var(--sun);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.brand small { display: block; font-family: var(--font-body); font-size: 12.3px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); opacity: 0.65; margin-top: 2px; }

nav.primary { display: flex; align-items: center; gap: 28px; font-size: 16.2px; font-weight: 600; }
nav.primary a { color: var(--ink-soft); position: relative; padding: 4px 0; }
nav.primary a.active { color: var(--forest-deep); }
nav.primary a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--coral); border-radius: 2px; }
nav.primary a:hover { color: var(--coral-deep); }

.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15.7px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; font-family: var(--font-body); }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--forest-deep); background: transparent; }
.btn-ghost:hover { border-color: var(--forest-deep); }
.btn-light { background: var(--paper); color: var(--forest-deep); }
.btn-light:hover { transform: translateY(-1px); }

/* ============ Sections ============ */
section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.dark { background: var(--forest); color: var(--paper); }
.dark .eyebrow { color: var(--sun); }
.dark .eyebrow::before { background: var(--sun); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* ============ Hero ============ */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; background: var(--forest); color: var(--paper); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.32; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, var(--forest) 22%, rgba(31,61,46,0.6) 55%, rgba(31,61,46,0.15) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 620px; }
.hero .eyebrow { color: var(--sun); margin-bottom: 20px; }
.hero .eyebrow::before { background: var(--sun); }
.hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.08; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--sun); }
.hero p.lede { font-size: 17px; color: rgba(251,247,239,0.82); max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Connector arc motif — signature element for "bridging distance" */
.connector-arc { position: absolute; pointer-events: none; }

/* ============ Stat strip ============ */
.stat-strip { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-strip .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { text-align: center; padding: 32px 16px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-display); font-size: 32px; color: var(--coral-deep); display: block; }
.stat .label { font-size: 14.6px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft); opacity: 0.75; margin-top: 4px; }

/* ============ Cards ============ */
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(31,61,46,0.1); }
.card .icon-tag { width: 38px; height: 38px; border-radius: 11px; background: var(--paper-deep); color: var(--coral-deep); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; font-size: 17px; font-weight: 700; font-family: var(--font-display); }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 16.2px; margin-bottom: 0; }
.card a.card-link { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 15.7px; font-weight: 700; color: var(--coral-deep); }

.photo-frame { border-radius: 16px; overflow: hidden; position: relative; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ============ Pull quote / testimonial ============ */
.pull-quote { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.4; font-weight: 500; }
.pull-quote .attribution { display: block; font-family: var(--font-body); font-size: 15.7px; font-weight: 600; color: var(--sun); margin-top: 16px; }

.testimonial-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.testimonial-card p.quote { font-family: var(--font-display); font-size: 16.5px; color: var(--forest-deep); margin-bottom: 14px; }
.testimonial-card .who { font-size: 15.1px; font-weight: 700; color: var(--coral-deep); }

/* ============ Subscription pricing table ============ */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; position: relative; }
.price-card.featured { background: var(--forest); color: var(--paper); border-color: var(--forest); }
.price-card.featured .badge { position: absolute; top: -12px; left: 28px; background: var(--coral); color: #fff; font-size: 12.9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; }
.price-card h3 { font-size: 19px; margin-bottom: 4px; }
.price-card .tier-tag { font-size: 14px; color: var(--coral-deep); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.price-card.featured .tier-tag { color: var(--sun); }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.price-card li { display: flex; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15.1px; }
.price-card.featured li { border-top: 1px solid var(--line-light); }
.price-card li:first-child { border-top: none; }
.price-card .check { color: var(--coral-deep); flex-shrink: 0; }
.price-card.featured .check { color: var(--sun); }

/* ============ Process / how it works ============ */
.process-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.process-step { text-align: center; padding: 20px 14px; border-top: 3px solid var(--coral); }
.process-step .step-label { font-size: 14.6px; letter-spacing: 0.03em; font-weight: 700; color: var(--forest-deep); }

/* ============ Tabs (services detail) ============ */
.tab-buttons { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; }
.tab-buttons button { font-family: var(--font-body); font-size: 16.2px; font-weight: 700; color: var(--ink-soft); background: none; border: none; padding: 12px 18px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-buttons button.active { color: var(--coral-deep); border-bottom-color: var(--coral); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============ Sticky sub-nav ============ */
.subnav { position: sticky; top: 100px; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav a { font-size: 15.7px; font-weight: 700; color: var(--ink-soft); padding: 16px 18px; white-space: nowrap; border-bottom: 2px solid transparent; flex-shrink: 0; display: inline-block; }
.subnav a:hover { color: var(--forest-deep); }
.subnav a.active { color: var(--coral-deep); border-bottom-color: var(--coral); }

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact-field { margin-bottom: 18px; }
.contact-field label { display: block; font-size: 14.6px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px; }
.contact-field input, .contact-field select, .contact-field textarea {
  width: 100%; font-family: var(--font-body); font-size: 16.8px; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--forest-deep);
}
.contact-field input:focus, .contact-field select:focus, .contact-field textarea:focus { outline: 2px solid var(--coral); outline-offset: 1px; }
.contact-info-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line-light); }
.contact-info-item .icon-dot { width: 38px; height: 38px; border-radius: 11px; background: var(--coral); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16.8px; }
.contact-info-item h4 { font-size: 16.8px; margin-bottom: 4px; }
.contact-info-item p { color: rgba(251,247,239,0.75); font-size: 16.2px; margin: 0; }
.map-frame { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-light); aspect-ratio: 16/9; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ============ CTA band ============ */
.cta-band { background: var(--coral); color: #fff; border-radius: 22px; padding: 52px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta-band h2 { color: #fff; font-size: 28px; }
.cta-band p { color: rgba(255,255,255,0.88); margin-bottom: 0; }

/* ============ Footer ============ */
footer.site-footer { background: var(--forest); color: rgba(251,247,239,0.7); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 48px; }
.footer-grid h4 { color: var(--paper); font-size: 15.7px; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-body); font-weight: 700; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 11px; font-size: 16.2px; }
.footer-grid a:hover { color: var(--sun); }
.footer-brand .brand { color: var(--paper); margin-bottom: 16px; }
.footer-brand p { font-size: 16.2px; max-width: 320px; color: rgba(251,247,239,0.6); }
.footer-bottom { margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line-light); display: flex; justify-content: space-between; font-size: 14.6px; color: rgba(251,247,239,0.45); }
.social-row { display: flex; gap: 14px; margin-top: 16px; }
.social-row a { width: 34px; height: 34px; border: 1px solid var(--line-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13.4px; }
.social-row a:hover { border-color: var(--sun); color: var(--sun); }

/* ============ Page header ============ */
.page-header { background: var(--forest); color: var(--paper); padding: 48px 0 36px; position: relative; overflow: hidden; }
.page-header h1 { font-size: clamp(30px, 4vw, 42px); margin-top: 14px; }
.page-header .lede { color: rgba(251,247,239,0.75); max-width: 560px; margin-top: 14px; font-size: 17.4px; }
.breadcrumb { font-size: 14.6px; color: rgba(251,247,239,0.5); margin-top: 24px; }
.breadcrumb a:hover { color: var(--sun); }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--forest); color: var(--paper); padding: 8px 16px; border-radius: 8px; z-index: 100; }

@media (max-width: 980px) {
  nav.primary { display: none; }
  .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .grid-3, .pricing-grid { grid-template-columns: 1fr; }
  .stat-strip .wrap { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: none; }
  .process-rail { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; padding: 36px 26px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }


/* ===== Mobile navigation (hamburger) ===== */
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--forest-deep); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.header-actions { display: flex; align-items: center; gap: 12px; }
@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .site-header .wrap > .btn-primary { display: none; }
  nav.primary { display: none; position: absolute; top: 100px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 6px 0; box-shadow: 0 14px 30px rgba(31,61,46,0.10); }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 14px 32px; font-size: 17.9px; }
  nav.primary a.active::after { display: none; }
}

/* ===== Hero photo treatment ===== */
.hero-bg { opacity: 0.62; background-position: center; }
.hero-bg::after { background: linear-gradient(180deg, rgba(8,43,39,0.40) 0%, rgba(8,43,39,0.68) 100%); }

/* ===== Page header photo ===== */
.page-header.has-photo { min-height: 40vh; display: flex; align-items: flex-end; }
.page-header .wrap { position: relative; z-index: 2; }
.page-header .hero-bg { opacity: 0.85; }
.page-header .hero-bg::after { background: linear-gradient(180deg, rgba(8,43,39,0.20) 0%, rgba(8,43,39,0.55) 100%); }

/* ===== Team grid ===== */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 36px; }
.team-member img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 16px; margin-bottom: 12px; }
.team-member .name { font-family: var(--font-display); font-size: 17.9px; font-weight: 600; color: var(--forest-deep); }
.team-member .role { font-size: 14px; color: var(--coral-deep); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }
@media (max-width: 980px) { .team-grid { grid-template-columns: 1fr 1fr; } }

/* ===== Readability ===== */
body { font-weight: 500; }

/* ===== Brand logo ===== */
.brand-logo { height: 78px; width: auto; display: block; }
.footer-brand .brand-logo { height: 46px; }
@media (max-width: 980px) { .brand-logo { height: 58px; } }

/* font-scaled */

/* ===== Footer polish ===== */
footer.site-footer { color: rgba(251,247,239,0.85); }
.footer-grid li { color: rgba(251,247,239,0.85); }
.footer-brand p { color: rgba(251,247,239,0.82); }
.footer-bottom { color: rgba(251,247,239,0.62); }
.footer-brand .brand-logo { height: 64px; }
.social-row { gap: 12px; margin-top: 18px; }
.social-row a { width: 40px; height: 40px; color: rgba(251,247,239,0.85); border-color: rgba(251,247,239,0.28); }
.social-row a svg { width: 18px; height: 18px; }
.social-row a:hover { border-color: var(--sun); color: var(--sun); background-color: rgba(127,224,198,0.12); }


/* ===== Page header photo — taller & brighter ===== */
.page-header.has-photo { min-height: 50vh; }
.page-header .hero-bg { opacity: 0.95; }
.page-header .hero-bg::after { background: linear-gradient(180deg, rgba(8,43,39,0.15) 0%, rgba(8,43,39,0.72) 100%); }


/* ===== Homepage hero carousel ===== */
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease; }
.hero-slide.active { opacity: 0.62; }
.hero-slides::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,43,39,0.40) 0%, rgba(8,43,39,0.68) 100%); }


/* ===== Photo carousel (DiaspoCare, Plans) ===== */
.carousel { position: relative; overflow: hidden; border-radius: 18px; }
.carousel-track { display: flex; transition: transform .5s ease; }
.carousel-slide { min-width: 100%; }
.carousel-slide img { width: 100%; height: 540px; object-fit: cover; display: block; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(251,247,239,0.92); color: var(--forest-deep); font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.carousel-btn.prev { left: 14px; } .carousel-btn.next { right: 14px; }
.carousel-btn:hover { background: #fff; }
.carousel-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.carousel-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(251,247,239,0.5); cursor: pointer; padding: 0; }
.carousel-dots button.active { background: var(--paper); }
@media (max-width: 980px) { .carousel-slide img { height: 380px; } }