:root {
  color-scheme: dark;
  --bg: #050505;
  --band: #0a0a0a;
  --panel: #111;
  --panel-soft: #171717;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #fff;
  --muted: #8c8c8c;
  --muted-strong: #a0a0a0;
  --blue: #3b82f6;
  --purple: #a855f7;
  --green: #34d399;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.section-band {
  position: relative;
  overflow: hidden;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(18, 18, 18, 0.82);
  border-bottom: 1px solid #252525;
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(100% - 48px, 1280px);
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 160ms ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #60a5fa;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 9px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 22px;
  padding: 0 24px 28px;
  background: rgba(18, 18, 18, 0.96);
  border-bottom: 1px solid #252525;
  font-size: 18px;
  font-weight: 650;
}

.mobile-nav.is-open {
  display: flex;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  background: #050505;
}

.noise {
  position: fixed;
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.06), transparent 1px);
  background-size: 5px 5px, 7px 7px;
  mix-blend-mode: overlay;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image:
    linear-gradient(#fff 1px, transparent 1px),
    linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 50px 50px;
}

.cursor-glow {
  position: fixed;
  z-index: 0;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(59, 130, 246, 0.11);
  filter: blur(100px);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  margin: 0 0 30px;
  font-size: clamp(58px, 9vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 850;
}

.hero-name {
  position: relative;
  display: inline-block;
  background: linear-gradient(#fff, #fff 45%, #666);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-name svg {
  position: absolute;
  width: 48px;
  height: 48px;
  right: -48px;
  top: -16px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-subtitle {
  position: relative;
  display: inline-block;
  margin-top: 14px;
  color: #a3a3a3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6.3vw, 78px);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.04em;
}

.hero-subtitle svg {
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 100%;
  height: 12px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.7;
}

.hero-copy {
  max-width: 680px;
  margin: 0 0 46px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.7;
  font-weight: 300;
}

.primary-button,
.convert-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.primary-button,
.convert-button {
  padding: 0 32px;
  background: #fff;
  color: #000;
}

.primary-button:hover,
.convert-button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #60a5fa;
  color: #fff;
}

.primary-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ghost-button {
  padding: 0 30px;
  border: 1px solid var(--line-strong);
  color: #fff;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.side-card {
  position: absolute;
  top: 30%;
  width: 224px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

.left-card {
  left: 0;
  transform: rotate(-5deg) skewY(6deg);
  border-left: 4px solid #10b981;
}

.right-card {
  right: 0;
  transform: rotate(5deg) skewY(-6deg);
  border-right: 4px solid var(--blue);
}

.window-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  opacity: 0.55;
}

.window-dots.align-right {
  justify-content: flex-end;
}

.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.code-card pre {
  margin: 0;
  color: #34d399;
  text-align: left;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.scan-preview {
  position: relative;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.45);
  font-size: 30px;
  font-weight: 800;
}

.scan-preview b {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--blue);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.9);
  animation: scan 2.4s linear infinite;
}

.scan-label {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: #737373;
  font: 10px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.playground,
.intro,
.features,
.use-cases,
.pipeline,
.faq {
  padding: 96px 0;
  background: var(--band);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-heading {
  margin-bottom: 48px;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 680px);
  gap: 32px;
  align-items: end;
}

.centered {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(147, 197, 253, 0.9);
  font: 12px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.section-heading h2,
.intro-copy h2,
.cta h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.ocr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.upload-panel,
.output-panel {
  min-height: 420px;
  border-radius: 24px;
  background: var(--panel-soft);
}

.upload-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
  text-align: center;
  border: 1px dashed var(--line-strong);
  cursor: pointer;
}

.upload-panel input {
  display: none;
}

.upload-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 22px;
  background: #fff;
  color: #000;
}

.upload-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-panel strong {
  margin-bottom: 12px;
  font-size: 26px;
}

.upload-copy {
  max-width: 440px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.select-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 750;
}

.preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: contain;
  padding: 24px;
  background: #111;
}

.upload-panel.has-preview .preview-image {
  display: block;
}

.output-panel {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line-strong);
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.panel-top p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.panel-top h3 {
  margin: 0;
  font-size: 22px;
}

.status-pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 12px;
  color: #93c5fd;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

textarea {
  min-height: 0;
  flex: 1;
  width: 100%;
  resize: none;
  outline: none;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #090909;
  color: #fff;
  padding: 20px;
  font-size: 14px;
  line-height: 1.75;
}

textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.center-row {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.convert-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 64px;
  align-items: center;
}

.intro-copy h2 {
  display: inline-block;
  color: transparent;
  background: linear-gradient(90deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
}

.intro-copy h3 {
  margin: 32px 0;
  padding-left: 24px;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 25px;
  font-weight: 300;
}

.intro-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
}

.stat-grid,
.case-grid,
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stat-card,
.version-card,
.case-grid article,
.pipeline-grid article,
.feature-card,
.faq details {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--panel);
}

.stat-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 18px;
}

.stat-card .icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
  font-size: 13px;
}

