@import "./styles/tokens.css";

body {
  color: var(--ink-700);
  background:
    radial-gradient(60rem 40rem at -10% -6%, var(--bg-glow-1) 0%, transparent 65%),
    radial-gradient(48rem 30rem at 108% 8%, var(--bg-glow-2) 0%, transparent 68%),
    radial-gradient(40rem 26rem at 88% 78%, var(--bg-glow-3) 0%, transparent 70%),
    radial-gradient(36rem 24rem at 10% 96%, var(--bg-glow-4) 0%, transparent 72%),
    linear-gradient(180deg, var(--bg-base-0) 0%, var(--bg-base-1) 55%, var(--bg-base-2) 100%);
  background-attachment: fixed;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.homepage-main {
  position: relative;
  isolation: isolate;
}

.homepage-main::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 68rem;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--bg-grid-dot) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 52%, rgba(0, 0, 0, 0.55) 74%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, rgba(0, 0, 0, 0.55) 74%, transparent 100%);
}

.site-nav {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-border);
}

.navbar-brand {
  color: var(--ink-900);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--ink-900);
}

/* Theme-aware logomark — a single empty <span> with a CSS background.
   The --logomark-src token differs per theme (defined in tokens.css), so
   one element renders correctly in both modes without JS-driven src
   swaps or duplicate DOM nodes. */
.navbar-logomark,
.hero-logomark,
.theme-logomark {
  display: inline-block;
  flex-shrink: 0;
  background-image: var(--logomark-src);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.navbar-logomark {
  width: 28px;
  height: 28px;
}

.hero-logomark {
  width: 80px;
  height: 80px;
}

.navbar-brand-text {
  display: inline-block;
}

.navbar-brand-sql,
.wordmark-sql {
  color: var(--cell-audio);
}

.nav-link {
  color: var(--ink-600);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-600);
}

.nav-explore-menu {
  border: 1px solid var(--surface-border-strong);
  border-radius: 0.8rem;
  box-shadow: var(--shadow-hover);
  padding: 0.45rem;
  background: var(--surface-0);
}

.nav-explore-menu .dropdown-header {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-600);
}

.nav-explore-menu .dropdown-item {
  border-radius: 0.5rem;
  font-size: 0.92rem;
  padding: 0.45rem 0.65rem;
  color: var(--ink-700);
}

.nav-explore-menu .dropdown-item:active,
.nav-explore-menu .dropdown-item:hover,
.nav-explore-menu .dropdown-item:focus {
  background: var(--brand-100);
  color: var(--brand-700);
}

/* Theme toggle button — sits on the navbar in every page. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--surface-border);
  background: var(--surface-0);
  color: var(--ink-700);
  border-radius: 9999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--brand-100);
  border-color: var(--brand-200);
  color: var(--brand-700);
  outline: none;
}

.theme-toggle .theme-toggle-icon {
  font-size: 0.95rem;
}

.theme-toggle .theme-toggle-label {
  display: none;
}

@media (min-width: 992px) {
  .theme-toggle .theme-toggle-label {
    display: inline;
  }
}

.hero {
  background: var(--surface-0);
  color: var(--ink-900);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(28rem 18rem at 100% 0%, var(--bg-glow-2), transparent 70%),
    radial-gradient(24rem 16rem at 0% 100%, var(--bg-glow-3), transparent 72%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.hero-logomark {
  width: 80px;
  height: 80px;
  display: block;
  flex-shrink: 0;
}

.hero-wordmark-text {
  font-family: Inter, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}

/* Wordmark coloring — "samt" in ink, "SQL" in the audio/amber accent so
   it visually pairs with the AI star in the logomark. */
.hero-wordmark-text .wordmark-sql {
  color: var(--cell-audio);
}

.hero-subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-600);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--ink-900);
}

.hero .lead {
  color: var(--ink-700);
}

.hero-highlights {
  background: var(--surface-50);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.hero-highlights .text-primary {
  color: var(--cell-text) !important;
}

.hero-example {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-example-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-example-eyebrow {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-100);
  border: 1px solid var(--brand-200);
  border-radius: 9999px;
  padding: 0.22rem 0.6rem;
}

.hero-example-title {
  font-size: 0.95rem;
  color: var(--ink-700);
  font-weight: 500;
}

.hero-example-title em {
  color: var(--cell-image);
  font-style: normal;
  font-weight: 600;
}

.hero-table {
  background: var(--surface-0);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-table-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--surface-50);
  border-bottom: 1px solid var(--surface-border);
  font-size: 0.72rem;
}

