:root {
  --color-dark: #240F29;
  --color-paper: #F6F3F7;
  --color-text: #201523;
  --color-brand: #A711CF;
  --color-accent: #ED6E73;
  --color-dark-text: var(--color-paper);
  --color-dark-accent: var(--color-accent);
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-y) var(--gap);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 0;
  margin-bottom: var(--gap);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p, li { margin-bottom: var(--gap); }
a { color: var(--color-brand); text-decoration: none; transition: color 0.2s ease; }
.dark-surface a { color: var(--color-dark-accent); }
.light-card a { color: var(--color-brand); }
a:hover { opacity: 0.85; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.hl { color: var(--color-brand); }
.dark-surface .hl { color: var(--color-dark-accent); }
.light-card .hl { color: var(--color-brand); }

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: var(--gap);
}
.paper-theme .section-label { color: var(--color-brand); }
.dark-surface .section-label { color: var(--color-dark-accent); }
.light-card .section-label { color: var(--color-brand); }

/* Layout Sections */
.section {
  position: relative;
  padding-bottom: var(--section-y);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.dark-section {
  background-color: var(--color-dark);
  color: var(--color-dark-text);
  border-bottom: none;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.dark-section .section { border-bottom: none; }
.light-card {
  background-color: var(--color-paper);
  color: var(--color-text);
  padding: var(--gap);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border-radius: var(--radius-btn);
}
.btn-primary:hover { transform: translateY(-1px); background-color: #d85c61; }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: currentColor;
  border-radius: var(--radius-btn);
}
.dark-surface .btn-secondary { color: var(--color-dark-text); }
.light-card .btn-secondary { color: var(--color-text); }
.btn-secondary:hover { background: rgba(0,0,0,0.05); }
.dark-surface .btn-secondary:hover { background: rgba(255,255,255,0.08); }
.btn-icon { width: 20px; height: 20px; }

/* Cards & Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}
.card {
  background: rgba(0,0,0,0.03);
  padding: var(--gap);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}
.dark-section .card { background: rgba(255,255,255,0.06); }
.light-card .card { background: rgba(0,0,0,0.02); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
th { font-weight: 700; }
.dark-section th, .dark-section td { border-bottom-color: rgba(255,255,255,0.1); }
.light-card th, .light-card td { border-bottom-color: rgba(0,0,0,0.1); }

/* FAQ */
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 16px 0;
}
.dark-section .faq-item { border-bottom-color: rgba(255,255,255,0.1); }
.light-card .faq-item { border-bottom-color: rgba(0,0,0,0.1); }
details summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: var(--gap); color: inherit; opacity: 0.9; }

/* Header & Footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--color-text); }
.nav-links a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.footer {
  background: var(--color-dark);
  color: var(--color-dark-text);
  padding: 48px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}
.footer-col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; color: var(--color-dark-accent); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--color-dark-text); font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-dark-accent); }

/* SVG Base */
.svg-container { width: 100%; height: auto; max-width: 100%; display: block; }
.svg-container svg { width: 100%; height: auto; display: block; }
.svg-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.svg-el { transform-box: fill-box; transform-origin: center; }

/* Animations */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.08); opacity: 0.8; }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes float-up {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(-6px); opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

.anim-breathe { animation: breathe 6s ease-in-out infinite; }
.anim-breathe-fast { animation: breathe 4s ease-in-out infinite; }
.anim-draw { animation: draw-line 8s linear infinite; }
.anim-float { animation: float-up 5s ease-in-out infinite; }
.anim-pulse { animation: pulse-dot 3s ease-in-out infinite; }

@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;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 12px; }
  .nav-links { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .hero-layout { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
  .timeline-steps { padding-left: 0; }
}
