/* Quantana US — site styles (v2) */
:root {
  --white: #ffffff;
  --purple: #6a1b9a;
  --purple-deep: #520f7a;
  --aubergine: #260242;
  --lavender: #946bb4;
  --mist: #f5f0f9;
  --rule: #e4d9ee;
  --ink-soft: #5b4a6b;
  --highlight: #ffe45c;
  --display: "Syne", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-doc: 4px;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--aubergine);
  font: 400 1.0625rem/1.6 var(--body);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--purple); text-underline-offset: 3px; }
a:hover { color: var(--purple-deep); }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1200px, 100%); margin: 0 auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.3rem, 4.4vw, 3.9rem); font-weight: 800; line-height: 1.04; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--ink-soft); line-height: 1.55; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: 0 1.5rem;
  font: 600 1rem/1 var(--body); text-decoration: none; border-radius: 999px; border: 2px solid var(--purple); transition: background-color .15s, color .15s; }
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--purple-deep); border-color: var(--purple-deep); color: var(--white); }
.btn-secondary { background: transparent; color: var(--purple); }
.btn-secondary:hover { background: var(--mist); color: var(--purple-deep); }
.on-dark .btn-secondary { color: var(--white); border-color: var(--white); }
.on-dark .btn-secondary:hover { background: rgba(255,255,255,.1); color: var(--white); }
.on-dark .btn-primary { background: var(--white); color: var(--aubergine); border-color: var(--white); }
.on-dark .btn-primary:hover { background: var(--mist); border-color: var(--mist); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top, 0px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 72px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: 1.75rem; }
.nav a { color: var(--aubergine); text-decoration: none; font-weight: 500; font-size: .975rem; }
.nav a:hover { color: var(--purple); }
.header-cta { min-height: 44px; padding: 0 1.1rem; font-size: .95rem; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--aubergine); }
@media (max-width: 960px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--white); border-bottom: 1px solid var(--rule); padding: .5rem var(--gutter) 1rem; }
  .nav.open { display: flex; }
  .nav a { padding: .75rem 0; border-bottom: 1px solid var(--rule); }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
}

.notice { background: var(--mist); color: var(--aubergine); font-size: .95rem; text-align: center; padding: .6rem var(--gutter); }

/* Hero */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 112px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { color: var(--aubergine); }
.hero h1 span { display: block; color: var(--purple); }
.hero .lede { margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-proof { margin-top: 2rem; font-size: .95rem; color: var(--ink-soft); max-width: 44ch; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Document illustration */
.docs { position: relative; min-height: 600px; }
.doc { position: absolute; width: min(330px, 66%); background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-doc);
  box-shadow: 0 1px 0 var(--rule), 0 24px 48px -24px rgba(38, 2, 66, .35); padding: 22px 22px 26px; font-size: .8rem; line-height: 1.3; }
.doc-old { left: 0; top: 0; transform: rotate(-3deg); color: var(--ink-soft); }
.doc-new { right: 0; top: 196px; transform: rotate(1.5deg); z-index: 2; overflow: hidden; }
.doc header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--aubergine); padding-bottom: 8px; margin-bottom: 12px; }
.doc header b { font-family: var(--display); font-size: .95rem; color: var(--aubergine); }
.doc header small { color: var(--lavender); }
.doc dl { display: grid; grid-template-columns: 1fr auto; margin: 0; }
.doc dt, .doc dd { margin: 0; padding: 7px 4px; border-bottom: 1px dashed var(--rule); }
.doc dd { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--aubergine); }
.doc .line { height: 7px; background: var(--mist); border-radius: 2px; margin-top: 9px; }
.doc .line.short { width: 60%; }
.doc .row-changed { position: relative; }
.doc .row-changed::before { content: ""; position: absolute; inset: 3px -2px; background: var(--highlight); z-index: -1; transform-origin: left center; transform: scaleX(1); border-radius: 2px; }
.doc dl { position: relative; z-index: 0; }
.scan { position: absolute; left: 0; right: 0; height: 46px; top: -50px; background: linear-gradient(to bottom, rgba(148,107,180,0), rgba(148,107,180,.28), rgba(148,107,180,0)); pointer-events: none; }
.margin-note { position: absolute; right: -4px; bottom: 6px; width: min(270px, 62%); z-index: 3; background: var(--purple); color: var(--white); padding: 14px 16px; border-radius: 10px 10px 10px 2px; font-size: .9rem; line-height: 1.4; box-shadow: 0 18px 36px -18px rgba(38,2,66,.6); }
.margin-note b { display: block; font-family: var(--display); font-size: 1rem; margin-bottom: 2px; }
.stamp { position: absolute; left: 4%; bottom: 40px; z-index: 1; font-family: var(--display); font-weight: 800; color: var(--lavender); border: 2px solid var(--lavender); padding: 6px 10px; transform: rotate(-8deg); font-size: .8rem; letter-spacing: .02em; background: var(--white); }
@media (max-width: 520px) { .docs { min-height: 560px; } .doc { width: 82%; } .doc-old { top: 0; } .doc-new { top: 120px; } .margin-note { width: 80%; bottom: 0; } .stamp { display: none; } }

