/* ============================================
   EverSafe Insurance — Site Styles
   Palette: Deep Navy (primary), Emerald, Gold
   ============================================ */

:root {
  --navy-900: #081A2E;
  --navy-800: #0B2239;
  --navy-700: #10304F;
  --navy-600: #17406A;
  --navy-100: #E7EDF4;

  --emerald-700: #0E5C48;
  --emerald-600: #12715A;
  --emerald-500: #1B8A6B;
  --emerald-100: #E4F2ED;

  --gold-600: #B8912A;
  --gold-500: #C9A227;
  --gold-400: #D9B54A;
  --gold-100: #F7F0DC;

  --ivory: #FAF7F1;
  --white: #FFFFFF;
  --ink: #22303E;
  --ink-soft: #55636F;
  --line: #E3DFD5;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;

  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(8, 26, 46, 0.08);
  --shadow-md: 0 8px 28px rgba(8, 26, 46, 0.14);
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-800);
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.35rem; }

a { color: var(--emerald-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 14px;
}

.section { padding: 88px 0; }
.section-intro { max-width: 640px; margin-bottom: 48px; }
.section-intro p { color: var(--ink-soft); margin-top: 14px; font-size: 1.06rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-gold {
  background: var(--gold-500);
  color: var(--navy-900);
}
.btn-gold:hover { background: var(--gold-400); box-shadow: var(--shadow-md); }

.btn-navy {
  background: var(--navy-800);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-700); box-shadow: var(--shadow-md); }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-outline-light:hover { border-color: var(--gold-400); color: var(--gold-400); }

.btn-emerald {
  background: var(--emerald-600);
  color: var(--white);
}
.btn-emerald:hover { background: var(--emerald-500); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--navy-800);
}
.btn-ghost:hover { background: var(--navy-100); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-800);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 38px; height: 42px; flex-shrink: 0; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
}
.brand-name .accent { color: var(--gold-400); }

.brand-tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: -2px;
}

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.97rem;
}
.main-nav a:hover { color: var(--gold-400); text-decoration: none; }
.main-nav .btn { padding: 11px 24px; font-size: 0.95rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.7rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(27, 138, 107, 0.25), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(201, 162, 39, 0.15), transparent 55%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: var(--white);
  padding: 110px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero h1 { color: var(--white); max-width: 700px; }
.hero h1 .accent { color: var(--gold-400); font-style: italic; }

.hero p {
  max-width: 560px;
  margin: 22px 0 36px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-trust {
  margin-top: 56px;
  display: flex;
  gap: 42px;
  flex-wrap: wrap;
}
.hero-trust .trust-item { max-width: 220px; }
.hero-trust .trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-400);
}
.hero-trust .trust-item span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Coverage cards ---------- */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.coverage-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold-500);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.coverage-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.coverage-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--emerald-100);
  color: var(--emerald-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.coverage-card .icon svg { width: 28px; height: 28px; }

.coverage-card h3 { margin-bottom: 10px; }
.coverage-card p { color: var(--ink-soft); font-size: 0.98rem; flex-grow: 1; }

.coverage-card .card-link {
  margin-top: 20px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--emerald-600);
}
.coverage-card .card-link:hover { color: var(--emerald-500); }

/* ---------- About ---------- */
.about { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
}

.about-photo {
  background: linear-gradient(160deg, var(--navy-800), var(--emerald-700));
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.about-photo .photo-placeholder {
  text-align: center;
  padding: 30px;
}
.about-photo .photo-placeholder svg {
  width: 84px;
  height: 84px;
  opacity: 0.85;
  margin: 0 auto 16px;
}
.about-photo .photo-placeholder span {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.about-text p { color: var(--ink-soft); margin-bottom: 18px; }

.credentials {
  margin-top: 28px;
  border-left: 3px solid var(--gold-500);
  background: var(--gold-100);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
}
.credentials li {
  list-style: none;
  padding: 4px 0;
  font-size: 0.98rem;
}
.credentials li strong { color: var(--navy-800); }

/* ---------- Why EverSafe ---------- */
.why { background: var(--navy-800); color: var(--white); }
.why h2, .why h3 { color: var(--white); }
.why .section-intro p { color: rgba(255, 255, 255, 0.75); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}
.why-item h3 { font-size: 1.25rem; margin-bottom: 8px; }
.why-item p { color: rgba(255, 255, 255, 0.72); font-size: 0.97rem; }
.why-item .num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-400);
  display: block;
  margin-bottom: 10px;
}

/* ---------- Quote CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--emerald-700), var(--emerald-600));
  color: var(--white);
  text-align: center;
  padding: 72px 24px;
}
.cta-band h2 { color: var(--white); margin-bottom: 12px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 520px; margin: 0 auto 30px; }

/* ---------- Contact ---------- */
.contact { background: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  background: var(--ivory);
}
.contact-card .icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card .icon svg { width: 22px; height: 22px; }
.contact-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.contact-card p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 0 32px;
  font-size: 0.93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 14px;
  font-family: var(--font-body);
}
.site-footer a { color: rgba(255, 255, 255, 0.7); display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--gold-400); text-decoration: none; }
.footer-brand .brand-name { font-size: 1.4rem; }
.footer-brand p { margin-top: 12px; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Quote page
   ============================================ */

.quote-hero {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800));
  color: var(--white);
  padding: 64px 0 56px;
  text-align: center;
}
.quote-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); }
.quote-hero p { color: rgba(255, 255, 255, 0.8); max-width: 560px; margin: 14px auto 0; }

