/* Fibonacci Equity — site styles
   Palette and type follow the Developer Brief (Section 3). Royal blue on light blue. No gold, no green. */

:root {
  --royal: #1B3F95;
  --navy: #12307A;
  --mid: #3F72C9;
  --soft: #8FB0E6;
  --pale: #BFD3F2;
  --bg: #EAF1FB;
  --white: #FFFFFF;
  --ink: #0B1F44;
  --slate: #5B6F94;
  --red: #B3333F;

  --serif: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, "Source Sans 3", Helvetica, Arial, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(18, 48, 122, 0.10);
  --shadow-sm: 0 2px 10px rgba(18, 48, 122, 0.08);
  --wrap: 1160px;
  --header-h: 72px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 900px) { body { font-size: 17.5px; } }

img, svg { max-width: 100%; display: block; }
a { color: var(--royal); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible { outline: 3px solid var(--mid); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--royal); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; color: var(--royal); line-height: 1.18; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 6vw, 56px); }
h2 { font-size: clamp(28px, 4.4vw, 44px); }
h3 { font-size: clamp(21px, 2.6vw, 26px); }
h4 { font-size: 20px; }
p { margin: 0 0 1em; }
.on-dark h1, .on-dark h2, .on-dark h3, .band--navy h1, .band--navy h2, .band--navy h3 { color: #fff; }
.band--navy p, .on-dark p { color: var(--pale); }

.eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--royal); margin: 0 0 14px;
}
.band--navy .eyebrow, .hero .eyebrow { color: var(--pale); }
.lead { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.55; }
.small { font-size: 0.875rem; }
.caption { font-size: 0.875rem; color: var(--slate); }
.band--bg .caption { color: var(--ink); }
.band--navy .caption, .hero .caption { color: var(--pale); }
.center { text-align: center; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 760px); margin-inline: auto; }
main { padding-top: var(--header-h); display: block; }

.band { padding: clamp(56px, 9vw, 112px) 0; }
.band--bg { background: var(--bg); }
.band--white { background: var(--white); }
.band--navy { background: linear-gradient(160deg, var(--navy) 0%, #15378c 100%); color: #fff; }
.band + .band { border-top: 0; }

.prose p { font-size: 1.05rem; max-width: 66ch; }
.prose.center p { margin-inline: auto; }
.prose .pull { font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); line-height: 1.3; color: var(--royal); font-weight: 700; }
.band--navy .prose .pull { color: #fff; }

.section-head { max-width: 760px; margin-bottom: clamp(28px, 5vw, 52px); }
.section-head.center { margin-inline: auto; }

.rule { width: 72px; height: 3px; background: var(--royal); border: 0; margin: 0 0 24px; border-radius: 2px; }
.center .rule { margin-inline: auto; }
.band--navy .rule { background: var(--pale); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 100;
  background: rgba(255, 255, 255, 0.97); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--pale);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--royal); }