/* Hero animation — one orchestrated sequence */
.animate .doc-old { animation: dropOld .7s cubic-bezier(.2,.8,.2,1) both; }
.animate .doc-new { animation: dropNew .7s .15s cubic-bezier(.2,.8,.2,1) both; }
.animate .scan { animation: scan 1.5s .9s ease-in-out both; }
.animate .row-changed::before { animation: swipe .45s 1.75s cubic-bezier(.3,.7,.2,1) both; }
.animate .margin-note { animation: note .5s 2.3s cubic-bezier(.2,.8,.2,1.2) both; }
@keyframes dropOld { from { opacity: 0; transform: translateY(24px) rotate(-6deg); } to { opacity: 1; transform: rotate(-3deg); } }
@keyframes dropNew { from { opacity: 0; transform: translateY(32px) rotate(4deg); } to { opacity: 1; transform: rotate(1.5deg); } }
@keyframes scan { from { top: -50px; opacity: 1; } 90% { opacity: 1; } to { top: 100%; opacity: 0; } }
@keyframes swipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes note { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .animate .doc-old, .animate .doc-new, .animate .scan, .animate .row-changed::before, .animate .margin-note { animation: none; } .scan { display: none; } }

/* Dark band with Q motif */
.band { position: relative; background: var(--aubergine); color: var(--white); padding-block: clamp(64px, 9vw, 120px); overflow: hidden; isolation: isolate; }
.band::after { content: ""; position: absolute; right: -6%; top: 50%; width: min(560px, 60vw); aspect-ratio: 1; transform: translateY(-50%);
  background: url("../img/q-outline.svg") center / contain no-repeat; opacity: .14; z-index: -1; }
.band h2 { color: var(--white); max-width: 18ch; }
.band p { color: #e6d9f0; }

/* Renewal clock */
.clock { margin-top: 3rem; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); font-size: .85rem; color: #cbb6dd; margin-bottom: .5rem; }
.scale span:last-child { text-align: right; }
.track { position: relative; height: 56px; border-radius: 8px; background: rgba(255,255,255,.06); margin-bottom: 14px; }
.track .seg { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 14px; font-weight: 600; font-size: .92rem; border-radius: 8px; white-space: nowrap; overflow: hidden; }
.track-label { font-size: .95rem; margin: 1.5rem 0 .5rem; color: var(--white); font-weight: 600; }
.seg.gather { left: 25%; width: 25%; background: var(--lavender); color: var(--white); }
.seg.market { left: 50%; width: 25%; background: #b996d4; color: var(--aubergine); }
.seg.quotes { left: 75%; width: 9%; background: var(--white); color: var(--aubergine); }
.seg.late { left: 84%; width: 16%; background: var(--highlight); color: var(--aubergine); }
.seg.idle { left: 0; width: 84%; background: transparent; color: #cbb6dd; font-weight: 500; }
.clock-notes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 2rem; margin-top: 2.5rem; }
.clock-notes p { font-size: 1rem; }
.clock-notes b { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--white); margin-bottom: .25rem; }
@media (max-width: 760px) { .clock-notes { grid-template-columns: 1fr; gap: 1rem; } .track .seg { font-size: .78rem; padding: 0 8px; } }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 72px); align-items: end; margin-bottom: 3rem; }
.section-head p { margin: 0; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; } }