.blue { color: #60a5fa; }
.purple { color: #c084fc; }
.green { color: #34d399; }

.stat-card b {
  margin-top: 20px;
  font-size: 21px;
}

.stat-card small,
.version-card small {
  margin-top: 5px;
  color: #737373;
  font: 11px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.version-card {
  position: relative;
  min-height: 128px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-style: dashed;
  border-radius: 18px;
}

.version-card b {
  font: 800 28px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.version-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--green));
  opacity: 0.6;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.feature-card {
  grid-column: span 4;
  min-height: 320px;
  padding: 32px;
  border-radius: 34px;
  overflow: hidden;
}

.feature-card.wide {
  grid-column: span 8;
}

.feature-card h3 {
  margin: 0 0 22px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.feature-card:not(.wide) h3 {
  font-size: 30px;
}

.feature-card p {
  max-width: 620px;
  margin: 0;
  color: #a3a3a3;
  font-size: 18px;
  line-height: 1.62;
}

.precision-box {
  position: relative;
  height: 190px;
  display: grid;
  place-items: center;
  margin-top: 48px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  background: linear-gradient(90deg, #111827, #151515);
}

.precision-box::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: repeating-linear-gradient(90deg, #fff 0 8px, transparent 8px 24px);
}

.precision-box span {
  position: absolute;
  color: rgba(255, 255, 255, 0.08);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 70px;
  font-style: italic;
}

.precision-box b {
  position: relative;
  border-radius: 999px;
  padding: 11px 24px;
  background: var(--blue);
  box-shadow: 0 0 34px rgba(59, 130, 246, 0.5);
  font: 13px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.12em;
}

.feature-card.muted {
  background: #0f0f0f;
}

.case-grid article,
.pipeline-grid article {
  padding: 28px;
  border-radius: 24px;
}

.case-grid h3,
.pipeline-grid h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.case-grid p,
.pipeline-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.pipeline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pipeline-grid span {
  display: inline-block;
  margin-bottom: 28px;
  color: #60a5fa;
  font: 12px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.24em;
}

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.faq details {
  border-radius: 18px;
  padding: 22px 24px;
}

.faq summary {
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  font-weight: 750;
}

.faq details p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.cta {
  padding: 110px 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.18), transparent 34%),
    #080808;
}

.cta-inner {
  text-align: center;
}

.cta h2 {
  max-width: 920px;
  margin: 0 auto 24px;
  font-size: clamp(48px, 7vw, 78px);
}

.cta p {
  max-width: 640px;
  margin: 0 auto 42px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.65;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.site-footer {
  padding: 80px 0 34px;
  background: #121212;
  border-top: 1px solid #252525;
}

.legal-page {
  position: relative;
  min-height: 100vh;
  padding: 140px 0 92px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 0%, rgba(59, 130, 246, 0.15), transparent 34%),
    #050505;
}

.legal-shell {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(17, 17, 17, 0.68);
  backdrop-filter: blur(18px);
}

.legal-shell h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.legal-shell .updated {
  margin: 0 0 44px;
  color: #737373;
  font-size: 14px;
}

.legal-shell section + section,
.legal-shell p + h2 {
  margin-top: 36px;
}

.legal-shell h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.legal-shell p,
.legal-shell li {
  color: #b5b5b5;
  font-size: 18px;
  line-height: 1.78;
}

.legal-shell p {
  margin: 0 0 18px;
}

.legal-shell strong {
  color: #fff;
}

.legal-shell ul {
  margin: 18px 0 0;
  padding-left: 24px;
}

.legal-shell li + li {
  margin-top: 10px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}

.footer-grid p {
  max-width: 350px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-grid nav {
  display: grid;
  gap: 16px;
}

.footer-grid h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.footer-grid nav a {
  color: var(--muted);
  font-size: 14px;
}

.footer-grid nav a:hover {
  color: #fff;
}

.copyright {
  margin-top: 58px;
  padding-top: 26px;
  border-top: 1px solid #252525;
  color: var(--muted);
  font-size: 12px;
}

@keyframes scan {
  0% { transform: translateY(0); }
  50% { transform: translateY(94px); }
  100% { transform: translateY(0); }
}

@media (max-width: 1120px) {
  .side-card {
    display: none;
  }

  .feature-card,
  .feature-card.wide {
    grid-column: span 6;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    width: min(100% - 32px, 1280px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero {
    padding-top: 116px;
  }

  .hero-name svg {
    width: 34px;
    height: 34px;
    right: -28px;
  }

  .split-heading,
  .ocr-grid,
  .intro-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid,
  .case-grid,
  .pipeline-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card.wide {
    grid-column: 1 / -1;
  }

  .upload-panel,
  .output-panel {
    min-height: 360px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero-subtitle {
    font-size: 32px;
  }

  .playground,
  .intro,
  .features,
  .use-cases,
  .pipeline,
  .faq {
    padding: 72px 0;
  }

  .feature-card,
  .case-grid article,
  .pipeline-grid article {
    border-radius: 20px;
    padding: 24px;
  }

  .cta-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .legal-shell {
    padding: 28px;
    border-radius: 22px;
  }
}
