/* Your Life Insurance Help: shared styles for index.html and thank-you.html */

:root {
  --ink: #0b1f3a;
  --body: #2c405e;
  --soft: #3d5170;
  --blue: #1666e0;
  --blue-dark: #0f4fb8;
  --page: #f6f9ff;
  --band: #ffffff;
  --foot: #e9f1ff;
  --line: #cdd9ec;
  --field: #8aa3c7;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --display: 'Archivo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 21px/1.55 var(--sans);
  -webkit-tap-highlight-color: rgba(22, 102, 224, 0.15);
}

a { color: var(--blue-dark); }
a:hover { color: #0b3a8a; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: #fff; color: var(--ink); padding: 12px 16px; border-radius: 8px;
}
.skip:focus { left: 12px; top: 12px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

/* ---------- header ---------- */
.top {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px; padding-top: 22px; padding-bottom: 22px;
}
.logo { font: 700 26px/1.1 var(--serif); letter-spacing: -0.005em; color: var(--ink); }
.where { color: var(--soft); font-weight: 700; }

/* ---------- type ---------- */
.eyebrow { font: 700 18px/1.3 var(--sans); color: var(--blue-dark); margin: 0; }
.h1 { font: 700 clamp(36px, 5.2vw, 60px)/1.08 var(--serif); letter-spacing: -0.01em; margin: 14px 0 0; }
.h2 { font: 700 clamp(30px, 4vw, 42px)/1.15 var(--serif); margin: 12px 0 0; }
.sub { font-size: 23px; color: var(--body); margin: 20px 0 0; max-width: 600px; }
.note { color: var(--soft); font-size: 18px; line-height: 1.55; margin: 0; }

/* ---------- hero ---------- */
.heroband { background: var(--band); border-top: 1px solid #dde7f6; border-bottom: 1px solid #dde7f6; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  grid-template-areas: 'text form' 'ticks form';
  grid-template-rows: auto 1fr;
  column-gap: 56px;
  align-items: start;
  padding-top: 56px; padding-bottom: 72px;
}
.heroText { grid-area: text; min-width: 0; }
.heroTicks { grid-area: ticks; margin-top: 28px; min-width: 0; }
.heroForm { grid-area: form; min-width: 0; }

.tick { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; }
.tick svg { flex: 0 0 auto; margin-top: 3px; }

/* ---------- cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px;
  box-shadow: 0 10px 40px rgba(22, 102, 224, 0.12);
}
.card h3 { font: 700 26px/1.2 var(--serif); margin: 0 0 10px; }
.card p { margin: 0; color: var(--body); }
.row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 36px; }
.row > * { flex: 1 1 300px; min-width: 0; }
.num { font: 900 46px/1 var(--display); color: var(--blue); margin-bottom: 14px; }

/* ---------- the form ---------- */
.progress { height: 12px; border-radius: 6px; background: #e1eaf8; overflow: hidden; margin-bottom: 8px; }
.progress > div { height: 12px; background: var(--blue); border-radius: 6px; width: 0; transition: width 0.3s ease; }
#stepText { margin-bottom: 24px; }

.q { font: 700 clamp(26px, 3.6vw, 32px)/1.2 var(--serif); margin: 0 0 18px; display: block; }
.q:focus { outline: none; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.in {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 64px; padding: 0 18px;
  border-radius: 12px; border: 2px solid var(--field); background: #fff; color: var(--ink);
  font: 400 24px var(--sans);
}
.in:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22, 102, 224, 0.22); }

.btn {
  -webkit-appearance: none; appearance: none;
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 64px; padding: 0 24px; margin-top: 20px;
  border-radius: 14px; border: 0; background: var(--blue); color: #fff;
  font: 800 22px var(--display); text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 28px rgba(22, 102, 224, 0.4);
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn[disabled] { opacity: 0.7; cursor: wait; }

.opt {
  -webkit-appearance: none; appearance: none;
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 68px; padding: 0 20px;
  border-radius: 14px; border: 2px solid var(--field); background: #fff; color: var(--ink);
  font: 700 24px var(--sans); cursor: pointer;
}
.opt:hover { border-color: var(--blue); background: #eef5ff; }

.back {
  background: none; border: 0; color: var(--blue-dark); cursor: pointer;
  font: 700 19px var(--sans); padding: 12px 0 0; min-height: 48px;
}

.err { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: #fdecea; color: #8a1c14; font-weight: 700; }

.chk { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; font-size: 17px; line-height: 1.55; color: var(--body); }
.chk input { width: 28px; height: 28px; margin-top: 2px; accent-color: var(--blue); flex: 0 0 auto; }

/* trap field for bots: people never see it */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
details { border-top: 1px solid var(--line); padding: 20px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
  font: 700 24px/1.3 var(--serif);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--blue); font-size: 30px; line-height: 1; }
details[open] summary::after { content: '\2212'; }
details p { margin: 12px 0 0; color: var(--body); }

/* ---------- sections and footer ---------- */
.section { padding-top: 80px; }
.cta { text-align: center; padding: 56px 28px; border-color: var(--blue); }
.cta .btn { max-width: 420px; margin: 28px auto 0; }

.foot { background: var(--foot); border-top: 1px solid var(--line); margin-top: 88px; }
.fine { padding-top: 40px; padding-bottom: 56px; font-size: 17px; color: var(--body); line-height: 1.6; }
.fine p { margin: 0 0 12px; }
.fine summary { font-size: 20px; }
.fine details p { font-size: 17px; }
.fine .draft { font: 400 15px var(--sans); color: var(--soft); }
.fine .copy { margin-top: 22px; font-size: 15px; color: #526786; }

/* ---------- thank-you page ---------- */
.thanks { background: var(--band); border-top: 1px solid #dde7f6; border-bottom: 1px solid #dde7f6; padding-top: 64px; padding-bottom: 72px; }
.thanks .h1 { margin-top: 28px; }
.thanks .big { font-size: 26px; font-weight: 700; margin: 18px 0 0; }
.thanks .sub { font-size: 22px; margin-top: 12px; }
.pair { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 56px; }
.pair > * { flex: 1 1 320px; min-width: 0; }
.pair h2 { font: 700 28px/1.2 var(--serif); margin: 0 0 6px; }

.sealwrap { position: relative; width: 96px; height: 96px; }
.seal-ring { position: absolute; left: 0; top: 0; width: 96px; height: 96px; border: 3px solid var(--blue); border-radius: 50%; opacity: 0; animation: sealring 1s ease-out 1.15s; }
.seal-bg { opacity: 0; animation: sealbg 0.5s ease-out 0.1s forwards; }
.seal-c { stroke-dasharray: 272; stroke-dashoffset: 272; transform: rotate(-90deg); transform-origin: 48px 48px; animation: sealdraw 0.7s cubic-bezier(0.65, 0, 0.35, 1) 0.15s forwards; }
.seal-p { stroke-dasharray: 62; stroke-dashoffset: 62; animation: sealdraw 0.45s cubic-bezier(0.65, 0, 0.35, 1) 0.8s forwards; }
@keyframes sealbg { to { opacity: 1; } }
@keyframes sealdraw { to { stroke-dashoffset: 0; } }
@keyframes sealring { 0% { opacity: 0.45; transform: scale(1); } 100% { opacity: 0; transform: scale(1.4); } }

@media (prefers-reduced-motion: reduce) {
  .progress > div { transition: none; }
  .seal-bg { animation: none; opacity: 1; }
  .seal-c, .seal-p { animation: none; stroke-dashoffset: 0; }
  .seal-ring { display: none; }
}

/* ---------- phones ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'text' 'form' 'ticks';
    grid-template-rows: auto;
    row-gap: 28px;
  }
  .heroTicks { margin-top: 0; }
}

@media (max-width: 600px) {
  body { font-size: 20px; }
  .wrap { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .card { padding: 24px 20px; }
  .sub { font-size: 21px; }
  .logo { font-size: 23px; }
  .num { font-size: 40px; }
  summary { font-size: 22px; }
  .section { padding-top: 64px; }
}
