:root {
  --color-dark: #231334;
  --color-paper: #F5F3F7;
  --color-body: #1C1523;
  --color-brand: #7D14EB;
  --color-accent: #EDD26E;
  --color-dark-surface: #2A1B3D;
  --color-paper-alt: #EBE8EF;

  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: none;

  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;

  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  --lh-body: 1.75;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-body);
  line-height: var(--lh-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

section {
  padding-block: var(--section-y);
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

.overline {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  display: block;
}

.paper .overline { color: var(--color-brand); }
.dark .overline { color: var(--color-accent); }

.hl {
  font-weight: 600;
}

.paper .hl { color: var(--color-brand); }
.dark .hl { color: var(--color-accent); }

/* Layout Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: center;
}

.hero-layout {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: center;
}

.hero-text {
  flex: 1 1 480px;
}

.hero-visual {
  flex: 1 1 480px;
  min-width: 0;
}

.scenario-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: stretch;
}

.scenario-context {
  flex: 1 1 400px;
}

.scenario-action {
  flex: 1 1 400px;
}

/* Components */
.card {
  background: var(--color-paper-alt);
  border-radius: var(--radius-card);
  padding: var(--gap);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}

.dark .card {
  background: var(--color-dark-surface);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(0.95);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-body);
  color: var(--color-body);
}

.dark .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.btn:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

.dark .btn:focus-visible {
  outline-color: var(--color-accent);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(28, 21, 35, 0.1);
}

th {
  font-weight: 600;
  color: var(--color-brand);
}

.dark th {
  color: var(--color-accent);
}

td:first-child {
  font-weight: 500;
}

/* FAQ */
details {
  margin-bottom: 1rem;
  border-radius: var(--radius-card);
  background: var(--color-paper-alt);
  padding: 1rem 1.25rem;
  border: var(--card-border);
}

summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.4;
}

summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }

summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6em;
  height: 0.6em;
  border-right: 2px solid var(--color-brand);
  border-bottom: 2px solid var(--color-brand);
  transform: rotate(45deg);
}

details[open] summary::before {
  border-color: var(--color-body);
}

.dark details[open] summary::before {
  border-color: var(--color-paper);
}

details p {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* News Cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

.news-card {
  background: var(--color-paper-alt);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-date {
  font-size: 0.8rem;
  color: var(--color-body);
  opacity: 0.7;
}

.news-title {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
}

.news-excerpt {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--color-body);
  opacity: 0.85;
}

/* Header & Footer */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid rgba(28, 21, 35, 0.08);
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  height: 32px;
  width: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--color-brand);
}

nav a[aria-current="page"] {
  color: var(--color-brand);
  font-weight: 700;
}

footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: var(--section-y) 0;
  margin-top: var(--section-y);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}

.footer-col h4 {
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--color-paper);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 243, 247, 0.1);
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}

/* SVG Panels & Visuals */
.svg-panel {
  background: var(--color-dark);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
  overflow: hidden;
}

.dark .svg-panel {
  background: var(--color-dark-surface);
}

.svg-responsive {
  width: 100%;
  height: auto;
  display: block;
}

/* SVG Animations */
.svg-transform {
  transform-box: fill-box;
  transform-origin: center;
}

.flow-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-flow 6s ease-in-out infinite;
}

.float-el {
  animation: float 7s ease-in-out infinite;
}

.breathe-el {
  animation: breathe 4s ease-in-out infinite;
}

.slide-el {
  animation: slide-up 8s ease-in-out infinite;
}

@keyframes draw-flow {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes slide-up {
  0%, 100% { transform: translateY(10px); opacity: 0.7; }
  50% { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .flow-line, .float-el, .breathe-el, .slide-el {
    animation: none !important;
  }
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .hero-layout, .scenario-row {
    flex-direction: column;
  }
  .hero-visual, .scenario-action {
    width: 100%;
  }
  nav { gap: 1rem; }
  .btn { width: 100%; justify-content: center; }
}
