:root {
  --color-dark: #271231;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(31,21,35,0.16);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height-base: 1.65;
  --line-height-title: 1.15;
  --font-weight-title: 500;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Typography */
h1, h2, h3, h4 { font-weight: var(--font-weight-title); line-height: var(--line-height-title); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: calc(var(--gap) * 2); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: var(--gap); }
p { max-width: 38em; margin-bottom: var(--gap); }
a { color: var(--color-brand); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent); }
.hl { color: var(--color-brand); }
.dark-surface .hl { color: var(--color-accent); }
.dark-surface { background: var(--color-dark); color: var(--color-paper); }
.dark-surface a { color: var(--color-accent); }
.dark-surface .hl { color: var(--color-accent); }
.light-card { background: var(--color-paper); color: var(--color-text); border: var(--card-border); }
.light-card .hl { color: var(--color-brand); }
.light-card a { color: var(--color-brand); }

/* Layout */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--section-y) 0; }
.grid-2 { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); align-items: center; }
.grid-3 { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.pills-row { display: flex; gap: var(--gap); flex-wrap: wrap; margin-top: var(--gap); }
.pill { flex: 1 1 200px; padding: 1rem; border: var(--card-border); display: flex; align-items: flex-start; gap: 0.75rem; }
.pill-icon { flex-shrink: 0; width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Header */
header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid rgba(31,21,35,0.1); padding: 0.75rem 0; transition: background 0.3s; }
header.scrolled { background: rgba(246,243,247,0.95); }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo-img { height: 32px; width: auto; vertical-align: middle; }
nav ul { display: flex; gap: 1.5rem; list-style: none; }
nav a { color: var(--color-text); font-weight: 500; }
nav a[aria-current="page"] { color: var(--color-brand); pointer-events: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0 1.5rem; height: 52px; font-size: 1rem; font-weight: 600; cursor: pointer; border: none; transition: transform 0.2s, background 0.2s; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); background: #d95aab; }
.btn-secondary { background: transparent; border: 1px solid var(--color-text); color: var(--color-text); }
.btn-secondary:hover { background: rgba(31,21,35,0.05); transform: translateY(-2px); }
.dark-surface .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.dark-surface .btn-secondary:hover { background: rgba(246,243,247,0.1); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Cards & Tables */
.card { background: var(--color-paper); border: var(--card-border); padding: var(--gap); }
.dark-surface .card { background: var(--color-dark); border-color: rgba(246,243,247,0.15); color: var(--color-paper); }
table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap); }
th, td { padding: 0.75rem var(--gap); text-align: left; border-bottom: 1px solid rgba(31,21,35,0.1); }
th { font-weight: 600; }
.dark-surface th, .dark-surface td { border-bottom-color: rgba(246,243,247,0.15); }

/* FAQ */
details { border: var(--card-border); margin-bottom: var(--gap); background: var(--color-paper); }
.dark-surface details { background: rgba(246,243,247,0.05); border-color: rgba(246,243,247,0.15); }
summary { padding: var(--gap); cursor: pointer; font-weight: 600; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: var(--gap); top: 50%; transform: translateY(-50%); transition: transform 0.2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { padding: 0 var(--gap) var(--gap); }

/* SVG Animations */
svg { width: 100%; height: auto; overflow: visible; }
.draw-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.fade-star { opacity: 0.3; }
.float-bubble { transform-box: fill-box; transform-origin: center; }
.breathe-dots { opacity: 0.4; }

@keyframes draw-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-star { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes float-bubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes breathe-dots { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.draw-line { animation: draw-line 6s ease-in-out infinite alternate; }
.fade-star { animation: fade-star 5s ease-in-out infinite alternate; }
.float-bubble { animation: float-bubble 7s ease-in-out infinite alternate; }
.breathe-dots { animation: breathe-dots 3s ease-in-out infinite alternate; }

/* Reduced Motion */
@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; }
  .draw-line, .fade-star, .float-bubble, .breathe-dots { animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; }
}

/* Utility */
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.5rem; text-transform: uppercase; }
.paper-surface .badge { color: var(--color-brand); }
.dark-surface .badge { color: var(--color-accent); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--color-accent); color: var(--color-dark); font-weight: 700; font-size: 0.9rem; margin-right: 0.5rem; }
.dark-surface .step-num { background: var(--color-accent); color: var(--color-dark); }
.feature-panel { background: var(--color-dark); border-radius: var(--radius-card); padding: var(--gap); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; }
.dark-surface .feature-panel { background: rgba(246,243,247,0.08); }
.paper-surface .feature-panel { background: var(--color-paper); border: var(--card-border); }

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  nav ul { display: none; }
  .pills-row { flex-direction: column; }
}