.hero-table-name {
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: 0.02em;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

.hero-table-hint {
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.hero-table-row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) 2.5rem 1.5rem minmax(0, 1fr) 3.5rem;
  gap: 0.4rem;
  align-items: center;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  color: var(--ink-700);
  border-bottom: 1px solid var(--surface-200);
}

.hero-table-row:last-child {
  border-bottom: 0;
}

.hero-table-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-table-row .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hero-table-row .photo {
  overflow: visible;
  text-align: center;
}

.hero-table-row .photo img {
  width: 3.25rem;
  height: 2.2rem;
  object-fit: cover;
  border-radius: 0.3rem;
  border: 1px solid var(--surface-border);
  display: block;
}

.hero-table-head {
  background: var(--surface-0);
  color: var(--ink-900);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--surface-border);
}

.hero-table-match {
  background: var(--status-ok-bg);
  position: relative;
}

.hero-table-match::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cell-table);
}

.hero-code {
  font-size: 0.82rem;
  padding: 0.85rem 1rem;
  margin: 0;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
}

.hero-code code {
  font-size: 0.82rem;
  white-space: inherit;
}

.hero-result {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.7rem 0.95rem;
  background: var(--status-ok-bg);
  border: 1px solid var(--status-ok-border);
  border-radius: var(--radius-md);
}

.hero-result-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--status-table-fg);
}

.hero-result-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.hero-result-note {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--ink-500);
}

.section-title {
  color: var(--ink-900);
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 0.85rem;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  bottom: 0.25em;
  width: 4px;
  border-radius: 3px;
  background: var(--cell-text);
}

section:nth-of-type(2n) .section-title::before { background: var(--cell-image); }
section:nth-of-type(3n) .section-title::before { background: var(--cell-audio); }
section:nth-of-type(4n) .section-title::before { background: var(--cell-table); }
section:nth-of-type(5n) .section-title::before { background: var(--cell-video); }
section:nth-of-type(6n) .section-title::before { background: var(--cell-meta); }

.section-lead {
  color: var(--ink-600);
  max-width: 50rem;
}

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-100);
  border: 1px solid var(--brand-200);
  border-radius: 9999px;
  padding: 0.32rem 0.7rem;
}

.pill.pill-image { color: var(--status-image-fg); background: var(--status-image-bg); border-color: var(--status-image-border); }
.pill.pill-audio { color: var(--status-warn-fg); background: var(--status-warn-bg); border-color: var(--status-warn-border); }
.pill.pill-table { color: var(--status-table-fg); background: var(--status-ok-bg); border-color: var(--status-ok-border); }
.pill.pill-video { color: var(--status-danger-fg); background: var(--status-danger-bg); border-color: var(--status-danger-border); }
.pill.pill-meta  { color: var(--status-meta-fg); background: var(--status-meta-bg); border-color: var(--status-meta-border); }

.feature-card,
.capability-card,
.use-case-card,
.legal-card,
.contact-card,
.pricing-card,
.stat-card,
.step-card {
  background: var(--surface-0);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--ink-700);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover,
.capability-card:hover,
.use-case-card:hover,
.pricing-card:hover,
.step-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-hover);
}

.capability-card {
  position: relative;
  overflow: hidden;
}

.capability-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--cell-text);
  opacity: 0.85;
}

.capability-card:nth-of-type(6n + 2)::before { background: var(--cell-image); }
.capability-card:nth-of-type(6n + 3)::before { background: var(--cell-audio); }
.capability-card:nth-of-type(6n + 4)::before { background: var(--cell-table); }
.capability-card:nth-of-type(6n + 5)::before { background: var(--cell-video); }
.capability-card:nth-of-type(6n)::before { background: var(--cell-meta); }

.capability-card:nth-of-type(6n + 2) .capability-icon {
  color: var(--cell-image);
  background: var(--status-image-bg);
  border-color: var(--status-image-border);
}

.capability-card:nth-of-type(6n + 3) .capability-icon {
  color: var(--cell-audio);
  background: var(--status-warn-bg);
  border-color: var(--status-warn-border);
}

.capability-card:nth-of-type(6n + 4) .capability-icon {
  color: var(--status-table-fg);
  background: var(--status-ok-bg);
  border-color: var(--status-ok-border);
}

.capability-card:nth-of-type(6n + 5) .capability-icon {
  color: var(--cell-video);
  background: var(--status-danger-bg);
  border-color: var(--status-danger-border);
}

.capability-card:nth-of-type(6n) .capability-icon {
  color: var(--cell-meta);
  background: var(--status-meta-bg);
  border-color: var(--status-meta-border);
}

