/* ============================================================
   pglens — editorial system
   Fraunces (display) · Inter (text) · JetBrains Mono (data)
   Warm paper, ink, cobalt accent. The lens is the brand.
   ============================================================ */

:root {
  --paper: #f5f3ec;
  --surface: #fffefb;
  --ink: #1b1a16;
  --ink-2: #57544a;
  --ink-3: #8c887a;
  --line: rgba(27, 26, 22, 0.14);
  --line-soft: rgba(27, 26, 22, 0.08);
  --accent: #2945dd;
  --accent-deep: #1d33ad;
  --green: #4fc987;
  --dark: #161511;
  --dark-2: #1d1c17;
  --dark-line: rgba(245, 243, 236, 0.12);
  --dark-text: #f0eee5;
  --dark-muted: #a39f8f;

  --font-display: "Fraunces", georgia, serif;
  --font-text: "Inter", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --font-logo: "Asimovian", var(--font-mono);

  --shadow-frame: 0 1px 2px rgba(27, 26, 22, 0.07),
    0 12px 24px -8px rgba(27, 26, 22, 0.14),
    0 32px 64px -24px rgba(27, 26, 22, 0.28);
  --radius: 12px;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint blueprint grid on the paper */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 90vh);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 90vh);
  z-index: 0;
}

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

::selection {
  background: var(--accent);
  color: var(--paper);
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(27, 26, 22, 0.06);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.08em 0.35em;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 em, h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

a {
  color: inherit;
}

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

.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.kicker::before {
  content: "◎ ";
  letter-spacing: 0;
}

/* ============ reveal ============ */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ============ header ============ */

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 243, 236, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

#site-header.scrolled {
  border-bottom-color: var(--line);
}

#site-header nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-logo);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav-center {
  display: flex;
  gap: 30px;
}

.nav-center a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.2s;
}

.nav-center a:hover {
  color: var(--ink);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 9px 18px;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

/* ============ hero ============ */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--pad) 0;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 16px 7px 7px;
  margin-bottom: 36px;
  transition: border-color 0.2s, color 0.2s;
}

.eyebrow:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.eyebrow-tag {
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
  font-size: 11px;
  border-radius: 999px;
  padding: 3px 9px;
}

.eyebrow .arrow {
  transition: transform 0.2s;
}

.eyebrow:hover .arrow {
  transform: translateX(3px);
}

.hero h1 {
  font-size: clamp(2.9rem, 7.2vw, 5.4rem);
  margin-bottom: 26px;
}

.subtitle {
  max-width: 620px;
  margin: 0 auto 44px;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* install widget */

.install-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.os-toggles {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 3px;
  gap: 2px;
}

.os-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.os-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.command-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--dark);
  color: var(--dark-text);
  border-radius: 10px;
  padding: 16px 18px 16px 22px;
  box-shadow: var(--shadow-frame);
  max-width: min(92vw, 560px);
}

.command-box .prompt {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--green);
  user-select: none;
}

.command-box code {
  font-size: 13.5px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--dark-text);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.command-box code::-webkit-scrollbar {
  display: none;
}

.copy-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--dark-line);
  border-radius: 7px;
  background: transparent;
  color: var(--dark-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.copy-btn:hover {
  color: var(--dark-text);
  border-color: var(--dark-muted);
}

.install-hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
}

.install-hint code {
  font-size: 11px;
}

.star-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.star-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.star-count {
  background: rgba(27, 26, 22, 0.07);
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 600;
}

/* ============ the lens ============ */

.lens-section {
  margin: clamp(64px, 8vw, 104px) auto 0;
  max-width: 880px;
}

.lens-stage {
  position: relative;
  text-align: left;
  --lx: 72%;
  --ly: 42%;
  --lr: 105px;
}

.window-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-frame);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(27, 26, 22, 0.02);
}

