/* XFOLIOO — minimal, Apple-inspired styles */
:root {
  --purple: #4F1964;
  --purple-deep: #3a1149;
  --purple-soft: #7a3d93;
  --pink: #F1CCD5;
  --pink-soft: #fbeef2;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --radius: 18px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(79, 25, 100, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; color: #fff; }
.brand:hover { text-decoration: none; }
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: 0.14em; color: #fff; }
.brand img { height: 30px; width: auto; }
.foot-logo { height: 28px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: rgba(255,255,255,.85); font-size: 14px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; text-decoration: none; }
.site-nav a[aria-current="page"] { font-weight: 600; }
.site-nav .nav-cta {
  background: #fff; color: var(--purple); padding: 6px 14px; border-radius: 980px; font-weight: 600;
}
.site-nav .nav-cta:hover { background: var(--pink); color: var(--purple); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: #fff; transition: transform .25s; }
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 820px) {
  /* backdrop-filter would trap the fixed menu panel inside the 56px header, so use a solid bar on phones */
  .site-header { background: var(--purple); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: 56px; left: 0; right: 0; height: calc(100vh - 56px); height: calc(100dvh - 56px); overflow-y: auto; background: var(--purple);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 12px 22px 32px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s;
  }
  .site-nav.open { opacity: 1; transform: none; visibility: visible; }
  .site-nav a { font-size: 24px; font-weight: 600; padding: 12px 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; }
  .site-nav .nav-cta { margin-top: 20px; font-size: 17px; padding: 12px 22px; width: auto; border: 0; }
  body.menu-open { overflow: hidden; }
}

/* ---------- Typography ---------- */
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(40px, 7vw, 80px); }
h2 { font-size: clamp(32px, 4.6vw, 56px); }
h3 { font-size: clamp(21px, 2.2vw, 28px); letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0 0 1em; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--purple); margin-bottom: 10px; letter-spacing: 0; }
.lead { font-size: clamp(19px, 2.2vw, 24px); color: var(--ink-2); line-height: 1.4; max-width: 720px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); }
.grad {
  background: linear-gradient(90deg, var(--purple) 0%, #a0477a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-sm { padding: 56px 0; }
.alt { background: var(--bg-alt); }
.dark { background: var(--purple); color: #fff; }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark .lead, .dark p { color: rgba(255,255,255,.86); }
.dark .eyebrow { color: var(--pink); }

.hero { padding: clamp(88px, 14vw, 160px) 0 clamp(72px, 10vw, 120px); text-align: center; }
.hero h1 { max-width: 900px; margin: 0 auto .3em; }
.hero .lead { margin: 0 auto 32px; }
.page-hero { padding: clamp(64px, 10vw, 112px) 0 clamp(40px, 6vw, 64px); text-align: center; }
.page-hero h1 { font-size: clamp(36px, 6vw, 64px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--purple); color: #fff; border: 1px solid var(--purple);
  font: inherit; font-size: 17px; font-weight: 500; padding: 12px 24px; border-radius: 980px; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--purple-deep); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--purple); }
.btn-ghost:hover { background: var(--pink-soft); }
.dark .btn { background: #fff; color: var(--purple); border-color: #fff; }
.dark .btn-ghost { background: transparent; color: #fff; }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.link-arrow::after { content: " \203A"; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .g3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border-radius: var(--radius); padding: 36px 32px;
  display: flex; flex-direction: column;
}
.alt .card { background: #fff; }
.section:not(.alt) .card.bordered { border: 1px solid var(--line); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-2); }
.card .more { margin-top: auto; font-weight: 500; }
a.card { color: inherit; transition: transform .25s ease, box-shadow .25s ease; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,.08); }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--pink-soft); color: var(--purple);
  display: grid; place-items: center; margin-bottom: 20px; font-size: 22px;
}
.tile-big { padding: 56px 40px; text-align: center; }
.stat { font-size: clamp(40px, 5vw, 56px); font-weight: 700; letter-spacing: -0.03em; color: var(--purple); line-height: 1; margin-bottom: 8px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--purple); border-bottom: 2px solid var(--purple); transform: rotate(-45deg); }
.crosslist li::before { width: 14px; height: 2px; border: 0; background: var(--muted); transform: none; top: 22px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.steps li { counter-increment: step; background: #fff; border-radius: var(--radius); padding: 28px 24px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); color: var(--purple); font-size: 14px; margin-bottom: 14px; }
.steps strong { display: block; font-size: 19px; margin-bottom: 6px; }
.steps span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Team ---------- */
.person { display: grid; grid-template-columns: 160px 1fr; gap: 32px; align-items: start; background: #fff; border-radius: var(--radius); padding: 36px; }
.avatar { width: 160px; height: 160px; border-radius: 24px; background: var(--pink); color: var(--purple); display: grid; place-items: center; font-size: 48px; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person .role { color: var(--purple); font-weight: 600; margin-bottom: 14px; }
@media (max-width: 640px) { .person { grid-template-columns: 1fr; padding: 28px; } .avatar { width: 112px; height: 112px; font-size: 36px; } }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font-size: 21px; font-weight: 600; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 32px; width: 10px; height: 10px;
  border-right: 2px solid var(--purple); border-bottom: 2px solid var(--purple); transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 36px; }
.faq .answer { padding: 0 0 26px; color: var(--ink-2); max-width: 760px; }
.faq .answer ul { padding-left: 20px; margin: 0 0 1em; }
.faq .answer li { margin-bottom: 6px; }

/* ---------- Prose / legal pages ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 28px; margin-top: 1.8em; letter-spacing: -0.02em; }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose .updated { color: var(--muted); font-size: 14px; }
.note {
  background: var(--pink-soft); border-radius: var(--radius-sm); padding: 18px 22px; color: var(--ink-2); font-size: 15px; margin: 24px 0;
}
.note strong { color: var(--ink); }
.todo { background: #fff4d6; border-radius: 6px; padding: 1px 6px; font-weight: 600; color: #7a5200; }

.table-wrap { overflow-x: auto; margin: 20px 0 28px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-alt); font-weight: 600; color: var(--ink); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--mono); white-space: nowrap; }

.levels { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 14px; }
.levels li { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 20px 22px; }
.levels b { display: block; color: var(--purple); font-family: var(--mono); font-size: 13px; font-weight: 500; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 17px; padding: 13px 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(79,25,100,.12); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.consent input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--purple); }
.hidden-field { position: absolute; left: -9999px; }
.form-card { background: #fff; border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); }

/* ---------- Calculators ---------- */
.calc { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: start; }
.contact-grid { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 900px) { .calc, .contact-grid { grid-template-columns: 1fr; } }
.calc-panel { background: #fff; border-radius: var(--radius); padding: 32px; }
.calc-inputs { display: grid; gap: 24px; }
.ctrl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.ctrl-head label { font-size: 15px; font-weight: 500; }
.ctrl-head .val { display: flex; align-items: center; gap: 4px; background: var(--bg-alt); border-radius: 8px; padding: 4px 10px; font-family: var(--mono); font-size: 15px; color: var(--purple); }
.ctrl-head .val input { width: 92px; border: 0; background: transparent; font: inherit; color: inherit; text-align: right; padding: 0; }
.ctrl-head .val input:focus { outline: none; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--line); outline-offset: 6px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.18); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.18); cursor: pointer; }
.seg { display: inline-flex; background: var(--bg-alt); border-radius: 10px; padding: 3px; margin-bottom: 8px; }
.seg button { border: 0; background: transparent; font: inherit; font-size: 14px; padding: 7px 16px; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); font-weight: 500; }

