/* HomeDeliveryClaims.com — base styles. Brand colors come from the logo. Mobile-first; most claimants are on a phone.
   Shared component vocabulary: .btn .btn-primary .btn-secondary .card .alert
   (.alert-info .alert-success .alert-error) .field .muted .stack .lead .badge
   .page-title .grid-2
   Public site: .hero .steps .section .callout .checklist .timeline .faq .prose .cta-band */

:root {
  --ink: #1c2b40;
  --ink-soft: #4f5d70;
  /* Logo navy ("Home"), blue ("delivery") and gold (shield, rules). */
  --brand: #02244d;
  --brand-ink: #ffffff;
  --accent: #0f71b9;
  /* Blue for buttons and text: white on it, and it on white, pass WCAG AA. */
  --accent-strong: #0f71b9;
  --accent-deeper: #0a5a96;
  --accent-text: #0b5f9e;
  --accent-soft: #e8f2fb;
  --gold: #fdbf1a;
  --gold-soft: #fff6dd;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --line: #dde5ef;
  /* Form field outlines: 3:1 or better against white and --bg-soft (WCAG 1.4.11). */
  --field-border: #7a8797;
  --error: #b42318;
  --error-soft: #fdecea;
  --success: #067647;
  --success-soft: #e6f6ee;
  --info-soft: #eef4fb;
  --font-display: "Montserrat", "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
  /* White gap + solid ring: visible on light and dark backgrounds. */
  --focus: 0 0 0 2px #fff, 0 0 0 5px var(--accent-strong);
  color-scheme: light;
}

/* Self-hosted brand fonts (SIL OFL 1.1, licenses in fonts/): no third-party requests. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/open-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/open-sans-latin-700-normal.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--font-body);
  /* Full-height column: main grows so the footer sits at the bottom of short pages. */
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-text); }
a:hover { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  /* Transparent outline still shows in Windows high-contrast mode, where shadows don't. */
  outline: 3px solid transparent;
  box-shadow: var(--focus);
  border-radius: 4px;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

.site-header { background: #fff; border-bottom: 3px solid var(--gold); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: auto; height: 54px; }
@media (min-width: 720px) { .brand img { height: 68px; } }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.site-nav a {
  color: var(--brand); text-decoration: none; padding: 6px 0;
  font: 600 0.95rem/1.3 var(--font-display);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent-text); }
.site-nav a[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent); }
/* Contrast themes repaint the transparent border too: underline only the current page. */
@media (forced-colors: active) {
  .site-nav a:not([aria-current="page"]) { border-bottom-style: none; padding-bottom: 8px; }
}
/* Phones: the four links share one full-width row under the logo. */
@media (max-width: 719px) {
  .site-nav { width: 100%; justify-content: space-between; gap: 2px 6px; }
  .site-nav a { font-size: 0.8125rem; }
}
/* Below 360px they can't share one row: two even rows of two. */
@media (max-width: 359px) {
  .site-nav { display: grid; grid-template-columns: auto auto; justify-content: space-between; justify-items: start; }
}