.traffic {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.traffic.red { background: #f26d5f; }
.traffic.amber { background: #f5bd4f; }
.traffic.green { background: #59c76f; }

.window-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
}

/* mock UI layer */

.mock-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  border-radius: 999px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}

.chip b {
  font-weight: 600;
  color: var(--ink);
}

.chip i {
  font-style: normal;
  color: var(--accent);
}

.chip u {
  text-decoration: none;
  margin-left: 7px;
  color: var(--ink-3);
}

.chip-filter {
  background: rgba(41, 69, 221, 0.06);
  border-color: rgba(41, 69, 221, 0.25);
}

.chip-add {
  border-style: dashed;
  color: var(--ink-3);
}

.chip-sort {
  background: rgba(27, 26, 22, 0.04);
}

.mock-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

.mock-grid {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.mock-grid th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.mock-grid td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  white-space: nowrap;
}

.mock-grid td:first-child {
  color: var(--ink-3);
}

.mock-grid tr:last-child td {
  border-bottom: 0;
}

.mock-grid s {
  text-decoration: none;
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 9px;
}

.mock-grid s.ok {
  background: rgba(79, 201, 135, 0.16);
  color: #1d7a4c;
}

.mock-grid s.warn {
  background: rgba(232, 177, 92, 0.18);
  color: #95621a;
}

.mock-grid s.err {
  background: rgba(242, 109, 95, 0.15);
  color: #ad3a2e;
}

/* SQL layer revealed through the lens */

.lens-sql {
  position: absolute;
  inset: 0;
  background: var(--dark);
  border-radius: var(--radius);
  border: 1px solid var(--dark-line);
  clip-path: circle(var(--lr) at var(--lx) var(--ly));
  -webkit-clip-path: circle(var(--lr) at var(--lx) var(--ly));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
}

.sql-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
  padding: 13px 20px;
  border-bottom: 1px solid var(--dark-line);
}

.sql-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.lens-sql pre {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  overflow: hidden;
}

.lens-sql code {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.8vw, 15.5px);
  line-height: 1.75;
  color: var(--dark-text);
  background: none;
  border: 0;
  padding: 0;
}

.lens-sql .k { color: #92a8ff; font-weight: 500; }
.lens-sql .s { color: var(--green); }
.lens-sql .n { color: #e8b15c; }
.lens-sql .c { color: var(--dark-muted); }

/* magnifier ring */

.lens-ring {
  position: absolute;
  left: var(--lx);
  top: var(--ly);
  width: calc(var(--lr) * 2);
  height: calc(var(--lr) * 2);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 4px rgba(245, 243, 236, 0.65),
    0 18px 40px -12px rgba(27, 26, 22, 0.45);
  pointer-events: none;
  z-index: 3;
}

/* magnifier handle */
.lens-ring::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -8%;
  width: 22%;
  height: 5px;
  background: var(--ink);
  border-radius: 4px;
  transform: rotate(45deg);
  transform-origin: left center;
}

.lens-tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 3px 10px;
}

.lens-caption {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
  text-align: center;
}

.lens-caption .kicker {
  margin-bottom: 6px;
}

/* ============ marquee ============ */

.marquee-strip {
  margin-top: clamp(72px, 9vw, 120px);
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strip-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
  margin-bottom: 22px;
}

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: marquee 36s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}

.marquee-track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 22px;
  white-space: nowrap;
  background: var(--surface);
}

/* ============ sections ============ */

.section-head {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  margin-bottom: 18px;
}

.section-head p {
  color: var(--ink-2);
  font-size: 1.06rem;
  text-wrap: pretty;
}

.demo-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(88px, 11vw, 160px) var(--pad) 0;
}

.demo-visual {
  max-width: 980px;
  margin: clamp(40px, 6vw, 64px) auto 0;
  perspective: 1200px;
}

/* ============ tour ============ */

.showcase-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(96px, 12vw, 176px) var(--pad) 0;
}

.showcase-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
  margin-top: clamp(72px, 9vw, 128px);
}

.showcase-row.reverse .showcase-text {
  order: 2;
}

.showcase-row.reverse .showcase-visual {
  order: 1;
}

.showcase-text .step {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid rgba(41, 69, 221, 0.35);
  border-radius: 999px;
  padding: 4px 13px;
  margin-bottom: 20px;
}

.showcase-text h3 {
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  margin-bottom: 16px;
}

.showcase-text > p {
  color: var(--ink-2);
  margin-bottom: 22px;
  text-wrap: pretty;
}

.check-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.check-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  color: var(--accent);
}

.showcase-visual {
  perspective: 1100px;
  min-width: 0;
}

/* ============ feature index (dark) ============ */

.grid-section {
  margin-top: clamp(104px, 13vw, 184px);
  background: var(--dark);
  color: var(--dark-text);
  position: relative;
}

.grid-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--dark-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--dark-line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.35;
  pointer-events: none;
}

.grid-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(88px, 11vw, 152px) var(--pad);
}

.grid-section .section-head p {
  color: var(--dark-muted);
}

.grid-section .kicker {
  color: var(--green);
}

.grid-section h2 em {
  color: var(--green);
}

.feature-grid {
  margin-top: clamp(48px, 7vw, 80px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--dark-line);
  border-left: 1px solid var(--dark-line);
}

