/* =====================================================================
   Maupin Dental Implant Center — Emergency Landing Page system
   CRO-optimized, mobile-first. Loads AFTER styles.css (reuses tokens).
   One template → every /emergency/<slug> page. Conversion goal: CALL.
   ===================================================================== */

:root {
  /* Ember urgency accent — warm, confident, high-contrast on cream (not clinical-alarm) */
  --urgent: oklch(0.585 0.17 33);
  --urgent-deep: oklch(0.50 0.155 33);
  --urgent-soft: oklch(0.95 0.04 40);
  --success: oklch(0.52 0.10 155);
  --star: oklch(0.74 0.135 78);
  --em-shadow: 0 1px 2px oklch(0.21 0.015 60 / 0.06), 0 8px 24px oklch(0.21 0.015 60 / 0.08);
  --em-shadow-lg: 0 2px 4px oklch(0.21 0.015 60 / 0.08), 0 18px 50px oklch(0.21 0.015 60 / 0.14);
}

.em { background: var(--surface); }
.em .wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.em-narrow { max-width: 60rem; margin-inline: auto; }

/* ---------- Sticky header: logo + ONE call button, no nav ---------- */
.em-header {
  position: sticky; top: 0; z-index: 50;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow var(--d-fast) var(--ease-out-quart);
}
.em-header.is-stuck { box-shadow: var(--em-shadow); }
.em-header__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.em-logo { display: inline-flex; align-items: baseline; gap: 0.35rem; font-family: var(--font-display); font-weight: 620; letter-spacing: -0.02em; }
.em-logo__name { font-size: 1.18rem; color: var(--ink); }
.em-logo__sub { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.em-logo__img { height: 58px; width: auto; display: block; }
@media (max-width: 560px) { .em-logo__img { height: 48px; } }
.em-header .em-logo { align-items: center; }

/* ---------- Call buttons (the money element) ---------- */
.em-call {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  background: var(--urgent); color: #fff;
  font-family: var(--font-display); font-weight: 600; line-height: 1;
  border-radius: 999px; padding: 0.75rem 1.15rem; font-size: 1rem;
  box-shadow: var(--em-shadow); transition: transform var(--d-fast), background var(--d-fast);
  white-space: nowrap;
}
.em-call:hover { background: var(--urgent-deep); color: #fff; transform: translateY(-1px); }
.em-call svg { width: 1.05em; height: 1.05em; }
.em-header .em-call__label { display: none; }
@media (min-width: 460px) { .em-header .em-call__label { display: inline; } }

.em-call--xl { width: 100%; padding: 1.15rem 1.5rem; font-size: 1.3rem; border-radius: 16px; }
.em-call--ghost {
  background: transparent; color: var(--ink); border: 1.5px solid var(--hairline-2);
  box-shadow: none;
}
.em-call--ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }

.em-pulse { position: relative; }
.em-pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 oklch(0.585 0.17 33 / 0.5); animation: emPulse 2.4s var(--ease-out-quart) infinite;
}
@keyframes emPulse { to { box-shadow: 0 0 0 16px oklch(0.585 0.17 33 / 0); } }
@media (prefers-reduced-motion: reduce) { .em-pulse::after { animation: none; } }

/* ---------- Hero ---------- */
.em-hero { padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem) clamp(2.5rem, 2rem + 4vw, 4.5rem); position: relative; }
.em-hero__grid { display: grid; gap: clamp(1.75rem, 1rem + 3vw, 3rem); }
@media (min-width: 900px) { .em-hero__grid { grid-template-columns: 1.15fr 0.85fr; align-items: start; } }

/* Call-only centered hero (no form) */
.em-hero--solo .em-hero__grid { grid-template-columns: 1fr; }
.em-hero--solo .em-hero__copy { max-width: 50rem; margin-inline: auto; text-align: center; }
.em-hero--solo .em-sub, .em-hero--solo .em-cta-row { margin-inline: auto; }
.em-hero--solo .em-bullets { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem 1.4rem; max-width: 44rem; margin-inline: auto; }

