:root {
  --color-dark: #271231;
  --color-paper: #F5F0E5;
  --color-text: #1F1523;
  --color-brand: #9B12D8;
  --color-accent: #ED6EC0;
  --color-border: #d0c8be;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(31, 21, 35, 0.3);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.surface-dark {
  --bg: var(--color-dark);
  --text: var(--color-paper);
  --accent: var(--color-accent);
  --brand: var(--color-accent);
  --border: rgba(245, 240, 229, 0.15);
}

.surface-paper {
  --bg: var(--color-paper);
  --text: var(--color-text);
  --accent: var(--color-accent);
  --brand: var(--color-brand);
  --border: var(--color-border);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 1.1rem;
}

.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.2s;
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  height: 48px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-btn);
  transition: transform 0.2s, filter 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--color-dark);
}

.btn-primary:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.surface-dark .btn-secondary {
  border-color: var(--text);
  color: var(--text);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Cards & Grid */
.card {
  background: var(--bg);
  border: var(--card-border) solid var(--border);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin-bottom: var(--gap);
  border-radius: var(--radius-card);
}

.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));
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  text-align: left;
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

summary {
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}

details[open] summary::after {
  content: "-";
}

details[open] summary + * {
  padding-bottom: 1rem;
  line-height: 1.7;
}

/* SVG Animations */
.svg-anim {
  width: 100%;
  height: auto;
  max-width: 600px;
  margin: 0 auto;
  display: block;
}

.svg-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@keyframes draw-loop {
  0% { stroke-dashoffset: 1; }
  40% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

.draw {
  animation: draw-loop 5s ease-in-out infinite;
}

@keyframes orbit-pulse {
  0%, 100% { opacity: 0.2; transform: scale(0.96); }
  50% { opacity: 0.7; transform: scale(1.04); }
}

.orbit {
  animation: orbit-pulse 6s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes float-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float {
  animation: float-drift 5s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.hl { color: var(--brand); }
.surface-dark .hl { color: var(--accent); }
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--brand);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.surface-dark .section-label { color: var(--accent); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.news-card article {
  padding: 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg);
  margin-bottom: var(--gap);
}
.news-card time {
  font-size: 0.85rem;
  color: var(--brand);
  display: block;
  margin-bottom: 0.5rem;
}
.surface-dark .news-card time { color: var(--accent); }