.feature-cell {
  padding: 30px 26px 34px;
  border-right: 1px solid var(--dark-line);
  border-bottom: 1px solid var(--dark-line);
  transition: background 0.25s;
}

.feature-cell:hover {
  background: var(--dark-2);
}

.feature-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--green);
  margin-bottom: 38px;
}

.feature-cell h3 {
  font-family: var(--font-text);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  margin-bottom: 10px;
}

.feature-cell p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--dark-muted);
}

.feature-cell code {
  background: rgba(245, 243, 236, 0.08);
  border-color: var(--dark-line);
  color: var(--dark-text);
}

/* ============ FAQ ============ */

.faq-section {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(96px, 12vw, 168px) var(--pad) 0;
}

.faq-list {
  margin-top: clamp(40px, 6vw, 60px);
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  list-style: none;
  cursor: pointer;
  padding: 24px 4px;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
  font-weight: 500;
  transition: color 0.2s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-toggle {
  flex: none;
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
}

.faq-toggle::before,
.faq-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.faq-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.3s;
}

.faq-item[open] .faq-toggle {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.faq-item[open] .faq-toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-body {
  padding: 0 56px 26px 4px;
  color: var(--ink-2);
  font-size: 15px;
}

/* ============ CTA ============ */

.cta-section {
  margin-top: clamp(104px, 13vw, 184px);
  background: var(--accent);
  color: var(--paper);
}

.cta-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(88px, 11vw, 144px) var(--pad);
  text-align: center;
}

.cta-section .kicker {
  color: rgba(245, 243, 236, 0.75);
}

.cta-inner h2 {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  margin-bottom: 44px;
}

.cta-inner h2 em {
  color: inherit;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.82em;
  background: rgba(22, 21, 17, 0.25);
  border-radius: 10px;
  padding: 0.04em 0.3em;
}

.cta-widget .os-toggles {
  background: rgba(22, 21, 17, 0.18);
  border-color: rgba(245, 243, 236, 0.25);
}

.cta-widget .os-btn {
  color: rgba(245, 243, 236, 0.75);
}

.cta-widget .os-btn.active {
  background: var(--paper);
  color: var(--ink);
}

.cta-widget .command-box {
  box-shadow: 0 24px 56px -16px rgba(22, 21, 17, 0.5);
}

.cta-widget .install-hint {
  color: rgba(245, 243, 236, 0.7);
}

/* ============ footer ============ */

footer {
  background: var(--dark);
  color: var(--dark-text);
  overflow: hidden;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 96px) var(--pad) 40px;
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .logo {
  color: var(--dark-text);
}

.footer-brand p {
  font-size: 13.5px;
  color: var(--dark-muted);
  margin-top: 14px;
}

.footer-cols {
  display: flex;
  gap: clamp(40px, 6vw, 88px);
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 6px;
}

.footer-col a {
  font-size: 14px;
  color: var(--dark-text);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}

.footer-col a:hover {
  opacity: 1;
  color: var(--green);
}

.footer-word {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: clamp(80px, 16vw, 240px);
  line-height: 0.78;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 243, 236, 0.16);
  user-select: none;
  pointer-events: none;
  margin-top: 24px;
  transform: translateY(12%);
}

.footer-bottom {
  border-top: 1px solid var(--dark-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--pad);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dark-muted);
}

.footer-bottom a {
  color: var(--dark-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--dark-text);
}

/* ============ responsive ============ */

@media (max-width: 1020px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .showcase-row,
  .showcase-row.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .showcase-row.reverse .showcase-text {
    order: 0;
  }

  .showcase-row.reverse .showcase-visual {
    order: 1;
  }

  .nav-center {
    display: none;
  }
}

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

  .mock-grid th:nth-child(5),
  .mock-grid td:nth-child(5) {
    display: none;
  }

  .lens-stage {
    --lr: 78px;
  }

  .command-box {
    padding: 13px 14px 13px 16px;
  }

  .command-box code {
    font-size: 11.5px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .faq-body {
    padding-right: 12px;
  }
}

/* ============================================================
   animated scenes — every "screenshot" is a living mock.
   Base styles = the completed state, so reduced-motion users
   see a finished still; keyframes play the full story.
   ============================================================ */

.scene {
  position: relative;
  font-family: var(--font-mono);
  overflow: hidden;
  background: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
  .scene *,
  .scene *::before,
  .scene *::after {
    animation: none !important;
  }
}

/* ---------- schema map ---------- */