/* Services list */
.services { border-top: 2px solid var(--aubergine); }
.service { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(16px, 5vw, 72px); padding: 2rem 0; border-bottom: 1px solid var(--rule); }
.service h3 { color: var(--purple); font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.service p { margin: 0 0 .75rem; }
.service ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); }
.service li { margin: .25rem 0; }
.service a { font-weight: 600; display: inline-block; margin-top: .5rem; }
@media (max-width: 760px) { .service { grid-template-columns: 1fr; } }

/* Parallel run (a real sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1.5rem; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 2px; background: var(--rule); z-index: -1; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--white); border: 2px solid var(--purple); color: var(--purple); font: 700 1.3rem/1 var(--body); margin-bottom: 1rem; }
.steps h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.steps p { font-size: 1rem; color: var(--ink-soft); }
.approval { margin-top: 2.5rem; padding: 1.25rem 1.5rem; background: var(--mist); border-radius: 12px; max-width: none; }
.approval p { margin: 0; max-width: none; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } .steps::before { display: none; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Audiences */
.audiences { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(24px, 4vw, 48px); }
.audiences h3 { font-size: 1.35rem; margin-bottom: .75rem; padding-top: 1rem; border-top: 4px solid var(--purple); }
.audiences p { font-size: 1rem; color: var(--ink-soft); }
@media (max-width: 760px) { .audiences { grid-template-columns: 1fr; } }

/* Calculator worksheet */
.worksheet { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; background: var(--white); }
.worksheet form { padding: clamp(24px, 4vw, 44px); }
.field { margin-bottom: 1.75rem; }
.field label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; margin-bottom: .6rem; }
.field output { font-variant-numeric: tabular-nums; color: var(--purple); font-weight: 700; }
.field small { display: block; color: var(--ink-soft); font-size: .875rem; margin-top: .4rem; }
input[type=range] { width: 100%; accent-color: var(--purple); height: 28px; }
.result { background: var(--aubergine); color: var(--white); padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 1.25rem; }
.result dl { margin: 0; display: grid; grid-template-columns: 1fr auto; row-gap: .75rem; }
.result dt { color: #cbb6dd; }
.result dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.saving { border-top: 1px solid rgba(255,255,255,.2); padding-top: 1.25rem; }
.saving p { margin: 0; color: #cbb6dd; font-size: .95rem; }
.saving strong { display: block; font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2.05rem); white-space: nowrap; color: var(--highlight); font-variant-numeric: tabular-nums; margin: .25rem 0; }
.fine { font-size: .82rem; color: #cbb6dd; margin: 0; }
@media (max-width: 860px) { .worksheet { grid-template-columns: 1fr; } }

/* Agents */
.agents { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,6fr); gap: clamp(24px, 5vw, 72px); align-items: start; background: var(--mist); border-radius: 20px; padding: clamp(28px, 5vw, 56px); }
.agents pre { margin: 0; background: var(--aubergine); color: #eadff3; border-radius: 12px; padding: 20px; overflow-x: auto; font: 400 .85rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.agents .k { color: #c9a8e6; } .agents .s { color: var(--highlight); }
.tag { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--purple); background: var(--white); border: 1px solid var(--rule); border-radius: 999px; padding: .2rem .75rem; margin-bottom: 1rem; }
@media (max-width: 860px) { .agents { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; font: 700 1.2rem/1.3 var(--display); color: var(--aubergine); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--purple); font-size: 1.5rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 1.25rem; margin: 0; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* About + CTA + footer */
.about { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 2rem; margin-top: 2.5rem; }
.about b { display: block; font: 800 clamp(2.2rem, 4vw, 3.2rem)/1 var(--display); color: var(--purple); margin-bottom: .5rem; }
.about p { font-size: 1rem; color: var(--ink-soft); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }
.cta .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 2rem; align-items: end; }
.cta .hero-actions { margin-top: 0; justify-content: flex-end; }
@media (max-width: 860px) { .cta .wrap { grid-template-columns: 1fr; } .cta .hero-actions { justify-content: flex-start; } }
.site-footer { background: #1a012e; color: #cbb6dd; padding-block: 48px calc(32px + env(safe-area-inset-bottom, 0px)); font-size: .92rem; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer img { height: 26px; width: auto; margin-bottom: 1rem; }
.site-footer a { color: #e6d9f0; text-decoration: none; display: block; margin: .3rem 0; }
.site-footer a:hover { color: var(--white); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.25rem; margin-top: 1rem; max-width: none; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
