/* ============================================================
   styles.css — Pacific Cross premium calculator
   Pacific Cross orange + green + navy palette
   ============================================================ */
:root {
  --navy: #16324f;
  --navy-2: #0f2438;
  --orange: #f39c12;
  --orange-dark: #d9880b;
  --orange-ink: #a05c00;
  --green: #27ae60;
  --green-dark: #1e8a4c;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f8fa;
  --card: #ffffff;
  --cream: #fef9e7;
  --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) 60%, #24517d 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(--orange); color: #1a1a1a; }
.btn-primary:hover { background: var(--orange-dark); }
.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); }
.btn-small { padding: 7px 12px; font-size: 13px; border-radius: 6px; }

/* ---------- 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); }
.person-block { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; background: #fbfcfe; }
.person-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.person-head .pname { font-weight: 700; color: var(--navy); font-size: 15px; }
.person-remove { background: none; border: none; color: #c0392b; font-size: 13px; cursor: pointer; font-weight: 600; }
.person-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.person-row .field { flex: 1 1 180px; }
.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(--navy); box-shadow: 0 0 0 3px rgba(22,50,79,.1); }
.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; }
.add-person { margin: 4px 0 16px; }
.add-person .btn { border-color: var(--orange); color: var(--orange-ink); background: #fff; }
.add-person .btn:hover { background: var(--cream); }
.calc-options { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.calc-options .field { flex: 1 1 200px; }
.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-range { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

.calc-result { margin-top: 26px; }
.calc-result h3 { color: var(--navy); font-size: 18px; margin: 0 0 14px; }
.table-scroll { overflow-x: auto; }
.calc-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.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; }
.calc-table tbody th[scope="row"] { font-weight: 700; text-align: left; border-top: 1px solid var(--line); font-size: 14px; }
.calc-table .plan-cover { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.calc-table tr.highlight td, .calc-table tr.highlight th { background: var(--cream) !important; }
.calc-table tr.highlight td:first-child, .calc-table tr.highlight th:first-child { border-left: 4px solid var(--orange); }
.calc-table tr.highlight-2 td, .calc-table tr.highlight-2 th { background: var(--green-light) !important; }
.calc-table tr.highlight-2 td:first-child, .calc-table tr.highlight-2 th:first-child { border-left: 4px solid var(--green); }
.calc-table .badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; margin-left: 6px; text-transform: uppercase; letter-spacing: .3px; }
.badge-case { background: #fdebd0; color: #a05c00; }
.badge-year { background: var(--green-light); color: var(--green-dark); }
.calc-table .tot td { font-weight: 800; border-top: 2px solid var(--navy); background: #eef3f8 !important; }
.calc-note { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 10px; }
.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 for keyboard users */
.btn:focus-visible, .lang button:focus-visible, .person-remove:focus-visible,
.tar-brochure:focus-visible, .brochure-links a:focus-visible, .tc-accordion summary:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px;
}

/* ---------- tariffs ---------- */
.tar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tar-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; position: relative; box-shadow: 0 3px 12px rgba(22,50,79,.04); }
.tar-card.recommended { border: 2px solid var(--orange); }
.tar-card.recommended-2 { border: 2px solid var(--green); }
.tar-badge { position: absolute; top: -11px; left: 14px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 10px; }
.tar-badge.green { background: var(--green); }
.tar-name { font-size: 16px; font-weight: 800; color: var(--navy); margin: 4px 0 2px; }
.tar-cover { font-size: 20px; font-weight: 800; color: var(--ink); }
.tar-cover small { font-size: 12px; color: var(--muted); font-weight: 600; display: block; }
.tar-brochure { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--orange-ink); font-weight: 600; text-decoration: none; }
.tar-brochure:hover { text-decoration: underline; }

/* ---------- 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: 720px; }
.ben-table th, .ben-table td { padding: 10px 12px; 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.plan-label { text-align: left; }
.ben-table thead .plan-name { font-size: 10.5px; font-weight: 600; color: #c6d6e4; text-transform: uppercase; letter-spacing: .3px; }
.ben-table tbody td:first-child { text-align: left; color: var(--ink); font-weight: 600; }
.ben-table .full { color: var(--green-dark); font-weight: 700; }
.ben-table .yes { color: var(--green-dark); font-size: 16px; font-weight: 800; }
.ben-table th.plan-label, .ben-table td:first-child { position: sticky; left: 0; }
.ben-table thead th.plan-label { background: var(--navy); z-index: 3; }
.ben-table tbody td:first-child { background: #fff; z-index: 2; }

/* ---------- 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(--orange); border-radius: 10px; padding: 15px 17px; font-size: 14px; box-shadow: 0 3px 12px rgba(22,50,79,.04); }

/* ---------- info (waiting + NCD) ---------- */
.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 ul { margin: 0; padding-left: 18px; }
.info-card li { margin-bottom: 7px; font-size: 14px; }
.info-card .note { font-size: 13px; color: var(--muted); font-style: italic; }

/* ---------- 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(--orange); 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(--orange-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; }
}