.scene-schema {
  aspect-ratio: 16 / 9;
  background-image: radial-gradient(rgba(27, 26, 22, 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
}

.schema-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.schema-edges {
  overflow: visible;
}

.schema-edges .edge {
  fill: none;
  stroke: rgba(41, 69, 221, 0.45);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  animation: edge-flow 1.4s linear infinite;
}

.schema-edges .edge-dot {
  fill: var(--accent);
  opacity: 0.65;
}

@keyframes edge-flow {
  to { stroke-dashoffset: -10; }
}

.t-node {
  position: absolute;
  width: clamp(120px, 22%, 200px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 8px 20px -10px rgba(27, 26, 22, 0.25);
  font-size: clamp(8px, 1.3vw, 11.5px);
  overflow: hidden;
  animation: node-glow 12.5s ease-in-out infinite;
}

.t-node header {
  font-weight: 600;
  padding: 6px 11px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(27, 26, 22, 0.035);
}

.t-node span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 11px;
  color: var(--ink-2);
}

.t-node span + span {
  border-top: 1px solid var(--line-soft);
}

.t-node i {
  font-style: normal;
  color: var(--ink-3);
  font-size: 0.88em;
  white-space: nowrap;
}

.tn1 { left: 5%; top: 14%; animation-delay: 0s; }
.tn2 { left: 40%; top: 34%; animation-delay: 2.5s; }
.tn3 { left: 74%; top: 8%; animation-delay: 5s; }
.tn4 { left: 72%; top: 60%; animation-delay: 7.5s; }
.tn5 { left: 8%; top: 60%; animation-delay: 10s; }

@keyframes node-glow {
  0%, 13%, 100% {
    border-color: var(--line);
    box-shadow: 0 8px 20px -10px rgba(27, 26, 22, 0.25);
    transform: none;
  }
  4%, 9% {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(41, 69, 221, 0.14),
      0 14px 28px -10px rgba(41, 69, 221, 0.35);
    transform: translateY(-3px);
  }
}

/* ---------- shared scene loop (9s) ---------- */

/* filter: chip pops in, non-matching rows dim, count flips */

.fchip {
  animation: chip-cycle 9s ease infinite;
}

@keyframes chip-cycle {
  0%, 12% { opacity: 0; transform: scale(0.9); }
  17%, 90% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: scale(0.9); }
}

.scene-filter .frow {
  animation: row-dim 9s ease infinite;
}

.scene-filter .frow td {
  transition: none;
}

@keyframes row-dim {
  0%, 20% { opacity: 1; filter: none; }
  27%, 88% { opacity: 0.18; filter: grayscale(1); }
  96%, 100% { opacity: 1; filter: none; }
}

.count-swap {
  position: relative;
  min-width: 9ch;
  text-align: right;
}

.count-swap .c-a,
.count-swap .c-b {
  display: block;
  white-space: nowrap;
}

.count-swap .c-a {
  position: absolute;
  right: 0;
  top: 0;
  opacity: 0;
  animation: count-a 9s ease infinite;
}

.count-swap .c-b {
  animation: count-b 9s ease infinite;
}

@keyframes count-a {
  0%, 24% { opacity: 1; }
  30%, 92% { opacity: 0; }
  97%, 100% { opacity: 1; }
}

@keyframes count-b {
  0%, 24% { opacity: 0; }
  30%, 92% { opacity: 1; }
  97%, 100% { opacity: 0; }
}

/* ---------- inline edit ---------- */

.scene-edit {
  padding-bottom: 6px;
}

.edit-cell {
  position: relative;
}

.edit-cell .val-old {
  position: absolute;
  opacity: 0;
  animation: val-old 9s ease infinite;
}

.edit-cell .val-new {
  animation: val-new 9s ease infinite;
}

@keyframes val-old {
  0%, 48% { opacity: 1; }
  54%, 93% { opacity: 0; }
  98%, 100% { opacity: 1; }
}

@keyframes val-new {
  0%, 48% { opacity: 0; }
  54%, 93% { opacity: 1; }
  98%, 100% { opacity: 0; }
}

.edit-cell::after {
  /* selection ring around the edited cell */
  content: "";
  position: absolute;
  inset: 3px 6px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  opacity: 0;
  animation: cell-ring 9s ease infinite;
  pointer-events: none;
}

@keyframes cell-ring {
  0%, 8% { opacity: 0; }
  12%, 56% { opacity: 1; }
  62%, 100% { opacity: 0; }
}

.edit-pop {
  position: absolute;
  left: 4px;
  top: calc(100% - 2px);
  z-index: 4;
  min-width: 130px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px -10px rgba(27, 26, 22, 0.3);
  padding: 4px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-4px);
  animation: pop-cycle 9s ease infinite;
}

