/* Auto-Reader landing page — palette locked to the app's dark-gold theme. */
:root {
  --bg: #0D0907;
  --bg-elev: #15100D;
  --bg-elev-2: #1F1813;
  --ink: #F5E6D3;
  --ink-dim: #BDA88E;
  --ink-faint: #7A6A57;
  --accent: #D4A574;
  --accent-hi: #E7C49C;
  --accent-glow: rgba(212, 165, 116, 0.15);
  --border: rgba(245, 230, 211, 0.08);
  --border-strong: rgba(245, 230, 211, 0.18);
  --serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; border-top: 1px solid var(--border); scroll-margin-top: 64px; }
section:first-of-type { border-top: none; }

.eyebrow {
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.5px; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 6px; }
.section-blurb { color: var(--ink-dim); max-width: 560px; margin-bottom: 28px; }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 9, 7, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.5px; }
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 14px 2px var(--accent-glow);
}
/* Small app icon in the top bar (replaces the bare dot when present). */
.appicon {
  width: 26px; height: 26px; border-radius: 7px; display: block;
  box-shadow: 0 0 0 1px var(--border-strong), 0 4px 12px rgba(0,0,0,0.4);
}
.brand small { color: var(--ink-dim); font-weight: 400; }
.nav a { color: var(--ink-dim); margin-left: 22px; font-size: 14px; transition: color 0.2s ease; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--accent); }
/* A soft shadow appears under the bar once the page is scrolled. */
.topbar { transition: box-shadow 0.25s ease; }
.topbar.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); }
[dir="rtl"] .nav a { margin-left: 0; margin-right: 22px; }
@media (max-width: 640px) { .nav { display: none; } }

/* ---- Hero ---- */
.hero { text-align: center; padding: 88px 0 80px; position: relative; }
/* Soft breathing gold halo behind the hero. */
.hero::before {
  content: ""; position: absolute; inset: -10% 0 auto 0; height: 520px;
  margin: 0 auto; max-width: 760px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 72%);
  filter: blur(8px); z-index: -1; pointer-events: none;
  animation: halo 7s ease-in-out infinite;
}
@keyframes halo {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.06); }
}
.hero-icon {
  width: 104px; height: 104px; border-radius: 24px; display: block; margin: 0 auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.55));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  margin: 22px auto 0;
  max-width: 12ch;
}
.hero h1 em { color: var(--accent); font-style: italic; font-weight: 400; }
/* A gold light sweeps across the accent words every few seconds. */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero h1 em {
    background: linear-gradient(110deg,
      var(--accent) 42%, var(--accent-hi) 50%, #FFF3E2 53%, var(--accent-hi) 56%, var(--accent) 64%);
    background-size: 250% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: shine 6.5s ease-in-out infinite;
  }
  @keyframes shine {
    0%, 52%, 100% { background-position: 115% 0; }
    72% { background-position: -15% 0; }
  }
}
.hero .tagline {
  color: var(--ink-dim);
  font-size: clamp(16px, 2.2vw, 20px);
  max-width: 620px;
  margin: 22px auto 0;
}

/* ---- Store buttons ---- */
.badges, .stores { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 12px 18px; color: var(--ink); font-weight: 500;
}
.badge.soon { color: var(--ink-faint); }
.badge .store-sub { display: block; color: var(--ink-faint); font-size: 11px; font-weight: 400; }

