/* Metro Testing Service — site styles
   Colors come from the original site and the red METRO street sign in its logo:
   a strong blue, signal red, and deep navy, on clean white and pale blue. */

:root {
  --navy: #13294b;
  --navy-2: #1b3560;
  --blue: #1d5fa8;
  --blue-dark: #154a85;
  --blue-50: #eef4fb;
  --blue-100: #dce8f6;
  --red: #c62f36;
  --red-dark: #a3242a;
  --red-50: #fcefef;
  --ink: #1d2430;
  --ink-soft: #4a5566;
  --line: #dde3ec;
  --bg: #f7f9fc;
  --white: #fff;
  /* theme tokens: these are the ones dark mode swaps */
  --page: #fff;
  --surface: #fff;
  --heading: var(--navy);
  --link: var(--blue);
  --link-hover: var(--blue-dark);
  --accent: var(--red);
  color-scheme: light;
  --radius: 16px;
  --shadow: 0 18px 40px -20px rgba(19, 41, 75, .45);
  --shadow-sm: 0 6px 18px -10px rgba(19, 41, 75, .35);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.12;
  color: var(--heading);
  margin: 0 0 .5em;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: "Archivo", sans-serif; font-weight: 700; font-size: .8rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  margin-bottom: .8rem;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--red); border-radius: 2px; }
.center .eyebrow::after { content: ""; width: 22px; height: 3px; background: var(--red); border-radius: 2px; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 44rem; }
.center .lead { margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--surface); padding: 10px 16px; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.4em; border-radius: 10px;
  font: inherit; font-weight: 700; font-size: 1.05rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 10px 22px -12px rgba(198, 47, 54, .9); }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { border-color: var(--heading); color: var(--heading); background: transparent; }
.btn-outline:hover { background: var(--heading); color: var(--page); }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: #dce8f6; color: var(--navy); }
.btn-lg { font-size: 1.15rem; padding: .9em 1.6em; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--navy); color: #d7e2f2; font-size: .92rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1.5rem; padding: .5rem 0; }
.topbar a { color: #fff; font-weight: 700; text-decoration: none; }
.topbar svg { width: 1em; height: 1em; vertical-align: -.12em; margin-right: .35em; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--heading); }
.brand-sign {
  display: grid; place-items: center; background: var(--red); color: #fff;
  font-family: "Archivo", sans-serif; font-weight: 900; font-size: 1.05rem; letter-spacing: .08em;
  padding: .35em .6em; border-radius: 7px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--red);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: "Archivo", sans-serif; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text small { font-size: .78rem; color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }

.menu-btn {
  display: none; align-items: center; gap: .4em; font: inherit; font-weight: 700;
  background: var(--blue-50); color: var(--heading); border: 0; border-radius: 10px; padding: .55em .9em; cursor: pointer;
}
.menu-btn svg { width: 1.2em; height: 1.2em; }
.nav { display: flex; align-items: center; gap: 1.2rem; }
.nav-list { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: .5em .75em; border-radius: 8px; text-decoration: none;
  color: var(--ink); font-weight: 600; white-space: nowrap;
}
.nav-list a:hover { background: var(--blue-50); color: var(--heading); }
.nav-list a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }

@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; padding: .8rem 16px 1.2rem;
  }
  .nav.open { display: flex; }
  .nav-list { flex-direction: column; }
  .nav-list a { padding: .8em .6em; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-list a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--accent); }
}

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.alt { background: var(--bg); }
.section-head { margin-bottom: 2.5rem; }
.section-head h2 { margin-bottom: .35em; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--blue-50), var(--page)); padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.4rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--ink-soft); font-weight: 600; }
.ticks li { display: flex; align-items: center; gap: .45em; }
.ticks svg { width: 1.15em; height: 1.15em; color: var(--link); }
.hero-art { position: relative; }
.hero-photo { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: .7rem;
  background: var(--surface); border-radius: 12px; padding: .75rem 1rem; box-shadow: var(--shadow-sm);
  font-weight: 700; color: var(--heading); line-height: 1.25;
}
.float-card small { display: block; font-weight: 500; color: var(--ink-soft); font-size: .85rem; }
.float-card .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--red-50); color: var(--accent); flex: none; }
.float-card .ic svg { width: 22px; height: 22px; }
.float-card.f1 { left: -22px; bottom: 26px; }
.float-card.f2 { right: -14px; top: 22px; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .float-card.f1 { left: 10px; bottom: -18px; }
  .float-card.f2 { display: none; }
}