@keyframes pop-cycle {
  0%, 16% { opacity: 0; transform: translateY(-4px); }
  21%, 44% { opacity: 1; transform: none; }
  50%, 100% { opacity: 0; transform: translateY(-4px); }
}

.edit-pop span {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--ink-2);
}

.edit-pop .sel {
  animation: pop-sel 9s ease infinite;
}

@keyframes pop-sel {
  0%, 28% { background: transparent; color: var(--ink-2); }
  34%, 100% { background: var(--accent); color: var(--paper); }
}

.edit-pop .sel::after {
  content: " ✓";
  opacity: 0;
  animation: pop-check 9s ease infinite;
}

@keyframes pop-check {
  0%, 36% { opacity: 0; }
  40%, 100% { opacity: 1; }
}

.edit-toast {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--dark);
  color: var(--dark-text);
  font-size: 11px;
  border-radius: 8px;
  padding: 8px 14px;
  box-shadow: 0 12px 24px -8px rgba(27, 26, 22, 0.4);
  animation: toast-cycle 9s ease infinite;
}

@keyframes toast-cycle {
  0%, 56% { opacity: 0; transform: translateY(8px); }
  62%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(8px); }
}

/* ---------- foreign-key panel ---------- */

.fk {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted rgba(41, 69, 221, 0.5);
  cursor: pointer;
}

.fk-click {
  position: relative;
  animation: fk-pulse 9s ease infinite;
  border-radius: 4px;
}

@keyframes fk-pulse {
  0%, 8% { background: transparent; }
  12%, 20% { background: rgba(41, 69, 221, 0.16); box-shadow: 0 0 0 4px rgba(41, 69, 221, 0.16); }
  26%, 100% { background: transparent; box-shadow: none; }
}

.fk-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(58%, 280px);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 48px -24px rgba(27, 26, 22, 0.35);
  padding: 14px 18px;
  animation: panel-slide 9s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes panel-slide {
  0%, 16% { transform: translateX(105%); }
  26%, 86% { transform: none; }
  96%, 100% { transform: translateX(105%); }
}

.fk-crumb {
  font-size: 11px;
  color: var(--ink-3);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 10px;
}

.fk-crumb b {
  color: var(--accent);
  font-weight: 500;
}

.fk-crumb span {
  color: var(--ink);
  font-weight: 600;
}

.fk-panel dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 16px;
  font-size: 12px;
}

.fk-panel dt {
  color: var(--ink-3);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-self: center;
}

.fk-panel dd {
  color: var(--ink);
}

.fk-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  color: var(--accent);
  border-bottom: 1px dotted rgba(41, 69, 221, 0.5);
}

/* ---------- advanced mode (typing SQL) ---------- */

.scene-sql {
  background: var(--dark);
}

.scene-sql .sql-bar {
  border-bottom: 1px solid var(--dark-line);
}

.sql-code {
  padding: 18px 22px 8px;
  margin: 0;
}

.sql-code code {
  background: none;
  border: 0;
  padding: 0;
  font-size: clamp(10.5px, 1.5vw, 13.5px);
  line-height: 1.8;
  color: var(--dark-text);
}

.scene-sql .k { color: #92a8ff; font-weight: 500; }
.scene-sql .n { color: #e8b15c; }

.code-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: var(--w);
  height: 1.8em;
}

.l1 { animation: type-l1 10s steps(28) infinite; }
.l2 { animation: type-l2 10s steps(12) infinite; }
.l3 { animation: type-l3 10s steps(30) infinite; }
.l4 { animation: type-l4 10s steps(12) infinite; }
.l5 { animation: type-l5 10s steps(22) infinite; }

@keyframes type-l1 { 0%, 2% { width: 0; } 12%, 100% { width: var(--w); } }
@keyframes type-l2 { 0%, 12% { width: 0; } 18%, 100% { width: var(--w); } }
@keyframes type-l3 { 0%, 18% { width: 0; } 30%, 100% { width: var(--w); } }
@keyframes type-l4 { 0%, 30% { width: 0; } 36%, 100% { width: var(--w); } }
@keyframes type-l5 { 0%, 36% { width: 0; } 46%, 100% { width: var(--w); } }

.sql-result {
  margin: 10px 22px 20px;
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  overflow: hidden;
  font-size: clamp(10px, 1.4vw, 12px);
  animation: result-in 10s ease infinite;
}

@keyframes result-in {
  0%, 50% { opacity: 0; transform: translateY(6px); }
  56%, 94% { opacity: 1; transform: none; }
  98%, 100% { opacity: 0; }
}

.r-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--dark-line);
  color: var(--dark-text);
}

