/* Shared by the homepage, legal pages and generated service/area pages.
   Homepage-only styles stay inline in index.html. */

/* ====== FONTS (self-hosted, latin subset) ====== */
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url('/assets/fonts/barlow-condensed-800.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 900; font-display: swap; src: url('/assets/fonts/barlow-condensed-900.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/inter-latin.woff2') format('woff2'); }
/* Arial resized to each font's metrics, so text does not move when the font arrives. */
@font-face { font-family: 'Barlow Fallback'; font-weight: 800 900; src: local('Arial Bold'), local('Arial'); size-adjust: 78%; ascent-override: 128%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: 'Inter Fallback'; src: local('Arial'); size-adjust: 106%; ascent-override: 91%; descent-override: 23%; line-gap-override: 0%; }

/* ====== TOKENS ====== */
:root {
  --navy: #1b2a4a;
  --navy2: #0d1e38;
  --red: #c8102e;
  --red2: #a00d24;
  --red-on-dark: #f0566c;
  --gold: #d4a017;
  --white: #ffffff;
  --offwhite: #f4f5f7;
  --surface: #f4f5f7;
  --text: #1b2a4a;
  --muted: #536079;
  --on-dark: rgba(255, 255, 255, .78);
  --on-dark-muted: rgba(255, 255, 255, .65);
  --border: #d8dde8;
  --font-display: 'Barlow Condensed', 'Barlow Fallback', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Inter Fallback', Arial, sans-serif;
  --topbar-h: 44px;
  --nav-h: 72px;
  --page: 1200px;
  --gutter: 24px;
  --section-y: 80px;
  --dur: .2s;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ====== BASE ====== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--text); background: var(--white); }
img, video { max-width: 100%; }
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--gold); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 12px 20px; background: var(--white); color: var(--navy); font-weight: 700; border-radius: 6px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
main:focus { outline: none; }

/* ====== HEADER ====== */
/* The whole header sticks, offset so only the top bar scrolls away. */
.site-header { position: sticky; top: calc(var(--topbar-h) * -1); z-index: 200; }
.top-bar { display: flex; align-items: center; justify-content: center; gap: 6px; height: var(--topbar-h); padding: 0 16px; background: var(--navy2); color: var(--white); font-size: 13px; letter-spacing: .5px; white-space: nowrap; }
.top-bar a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); text-decoration: none; font-weight: 700; }
.site-nav { background: var(--white); border-bottom: 3px solid var(--red); box-shadow: 0 2px 20px rgba(0, 0, 0, .1); }
.nav-inner { max-width: var(--page); height: var(--nav-h); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { height: 52px; width: auto; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-text .name { font-family: var(--font-display); font-size: 22px; font-weight: 900; color: var(--navy); letter-spacing: 1px; }
.nav-logo-text .sub { font-size: 11px; color: var(--red); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--navy); font-size: 14px; font-weight: 600; letter-spacing: .3px; text-decoration: none; transition: color var(--dur), background-color var(--dur); }
.nav-links a:hover { color: var(--red); }
.nav-links a[aria-current] { color: var(--red); box-shadow: inset 0 -3px 0 var(--red); }
.nav-links .nav-cta { padding: 0 20px; background: var(--red); color: var(--white); border-radius: 6px; font-weight: 700; }
.nav-links .nav-cta:hover { background: var(--red2); color: var(--white); }
.hamburger { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; }
.mobile-nav { display: none; flex-direction: column; gap: 4px; max-height: calc(100vh - var(--nav-h) - var(--topbar-h)); max-height: calc(100dvh - var(--nav-h) - var(--topbar-h)); overflow-y: auto; padding: 8px 24px 16px; border-top: 1px solid var(--border); }
.mobile-nav a { padding: 12px 0; color: var(--navy); font-size: 17px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--border); }
.mobile-nav a[aria-current] { color: var(--red); }
.mobile-nav a:last-child { margin-top: 8px; padding: 12px; background: var(--red); color: var(--white); border: none; border-radius: 8px; text-align: center; }

