/* Night Doctor v2: core styles (tokens, base, buttons, nav, footer).
   Shared by every page on the new design. Page-specific styles live in their own file. */

:root {
  --navy: #00162b;
  --blue: #0b4f8a;
  --sky: #bfe0ff;
  --cream: #f7f4ee;
  --yellow: #f2d000;
  --mint: #e9f8f1;
  --mint-line: #b9e8d4;
  --ink: #00162b;
  --muted: #44505e;
  --line: #dce3ea;
  --line-strong: #a9b6c4;
  --band: #eaf0f6;
  --panel: #f3f6f9;
  --bg: #fff;
  --on-dark-muted: #c9d3de;

  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: Manrope, Inter, system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;

  --wrap: 1200px;
  --gutter: 40px;
  --radius: 24px;
  --radius-lg: 32px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 80px;
  --nav-top: 18px;
  --nav-space: 122px;
}

@media (max-width: 860px) {
  :root { --gutter: 20px; --nav-h: 68px; --nav-space: 100px; }
}
@media (min-width: 600px) and (max-width: 860px) {
  :root { --gutter: 40px; --nav-space: 108px; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
[hidden] { display: none !important; }

.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;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 20px; border-radius: 999px; background: var(--yellow); color: var(--navy);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 120px; }
.section--band { background: var(--band); }
@media (max-width: 860px) { .section { padding-block: 72px; } }
@media (min-width: 600px) and (max-width: 860px) { .section { padding-block: 96px; } }

.h2 {
  font: 700 clamp(34px, 4.2vw, 56px)/1.04 var(--font-head);
  letter-spacing: -.03em;
}
.h2 { text-wrap: balance; }
.h2 span { color: var(--muted); }
.h2--sm { font-size: clamp(32px, 3.6vw, 48px); }
.h2--gap { margin-bottom: 48px; }
.lead { margin-top: 24px; font-size: 19px; color: var(--muted); max-width: 44ch; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 17px; text-decoration: none; white-space: nowrap;
  border: 0; transition: background-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn--light { background: var(--cream); color: var(--navy); }
.btn--light:hover { background: #fff; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: #0a2a4a; }
.btn--sm { min-height: 48px; padding: 0 20px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: var(--nav-top); z-index: 30;
  width: min(1120px, calc(100% - 36px)); height: var(--nav-h);
  margin: 30px auto calc(-1 * (var(--nav-h) + 30px));
  color: #fff;
}
.nav__bar {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 16px 12px 30px; border-radius: 999px;
  background: rgba(0, 22, 43, .96); /* no backdrop blur: it repaints every frame over the footer photo and flickers */
  will-change: transform; /* own compositor layer, so scrolling content underneath never repaints the nav */
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(0, 8, 18, .25), 0 14px 34px rgba(0, 8, 18, .35);
  transition: padding .3s ease;
}
.nav__logo { display: inline-flex; flex: none; }
.nav__logo img { height: 56px; width: auto; transition: height .3s ease; }
.nav[data-scrolled] .nav__bar { padding: 8px 8px 8px 24px; }
.nav[data-scrolled] .nav__logo img { height: 40px; }

.nav__main { flex: 1; }
.nav__list { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 15px; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border-radius: 999px; border: 0; background: transparent; color: #fff; text-decoration: none; white-space: nowrap;
}
.nav__link:hover, .nav__dd:hover .nav__ddbtn { background: rgba(255, 255, 255, .1); }
.nav__dd { position: relative; }
.nav__ddbtn svg { transition: transform .2s; }
.nav__ddbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__ddpanel {
  position: absolute; left: -8px; top: 100%; padding-top: 10px; min-width: 280px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav__dd:hover .nav__ddpanel, .nav__dd:focus-within .nav__ddpanel, .nav__dd.is-open .nav__ddpanel {
  opacity: 1; visibility: visible; transform: none;
}
.nav__ddpanel ul {
  display: flex; flex-direction: column; padding: 8px; border-radius: 20px;
  background: #fff; box-shadow: 0 20px 44px rgba(0, 8, 18, .3);
}
.nav__ddpanel a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px;
  color: var(--navy); text-decoration: none; font-size: 16px;
}
.nav__ddpanel a:hover { background: var(--band); }

.nav__status { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.nav__status[data-open="1"] .nav__dot { background: #4ade80; }

.nav__call {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 999px; background: var(--cream); color: var(--navy);
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.nav__callshort { display: none; }
.nav__burger {
  display: none; flex: none; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: #fff;
}
.nav__burger-close { display: none; }
.nav__burger[aria-expanded="true"] .nav__burger-open { display: none; }
.nav__burger[aria-expanded="true"] .nav__burger-close { display: inline-flex; }

.mnav {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  max-height: calc(100svh - 120px); overflow-y: auto;
  padding: 8px; border-radius: 24px; background: #fff; color: var(--navy);
  box-shadow: 0 20px 44px rgba(0, 8, 18, .32);
}
.mnav > ul > li > a, .mnav summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px;
  border-radius: 14px; color: var(--navy); text-decoration: none; font-size: 18px; font-weight: 600;
  cursor: pointer; list-style: none;
}
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary svg { transition: transform .2s; }
.mnav details[open] summary { color: var(--blue); }
.mnav details[open] summary svg { transform: rotate(180deg); }
.mnav details ul { padding-bottom: 6px; }
.mnav details a { display: flex; align-items: center; min-height: 48px; padding: 0 14px 0 26px; color: var(--navy); text-decoration: none; font-size: 17px; }
.mnav a:hover, .mnav summary:hover { background: var(--band); }

@media (min-width: 861px) and (max-width: 1180px) {
  .nav__status { display: none; }
  .nav__list { gap: 0; }
  .nav__bar { gap: 12px; }
}
@media (max-width: 860px) {
  .nav { width: auto; margin: 28px 16px calc(-1 * (var(--nav-h) + 28px)); }
  .nav__bar { gap: 10px; padding: 10px 10px 10px 22px; }
  .nav__logo img { height: 48px; }
  .nav[data-scrolled] .nav__bar { padding: 6px 6px 6px 18px; }
  .nav[data-scrolled] .nav__logo img { height: 38px; }
  .nav__main { display: none; }
  .nav__status { margin-left: auto; font-size: 14px; gap: 6px; }
  .nav__call { padding: 0 16px; }
  .nav__callnum { display: none; }
  .nav__callshort { display: inline; }
  .nav__burger { display: inline-flex; }
}
@media (min-width: 600px) and (max-width: 860px) {
  .nav { margin: 32px 24px calc(-1 * (var(--nav-h) + 32px)); }
  .nav__callnum { display: inline; }
  .nav__callshort { display: none; }
}

/* ---------- footer ---------- */
.foot { margin: 12px; border-radius: var(--radius-lg); overflow: hidden; background: var(--navy); color: #fff; }
.foot__cta { position: relative; overflow: hidden; }
.foot__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 12% 30%; }
.foot__cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 22, 43, .55) 0%, var(--navy) 100%); }
.foot__ctainner { position: relative; z-index: 1; padding-block: 120px 96px; text-align: center; }
.foot__title { font: 700 clamp(40px, 5.4vw, 76px)/1 var(--font-head); letter-spacing: -.03em; margin-bottom: 32px; }
.foot__title span { color: var(--sky); }
.foot__000 { margin-top: 18px; font-size: 17px; color: #e6e9ee; }
.foot__grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; gap: 32px;
  padding-block: 56px 32px; border-top: 1px solid rgba(255, 255, 255, .14);
}
.foot__brand img { height: 80px; width: auto; }
.foot__contact { margin-top: 16px; color: #b8c4d2; font-size: 17px; }
.foot__contact a { text-decoration: none; display: inline-block; padding: 3px 0; }
.foot__contact a:hover, .foot__col a:hover { text-decoration: underline; }
.foot__label, .foot__h {
  font: 500 12px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: #b8c4d2;
}
.foot__label { margin: 28px 0 10px; }
.foot__h { margin-bottom: 14px; }
.foot__qpa { display: inline-flex; padding: 6px 8px; border-radius: 14px; background: #fff; }
.foot__qpa img { height: 48px; width: auto; }
.foot__col a { display: block; padding: 5px 0; font-size: 17px; text-decoration: none; }
.foot__base { padding-block: 20px 36px; border-top: 1px solid rgba(255, 255, 255, .14); color: #b8c4d2; font-size: 15px; }
.foot__ack { margin-top: 12px; font-style: italic; }
.foot__copy { margin-top: 14px; font-size: 14px; color: #8fa0b3; }
@media (max-width: 860px) {
  .foot { margin: 8px; border-radius: 26px; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (min-width: 600px) and (max-width: 860px) {
  .foot__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- shared motion ---------- */
.bob { display: inline-flex; transform: rotate(90deg); animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: rotate(90deg) translateX(4px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
