*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-body);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --color-dark: #271231;
  --color-paper: #F6F3F7;
  --color-body: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;
  --color-border: rgba(31, 21, 35, 0.16);
  --radius-card: 0;
  --radius-btn: 0;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
}

/* Surface Contexts */
.bg-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark p, .bg-dark li, .bg-dark span, .bg-dark a {
  color: var(--color-paper);
}
.bg-dark .hl { color: var(--color-accent); }
.bg-dark .brand-link { color: var(--color-accent); }
.bg-dark .eyebrow { color: var(--color-accent); }
.bg-dark table th, .bg-dark table td { border-bottom-color: rgba(246, 243, 247, 0.16); }
.bg-dark details { border-bottom-color: rgba(246, 243, 247, 0.16); }

.paper-surface {
  background-color: var(--color-paper);
  color: var(--color-body);
}
.paper-surface h1, .paper-surface h2, .paper-surface h3, .paper-surface p, .paper-surface li, .paper-surface span, .paper-surface a {
  color: var(--color-body);
}
.paper-surface .hl { color: var(--color-brand); }
.paper-surface .brand-link { color: var(--color-brand); }
.paper-surface .eyebrow { color: var(--color-brand); }
.paper-surface table th, .paper-surface table td { border-bottom-color: var(--color-border); }
.paper-surface details { border-bottom-color: var(--color-border); }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

/* Typography */
h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

p, ul, ol {
  margin-bottom: 1rem;
  max-width: 38em;
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.hl {
  font-weight: 600;
}

/* Layout */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-body);
  color: var(--color-body);
}

.bg-dark .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 600;
}

details {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

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::marker { display: none; content: ""; }

summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
}

details[open] summary::after {
  content: "-";
}

details p {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.step-list {
  counter-reset: step;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}

.step-item {
  position: relative;
  padding-left: 48px;
}

.step-item::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
}

.news-card {
  border: 1px solid var(--color-border);
  padding: 24px;
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
}

.news-date {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.card-light {
  background-color: var(--color-paper);
  border: 1px solid var(--color-border);
  padding: 24px;
  border-radius: var(--radius-card);
}

/* Header & Footer */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.bg-dark header {
  background-color: var(--color-dark);
  border-bottom-color: rgba(246, 243, 247, 0.1);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 32px;
  width: auto;
  vertical-align: middle;
}

.logo span {
  margin-left: 8px;
  font-weight: 700;
  font-size: 1.1rem;
}

nav a {
  margin-left: 24px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

nav a:hover {
  text-decoration: underline;
}

footer {
  padding: 48px 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--section-y);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}

.footer-grid a {
  display: block;
  margin-bottom: 0.5rem;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-grid a:hover {
  text-decoration: underline;
}

/* SVG Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.anim-float-1 { animation: float 4s ease-in-out infinite; }
.anim-float-2 { animation: float 5s ease-in-out infinite 0.5s; }
.anim-float-3 { animation: float 4.5s ease-in-out infinite 1s; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; animation: drawLine 3s ease forwards; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }

.hero-svg-container {
  width: 100%;
  height: auto;
  max-width: 520px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .anim-float-1, .anim-float-2, .anim-float-3, .anim-draw, .anim-breathe {
    animation: none !important;
  }
}
