/* ============================================================
   Dr. David Finke, MD — Site v2 "Olive & Ivory"
   Warm, organic, quietly luxurious.

   Palette:
     --cream   #F9F7F1   page background (ivory)
     --sand    #E6E4D5   soft section blocks / cards
     --olive   #7D8B5F   accent, buttons, links
     --pine    #3A3D2E   headings, header & footer
   Fonts:
     Cormorant Garamond (headlines) + Jost (body) — self-hosted
   ============================================================ */

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900; /* variable */
  font-display: swap;
  src: url('../fonts/jost-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Jost';
  font-style: italic;
  font-weight: 100 900; /* variable */
  font-display: swap;
  src: url('../fonts/jost-italic-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700; /* variable */
  font-display: swap;
  src: url('../fonts/cormorant-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 700; /* variable */
  font-display: swap;
  src: url('../fonts/cormorant-italic-latin.woff2') format('woff2');
}

:root {
  --cream:    #F9F7F1;
  --sand:     #E6E4D5;
  --sand-lt:  #F1EFE4;
  --olive:    #7D8B5F;
  --olive-dk: #66744C;
  --pine:     #3A3D2E;
  --ink:      #4C503F;   /* body text — softened pine */
  --content:  1080px;
  --radius:   18px;      /* the rounded-rectangle used for images & cards */
}

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

html {
  scroll-behavior: smooth;
  /* Reserve scrollbar space so short and long pages align identically —
     prevents the sideways "shake" when navigating between pages */
  scrollbar-gutter: stable;
}

/* ---------- Smooth page transitions (~0.5s) ---------- */

/* Modern browsers: gentle cross-fade between page navigations */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .5s;
}

/* Older browsers: fade each page in on load instead */
@supports not (view-transition-name: root) {
  body { animation: page-fade .5s ease both; }
}

@keyframes page-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body {
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--olive-dk); }
a:hover { color: var(--pine); }

/* ---------- Header ---------- */

.site-header {
  background: var(--pine);
  color: var(--cream);
  padding: 1.1rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-header .logo img { height: 74px; width: auto; }

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

.site-nav a {
  color: var(--sand);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: .02em;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent; /* reserved space — the underline never shifts the text */
}

.site-nav a:hover { color: #ffffff; }

.site-nav a.active {
  color: #ffffff;
  border-bottom-color: var(--olive);
}

.nav-phone {
  background: var(--olive);
  color: #ffffff !important;
  border-radius: 999px;
  padding: .5rem 1.3rem !important;
  border-bottom: none !important;
  font-weight: 500;
}

.nav-phone:hover { background: var(--olive-dk); }

/* ---------- Layout helpers ---------- */

main { flex: 1; width: 100%; }

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

section { padding: 4.5rem 0; }

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--pine);
  line-height: 1.15;
  font-weight: 500;
}

h1 { font-size: 58px; margin-bottom: 1.4rem; }
h2 { font-size: 42px; margin-bottom: 1.3rem; }
h3 { font-size: 27px; margin: 2.4rem 0 .7rem; }

h1 em, h2 em { font-style: italic; color: var(--olive); }

h4 {
  font-family: 'Jost', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--olive-dk);
  margin-bottom: .8rem;
}

p { margin-bottom: 1.2rem; }

ul { margin: 0 0 1.2rem 1.5rem; }
li { margin-bottom: .45rem; }
li::marker { color: var(--olive); }

.small { font-size: 15px; }

.lead { font-size: 19.5px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--olive);
  color: #ffffff;
  text-decoration: none;
  border-radius: 999px;
  padding: .8rem 2rem;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .02em;
}

.btn:hover { background: var(--olive-dk); color: #fff; }

.btn.ghost {
  background: transparent;
  color: var(--pine);
  border: 1.5px solid var(--pine);
}

.btn.ghost:hover { background: var(--pine); color: var(--cream); }

/* ---------- Hero (homepage) ---------- */

.hero {
  padding: 5rem 0 5.5rem;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 4rem;
  align-items: center;
}

.hero .tagline {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--olive-dk);
  margin-bottom: 1rem;
}

