/* phoenixdriveline.com — collision estimate informational site
   Conventional high-converting landing layout. Tokens first, components after.
   All asset paths elsewhere are ABSOLUTE (/css/…, /js/…): nginx serves /estimate
   without redirecting to /estimate/, so relative paths would 404. */

:root {
  /* ink */
  --ink:        #0E2233;
  --ink-muted:  #4A6070;
  --ink-faint:  #7E93A2;

  /* brand */
  --brand:      #14496B;
  --brand-dark: #0B3350;

  /* action — high-contrast against the navy, used only on real CTAs */
  --cta:        #F08C00;
  --cta-hover:  #D97A00;
  --cta-soft:   #FFF4E0;

  /* surface */
  --bg:         #FFFFFF;
  --bg-soft:    #F4F7F9;
  --line:       #DDE5EA;
  --ok:         #2B8A3E;
  --err:        #C92A2A;

  /* type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1.0625rem;
  --text-lg:   1.1875rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  2.875rem;

  /* space */
  --s2: .5rem;  --s3: .75rem; --s4: 1rem;   --s5: 1.25rem;
  --s6: 1.5rem; --s8: 2rem;   --s10: 2.5rem; --s12: 3rem;
  --s16: 4rem;  --s20: 5rem;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 4px rgba(14,34,51,.06), 0 8px 24px rgba(14,34,51,.08);
  --shadow-lg: 0 4px 8px rgba(14,34,51,.08), 0 16px 48px rgba(14,34,51,.14);
  --ease: cubic-bezier(.2,.7,.3,1);
  --dur: 160ms;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

/* Visible keyboard focus everywhere — never remove without replacing. */
:focus-visible {
  outline: 3px solid var(--cta);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2.5rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: var(--s3) var(--s5);
  z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------------------------------------------------------------- header -- */

.header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 30;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s6); padding: var(--s4) 0;
}
.logo {
  font-weight: 800; font-size: var(--text-xl); letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.logo span { color: var(--cta); }

.nav { display: flex; gap: var(--s6); align-items: center; }
.nav a {
  color: var(--ink-muted); text-decoration: none;
  font-size: var(--text-sm); font-weight: 600;
}
.nav a:hover { color: var(--ink); }

.header-phone {
  font-weight: 700; color: var(--ink); text-decoration: none;
  font-size: var(--text-sm);
}

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: var(--s2) var(--s3);
  font-size: var(--text-base); cursor: pointer; color: var(--ink);
}

/* ------------------------------------------------------------------ hero -- */

/* Photographic hero behind a heavy navy wash. The overlay is doing real work:
   it holds white body text at an accessible contrast ratio no matter what the
   photo does underneath. JPEG (not WebP) here on purpose — CSS background has no
   clean <picture> equivalent, and image-set() support is still uneven. 88K. */
.hero {
  background:
    linear-gradient(180deg, rgba(20,73,107,.86) 0%, rgba(11,51,80,.93) 100%),
    url("/images/hero-home.jpg") center / cover no-repeat;
  color: #fff;
  padding: var(--s16) 0 var(--s20);
}
.hero-alt {
  background:
    linear-gradient(180deg, rgba(20,73,107,.86) 0%, rgba(11,51,80,.93) 100%),
    url("/images/hero-estimate.jpg") center / cover no-repeat;
}
/* Three children, explicitly placed. Desktop: copy and points stack in column 1
   while the card spans both rows in column 2 — no dead space under the bullets.
   Mobile: the card is promoted ABOVE the bullets so a paid visitor reaches it
   without scrolling past a value-prop list. */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  /* Row 1 sizes to the copy; row 2 absorbs the remaining height. Without the
     explicit `auto 1fr`, the card spanning both rows distributes its height
     across them and opens a gap between the lede and the bullets. */
  grid-template-rows: auto 1fr;
  column-gap: var(--s12); row-gap: var(--s6);
  align-items: start;
}
.hero-copy   { grid-column: 1; grid-row: 1; }
.hero-points { grid-column: 1; grid-row: 2; align-self: start; }
.hero .form-card { grid-column: 2; grid-row: 1 / -1; }
.hero h1 {
  margin: 0 0 var(--s5);
  font-size: var(--text-4xl); line-height: 1.1;
  font-weight: 800; letter-spacing: -.025em;
}
.hero .lede {
  margin: 0 0 var(--s6);
  font-size: var(--text-lg); color: #D7E3EC; max-width: 46ch;
}
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.hero-points li {
  display: flex; gap: var(--s3); align-items: flex-start;
  font-size: var(--text-base); color: #EAF1F6;
}
.hero-points li::before {
  content: "✓"; color: var(--cta); font-weight: 800; flex: none; line-height: 1.5;
}

/* ------------------------------------------------------------- info card -- */

.form-card {
  background: var(--bg); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: var(--s8);
}
.form-card h2 {
  margin: 0 0 var(--s2); font-size: var(--text-xl);
  font-weight: 800; letter-spacing: -.015em;
}
.form-card .form-sub {
  margin: 0 0 var(--s6); color: var(--ink-muted); font-size: var(--text-sm);
}
.form-card p {
  margin: 0 0 var(--s4); color: var(--ink-muted);
  font-size: var(--text-sm); line-height: 1.6;
}
.form-card .btn { margin-top: var(--s2); }