.r-row.r-head {
  color: var(--dark-muted);
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.08em;
  background: rgba(245, 243, 236, 0.04);
}

.r-foot {
  padding: 7px 14px;
  color: var(--green);
  font-size: 0.9em;
}

/* ---------- spotlight (⌘K) ---------- */

.scene-spot {
  aspect-ratio: 16 / 10;
  background: var(--dark);
}

.spot-bg {
  position: absolute;
  inset: 0;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0.35;
  filter: blur(2px);
}

.spot-bg span {
  height: 14px;
  border-radius: 5px;
  background: var(--dark-line);
}

.spot-bg span:nth-child(2) { width: 70%; }
.spot-bg span:nth-child(3) { width: 85%; }
.spot-bg span:nth-child(4) { width: 60%; }
.spot-bg span:nth-child(5) { width: 78%; }

.spot-palette {
  position: absolute;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  width: min(86%, 380px);
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: 12px;
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: palette-in 8s ease infinite;
}

@keyframes palette-in {
  0%, 3% { opacity: 0; transform: translateX(-50%) scale(0.96); }
  8%, 92% { opacity: 1; transform: translateX(-50%) scale(1); }
  97%, 100% { opacity: 0; transform: translateX(-50%) scale(0.96); }
}

.spot-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--dark-line);
  color: var(--dark-text);
  font-size: 13px;
}

.spot-glyph {
  color: var(--green);
}

.spot-typed {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 3ch;
  animation: spot-type 8s steps(3) infinite;
}

@keyframes spot-type {
  0%, 12% { width: 0; }
  20%, 100% { width: 3ch; }
}

.spot-caret {
  width: 1.5px;
  height: 15px;
  background: var(--green);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.spot-kbd {
  margin-left: auto;
  font-size: 10px;
  color: var(--dark-muted);
  border: 1px solid var(--dark-line);
  border-radius: 5px;
  padding: 2px 7px;
}

.spot-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--dark-text);
  animation: spot-item 8s ease infinite;
}

.spot-item b {
  font-weight: 500;
}

.spot-item span {
  font-size: 10.5px;
  color: var(--dark-muted);
}

.spot-item.s1 {
  position: relative;
  background: rgba(79, 201, 135, 0.1);
}

.spot-item.s1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green);
}

@keyframes spot-item {
  0%, 22% { opacity: 0; transform: translateY(4px); }
  30%, 100% { opacity: 1; transform: none; }
}

.spot-item.s2 { animation-name: spot-item-2; }
.spot-item.s3 { animation-name: spot-item-3; }

@keyframes spot-item-2 {
  0%, 26% { opacity: 0; transform: translateY(4px); }
  34%, 100% { opacity: 1; transform: none; }
}

@keyframes spot-item-3 {
  0%, 30% { opacity: 0; transform: translateY(4px); }
  38%, 100% { opacity: 1; transform: none; }
}

.spot-foot {
  padding: 9px 16px;
  border-top: 1px solid var(--dark-line);
  font-size: 10px;
  color: var(--dark-muted);
}

/* ---------- connections ---------- */

.scene-conn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 22px;
  background-image: radial-gradient(rgba(27, 26, 22, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}

.conn-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 6px 16px -8px rgba(27, 26, 22, 0.18);
}

.conn-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.conn-card code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 11px;
  color: var(--ink-3);
}

.conn-card .badge {
  align-self: flex-start;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}

.conn-card .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
}

.conn-card .dot.on {
  background: var(--green);
  box-shadow: 0 0 6px rgba(79, 201, 135, 0.7);
}

.conn-card.add {
  border-style: dashed;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 12px;
  box-shadow: none;
  background: transparent;
}

/* the connecting card comes alive */

.conn-card.connecting {
  animation: conn-card 7s ease infinite;
}

@keyframes conn-card {
  0%, 30% { border-color: var(--line); transform: none; }
  44%, 88% {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(41, 69, 221, 0.12),
      0 12px 24px -8px rgba(41, 69, 221, 0.3);
    transform: translateY(-2px);
  }
  100% { border-color: var(--line); transform: none; }
}

.conn-card.connecting .dot {
  background: var(--green);
  animation: conn-dot 7s ease infinite;
}