.logo:hover { color: var(--navy); }
.logo-mark { width: 38px; height: 38px; flex: none; }
.logo-word { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: 0.08em; line-height: 1; white-space: nowrap; }
.logo-word small { display: none; }
.site-footer .logo, .site-footer .logo:hover { color: #fff; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  background: transparent; border: 1.5px solid var(--royal); border-radius: var(--radius-sm); color: var(--royal); cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav {
  position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff;
  border-bottom: 1px solid var(--pale); box-shadow: var(--shadow);
  padding: 8px 20px 24px; display: none;
}
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a {
  display: block; padding: 14px 4px; text-decoration: none; color: var(--ink); font-weight: 500;
  border-bottom: 1px solid var(--bg); min-height: 48px;
}
.site-nav li a[aria-current="page"] { color: var(--royal); font-weight: 700; }
.site-nav .btn { margin-top: 18px; width: 100%; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: flex; align-items: center; gap: 28px; background: transparent; border: 0; box-shadow: none; padding: 0; }
  .site-nav ul { display: flex; gap: 6px; }
  .site-nav li a { border: 0; padding: 10px 12px; min-height: 0; border-radius: 6px; font-size: 0.95rem; }
  .site-nav li a:hover { background: var(--bg); color: var(--royal); }
  .site-nav .btn { margin: 0; width: auto; padding: 12px 22px; font-size: 0.95rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  padding: 16px 28px; min-height: 52px; border-radius: var(--radius-sm); border: 2px solid var(--royal);
  background: var(--royal); color: #fff; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--secondary { background: #fff; color: var(--royal); }
.btn--secondary:hover { background: var(--bg); color: var(--navy); border-color: var(--navy); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Buttons on deep-blue backgrounds keep the same roles, with a pale edge so they stay visible. */
.on-dark .btn:not(.btn--secondary), .band--navy .btn:not(.btn--secondary) { border-color: var(--pale); }
.on-dark .btn:not(.btn--secondary):hover, .band--navy .btn:not(.btn--secondary):hover { background: var(--mid); border-color: var(--pale); }
.on-dark .btn--secondary, .band--navy .btn--secondary { border-color: #fff; }
.on-dark .btn--secondary:hover, .band--navy .btn--secondary:hover { background: var(--pale); color: var(--navy); border-color: var(--pale); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.center .btn-row { justify-content: center; }
.disclaimer { margin-top: 16px; font-size: 0.875rem; color: var(--slate); max-width: 60ch; }
.center .disclaimer { margin-inline: auto; }
.band--bg .disclaimer { color: var(--ink); }
.band--navy .disclaimer { color: var(--pale); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(155deg, var(--navy) 0%, #163a8a 60%, var(--royal) 100%);
  padding: clamp(64px, 11vw, 140px) 0 clamp(64px, 10vw, 128px);
}
.hero-inner { position: relative; z-index: 1; }
.hero-inner > * { max-width: 780px; }
.hero h1 { color: #fff; font-size: clamp(34px, 6.4vw, 60px); margin-bottom: 0.45em; }
.hero p.lead { color: var(--pale); max-width: 60ch; }
.hero-spiral { position: absolute; right: -6%; top: 50%; width: min(78vw, 720px); transform: translateY(-50%); opacity: 0.2; pointer-events: none; }
.hero--page { padding: clamp(48px, 8vw, 96px) 0; }
.hero--page h1 { font-size: clamp(32px, 5.4vw, 52px); }

/* ---------- Spiral draw-in ---------- */
.spiral path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hero-spiral { color: var(--pale); }
.js .spiral path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .spiral.in path, .js .hero-spiral path { animation: draw 4.2s cubic-bezier(.4,.1,.2,1) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Number sequence ---------- */
.seq-wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .seq-wrap { grid-template-columns: 1.1fr 0.9fr; gap: 64px; } }
.seq { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0 0 8px; padding: 0; }
.seq li {
  min-width: 48px; padding: 10px 12px; text-align: center; background: #fff; border: 1px solid var(--pale);
  border-radius: var(--radius-sm); font-family: var(--serif); font-weight: 700; color: var(--royal);
  font-size: clamp(24px, 3.6vw, 40px); line-height: 1; box-shadow: var(--shadow-sm);
}
.seq--big li { font-size: clamp(34px, 7vw, 64px); min-width: 70px; padding: 18px 20px; }
.js .seq li { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .seq.in li { opacity: 1; transform: none; }
.js .seq.in li:nth-child(2) { transition-delay: .12s; }
.js .seq.in li:nth-child(3) { transition-delay: .24s; }
.js .seq.in li:nth-child(4) { transition-delay: .36s; }
.js .seq.in li:nth-child(5) { transition-delay: .48s; }
.js .seq.in li:nth-child(6) { transition-delay: .60s; }
.js .seq.in li:nth-child(7) { transition-delay: .72s; }
.js .seq.in li:nth-child(8) { transition-delay: .84s; }
.seq-rule { font-size: 0.95rem; color: var(--ink); margin-top: 14px; max-width: 46ch; }
.spiral-box { color: var(--royal); max-width: 420px; margin-inline: auto; width: 100%; }
.spiral-box .spiral path { stroke-width: 3; }

/* ---------- Cards, icons ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--pale); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 22px; margin: 18px 0 10px; }
.card p { margin: 0; color: var(--ink); }
.icon-box {
  width: 56px; height: 56px; border-radius: 12px; background: var(--bg); color: var(--royal);
  display: grid; place-items: center;
}
.icon-box svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 960px) { .steps--4 { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.step { background: #fff; border: 1px solid var(--pale); border-radius: var(--radius); padding: 28px 24px; position: relative; box-shadow: var(--shadow-sm); }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--royal); color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 20px; margin-bottom: 16px;
}
.step h3 { font-size: 21px; margin-bottom: 8px; }
.step p { margin: 0; }
@media (min-width: 960px) {
  .steps--4 .step:not(:last-child)::after {
    content: ""; position: absolute; top: 50px; right: -25px; width: 26px; height: 2px; background: var(--soft);
  }
}
.steps--long .step { padding: 32px; }
@media (min-width: 720px) { .steps--long .step { display: grid; grid-template-columns: 64px 1fr; column-gap: 24px; } .steps--long .step-num { margin: 0; } }

/* ---------- Tiers ---------- */
.tiers { display: grid; gap: 8px; align-items: stretch; }
@media (min-width: 960px) { .tiers { grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; } }
.tier { background: #fff; border: 1px solid var(--pale); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); text-align: left; }
.tier .label { font-size: 0.8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--royal); margin: 0 0 6px; }
.tier .amount { font-family: var(--serif); font-weight: 700; font-size: clamp(40px, 5vw, 54px); color: var(--royal); line-height: 1; margin: 0; }
.tier .term { font-weight: 600; margin: 6px 0 14px; color: var(--ink); }
.tier h3 { font-size: 24px; margin-bottom: 6px; }
.tier p:last-child { margin: 0; }
.tier--2 { border-top: 4px solid var(--mid); }
.tier--3 { border-top: 4px solid var(--navy); }
.tier--1 { border-top: 4px solid var(--soft); }
.tier-arrow { display: grid; place-items: center; color: var(--mid); }
.tier-arrow svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 959px) { .tier-arrow svg { transform: rotate(90deg); width: 32px; height: 32px; } }

/* ---------- Callout / panels ---------- */
.callout { background: #fff; border: 1px solid var(--pale); border-left: 5px solid var(--royal); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.callout h3 { font-size: 22px; }
.callout p:last-child { margin-bottom: 0; }
.notice { font-size: 0.9rem; font-style: italic; color: var(--slate); }
.band--bg .notice { color: var(--ink); }
.band--navy .notice { color: var(--pale); }

/* ---------- Accordion ---------- */
.accordion { display: grid; gap: 12px; }
.accordion details { background: #fff; border: 1px solid var(--pale); border-radius: var(--radius-sm); }
.accordion summary {
  cursor: pointer; list-style: none; padding: 18px 56px 18px 20px; font-weight: 600; color: var(--royal); position: relative; min-height: 56px; display: flex; align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -8px;
  border-right: 2px solid var(--royal); border-bottom: 2px solid var(--royal); transform: rotate(45deg); transition: transform .2s;
}
.accordion details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.accordion details > div { padding: 0 20px 20px; }
.accordion details > div p:last-child { margin-bottom: 0; }

/* ---------- Principles ---------- */
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: p; }
.principles li { background: #fff; border: 1px solid var(--pale); border-radius: var(--radius); padding: 24px 24px 24px 84px; position: relative; box-shadow: var(--shadow-sm); counter-increment: p; }
.principles li::before {
  content: counter(p); position: absolute; left: 22px; top: 22px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--royal); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 20px;
}
.principles h3 { font-size: 21px; margin-bottom: 6px; }
.principles p { margin: 0; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--pale); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.progress { margin-bottom: 26px; }
.progress-label { font-size: 0.875rem; font-weight: 600; color: var(--royal); margin: 0 0 8px; }
.progress-bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 50%; background: var(--royal); transition: width .3s; }
.field { margin-bottom: 20px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--slate); }
.field .hint { font-size: 0.85rem; color: var(--slate); margin: 6px 0 0; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; min-height: 52px; padding: 12px 14px;
  border: 1.5px solid var(--slate); border-radius: var(--radius-sm);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--mid); outline-offset: 1px; border-color: var(--royal); }
.field [aria-invalid="true"] { border-color: var(--red); }
.err { color: var(--red); font-size: 0.9rem; font-weight: 500; margin: 6px 0 0; display: none; }
.err.show { display: block; }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.check input { width: 24px; height: 24px; margin-top: 3px; accent-color: var(--royal); }
.check label { font-weight: 400; font-size: 0.95rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #fbeff0; border: 1px solid var(--red); color: var(--red); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; display: none; font-weight: 500; }
.form-error.show { display: block; }
.confirm { text-align: center; padding: 16px 0; }
.confirm .icon-box { margin: 0 auto 18px; width: 68px; height: 68px; border-radius: 50%; }
.todo { background: var(--bg); border: 1px dashed var(--royal); border-radius: 4px; padding: 0 6px; font-weight: 600; color: var(--royal); }

.contact-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
.contact-list { list-style: none; margin: 0 0 1em; padding: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid var(--bg); }
.contact-list strong { display: inline-block; min-width: 84px; }

/* ---------- Legal ---------- */
.legal h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 1.8em; }
.legal h3 { font-size: 20px; margin-top: 1.4em; }
.legal p, .legal li { max-width: 72ch; }
.legal ul { padding-left: 1.2em; }
.toc { background: #fff; border: 1px solid var(--pale); border-radius: var(--radius); padding: 22px 26px; margin: 28px 0; }
.toc h2 { font-size: 20px; margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 1; }
@media (min-width: 720px) { .toc ol { columns: 2; } }
.toc li { margin-bottom: 4px; }
.draft-banner { background: #fff; border: 1px solid var(--royal); border-left: 5px solid var(--royal); border-radius: var(--radius-sm); padding: 14px 18px; font-size: 0.95rem; margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--pale); padding: 64px 0 28px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--pale); }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; gap: 56px; } }
.footer-tag { font-family: var(--serif); font-size: 20px; color: #fff; margin: 16px 0 6px; }
.footer-sub { margin: 0; font-size: 0.95rem; }
.site-footer h2 { font-family: var(--sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--pale); margin-bottom: 14px; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a { text-decoration: none; }
.site-footer li a:hover { text-decoration: underline; }
.footer-contact li { margin-bottom: 6px; font-size: 0.95rem; }
.footer-contact .todo { background: transparent; border-color: var(--soft); color: var(--pale); }
.footer-bottom { margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(191, 211, 242, .3); font-size: 0.875rem; }
.footer-bottom p { margin: 0 0 8px; color: var(--pale); }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 14px; }

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; background: #fff; border: 1px solid var(--pale);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; max-width: 640px; margin-inline: auto;
  display: none; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.cookie.show { display: flex; }
.cookie p { margin: 0; font-size: 0.9rem; flex: 1 1 260px; }
.cookie .btn { padding: 10px 18px; min-height: 44px; font-size: 0.9rem; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .seq li { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .spiral path, .js .hero-spiral path { stroke-dashoffset: 0 !important; animation: none !important; }
  * { scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .cookie, .hero-spiral { display: none !important; }
  main { padding-top: 0; }
}
