/* ==========================================================================
   Allied Insurance, quote.html page styles (Pass 1)
   Page-scoped only. Reuses the LOCKED design system in styles.css (tokens,
   .btn, .headline/.beat, .container, nav, footer). No token invented here:
   colors are var(--...) from styles.css; radii held to {4px, 6px, 9999px}.
   ========================================================================== */

/* ---- page hero (variant of the home hero: a band, not full viewport) ---- */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 60vh;
  background: var(--brand-dark);
  overflow: hidden;
}
.page-hero-media {
  position: absolute;
  inset: 0;
  background: var(--brand-dark) url("../img/webp/quote-hero.webp") center/cover no-repeat;
  opacity: 0;
  transition: opacity .8s ease;
}
.page-hero.is-ready .page-hero-media { opacity: 1; }
/* warm green-gold grade + legibility scrim (matches the home hero world) */
.page-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(103deg, rgba(31, 33, 18, 0.92) 0%, rgba(31, 33, 18, 0.6) 48%, rgba(31, 33, 18, 0.3) 100%),
    linear-gradient(180deg, rgba(31, 33, 18, 0.2) 0%, rgba(31, 33, 18, 0.15) 55%, rgba(73, 111, 54, 0.55) 100%),
    radial-gradient(120% 90% at 86% 14%, rgba(217, 138, 43, 0.18) 0%, rgba(217, 138, 43, 0) 55%);
}
.page-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 150px;
  padding-bottom: 84px;
}
.page-hero h1 {
  font-size: var(--h1-desktop);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.page-hero h1 .beat-gold { color: var(--accent-soft); }
.page-hero h1 .beat-cream { color: var(--on-dark); }
.page-hero-sub {
  color: var(--on-dark-70);
  font-size: 18px;
  line-height: 1.6;
  max-width: 52ch;
  margin-top: 24px;
}

/* ==========================================================================
   QUOTE FORM SECTION  (white surface, 2-col: form + aside)
   ========================================================================== */
.quote-section {
  background: var(--surface);
  padding-block: var(--section-pad);
}
.quote-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: start;
  gap: clamp(36px, 5vw, 80px);
}
.quote-lead {
  color: var(--ink-70);
  font-size: 17px;
  line-height: 1.6;
  max-width: 54ch;
  margin-top: 16px;
}

/* ---- form ---------------------------------------------------------------- */
.quote-form { margin-top: 34px; }
.field { margin-bottom: 20px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.005em;
}
.field label .opt { color: var(--ink-70); font-weight: 400; }
.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 13px 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
  scroll-margin-top: 100px; /* focus-into-view clears the fixed header */
  -webkit-appearance: none;
  appearance: none;
}
.quote-form textarea { resize: vertical; min-height: 118px; }
.quote-form input::placeholder,
.quote-form textarea::placeholder { color: #9a9b8c; }
.quote-form select {
  cursor: pointer;
  /* owned caret (no external asset), amber-gold to match the accent channel */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%23af5f05' stroke-width='2' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}
.quote-form select:required:invalid { color: #9a9b8c; }
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(175, 95, 5, 0.14);
}
/* error state */
.quote-form [aria-invalid="true"] {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}
.field-msg.is-error {
  color: #b3261e;
  font-size: 13.5px;
  line-height: 1.4;
  margin-top: 7px;
}

.form-status {
  margin: 4px 0 18px;
  padding: 12px 15px;
  border-radius: var(--r-input);
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid rgba(179, 38, 30, 0.25);
  color: #8c1d18;
  font-size: 14.5px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.form-actions .wa-glyph { flex: none; }
.form-note {
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-70);
  max-width: 52ch;
}

/* ---- confirmation state -------------------------------------------------- */
.quote-confirm {
  margin-top: 8px;
  padding: 34px 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--canvas);
  scroll-margin-top: 100px; /* clear the fixed header when focus-scrolled into view */
}
.quote-confirm:focus { outline: none; }
.quote-confirm:focus-visible { box-shadow: 0 0 0 3px rgba(175, 95, 5, 0.16); }
.confirm-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-pill);
  background: var(--brand-green);
  color: var(--on-dark);
  margin-bottom: 18px;
}
.quote-confirm h3 {
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
}
.quote-confirm > p {
  margin-top: 10px;
  color: var(--ink-70);
  font-size: 16.5px;
  line-height: 1.55;
  max-width: 48ch;
}
.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}
.confirm-note {
  margin-top: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-70);
  max-width: 46ch;
}
.quote-confirm .btn-line { margin-top: 22px; }

