/* Advance Insurance Inc. — agency site
   Palette from the logo: navy #233978, gold/taupe #9C8C77 */
:root {
  --navy: #233978;
  --navy-dark: #172552;
  --navy-deeper: #101A3A;
  --navy-soft: #2C4A96;
  --gold: #C4A574;
  --gold-muted: #9C8C77;
  --gold-soft: #E7D7B8;
  --cream: #F6F3ED;
  --white: #FFFFFF;
  --off-white: #F8F9FC;
  --ink: #1B2233;
  --muted: #5A6476;
  --line: #E2E5EE;
  --line-strong: #C9CEDA;
  --danger: #9B2C2C;
  --success: #1F6B45;
  --shadow: 0 10px 30px rgba(23, 37, 82, 0.08);
  --shadow-sm: 0 4px 14px rgba(23, 37, 82, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 76px;
  --wrap: 1140px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--navy-soft); }
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 200;
  background: var(--gold);
  color: var(--navy-deeper);
  padding: 8px 14px;
  font-weight: 600;
  border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: min(calc(100% - 40px), var(--wrap));
  margin-inline: auto;
}
.wrap-narrow { width: min(calc(100% - 40px), 760px); margin-inline: auto; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy-dark);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.05rem, 4vw, 3.35rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  color: var(--gold-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lede { font-size: 1.125rem; color: var(--muted); max-width: 40rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(196, 165, 116, 0.35);
}
.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0 55%, var(--gold) 55%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy-dark);
  flex-shrink: 0;
}
.brand:hover { color: var(--navy); }
.brand-mark { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; }
.brand-inc { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-muted); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy-dark);
  margin: 0;
  border-radius: 1px;
}
.site-nav { display: flex; align-items: center; gap: 6px 22px; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
}
.site-nav a:hover { color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--navy); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.header-cta { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }
.header-phone {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy-dark);
  white-space: nowrap;
}
.header-phone:hover { color: var(--navy); }
.nav-phone-mobile { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: var(--gold);
  color: var(--navy-deeper);
  box-shadow: 0 6px 16px rgba(196, 165, 116, 0.35);
}
.btn-gold:hover { background: #d4b687; color: var(--navy-deeper); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-soft); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.45);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-ghost-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-ghost-dark:hover { background: var(--navy); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero */
.hero {
  position: relative;
  background: radial-gradient(1200px 500px at 80% -10%, #2d4a9a 0%, transparent 55%),
              linear-gradient(165deg, var(--navy-deeper) 0%, var(--navy-dark) 45%, var(--navy) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 72px 0 80px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='70' viewBox='0 0 80 70'><path d='M40 4 L74 62 H6 Z' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/></svg>");
  background-size: 80px 70px;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: var(--white); margin-bottom: 16px; }
.hero .lede { color: rgba(255,255,255,0.82); }
.hero .eyebrow { color: var(--gold); }
.hero-panel {
  justify-self: end;
  width: min(100%, 340px);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 28px 28px 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}
.hero-panel .mark { width: 120px; margin: 0 auto 16px; }
.hero-panel ul { list-style: none; margin: 0; padding: 0; }
.hero-panel li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}
.hero-panel li:first-child { border-top: 0; }
.hero-panel li svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 3px; }

/* Trust bar */
.trust-bar {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--navy-dark);
  font-weight: 600;
  font-size: 0.92rem;
}
.trust-list li { display: flex; align-items: center; gap: 8px; }
.trust-list li svg { width: 18px; height: 18px; flex: 0 0 18px; }

/* Sections */
.section { padding: 80px 0; }
.section-cream { background: var(--cream); }
.section-navy { background: var(--navy-dark); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy .lede { color: rgba(255,255,255,0.8); }
.section-head { margin-bottom: 36px; max-width: 40rem; }

/* Cards / grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #d6c7a6;
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--navy);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card a.card-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.card a.card-link:hover { text-decoration: underline; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--line);
  position: relative;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-weight: 700;
  color: var(--gold-muted);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.cta-band {
  background: linear-gradient(135deg, var(--navy-deeper), var(--navy));
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.8); max-width: 36rem; margin-inline: auto; }

/* Contact facts */
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.fact {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.fact .label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: 6px;
}
.fact a { text-decoration: none; font-weight: 600; color: var(--navy-dark); }
.fact a:hover { text-decoration: underline; }

/* Forms */
.form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 26px 26px;
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .full { grid-column: 1 / -1; }
label, .label-text {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 6px;
}
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 12px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20'><path fill='%23233778' d='M5 7l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(196, 165, 116, 0.45);
  border-color: var(--gold-muted);
}
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--navy); flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }
.form-status[hidden] { display: none !important; }
.form-success {
  text-align: center;
  padding: 36px 16px;
}
.form-success h2 { color: var(--navy-dark); }
.form-error { color: var(--danger); font-size: 0.92rem; margin-top: 10px; }

/* Footer */
.site-footer {
  background: var(--navy-deeper);
  color: rgba(255,255,255,0.82);
  padding: 56px 0 24px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--gold-soft); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; text-decoration: none; }
.footer-brand .brand-name, .footer-brand .brand-inc { color: var(--white); }
.footer-brand .brand-inc { color: var(--gold); }
.site-footer h2 {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0 0 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* Page hero (inner pages) */
.page-hero {
  background: var(--cream);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-bottom: 10px; }

/* 404 */
.not-found { padding: 80px 0 100px; text-align: center; }
.not-found h1 { font-size: clamp(2rem, 5vw, 3.5rem); }

/* Privacy */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2em; }
.prose ul { color: var(--ink); }

@media (max-width: 900px) {
  .hero-grid, .split, .footer-grid { grid-template-columns: 1fr; }
  .card-grid, .card-grid-4, .steps, .facts { grid-template-columns: 1fr 1fr; }
  .hero-panel { justify-self: stretch; width: 100%; }
  .header-phone { display: none; }
  .nav-phone-mobile { display: block; font-weight: 600; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-phone { display: none; }
  .nav-phone-mobile { display: block; font-weight: 600; }
  .header-cta .btn { padding: 10px 14px; font-size: 0.88rem; }
  .header-cta .wide-only { display: none; }
  .wrap { width: min(calc(100% - 24px), var(--wrap)); }
  .brand-mark { width: 40px; }
  .header-inner { gap: 10px; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 0;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"]::after { display: none; }
  .card-grid, .steps, .facts, .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 56px; }
  .section { padding: 56px 0; }
  .form { padding: 20px 16px; }
  .brand-name { font-size: 0.92rem; }
}
