/* ============================================================
   styles.css — WRLife premium calculator
   Blue palette (Economy #5dade2 / Serenity #2471a3)
   ============================================================ */
:root {
  --navy: #1f4e79;
  --navy-2: #143552;
  --blue: #2471a3;
  --blue-light: #5dade2;
  --blue-ink: #15466e;
  --green: #27ae60;
  --green-dark: #1e8a4c;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f8fa;
  --card: #ffffff;
  --cream: #ebf5fb;
  --green-light: #eaf6ef;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.brand-name { font-weight: 800; font-size: 18px; color: var(--navy); letter-spacing: -0.3px; }
.brand-series { font-size: 12px; color: var(--muted); font-weight: 600; }
.lang { display: flex; align-items: center; gap: 6px; }
.lang-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.lang button { border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.lang button.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- hero ---------- */
.hero { background: linear-gradient(135deg, var(--navy-2) 0%, var(--navy) 55%, var(--blue) 100%); color: #fff; padding: 72px 24px 64px; text-align: center; }
.hero h1 { font-size: clamp(26px, 4.5vw, 40px); margin: 0 auto 14px; max-width: 760px; line-height: 1.15; letter-spacing: -0.5px; }
.hero .hero-sub { font-size: 17px; color: #d7e4ee; max-width: 640px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-ghost-dark { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost-dark:hover { background: var(--bg); }

/* ---------- sections ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: 56px 24px; }
.section-title { font-size: 26px; color: var(--navy); margin: 0 0 6px; letter-spacing: -0.4px; }
.section-sub { color: var(--muted); margin: 0 0 28px; max-width: 720px; }

/* ---------- calculator ---------- */
.calc-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 6px 24px rgba(22,50,79,.06); }
.calc-options { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.calc-options .field { flex: 1 1 200px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.field input, .field select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px; background: #fff; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,113,163,.12); }
.opt-row { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.opt-row label { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
.opt-row input[type="radio"] { width: auto; }
.calc-actions { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.calc-error { color: #c0392b; font-size: 14px; font-weight: 600; margin: 12px 0 0; min-height: 18px; }

.calc-result { margin-top: 26px; }
.calc-result h3 { color: var(--navy); font-size: 18px; margin: 0 0 16px; }
.plan-result { margin-bottom: 22px; }
.plan-title { font-size: 15px; font-weight: 800; margin: 0 0 8px; letter-spacing: .3px; }
.plan-title span { font-weight: 600; font-size: 13px; color: var(--muted); }
.plan-economy { color: var(--blue-light); }
.plan-serenity { color: var(--blue); }
.table-scroll { overflow-x: auto; }
.calc-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.calc-table th, .calc-table td { padding: 11px 12px; text-align: right; }
.calc-table th:first-child, .calc-table td:first-child { text-align: left; }
.calc-table thead th { background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; }
.calc-table tbody tr:nth-child(odd) { background: #fff; }
.calc-table tbody tr:nth-child(even) { background: #f4f8fb; }
.calc-table td { border-top: 1px solid var(--line); font-size: 14px; }
.calc-table td:first-child { font-weight: 700; color: var(--navy); }
.calc-note { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 10px; }
.live-quote { margin-top: 22px; padding: 16px 18px; border: 1px dashed var(--line); border-radius: 10px; background: #fbfcfe; }
.live-quote-note { font-size: 13px; color: var(--ink); margin: 0 0 12px; }
.live-quote-links { display: flex; gap: 10px; flex-wrap: wrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* focus-visible */
.btn:focus-visible, .lang button:focus-visible, .brochure-links a:focus-visible, .tc-accordion summary:focus-visible {
  outline: 3px solid var(--blue-light); outline-offset: 2px; border-radius: 4px;
}

/* ---------- plans ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 0 20px; overflow: hidden; box-shadow: 0 3px 12px rgba(22,50,79,.05); }
.plan-card.recommended { border: 2px solid var(--blue); }
.plan-head { color: #fff; font-weight: 800; font-size: 17px; padding: 14px 18px; letter-spacing: .5px; }
.plan-head.economy { background: var(--blue-light); }
.plan-head.serenity { background: var(--blue); }
.plan-tagline { font-weight: 700; color: var(--navy); padding: 14px 18px 4px; font-size: 15px; }
.plan-desc { padding: 4px 18px 12px; color: var(--muted); font-size: 13.5px; margin: 0; }
.plan-limits { padding: 0 18px; }
.plan-limits-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.plan-limits ul { list-style: none; margin: 6px 0 0; padding: 0; }
.plan-limits li { font-weight: 700; color: var(--ink); padding: 4px 0; font-size: 15px; }

/* ---------- benefits table ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(22,50,79,.05); }
.ben-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.ben-table th, .ben-table td { padding: 10px 14px; text-align: center; border-top: 1px solid var(--line); font-size: 13.5px; }
.ben-table thead th { background: var(--navy); color: #fff; border-top: none; }
.ben-table thead th.economy { background: var(--blue-light); }
.ben-table thead th.serenity { background: var(--blue); }
.ben-table tbody td:first-child { text-align: left; color: var(--ink); font-weight: 600; }
.ben-table tbody td:nth-child(2) { color: var(--blue-ink); }
.ben-table tbody td:nth-child(3) { color: var(--green-dark); font-weight: 600; }

/* ---------- advantages ---------- */
.adv-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.adv-grid li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; padding: 15px 17px; font-size: 14px; box-shadow: 0 3px 12px rgba(22,50,79,.04); }

/* ---------- info / waiting ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .info-grid { grid-template-columns: 1fr; } }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.info-card h3 { color: var(--navy); font-size: 16px; margin: 0 0 10px; }
.info-card p { margin: 0 0 8px; font-size: 14px; }
.note-block { font-size: 13px; color: var(--muted); font-style: italic; margin-top: 16px; }

/* ---------- terms ---------- */
.tc-accordion { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 6px 24px rgba(22,50,79,.05); }
.tc-accordion summary { cursor: pointer; padding: 20px 24px; font-size: 17px; font-weight: 800; color: var(--navy); list-style: none; display: flex; align-items: center; justify-content: space-between; user-select: none; }
.tc-accordion summary::-webkit-details-marker { display: none; }
.tc-accordion summary::after { content: "+"; font-size: 22px; font-weight: 700; color: var(--blue); transition: transform .18s; }
.tc-accordion[open] summary::after { transform: rotate(45deg); }
.tc-accordion summary:hover { background: var(--bg); }
.tc-body { padding: 4px 24px 26px; border-top: 1px solid var(--line); }
.tc-body h4 { color: var(--navy); font-size: 14px; margin: 18px 0 6px; }
.tc-body p { margin: 0; color: #334155; font-size: 14px; }
.tc-note { font-size: 12.5px; color: var(--muted); margin-top: 16px; font-style: italic; }
.tc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.tc-hint { margin-top: 12px; font-size: 13px; color: var(--muted); }
.brochure-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.brochure-links a { font-size: 13px; color: var(--blue-ink); font-weight: 600; text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.brochure-links a:hover { background: var(--cream); text-decoration: underline; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 34px 24px 44px; text-align: center; }
.footer p { max-width: 780px; margin: 0 auto; color: var(--muted); font-size: 12.5px; }
.footer .footer-rights { margin-top: 12px; font-size: 12px; }

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .calc-options { flex-direction: column; }
  .tc-actions, .brochure-links { flex-direction: column; }
  .tc-actions .btn { text-align: center; }
}
