/* PageScan site. One theme family (auto light/dark), one accent (cyan).
   Shape rule: cards and images 16px, interactive controls fully rounded. */

@font-face { font-family: "Geist"; src: url("/fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f4f8f9;
  --surface: #ffffff;
  --tint: #ddf6fa;
  --ink: #0f1b20;
  --muted: #52636a;
  --line: #dde7ea;
  --accent: #0a9ab0;
  --accent-ink: #ffffff;
  --accent-strong: #087f92;
  --shadow: 0 24px 48px -28px rgba(8, 90, 104, 0.35);
  --radius: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1214;
    --surface: #152024;
    --tint: #10363d;
    --ink: #eef5f6;
    --muted: #97a9ae;
    --line: #24333a;
    --accent: #2cc9dd;
    --accent-ink: #062a31;
    --accent-strong: #5bd6e6;
    --shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
p { margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Phosphor icons, used as masks so they take the text color. */
.ic {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}

/* Navigation */

header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

header.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

nav.links { display: flex; align-items: center; gap: 28px; }
nav.links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
nav.links a:hover { color: var(--ink); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
}

.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0 88px;
}

.hero h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 700; max-width: 11em; }
.hero h1 span { color: var(--accent); }
.hero .lead { font-size: 19px; color: var(--muted); margin: 22px 0 34px; max-width: 30em; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.hero-art {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

/* Features: 5 cells, 3 columns. The OCR image cell runs down two rows; sharing spans the last row. */

section { padding: 88px 0; }
section h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; max-width: 18em; }
.section-lead { color: var(--muted); margin-top: 14px; max-width: 34em; }

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 44px;
}

.cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.cell h3 { font-size: 22px; font-weight: 600; }
.cell p { color: var(--muted); font-size: 16px; }
.cell .ic { color: var(--accent); width: 28px; height: 28px; }

.cell-filters { grid-column: span 2; background: var(--tint); border-color: transparent; }
.cell-ocr { grid-row: span 2; }
.cell-ocr img, .cell-share img { border-radius: 12px; background: #fff; }
.cell-ocr img { margin-top: auto; }

.cell-share {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 32px;
}

.cell-share .copy { display: flex; flex-direction: column; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips span {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

/* How it works: three verbs on one line, joined by a rule. */

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 48px;
  position: relative;
}

.flow::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 28px;
  right: calc(33.33% - 28px);
  height: 2px;
  background: var(--line);
}

.flow div { position: relative; padding-right: 32px; }
.flow .dot {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  margin-bottom: 20px;
  padding: 0;
}
.flow .dot .ic { width: 26px; height: 26px; }
.flow h3 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.flow p { color: var(--muted); max-width: 22em; }

/* Privacy band: tinted, not inverted, so it stays in the page theme in light and dark. */

.privacy-band {
  background: var(--tint);
  border-radius: 24px;
  padding: 64px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
}

.privacy-band .shield {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--accent);
}
.privacy-band .shield .ic { width: 48px; height: 48px; }
.privacy-band p { color: var(--muted); margin-top: 14px; max-width: 38em; }
.privacy-band a { font-weight: 600; }

/* FAQ: title on the left, accordion on the right. */

.faq {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}

details { border-bottom: 1px solid var(--line); padding: 20px 0; }
details:first-child { padding-top: 0; }
details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent); font-weight: 500; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { color: var(--muted); margin-top: 10px; max-width: 36em; }

/* Footer */

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
  color: var(--muted);
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
footer a { color: var(--muted); margin-right: 20px; }
footer a:last-child { margin-right: 0; }

/* Legal pages */

article.legal { max-width: 720px; padding: 40px 0 72px; }
article.legal h1 { font-size: 38px; margin: 0 0 8px; }
article.legal h2 { font-size: 21px; margin: 34px 0 8px; }
article.legal p, article.legal li { color: var(--muted); }
article.legal p + p { margin-top: 12px; }

/* Motion: the hero settles in once, sections rise as they enter. Both skip under reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero > :nth-child(2) { animation-delay: 0.12s; }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* Mobile: every multi-column block collapses to one column. */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 24px 0 64px; }
  .bento { grid-template-columns: 1fr; }
  .cell-filters, .cell-ocr, .cell-share { grid-column: auto; grid-row: auto; }
  .cell-share { grid-template-columns: 1fr; gap: 20px; }
  .flow { grid-template-columns: 1fr; gap: 32px; }
  .flow::before { display: none; }
  .privacy-band { grid-template-columns: 1fr; padding: 36px 24px; gap: 24px; }
  .faq { grid-template-columns: 1fr; gap: 24px; }
  section { padding: 64px 0; }
  nav.links a:not(.keep) { display: none; }
}
