:root {
  color-scheme: dark;
  --bg: #070916;
  --bg-deep: #03040b;
  --surface: rgba(16, 18, 31, 0.78);
  --surface-solid: #121525;
  --surface-soft: rgba(255, 255, 255, 0.08);
  --text: #f7f8ff;
  --muted: #b7bfd9;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.28);
  --accent: #5364ff;
  --accent-strong: #4050f2;
  --accent-soft: rgba(83, 100, 255, 0.18);
  --accent-contrast: #ffffff;
  --success: #8ee9da;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7ff;
  --bg-deep: #eef2ff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-soft: rgba(8, 15, 38, 0.06);
  --text: #101426;
  --muted: #5e6784;
  --line: rgba(16, 20, 38, 0.12);
  --line-strong: rgba(16, 20, 38, 0.22);
  --accent: #4050f2;
  --accent-strong: #3240cf;
  --accent-soft: rgba(64, 80, 242, 0.12);
  --accent-contrast: #ffffff;
  --success: #0d766e;
  --shadow: 0 28px 80px rgba(23, 33, 72, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Aptos",
    "Geist",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px) saturate(150%);
}

.brand,
.nav-links,
.header-actions,
.hero-actions,
.result-actions,
.footer-links,
.privacy-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 780;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(145deg, #ffffff 0%, #5364ff 38%, #101426 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 14px 34px rgba(83, 100, 255, 0.34);
}

.nav-links {
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  white-space: nowrap;
}

.nav-links a {
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.header-actions {
  justify-content: flex-end;
  gap: 10px;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.theme-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 8px 0 0 -2px var(--bg), 10px 0 0 -2px var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 740;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button-primary {
  color: var(--accent-contrast);
  background: var(--accent-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 18px 42px rgba(83, 100, 255, 0.34);
}

.button-primary:hover {
  background: var(--accent);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.07);
}

.button-secondary:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.12);
}

.button-small {
  min-height: 40px;
  padding-inline: 16px;
  font-size: 0.92rem;
}

.hero-product {
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - 72px);
  overflow: hidden;
  padding: clamp(64px, 8vw, 104px) clamp(18px, 4vw, 56px) 72px;
  background:
    linear-gradient(180deg, rgba(7, 9, 22, 0.1), var(--bg) 94%),
    var(--bg-deep);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 4, 11, 0.86), rgba(3, 4, 11, 0.06) 48%, rgba(3, 4, 11, 0.9)),
    linear-gradient(180deg, rgba(3, 4, 11, 0.5), rgba(3, 4, 11, 0.2) 54%, rgba(3, 4, 11, 0.96)),
    url("assets/hero-ocr-blue.jpg") center / cover no-repeat;
}

.hero-center {
  width: min(100%, 1040px);
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin: 0 auto 18px;
  font-size: clamp(3rem, 6.4vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 4vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.hero-subtitle {
  max-width: 680px;
  margin: 0 auto 28px;
  color: rgba(247, 248, 255, 0.82);
  font-size: clamp(1.05rem, 1.8vw, 1.24rem);
}

.ocr-panel {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(12, 14, 24, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(145%);
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 680;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: clamp(188px, 25vw, 252px);
  padding: clamp(28px, 5vw, 46px);
  text-align: center;
  border: 1.5px dashed rgba(142, 233, 218, 0.58);
  border-radius: calc(var(--radius) - 6px);
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  transform: translateY(-2px);
  border-color: var(--success);
  background: rgba(83, 100, 255, 0.14);
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-title {
  display: block;
  color: var(--text);
  font-size: clamp(1.25rem, 2.4vw, 1.72rem);
  font-weight: 780;
}

.drop-copy {
  display: block;
  max-width: 58ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.tool-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.tool-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 680;
  text-align: left;
}

select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.08);
}

.control-hint {
  max-width: 48ch;
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.35;
}

.progress-wrap {
  margin-top: 14px;
}

.progress-label {
  margin-bottom: 8px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--success), var(--accent));
  transition: width 220ms ease;
}

