: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: 1120px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --text-h1: clamp(2.2rem, 5vw, 3.8rem);
  --text-h2: clamp(1.6rem, 3vw, 2.4rem);
  --text-body: 1rem;
  --line-height-body: 1.65;
}

.surface-paper {
  --bg-surface: var(--color-paper);
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text);
  --label-color: var(--color-brand);
  --highlight-color: var(--color-brand);
  --border-color: rgba(31, 21, 35, 0.16);
}

.surface-dark {
  --bg-surface: var(--color-dark);
  --text-primary: var(--color-paper);
  --text-secondary: var(--color-paper);
  --label-color: var(--color-accent);
  --highlight-color: var(--color-accent);
  --border-color: rgba(246, 243, 247, 0.15);
}

.surface-dark .card-light {
  background: var(--color-paper);
  color: var(--color-text);
  border: 1px solid rgba(31, 21, 35, 0.16);
  --label-color: var(--color-brand);
  --highlight-color: var(--color-brand);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--line-height-body);
  color: var(--text-primary);
  background: var(--bg-surface);
  transition: background 0.3s ease, color 0.3s ease;
}

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); background: var(--bg-surface); }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: 0.02em; font-weight: 700; color: var(--text-primary); }
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); margin-top: calc(var(--section-y) * 0.6); }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }
p { max-width: 38em; margin-bottom: 1rem; }
a { color: var(--label-color); text-decoration: underline; text-underline-offset: 0.2em; }
img, svg { display: block; max-width: 100%; height: auto; }

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label-color);
  margin-bottom: 0.5rem;
}
.hl { color: var(--highlight-color); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 52px; padding: 0 1.5rem;
  font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer; text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: 2px solid var(--label-color); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); border: none; }
.btn-primary:hover { transform: translateY(-1px); background: #d95fb0; }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--text-primary); }
.btn-secondary:hover { transform: translateY(-1px); opacity: 0.85; }

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

.card {
  background: var(--bg-surface);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  border-radius: var(--radius-card);
}
.surface-dark .card { background: rgba(246, 243, 247, 0.05); border-color: var(--border-color); }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
    th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-color); word-break: break-word; overflow-wrap: anywhere; }
th { font-weight: 600; }

details { margin-bottom: 0.75rem; border: var(--card-border); border-radius: var(--radius-card); }
summary { padding: 1rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; }
details[open] summary::after { content: "-"; }
details > div { padding: 0 1rem 1rem; }

header { position: sticky; top: 0; z-index: 100; background: var(--bg-surface); border-bottom: 1px solid var(--border-color); padding: 0.75rem 0; }
nav { display: flex; justify-content: space-between; align-items: center; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--text-primary); text-decoration: none; font-weight: 500; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--label-color); }
footer { padding: 2rem 0; border-top: 1px solid var(--border-color); text-align: center; color: var(--text-secondary); font-size: 0.9rem; }

.svg-icon { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; transform-box: fill-box; transform-origin: center; }

/* SVG Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.anim-float { animation: float 4s ease-in-out infinite; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawLine 3s ease forwards; }
.anim-breathe { animation: breathe 2s ease-in-out infinite; }
.anim-slide { animation: slideIn 1s ease forwards; }
.anim-delay-1 { animation-delay: 0.2s; }
.anim-delay-2 { animation-delay: 0.4s; }
.anim-delay-3 { animation-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .anim-float, .anim-draw, .anim-breathe, .anim-slide { animation: none !important; }
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .hero-layout { flex-direction: column; }
}
