:root {
  --color-dark: #2D1438;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #6EEDA8;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(31, 21, 35, 0.3);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 var(--gap); font-weight: 700; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.1; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { margin: 0 0 var(--gap); }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.2em; margin: 0 0 var(--gap); }
li { margin-bottom: 0.5em; }

.surface-dark { background: var(--color-dark); color: var(--color-paper); }
.surface-paper { background: var(--color-paper); color: var(--color-text); }
.surface-dark .hl, .surface-dark a { color: var(--color-accent); }
.surface-paper .hl, .surface-paper a { color: var(--color-brand); }

.container { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gap); }
section { padding-block: var(--section-y); position: relative; }

/* Header & Footer */
header { position: sticky; top: 0; z-index: 100; background: rgba(246, 243, 247, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(31, 21, 35, 0.1); }
.surface-dark header { background: rgba(45, 20, 56, 0.92); border-bottom-color: rgba(246, 243, 247, 0.1); }
.nav-wrapper { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 0.5em; }
.logo img { width: 32px; height: 32px; object-fit: contain; display: block; }
.logo span { font-weight: 800; font-size: 1.2rem; }
nav { display: flex; gap: var(--gap); flex-wrap: wrap; }
nav a { font-weight: 600; font-size: 0.95rem; padding: 0.25em 0; }
nav a:hover { opacity: 0.8; }
nav a[aria-current="page"] { color: var(--color-brand); border-bottom: 2px solid var(--color-brand); }
.surface-dark nav a[aria-current="page"] { color: var(--color-accent); border-bottom-color: var(--color-accent); }

footer { padding-block: var(--section-y); border-top: 1px solid rgba(31, 21, 35, 0.1); }
.surface-dark footer { border-top-color: rgba(246, 243, 247, 0.1); }
.footer-inner { display: flex; flex-direction: column; gap: var(--gap); align-items: center; text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; padding: 0 1.5em; height: 52px; border-radius: var(--radius-btn); font-weight: 600; font-size: 1rem; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease; border: none; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(110, 237, 168, 0.35); }
.btn-secondary { background: transparent; border: 2px solid currentColor; color: inherit; }
.btn-secondary:hover { background: rgba(31, 21, 35, 0.06); }
.surface-dark .btn-secondary { border-color: var(--color-paper); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }

/* Cards & Panels */
.card { background: var(--color-paper); border-radius: var(--radius-card); box-shadow: var(--card-shadow); padding: var(--gap); border: var(--card-border); }
.surface-dark .card { background: rgba(246, 243, 247, 0.95); color: var(--color-text); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* Tables */
table { width: 100%; table-layout: auto; border-collapse: collapse; margin: var(--gap) 0; }
table, table th, table td { min-width: 0; }
th, td { padding: 0.75em 1em; text-align: left; border-bottom: 1px solid rgba(31, 21, 35, 0.1); vertical-align: top; overflow-wrap: anywhere; word-break: break-word; }
th { font-weight: 700; }
.surface-dark th, .surface-dark td { border-bottom-color: rgba(246, 243, 247, 0.15); }

/* FAQ */
details { margin-bottom: var(--gap); border-bottom: 1px solid rgba(31, 21, 35, 0.1); padding-bottom: var(--gap); }
.surface-dark details { border-bottom-color: rgba(246, 243, 247, 0.15); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 0.5em; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font-weight: 700; width: 1.2em; text-align: center; }
details[open] summary::before { content: "-"; }
details p { margin-top: 0.5em; }

/* SVG Animations */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes draw-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes breathe { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

.anim-float { animation: float 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 4s ease forwards; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-slide { animation: slide-in 0.8s ease forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .anim-float, .anim-draw, .anim-breathe, .anim-slide { animation: none !important; }
}

/* Utility */
.mt-lg { margin-top: calc(var(--gap) * 2); }
.mb-md { margin-bottom: var(--gap); }
.text-center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.min-w-0 { min-width: 0; }
svg.hero-visual { width: 100%; height: auto; display: block; }
.feature-pill { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.4em 0.8em; border-radius: 99px; background: rgba(246, 243, 247, 0.15); font-size: 0.9rem; font-weight: 500; }
.timeline-item { position: relative; padding-left: 2em; margin-bottom: var(--gap); }
.timeline-item::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--color-accent); }
.timeline-item::after { content: ""; position: absolute; left: 0.25em; top: 0.8em; width: 2px; height: calc(100% + var(--gap)); background: rgba(246, 243, 247, 0.2); }
.timeline-item:last-child::after { display: none; }
.step-list { counter-reset: step; list-style: none; padding: 0; }
.step-list li { position: relative; padding-left: 2.5em; margin-bottom: 1em; }
.step-list li::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 1.8em; height: 1.8em; border-radius: 6px; background: var(--color-accent); color: var(--color-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.5em; }
.surface-paper .badge { color: var(--color-brand); }
.surface-dark .badge { color: var(--color-accent); }
.float-overlap { position: relative; z-index: 10; margin-top: -40px; }
