:root {
  --bg: #0f1419;
  --panel: #1a202c;
  --panel-2: #161b25;
  --border: #2d3748;
  --text: #e2e8f0;
  --muted: #a0aec0;
  --blue: #2b6cb0;
  --blue-bright: #3182ce;
  --red: #e53e3e;
  --orange: #dd6b20;
  --purple: #805ad5;
  --teal: #2c7a7b;
  --green: #38a169;

  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

a { color: inherit; }

/* ---------- background texture ---------- */

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 800px;
  background: radial-gradient(ellipse at center, rgba(43, 108, 176, 0.22) 0%, rgba(43, 108, 176, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(246, 173, 85, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 173, 85, 0.13) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.ascii-fire {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 226px;
  pointer-events: none;
  z-index: 0;
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 210px;
  height: 210px;
  margin-left: -105px;
  margin-top: -105px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 173, 85, 0.09) 0%, rgba(229, 62, 62, 0.04) 45%, transparent 72%);
  transform: translate(var(--mx, -9999px), var(--my, -9999px));
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor-glow.is-active { opacity: 1; }

@media (hover: none) {
  .cursor-glow { display: none; }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(15, 20, 25, 0.75);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.2px;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-nav a:hover { color: var(--text); }
.site-nav a.is-active { color: var(--text); }

/* ---------- documentation ---------- */

.docs { padding: 3rem 0 5rem; }

.docs-inner {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.86rem;
}

.docs-toc-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.docs-toc a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.docs-toc a:hover { color: var(--text); }

.docs-kicker { text-align: left; }

.docs-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
}

.docs-lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 0 2.5rem;
}

.docs-content section {
  padding-top: 2.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.docs-content section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.docs-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.docs-content p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.docs-content strong { color: var(--text); }

.docs-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  color: var(--text);
}

.docs-content pre {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 0 0 1.2rem;
}

.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2rem;
  font-size: 0.88rem;
}

.docs-table th, .docs-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.docs-table thead th {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.docs-table td { color: var(--muted); }
.docs-table td code { white-space: nowrap; }

@media (max-width: 800px) {
  .docs-inner { grid-template-columns: 1fr; }
  .docs-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary {
  background: linear-gradient(90deg, var(--red), var(--orange));
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(221, 107, 32, 0.6);
}

.btn-primary:hover {
  background: linear-gradient(90deg, #f56565, #f6ad55);
  box-shadow: 0 10px 28px -6px rgba(221, 107, 32, 0.75);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--orange); }

.btn-sm { padding: 0.55rem 1.15rem; font-size: 0.88rem; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.tagline {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 1.1rem;
}

.tw { display: block; line-height: 1.15; }
.tw-ready { color: #f6ad55; }
.tw-aim { color: var(--orange); }
.tw-fire { color: var(--red); text-shadow: 0 0 24px rgba(229, 62, 62, 0.5); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  background: linear-gradient(90deg, var(--red), var(--orange), #f6ad55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.06em;
  margin-bottom: 1.4rem;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1.4rem;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 3rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.hero-demo {
  max-width: 560px;
  margin: 0 auto 3rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  text-align: left;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.hero-demo-line {
  font-family: var(--font-mono);
  font-size: 1rem;
  padding: 0.4rem 0;
  color: var(--muted);
}

.hero-demo-line::before {
  content: "$ ";
  color: var(--border);
}

.scramble {
  color: var(--green);
  transition: color 0.4s ease;
}

.scramble.is-redacted { color: var(--blue-bright); }

.scramble-char { color: var(--muted); opacity: 0.7; }

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ---------- sections shared ---------- */

section { position: relative; z-index: 1; }

.section-kicker {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--red), var(--orange), #f6ad55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
  text-align: center;
}

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 auto 1.1rem;
  max-width: 720px;
  text-align: center;
}

.section-lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 2rem;
  text-align: center;
}

.section-lede em { color: var(--text); font-style: normal; font-weight: 600; }

/* ---------- browser-chrome screenshot frame ---------- */

.showcase { padding: 3.25rem 0; }
.showcase-alt { background: var(--panel-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0 0 2.5rem;
}

.trust-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.3rem;
}

.trust-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.trust-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.trust-caption {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 680px;
  margin: 1.25rem auto 0;
  text-align: center;
}

.browser-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.65);
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: #10151c;
  border-bottom: 1px solid var(--border);
}

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ff5f56; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #27c93f; }

.browser-chrome-title {
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  transform: translateX(-15px);
}

.browser-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- feature cards ---------- */

.features { padding: 3.25rem 0; }

.feature-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.feature-card {
  flex: 1 1 220px;
  max-width: 250px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1.3rem 1.2rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 1rem;
  margin: 0 auto 0.75rem;
}

.feature-card h3 {
  font-size: 0.98rem;
  margin: 0 0 0.5rem;
}

.badge-soon {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  margin-left: 0.3rem;
  vertical-align: middle;
  transform: translateY(-1px);
}

.feature-card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0;
}

/* ---------- hover reveal table ---------- */

.reveal-section { padding: 3.25rem 0; }

.reveal-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.reveal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.reveal-table th,
.reveal-table td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 1rem 0.9rem;
  text-align: center;
}