@keyframes conn-dot {
  0%, 8% { background: var(--ink-3); box-shadow: none; }
  12%, 38% { background: #e8b15c; box-shadow: 0 0 6px rgba(232, 177, 92, 0.8); }
  44%, 100% { background: var(--green); box-shadow: 0 0 6px rgba(79, 201, 135, 0.7); }
}

.badge-swap {
  position: relative;
  min-width: 12ch;
  text-align: center;
}

.badge-swap .b-a {
  position: absolute;
  left: 0;
  right: 0;
  top: 2px;
  white-space: nowrap;
  opacity: 0;
  animation: badge-a 7s ease infinite;
}

.badge-swap .b-b {
  animation: badge-b 7s ease infinite;
}

@keyframes badge-a {
  0%, 8% { opacity: 0; }
  12%, 38% { opacity: 1; }
  44%, 100% { opacity: 0; }
}

@keyframes badge-b {
  0%, 38% { opacity: 0; }
  44%, 100% { opacity: 1; }
}

/* ---------- operations (live activity + slow queries) ---------- */

.scene-ops {
  background: var(--surface);
}

.ops-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
}

.ops-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ops-stat b {
  color: var(--ink);
  font-weight: 600;
}

.ops-stat .live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
  animation: ops-pulse 1.8s ease-in-out infinite;
}

@keyframes ops-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.ops-tag {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--ink-3);
}

.ops-grid td {
  font-size: 11.5px;
}

.ops-grid td:first-child {
  color: var(--ink-2);
  max-width: 0;
  width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-slow td {
  background: rgba(242, 109, 95, 0.07);
}

.ops-bar-cell {
  position: relative;
  color: var(--ink);
}

.ops-bar-cell i {
  font-style: normal;
  color: var(--ink-3);
  font-size: 0.85em;
  margin-left: 2px;
}

.ops-bar-cell .bar {
  display: block;
  height: 4px;
  width: var(--p);
  margin-bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #6f86f2);
  transform-origin: left;
  animation: ops-fill 4.5s ease-in-out infinite;
}

.ops-slow .bar {
  background: linear-gradient(90deg, #e8b15c, #e2604f);
}

@keyframes ops-fill {
  0% { transform: scaleX(0); }
  30%, 100% { transform: scaleX(1); }
}

/* ---------- EXPLAIN plan tree + index advisor ---------- */

.scene-plan {
  display: grid;
  grid-template-columns: 1fr minmax(0, 230px);
  gap: 18px;
  padding: 20px;
  background: var(--surface);
}

.plan-tree {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
}

.pnode {
  margin-left: calc(var(--d, 0) * 26px);
  position: relative;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink);
  background: var(--surface);
  animation: pnode-in 5s ease infinite;
  animation-delay: calc(var(--d, 0) * 0.5s);
}

.pnode[style*="--d"]::before {
  content: "";
  position: absolute;
  left: -14px;
  top: -10px;
  width: 14px;
  height: calc(50% + 10px);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-bottom-left-radius: 7px;
}

.pnode b {
  font-weight: 600;
}

.pnode .pmeta {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.pnode .pmeta i {
  font-style: normal;
  color: #ad3a2e;
}

.pnode.hot {
  border-left-color: #e2604f;
  background: rgba(242, 109, 95, 0.08);
}

.pnode.warm {
  border-left-color: #e8b15c;
  background: rgba(232, 177, 92, 0.08);
}

.pnode.cool {
  border-left-color: var(--green);
  background: rgba(79, 201, 135, 0.08);
}

@keyframes pnode-in {
  0% { opacity: 0; transform: translateX(-6px); }
  18%, 100% { opacity: 1; transform: none; }
}

.idx-card {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-family: var(--font-mono);
}

.idx-head {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--ink-2);
}

.warn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8b15c;
}

.idx-card code {
  font-size: 12px;
  color: var(--ink);
}

.idx-sub {
  font-size: 10.5px;
  color: var(--ink-3);
}

.idx-sql {
  margin-top: 4px;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--dark);
  color: #e8b15c;
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- ERD editor touches (schema map) ---------- */

.schema-edges .edge.new {
  stroke: var(--green);
  stroke-dasharray: 6 5;
}

.t-node span.added {
  color: var(--green);
  background: rgba(79, 201, 135, 0.1);
  box-shadow: inset 2px 0 0 var(--green);
}

.t-node span.added i {
  color: var(--green);
}

.erd-pending {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  box-shadow: 0 8px 22px -10px rgba(27, 26, 22, 0.3);
}