/* ---- aside (info + store link) ------------------------------------------- */
.quote-aside { display: grid; gap: 22px; }
.aside-card {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px 26px;
  background: var(--surface);
}
.aside-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}
.aside-store { background: var(--canvas); }
.aside-store p {
  color: var(--ink-70);
  font-size: 15.5px;
  line-height: 1.55;
  margin-bottom: 18px;
}

/* ---- outline button (page-scoped; light-band secondary) ------------------ */
.btn-line {
  background: transparent;
  color: var(--accent-deep);
  border-color: var(--accent);
}
.btn-line:hover { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.btn-line .ext-arrow { font-size: 15px; line-height: 1; }

/* ==========================================================================
   REASSURANCE BAND  (cream, 3-up trust + contact)
   ========================================================================== */
.reassurance {
  background: var(--canvas);
  padding-block: 84px;
  border-top: 1px solid var(--line);
}
.reassure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.reassure-item h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--brand-green);
  margin-bottom: 12px;
}
.reassure-item p {
  color: var(--ink-70);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 8px;
}
.reassure-contact a {
  color: var(--accent-deep);
  font-weight: 500;
  transition: color .2s ease;
}
.reassure-contact a:hover { color: var(--accent); }

/* ==========================================================================
   PASS-2 FACELIFT, quote-page catalog components (page-scoped)
   Layers catalog motion onto the faithful Pass-1 composition. Every path
   honors reduced-motion; nothing restructures the working lead form.
   ========================================================================== */

/* ---- form headline row + 204 shield lottie accent ----------------------- */
.quote-form-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}

/* ---- 097 Text Glow: soft warm halo beneath the "Request." headline ------- */
.al-textglow { position: relative; z-index: 0; }
.al-textglow::before {
  content: "";
  position: absolute; z-index: -1;
  left: -4%; top: -34%;
  width: 58%; height: 150%;
  background: radial-gradient(closest-side, rgba(217, 138, 43, .30), rgba(217, 138, 43, 0) 74%);
  filter: blur(16px);
  pointer-events: none;
  animation: alTextGlow 4.5s ease-in-out infinite;
}
@keyframes alTextGlow { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

/* ---- 048 GlassyButton: frosted store CTA, pointer-tracked sheen + lift ---- */
.al-glassy {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, .68), rgba(255, 255, 255, .36));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(175, 95, 5, .30);
  color: var(--accent-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 6px 18px rgba(31, 33, 18, .07);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.al-glassy::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(130px 130px at var(--mx, 50%) var(--my, 50%), rgba(217, 138, 43, .34), transparent 62%);
  opacity: 0; transition: opacity .25s ease;
}
.al-glassy:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 10px 26px rgba(31, 33, 18, .11);
}
.al-glassy:hover::after { opacity: 1; }
.al-glassy .ext-arrow { font-size: 15px; line-height: 1; }
@media (prefers-reduced-motion: reduce) {
  .al-textglow::before { animation: none !important; opacity: .8; }
  .al-glassy, .al-glassy::after { transition: none !important; }
  .al-glassy:hover { transform: none; }
}
.qhead-lottie { flex: none; width: 66px; height: 66px; opacity: .92; margin-top: 2px; }

/* ---- 062 Border Beam form card (cursor-tracked accent ring) -------------- */
.quote-form-card {
  position: relative;
  margin-top: 28px;
  padding: 30px 30px 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}
.quote-form-card .quote-form { margin-top: 0; }
/* the confirm sits flush inside the card frame, no double border/padding */
.quote-form-card .quote-confirm {
  margin-top: 0; padding: 4px 0 0; border: 0; background: transparent;
}
.quote-form-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: radial-gradient(190px 190px at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s ease;
}
.quote-form-card:hover::after,
.quote-form-card:focus-within::after { opacity: 1; }

