:root {
  --accent: #b794f6;
  --accent-alt: #f687b3;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-alt));
  --gradient-horizontal: linear-gradient(90deg, var(--accent), var(--accent-alt));
  --text: #e2e8f0;
  --muted: #94a3b8;
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --max-width: 960px;
}

[data-theme="light"] {
  --accent: #7c3aed;
  --accent-alt: #db2777;
  --text: #1e293b;
  --muted: #64748b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 8px 32px rgba(15, 23, 42, 0.1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a:hover {
  text-decoration: underline;
}

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

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  gap: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

.site-logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.theme-toggle,
.nav-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover,
.nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

:root .theme-toggle .icon-sun {
  display: inline;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: inline;
}

.nav-toggle {
  display: none;
  font-size: 1.25rem;
}

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: none;
}

.nav-cta {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: white !important;
  background: var(--gradient);
  border-radius: 999px;
  text-decoration: none !important;
}

.nav-cta:hover {
  opacity: 0.92;
  color: white !important;
  text-decoration: none !important;
}

@media (max-width: 768px) {
  .site-header .container {
    position: relative;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
  }

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

  .site-nav ul {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}

/* Hero */

.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .subtitle {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.hero .tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 42ch;
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  color: white;
  background: var(--gradient);
}

.btn-primary:hover {
  color: white;
  opacity: 0.92;
}

.btn-secondary {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Sections */

.section {
  padding: 2.5rem 0;
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.section-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 0.5rem;
  border-radius: 2px;
  background: var(--gradient-horizontal);
}

.section-intro {
  margin: -0.5rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 60ch;
}

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.content-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.content-card p {
  margin: 0;
  color: var(--muted);
}

.content-card .card-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: white;
  background: var(--gradient);
  border-radius: 999px;
}

.content-prose {
  max-width: 65ch;
}

.content-prose p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.content-prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.content-prose h2:first-of-type {
  margin-top: 0;
}

/* Link cards */

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 480px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.link-card .icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--gradient);
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
}

.link-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.link-card p {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Setups */

.setup-grid {
  display: grid;
  gap: 1rem;
}

.setup-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.setup-card .setup-role {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.setup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.setup-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: white;
  background: var(--gradient);
  border-radius: 999px;
}

.setup-badge--status {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}

.setup-badge--active {
  background: color-mix(in srgb, var(--accent) 25%, var(--surface));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
}

.setup-badge--retired {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  opacity: 0.85;
}

.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.spec-list li {
  display: grid;
  grid-template-columns: minmax(5rem, 8rem) 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.spec-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.spec-label {
  font-weight: 600;
  color: var(--muted);
}

.spec-value {
  color: var(--text);
}

.setups-status {
  color: var(--muted);
  font-size: 0.9375rem;
}

.setups-status--error {
  color: var(--accent-alt);
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent-alt);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Footer */

.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}