.muted-section {
  background: linear-gradient(180deg, var(--surface-50), var(--surface-100));
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
}

.pricing-card.popular {
  border: 2px solid var(--brand-500);
  box-shadow: var(--shadow-glow);
}

.price {
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--ink-900);
}

.btn-primary {
  background-color: var(--brand-500);
  border-color: var(--brand-500);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: #ffffff;
}

.btn-outline-primary {
  border-color: var(--brand-200);
  color: var(--brand-600);
  background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--brand-500);
  border-color: var(--brand-500);
  color: #ffffff;
}

.code-block {
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--code-border);
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 0.88rem;
  overflow-x: auto;
}

.code-block code {
  font-size: 0.88rem;
}

.capability-card .capability-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cell-text);
  background: var(--brand-100);
  border: 1px solid var(--brand-200);
  font-size: 1.1rem;
}

.usecase-tabs {
  gap: 0.5rem;
}

.usecase-tabs .nav-link {
  border: 1px solid var(--surface-border-strong);
  color: var(--ink-700);
  background: var(--surface-0);
  border-radius: 9999px;
  padding: 0.5rem 0.9rem;
  white-space: nowrap;
}

.usecase-tabs .nav-link.active {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #ffffff;
}

.stat-card {
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cell-text);
}

.stat-card:nth-of-type(3n + 2)::before { background: var(--cell-image); }
.stat-card:nth-of-type(3n)::before { background: var(--cell-table); }

.stat-value {
  color: var(--ink-900);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.1;
}

.footer {
  border-top: 1px solid var(--surface-border);
  background: var(--surface-0);
}

.footer a {
  color: var(--ink-600);
}

.footer a:hover {
  color: var(--brand-600);
}

.matrix-table {
  border-radius: 0.9rem;
  overflow: hidden;
}

.matrix-table th {
  background: var(--brand-50);
  color: var(--ink-900);
  font-weight: 600;
}

.matrix-table td,
.matrix-table th {
  vertical-align: middle;
}

.matrix-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-100);
  color: var(--brand-600);
  border: 1px solid var(--brand-200);
  margin-right: 0.4rem;
}

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

@media (min-width: 1100px) {
  .docs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.docs-card {
  background: var(--surface-0);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
}

.docs-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--cell-text);
  opacity: 0.9;
}

.docs-card:nth-of-type(6n + 2)::before { background: var(--cell-image); }
.docs-card:nth-of-type(6n + 3)::before { background: var(--cell-audio); }
.docs-card:nth-of-type(6n + 4)::before { background: var(--cell-table); }
.docs-card:nth-of-type(6n + 5)::before { background: var(--cell-video); }
.docs-card:nth-of-type(6n)::before { background: var(--cell-meta); }

.docs-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
  color: var(--ink-900);
}

.docs-card p {
  margin-bottom: 0;
  color: var(--ink-600);
  font-size: 0.95rem;
}

.tutorial-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.tutorial-track-tabs {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.25rem;
  background: var(--surface-tint);
  border: 1px solid var(--surface-border-strong);
  border-radius: 9999px;
}

.tutorial-track-tab {
  border: 0;
  border-radius: 9999px;
  padding: 0.45rem 0.95rem;
  background: transparent;
  color: var(--ink-700);
  font-weight: 600;
  font-size: 0.92rem;
}

.tutorial-track-tab.active {
  background: var(--brand-500);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.tutorial-track-tab:focus-visible {
  outline: 2px solid var(--brand-200);
  outline-offset: 2px;
}

.tutorial-track {
  margin-top: 1rem;
}

.docs-screenshot {
  display: block;
  width: 100%;
  max-width: 800px;
  margin-top: 1rem;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border-strong);
  box-shadow: var(--shadow-soft);
}

.tutorial-shot {
  display: block;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0.8rem;
  border: 1px solid var(--surface-border-strong);
  box-shadow: var(--shadow-soft);
}

.tutorial-panel {
  background: var(--surface-0);
  border: 1px solid var(--surface-border-strong);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--ink-700);
}

.tutorial-panel h3 {
  font-size: 1.05rem;
  color: var(--ink-900);
}

.small-note {
  font-size: 0.9rem;
  color: var(--ink-600);
}

@media (max-width: 992px) {
  .tutorial-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 1.75rem;
  }

  .hero-table-row {
    grid-template-columns: 1.25rem minmax(0, 1fr) 2.25rem 1.25rem minmax(0, 1fr) 3rem;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
  }

  .hero-table-row .photo img {
    width: 2.75rem;
    height: 1.85rem;
  }

  .hero-result-note {
    display: none;
  }
}

