/* North Hill Dental. Colors come from the logo's teal swirl. */
:root {
  --teal-900: #0f3b3e;
  --teal-700: #1f6f73;
  --teal-600: #2a8186;
  --teal-100: #e3f1f1;
  --teal-50: #f2f8f8;
  --ink: #16232a;
  --muted: #4d5d63;
  --line: #d7e3e4;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 59, 62, .08);
  --wrap: 1160px;
  --head: "Poppins", system-ui, sans-serif;
  --body: "Open Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.65 var(--body); color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-underline-offset: 3px; }
a:hover { color: var(--teal-900); }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; color: var(--teal-900); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--teal-600); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 8px; }

/* Buttons */
.btn { display: inline-block; font: 600 1rem/1 var(--head); padding: 14px 24px; border-radius: 999px; text-decoration: none; border: 2px solid transparent; transition: background .15s, color .15s; }
.btn-primary { background: var(--teal-700); color: var(--white); }
.btn-primary:hover { background: var(--teal-900); color: var(--white); }
.btn-light { background: var(--white); color: var(--teal-900); }
.btn-light:hover { background: var(--teal-100); color: var(--teal-900); }
.btn-outline { border-color: currentColor; color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.logo img { width: 150px; }
.main-nav { margin-left: auto; }
.menu-toggle { display: none; }
.menu ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.menu a { display: block; padding: 10px 14px; font: 500 .98rem var(--head); color: var(--ink); text-decoration: none; border-radius: 8px; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--teal-700); background: var(--teal-50); }
.header-cta { padding: 12px 18px; font-size: .95rem; white-space: nowrap; }

@media (max-width: 960px) {
  .header-inner { min-height: 72px; gap: 12px; }
  .logo img { width: 124px; }
  .header-cta { display: none; }
  .menu-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; font: 600 .95rem var(--head); color: var(--teal-900); }
  .bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--teal-900); position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .menu ul { display: none; }
  .menu.open ul { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 12px 16px; box-shadow: var(--shadow); }
  .menu.open a { padding: 14px 12px; font-size: 1.05rem; }
}

/* Hero */
.hero { position: relative; color: var(--white); background: var(--teal-900); }
.hero img.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,40,43,.85) 0%, rgba(10,40,43,.55) 55%, rgba(10,40,43,.2) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(80px, 14vw, 170px); padding-bottom: clamp(80px, 14vw, 170px); }
.hero h1 { color: var(--white); max-width: 14ch; }
.hero p { font-size: 1.15rem; max-width: 52ch; }
.eyebrow { font: 600 .85rem var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--teal-600); margin-bottom: .6em; }
.hero .eyebrow { color: #a8dadb; }

.page-hero { background: var(--teal-50); border-bottom: 1px solid var(--line); }
.page-hero .wrap { padding-top: 56px; padding-bottom: 48px; }
.page-hero p { color: var(--muted); max-width: 62ch; font-size: 1.1rem; margin: 0; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--teal-50); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split.tall img { aspect-ratio: 4 / 5; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat strong { display: block; font: 700 2rem/1.1 var(--head); color: var(--teal-700); }
.stat span { color: var(--muted); font-size: .95rem; }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr 1fr; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p:last-child { margin-bottom: 0; }
.service-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.service-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.service-card .card-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.service-card .card-body a { margin-top: auto; }
.service-card p { color: var(--muted); }

/* Team */
.team-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px; }
.team-home { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .team-home { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .team-grid, .team-home { grid-template-columns: 1fr; } }
.team-card img { width: 100%; border-radius: var(--radius); object-fit: cover; margin-bottom: 14px; background: var(--teal-100); }
.team-card img.square { aspect-ratio: 1; }
.team-card img.portrait { aspect-ratio: 4 / 5; object-position: center 20%; }
.team-card h3 { margin-bottom: 2px; }
.team-card .role { font: 500 .92rem var(--head); color: var(--teal-700); margin-bottom: 8px; }
.team-card p { font-size: .97rem; color: var(--muted); }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.quote { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.quote blockquote { margin: 0 0 18px; font-size: 1rem; flex: 1; }
.quote figcaption { display: flex; align-items: center; gap: 12px; font: 600 .95rem var(--head); }
.quote figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.quote figcaption span { display: block; font: 400 .85rem var(--body); color: var(--muted); }

/* Lists */
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 9px; border-left: 3px solid var(--teal-600); border-bottom: 3px solid var(--teal-600); transform: rotate(-45deg); }
.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font: 500 .95rem var(--head); }

/* Contact */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contact-cards .card p { color: var(--muted); }
.big-link { font: 600 1.1rem var(--head); color: var(--teal-700); text-decoration: none; word-break: break-word; }
@media (max-width: 800px) { .contact-cards { grid-template-columns: 1fr; } }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-top: 28px; }
.map iframe { width: 100%; height: 380px; border: 0; display: block; }

/* CTA band */
.cta-band { background: var(--teal-700); color: var(--white); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 48px; padding-bottom: 48px; }
.cta-band h2 { color: var(--white); margin: 0 0 .2em; }
.cta-band p { margin: 0; opacity: .9; }

/* Long-form text (policies) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.notice { background: var(--teal-50); border: 1px solid var(--line); border-left: 4px solid var(--teal-600); border-radius: 10px; padding: 18px 22px; margin: 0 0 28px; }
.notice p:last-child { margin: 0; }

/* Forms list */
.form-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.form-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.form-list a:hover { border-color: var(--teal-600); }
.form-list strong { font: 600 1.05rem var(--head); color: var(--teal-900); display: block; }
.form-list span { color: var(--muted); font-size: .95rem; }
.form-list .arrow { color: var(--teal-700); font-size: 1.4rem; }

/* Footer */
.site-footer { background: var(--teal-900); color: #d6e7e8; padding-top: 56px; }
.site-footer a { color: var(--white); }
.site-footer h2 { color: var(--white); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.footer-logo { width: 150px; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 18px; padding-bottom: 18px; font-size: .9rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.h3 { font-size: 1.2rem; }

/* Scroll animations (classes added by js/site.js) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.hero { overflow: hidden; }
.hero img.hero-bg { transform-origin: center top; will-change: transform; }
.stat strong { font-variant-numeric: tabular-nums; }

/* Hand-drawn zigzag under "North Hill Dental" (like the old site's animated headline) */
.hero h1 { max-width: none; }
.h1-sub { display: inline-block; font-size: .62em; font-weight: 600; margin-top: .35em; color: #e6f3f3; }
.hl { position: relative; display: inline-block; white-space: nowrap; z-index: 0; }
.hl svg { position: absolute; left: 50%; top: 50%; width: calc(100% + 24px); height: calc(100% + 24px); transform: translate(-50%, -50%); overflow: visible; z-index: -1; pointer-events: none; }
.hl path { fill: none; stroke: #5cc3c6; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1500; stroke-dashoffset: 0; }
.hl.drawing path { animation: hl-draw 1.2s ease-out forwards; }
.hl.erasing path { transition: opacity .4s; opacity: 0; }
@keyframes hl-draw { from { stroke-dashoffset: 1500; } to { stroke-dashoffset: 0; } }
@media (max-width: 520px) { .hl { white-space: normal; } }