/* Progress steps */
.progress-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 40px auto 48px;
  max-width: 640px;
}
.progress-step {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.progress-step::before {
  content: attr(data-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line);
  margin: 0 auto 8px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  position: relative;
  z-index: 2;
}
.progress-step::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: 1;
}
.progress-step:last-child::after { display: none; }
.progress-step.active { color: var(--navy-800); }
.progress-step.active::before {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}
.progress-step.done { color: var(--emerald-600); }
.progress-step.done::before {
  content: "✓";
  background: var(--emerald-600);
  border-color: var(--emerald-600);
  color: var(--white);
}
.progress-step.done::after { background: var(--emerald-600); }

/* Type selection */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}
.type-card {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: all 0.18s ease;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.type-card:hover {
  border-color: var(--emerald-500);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.type-card .icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--navy-800);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
}
.type-card .icon svg { width: 26px; height: 26px; }
.type-card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.type-card p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; }

/* Quote form */
.quote-form-wrap {
  max-width: 780px;
  margin: 0 auto 80px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 44px 48px;
}

.form-type-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.form-type-header .icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--navy-800);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.form-type-header .icon svg { width: 28px; height: 28px; }
.form-type-header h2 { font-size: 1.7rem; }
.form-type-header .change-type {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

fieldset {
  border: none;
  margin-bottom: 36px;
}
fieldset legend {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy-800);
  padding-bottom: 6px;
  margin-bottom: 4px;
  width: 100%;
  border-bottom: 2px solid var(--gold-100);
}
fieldset .legend-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-row.thirds { grid-template-columns: 1fr 1fr 1fr; }
.form-field { margin-bottom: 18px; }
.form-field.full { grid-column: 1 / -1; }

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--navy-800);
}
.form-field label .req { color: #B4443C; }
.form-field .hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field input[type="number"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(27, 138, 107, 0.12);
}
.form-field textarea { resize: vertical; min-height: 90px; }

.form-field input.invalid,
.form-field select.invalid {
  border-color: #B4443C;
  background: #FDF6F5;
}

/* Radio & checkbox pills */
.pill-group { display: flex; gap: 10px; flex-wrap: wrap; }
.pill-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  background: var(--white);
  transition: all 0.15s ease;
  margin-bottom: 0;
}
.pill-group input { accent-color: var(--emerald-600); }
.pill-group label:has(input:checked) {
  border-color: var(--emerald-600);
  background: var(--emerald-100);
  color: var(--emerald-700);
}

/* File upload */
.file-drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  padding: 26px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.file-drop:hover, .file-drop.dragover {
  border-color: var(--gold-500);
  background: var(--gold-100);
}
.file-drop svg { width: 30px; height: 30px; color: var(--gold-600); margin: 0 auto 8px; }
.file-drop .file-label { font-weight: 600; color: var(--navy-800); font-size: 0.97rem; }
.file-drop .file-note { font-size: 0.83rem; color: var(--ink-soft); margin-top: 4px; }
.file-drop input[type="file"] { display: none; }
.file-list { margin-top: 10px; }
.file-list .file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  background: var(--emerald-100);
  color: var(--emerald-700);
  border-radius: 8px;
  padding: 7px 12px;
  margin-top: 6px;
}
.file-list .file-item button {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--emerald-700);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}

/* Conditional reveal */
.reveal-block {
  display: none;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px 6px;
  margin: 6px 0 18px;
}
.reveal-block.open { display: block; }

/* Repeatable groups (drivers / vehicles) */
.repeat-group { margin-bottom: 10px; }
.repeat-item {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 8px;
  margin-bottom: 14px;
  position: relative;
}
.repeat-item .repeat-title {
  font-weight: 700;
  color: var(--navy-800);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.repeat-item .remove-item {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #B4443C;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.add-item-btn {
  background: none;
  border: 1.5px dashed var(--emerald-600);
  color: var(--emerald-600);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s ease;
}
.add-item-btn:hover { background: var(--emerald-100); }

/* Form footer */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.form-actions .privacy-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  max-width: 380px;
}
.form-error-summary {
  display: none;
  background: #FDF6F5;
  border: 1px solid #E5B9B5;
  color: #8E332C;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.form-error-summary.show { display: block; }

/* Success screen */
.success-panel {
  max-width: 640px;
  margin: 0 auto 90px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 60px 48px;
}
.success-panel .check-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--emerald-100);
  color: var(--emerald-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.success-panel .check-ring svg { width: 38px; height: 38px; }
.success-panel h2 { margin-bottom: 14px; }
.success-panel p { color: var(--ink-soft); margin-bottom: 10px; }
.success-panel .btn { margin-top: 24px; }

/* Utility */
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photo { max-width: 380px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .quote-form-wrap { padding: 32px 24px; }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--navy-800);
    flex-direction: column;
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .form-row, .form-row.thirds { grid-template-columns: 1fr; gap: 0; }
  .section { padding: 64px 0; }
  .hero { padding: 80px 0 90px; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; text-align: center; }
}