.docs-nav .nav-link {
  font-size: 0.95rem;
}

@media (max-width: 991px) {
  .docs-nav .navbar-nav {
    padding-top: 0.5rem;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.capability-card,
.pricing-card,
.step-card,
.docs-card,
.tutorial-panel {
  animation: riseIn 420ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  .capability-card,
  .pricing-card,
  .step-card,
  .docs-card,
  .tutorial-panel {
    animation: none;
  }
}

/* Bootstrap + dark-mode polish — keep components consistent with our
   token system rather than relying on Bootstrap's built-in dark map. */
[data-theme="dark"] .text-muted {
  color: var(--ink-400) !important;
}

/* Bootstrap's .text-dark utility is not theme-aware (resolves to a near-black
   token that becomes unreadable on dark surfaces). Force it to our highest-
   contrast ink color in dark mode. */
[data-theme="dark"] .text-dark {
  color: var(--ink-900) !important;
}

[data-theme="dark"] .navbar-toggler {
  border-color: var(--surface-border-strong);
}

[data-theme="dark"] .navbar-toggler-icon {
  filter: invert(1) brightness(1.4);
}

[data-theme="dark"] .badge.text-bg-primary {
  background-color: var(--brand-500) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .text-primary {
  color: var(--brand-500) !important;
}

/* Dark mode: surface containers adopt the near-black card color so the
   header, marketing pill labels, and the contact-page CTA strip read as
   consistent "wells" alongside the feature cards. Light mode keeps the
   original frosted-glass / soft-gradient treatments. */
[data-theme="dark"] .site-nav,
[data-theme="dark"] .muted-section {
  background: var(--surface-0);
}

/* Dark mode: tonal accent language for small labels, icon tiles, and
   outline buttons. Each colored element pairs a faint tonal fill with a
   bright same-hue border and a high-contrast (near-white or bright hue)
   glyph/text. This avoids the "saturated colored bg + same-hue text"
   pattern that read as muted gray. */

/* Eyebrow / section pills — tonal sky-blue fill, bright border, near-white text. */
[data-theme="dark"] .pill,
[data-theme="dark"] .hero-example-eyebrow {
  background: rgba(96, 165, 250, 0.12);
  border-color: var(--brand-500);
  color: var(--ink-900);
}

/* Default capability icon tile (the "Tables" card) — bright sky-blue glyph
   on a tonal blue tile, parallel to how the violet/amber/green capability
   icons already work via the status-* tokens. */
[data-theme="dark"] .capability-card .capability-icon {
  color: var(--brand-500);
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.45);
}

/* Outline primary buttons — brighten border and text so they read as
   crisp interactive affordances on near-black surfaces. The hover state
   still uses the solid brand-500 fill from the base rule; we explicitly
   restore the white text below (the base :hover rule and this dark-mode
   override otherwise have equal specificity, so source order would clobber
   the white text and make the label vanish into the bg on hover). */
[data-theme="dark"] .btn-outline-primary {
  border-color: var(--brand-500);
  color: var(--brand-500);
}

[data-theme="dark"] .btn-outline-primary:hover,
[data-theme="dark"] .btn-outline-primary:focus {
  color: #ffffff;
}

/* Solid primary CTAs: default hover uses --brand-600, which is darker than
   --brand-500 on our dark palette and reads as "sinking". Keep the same
   base fill and lift with a mild brightness filter so white label contrast
   stays predictable. Light theme unchanged. */
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus {
  background-color: var(--brand-500);
  border-color: var(--brand-500);
  color: #ffffff;
  filter: brightness(1.18) saturate(1.05);
}

/* Hero example table caption — match the table body so the table reads as
   a single unified near-black surface. Typography (monospace name, uppercase
   hint) carries the header hierarchy. */
[data-theme="dark"] .hero-table-caption {
  background: var(--surface-0);
}

/* Drop the bottom-corner glows in dark mode so the page fades cleanly to
   --bg-base-2 (= --surface-0 in dark) at the bottom of the viewport and
   blends seamlessly with the footer. The top-left blue and top-right
   violet glows stay to carry the velvet atmosphere above the fold. */
[data-theme="dark"] body {
  background:
    radial-gradient(60rem 40rem at -10% -6%, var(--bg-glow-1) 0%, transparent 65%),
    radial-gradient(48rem 30rem at 108% 8%, var(--bg-glow-2) 0%, transparent 68%),
    linear-gradient(180deg, var(--bg-base-0) 0%, var(--bg-base-1) 55%, var(--bg-base-2) 100%);
  background-attachment: fixed;
}
