:root {
  --color-scheme: light;
  --color-ink: #f7f5ef;
  --color-surface: #ffffff;
  --color-surface-soft: #f0eeeb;
  --color-text: #11100f;
  --color-text-soft: rgba(17, 16, 15, 0.75);
  --color-muted: #5f5b52;
  --color-accent: #0fbaab;
  --border-soft: rgba(15, 15, 14, 0.08);
  --border-strong: rgba(15, 15, 14, 0.15);
  --border-dashed: rgba(15, 15, 14, 0.18);
  --border-accent: rgba(15, 145, 132, 0.35);
  --surface-glass: rgba(255, 255, 255, 0.9);
  --surface-chip: rgba(15, 15, 14, 0.05);
  --surface-pill: rgba(15, 145, 132, 0.12);
  --accent-soft: rgba(15, 145, 132, 0.15);
  --accent-strong: rgba(15, 145, 132, 0.25);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --max-width: 1200px;
  --gutter: 20px;
}

:root {
  color-scheme: var(--color-scheme);
}

:root[data-theme='dark'] {
  --color-scheme: dark;
  --color-ink: #0b0b0a;
  --color-surface: #131312;
  --color-surface-soft: #1b1b1a;
  --color-text: #f6f5f2;
  --color-text-soft: rgba(246, 245, 242, 0.85);
  --color-muted: #b0aea5;
  --color-accent: #6fd3c9;
  --border-soft: rgba(246, 245, 242, 0.08);
  --border-strong: rgba(246, 245, 242, 0.15);
  --border-dashed: rgba(246, 245, 242, 0.16);
  --border-accent: rgba(111, 211, 201, 0.4);
  --surface-glass: rgba(19, 19, 18, 0.92);
  --surface-chip: rgba(246, 245, 242, 0.08);
  --surface-pill: rgba(111, 211, 201, 0.12);
  --accent-soft: rgba(111, 211, 201, 0.15);
  --accent-strong: rgba(111, 211, 201, 0.3);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-scheme: dark;
    --color-ink: #0b0b0a;
    --color-surface: #131312;
    --color-surface-soft: #1b1b1a;
    --color-text: #f6f5f2;
    --color-text-soft: rgba(246, 245, 242, 0.85);
    --color-muted: #b0aea5;
    --color-accent: #6fd3c9;
    --border-soft: rgba(246, 245, 242, 0.08);
    --border-strong: rgba(246, 245, 242, 0.15);
    --border-dashed: rgba(246, 245, 242, 0.16);
    --border-accent: rgba(111, 211, 201, 0.4);
    --surface-glass: rgba(19, 19, 18, 0.92);
    --surface-chip: rgba(246, 245, 242, 0.08);
    --surface-pill: rgba(111, 211, 201, 0.12);
    --accent-soft: rgba(111, 211, 201, 0.15);
    --accent-strong: rgba(111, 211, 201, 0.3);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  background: var(--color-ink);
  color: var(--color-text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-ink);
  color: var(--color-text);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

p {
  line-height: 1.7;
  margin: 0 0 1.4rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--color-text-soft);
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  margin: 0 0 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.6rem); }

ul, ol {
  margin: 0 0 1.4rem 1.4rem;
  padding: 0;
}

