/* Brand tokens (from Max Insurance logo) */
:root {
  --gold: #DCB740;
  --gold-dark: #B8962A;
  --black: #000000;
  --ink: #111111;
  --gray: #6D6D6D;
  --gray-light: #F4F4F4;
  --line: #E3E3E3;
  --white: #FFFFFF;
  --radius: 14px;
  --font: "Poppins", "Montserrat", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; } /* = header height, so sections line up under it */
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h3 { font-weight: 600; font-size: 1.125rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--gold); color: var(--black); padding: 10px 16px; border-radius: 8px; z-index: 100; font-weight: 500; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-lg { width: 32px; height: 32px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 10px; border: 0;
  font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-gold { background: var(--gold); color: var(--black); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-sm { min-height: 44px; padding: 0 18px; }
.link-btn {
  margin-top: auto; align-self: flex-start; background: none; border: 0; padding: 10px 0;
  font-weight: 500; cursor: pointer; border-bottom: 2px solid var(--gold);
}
.link-btn:hover { color: var(--gray); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); border-bottom: 1px solid #222; overflow-x: clip; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.nav { position: relative; }
.brand { background: var(--white); border-radius: 10px; padding: 4px 10px; position: relative; z-index: 2; }

/* Small header car (moved by script.js) */
.mini-car {
  position: absolute; left: 0; bottom: 2px; width: 52px; z-index: 1;
  opacity: 0; transition: opacity .3s; pointer-events: none; will-change: transform;
}
.mini-car.show { opacity: 1; }
.mini-car svg { width: 100%; height: auto; }
.mini-car.crash svg { animation: bump .5s ease-out; }
.mini-car.lost-wheel .front-wheel { visibility: hidden; }
.mini-car.lost-wheel svg { transform: rotate(5deg); transform-origin: 20% 100%; }
/* Crash pieces and the loose wheel (created by script.js) */
.debris, .loose-wheel { position: fixed; z-index: 60; pointer-events: none; }
.debris { width: 7px; height: 5px; border: 1px solid #000; }
.loose-wheel { width: 16px; height: 16px; }
#contact-btn { position: relative; z-index: 2; }
#contact-btn.hit { animation: shake .45s ease-out; }
@keyframes bump { 0% { transform: translateX(0) rotate(0); } 30% { transform: translateX(-10px) rotate(-6deg); } 100% { transform: translateX(-4px) rotate(0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(6px) rotate(3deg); } 40% { transform: translateX(-5px) rotate(-2deg); } 60% { transform: translateX(3px); } 80% { transform: translateX(-2px); } }
.brand img { height: 56px; width: auto; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--white); text-decoration: none; font-size: .95rem; padding: 10px 0; }
.nav-links a:hover { color: var(--gold); }

/* Hero */
.hero { background: var(--black); color: var(--white); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 40px; }
.eyebrow { color: var(--gold); font-weight: 500; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.hero-sub { color: #CFCFCF; max-width: 34em; }
.hero-quote {
  display: flex; gap: 8px; margin-top: 28px; max-width: 520px;
  background: #151515; border: 1px solid #333; border-radius: 12px; padding: 6px;
}
.hero-quote-field {
  flex: 1; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px;
  background: none; border: 0; color: #BDBDBD; text-align: left; cursor: pointer; border-radius: 8px;
}
.hero-quote-field:hover { color: var(--white); }
.hero-art svg { width: 100%; height: auto; }

.trust { background: #161616; border-top: 1px solid #262626; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; margin: 0 auto; padding-top: 32px; padding-bottom: 32px; }
.trust-grid li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; }
.trust-grid .icon { color: var(--gold); grid-row: span 2; margin-top: 2px; }
.trust-grid strong { font-weight: 600; }
.trust-grid span { color: #BDBDBD; font-size: .875rem; }

/* Sections */
.section { padding: 88px 0; }
.section h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); max-width: 22em; }
.lead { color: var(--gray); font-size: 1.0625rem; max-width: 40em; }
.section-dark { background: var(--black); color: var(--white); }
.section-dark p { color: #CFCFCF; }
.section-soft { background: var(--gray-light); }

/* Plan cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 28px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--gold); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.card .icon-lg { color: var(--gold-dark); }
.card p { color: var(--gray); }
.card-featured { border: 2px solid var(--gold); }
.tag { align-self: flex-start; font-size: .75rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--gold); color: var(--black); }
.tag-gray { background: var(--gray-light); color: var(--ink); }

/* Why us */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 40px; }
.why-item { border-top: 3px solid var(--gold); padding-top: 20px; }
.why-item .icon-lg { color: var(--gold); margin-bottom: 14px; }

/* Team slider: one member per page, swipe or use arrows */
/* Width follows screen height so photo + name fit on short (landscape) screens */
.team { position: relative; max-width: clamp(150px, calc((100svh - 190px) * .75), 420px); margin: 40px auto 0; }
.team-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  list-style: none; margin: 0; padding: 0; scrollbar-width: none; border-radius: var(--radius);
}
.team-track::-webkit-scrollbar { display: none; }
.team-card { flex: 0 0 100%; scroll-snap-align: center; text-align: center; }
.team-card img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius); border-bottom: 4px solid var(--gold); background: var(--gray-light);
}
.team-card h3 { margin: 18px 0 2px; font-size: 1.25rem; }
.team-card p { color: var(--gray); margin: 0; }
.team-nav {
  position: absolute; top: calc(50% - 60px); transform: translateY(-50%);
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: var(--black); color: var(--gold); cursor: pointer; transition: background-color .2s;
}
.team-nav:hover { background: #333; }
.team-nav:disabled { opacity: .35; cursor: default; }
.team-prev { left: -72px; }
.team-next { right: -72px; }
.team-dots { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.team-dots button { width: 32px; height: 32px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.team-dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #CFCFCF; transition: background-color .2s, width .2s; }
.team-dots .team-pause { width: 44px; height: 44px; margin-left: 8px; border-radius: 50%; color: var(--black); }
.team-dots .team-pause::before { display: none; }
.team-dots .team-pause:hover { background: var(--gray-light); }
.team-dots .team-pause .icon { width: 18px; height: 18px; }
.team-dots button[aria-current="true"]::before { background: var(--gold); width: 24px; border-radius: 6px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 14px; align-items: center; background: var(--white); border-radius: 12px; padding: 16px 18px; }
.contact-list .icon { color: var(--gold-dark); }
.contact-list span { display: block; font-size: .8125rem; color: var(--gray); }
.contact-list a { font-weight: 500; overflow-wrap: anywhere; }

/* Footer */
/* Bottom padding leaves room for the fixed Live chat button (52px tall + 16px gap) */
.site-footer { background: var(--black); color: #BDBDBD; padding: 32px 0 calc(100px + env(safe-area-inset-bottom)); font-size: .875rem; }
.site-footer strong { color: var(--white); }
.footer-inner p { margin-bottom: .5em; }
.footer-warning { border-left: 3px solid var(--gold); padding-left: 12px; margin-bottom: 16px !important; color: var(--white); }
.footer-warning strong { color: var(--gold); flex-shrink: 0; }
/* Label and message side by side, so wrapped lines start under "pay" */
.footer-warning { display: flex; gap: .3em; }
.site-footer a { overflow-wrap: anywhere; }

/* Live chat button (bottom-left, always visible) */
.live-chat {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 10px;
  background: var(--white); color: var(--black); border-radius: 999px; text-decoration: none;
  font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.18); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
.live-chat:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.22); }
.live-chat svg { width: 34px; height: 34px; }
.live-chat.hit { animation: chat-hit .5s ease-out; }
@keyframes chat-hit {
  0%, 100% { transform: scale(1) rotate(0); }
  30% { transform: scale(1.12) rotate(-6deg); }
  60% { transform: scale(.96) rotate(3deg); }
}

/* Quote pop-up */
.modal {
  width: min(920px, calc(100% - 24px)); max-height: calc(100dvh - 24px);
  border: 0; border-radius: 18px; padding: 0; color: var(--black);
}
.modal::backdrop { background: rgba(0,0,0,.7); }
.modal form { padding: 28px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-size: 1.5rem; }
.modal-sub { color: var(--gray); margin-top: 4px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: var(--gray-light); border: 0; border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: var(--line); }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 600; margin-bottom: 10px; }
.car-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 6px; }
.optional { color: var(--gray); font-weight: 400; }
.field select, .field input, .field textarea, #message {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1.5px solid #CFCFCF; border-radius: 10px; background: var(--white); color: var(--black);
}
.field select + input { margin-top: 8px; }
.field select:disabled { background: var(--gray-light); color: #8A8A8A; cursor: not-allowed; }
.field [aria-invalid="true"] { border-color: #C62828; }
.form-error { color: #C62828; font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; }
.sent { margin-top: 20px; padding: 16px; border-radius: 12px; background: #FFFBEF; border: 1px solid var(--gold); }
#message { resize: vertical; font-size: .875rem; }

/* Responsive */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .why-grid, .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .car-row { grid-template-columns: 1fr 1fr; }
}
/* Hero stacks on portrait tablets/phones; phones in landscape keep text + car side by side */
@media (max-width: 860px) and (orientation: portrait), (max-width: 560px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 40px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .hero-grid { padding-top: 28px; padding-bottom: 24px; }
  .section { padding: 56px 0; }
}
@media (max-width: 560px) {
  .brand img { height: 46px; }
  .hero-quote { flex-direction: column; }
  .cards, .why-grid, .trust-grid, .car-row, .contact-row { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .modal form { padding: 20px; }
  .modal-actions .btn { width: 100%; }
}
@media (max-width: 600px) {
  .team-prev { left: 8px; }
  .team-next { right: 8px; }
  .team-nav { background: rgba(0,0,0,.75); }
}
@media (prefers-reduced-motion: reduce) {
  html, .team-track { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .mini-car { display: none; }
}