.btn {
  display: inline-block; width: 100%;
  font-family: inherit; font-size: var(--text-lg); font-weight: 800;
  color: #fff; background: var(--cta);
  border: none; border-radius: var(--radius-sm);
  padding: var(--s4) var(--s6); cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--cta-hover); }
.btn:active { transform: translateY(1px); }

/* --------------------------------------------------------------- sections -- */

.section { padding: var(--s20) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto var(--s12); }
.section-head h2 {
  margin: 0 0 var(--s3); font-size: var(--text-3xl);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.15;
}
.section-head p { margin: 0; color: var(--ink-muted); font-size: var(--text-lg); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s8); }
.step { text-align: center; }
.step-num {
  width: 44px; height: 44px; margin: 0 auto var(--s4);
  display: grid; place-items: center;
  background: var(--cta-soft); color: var(--cta-hover);
  border-radius: 50%; font-weight: 800; font-size: var(--text-lg);
}
.step h3 { margin: 0 0 var(--s2); font-size: var(--text-lg); font-weight: 700; }
.step p { margin: 0; color: var(--ink-muted); font-size: var(--text-sm); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.card-body { padding: var(--s6); }
.card-media { display: block; aspect-ratio: 4 / 3; background: var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { margin: 0 0 var(--s2); font-size: var(--text-lg); font-weight: 700; }
.card p { margin: 0; color: var(--ink-muted); font-size: var(--text-sm); }
.card .figure {
  font-size: var(--text-2xl); font-weight: 800;
  color: var(--brand); letter-spacing: -.02em; display: block; margin-bottom: var(--s2);
}

.faq { display: grid; gap: var(--s4); }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s5) var(--s6); background: var(--bg);
}
.faq summary {
  cursor: pointer; font-weight: 700; font-size: var(--text-base);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--cta); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: var(--s3) 0 0; color: var(--ink-muted); font-size: var(--text-sm); }

/* CTA band */
.band {
  background: var(--ink); color: #fff; padding: var(--s16) 0; text-align: center;
}
.band h2 { margin: 0 0 var(--s3); font-size: var(--text-3xl); font-weight: 800; letter-spacing: -.02em; }
.band p { margin: 0 0 var(--s8); color: #B9CAD6; font-size: var(--text-lg); }
.band .btn { width: auto; padding-inline: var(--s12); }

/* ---------------------------------------------------------------- footer -- */

.footer {
  background: var(--bg-soft); border-top: 1px solid var(--line);
  padding: var(--s12) 0 var(--s8); font-size: var(--text-sm);
}
.footer-grid {
  display: flex; flex-wrap: wrap; gap: var(--s6);
  justify-content: space-between; align-items: flex-start;
  margin-bottom: var(--s8);
}
.footer-links { display: flex; gap: var(--s6); flex-wrap: wrap; }
.footer-links a { color: var(--ink-muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal {
  border-top: 1px solid var(--line); padding-top: var(--s6);
  color: var(--ink-faint); font-size: var(--text-xs); line-height: 1.6;
}

/* -------------------------------------------------------------- thank you -- */

.ty { padding: var(--s20) 0; text-align: center; }
.ty-mark {
  width: 72px; height: 72px; margin: 0 auto var(--s6);
  display: grid; place-items: center;
  background: #E6F4EA; color: var(--ok);
  border-radius: 50%; font-size: 2rem; font-weight: 800;
}
.ty h1 { margin: 0 0 var(--s4); font-size: var(--text-3xl); font-weight: 800; letter-spacing: -.02em; }
.ty p { margin: 0 auto var(--s6); max-width: 52ch; color: var(--ink-muted); font-size: var(--text-lg); }
.ty ol {
  text-align: left; max-width: 46ch; margin: 0 auto var(--s8);
  color: var(--ink-muted); font-size: var(--text-base);
}
.ty ol li { margin-bottom: var(--s2); }

/* ------------------------------------------------------------------ prose -- */

/* Arbitration / class-waiver call-out carried over with the legal copy. */
.prose .legal-notice {
  border-left: 4px solid var(--cta);
  background: var(--cta-soft);
  padding: var(--s4) var(--s5);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0 0 var(--s8);
}
.prose .legal-notice p {
  margin: 0; color: var(--ink); font-size: var(--text-sm); font-weight: 600;
}

.prose h1 { font-size: var(--text-3xl); font-weight: 800; letter-spacing: -.02em; margin: 0 0 var(--s3); }
.prose h3 { font-size: var(--text-lg); font-weight: 700; margin: var(--s8) 0 var(--s2); color: var(--ink); }
.prose .updated { color: var(--ink-faint); font-size: var(--text-sm); margin: 0 0 var(--s10); }
.prose h2 { font-size: var(--text-xl); font-weight: 700; margin: var(--s10) 0 var(--s3); }
.prose p, .prose li { color: var(--ink-muted); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: var(--s2); }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; row-gap: var(--s8); }
  /* Card first, supporting points after — the CTA must not sit below the fold. */
  .hero-copy       { grid-column: 1; grid-row: 1; }
  .hero .form-card { grid-column: 1; grid-row: 2; }
  .hero-points     { grid-column: 1; grid-row: 3; }
  .steps, .cards { grid-template-columns: 1fr; gap: var(--s6); }
  .hero { padding: var(--s12) 0 var(--s16); }
  :root { --text-4xl: 2.125rem; --text-3xl: 1.75rem; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--s5); gap: var(--s4);
  }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
  .form-card { padding: var(--s6); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