/* Washed-out background image behind hero text */
.em-hero--media { position: relative; isolation: isolate; overflow: hidden; min-height: clamp(440px, 58vh, 640px); display: grid; align-items: center; }
.em-hero--media .em-hero__bg { position: absolute; inset: 0; z-index: -2; }
.em-hero--media .em-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; filter: saturate(0.5) brightness(1.08); }
.em-hero--media .em-hero__wash { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, oklch(0.975 0.012 80 / 0.86) 0%, oklch(0.975 0.012 80 / 0.74) 55%, oklch(0.975 0.012 80 / 0.92) 100%); }

.em-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--fs-eyebrow); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--urgent-deep); font-weight: 600; margin-bottom: 1rem;
}
.em-eyebrow .em-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--urgent); box-shadow: 0 0 0 4px var(--urgent-soft); }

.em-h1 {
  font-family: var(--font-display); font-weight: 660;
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.5rem); line-height: 1.04; letter-spacing: -0.025em;
  color: var(--ink); text-wrap: balance;
}
.em-h1 .accent { color: var(--urgent); }
.em-sub { font-size: var(--fs-lead); color: var(--ink-2); margin-top: 1.1rem; max-width: 38ch; line-height: 1.45; }

.em-cta-row { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.6rem; max-width: 26rem; }
.em-undercta { font-size: var(--fs-small); color: var(--ink-3); text-align: center; }
.em-undercta strong { color: var(--ink-2); }

/* trust bullets */
.em-bullets { list-style: none; display: grid; gap: 0.6rem; margin-top: 1.6rem; }
.em-bullets li { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-small); color: var(--ink); font-weight: 500; }
.em-bullets .em-check {
  flex: none; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--success); color: #fff; display: grid; place-items: center;
}
.em-bullets .em-check svg { width: 0.75rem; height: 0.75rem; }

/* ---------- Lead form card ---------- */
.em-form-card {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 20px;
  box-shadow: var(--em-shadow-lg); padding: clamp(1.4rem, 1rem + 2vw, 2rem);
}
.em-form-card__title { font-family: var(--font-display); font-weight: 620; font-size: var(--fs-h4); letter-spacing: -0.01em; }
.em-form-card__note { font-size: var(--fs-small); color: var(--ink-3); margin-top: 0.35rem; }
.em-form { display: grid; gap: 0.8rem; margin-top: 1.2rem; }
.em-field label { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-2); margin-bottom: 0.3rem; }
.em-field input, .em-field select, .em-field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--hairline-2); border-radius: 11px;
  padding: 0.8rem 0.9rem; transition: border-color var(--d-fast), box-shadow var(--d-fast);
  min-height: 48px;
}
.em-field input:focus, .em-field select:focus, .em-field textarea:focus {
  outline: none; border-color: var(--urgent); box-shadow: 0 0 0 3px var(--urgent-soft);
}
.em-submit {
  width: 100%; background: var(--sage-deep); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  border-radius: 12px; padding: 0.95rem 1.2rem; min-height: 52px;
  transition: transform var(--d-fast), background var(--d-fast); margin-top: 0.2rem;
}
.em-submit:hover { background: var(--sage); transform: translateY(-1px); }
.em-form__or { text-align: center; font-size: var(--fs-small); color: var(--ink-3); margin-top: 0.2rem; }
.em-form__or a { color: var(--urgent-deep); font-weight: 600; border-bottom: 1px solid currentColor; }
.em-form__success { display: none; text-align: center; padding: 1.5rem 0.5rem; }
.em-form__success.is-on { display: block; }
.em-form__success h3 { font-family: var(--font-display); color: var(--success); }

