:root {
  --color-dark: #240F29;
  --color-paper: #F6F3F7;
  --color-text: #201523;
  --color-brand: #A711CF;
  --color-accent: #ED6E73;
  --color-white: #FFFFFF;
  
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  
  --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-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

/* Layout Utilities */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.flex-col { display: flex; flex-direction: column; gap: var(--gap); }

/* Typography */
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.15; letter-spacing: 0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25; margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: var(--gap); }
p { max-width: 38em; margin-bottom: 1em; }
.supertitle { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.5em; }
.hl { font-weight: 800; }

/* Color Themes */
.dark-surface { background-color: var(--color-dark); color: var(--color-paper); }
.dark-surface .hl { color: var(--color-accent); }
.dark-surface .supertitle { color: var(--color-accent); }
.paper-surface { background-color: var(--color-paper); color: var(--color-text); }
.paper-surface .hl { color: var(--color-brand); }
.paper-surface .supertitle { color: var(--color-brand); }

.card-light {
  background-color: var(--color-paper);
  color: var(--color-text);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
}
.card-light .hl { color: var(--color-brand); }
.card-light .supertitle { color: var(--color-brand); }

/* Components */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0 1.5em; height: 52px;
  font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
  border: none; border-radius: var(--radius-btn);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn-primary { background-color: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background-color: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.btn:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }

table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap); }
th, td { padding: 0.75em 1em; border-bottom: 1px solid var(--color-text); text-align: left; }
th { font-weight: 700; }
td:first-child { font-weight: 600; white-space: nowrap; }

details { border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--radius-card); margin-bottom: var(--gap); }
summary { padding: 1em; font-weight: 600; cursor: pointer; list-style: none; position: relative; padding-left: 1.5em; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; position: absolute; left: 1em; top: 1em; font-weight: 700; }
details[open] summary::before { content: "-"; }
details p { padding: 0 1em 1em; margin: 0; }

/* Header & Footer */
header { position: sticky; top: 0; z-index: 100; background-color: var(--color-paper); border-bottom: 1px solid var(--color-text); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 64px; }
nav { display: flex; align-items: center; gap: 1.5em; }
nav a { text-decoration: none; color: var(--color-text); font-weight: 500; transition: color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); text-decoration: underline; }
footer { padding: var(--section-y) 0; border-top: 1px solid var(--color-text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5em; margin-top: 1em; }
.footer-links a { color: var(--color-text); text-decoration: none; }
.footer-links a:hover { color: var(--color-brand); text-decoration: underline; }

/* SVG Base */
.svg-panel { width: 100%; height: auto; display: block; }
.svg-panel svg { width: 100%; height: auto; display: block; }
.svg-panel path, .svg-panel line, .svg-panel circle, .svg-panel rect { stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* SVG Animations */
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-path 6s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.anim-float { animation: float-ui 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-pulse { animation: pulse-dots 4s ease-in-out infinite; }
.anim-slide { animation: slide-panel 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes draw-path { 0%, 100% { stroke-dashoffset: 1; } 50% { stroke-dashoffset: 0; } }
@keyframes float-ui { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse-dots { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes slide-panel { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-layout { flex-direction: column; }
  .feature-row { flex-direction: column; }
  .scenario-split { grid-template-columns: 1fr; }
  nav { gap: 1em; }
}
