@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dmsans.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('/fonts/dmmono-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #13233A;
  --navy-2: #1E3350;
  --ocean: #3A6B6B;      /* darkened brand Ocean, 5.6:1 on white for text */
  --ocean-brand: #4B8282;
  --sage: #AACDC8;
  --mint: #DCEAE6;
  --ivory: #F5F4F0;
  --paper: #FBFAF7;
  --white: #FFFFFF;
  --muted: #4A586B;
  --line: #E0DED6;
  --now: #A8322D;        /* 6.1:1 on ivory */
  --soon: #855700;       /* 5.6:1 on ivory */
  --radius: 24px;
  --max: 1160px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 0 rgba(19, 35, 58, .04), 0 24px 48px -28px rgba(19, 35, 58, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--navy);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul { margin: 0; }
img, svg { display: block; }

a { color: var(--ocean); text-underline-offset: 4px; text-decoration-thickness: 1.5px; transition: color .2s; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }
::selection { background: var(--sage); }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 20;
  background: var(--navy); color: var(--white); padding: 12px 16px; border-radius: 10px;
}
.skip:focus { top: 16px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (min-width: 760px) { .wrap { padding: 0 40px; } }

.eyebrow {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-bottom: 20px;
}
em { font-style: normal; color: var(--ocean); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

h2 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  font-weight: 800;
  text-wrap: balance;
}
.lead { font-size: clamp(1.2rem, 2.2vw, 1.4rem); line-height: 1.5; color: var(--muted); max-width: 34ch; text-wrap: pretty; }

/* ---------- header ---------- */
.site-head { position: relative; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; min-height: 84px; }
.mark { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: var(--navy); text-decoration: none; }
.mark b { color: var(--ocean); font-weight: 800; }
.mark:hover { color: var(--navy); }
.site-head nav { display: flex; align-items: center; gap: 8px 22px; }
.site-head nav a { display: inline-flex; align-items: center; min-height: 48px; color: var(--navy); font-weight: 600; text-decoration: none; position: relative; }
.site-head nav a:not(.nav-pill)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--navy); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.site-head nav a:not(.nav-pill):hover::after, .site-head nav a[aria-current="page"]:not(.nav-pill)::after { transform: scaleX(1); }
.nav-pill { padding: 0 18px; border: 1.5px solid var(--navy); border-radius: 999px; transition: background .25s, color .25s; }
.nav-pill:hover, .nav-pill[aria-current="page"] { background: var(--navy); color: var(--white) !important; }
@media (max-width: 480px) {
  .site-head .wrap { padding: 0 16px; }
  .mark-icon { display: none; }
  .mark { font-size: 1.1rem; }
  .site-head nav { gap: 12px; font-size: .9rem; white-space: nowrap; }
  .nav-pill { padding: 0 12px; }
}

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  min-height: 52px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  text-align: center;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); color: var(--white); transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(19, 35, 58, .6); }
.btn:active { transform: translateY(0); }
.btn.line { background: transparent; color: var(--navy); }
.btn.line:hover { background: var(--navy); color: var(--white); }
.btn.big { min-height: 60px; padding: 12px 30px; font-size: 1.1rem; }
.icon { width: 20px; height: 20px; flex: none; }
.arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow, a:hover > .arrow { transform: translateX(4px); }