.erd-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.erd-count s {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
}

.erd-gen {
  border-radius: 999px;
  padding: 4px 11px;
  background: var(--accent);
  color: #fff;
}

/* ---------- schema diff & migration ---------- */

.scene-diff {
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.diff-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--ink-2);
}

.diff-db {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.diff-db s {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
}

.diff-arrow {
  color: var(--ink-3);
}

.diff-tag {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--ink-3);
}

.diff-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.dstmt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  font-size: 11.5px;
  background: var(--surface);
  animation: dstmt-in 6s ease infinite;
  animation-delay: calc(var(--d, 0) * 0.45s);
}

.dstmt b {
  font-weight: 700;
}

.dstmt code {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dstmt.add {
  border-left-color: var(--green);
  background: rgba(79, 201, 135, 0.07);
}

.dstmt.add b {
  color: var(--green);
}

.dstmt.drop {
  border-left-color: #e2604f;
  background: rgba(242, 109, 95, 0.07);
}

.dstmt.drop b {
  color: #ad3a2e;
}

@keyframes dstmt-in {
  0% { opacity: 0; transform: translateY(6px); }
  16%, 100% { opacity: 1; transform: none; }
}

.diff-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px;
  color: var(--ink-3);
}

/* ---------- chart panel ---------- */

.scene-chart {
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.chart-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--ink-2);
}

.ctype {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
  color: var(--ink-3);
}

.ctype.on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(41, 69, 221, 0.08);
}

.chart-tag {
  margin-left: auto;
  color: var(--ink-3);
}

.chart-plot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  height: clamp(170px, 24vw, 230px);
  padding: 22px 24px 0;
  margin: 0 16px 30px;
  border-bottom: 1px solid var(--line);
}

.cbar {
  position: relative;
  flex: 1;
  max-width: 46px;
  height: var(--h, 50%);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--accent), #6f86f2);
  transform-origin: bottom;
  animation: cbar-grow 5.5s ease infinite;
}

.cbar:nth-child(2) { animation-delay: 0.1s; }
.cbar:nth-child(3) { animation-delay: 0.2s; }
.cbar:nth-child(4) { animation-delay: 0.3s; }
.cbar:nth-child(5) { animation-delay: 0.4s; }
.cbar:nth-child(6) { animation-delay: 0.5s; }

.cbar i {
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: -20px;
  text-align: center;
  font-style: normal;
  font-size: 10px;
  color: var(--ink-3);
}

@keyframes cbar-grow {
  0% { transform: scaleY(0); }
  24%, 100% { transform: scaleY(1); }
}

@media (max-width: 640px) {
  .scene-filter .mock-grid th:nth-child(4),
  .scene-filter .mock-grid td:nth-child(4),
  .scene-edit .mock-grid th:nth-child(4),
  .scene-edit .mock-grid td:nth-child(4) {
    display: none;
  }

  .t-node span {
    display: none;
  }

  .t-node header {
    border-bottom: 0;
  }

  .tn3,
  .tn4 {
    left: auto;
    right: 4%;
  }

  .scene-conn {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .scene-plan {
    grid-template-columns: 1fr;
  }

  .ops-grid th:nth-child(4),
  .ops-grid td:nth-child(4) {
    display: none;
  }

  .fk-panel {
    width: 64%;
    padding: 12px;
  }
}

/* anchor offsets under sticky header */
#install,
#showcase,
#features,
#faq {
  scroll-margin-top: 92px;
}

/* ============ comparison pages (/vs/*) ============ */

.vs-page {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) var(--pad) 0;
}

.vs-page h1 {
  font-size: clamp(2.3rem, 5.6vw, 4rem);
  margin-bottom: 22px;
}

.vs-page h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin: clamp(56px, 8vw, 88px) 0 18px;
}

.vs-page p,
.vs-page li {
  color: var(--ink-2);
  font-size: 1.04rem;
  text-wrap: pretty;
}

.vs-page p + p {
  margin-top: 14px;
}

.vs-page ul {
  padding-left: 1.2em;
}

.vs-page li + li {
  margin-top: 8px;
}

.vs-page a {
  color: var(--accent);
}

.vs-tldr {
  margin-top: 28px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.vs-asof {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 18px;
}

.vs-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.vs-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.vs-table th,
.vs-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.vs-table thead th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vs-table tbody th {
  font-weight: 600;
  color: var(--ink);
  width: 24%;
}

.vs-table td {
  color: var(--ink-2);
}

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

.vs-fit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.vs-fit > div {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.vs-fit h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

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