/* 5 Rivers Financial — site styles */
:root {
  --teal: #0F3D3E;        /* deep river teal: hero, footer, headings */
  --teal-2: #164F50;
  --blue: #2B7A9E;        /* river blue: links, icons */
  --stone: #EEF1EC;       /* limestone: page background */
  --paper: #FFFFFF;
  --sun: #E8B23A;         /* sun yellow: buttons only */
  --sun-dark: #D29C22;
  --ink: #1B2B2B;
  --ink-2: #4A5A59;
  --line: #D5DCD6;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--teal); margin: 0 0 .5em; font-optical-sizing: auto; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; }
.measure { max-width: 66ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 1.02rem/1 var(--sans); text-decoration: none; cursor: pointer;
}
.btn-sun { background: var(--sun); color: var(--teal); }
.btn-sun:hover { background: var(--sun-dark); color: var(--teal); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-outline { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn-outline:hover { background: var(--teal); color: #fff; }

/* Header */
.site-header { background: var(--teal); color: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: .01em; }
.brand-mark { width: 38px; height: 38px; }
.header-nav { display: flex; align-items: center; gap: 22px; }
.header-nav a.navlink { color: #DCE7E3; text-decoration: none; font-size: .98rem; }
.header-nav a.navlink:hover { color: #fff; }
.header-nav .btn { min-height: 44px; padding: 0 20px; font-size: .95rem; }
@media (max-width: 820px) { .header-nav a.navlink { display: none; } }

/* Hero */
.hero { background: var(--teal); color: #E6EEEB; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { color: #fff; }
.hero .lede { color: #C9D8D4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 22px; }
.hero-note { font-size: .95rem; color: #A9C0BA; }
.rivers { width: 100%; height: auto; }
.rivers .stream { fill: none; stroke-linecap: round; stroke-width: 5; }
.rivers .label { font: 500 15px var(--sans); fill: #CFE0DB; }
.rivers .out-label { font: 600 20px var(--serif); fill: #fff; }
.rivers .out-sub { font: 400 14px var(--sans); fill: #A9C0BA; }
@media (prefers-reduced-motion: no-preference) {
  .rivers .stream { stroke-dasharray: 900; stroke-dashoffset: 900; animation: flow 1.8s ease-out forwards; }
  .rivers .s2 { animation-delay: .12s; } .rivers .s3 { animation-delay: .24s; } .rivers .s4 { animation-delay: .36s; } .rivers .s5 { animation-delay: .48s; }
  .rivers .main { animation-delay: 1.1s; }
  @keyframes flow { to { stroke-dashoffset: 0; } }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; }
}

/* Assurances under hero */
.assure { background: var(--teal-2); color: #DCE7E3; }
.assure ul { list-style: none; margin: 0; padding: 18px 0; display: flex; flex-wrap: wrap; gap: 10px 34px; font-size: .98rem; }
.assure li { display: flex; align-items: center; gap: 10px; }
.assure svg { width: 18px; height: 18px; flex: none; }

/* Sections */
.section { padding: 88px 0; }
.section-white { background: var(--paper); }
.section-head { margin-bottom: 40px; max-width: 70ch; }

/* Worries list */
.worries { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.worry-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.worry-list li { padding: 16px 0 16px 34px; border-bottom: 1px solid var(--line); position: relative; }
.worry-list li::before { content: "?"; position: absolute; left: 0; top: 15px; width: 22px; height: 22px; border-radius: 50%; background: var(--stone); color: var(--blue); font: 700 14px/22px var(--serif); text-align: center; }
.pullquote { background: var(--teal); color: #E6EEEB; border-radius: var(--radius-lg); padding: 32px; font-family: var(--serif); font-size: 1.35rem; line-height: 1.45; }
.pullquote p:last-child { margin: 0; }
@media (max-width: 820px) { .worries { grid-template-columns: 1fr; gap: 32px; } }

/* Five rivers */
.five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 3px solid var(--teal); }
.five > div { padding: 22px 18px 6px 0; }
.five > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.five .swatch { width: 34px; height: 5px; border-radius: 3px; margin-bottom: 14px; }
.five h3 { font-size: 1.12rem; margin-bottom: .35em; }
.five p { font-size: .97rem; color: var(--ink-2); }
.five-note { margin-top: 28px; padding: 18px 22px; border-left: 4px solid var(--sun); background: var(--stone); max-width: 72ch; }
@media (max-width: 960px) {
  .five { grid-template-columns: 1fr 1fr; }
  .five > div, .five > div + div { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .five > div:nth-child(odd) { padding-right: 18px; }
}
@media (max-width: 560px) { .five { grid-template-columns: 1fr; } }

/* Product explainers */
.product { display: grid; grid-template-columns: 300px 1fr; gap: 56px; padding: 56px 0; border-top: 1px solid var(--line); }
.product:first-of-type { border-top: 0; padding-top: 0; }
.product-aside h2 { margin-bottom: .3em; }
.product-aside .def { color: var(--ink-2); }
.product-aside .fit { margin-top: 20px; padding: 18px; background: var(--paper); border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: .96rem; }
.product-aside .fit strong { display: block; color: var(--teal); margin-bottom: 4px; }
.product-body h3 { margin-top: 1.4em; }
.product-body h3:first-child { margin-top: 0; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 6px 0 8px; }
.types div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.types strong { display: block; font-family: var(--serif); color: var(--teal); font-size: 1.08rem; margin-bottom: 4px; }
.types p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.proscons ul { margin: 0; padding-left: 1.1em; }
.proscons li { margin-bottom: .45em; }
.proscons h3 { font-size: 1.1rem; }
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; gap: 24px; }
  .types, .proscons { grid-template-columns: 1fr; }
}

/* IUL index diagram */
.index-fig { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; margin: 10px 0 6px; }
.index-fig figcaption { font-size: .9rem; color: var(--ink-2); margin-top: 10px; }

/* Compare table */
.compare-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--paper); }
table.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .98rem; }
.compare th, .compare td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--teal); color: #fff; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.compare tbody th { color: var(--teal); font-weight: 600; width: 24%; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { counter-increment: step; position: relative; padding-top: 64px; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--teal); color: var(--teal); font: 600 1.3rem/42px var(--serif); text-align: center; }
.steps p { color: var(--ink-2); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* Booking */
.booking { background: var(--teal); color: #E6EEEB; }
.booking h2 { color: #fff; }
.booking .lede { color: #C9D8D4; }
.booking-grid { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
.booking-points { list-style: none; padding: 0; margin: 24px 0; }
.booking-points li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.cal-frame { background: var(--paper); border-radius: var(--radius-lg); overflow: hidden; min-height: 700px; }
.cal-frame .calendly-inline-widget { min-width: 320px; height: 720px; }
.cal-fallback { padding: 28px; color: var(--ink); }
@media (max-width: 960px) { .booking-grid { grid-template-columns: 1fr; } }

/* About */
.about { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center; }
.portrait { aspect-ratio: 4/5; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--teal) 0%, var(--blue) 100%); display: flex; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.credentials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding: 0; list-style: none; }
.credentials li { padding: 6px 14px; border-radius: 999px; background: var(--stone); border: 1px solid var(--line); font-size: .92rem; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .portrait { max-width: 260px; } }

/* Fit */
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.fit-card { border-radius: var(--radius-lg); padding: 28px; }
.fit-yes { background: var(--paper); border: 2px solid var(--teal); }
.fit-no { background: transparent; border: 1px dashed #A9B6AF; }
.fit-card ul { margin: 0; padding-left: 1.1em; }
.fit-card li { margin-bottom: .55em; }
@media (max-width: 760px) { .fit-grid { grid-template-columns: 1fr; } }

/* Callback form */
.form-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
form.callback { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 600; font-size: .97rem; color: var(--teal); }
.field .hint { font-size: .86rem; color: var(--ink-2); font-weight: 400; }
.field input, .field select {
  min-height: 50px; padding: 0 14px; border: 1.5px solid #B9C5BF; border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus { border-color: var(--blue); outline: 3px solid rgba(43,122,158,.25); outline-offset: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices label { font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid #B9C5BF; border-radius: 999px; cursor: pointer; }
.choices input { accent-color: var(--teal); width: 18px; height: 18px; min-height: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); line-height: 1.5; }
.consent input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; accent-color: var(--teal); flex: none; }
.form-legal { font-size: .84rem; color: var(--ink-2); grid-column: 1 / -1; margin: 0; }
.hidden { display: none; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { form.callback { grid-template-columns: 1fr; padding: 22px; } }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--teal); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font: 400 1.6rem var(--sans); color: var(--blue); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--ink-2); padding-right: 40px; }

/* Footer */
.site-footer { background: #0A2B2C; color: #A9C0BA; font-size: .9rem; padding: 56px 0 40px; }
.site-footer a { color: #DCE7E3; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 24px; }
.footer-contact p { margin: 0 0 4px; }
.disclosures p { max-width: 95ch; margin-bottom: .8em; line-height: 1.55; }

/* Simple pages */
.simple { max-width: 760px; margin: 0 auto; padding: 72px 24px 96px; }
.simple h1 { font-size: clamp(2rem, 4vw, 2.8rem); }

/* ---------- Estimator ---------- */
.est { display: grid; grid-template-columns: 330px 1fr; gap: 40px; align-items: start; }
.est-inputs { background: var(--stone); border-radius: var(--radius-lg); padding: 26px; display: grid; gap: 20px; position: sticky; top: 92px; }
.est-field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; }
.est-field label, .est-field legend { font-weight: 600; color: var(--teal); font-size: .97rem; padding: 0; }
.est-field select { min-height: 48px; padding: 0 12px; border: 1.5px solid #B9C5BF; border-radius: var(--radius-sm); font: inherit; font-size: 1rem; background: #fff; color: var(--ink); }
.est-range { display: flex; align-items: center; gap: 14px; }
.est-range input[type=range] { flex: 1; accent-color: var(--teal); height: 28px; }
.est-range output { min-width: 64px; text-align: right; font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; }
.est-hint { margin: 0; font-size: .86rem; color: var(--ink-2); line-height: 1.45; }
.seg { display: inline-flex; border: 1.5px solid #B9C5BF; border-radius: 999px; overflow: hidden; background: #fff; width: max-content; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { padding: 10px 20px; cursor: pointer; font-weight: 500; color: var(--ink); }
.seg input:checked + label { background: var(--teal); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--sun); outline-offset: -3px; }

.est-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.est-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; background: #fff; }
.est-card-iul { border: 2px solid var(--teal); }
.est-card h3 { font-size: 1.15rem; margin-bottom: .2em; }
.est-price { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--ink); margin: 0 0 .5em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.est-price small { display: block; font-family: var(--sans); font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.est-card ul { margin: 0; padding-left: 1.05em; font-size: .93rem; color: var(--ink-2); }
.est-card li { margin-bottom: .35em; }
.est-card li strong { color: var(--ink); }

.est-chart { margin: 28px 0 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #FCFCFB; }
.est-chart-title { font-family: var(--serif); font-weight: 600; color: var(--teal); font-size: 1.12rem; margin-bottom: 8px; }
.est-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; color: var(--ink-2); margin-bottom: 8px; }
.est-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 22px; height: 0; border-top: 3px solid; }
.sw-cv { border-color: #1F7FB0; }
.sw-paid { border-color: #B8862A; border-top-style: dashed; }
.est-plot { position: relative; }
.est-plot svg { width: 100%; height: auto; overflow: visible; }
.est-plot .axis text { font: 12px var(--sans); fill: #5E6E6C; font-variant-numeric: tabular-nums; }
.est-plot .grid line { stroke: #E3E8E4; }
.est-tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .86rem; box-shadow: 0 6px 18px rgba(15,61,62,.12); min-width: 170px; color: var(--ink); opacity: 0; transition: opacity .12s; }
.est-tip.on { opacity: 1; }
.est-tip b { display: block; color: var(--teal); margin-bottom: 4px; }
.est-tip .row { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.est-table { margin-top: 12px; font-size: .92rem; }
.est-table summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.est-table-wrap { overflow-x: auto; margin-top: 10px; }
.est-table table { border-collapse: collapse; width: 100%; min-width: 420px; font-variant-numeric: tabular-nums; }
.est-table th, .est-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.est-table th:first-child, .est-table td:first-child { text-align: left; }
.est-legal { font-size: .84rem; color: var(--ink-2); margin: 18px 0; line-height: 1.55; max-width: 80ch; }
.guide-link { margin: 4px 0 0; font-weight: 600; }

@media (max-width: 1000px) {
  .est { grid-template-columns: 1fr; }
  .est-inputs { position: static; }
}
@media (max-width: 700px) { .est-cards { grid-template-columns: 1fr; } }

/* ---------- Guide pages ---------- */
.guide-hero { background: var(--teal); color: #E6EEEB; padding: 56px 0 64px; }
.guide-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 22ch; }
.guide-hero .lede { color: #C9D8D4; }
.guide-crumb { font-size: .9rem; color: #A9C0BA; margin-bottom: 18px; }
.guide-crumb a { color: #DCE7E3; }
.guide-body { padding-top: 64px; padding-bottom: 88px; }
.guide-body > section { margin-bottom: 64px; }
.guide-body .steps { margin-top: 28px; }
.guide-two { gap: 48px; }
.guide-two h2 { font-size: 1.6rem; }
.guide-two li { margin-bottom: .8em; }
.guide-cta { display: flex; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.guide-cta img { width: 120px; height: 150px; object-fit: cover; border-radius: var(--radius-sm); flex: none; }
.guide-cta h2 { font-size: 1.6rem; }
.guide-legal { font-size: .86rem; color: var(--ink-2); max-width: 80ch; }
@media (max-width: 640px) { .guide-cta { flex-direction: column; align-items: flex-start; } }

/* ---------- Agent card in hero ---------- */
.agent-card { justify-self: end; width: 100%; max-width: 380px; background: var(--teal-2); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255,255,255,.1); }
.agent-card img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 50% 15%; }
.agent-info { padding: 18px 22px 20px; color: #C9D8D4; font-size: .95rem; }
.agent-info p { margin: 0 0 4px; }
.agent-info .agent-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: #fff; margin-bottom: 6px; }
.agent-info a { color: var(--sun); font-weight: 600; }
@media (max-width: 900px) { .agent-card { justify-self: start; max-width: 340px; } }

.about-top { padding: 64px 0; }
.about-top h2 { margin-bottom: .6em; }

.rivers-panel { background: var(--teal); border-radius: var(--radius-lg); padding: 28px 24px; margin-bottom: 36px; }
.rivers-panel .rivers { max-width: 640px; margin: 0 auto; }
.agent-card img { height: auto; }
@media (max-width: 900px) {
  .hero .wrap { gap: 28px; }
  .agent-card { order: -1; max-width: none; display: flex; align-items: center; }
  .agent-card img { width: 112px; aspect-ratio: 4 / 5; flex: none; }
  .agent-info { padding: 12px 18px; font-size: .9rem; }
  .agent-info .agent-name { font-size: 1.2rem; margin-bottom: 2px; }
}