/* ---------- Stat / trust strip ---------- */
.em-statbar { border-block: 1px solid var(--hairline); background: var(--surface-2); }
.em-statbar__row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; }
@media (min-width: 760px) { .em-statbar__row { grid-template-columns: repeat(4, 1fr); } }
.em-stat { padding: 1.4rem 1rem; text-align: center; }
.em-stat__v { font-family: var(--font-display); font-weight: 640; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); color: var(--ink); letter-spacing: -0.02em; }
.em-stat__l { font-size: var(--fs-small); color: var(--ink-3); margin-top: 0.2rem; }
.em-stars { color: var(--star); letter-spacing: 0.05em; }

/* ---------- Generic section ---------- */
.em-section { padding-block: clamp(2.75rem, 2rem + 4vw, 5rem); }
.em-section--tint { background: var(--surface-2); }
.em-kicker { font-size: var(--fs-eyebrow); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-deep); font-weight: 600; }
.em-h2 { font-family: var(--font-display); font-weight: 640; font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.025em; color: var(--ink); margin-top: 0.6rem; text-wrap: balance; }
.em-lead { font-size: var(--fs-lead); color: var(--ink-2); margin-top: 1rem; max-width: 60ch; }

/* condition education cards */
.em-cards { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 680px) { .em-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .em-cards--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1020px) { .em-cards--4 { grid-template-columns: repeat(2, 1fr); } }
.em-card { background: var(--paper); border: 1px solid var(--hairline); border-radius: 16px; padding: 1.4rem; }
.em-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--ink); }
.em-card p { font-size: var(--fs-small); color: var(--ink-2); margin-top: 0.5rem; line-height: 1.55; }
.em-card__tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--urgent-deep); }

/* what-to-do-now steps */
.em-steps { counter-reset: emstep; list-style: none; display: grid; gap: 1rem; margin-top: 1.8rem; max-width: 46rem; }
.em-steps li { position: relative; padding-left: 3.25rem; min-height: 2.25rem; }
.em-steps li::before {
  counter-increment: emstep; content: counter(emstep);
  position: absolute; left: 0; top: 0; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--urgent); color: #fff; font-family: var(--font-display); font-weight: 640;
  display: grid; place-items: center;
}
.em-steps strong { color: var(--ink); }
.em-steps span { color: var(--ink-2); }

/* doctor / why us */
.em-doctor { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 3rem); align-items: center; }
@media (min-width: 860px) { .em-doctor { grid-template-columns: 0.8fr 1fr; } }
.em-doctor__photo { border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; background: var(--surface-3); }
.em-doctor__photo img { width: 100%; height: 100%; object-fit: cover; }
.em-doctor__points { list-style: none; display: grid; gap: 0.85rem; margin-top: 1.3rem; }
.em-doctor__points li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-2); }
.em-doctor__points .em-ic { flex: none; color: var(--sage-deep); margin-top: 0.15rem; }

/* meet the dentists (two-up) */
.em-team { display: grid; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 760px) { .em-team { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; } }
.em-team__member { background: var(--paper); border: 1px solid var(--hairline); border-radius: 18px; overflow: hidden; padding-bottom: 1.4rem; }
.em-team__photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-3); }
.em-team__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.em-team__body { padding: 1.2rem 1.4rem 0; }
.em-team__body h3 { font-family: var(--font-display); font-weight: 640; font-size: 1.22rem; color: var(--ink); }
.em-team__role { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sage-deep); margin-top: 0.3rem; }
.em-team__body p { font-size: var(--fs-small); color: var(--ink-2); margin-top: 0.75rem; line-height: 1.6; }
.em-team__points { margin-top: 2rem; max-width: 60rem; }