.site-header {
  position: sticky;
  top: 0;
  background: var(--surface-glass);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(12px);
  z-index: 20;
}

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand a {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.brand .tagline {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.site-header .shell {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
}

.site-nav a {
  color: var(--color-muted);
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: background 150ms ease, color 150ms ease;
}

.site-nav a.is-active,
.site-nav a:focus,
.site-nav a:hover {
  color: var(--color-text);
  background: var(--surface-pill);
}

.nav-toggle {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

.theme-toggle {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  transition: border-color 150ms ease, transform 150ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  display: inline-flex;
  position: relative;
  width: 22px;
  height: 22px;
}

.theme-toggle-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 150ms ease, transform 150ms ease;
}

.theme-toggle-icon .moon {
  opacity: 0;
}

:root[data-theme='dark'] .theme-toggle-icon .sun {
  opacity: 0.2;
}

:root[data-theme='dark'] .theme-toggle-icon .moon {
  opacity: 1;
}

:root[data-theme='light'] .theme-toggle-icon .sun {
  opacity: 1;
}

:root[data-theme='light'] .theme-toggle-icon .moon {
  opacity: 0;
}

:root:not([data-theme]) .theme-toggle-icon .sun {
  opacity: 1;
}

:root:not([data-theme]) .theme-toggle-icon .moon {
  opacity: 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle-icon .sun {
    opacity: 0.2;
  }

  :root:not([data-theme]) .theme-toggle-icon .moon {
    opacity: 1;
  }
}

.theme-toggle-label {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.cta {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #032b27;
  font-weight: 600;
}

.cta:hover,
.cta:focus {
  background: #56beb3;
}

.site-main {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.hero {
  display: grid;
  gap: 2rem;
  align-items: start;
  padding-bottom: 2.5rem;
}

.hero-shell {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 1fr);
  align-items: stretch;
}

.hero-shell > :not(.cred-strip) {
  width: 100%;
}

.hero .intro {
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-visual {
  background: var(--color-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow-soft);
}

.hero-visual svg {
  width: 100%;
  height: auto;
}

.hero-visual svg text {
  pointer-events: none;
}

.hero-visual svg .glow-orbit {
  transform-origin: 180px 160px;
  animation: orbit-glow 30s linear infinite;
}

.hero-visual svg .word {
  animation: float-word 14s ease-in-out infinite;
  opacity: 0.65;
}

.hero-visual svg .word text {
  fill: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-visual svg .word-1 { animation-duration: 13s; }
.hero-visual svg .word-2 { animation-duration: 16s; animation-delay: -2s; }
.hero-visual svg .word-3 { animation-duration: 18s; animation-delay: -4s; }
.hero-visual svg .word-4 { animation-duration: 17s; animation-delay: -1s; }
.hero-visual svg .word-5 { animation-duration: 19s; animation-delay: -3s; }
.hero-visual svg .word-6 { animation-duration: 15s; animation-delay: -5s; }
.hero-visual svg .word-7 { animation-duration: 21s; animation-delay: -6s; }
.hero-visual svg .word-8 { animation-duration: 20s; animation-delay: -7s; }
.hero-visual svg .word-9 { animation-duration: 18s; animation-delay: -8s; }
.hero-visual svg .word-10 { animation-duration: 22s; animation-delay: -9s; }

@keyframes float-word {
  0% { transform: translate(0, 0); opacity: 0.35; }
  20% { opacity: 1; }
  50% { transform: translate(18px, -20px) scale(1.05); }
  80% { opacity: 1; }
  100% { transform: translate(0, 0); opacity: 0.35; }
}

@keyframes orbit-glow {
  from { transform: rotate(0deg) translateX(0); }
  to { transform: rotate(360deg) translateX(0); }
}

.hero-visual-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
}

.hero-visual-metrics div {
  background: var(--surface-chip);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  display: grid;
  gap: 0.2rem;
}

.hero-visual-metrics strong {
  font-size: 1.1rem;
  color: var(--color-text);
}

.hero-visual-metrics span {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

.cred-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.hero-shell > .cred-strip {
  grid-column: 1 / -1;
}

.cred-strip a {
  color: var(--color-muted);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-chip);
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease;
}

.cred-strip a:hover,
.cred-strip a:focus-visible {
  border-color: var(--border-accent);
  color: var(--color-text);
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: transform 120ms ease, background 150ms ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #032b27;
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-1px);
  background: #56beb3;
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--color-text);
}

.btn-ghost:hover,
.btn-ghost:focus {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.metrics-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-chip {
  background: var(--color-surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--shadow-soft);
}

.metric-value {
  font-weight: 700;
  font-size: 1.2rem;
}

.metric-label {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
}

.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 120ms ease, border 120ms ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-2px);
  border-color: var(--border-accent);
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card p + p {
  margin-top: 0.6rem;
}

.card ul {
  margin-left: 1.2rem;
}

.card-meta {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--color-muted);
}

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-surface-soft);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--color-accent);
}

.callout h3 {
  margin: 0;
}

.callout ul {
  margin: 0;
  padding-left: 1.1rem;
}

.callout-icon {
  color: var(--color-accent);
}

.micro-timeline {
  list-style: none;
  display: grid;
  gap: 1rem;
  padding: 0;
}

.micro-timeline li {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 1rem 1.2rem;
}

.timeline-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.diagram-block {
  background: var(--color-surface);
  border: 1px dashed var(--border-dashed);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: grid;
  gap: 0.75rem;
}

.diagram-block figure {
  margin: 0;
}

.diagram-block figcaption {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--color-ink);
  padding: 2.4rem 0;
}

.site-footer p {
  margin: 0 0 0.8rem;
}

.site-footer .disclosure {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.site-footer .fine-print {
  font-size: 0.75rem;
  color: var(--color-text-soft);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #032b27;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  top: 10px;
}

.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--border-soft);
  margin-top: 3rem;
}

.pillar-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 2rem;
}

.pillar-card {
  background: var(--color-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.approach-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2rem;
}

.approach-grid article {
  background: var(--color-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}

.value-list {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1.5rem 1.2rem;
}

.caption {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.grid-two {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  align-items: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  display: inline-flex;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.social-link:hover,
.social-link:focus-visible {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.social-link .icon {
  display: inline-flex;
  height: 24px;
  width: 24px;
}

.social-link svg {
  fill: currentColor;
  height: 100%;
  width: 100%;
}

.game-card-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.game-icon {
  background: var(--surface-chip);
  border-radius: 16px;
  flex: 0 0 56px;
  height: 56px;
  width: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.game-icon svg {
  height: 40px;
  width: 40px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notice {
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  color: var(--color-accent);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge {
  background: var(--surface-chip);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.table-like {
  display: grid;
  gap: 0.9rem;
}

.table-like div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  align-items: start;
}

.table-like div span:first-child {
  color: var(--color-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

blockquote {
  margin: 0;
  padding: 1.5rem 1.8rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-surface-soft);
  border-radius: var(--radius-lg);
}

blockquote p:last-child {
  margin: 0;
}

@media (max-width: 900px) {
  .site-header .shell {
    grid-template-columns: auto auto;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--color-surface);
    color: var(--color-text);
  }

  .nav-toggle[aria-expanded="true"] {
    background: var(--surface-pill);
    border-color: var(--border-accent);
  }

  .nav-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: 2;
  }

  .cred-strip {
    justify-content: flex-start;
  }

  .hero {
    gap: 1.5rem;
  }
}

@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;
  }
}