/* ---- 026 Progress Cards ("what happens next" stepper; click to advance) -- */
.qsteps { position: relative; display: grid; gap: 6px; margin-top: 2px; }
.qsteps__rail {
  position: absolute; left: 24px; top: 26px; bottom: 26px; width: 2px;
  background: var(--line); border-radius: 2px; overflow: hidden;
}
.qsteps__fill {
  display: block; width: 100%; height: 0%;
  background: var(--brand-green); border-radius: 2px; transition: height .45s ease;
}
.qstep {
  position: relative; display: flex; gap: 14px; align-items: flex-start; text-align: left;
  width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--r-card);
  background: transparent; cursor: pointer; font: inherit; color: inherit;
  transition: background-color .2s ease, border-color .2s ease;
}
.qstep:hover { background: var(--canvas); }
.qstep:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(175, 95, 5, .16); }
.qstep__num {
  flex: none; width: 30px; height: 30px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink-70);
  font-size: 14px; font-weight: 600; position: relative; z-index: 1;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.qstep__title { display: block; font-size: 15.5px; font-weight: 600; color: var(--ink); transition: color .2s ease; }
.qstep__desc { display: block; margin-top: 3px; font-size: 14px; line-height: 1.5; color: var(--ink-70); }
.qstep.is-active { border-color: var(--line); background: var(--canvas); }
.qstep.is-active .qstep__title { color: var(--brand-green); }
.qstep.is-active .qstep__num,
.qstep.is-done .qstep__num { background: var(--brand-green); border-color: var(--brand-green); color: var(--on-dark); }
.qstep.is-active .qstep__num { transform: scale(1.06); }

/* ---- 075 Feature Switcher (cover-line picker, syncs the form select) ----- */
.cover-switch__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cover-chip {
  padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-70); font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.cover-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.cover-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(175, 95, 5, .16); }
.cover-chip[aria-pressed="true"] { background: var(--brand-green); border-color: var(--brand-green); color: var(--on-dark); }
.cover-switch__desc {
  margin-top: 16px; min-height: 3.4em; color: var(--ink-70);
  font-size: 15px; line-height: 1.55; transition: opacity .25s ease;
}
.cover-switch__desc.is-swap { opacity: 0; }

/* ---- 190 Glow Counter Cards (years underwriting, since 2006) ------------- */
.glow-counter {
  position: relative; overflow: hidden;
  display: inline-flex; flex-direction: column; gap: 4px; margin-bottom: 18px;
  padding: 15px 20px; border-radius: var(--r-card);
  border: 1px solid var(--line); background: var(--surface);
}
.glow-counter::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 130% at 8% 0%, rgba(217, 138, 43, .16), transparent 62%);
}
.glow-counter__num {
  position: relative; font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -.02em;
  color: var(--brand-green); text-shadow: 0 0 16px rgba(217, 138, 43, .32);
  animation: gcGlow 3.4s ease-in-out infinite;
}
.glow-counter__suf { font-size: 22px; color: var(--accent); margin-left: 3px; }
.glow-counter__label { position: relative; font-size: 13.5px; color: var(--ink-70); }
@keyframes gcGlow {
  0%, 100% { text-shadow: 0 0 14px rgba(217, 138, 43, .26); }
  50%      { text-shadow: 0 0 26px rgba(217, 138, 43, .5); }
}

/* ---- reduced motion: settle every added component to a calm static state - */
@media (prefers-reduced-motion: reduce) {
  .qsteps__fill { transition: none !important; }
  .cover-switch__desc { transition: none !important; }
  .glow-counter__num { animation: none !important; text-shadow: 0 0 14px rgba(217, 138, 43, .26) !important; }
  .quote-form-card::after { transition: none !important; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .page-hero { min-height: 52vh; }
  .page-hero-inner { padding-top: 128px; padding-bottom: 60px; }
  .quote-grid { grid-template-columns: 1fr; gap: 44px; }
  .reassure-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 560px) {
  .page-hero h1 { font-size: var(--h1-mobile); }
  .page-hero-inner { padding-top: 116px; padding-bottom: 48px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row .field { margin-bottom: 20px; }
  .form-actions .btn,
  .confirm-actions .btn { width: 100%; justify-content: center; }
  .quote-confirm { padding: 26px 20px; }
  .aside-card { padding: 24px 20px; }

  /* Pass-2 components on small screens */
  .qhead-lottie { width: 52px; height: 52px; }
  .quote-form-card { padding: 22px 18px 24px; }
  .glow-counter__num { font-size: 38px; }
  .glow-counter__suf { font-size: 19px; }
  .qstep__title { font-size: 15px; }
}