.hero p { max-width: 520px; }

.hero .actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.8rem; }

/* Rounded-rectangle portrait */
.portrait {
  width: min(380px, 100%);
  border-radius: var(--radius);
  overflow: hidden;
  justify-self: center;
  border: 6px solid var(--sand);
}

.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Soft sand bands ---------- */

.band { background: var(--sand); }

.band-lt { background: var(--sand-lt); }

/* ---------- Service cards ---------- */

.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  margin-top: 2.5rem;
}

.svc-card {
  background: #ffffff;
  border: 1.5px solid var(--sand);
  border-radius: var(--radius);
  padding: 2.1rem 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.svc-card:hover {
  color: var(--ink);
  border-color: var(--olive);
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(58, 61, 46, .10);
}

.svc-card h3 { margin: 0 0 .7rem; }
.svc-card p { font-size: 16px; flex: 1; margin-bottom: 0; }

/* ---------- Info grid (hours / location) ---------- */

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
  margin-top: 2.5rem;
}

.info-card {
  background: #ffffff;
  border: 1.5px solid var(--sand);
  border-radius: var(--radius);
  padding: 2.1rem 2rem;
}

.info-card h3 { margin-top: 0; }
.info-card p { margin-bottom: .6rem; }

.phone-big {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px;
  color: var(--pine);
  text-decoration: none;
}

/* ---------- Vacation notice ---------- */

.vacation { margin-top: 1.8rem; }

.vac-years {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.vacation .year {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  color: var(--olive-dk);
  margin-bottom: .4rem;
}

.vac-years p { font-size: 15.5px; margin: 0; line-height: 1.9; }

.vac-note { margin: 1.4rem 0 0; opacity: .75; }

/* ---------- Page header band (interior pages) ---------- */

.page-head {
  background: var(--sand);
  padding: 4rem 0 3.6rem;
}

.page-head h1 { margin-bottom: .6rem; }

.page-head .intro { max-width: 720px; margin-bottom: 0; }

.breadcrumb {
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.breadcrumb a { text-decoration: none; }

/* ---------- Specialty chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 1.8rem 0;
  padding: 0;
  list-style: none;
}

.chips li {
  background: var(--sand-lt);
  border: 1px solid var(--sand);
  color: var(--ink);
  border-radius: 999px;
  padding: .45rem 1.15rem;
  font-size: 15px;
  margin: 0;
}

/* ---------- Topic cards (obstetric guides) ---------- */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.4rem;
  margin-top: 2.8rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.guide-card { text-decoration: none; display: block; }

.guide-card .pic {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 6px solid var(--sand);
}

.guide-card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.guide-card:hover .pic img { transform: scale(1.04); }

.guide-card .label {
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 23px;
  color: var(--pine);
  margin-top: 1rem;
}

/* ---------- Article pages ---------- */

.article { max-width: 780px; }

.article h3 {
  padding-top: 1.6rem;
  border-top: 1px solid var(--sand);
}

.article h3:first-of-type { border-top: none; padding-top: 0; }

.next-link { margin-top: 3rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--pine);
  color: var(--sand);
  padding: 4.5rem 2rem 3.5rem;
  text-align: center;
}

.site-footer .foot-logo img { height: 84px; width: auto; margin: 0 auto 1.6rem; }

.site-footer p { margin: 0; font-size: 16px; line-height: 1.9; }

.site-footer a { color: var(--sand); }
.site-footer a:hover { color: #ffffff; }

.site-footer .fine {
  margin-top: 1.8rem;
  font-size: 13.5px;
  opacity: .65;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  h1 { font-size: 42px; }
  h2 { font-size: 33px; }
  section { padding: 3.2rem 0; }
  .site-header { justify-content: center; text-align: center; padding: 1rem 1.2rem; }
  .site-nav { justify-content: center; gap: 1.1rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .portrait { width: min(320px, 88%); }
  .card-row { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .vac-years { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; max-width: 400px; }
  .wrap { padding: 0 1.4rem; }
}