.result-main { text-align: center; padding: 8px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.result-main .label { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.result-main .big { font-family: var(--mono); font-size: clamp(34px, 5vw, 48px); font-weight: 500; color: var(--purple); letter-spacing: -0.03em; line-height: 1.1; }
.result-main .sub { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.result-rows { display: grid; gap: 0; margin-bottom: 20px; }
.result-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--bg-alt); font-size: 15px; }
.result-rows dt { color: var(--ink-2); }
.result-rows dd { margin: 0; font-family: var(--mono); font-weight: 500; text-align: right; white-space: nowrap; }
@media (max-width: 560px) { .calc-panel { padding: 24px 20px; } .result-rows div { font-size: 14px; } }
.chart { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 18px; justify-content: center; font-size: 13px; color: var(--ink-2); margin-top: 8px; flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.assumptions { margin-top: 24px; }
.assumptions h3 { font-size: 17px; margin-bottom: 8px; }
.assumptions ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.assumptions li { margin-bottom: 4px; }
.calc-note { font-size: 13px; color: var(--muted); margin-top: 18px; }
.warn { color: #9b1c1c; font-size: 14px; }
details.table-toggle summary { cursor: pointer; color: var(--purple); font-weight: 500; font-size: 15px; padding: 8px 0; }

/* ---------- Regulatory strip & footer ---------- */
.reg-strip { background: var(--pink-soft); padding: 18px 0; font-size: 13px; color: var(--ink-2); }
.reg-strip p { margin: 0 0 4px; }
.reg-strip .risk { margin: 0; color: var(--muted); }
.site-footer { background: var(--bg-alt); color: var(--muted); font-size: 13px; padding: 48px 0 32px; }
.site-footer a { color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h2 { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0; margin-bottom: 10px; }
.foot-grid h2.mt { margin-top: 20px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-brand { font-weight: 700; letter-spacing: .14em; color: var(--purple); font-size: 16px; }
.foot-legal { padding-top: 20px; }
.foot-legal p { margin-bottom: 8px; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 720px; margin: 0 auto;
  background: rgba(255,255,255,.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(0,0,0,.14);
  padding: 18px 20px; display: flex; gap: 16px; align-items: center; font-size: 14px; color: var(--ink-2);
}
.cookie-banner p { margin: 0; flex: 1; }
.cookie-banner[hidden] { display: none !important; }
.cookie-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.cookie-actions .btn { font-size: 14px; padding: 8px 16px; }
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 10px; left: 10px; right: 10px; bottom: 10px; padding: 14px 16px; font-size: 13px; }
  .cookie-actions .btn { flex: 1; padding: 7px 12px; }
}

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }
.dark .card h3, .dark .card p { color: #fff; }
.dark .card p { opacity: .85; }
