:root {
  --ink: #10243f;
  --ink-soft: #46586f;
  --muted: #6b7d97;
  --line: #e2e9f2;
  --bg: #f6f9fd;
  --surface: #ffffff;
  --blue-900: #123a6b;
  --blue-700: #1f4e8c;
  --blue-500: #3a78c4;
  --blue-100: #e3edf9;
  --accent: #f5c451;
  --green: #2e9e5b;
  --red: #c0392b;
  --radius: 16px;
  --shadow: 0 18px 40px -20px rgba(18, 58, 107, 0.35);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h1 em { color: var(--blue-500); font-style: italic; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.15rem; margin: 0; }

p { margin: 0 0 1em; }

a { color: var(--blue-700); text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-500);
  margin: 0 0 0.6rem;
}

.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 32em; }

/* grain / ambient texture */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.4;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(58,120,196,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(245,196,81,0.08), transparent 55%);
}

main, header, footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 249, 253, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(18,58,107,0.4); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { display: inline-flex; }
.brand-name { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.3rem; color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--blue-700); }
.nav-cta {
  background: var(--blue-700); color: #fff !important; padding: 9px 16px;
  border-radius: 999px; font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { background: var(--blue-900); transform: translateY(-1px); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: 0.25s ease; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; cursor: pointer; border: 0;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--blue-700); color: #fff; box-shadow: 0 10px 24px -12px rgba(31,78,140,0.7); }
.btn-primary:hover { background: var(--blue-900); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--blue-700); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue-500); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }

.trust { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.trust li { position: relative; padding-left: 22px; color: var(--ink-soft); font-size: 0.92rem; }
.trust li strong { color: var(--ink); }
.trust li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--blue-100); border: 2px solid var(--blue-500);
}

.hero-visual { display: flex; justify-content: center; }
.manuscript { width: 100%; max-width: 460px; height: auto; }

/* subtle life in the illustration */
.tool .cursor { animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.check { animation: pop 2.6s ease-in-out infinite; transform-origin: 356px 300px; }
@keyframes pop { 0%, 70% { transform: scale(1); } 80% { transform: scale(1.12); } 100% { transform: scale(1); } }
.hl { animation: glow 3s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- Privacy band ---------- */
.privacy { background: linear-gradient(180deg, #ffffff, #eef4fb); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.privacy-grid { display: grid; grid-template-columns: 90px 1fr; gap: 28px; align-items: start; padding: 48px 24px; }
.privacy-badge {
  width: 90px; height: 90px; border-radius: 20px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.privacy-copy h2 { margin-bottom: 0.3em; }
.privacy-copy p { color: var(--ink-soft); max-width: 46em; margin: 0; font-size: 1.05rem; }

/* ---------- Section heads ---------- */
.section-head { text-align: center; max-width: 36em; margin: 0 auto 44px; }
.section-sub { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Features ---------- */
.features { padding: 80px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.feature-icon { width: 56px; height: 56px; margin-bottom: 16px; }
.feature-icon svg { width: 100%; height: 100%; }
.feature p { color: var(--ink-soft); margin: 0; font-size: 0.96rem; }

/* ---------- How it works ---------- */
.how { padding: 20px 0 80px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px 24px;
}
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%; background: var(--blue-700); color: #fff; font-weight: 700;
  font-family: "Fraunces", serif; font-size: 1.1rem;
}
.step p { color: var(--ink-soft); margin: 0; font-size: 0.96rem; }

/* ---------- Reports ---------- */
.reports { padding: 80px 0; background: linear-gradient(180deg, #eef4fb, #ffffff); border-top: 1px solid var(--line); }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.report-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.report-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.report-thumb { border-bottom: 1px solid var(--line); }
.report-thumb svg { width: 100%; height: auto; display: block; }
.report-meta { padding: 18px 20px 8px; }
.report-meta h3 { font-family: "Inter", sans-serif; font-weight: 700; font-size: 1.05rem; }
.report-meta p { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }
.report-link {
  margin: auto 20px 18px; color: var(--blue-700); font-weight: 600; font-size: 0.9rem;
  transition: gap 0.2s ease; display: inline-flex; gap: 4px;
}
.report-card:hover .report-link { gap: 8px; }

/* ---------- Quote form ---------- */
.quote { padding: 80px 0; }
.quote-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.quote-intro p { color: var(--ink-soft); }
.quote-points { list-style: none; padding: 0; margin: 20px 0 0; }
.quote-points li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--ink-soft); }
.quote-points li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px;
  border-radius: 3px; background: var(--blue-100); border: 2px solid var(--blue-500);
  transform: rotate(45deg);
}

.quote-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 7px; color: var(--ink); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fbfdff; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(58,120,196,0.14);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.82rem; color: var(--muted); margin: 14px 0 0; text-align: center; }
.form-success {
  margin: 16px 0 0; text-align: center; font-weight: 600; color: var(--green);
  background: #e7f6ec; padding: 12px; border-radius: 10px;
}

/* ---------- Quote button: progress fill + status ---------- */
.quote-submit {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.quote-submit .btn-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: linear-gradient(90deg, #2e9e5b, #62c98c);
  transition: width 0.14s linear; pointer-events: none;
}
.quote-submit .btn-label { position: relative; z-index: 1; }
.quote-submit.is-validating { cursor: progress; }
.quote-submit.is-done { background: var(--green); box-shadow: 0 10px 24px -12px rgba(46,158,91,0.6); }
.quote-submit.is-done .btn-fill { width: 100%; }
.quote-submit:disabled { opacity: 0.9; cursor: default; }

.form-status {
  margin: 12px 0 0; text-align: center; font-size: 0.86rem; font-weight: 600;
  color: var(--ink-soft);
}
.form-status.is-error { color: var(--red); }
.form-status.is-ok { color: var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: #cfe0f5; padding: 40px 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin: 6px 0 0; color: #a9c4e6; font-size: 0.9rem; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { color: #cfe0f5; font-size: 0.92rem; }
.footer-links a:hover { color: #fff; }
.footer-fine { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 16px; color: #8fb0d8; font-size: 0.82rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .quote-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .feature-grid, .steps, .report-grid { grid-template-columns: 1fr 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .privacy-badge { width: 72px; height: 72px; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px; box-shadow: var(--shadow);
    clip-path: inset(0 0 100% 0); transition: clip-path 0.3s ease;
  }
  .nav-links.open { clip-path: inset(0 0 0 0); }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-cta { text-align: center; margin-top: 10px; border-bottom: 0; }
  .nav-toggle { display: flex; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .feature-grid, .steps, .report-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .hero { padding-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
