/* ============================================================
   Hudson Periodontics - hudsonperiodontics.com
   Palette: Maine spruce, warm paper, wintergreen, gingival blush
   Type: Fraunces (display) / Public Sans (body) / Spline Sans Mono (labels)
   ============================================================ */

:root {
  --spruce: #17332c;
  --spruce-deep: #0f241f;
  --paper: #f7f5ef;
  --card: #ffffff;
  --wintergreen: #2e8b6e;
  --wintergreen-dark: #23705a;
  --blush: #e8b4a6;
  --blush-deep: #d99a89;
  --ink: #22302b;
  --ink-soft: #52625c;
  --mist: #dfe6e0;
  --radius: 14px;
  --max: 1120px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Spline Sans Mono", "SF Mono", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--wintergreen-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--spruce); }

:focus-visible {
  outline: 3px solid var(--wintergreen);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wintergreen-dark);
  display: block;
  margin-bottom: 0.9rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 540;
  line-height: 1.12;
  color: var(--spruce);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.28rem; margin-bottom: 0.5rem; }

p + p { margin-top: 1em; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mist);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 24px;
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--spruce);
}

.brand-mark { width: 38px; height: 38px; flex: none; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 560;
  line-height: 1.1;
}

.brand-name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2px;
}

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

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover { color: var(--wintergreen-dark); }
.site-nav a[aria-current="page"] {
  color: var(--wintergreen-dark);
  border-bottom: 2px solid var(--blush-deep);
  padding-bottom: 2px;
}

.btn {
  display: inline-block;
  background: var(--wintergreen);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.btn:hover { background: var(--wintergreen-dark); color: #fff; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--spruce);
  border: 1.5px solid var(--spruce);
}
.btn-ghost:hover { background: var(--spruce); color: #fff; }

.btn-light { background: #fff; color: var(--spruce); }
.btn-light:hover { background: var(--blush); color: var(--spruce-deep); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--spruce);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--mist);
    display: none;
    padding: 0.5rem 0 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.8rem 24px; border-bottom: none; }
  .site-nav .btn { margin: 0.6rem 24px 0; text-align: center; }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--spruce);
  color: #e9efe9;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(5rem, 11vw, 8.5rem);
  position: relative;
  z-index: 1;
}

.hero h1 { color: #fdfcf8; max-width: 15ch; }

.hero h1 em {
  font-style: italic;
  font-weight: 480;
  color: var(--blush);
}

.hero .eyebrow { color: var(--blush); }

.hero-lede {
  max-width: 52ch;
  margin: 1.4rem 0 2.2rem;
  font-size: 1.12rem;
  color: #cfdad2;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-contour {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: clamp(60px, 9vw, 110px);
  color: var(--paper);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(232, 180, 166, 0.25);
}

.hero-stats div strong {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 540;
  color: var(--blush);
  display: block;
}

.hero-stats div span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a8bcb0;
}