/* 3-step process */
.em-process { display: grid; gap: 1.2rem; margin-top: 2rem; }
@media (min-width: 760px) { .em-process { grid-template-columns: repeat(3, 1fr); } }
.em-proc { text-align: center; padding: 1.5rem 1rem; }
.em-proc__n { width: 2.5rem; height: 2.5rem; margin: 0 auto 0.8rem; border-radius: 50%; border: 2px solid var(--urgent); color: var(--urgent-deep); font-family: var(--font-display); font-weight: 660; display: grid; place-items: center; }
.em-proc h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.em-proc p { font-size: var(--fs-small); color: var(--ink-2); margin-top: 0.4rem; }

/* reviews */
.em-reviews { display: grid; gap: 1.2rem; margin-top: 2rem; }
@media (min-width: 820px) { .em-reviews { grid-template-columns: repeat(3, 1fr); } }
.em-review { background: var(--paper); border: 1px solid var(--hairline); border-radius: 16px; padding: 1.5rem; }
.em-review p { color: var(--ink); font-size: 1rem; line-height: 1.6; margin-top: 0.7rem; }
.em-review__by { font-size: var(--fs-small); color: var(--ink-3); margin-top: 1rem; }

/* FAQ */
.em-faq { margin-top: 2rem; max-width: 48rem; }
.em-faq details { border-bottom: 1px solid var(--hairline); padding: 1.1rem 0; }
.em-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-family: var(--font-display); font-weight: 560; font-size: 1.08rem; color: var(--ink); }
.em-faq summary::-webkit-details-marker { display: none; }
.em-faq summary::after { content: "+"; color: var(--urgent); font-size: 1.5rem; line-height: 1; transition: transform var(--d-fast); }
.em-faq details[open] summary::after { transform: rotate(45deg); }
.em-faq p { color: var(--ink-2); margin-top: 0.7rem; line-height: 1.6; }

/* visit / map */
.em-visit { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .em-visit { grid-template-columns: 1fr 1fr; } }
.em-visit__map { border-radius: 16px; overflow: hidden; min-height: 280px; border: 1px solid var(--hairline); }
.em-visit__map iframe { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; }
.em-nap dt { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 1rem; }
.em-nap dd { font-size: 1.05rem; color: var(--ink); }

/* final CTA band */
.em-finalcta { background: var(--ink); color: var(--surface); padding-block: clamp(3rem, 2.5rem + 3vw, 4.5rem); text-align: center; }
.em-finalcta h2 { font-family: var(--font-display); font-weight: 640; font-size: var(--fs-h2); color: #fff; letter-spacing: -0.02em; }
.em-finalcta p { color: oklch(0.92 0.022 72 / 0.8); margin-top: 0.8rem; font-size: var(--fs-lead); }
.em-finalcta .em-call--xl { max-width: 26rem; margin: 1.8rem auto 0; }
.em-finalcta .em-undercta { color: oklch(0.92 0.022 72 / 0.7); }

/* slim footer */
.em-footer { background: var(--surface-2); border-top: 1px solid var(--hairline); padding-block: 2rem 6rem; font-size: var(--fs-small); color: var(--ink-3); }
.em-footer__row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; align-items: center; justify-content: space-between; }
.em-footer a { color: var(--ink-2); }
.em-footer__legal { width: 100%; margin-top: 1rem; color: var(--ink-3); font-size: 0.8rem; }

/* ---------- Sticky mobile action bar ---------- */
.em-stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
  padding: 0.6rem max(0.7rem, env(safe-area-inset-left)) max(0.6rem, env(safe-area-inset-bottom));
  background: oklch(0.985 0.008 82 / 0.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--hairline); box-shadow: 0 -6px 20px oklch(0.21 0.015 60 / 0.1);
}
.em-stickybar .em-call, .em-stickybar .em-call--ghost { width: 100%; padding: 0.85rem; font-size: 1.02rem; border-radius: 12px; }
@media (min-width: 880px) { .em-stickybar { display: none; } }
@media (max-width: 879px) { .em-footer { padding-bottom: 6rem; } }

/* utility */
.em-anchor { scroll-margin-top: 80px; }
