@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink-navy: #142032;
  --ink-navy-soft: #1c2f47;
  --paper: #FAF6EF;
  --paper-dim: #F1ECE1;
  --forest: #1C7A5E;
  --forest-dark: #145A45;
  --amber: #E2A33D;
  --ink: #1A1D29;
  --slate: #5B6472;
  --slate-light: #8891A0;
  --line: #DED7C8;
  --white: #FFFFFF;
  --danger: #B4423C;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink-navy);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); line-height: 1.08; font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.18; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--slate); max-width: 62ch; }

a { color: var(--forest); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

button { font-family: inherit; cursor: pointer; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--forest);
  color: var(--white);
}
.btn-primary:hover { background: var(--forest-dark); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(250, 246, 239, 0.35);
}
.btn-ghost:hover { border-color: var(--paper); }

.btn-outline {
  background: transparent;
  color: var(--ink-navy);
  border-color: var(--ink-navy);
}
.btn-outline:hover { background: var(--ink-navy); color: var(--paper); }

.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  background: var(--ink-navy);
  color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo-icon { flex-shrink: 0; display: block; }
.logo-text em { font-style: normal; color: var(--amber); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}
.main-nav a {
  color: rgba(250, 246, 239, 0.82);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.main-nav a:hover { color: var(--paper); }

.nav-toggle { display: none; background: none; border: none; color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink-navy);
  color: var(--paper);
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { color: var(--paper); }
.hero .lede { color: rgba(250, 246, 239, 0.78); font-size: 1.1rem; max-width: 48ch; }

.trust-row {
  display: flex;
  gap: 28px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.trust-row div { font-size: 0.85rem; color: rgba(250, 246, 239, 0.65); max-width: 15ch; }
.trust-row strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--amber);
  font-weight: 600;
}

/* ---------- Calculator card ---------- */
.calc-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: 0 24px 60px rgba(9, 14, 24, 0.35);
}
.calc-card h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: none;
  color: var(--slate);
  margin-bottom: 18px;
}
.calc-amount {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--ink-navy);
  margin-bottom: 4px;
}
.calc-row { margin-bottom: 22px; }
.calc-row label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 8px;
}
.calc-row input[type="range"] {
  width: 100%;
  accent-color: var(--forest);
  height: 6px;
}
.term-options {
  display: flex;
  gap: 8px;
}
.term-options button {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
}
.term-options button.active {
  border-color: var(--forest);
  background: rgba(28, 122, 94, 0.08);
  color: var(--forest-dark);
}
.calc-result {
  background: var(--paper-dim);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.calc-result span { font-size: 0.85rem; color: var(--slate); }
.calc-result strong { font-family: var(--serif); font-size: 1.4rem; color: var(--ink-navy); }
.calc-fineprint { font-size: 0.72rem; color: var(--slate-light); margin-top: 12px; margin-bottom: 0; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head p { font-size: 1.05rem; }

.section-alt { background: var(--paper-dim); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: step; }
.step { border-left: 2px solid var(--line); padding-left: 22px; }
.step-num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--forest);
  font-weight: 600;
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.95rem; }

/* Products */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px;
}
.product-card h3 { margin-bottom: 10px; }
.product-card .range {
  font-family: var(--serif);
  color: var(--forest-dark);
  font-size: 1.1rem;
  margin-bottom: 14px;
  display: block;
}
.product-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.product-card li {
  font-size: 0.9rem;
  color: var(--slate);
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.product-card li:first-child { border-top: none; }

/* Stats */
.stats-band {
  background: var(--ink-navy);
  color: var(--paper);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--amber);
  font-weight: 600;
}
.stat span { font-size: 0.88rem; color: rgba(250, 246, 239, 0.68); }