/* Page banner for inner pages */
.page-hero { background: var(--navy); color: #d7e2f2; padding: clamp(2.5rem, 6vw, 4rem) 0; position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, .05);
}
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero .eyebrow { color: #ff9ea2; }
.page-hero .eyebrow::before { background: #ff9ea2; }
.page-hero .lead { color: #d7e2f2; }
.crumbs { font-size: .9rem; margin-bottom: 1rem; }
.crumbs a { color: #fff; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem;
  transition: box-shadow .2s ease, transform .2s ease;
}
a.card { display: block; text-decoration: none; color: inherit; }
.card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-soft); margin: 0; }
.card .ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--blue-50); color: var(--link); margin-bottom: 1rem; }
.card .ic svg { width: 26px; height: 26px; }

/* Numbered steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.steps li { counter-increment: step; background: var(--surface); border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--line); position: relative; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--red); color: #fff; font-family: "Archivo", sans-serif; font-weight: 800; margin-bottom: .8rem;
}
.steps b { display: block; font-family: "Archivo", sans-serif; color: var(--heading); font-size: 1.15rem; margin-bottom: .2rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* Two columns: text + photo */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.flip > :first-child { order: 2; }
.split img { border-radius: 18px; box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.checklist li { position: relative; padding: .35em 0 .35em 1.9em; }
.checklist svg { position: absolute; left: 0; top: .57em; width: 1.25em; height: 1.25em; color: var(--link); }
.checklist.no svg { color: var(--accent); }

/* Hours table */
.hours { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.hours th, .hours td { text-align: left; padding: .65em .2em; border-bottom: 1px solid var(--line); }
.hours th { font-weight: 600; }
.hours td { font-weight: 700; color: var(--heading); text-align: right; }
.hours tr.closed td { color: var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.panel h3 { display: flex; align-items: center; gap: .5rem; }
.panel h3 svg { width: 1.2em; height: 1.2em; color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 880px) { .grid-2 { grid-template-columns: 1fr; } }
.note { font-size: .95rem; color: var(--ink-soft); }
.holidays { columns: 2 260px; list-style: none; padding: 0; margin: 0; font-size: 1rem; }
.holidays li { break-inside: avoid; padding: .35em 0; border-bottom: 1px dashed var(--line); }
.holidays b { color: var(--heading); }

/* Callout */
.callout { display: flex; gap: 1rem; background: var(--red-50); border-left: 5px solid var(--red); border-radius: 10px; padding: 1.1rem 1.3rem; margin: 1.5rem 0; }
.callout svg { width: 1.5em; height: 1.5em; flex: none; color: var(--accent); margin-top: .15em; }
.callout p:last-child { margin: 0; }
.callout.blue { background: var(--blue-50); border-color: var(--blue); }
.callout.blue svg { color: var(--link); }

/* Policy page: table of contents + readable sections */
.doc { display: grid; grid-template-columns: 250px 1fr; gap: 3rem; align-items: start; }
.toc { position: sticky; top: 100px; background: var(--bg); border-radius: var(--radius); padding: 1.2rem 1.3rem; font-size: .95rem; }
.toc b { display: block; font-family: "Archivo", sans-serif; color: var(--heading); margin-bottom: .5rem; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { padding: .18em 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.doc section, .doc .policy { padding: 0; }
.policy { margin-bottom: 2.4rem; scroll-margin-top: 100px; }
.policy h2 { font-size: 1.5rem; padding-bottom: .4rem; border-bottom: 3px solid var(--blue-100); }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } .toc { position: static; } }
.legal h2 { font-size: 1.35rem; margin-top: 2rem; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.gallery figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: .6rem .9rem; font-size: .95rem; color: var(--ink-soft); }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.video { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--navy); box-shadow: var(--shadow-sm); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Big contact cards */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.contact-cards .card { text-align: center; }
.contact-cards .ic { margin-inline: auto; background: var(--red-50); color: var(--accent); }
.contact-cards .big { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 1.45rem; color: var(--heading); text-decoration: none; display: block; margin: .3rem 0; }

/* ---------- Call band ---------- */
.callband { background: var(--navy); color: #d7e2f2; }
.callband-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.callband h2 { color: #fff; }
.callband .lead { color: #d7e2f2; }
.callband .eyebrow { color: #ff9ea2; }
.callband .eyebrow::before { background: #ff9ea2; }
.bigphone { display: inline-flex; align-items: center; gap: .6rem; font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.4rem); color: #fff; text-decoration: none; margin: .4rem 0 1.2rem; }
.bigphone:hover { color: #fff; text-decoration: underline; }
.bigphone .ring { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--red); }
.bigphone svg { width: 26px; height: 26px; }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.info-list li { display: flex; gap: .9rem; background: var(--navy-2); border-radius: 12px; padding: 1rem 1.2rem; }
.info-list svg { width: 26px; height: 26px; color: #ff9ea2; flex: none; margin-top: .15rem; }
.info-list b { display: block; color: #fff; }
@media (max-width: 880px) { .callband-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #0c1c35; color: #aebbd0; font-size: .97rem; padding: 3.5rem 0 1.5rem; }
.site-footer a { color: #e3ebf7; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.foot-grid h4 { color: #fff; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer .brand small { color: #aebbd0; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; border-top: 1px solid #22385c; margin-top: 2.5rem; padding-top: 1.3rem; font-size: .88rem; }
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* Floating call button on phones */
.callfab { display: none; }
@media (max-width: 640px) {
  .callfab { display: inline-flex; position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 60; box-shadow: var(--shadow); }
  body { padding-bottom: 80px; }
  body.menu-open .callfab { display: none; }
  .topbar .hide-sm { display: none; }
  .brand { gap: .5rem; }
  .brand-sign { font-size: .82rem; border-width: 2px; }
  .brand-text b { font-size: 1rem; white-space: nowrap; }
  .brand-text small { font-size: .68rem; }
}


/* ---------- Dark mode ----------
   Follows the visitor's device setting, unless they pick light or dark with the switch in the header
   (js/theme.js stores the choice and sets data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --page: #0d1524;
  --surface: #16213a;
  --bg: #111b2f;
  --ink: #e4eaf3;
  --ink-soft: #a9b5c7;
  --line: #2a3754;
  --heading: #f3f6fb;
  --link: #8fbcf2;
  --link-hover: #b8d5f7;
  --accent: #ff8a8f;
  --blue: #2a6dbb;
  --blue-dark: #3a7fcf;
  --blue-50: #1a2a46;
  --blue-100: #26395c;
  --red-50: #3a1d24;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, .8);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .7);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0d1524;
  --surface: #16213a;
  --bg: #111b2f;
  --ink: #e4eaf3;
  --ink-soft: #a9b5c7;
  --line: #2a3754;
  --heading: #f3f6fb;
  --link: #8fbcf2;
  --link-hover: #b8d5f7;
  --accent: #ff8a8f;
  --blue: #2a6dbb;
  --blue-dark: #3a7fcf;
  --blue-50: #1a2a46;
  --blue-100: #26395c;
  --red-50: #3a1d24;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, .8);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* Light/dark switch */
.head-tools { display: flex; align-items: center; gap: .5rem; }
.theme-btn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  background: var(--blue-50); color: var(--heading); border: 0; border-radius: 10px; cursor: pointer;
}
.theme-btn:hover { background: var(--blue-100); }
.theme-btn svg { width: 22px; height: 22px; }
.theme-btn .moon { display: block; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
}


/* Very narrow phones: the logo, light/dark switch and menu button must share one row */
@media (max-width: 480px) {
  .site-header .wrap { gap: .5rem; }
  .head-tools { gap: .35rem; }
  .brand-text b { white-space: normal; }
  .menu-btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .theme-btn { display: none; }
  .topbar, .site-header, .callband, .site-footer, .callfab, .toc { display: none; }
  .page-hero { background: none; color: #000; }
  .page-hero h1 { color: #000; }
}