.result-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
  margin-top: 16px;
}

.preview-box,
.result-box {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 6px);
  background: rgba(255, 255, 255, 0.06);
}

.preview-box {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
}

.preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-box {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.result-label {
  padding: 13px 16px 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
}

textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 16px 14px;
  resize: vertical;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
  line-height: 1.55;
}

textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}

.result-actions {
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.quick-nav {
  display: flex;
  gap: 12px;
  max-width: 1120px;
  margin: -38px auto 0;
  padding: 0 clamp(18px, 4vw, 56px);
  overflow-x: auto;
}

.quick-nav a {
  flex: 0 0 auto;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-solid) 76%, transparent);
  backdrop-filter: blur(18px);
}

.quick-nav a:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 124px) clamp(18px, 4vw, 56px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading p,
.product-card p,
.privacy-copy p,
.privacy-list p,
.resource-grid p,
.faq-list p,
.site-footer p {
  color: var(--muted);
}

.compact {
  max-width: 620px;
}

.product-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.95fr 0.95fr;
  grid-auto-rows: minmax(210px, auto);
  gap: 16px;
}

.product-card,
.resource-grid a,
.faq-list details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-card {
  padding: 24px;
}

.product-card-tall {
  grid-row: span 2;
  padding: 0;
}

.product-card-tall img {
  width: 100%;
  height: 100%;
  min-height: 436px;
  object-fit: cover;
}

.product-card-accent {
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(83, 100, 255, 0.9), rgba(18, 21, 37, 0.95)),
    var(--surface-solid);
}

.product-card-accent p {
  color: rgba(255, 255, 255, 0.78);
}

.privacy-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.privacy-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.privacy-list {
  display: grid;
  gap: 14px;
}

.privacy-list article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.privacy-list strong {
  display: block;
  margin-bottom: 7px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.resource-grid a {
  display: grid;
  min-height: 220px;
  align-content: start;
  gap: 12px;
  padding: 24px;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.resource-grid a:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.resource-grid span {
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resource-grid strong {
  font-size: 1.28rem;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  padding: 18px 20px;
  box-shadow: none;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 740;
}

.faq-list p {
  margin: 12px 0 0;
  max-width: 72ch;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 40px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-deep) 72%, var(--bg));
}

.site-footer p {
  max-width: 460px;
  margin: 12px 0 0;
}

.footer-links {
  gap: 18px;
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.simple-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) clamp(18px, 4vw, 56px);
}

.simple-hero {
  display: grid;
  gap: 24px;
  max-width: 760px;
  margin-bottom: 48px;
}

.simple-hero h1 {
  font-size: clamp(3rem, 7vw, 5.6rem);
}

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

.simple-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-center,
  .quick-nav,
  .product-card,
  .privacy-copy,
  .privacy-list article,
  .resource-grid a,
  .faq-list details {
    animation: rise-in 680ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .quick-nav {
    animation-delay: 120ms;
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(18px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 1060px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero-product {
    min-height: auto;
  }

  .product-grid,
  .resource-grid,
  .simple-grid {
    grid-template-columns: 1fr;
  }

  .privacy-section {
    grid-template-columns: 1fr;
  }

  .product-card-tall img {
    min-height: 320px;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 64px;
    padding: 12px 16px;
  }

  .brand span:last-child {
    display: none;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .header-actions .button {
    min-height: 38px;
    padding-inline: 14px;
  }

  .hero-product {
    padding: 44px 16px 64px;
  }

  h1 {
    font-size: clamp(2.65rem, 13.5vw, 4.15rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .ocr-panel {
    padding: 14px;
  }

  .drop-zone {
    min-height: 180px;
  }

  .tool-controls,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .tool-controls .button,
  .result-actions .button,
  .privacy-actions .button {
    width: 100%;
  }

  .result-actions,
  .privacy-actions {
    align-items: stretch;
  }

  .quick-nav {
    margin-top: -28px;
    padding-inline: 16px;
  }

  .section,
  .simple-page {
    padding-inline: 16px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}