/* ---------- search ---------- */
.zip {
  display: flex; align-items: center; gap: 8px;
  background: var(--white);
  border-radius: 999px;
  padding: 8px 8px 8px 26px;
  max-width: 520px;
  box-shadow: var(--shadow);
  border: 1.5px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.zip:focus-within { border-color: var(--ocean); box-shadow: 0 0 0 5px rgba(170, 205, 200, .45), var(--shadow); }
.zip label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.zip input {
  flex: 1 1 60px; min-width: 0; min-height: 52px;
  border: 0; background: transparent; color: var(--navy);
  font: 600 1.35rem 'DM Sans', system-ui, sans-serif;
  letter-spacing: .02em;
}
.zip input::placeholder { color: #707C8C; font-weight: 500; letter-spacing: 0; }
.zip input:focus { outline: none; }
.zip .btn { flex: none; }
.uselocation { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 10px; padding: 0 4px; font-weight: 700; color: var(--navy); }
.uselocation .icon { transition: transform .5s var(--ease); }
.uselocation:hover .icon { transform: rotate(90deg); }

/* ---------- hero (home + audiologists) ---------- */
.hero { position: relative; padding: 32px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; position: relative; }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero h1, .page-hero h1, .searchbar h1 {
  font-size: clamp(3rem, 9.5vw, 6.75rem);
  line-height: .96;
  letter-spacing: -.045em;
  font-weight: 800;
  margin-bottom: 28px;
  max-width: 10ch;
  text-wrap: balance;
}
.hero-search { margin-top: 36px; }
.check-first { margin-top: 28px; color: var(--muted); }
.check-first a { font-weight: 700; color: var(--navy); }

.hero-art { display: none; aspect-ratio: 1; max-width: 640px; pointer-events: none; }
@media (min-width: 900px) {
  .hero { padding: 48px 0 112px; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; }
  .hero-art { display: block; width: 100%; justify-self: end; }
}

/* the ripple: rings breathing outward from a still point */
.ripple { width: 100%; height: 100%; overflow: visible; }
.ripple .ring { fill: none; stroke: var(--ocean-brand); stroke-width: 2.5; transform-origin: 0 0; transform-box: view-box; animation: ring 7s var(--ease) infinite; opacity: 0; }
.ripple .r1 { animation-delay: 0s; } .ripple .r2 { animation-delay: 1.4s; } .ripple .r3 { animation-delay: 2.8s; } .ripple .r4 { animation-delay: 4.2s; } .ripple .r5 { animation-delay: 5.6s; }
.ripple .core { fill: var(--ocean-brand); animation: core 7s ease-in-out infinite; transform-origin: 0 0; transform-box: view-box; }
@keyframes ring { 0% { transform: scale(.35); opacity: 0; } 15% { opacity: .8; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes core { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* entrance */
.rise { animation: rise .9s var(--ease) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .28s; } .d4 { animation-delay: .38s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* scroll reveal (site.js adds .pending only to elements below the fold) */
[data-reveal].pending { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].pending.in { opacity: 1; transform: none; }

/* ---------- red flags ---------- */
.flags { padding: 40px 0 0; scroll-margin-top: 8px; }
.section-head { display: grid; gap: 16px; margin-bottom: 40px; }
.section-head .sub { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
@media (min-width: 900px) { .section-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; } }

.timeline { list-style: none; padding: 0; display: grid; gap: 12px; }
.flag {
  display: grid; gap: 12px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.flag::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.flag.now::before { background: var(--now); }
.flag.soon::before { background: var(--soon); }
.flag:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.flag h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.015em; text-wrap: balance; }
.flag .what p { color: var(--muted); margin-top: 6px; }
.when { display: inline-flex; align-items: center; gap: 10px; font-family: 'DM Mono', ui-monospace, monospace; font-size: .9rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.when .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.flag.now .when { color: var(--now); } .flag.now .dot { background: var(--now); animation: pulse 2.4s infinite; }
.flag.soon .when { color: var(--soon); } .flag.soon .dot { background: var(--soon); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(168, 50, 45, .45); } 70% { box-shadow: 0 0 0 10px rgba(168, 50, 45, 0); } 100% { box-shadow: 0 0 0 0 rgba(168, 50, 45, 0); } }
.act-text { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.btn.now-btn { background: var(--now); border-color: var(--now); }
.btn.now-btn:hover { background: #8C2824; border-color: #8C2824; }
@media (min-width: 900px) {
  .flag { grid-template-columns: 150px 1fr 280px; gap: 32px; align-items: center; padding: 28px 32px 28px 36px; }
}

.lifeline { margin-top: 20px; display: grid; gap: 12px; background: var(--mint); border-radius: var(--radius); padding: 28px 24px; align-items: center; }
.lifeline .num { font-weight: 800; font-size: 3.25rem; letter-spacing: -.05em; line-height: 1; color: var(--ocean); }
.lifeline .us { font-size: 1rem; color: var(--muted); margin-top: 6px; }
.lifeline-acts { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) { .lifeline { grid-template-columns: 150px 1fr auto; gap: 32px; padding: 28px 32px 28px 36px; } }
.small { font-size: .95rem; color: var(--muted); margin-top: 24px; max-width: 80ch; }

/* ---------- common case ---------- */
.calm { padding: 120px 0 0; }
.calm .wrap { display: grid; gap: 32px; }
.calm h2 { max-width: 12ch; }
.calm-body p { margin-bottom: 18px; max-width: 46ch; font-size: 1.2rem; line-height: 1.6; }
.note { margin: 32px 0 28px; }
.note .eyebrow { margin-bottom: 14px; }
.note ol { list-style: none; counter-reset: n; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.note li { counter-increment: n; display: inline-flex; gap: 10px; align-items: center; font-weight: 600; background: var(--white); border-radius: 999px; padding: 8px 18px 8px 8px; border: 1px solid var(--line); }
.note li::before { content: counter(n); width: 30px; height: 30px; border-radius: 50%; background: var(--mint); color: var(--ocean); display: grid; place-items: center; font: 500 .85rem 'DM Mono', monospace; flex: none; }
.hh { color: var(--muted); }
.hh a { font-weight: 700; }
@media (min-width: 900px) { .calm .wrap { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }

/* ---------- finder band ---------- */
.band-wrap { padding: 120px 0 0; }
.band { position: relative; overflow: hidden; background: var(--navy); color: var(--ivory); border-radius: 36px; padding: 56px 24px; isolation: isolate; }
.band-ripple { position: absolute; z-index: -1; width: 720px; height: 720px; right: -360px; top: 50%; transform: translateY(-50%); opacity: .55; }
.band-ripple .ring { stroke: var(--sage); }
.band-ripple .core { fill: var(--sage); }
.band h2 { color: var(--white); max-width: 14ch; }
.band p { color: rgba(245, 244, 240, .82); margin: 18px 0 32px; max-width: 40ch; font-size: 1.2rem; }
.band .zip { box-shadow: none; }
.uselocation.on-dark { color: var(--white); }
.band :focus-visible { outline-color: var(--white); }
@media (min-width: 760px) { .band { padding: 88px 72px; } .band-ripple { right: -120px; } }

/* ---------- audiologist strip ---------- */
.aud-cta { padding: 24px 0 0; }
.aud-inner { display: grid; gap: 24px; align-items: center; padding: 40px 24px; border-radius: 36px; background: var(--paper); border: 1px solid var(--line); }
.aud-inner h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.aud-inner p:not(.eyebrow) { color: var(--muted); margin-top: 12px; max-width: 44ch; }
.aud-inner .eyebrow { margin-bottom: 12px; }
@media (min-width: 760px) { .aud-inner { grid-template-columns: 1fr auto; padding: 48px 72px; gap: 40px; } }

/* ---------- find ---------- */
.searchbar { padding: 32px 0 40px; }
.searchbar .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: end; }
.searchbar .wrap > * { min-width: 0; }
.searchbar h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); max-width: 14ch; margin-bottom: 16px; }
.searchbar .meta { color: var(--muted); max-width: 40ch; font-size: 1.15rem; }
.loc-note { font-size: .95rem; color: var(--muted); padding-left: 4px; }
@media (min-width: 900px) { .searchbar .wrap { grid-template-columns: minmax(0, 1fr) 460px; } }

.results { padding-bottom: 24px; }
.status { font-size: 1.15rem; font-weight: 600; min-height: 1.6em; margin-bottom: 20px; max-width: 60ch; }
.status:empty { margin: 0; }
.list { list-style: none; padding: 0; display: grid; gap: 12px; max-width: 800px; }
.item {
  display: grid; grid-template-columns: 40px 1fr; gap: 16px;
  padding: 24px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  animation: rise .6s var(--ease) both;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.n { width: 36px; height: 36px; border-radius: 50%; background: var(--mint); color: var(--ocean); display: grid; place-items: center; font: 500 .95rem 'DM Mono', monospace; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.item h2 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; text-wrap: balance; }
.item h2 .city { display: block; font-weight: 500; font-size: 1.05rem; color: var(--muted); margin-top: 4px; letter-spacing: 0; }
.dist { font-family: 'DM Mono', ui-monospace, monospace; font-weight: 500; color: var(--ocean); white-space: nowrap; }
.addr { margin-top: 10px; }
.who { color: var(--muted); font-size: 1rem; margin-top: 2px; }
.acts { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.trust { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; align-items: center; margin-top: 12px; font-size: .95rem; }
.trust .ok { font-weight: 700; color: var(--ocean); }
.trust a { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); }
.foot-note { padding: 18px 0 0; color: var(--muted); }
.foot-note a { font-weight: 700; color: var(--navy); }
@media (max-width: 600px) {
  .acts .btn { flex: 1 1 auto; padding: 10px 14px; }
  .acts .call { flex-basis: 100%; }
}
@media (min-width: 760px) { .item { grid-template-columns: 52px 1fr; gap: 20px; padding: 28px 32px; } .n { width: 44px; height: 44px; } }

/* ---------- prose pages ---------- */
.page-hero { position: relative; padding: 32px 0 32px; overflow: hidden; }
.page-hero h1 { font-size: clamp(2.8rem, 7.5vw, 5.25rem); max-width: 14ch; }
.aud-hero { padding-bottom: 64px; }
.aud-hero .hero-art { max-width: 480px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.warn { margin-top: 18px; color: var(--muted); font-size: .95rem; max-width: 52ch; }

.points { padding: 8px 0 24px; }
.point-grid { list-style: none; padding: 0; display: grid; gap: 12px; }
.point-grid li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.point-grid h2 { font-size: 1.4rem; letter-spacing: -.015em; margin: 14px 0 8px; }
.point-grid p { color: var(--muted); }
.pn { font-family: 'DM Mono', ui-monospace, monospace; color: var(--ocean); font-size: .9rem; letter-spacing: .1em; }
@media (min-width: 900px) { .point-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

.prose { padding: 24px 0 24px; }
.prose section { padding: 32px 0; border-top: 1px solid var(--line); max-width: 68ch; scroll-margin-top: 16px; }
.prose h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 14px; }
.prose p + p { margin-top: 14px; }
.contact-box, .check-box { margin-top: 32px; padding: 32px; background: var(--white); border-radius: var(--radius); max-width: 68ch; box-shadow: var(--shadow); }
.contact-box .addr { margin-top: 12px; font-family: 'DM Mono', ui-monospace, monospace; }
.check-box h2 { font-size: 1.8rem; margin-bottom: 6px; }
.check-box > p { color: var(--muted); margin-bottom: 20px; }
.check-box .zip { box-shadow: none; border-color: var(--line); }
.check-box .addr { margin-top: 18px; color: var(--muted); }

/* ---------- footer ---------- */
.site-foot { margin-top: 120px; padding: 48px 0 56px; background: var(--paper); border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 40px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.foot-top ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot-top li a { display: inline-flex; align-items: center; min-height: 48px; color: var(--navy); font-weight: 600; text-decoration: none; }
.foot-top li a:hover { text-decoration: underline; }
.foot-bottom { display: grid; gap: 8px; padding-top: 28px; }
.foot-bottom p { max-width: 80ch; }
.foot-bottom .logo { margin-top: 16px; display: inline-flex; width: fit-content; min-height: 48px; align-items: center; }
.foot-bottom .logo svg { width: 56px; height: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ripple .ring { opacity: .3; }
  .ripple .r1 { transform: scale(.45); } .ripple .r2 { transform: scale(.6); } .ripple .r3 { transform: scale(.75); } .ripple .r4 { transform: scale(.9); } .ripple .r5 { transform: scale(1.05); }
}
