/* ScanScribe landing — dark “ops console” palette */
:root {
  --bg: #0b0f14;
  --bg-elevated: #121922;
  --bg-tint: #0f1620;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8edf4;
  --muted: #97a3b5;
  --accent: #3ecf8e;
  --accent-dim: rgba(62, 207, 142, 0.15);
  --danger: #f07178;
  --warn: #ffcb6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(62, 207, 142, 0.08), transparent),
    radial-gradient(900px 500px at 10% 0%, rgba(99, 132, 255, 0.06), transparent), var(--bg);
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #042014;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.72);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), #63c7ff);
  box-shadow: 0 0 18px rgba(62, 207, 142, 0.45);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
}

.nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a:not(.btn):hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #042014;
  border-color: rgba(62, 207, 142, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 4rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
  opacity: 0;
  transform: translateY(14px);
  animation: hero-fade-in 700ms ease-out forwards;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: transparent;
  background: linear-gradient(100deg, #e8edf4 0%, #b8f7dc 35%, #7ad8ff 52%, #e8edf4 75%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 28px rgba(62, 207, 142, 0.18), 0 8px 30px rgba(7, 20, 34, 0.45);
  animation: hero-shimmer 8s ease-in-out infinite;
}

.lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 52ch;
}

@keyframes hero-shimmer {
  0% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 0 rgba(62, 207, 142, 0));
  }
  50% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 8px rgba(62, 207, 142, 0.2));
  }
  100% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 0 rgba(62, 207, 142, 0));
  }
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero h1 {
    animation: none;
    background-position: 50% 50%;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.hero-meta strong {
  color: var(--text);
  font-weight: 600;
}

/* Fake terminal */
.hero-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red {
  background: var(--danger);
}

.dot-amber {
  background: var(--warn);
}

.dot-green {
  background: var(--accent);
}

.panel-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.panel-body {
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #c7d2e3;
  overflow-x: auto;
}

.panel-body .kw {
  color: #82aaff;
}

.panel-body .fn {
  color: #c3e88d;
}

.panel-body .str {
  color: #f78c6c;
}

.panel-body .cm {
  color: var(--muted);
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-tint {
  background: var(--bg-tint);
  border-block: 1px solid var(--border);
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 62ch;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 1.35rem 1.35rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.card-wide {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .card-wide {
    grid-column: auto;
  }
}

.shots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .shots-grid {
    grid-template-columns: 1fr;
  }
}

.shot-card {
  margin: 0;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.shot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.shot-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.shot-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shot-card figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.875rem;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 10, 14, 0.82);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-dialog {
  width: min(1220px, 100%);
  max-height: calc(100vh - 2rem);
  display: grid;
  gap: 0.65rem;
  justify-items: center;
}

.lightbox-close {
  justify-self: end;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.9);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
}

.lightbox-close:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

#lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.lightbox-caption {
  margin: 0;
  color: #d3dcea;
  font-size: 0.9rem;
}

.arch-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  max-width: 72ch;
}

.arch-list li {
  margin-bottom: 0.5rem;
}

.arch-list strong {
  color: var(--text);
}

.stack-badges {
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
  margin: 0;
}

.stack-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1.15rem 1.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: #d6dfea;
  font-size: 1.35rem;
  font-weight: 600;
  width: max-content;
}

.stack-badge svg {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.stack-badge img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
}

.sqlite-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 4rem;
  align-items: start;
}

.sqlite-copy .section-lead {
  margin-bottom: 1rem;
}

@media (min-width: 901px) {
  .stack-badges {
    justify-self: end;
    margin-top: 1.5rem;
  }

  .stack-badge:nth-child(2) {
    margin-left: 6.5rem;
  }
}

@media (max-width: 900px) {
  .sqlite-layout {
    grid-template-columns: 1fr;
  }

  .stack-badges {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 2rem;
  }

  .stack-badge {
    font-size: 1rem;
    padding: 0.75rem 1.05rem;
  }

  .stack-badge svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  .stack-badge img {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }
}

/* Quick start */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr min(340px, 100%);
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }
}

.steps {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--muted);
}

.steps li {
  margin-bottom: 0.65rem;
}

.inline {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

.note {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(62, 207, 142, 0.35);
  background: var(--accent-dim);
  color: var(--muted);
  font-size: 0.9375rem;
}

.aside-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(62, 207, 142, 0.06), transparent 55%), var(--bg-elevated);
}

.aside-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.aside-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.aside-foot {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}