/* ====== BUTTONS ====== */
.btn-primary, .btn-outline, .btn-white, .btn-outline-white { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 28px; border: 2px solid transparent; border-radius: 8px; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color var(--dur), border-color var(--dur), transform var(--dur); }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red2); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .45); }
.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .65); }
.btn-outline:hover, .btn-outline-white:hover { border-color: var(--white); background: rgba(255, 255, 255, .1); }
.btn-white { background: var(--white); color: var(--red); }
.btn-white:hover { background: var(--offwhite); }
.btn-primary:active, .btn-outline:active, .btn-white:active, .btn-outline-white:active { transform: scale(.98); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ====== SECTIONS ====== */
.red-bar { height: 5px; width: 100%; background: linear-gradient(90deg, var(--navy2), var(--red), var(--gold), var(--red), var(--navy2)); }
.section { padding: var(--section-y) var(--gutter); }
.section-inner { max-width: var(--page); margin: 0 auto; }
.section-header { margin-bottom: 48px; }
.section-tag { margin-bottom: 8px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.section-title { margin-bottom: 16px; color: var(--navy); font-family: var(--font-display); font-size: clamp(32px, 4vw, 48px); font-weight: 900; line-height: 1.1; text-wrap: balance; }
.section-title em { font-style: normal; color: var(--red); }
.section-sub { max-width: 560px; color: var(--muted); font-size: 16px; line-height: 1.7; }

/* ====== RULED LINK LIST (areas, related pages, hub lists) ====== */
.link-list { list-style: none; border-top: 2px solid var(--navy); }
.link-list li { border-bottom: 1px solid var(--border); }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 0; color: var(--navy); text-decoration: none; transition: color var(--dur); }
.link-list a:hover { color: var(--red); }
.link-list .icon { color: var(--red); transition: transform var(--dur) var(--ease); }
.link-list a:hover .icon { transform: translateX(4px); }
.link-name { font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.15; }
.link-note { display: block; max-width: 64ch; margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.link-list--lg { border-top-width: 3px; }
.link-list--lg a { min-height: 88px; padding: 24px 0; }
.link-list--lg .link-name { font-size: clamp(26px, 3vw, 34px); font-weight: 900; }

/* ====== FAQ ====== */
.faq-bg { background: var(--surface); }
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; color: var(--navy); font-size: 16px; font-weight: 700; line-height: 1.4; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; flex: none; color: var(--red); font-size: 22px; font-weight: 400; line-height: 1; }
.faq-item summary:focus-visible { outline-offset: -3px; }
.faq-item[open] { border-top: 3px solid var(--red); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-answer { padding: 0 24px 20px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.faq-answer a { color: var(--red); }

/* ====== CTA BAND ====== */
.cta-section { padding: var(--section-y) var(--gutter); background: linear-gradient(135deg, var(--red2), var(--red)); text-align: center; }
.cta-section h2 { margin-bottom: 12px; color: var(--white); font-family: var(--font-display); font-size: clamp(36px, 5vw, 56px); font-weight: 900; line-height: 1.1; text-wrap: balance; }
.cta-section p { max-width: 500px; margin: 0 auto 32px; color: rgba(255, 255, 255, .95); font-size: 17px; line-height: 1.6; }
.cta-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ====== FOOTER ====== */
.site-footer { padding: 48px var(--gutter) 24px; background: var(--navy2); color: var(--on-dark); }
.footer-inner { max-width: var(--page); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo img { height: 44px; width: auto; }
.footer-logo-text .name { font-family: var(--font-display); font-size: 20px; font-weight: 900; color: var(--white); }
.footer-logo-text .sub { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.footer-desc { max-width: 300px; font-size: 14px; line-height: 1.7; }
.footer-nap { margin-top: 12px; font-size: 14px; font-style: normal; line-height: 1.7; overflow-wrap: anywhere; }
.footer-nap a { display: inline-block; padding: 4px 0; color: inherit; }
.footer-heading { margin-bottom: 12px; color: var(--white); font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: .5px; }
.footer-col a { display: block; padding: 6px 0; color: var(--on-dark-muted); font-size: 14px; text-decoration: none; transition: color var(--dur); }
.footer-col a:hover, .footer-nap a:hover, .footer-legal-links a:hover { color: var(--white); }
.footer-compliance { margin-bottom: 20px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); color: var(--on-dark-muted); font-size: 12px; line-height: 1.7; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-legal-links a { display: inline-block; padding: 8px 0; color: var(--on-dark-muted); font-size: 12px; text-decoration: none; }

/* ====== INNER PAGES: INTRO ====== */
.page-intro { position: relative; overflow: hidden; padding: 32px var(--gutter) 64px; background: linear-gradient(135deg, var(--navy2) 0%, var(--navy) 100%); color: var(--white); }
.page-intro::after { content: ''; position: absolute; inset: 0 0 0 auto; width: 28%; background: repeating-linear-gradient(0deg, transparent 0 40px, rgba(200, 16, 46, .16) 40px 80px); pointer-events: none; }
.page-intro .section-inner { position: relative; z-index: 1; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; margin-bottom: 32px; list-style: none; font-size: 14px; }
.breadcrumbs li { display: flex; align-items: center; min-height: 44px; color: var(--on-dark); }
.breadcrumbs li + li::before { content: '/'; padding: 0 12px; color: var(--on-dark-muted); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-dark); text-underline-offset: 4px; }
.breadcrumbs a:hover { color: var(--white); }
.intro-grid { display: grid; gap: 40px 64px; align-items: end; }
.page-intro h1 { max-width: 18ch; margin-bottom: 24px; font-family: var(--font-display); font-size: clamp(40px, 6vw, 68px); font-weight: 900; line-height: 1; letter-spacing: -.5px; text-wrap: balance; }
.lead { max-width: 62ch; margin-bottom: 32px; color: rgba(255, 255, 255, .88); font-size: 18px; line-height: 1.65; }
.updated { margin-top: 24px; color: var(--on-dark-muted); font-size: 14px; }
.shop-facts { padding-left: 24px; border-left: 3px solid var(--red); }
.shop-facts dt { color: var(--gold); font-size: 14px; font-weight: 600; }
.shop-facts dd { margin-bottom: 16px; font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.25; }
.shop-facts dd:last-child { margin-bottom: 0; }
.shop-facts a { color: inherit; text-underline-offset: 4px; }

/* ====== INNER PAGES: CONTENT BLOCKS ====== */
/* Each block's layout follows its content type, set by template.mjs. */
.block { padding: 56px var(--gutter); }
.block--tint + .block--tint, .block + .block--split, .block--split + .block--wide:not(.block--tint) { padding-top: 0; }
.block-title { color: var(--navy); font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 38px); font-weight: 900; line-height: 1.1; text-wrap: balance; }
.prose { max-width: 68ch; }
.prose p { color: var(--muted); font-size: 17px; line-height: 1.75; }
.prose p + p, .prose + .checks, .prose + .step-rail, .prose + .table-wrap, .checks + .step-rail, .checks + .table-wrap, .step-rail + .table-wrap { margin-top: 24px; }
.prose a, .checks a, .step-rail a, .table-wrap a { color: var(--red); font-weight: 600; text-underline-offset: 3px; }
.prose a:hover, .checks a:hover, .step-rail a:hover, .table-wrap a:hover { color: var(--red2); }
.block--split .section-inner { display: grid; gap: 20px 64px; }
.block--split .section-inner::before { content: ''; grid-column: 1 / -1; height: 1px; margin-bottom: 36px; background: var(--border); }
.block--tint { background: var(--surface); }
.block--tint + .block--split, .block--steps + .block--split, .block--wide + .block--split { padding-top: 56px; }
.block--tint + .block--split .section-inner::before, .block--steps + .block--split .section-inner::before, .red-bar + .block--split .section-inner::before { display: none; }
.block--wide .block-title { max-width: 24ch; margin-bottom: 20px; }
.checks { list-style: none; display: grid; gap: 0 48px; }
.checks li { position: relative; padding: 14px 0 14px 28px; border-top: 1px solid var(--border); color: var(--text); font-size: 16px; line-height: 1.55; }
.checks li::before { content: ''; position: absolute; left: 0; top: 24px; width: 14px; height: 4px; background: var(--red); }
.block--steps { background: var(--navy2); color: var(--white); }
.block--steps .block-title { max-width: 24ch; margin-bottom: 20px; color: var(--white); }
.block--steps .prose p { color: var(--on-dark); }
.block--steps .prose a, .step-grid a { color: var(--white); }
.block--steps .prose a:hover, .step-grid a:hover { color: var(--gold); }
.step-grid, .step-rail { list-style: none; counter-reset: step; }
.step-grid { display: grid; gap: 32px; margin-top: 40px; }
.step-grid li, .step-rail li { counter-increment: step; position: relative; font-size: 16px; line-height: 1.6; }
.step-grid li { padding-top: 60px; color: var(--on-dark); }
.step-grid li::before { content: counter(step); position: absolute; top: 0; left: 0; color: var(--gold); font-family: var(--font-display); font-size: 48px; font-weight: 900; line-height: 1; }
.step-rail li { min-height: 44px; padding: 8px 0 20px 60px; }
.step-rail li::before { content: counter(step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: var(--white); font-family: var(--font-display); font-size: 20px; font-weight: 900; }
.table-wrap { overflow-x: auto; border-top: 3px solid var(--red); }
.table-wrap table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.table-wrap th, .table-wrap td { padding: 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.table-wrap thead th { background: var(--navy); color: var(--white); font-size: 15px; }
.table-wrap tbody th { color: var(--navy); font-weight: 700; }
.table-wrap td { color: var(--muted); }

/* ====== INNER PAGES: MEDIA ====== */
.repair-media { margin: 0; }
.media-pair { display: grid; gap: 12px; }
.media-shot { position: relative; overflow: hidden; border-radius: 12px; background: var(--navy); }
.media-shot img, .repair-media video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.repair-media video { max-width: 720px; border-radius: 12px; background: var(--navy); }
.media-label { position: absolute; left: 12px; bottom: 12px; padding: 4px 12px; border-radius: 4px; background: var(--navy); color: var(--white); font-size: 13px; font-weight: 700; }
.media-label--after { background: var(--red); }
.repair-media figcaption { margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.media-pair + video { margin-top: 12px; }

/* ====== RESPONSIVE ====== */
@media (min-width: 600px) {
  .media-pair--two { grid-template-columns: 1fr 1fr; }
  .step-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .intro-grid--facts { grid-template-columns: minmax(0, 1fr) 320px; }
  .block--split .section-inner, .faq-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 0 64px; align-items: start; }
  .faq-split .faq-list { width: 100%; margin: 0; }
  .checks--two { grid-template-columns: 1fr 1fr; }
  .step-grid { grid-template-columns: repeat(var(--steps, 4), 1fr); }
  .link-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; }
}
@media (min-width: 1100px) {
  .block-title--sticky { position: sticky; top: calc(var(--nav-h) + 32px); }
}
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-nav.open { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --gutter: 16px; --section-y: 48px; }
  .section-header { margin-bottom: 32px; }
  .block { padding-block: 40px; }
  .page-intro { padding-bottom: 40px; }
  .page-intro::after { opacity: .5; }
  .breadcrumbs ol { margin-bottom: 16px; }
  .btn-row > * { flex: 1 1 220px; }
  .footer-col a { padding: 14px 0; }
  .footer-nap a { padding: 14px 0; }
  .footer-legal-links a { padding: 16px 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
/* Phones: each table row stacks, with the column name above its value. */
@media (max-width: 600px) {
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap tbody th, .table-wrap td { display: block; }
  .table-wrap tr { padding: 16px; border-bottom: 1px solid var(--border); }
  .table-wrap tbody th, .table-wrap td { padding: 0; border: none; }
  .table-wrap td { margin-top: 12px; }
  .table-wrap td::before { content: attr(data-label); display: block; color: var(--navy); font-size: 14px; font-weight: 600; }
}
@media (max-width: 480px) {
  .top-bar-label { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-item summary { padding: 16px; }
  .faq-answer { padding: 0 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.nowrap { white-space: nowrap; }
