: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: 1280px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height: 1.65;
}

*, *::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: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid rgba(31, 21, 35, 0.08);
  padding: 16px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}
.logo img { height: 32px; width: auto; }
.nav { display: flex; gap: 24px; }
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-brand); }
.nav a[aria-current="page"] { font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 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-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: none;
}
.btn-primary:hover { transform: translateY(-2px); background-color: #d95faa; }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}
.btn-secondary:hover { background: rgba(31, 21, 35, 0.05); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }

section { padding-block: var(--section-y); }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 12px;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--color-text);
  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: 24px;
  color: var(--color-text);
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}
p { margin-bottom: 16px; max-width: 38em; }
.hl { color: var(--color-brand); }

.dark-section { background-color: var(--color-dark); color: var(--color-paper); }
.dark-section .badge { color: var(--color-accent); }
.dark-section h1, .dark-section h2, .dark-section h3, .dark-section p, .dark-section li { color: var(--color-paper); }
.dark-section .hl { color: var(--color-accent); }
.dark-section .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.dark-section .btn-secondary:hover { background: rgba(246, 243, 247, 0.1); }
.dark-section .card { background: rgba(246, 243, 247, 0.05); border-color: rgba(246, 243, 247, 0.15); }
.dark-section .card-light { background: var(--color-paper); color: var(--color-text); border-color: rgba(31, 21, 35, 0.16); }
.dark-section .card-light h3, .dark-section .card-light p, .dark-section .card-light li { color: var(--color-text); }
.dark-section .card-light .hl { color: var(--color-brand); }
.dark-section .card-light .badge { color: var(--color-brand); }

.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(280px, 1fr)); }
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 24px;
  border-radius: var(--radius-card);
}

table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(31, 21, 35, 0.1); }
th { font-weight: 700; color: var(--color-text); }
.dark-section th, .dark-section td { border-bottom-color: rgba(246, 243, 247, 0.1); color: var(--color-paper); }

details { border-bottom: 1px solid rgba(31, 21, 35, 0.1); padding: 16px 0; }
summary { 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 p { margin-top: 12px; font-size: 0.95rem; }

.step-list { counter-reset: step; }
.step-item { position: relative; padding-left: 48px; margin-bottom: 24px; }
.step-item::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-card);
}

.svg-panel { width: 100%; height: auto; max-width: 100%; }
.orbit { fill: none; stroke-width: 1.5; opacity: 0.6; transform-box: fill-box; transform-origin: center; }
.draw-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; transform-box: fill-box; transform-origin: center; }

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes dash {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
.anim-breathe { animation: breathe 6s ease-in-out infinite; }
.anim-float { animation: float 5s ease-in-out infinite; }
.anim-draw { animation: dash 4s 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; }
  .anim-breathe, .anim-float, .anim-draw { animation: none; }
}

@media (max-width: 768px) {
  .nav { gap: 16px; }
  .hero-layout { flex-direction: column-reverse; }
  .step-item { padding-left: 0; text-align: center; }
  .step-item::before { position: static; margin-bottom: 12px; }
}