/* Page hero (interior pages) */
.page-hero { background: var(--spruce); color: #e9efe9; position: relative; }
.page-hero .wrap { padding-top: 4rem; padding-bottom: 5.5rem; position: relative; z-index: 1; }
.page-hero h1 { color: #fdfcf8; font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
.page-hero p { max-width: 58ch; margin-top: 1.1rem; color: #cfdad2; }
.page-hero .eyebrow { color: var(--blush); }

/* ---------- Sections ---------- */

section { padding: clamp(3.2rem, 7vw, 5.5rem) 0; }

.section-head { max-width: 62ch; margin-bottom: 2.6rem; }
.section-head p { color: var(--ink-soft); }

.contour-rule {
  width: 120px;
  height: 14px;
  color: var(--blush-deep);
  margin: 1.1rem 0 0;
}

/* Cards */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.card p { color: var(--ink-soft); font-size: 0.98rem; }

.card .icon {
  width: 42px;
  height: 42px;
  color: var(--wintergreen);
  margin-bottom: 1rem;
}

/* Location cards */
.loc-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.7rem;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.loc-card:hover {
  border-color: var(--wintergreen);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(23, 51, 44, 0.08);
}

.loc-card .loc-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--blush-deep);
}

.loc-card h3 { margin-bottom: 0.2rem; }

.loc-card address {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.loc-card .loc-phone {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--spruce);
  text-decoration: none;
  margin-top: 0.2rem;
  display: inline-block;
}

.loc-card .loc-note { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.35rem; }

.loc-card .loc-link {
  margin-top: auto;
  padding-top: 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Services list */
.svc-item {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.7rem;
}

.svc-item h3 { display: flex; align-items: center; gap: 0.6rem; }
.svc-item h3 svg { width: 26px; height: 26px; color: var(--wintergreen); flex: none; }
.svc-item p { color: var(--ink-soft); font-size: 0.98rem; }
.svc-item ul { margin: 0.7rem 0 0 1.2rem; color: var(--ink-soft); font-size: 0.95rem; }
.svc-item li { margin-bottom: 0.25rem; }

/* Split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 2rem; } }

.split figure {
  background: var(--spruce);
  border-radius: var(--radius);
  padding: 2.5rem;
  color: var(--blush);
}

blockquote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--spruce);
  border-left: 3px solid var(--blush-deep);
  padding-left: 1.3rem;
  margin: 1.5rem 0;
}

blockquote footer {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  background: none;
  padding: 0;
}

/* Referral band */
.band {
  background: var(--spruce);
  color: #e9efe9;
  border-radius: var(--radius);
  padding: clamp(2.2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}
.band h2 { color: #fdfcf8; }
.band p { color: #cfdad2; }
.band .band-actions { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }
@media (max-width: 820px) { .band { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */

.form-card {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--mist);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--wintergreen);
  box-shadow: 0 0 0 3px rgba(46, 139, 110, 0.15);
}

.form-status {
  margin-top: 1.1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  display: none;
}
.form-status.ok { display: block; background: #e5f2ec; color: var(--wintergreen-dark); border: 1px solid #bcded0; }
.form-status.err { display: block; background: #f9e9e4; color: #a05341; border: 1px solid #ecc9be; }

/* Contact info list */
.info-list { list-style: none; }
.info-list li {
  display: flex;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--mist);
}
.info-list li:last-child { border-bottom: none; }
.info-list svg { width: 22px; height: 22px; color: var(--wintergreen); flex: none; margin-top: 3px; }
.info-list strong { display: block; font-size: 0.95rem; color: var(--spruce); }
.info-list span, .info-list a { font-size: 0.95rem; color: var(--ink-soft); }

/* FAQ */
details {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.8rem;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--spruce);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-family: var(--font-display); font-size: 1.3rem; color: var(--blush-deep); }
details[open] summary::after { content: "–"; }
details p { margin-top: 0.7rem; color: var(--ink-soft); font-size: 0.98rem; }

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

.site-footer {
  background: var(--spruce-deep);
  color: #b9c9bf;
  margin-top: 2rem;
}

.footer-contour { width: 100%; height: clamp(40px, 6vw, 70px); color: var(--paper); background: var(--spruce-deep); transform: rotate(180deg); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blush);
  margin-bottom: 1rem;
  font-weight: 500;
}

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: #b9c9bf; text-decoration: none; font-size: 0.95rem; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 0.95rem; }

.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; color: #fdfcf8; }
.footer-brand .brand-mark { width: 34px; height: 34px; }
.footer-brand span { font-family: var(--font-display); font-size: 1.15rem; }

.footer-legal {
  border-top: 1px solid rgba(185, 201, 191, 0.18);
  padding: 1.3rem 0 2rem;
  font-size: 0.85rem;
  color: #86988d;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

.disclaimer { font-size: 0.85rem; color: var(--ink-soft); margin-top: 1.5rem; }