/* FAQ */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink-navy);
}
.faq-q .icon { font-size: 1.4rem; color: var(--forest); transition: transform 0.2s ease; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-item.open .faq-a { max-height: 240px; }
.faq-a p { padding-bottom: 22px; font-size: 0.95rem; }

/* CTA band */
.cta-band {
  background: var(--forest);
  color: var(--white);
  text-align: left;
}
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.85); margin-bottom: 0; }
.cta-band .btn-primary { background: var(--ink-navy); }
.cta-band .btn-primary:hover { background: #0d1826; }

/* ---------- Footer ---------- */
footer {
  background: var(--ink-navy);
  color: rgba(250, 246, 239, 0.6);
  padding: 56px 0 28px;
  font-size: 0.85rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 { color: var(--paper); font-size: 0.85rem; font-family: var(--sans); font-weight: 700; margin-bottom: 14px; }
.footer-grid a { display: block; color: rgba(250, 246, 239, 0.6); text-decoration: none; margin-bottom: 10px; }
.footer-grid a:hover { color: var(--paper); }
.footer-legal { border-top: 1px solid rgba(250, 246, 239, 0.15); padding-top: 24px; }
.footer-legal p { color: rgba(250, 246, 239, 0.45); font-size: 0.78rem; max-width: none; }
.admin-link { color: rgba(250, 246, 239, 0.3) !important; font-size: 0.75rem; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 24, 0.6);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 48px 20px;
  z-index: 100;
}
.modal-overlay.visible { display: flex; }
.modal {
  background: var(--paper);
  border-radius: var(--radius-md);
  max-width: 480px;
  width: 100%;
  padding: 36px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--slate);
  line-height: 1;
}
.modal h3 { font-size: 1.5rem; margin-bottom: 6px; }
.modal .sub { font-size: 0.92rem; margin-bottom: 24px; }

.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-navy);
  margin-bottom: 6px;
}
.form-row input, .form-row select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
}
.form-row input:focus, .form-row select:focus {
  border-color: var(--forest);
}
.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 5px;
  display: none;
}
.form-row.invalid input, .form-row.invalid select { border-color: var(--danger); }
.form-row.invalid .form-error { display: block; }

.form-status {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.form-status.success { display: block; background: rgba(28,122,94,0.12); color: var(--forest-dark); }
.form-status.error { display: block; background: rgba(180,66,60,0.1); color: var(--danger); }

.consent-line { font-size: 0.76rem; color: var(--slate-light); margin: 14px 0 0; }

/* ---------- Blog ---------- */
.blog-hero { background: var(--ink-navy); color: var(--paper); padding: 56px 0 48px; }
.blog-hero h1 { color: var(--paper); margin-bottom: 8px; }
.blog-hero p { color: rgba(250,246,239,0.75); max-width: 60ch; }
.breadcrumb { font-size: 0.82rem; color: var(--slate-light); margin-bottom: 16px; }
.blog-hero .breadcrumb { color: rgba(250,246,239,0.55); }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.blog-list { padding: 64px 0 88px; }
.blog-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px; text-decoration: none; display: block; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.blog-card:hover { box-shadow: 0 12px 30px rgba(20,32,50,0.1); transform: translateY(-2px); }
.blog-card .meta { font-size: 0.78rem; color: var(--slate-light); margin-bottom: 10px; }
.blog-card h2 { font-size: 1.25rem; margin-bottom: 10px; }
.blog-card p { font-size: 0.92rem; margin-bottom: 0; }
.article { padding: 48px 0 88px; }
.article-inner { max-width: 720px; margin: 0 auto; }
.article-meta { font-size: 0.85rem; color: var(--slate-light); margin-bottom: 8px; }
.article-inner h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 18px; }
.article-inner h2 { font-size: 1.4rem; margin: 40px 0 14px; }
.article-inner p { max-width: none; font-size: 1.02rem; color: var(--ink); line-height: 1.7; margin-bottom: 1.2em; }
.article-inner ul { margin: 0 0 1.4em; padding-left: 22px; }
.article-inner li { color: var(--ink); font-size: 1.02rem; line-height: 1.7; margin-bottom: 0.5em; }
.article-cta { background: var(--paper-dim); border-radius: var(--radius-md); padding: 28px; margin: 40px 0; text-align: center; }
.article-cta p { margin: 0 auto 16px; }
.article-disclaimer { font-size: 0.78rem !important; color: var(--slate-light) !important; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 40px; }
@media (max-width: 900px) { .blog-cards { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .steps, .products { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .main-nav { display: none; }
  .cta-band .container { flex-direction: column; align-items: flex-start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