.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 11px 20px; color: var(--ink);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.store-btn:hover {
  color: var(--ink); border-color: var(--accent);
  background: var(--accent-glow); transform: translateY(-2px);
}
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn .label { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
[dir="rtl"] .store-btn .label { text-align: right; }
.store-btn .label small { font-size: 11px; letter-spacing: 0.5px; color: var(--ink-dim); text-transform: uppercase; }
.store-btn .label b { font-size: 17px; font-weight: 600; }
.store-btn.soon { opacity: 0.6; cursor: default; }
.store-btn.soon:hover { border-color: var(--border-strong); background: var(--bg-elev); transform: none; }

/* ---- Trust chips ---- */
.trust { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.trust span {
  font-size: 13px; color: var(--ink-dim);
  border: 1px solid var(--border); border-radius: 50px; padding: 6px 14px;
  background: rgba(245, 230, 211, 0.02);
}
.trust span b { color: var(--accent); font-weight: 600; }

/* ---- Card grids ---- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  border-color: var(--border-strong); transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-glow); color: var(--accent);
  display: grid; place-items: center; font-size: 20px; margin-bottom: 14px;
}
.card h3 { font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: 0; }
.card p { color: var(--ink-dim); font-size: 14px; margin-top: 6px; }

/* ---- Feature highlights ---- */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.feature {
  padding: 22px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.feature h3 { font-family: var(--serif); font-size: 20px; }
.feature p { color: var(--ink-dim); margin-top: 8px; font-size: 15px; }

/* ---- Screenshots ---- */
.shots { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.shot { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.shot figcaption { color: var(--ink-dim); font-size: 13px; text-align: center; }
.phone {
  position: relative; overflow: hidden;
  aspect-ratio: 9 / 19.5; border-radius: 26px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shot:hover .phone { transform: translateY(-4px); box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6); }
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- FAQ ---- */
.faq details {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 18px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
/* The + pivots into an × as the answer opens. */
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
/* Animate the answer's height where the browser supports it (newer Chrome/Edge);
   elsewhere it simply opens instantly, as before. */
@supports (interpolate-size: allow-keywords) {
  .faq details::details-content {
    block-size: 0; overflow: clip;
    transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
}
:root { interpolate-size: allow-keywords; }
.faq p { color: var(--ink-dim); padding: 0 0 16px; font-size: 15px; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--ink-faint); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; align-items: center; }
footer a { color: var(--ink-dim); margin-left: 18px; }
[dir="rtl"] footer a { margin-left: 0; margin-right: 18px; }

.center { text-align: center; }

/* ---- Auto-hiding language toggle ---- */
.langfab {
  position: fixed; top: 14px; left: 14px; z-index: 50;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-glow);
  border: 1px solid rgba(212, 165, 116, 0.45);
  color: var(--accent); border-radius: 50px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  opacity: 0.92; transition: opacity 0.45s ease; backdrop-filter: blur(6px);
}
.langfab.idle { opacity: 0; pointer-events: none; }
.langfab:hover { opacity: 1; }
[dir="rtl"] .langfab { left: auto; right: 14px; }
[dir="rtl"] body { text-align: right; }

/* ---- Scroll-reveal entrance ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
/* Stagger children as a grid/list reveals. */
.grid > .reveal:nth-child(2), .features > .reveal:nth-child(2), .shots > .reveal:nth-child(2) { transition-delay: 0.06s; }
.grid > .reveal:nth-child(3), .features > .reveal:nth-child(3), .shots > .reveal:nth-child(3) { transition-delay: 0.12s; }
.grid > .reveal:nth-child(4), .features > .reveal:nth-child(4), .shots > .reveal:nth-child(4) { transition-delay: 0.18s; }
.grid > .reveal:nth-child(5), .features > .reveal:nth-child(5), .shots > .reveal:nth-child(5) { transition-delay: 0.24s; }
.grid > .reveal:nth-child(6), .features > .reveal:nth-child(6) { transition-delay: 0.30s; }
.grid > .reveal:nth-child(7), .features > .reveal:nth-child(7) { transition-delay: 0.36s; }
.grid > .reveal:nth-child(8) { transition-delay: 0.42s; }

/* ---- Hero load entrance ---- */
.hero .hero-icon { animation: float 6s ease-in-out infinite, rise 0.8s ease both; }
.hero .eyebrow, .hero h1, .hero .tagline, .hero .stores, .hero .badges, .hero .trust { animation: rise 0.7s ease both; }
.hero .eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.12s; }
.hero .tagline { animation-delay: 0.20s; }
.hero .stores, .hero .badges { animation-delay: 0.30s; }
.hero .trust { animation-delay: 0.40s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---- Closing call-to-action ---- */
.cta { text-align: center; }
.cta .section-blurb { margin: 10px auto 0; }
.cta .stores { margin-top: 26px; }
.cta .note { color: var(--ink-faint); font-size: 13px; margin-top: 16px; }

/* ---- Keyboard focus ---- */
a:focus-visible, summary:focus-visible, .store-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

/* ---- "Try the web reader" CTA ---- */
.trybtn {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--accent); font-weight: 600; font-size: 15px;
  border: 1px solid rgba(212, 165, 116, 0.45); background: var(--accent-glow);
  border-radius: 50px; padding: 11px 22px;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.trybtn:hover { background: rgba(212, 165, 116, 0.22); color: var(--accent-hi); transform: translateY(-2px); border-color: var(--accent); }
.nav a.try { color: var(--accent); font-weight: 600; }
.foot-tag { color: var(--ink-faint); font-size: 12px; margin-top: 5px; }

/* ---- Respect reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before, .hero-icon, .phone::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .hero-icon, .hero .eyebrow, .hero h1, .hero .tagline, .hero .stores, .hero .badges, .hero .trust { animation: none; }
  .hero h1 em { animation: none; }
  .faq details::details-content { transition: none; }
}

/* ═══════════ OCR page additions (ocr.auto-reader.com) ═══════════
   Everything above is the shared Auto-Reader design system, verbatim.
   Components below extend it for the API landing page. */

:root { --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace; }

/* Signature OCR detection-box motif, in brand gold. */
.detect {
  position: relative; display: inline-block; padding: 0 10px;
  border: 1.5px dashed rgba(212, 165, 116, 0.55); border-radius: 4px;
  background: var(--accent-glow);
}
.detect::after {
  content: attr(data-conf);
  position: absolute; top: -0.95em; right: -2px;
  font-family: var(--mono); font-style: normal;
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
  color: var(--accent); -webkit-text-fill-color: var(--accent);
}

/* Hero scan demo — a dark elevated "document being read" card. */
.scanner {
  max-width: 720px; margin: 44px auto 0; text-align: left;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.scanner .bar { display: flex; gap: 6px; margin-bottom: 12px; }
.scanner .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.doc {
  position: relative; overflow: hidden; border-radius: 10px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  padding: 18px 18px 12px; min-height: 130px;
}
.doc p { direction: rtl; font-size: 16px; line-height: 2.2; color: var(--ink); }
.doc .dline { position: relative; display: inline-block; padding: 0 4px; }
.doc .dline.on { outline: 1.5px dashed rgba(212, 165, 116, 0.55); outline-offset: 2px; background: var(--accent-glow); }
.doc .dline .conf { display: none; position: absolute; top: -1em; left: 0; font-family: var(--mono); font-size: 10px; color: var(--accent); }
.doc .dline.on .conf { display: block; }
.beam {
  position: absolute; left: 0; right: 0; top: -4px; height: 3px;
  background: var(--accent-hi); box-shadow: 0 0 18px 3px var(--accent-glow), 0 0 6px 1px var(--accent);
  opacity: 0;
}
.console {
  margin-top: 12px; background: #0A0705; border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 15px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  color: var(--ink-dim); min-height: 128px; white-space: pre-wrap; word-break: break-word;
}
.replay {
  margin-top: 10px; background: none; cursor: pointer;
  border: 1px solid var(--border-strong); color: var(--ink-dim);
  font-family: var(--mono); font-size: 12px; padding: 6px 14px; border-radius: 50px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.replay:hover { border-color: var(--accent); color: var(--accent); }

/* Route label on endpoint cards. */
.route { font-family: var(--mono); font-size: 13px; color: var(--accent); display: block; margin-bottom: 8px; }

/* Code blocks + quickstart tabs. */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button {
  font-family: var(--mono); font-size: 13px; cursor: pointer;
  padding: 8px 16px; border-radius: 50px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--ink-dim);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.tabs button:hover { color: var(--ink); border-color: var(--accent); }
.tabs button.active { color: var(--accent); border-color: var(--accent); background: var(--accent-glow); font-weight: 600; }
.codeblock {
  background: #0A0705; border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
  font-family: var(--mono); font-size: 13px; line-height: 1.8;
  color: var(--ink-dim); overflow-x: auto; white-space: pre;
}
.codeblock .c { color: var(--ink-faint); }
.codeblock .k { color: var(--accent); }
.codeblock .s { color: var(--accent-hi); }

/* Live demo dropzone. */
.dropzone {
  border: 2px dashed rgba(212, 165, 116, 0.4); border-radius: 16px;
  padding: 46px 24px; text-align: center; cursor: pointer;
  background: var(--bg-elev);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.dropzone.hot, .dropzone:hover { border-color: var(--accent); background: var(--accent-glow); transform: translateY(-2px); }
.linklike { background: none; border: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.linklike:hover { color: var(--accent-hi); }

/* Pricing. */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); max-width: 860px; }
.plan {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.plan:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
.plan.featured { border-color: rgba(212, 165, 116, 0.5); box-shadow: 0 0 34px rgba(212, 165, 116, 0.08); }
.plan .name { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 12px; }
.plan .price { font-family: var(--serif); font-size: 40px; font-weight: 300; color: var(--ink); }
.plan .price small { font-size: 15px; font-family: var(--sans); color: var(--ink-dim); }
.plan ul { list-style: none; margin: 18px 0 24px; }
.plan li { padding: 8px 0; font-size: 14.5px; color: var(--ink-dim); border-bottom: 1px dashed var(--border); }
.plan li:last-child { border: none; }
.plan li::before { content: "▸ "; color: var(--accent); }
.plan li b, .plan li strong { color: var(--ink); }

/* Signup. */
.signup { max-width: 560px; }
.signup input {
  width: 100%; padding: 14px 18px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--border-strong); border-radius: 12px; margin-bottom: 12px;
  background: var(--bg-elev); color: var(--ink);
}
.signup input::placeholder { color: var(--ink-faint); }
.signup input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.bigbtn {
  width: 100%; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  color: var(--accent); font-weight: 600; font-size: 15px;
  border: 1px solid rgba(212, 165, 116, 0.45); background: var(--accent-glow);
  border-radius: 50px; padding: 13px 22px;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.bigbtn:hover { background: rgba(212, 165, 116, 0.22); color: var(--accent-hi); transform: translateY(-2px); border-color: var(--accent); }
.keyout {
  display: none; margin-top: 16px; word-break: break-all; white-space: pre-wrap;
  background: #0A0705; border: 1px solid var(--border); color: var(--accent);
  font-family: var(--mono); font-size: 13px; padding: 16px; border-radius: 12px;
}
.keyout strong { color: var(--accent-hi); }

@media (prefers-reduced-motion: reduce) { .beam { display: none; } }
