:root {
  --color-dark: #19102D;
  --color-paper: #FCFCFD;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #D66EED;
  --color-text-on-dark: #FCFCFD;
  --color-accent-on-dark: #D66EED;
  --color-light-paper: #F0EFF4;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --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, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* Typography */
.marker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
}

.section--dark .marker {
  color: var(--color-accent-on-dark);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

.hl {
  color: var(--color-brand);
}

.section--dark .hl {
  color: var(--color-accent-on-dark);
}

/* Layout Sections */
.section {
  padding-block: var(--section-y);
}

.section--dark {
  background: var(--color-dark);
  color: var(--color-text-on-dark);
}

.section--light-paper {
  background: var(--color-light-paper);
}

.section__grid {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 768px) {
  .section__grid--2col {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .section__grid--reverse {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .section__grid--reverse > *:first-child {
    order: 2;
  }
  .section__grid--reverse > *:last-child {
    order: 1;
  }
}

/* Header & Footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.header__brand img {
  width: 32px;
  height: 32px;
}

.header__nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.header__nav a {
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  position: relative;
}

.header__nav a:hover,
.header__nav a[aria-current="page"] {
  color: var(--color-brand);
}

.header__cta {
  margin-left: 1rem;
}

.site-footer {
  background: var(--color-dark);
  color: var(--color-text-on-dark);
  padding: 3rem 0;
  font-size: 0.9rem;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer__links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__links a:hover {
  color: var(--color-accent-on-dark);
}

.footer__copy {
  opacity: 0.7;
  margin-top: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-dark);
}

.btn--secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}

.section--dark .btn--secondary {
  border-color: var(--color-text-on-dark);
  color: var(--color-text-on-dark);
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Cards & Panels */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
}

.section--dark .card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel {
  background: var(--color-dark);
  padding: var(--gap);
  border-radius: var(--radius-card);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--color-brand);
}

.section--dark .timeline {
  border-left-color: var(--color-accent-on-dark);
}

.timeline__item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1rem;
}

.timeline__item::before {
  content: attr(data-step);
  position: absolute;
  left: -2.35rem;
  top: 0;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

th, td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.section--dark th,
.section--dark td {
  border-bottom-color: rgba(255,255,255,0.1);
}

th {
  font-weight: 700;
  background: rgba(0,0,0,0.03);
}

.section--dark th {
  background: rgba(255,255,255,0.05);
}

/* FAQ */
details {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 1rem 0;
}

.section--dark details {
  border-bottom-color: rgba(255,255,255,0.1);
}

summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.2rem;
}

details[open] summary::after {
  content: "-";
}

details p {
  margin-top: 0.75rem;
  opacity: 0.9;
}

/* SVG Animations */
.svg-draw {
  animation: svgDash 5s ease-in-out infinite alternate;
}

.svg-float {
  animation: svgFloat 6s ease-in-out infinite;
}

.svg-pulse {
  animation: svgPulse 4s ease-in-out infinite;
}

.svg-flow {
  animation: svgFlow 8s linear infinite;
}

@keyframes svgDash {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes svgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes svgPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes svgFlow {
  0% { transform: translateX(-10px); }
  50% { transform: translateX(10px); }
  100% { transform: translateX(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Utility */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.gap-md { gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