/* width: .wrap's auto margins stop the flex item stretching. */
main.wrap { flex: 1 0 auto; width: 100%; padding-top: 28px; padding-bottom: 56px; overflow-wrap: break-word; }
.site-footer { border-top: 4px solid var(--gold); background: var(--brand); color: #c9d6e6; font-size: 0.9rem; padding: 20px 0; }
.site-footer p { margin: 6px 0 0; }

h1, h2, h3 { line-height: 1.25; color: var(--brand); font-family: var(--font-display); font-weight: 700; text-wrap: balance; }
h3 { font-weight: 600; }
h1, .page-title { font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 0 0 12px; }
h2 { font-size: 1.3rem; margin: 32px 0 10px; }
h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.lead { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; }

.stack > * + * { margin-top: 16px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
  font: 600 1rem/1.3 var(--font-display); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: var(--accent-deeper); color: #fff; }
.btn-secondary { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn-block { width: 100%; }

.field { display: block; margin-bottom: 16px; }
.field > span, .field > label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  border: 1px solid var(--field-border); border-radius: 8px; background: #fff; min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; }
.hint { font-size: 0.875rem; color: var(--ink-soft); margin-top: 4px; }

.alert { border-radius: var(--radius); padding: 12px 14px; border: 1px solid transparent; }
.alert-info { background: var(--info-soft); border-color: #c3d9f2; }
.alert-success { background: var(--success-soft); border-color: #b7e4cb; color: var(--success); }
.alert-error { background: var(--error-soft); border-color: #f5c2bd; color: var(--error); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 0.85rem; }

details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; margin-bottom: 10px; background: #fff; }
details > summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }

/* ---- Footer ---- */
.site-footer { padding: 28px 0 32px; }
.site-footer nav a { display: inline-block; padding: 6px 2px; color: #fff; text-decoration: none; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:focus-visible { box-shadow: 0 0 0 3px var(--gold); }
.footer-brand { margin: 0 0 4px; color: #fff; font: 700 1rem/1.4 var(--font-display); }
.footer-tagline { margin: 0 0 14px; color: var(--gold); font: 600 0.8rem/1.4 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; }

/* ---- Shared helpers ---- */
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* Bot trap on forms: off-screen, never focusable. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.narrow { max-width: 560px; }
.nowrap { white-space: nowrap; }
.section { margin-top: 48px; }
.section > h2:first-child { margin-top: 0; }
.section-lead { color: var(--ink-soft); margin: -2px 0 20px; max-width: 62ch; }
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
  color: var(--brand); font: 700 0.8rem/1.3 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; flex: none; width: 28px; height: 3px; border-radius: 2px; background: var(--gold); }
.btn-lg { min-height: 52px; padding: 12px 24px; font-size: 1.05rem; }
.btn-on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn-on-dark:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 12px; }
.actions .btn { flex: 1 1 200px; }
.actions-center { justify-content: center; }
@media (min-width: 720px) { .actions .btn { flex: 0 0 auto; } }
input[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

/* ---- Home hero ---- */
.hero {
  display: grid; gap: 24px; align-items: center;
  padding: 28px 20px; border-radius: 16px;
  background: linear-gradient(160deg, var(--info-soft) 0%, #ffffff 70%);
  border: 1px solid var(--line);
}
.hero h1 { font-size: clamp(1.85rem, 7vw, 2.7rem); letter-spacing: -0.01em; margin-bottom: 14px; }
.hero .lead { color: var(--ink); max-width: 46ch; }
.hero-text > :last-child { margin-bottom: 0; }
.hero-art { display: none; }
.hero-art svg { display: block; width: 100%; max-width: 340px; height: auto; margin-left: auto; }
@media (min-width: 720px) {
  .hero { grid-template-columns: 1.3fr 1fr; padding: 44px 40px; }
  .hero-art { display: block; }
}

/* ---- How it works: three steps ----
   Scoped to .steps: the claim page's progress tracker also has .step items. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps > .step { position: relative; padding: 20px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.steps > .step h3 { margin: 14px 0 6px; }
.steps > .step p { margin: 0; color: var(--ink-soft); }
.step-icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent-text);
}
.step-icon .icon { width: 26px; height: 26px; }
.step-num { position: absolute; top: 20px; right: 18px; color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; }

/* ---- Checklists and callouts ---- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.checklist .icon { margin-top: 0.2em; color: var(--accent-strong); }
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; border-radius: var(--radius);
  background: var(--info-soft); border: 1px solid #c3d9f2;
}
.callout-icon { width: 28px; height: 28px; margin-top: 2px; color: var(--brand); }
.callout h2, .callout h3 { margin-top: 0; }
.callout > div > :last-child { margin-bottom: 0; }
.heading-icon { color: var(--accent-text); margin-right: 4px; }

/* ---- Start a claim: embedded form ---- */
.claim-form-shell { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
/* The form can't report its height, so leave room for its longest (phone) layout. */
.claim-form-frame { display: block; width: 100%; height: 1900px; border: 0; }
@media (min-width: 720px) { .claim-form-frame { height: 1500px; } }
.frame-fallback { margin: 10px 0 0; }

/* ---- Claim stages timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { position: relative; padding: 0 0 20px 38px; }
.timeline > li::before {
  content: ""; position: absolute; left: 6px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 3px solid var(--accent-strong);
}
.timeline > li::after { content: ""; position: absolute; left: 13px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li:last-child::after { display: none; }
.timeline > li.end::before { border-color: var(--ink-soft); }
.timeline h3 { margin: 0 0 4px; }
.timeline p { margin: 0; color: var(--ink-soft); }

/* ---- FAQ ---- */
.faq details { padding: 0; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--accent-text); font-size: 1.4rem; font-weight: 400; line-height: 1; }
.faq details[open] > summary::after { content: "\2212"; }
.faq details[open] > summary { margin-bottom: 0; }
.faq .answer { padding: 12px 16px 4px; }
.faq .answer ul { padding-left: 1.25em; }

/* ---- Legal pages ---- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 36px; }
.prose ul { padding-left: 1.25em; }
.prose li + li { margin-top: 6px; }
.meta { color: var(--ink-soft); font-size: 0.95rem; margin-top: -4px; }

/* ---- Closing call to action ---- */
.cta-band { margin-top: 56px; padding: 32px 20px; border-radius: 16px; background: var(--brand); color: #fff; text-align: center; border-bottom: 4px solid var(--gold); }
.cta-band h2 { margin: 0 0 8px; color: #fff; }
.cta-band p { margin: 0 auto; max-width: 52ch; color: #d6e4ef; }
.cta-band .actions { margin-bottom: 0; }

/* ---- Manage your claim (/find-my-claim) and error pages ---- */
.sent-alert { display: flex; gap: 10px; align-items: flex-start; }
.sent-alert p { margin: 0; }
.sent-alert .icon { margin-top: 0.2em; }
.error-page { max-width: 640px; padding-top: 8px; }
.error-code { margin: 0 0 6px; color: var(--accent-text); font: 700 0.85rem/1.3 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---- Motion ---- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a, .faq summary::after { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print { .site-header, .site-footer, .btn, .hero-art, .cta-band { display: none; } }

/* The test site (DEMO_MODE): a banner on every page, and the test-only boxes on the claim page. */
.demo-banner { margin: 0; padding: 8px 16px; background: var(--gold); color: var(--brand); font-weight: 700; font-size: 0.95rem; line-height: 1.4; text-align: center; }
