:root {
  --bg-dark: #19102D;
  --bg-paper: #FCFCFD;
  --text-main: #191523;
  --brand: #5214EB;
  --accent: #D66EED;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 2px solid var(--text-main);
  --card-shadow: 4px 4px 0 var(--text-main);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-main);
  background-color: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* Surface Overrides */
.surface-dark {
  background-color: var(--bg-dark);
  color: var(--bg-paper);
}
.surface-dark .hl { color: var(--accent); }
.surface-dark .sub-label { color: var(--accent); }
.surface-dark a:not(.btn) { color: var(--accent); }
.surface-dark .card {
  background-color: var(--bg-paper);
  color: var(--text-main);
  border-color: var(--text-main);
  box-shadow: var(--card-shadow);
}
.surface-dark .card .hl { color: var(--brand); }
.surface-dark .card .sub-label { color: var(--brand); }
.surface-dark .card a:not(.btn) { color: var(--brand); }

.surface-paper {
  background-color: var(--bg-paper);
  color: var(--text-main);
}
.surface-paper .hl { color: var(--brand); }
.surface-paper .sub-label { color: var(--brand); }

/* Typography */
.sub-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 1.5em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-top: var(--gap);
  margin-bottom: 1em;
  text-wrap: balance;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}
p { margin-bottom: 1em; max-width: 38em; }
strong { font-weight: 700; }

/* Layout Sections */
section {
  padding-block: var(--section-y);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
  align-items: center;
}

/* Components: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  text-align: center;
}
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn-primary {
  background-color: var(--accent);
  color: var(--bg-dark);
  border: 2px solid transparent;
}
.btn-primary:hover {
  transform: translateY(-2px);
  background-color: #c95ae0;
}
.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 2px solid var(--text-main);
}
.surface-dark .btn-secondary {
  color: var(--bg-paper);
  border-color: var(--bg-paper);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  background-color: rgba(0,0,0,0.05);
}
.surface-dark .btn-secondary:hover {
  background-color: rgba(255,255,255,0.1);
}
.btn svg { width: 20px; height: 20px; stroke-width: 2; }

/* Components: Cards */
.card {
  background-color: var(--bg-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  border-radius: var(--radius-card);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}

/* Components: Table */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--text-main);
  text-align: left;
}
th { font-weight: 700; }
td:first-child { font-weight: 600; }

/* Components: Details/FAQ */
details {
  border: var(--card-border);
  margin-bottom: 12px;
  background-color: var(--bg-paper);
}
summary {
  padding: 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 32px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
}
details[open] summary::after { content: "-"; }
details > p { padding: 0 16px 16px; margin-bottom: 0; }

/* Header / Footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg-paper);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 16px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
}
.logo img { height: 32px; width: auto; }
nav ul { display: flex; gap: 24px; }
nav a { font-weight: 500; font-size: 0.95rem; }
nav a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.site-footer {
  padding: 48px 0;
  border-top: 1px solid rgba(0,0,0,0.1);
  margin-top: auto;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--gap);
}
.footer-links a { display: block; margin-bottom: 8px; font-size: 0.9rem; }

/* SVG Animation Base */
.svg-anim { width: 100%; height: auto; }
.star { animation: twinkle 4s infinite alternate ease-in-out; }
.line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 6s infinite alternate ease-in-out; }
.bubble { animation: float 5s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }
.input-dots circle { animation: breathe 2s infinite alternate ease-in-out; }

@keyframes twinkle {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  nav ul { flex-wrap: wrap; gap: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
}