.reveal-table th:last-child,
.reveal-table td:last-child { border-right: none; }

.reveal-table tbody tr:last-child th,
.reveal-table tbody tr:last-child td { border-bottom: none; }

.reveal-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent, var(--muted));
  background: var(--panel-2);
}

.reveal-level-head { color: var(--muted) !important; text-align: left; }

.reveal-table tbody th {
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--panel-2);
  white-space: nowrap;
}

.reveal-table tbody tr.reveal-row-full th,
.reveal-table tbody tr.reveal-row-full td { background: color-mix(in srgb, var(--red) 10%, var(--panel-2)); }

.reveal-table td {
  position: relative;
  cursor: default;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.reveal-table td:hover { background-color: color-mix(in srgb, var(--accent) 14%, transparent); }

.reveal-flip {
  position: relative;
  height: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.reveal-before, .reveal-after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, filter 0.25s ease;
  white-space: nowrap;
}

.reveal-before { filter: blur(0); opacity: 1; }
.reveal-after { filter: blur(4px); opacity: 0; color: var(--accent); }

.reveal-table td:hover .reveal-before { filter: blur(4px); opacity: 0; }
.reveal-table td:hover .reveal-after { filter: blur(0); opacity: 1; }

.reveal-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.7;
}

.reveal-hint-center { text-align: center; margin: 0.9rem 0 0; }

/* ---------- cta ---------- */

.gradient-bar {
  position: relative;
  z-index: 1;
  height: 4px;
  margin: 0 auto;
  max-width: 720px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--red), var(--orange), #f6ad55, var(--orange), var(--red), transparent);
  box-shadow: 0 0 40px 4px rgba(221, 107, 32, 0.45);
}

.cta-section {
  padding: 3.5rem 0 4.5rem;
  text-align: center;
}

.cta-inner .section-title,
.cta-inner .section-lede {
  margin-left: auto;
  margin-right: auto;
}

.cta-inner .section-lede { margin-bottom: 2.5rem; }

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, var(--red), var(--orange));
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
}

.footer-inner p { color: rgba(255, 255, 255, 0.85); }

.footer-inner .brand-name { font-size: 0.95rem; color: #fff; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .feature-card { flex-basis: 45%; }
  .site-nav { display: none; }
  .trust-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .feature-card { flex-basis: 100%; max-width: 320px; }
  .hero { padding: 5rem 0 4rem; }
  .wrap { padding: 0 1.25rem; }
  .hero-cta, .footer-inner { flex-direction: column; gap: 1rem; }
  .reveal-table { font-size: 0.85rem; }
  .reveal-table th, .reveal-table td { padding: 0.7rem 0.5rem; }
}
