:root {
  --ink: #12202f;
  --ink-soft: #46566a;
  --line: #dfe5ec;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --brand: #17365d;
  --brand-dark: #0f2541;
  --accent: #b8893b;
  --radius: 6px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: "Poppins", "Inter", sans-serif; line-height: 1.2; margin: 0 0 16px; text-wrap: balance; }
h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 16px; text-wrap: pretty; }
a { color: var(--brand); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-dark); }
.logo-mark { width: 36px; height: 36px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 20px; letter-spacing: 0.01em; }
.logo-sub { font-family: "Inter", sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }
.site-footer .logo { color: #fff; }
.site-footer .logo-mark { background: #fff; border-radius: 8px; padding: 3px; width: 40px; height: 40px; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--brand); }
.nav .call { font-weight: 600; color: var(--brand); }

/* Hero */
.hero {
  color: #fff; padding: 120px 0 128px;
  background:
    linear-gradient(90deg, rgba(15,37,65,0.92) 0%, rgba(15,37,65,0.78) 45%, rgba(15,37,65,0.25) 100%),
    url("/images/hero-family-home.webp") 65% 70% / cover no-repeat,
    var(--brand-dark);
}
.photo { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); display: block; }
.photo-tall { aspect-ratio: 4 / 3; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 56px; }
.feature p { color: var(--ink-soft); }
.hero .eyebrow { color: #d9c08f; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; }
.hero p.lead { font-size: 19px; color: #d6deea; max-width: 620px; }
.hero h1 { max-width: 760px; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; padding: 14px 26px; border-radius: var(--radius); border: 0; font-size: 16px; cursor: pointer; font-family: inherit; }
.btn:hover { background: #a2772f; }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,0.45); margin-left: 12px; }
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.hero-actions { margin-top: 32px; }

/* Sections */
section { padding: 88px 0; }
.alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--ink-soft); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.card p { color: var(--ink-soft); margin: 0; }
.card .rule { width: 36px; height: 3px; background: var(--accent); margin-bottom: 20px; }

.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 26px 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 600; display: grid; place-items: center; font-size: 15px; }
.steps strong { display: block; }
.steps span { color: var(--ink-soft); }

/* Contact */
.contact-details p { margin-bottom: 10px; }
.contact-details strong { display: inline-block; min-width: 76px; }
form.contact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid #c9d2dd; border-radius: var(--radius); font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); margin: 6px 0 18px; line-height: 1.5; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.legal-links { font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }
.form-status { margin-top: 16px; font-size: 15px; }
.form-status.ok { color: #1d6b3a; }
.form-status.err { color: #a12a2a; }

/* Footer */
.site-footer { background: var(--brand-dark); color: #c8d2df; padding: 56px 0 32px; font-size: 15px; }
.site-footer a { color: #fff; }
.site-footer { padding: 72px 0 32px; }
.footer-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 40px; margin-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.14); }
.footer-cta h2 { color: #fff; font-size: clamp(22px, 2.6vw, 28px); margin: 0 0 6px; }
.footer-cta p { margin: 0; color: #c8d2df; }
.footer-cta .actions { display: flex; gap: 12px; flex-shrink: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.site-footer h3 { color: #fff; font-size: 15px; letter-spacing: 0.04em; margin-bottom: 14px; }
.site-footer p { margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer li a, .site-footer p a { color: #c8d2df; text-decoration: none; }
.site-footer li a:hover, .site-footer p a:hover { color: #fff; text-decoration: underline; }
.footer-brand .logo { color: #fff; display: inline-block; margin-bottom: 12px; }
.footer-brand p { max-width: 320px; }
.footer-base { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 22px; font-size: 13px; color: #9fb0c4; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-base a { color: #c8d2df; }
.footer-disclaimer { font-size: 13px; color: #9fb0c4; margin: 0 0 22px; max-width: 900px; line-height: 1.55; }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-cta .actions { flex-direction: column; width: 100%; }
  .footer-cta .btn-ghost { margin: 0; }
}

/* Legal pages */
.legal { padding: 64px 0 88px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal p, .legal li { color: #2b3a4b; }
.legal .updated { color: var(--ink-soft); font-size: 15px; }

@media (max-width: 900px) {
  .grid-3, .two-col, .feature { grid-template-columns: 1fr; }
  .feature { gap: 28px; }
  .two-col { gap: 40px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav a:not(.call) { display: none; }
  .hero { padding: 64px 0 72px; }
  section { padding: 64px 0; }
  .row-2 { grid-template-columns: 1fr; }
  .btn-ghost { margin: 12px 0 0; }
  form.contact { padding: 22px; }
}

/* ---------- Motion and polish ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); transition: box-shadow .3s ease, border-color .3s ease; }
.site-header .wrap { transition: min-height .3s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(18,32,47,0.08); border-bottom-color: transparent; }
.site-header.scrolled .wrap { min-height: 62px; }
.nav a { position: relative; transition: color .2s ease; }
.nav a:not(.call)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.nav a:not(.call):hover::after { transform: scaleX(1); }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--brand-dark); padding: 140px 0 150px; }
.hero-bg { position: absolute; inset: -40px 0 -40px 0; background: url("/images/hero-family-home.webp") 65% 70% / cover no-repeat; transform: translate3d(0, var(--py, 0px), 0) scale(1.12); animation: heroZoom 16s cubic-bezier(.2,.6,.2,1) forwards; will-change: transform; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,37,65,0.94) 0%, rgba(15,37,65,0.8) 42%, rgba(15,37,65,0.2) 100%); }
.hero .wrap { position: relative; z-index: 1; }
@keyframes heroZoom { from { scale: 1.08; } to { scale: 1; } }

.js .hero-in { opacity: 0; transform: translateY(22px); }
.js.loaded .hero-in { opacity: 1; transform: none; transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--d, 0) * 120ms + 150ms); }

/* Buttons */
.btn { transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(184,137,59,0.28); }
.btn-ghost:hover { box-shadow: none; }

/* Trust strip */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-item { padding: 28px 24px; border-left: 1px solid var(--line); }
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-item strong { display: block; font-family: "Poppins", sans-serif; font-weight: 600; color: var(--brand-dark); margin-bottom: 2px; }
.trust-item span { color: var(--ink-soft); font-size: 15px; }

/* Scroll reveals */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 110ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* Photos */
.photo-frame { overflow: hidden; border-radius: var(--radius); }
.photo-frame .photo { border-radius: 0; transform: scale(1.08); transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.photo-frame.in .photo { transform: scale(1); }
.photo-frame:hover .photo { transform: scale(1.03); }

/* Cards */
.card { transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease, opacity .8s ease; }
.card .rule { transition: width .4s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(18,32,47,0.10); border-color: #cfd8e3; }
.card:hover .rule { width: 64px; }
.js [data-reveal].settled { transition-delay: 0s; }
.js .card[data-reveal].settled { transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.js .card[data-reveal].in:hover { transform: translateY(-6px); }

/* Steps */
.steps li::before { transition: transform .5s cubic-bezier(.3,1.6,.5,1), background-color .3s ease; }
.js .steps li::before { transform: scale(.6); }
.js .steps li.in::before { transform: scale(1); }
.steps li:hover::before { background: var(--accent); }

/* Form focus polish */
.field input, .field select, .field textarea { transition: border-color .2s ease, box-shadow .2s ease; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23,54,93,0.15); }

@media (max-width: 900px) {
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0; }
  .trust-item:first-child { border-top: 0; }
  .hero { padding: 96px 0 104px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; transform: none; }
  .js .hero-in, .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .photo-frame .photo { transform: none; transition: none; }
  .card, .btn, .steps li::before { transition: none; }
}

/* Consent blocks (same layout as approved VisQuanta accounts) */
.consent-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 8px; margin: 8px 0 18px; background: var(--bg-alt); }
.consent-block h3 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; color: var(--brand-dark); }
.consent-block > p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 10px; }
.consent-block .legal-links { margin-bottom: 14px; }
.consent-block .consent { margin: 0 0 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.consent-block .consent + .consent { border-top: 0; padding-top: 0; }
.consent-note { font-size: 12.5px !important; color: #6b7a8c !important; }

.hero-note { margin-top: 26px; font-size: 14px; color: #b9c6d6; max-width: 620px; }
