/* Perfect Scan landing page — Apple-like, restrained, transformation-first. */
:root {
  --ink: #0b0b0c; --ink-2: #3a3a3f; --muted: #6e6e76; --line: #e6e6ea; --bg: #ffffff; --bg-2: #f6f6f8; --paper: #f3f3f5;
  --radius: 22px; --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.06; }
h1 { font-size: clamp(2.7rem, 6.2vw, 4.8rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.alt { background: var(--bg-2); }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-head p { margin-top: 12px; font-size: 1.1rem; color: var(--muted); }
.sub { margin-top: 14px; font-size: 1.12rem; color: var(--muted); max-width: 460px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split > :first-child { order: 0; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #222; }
.btn-lg { min-height: 56px; padding: 16px 30px; font-size: 1.08rem; }
.btn svg { width: 18px; height: 18px; }
.btn:focus-visible, .ba:focus-visible, a:focus-visible { outline: 3px solid #0a84ff; outline-offset: 3px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; letter-spacing: -0.02em; font-size: 1.1rem; display: flex; gap: 10px; align-items: center; }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); position: relative; }
.brand .mark::after { content: ""; position: absolute; inset: 6px 7px; background: #fff; border-radius: 2px; }
.nav-links { display: flex; gap: 26px; align-items: center; font-weight: 500; color: var(--ink-2); }
.nav .btn { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
@media (max-width: 640px) { .nav-links a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(36px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero .lead { margin-top: 20px; font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--ink-2); max-width: 480px; }
.hero-cta { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.hero-cta.center { align-items: center; }
.micro { font-size: .95rem; color: var(--muted); }
@media (max-width: 860px) {
  .hero { padding-top: 28px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 26px; }
  .hero-copy { text-align: center; } .hero .lead { margin-left: auto; margin-right: auto; } .hero-cta { align-items: center; margin-top: 22px; }
}

/* Before / after */
.ba { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--paper); user-select: none; touch-action: pan-y; cursor: ew-resize; box-shadow: 0 24px 70px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.05); }
.hero-ba { width: min(100%, calc(min(72vh, 680px) * 0.75)); margin: 0 auto; }
.ba.small { position: absolute; left: 12px; right: 12px; top: 74px; bottom: 96px; aspect-ratio: auto; border-radius: 12px; box-shadow: none; cursor: default; }
.ba .pane { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ba .pane.after { clip-path: inset(0 calc(100% - var(--pos, 0%)) 0 0); background-color: var(--paper); }
.ba .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 0%); width: 1.5px; background: rgba(255,255,255,.95); transform: translateX(-.75px); box-shadow: 0 0 0 .5px rgba(0,0,0,.12); pointer-events: none; }
.ba .knob { position: absolute; top: 50%; left: var(--pos, 0%); width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); box-shadow: 0 4px 16px rgba(0,0,0,.22); display: grid; place-items: center; pointer-events: none; }
.ba .knob svg { width: 16px; height: 16px; }
.ba .tag { position: absolute; top: 14px; padding: 6px 11px; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .02em; background: rgba(255,255,255,.88); color: var(--ink); backdrop-filter: blur(6px); box-shadow: 0 1px 4px rgba(0,0,0,.12); pointer-events: none; transition: opacity .2s; }
.ba .tag.before { right: 14px; }
.ba .tag.after { left: 14px; }
.ba.at-after .tag.before, .ba.at-before .tag.after { opacity: 0; }
.ba.small .tag, .ba.small .knob { display: none; }
.ba.small .handle { width: 2px; }
.ba.empty::after { content: "Sample coming soon"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .95rem; }

/* Fix grid */
.fix-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.fix { margin: 0; }
.fix figcaption { margin-top: 12px; font-weight: 600; font-size: 1.05rem; }
@media (max-width: 760px) {
  .fix-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 -20px; padding: 0 20px 6px; scrollbar-width: none; }
  .fix-grid::-webkit-scrollbar { display: none; }
  .fix { flex: 0 0 82%; scroll-snap-align: center; }
}

/* Steps */
.steps { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-direction: column; gap: 20px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.steps .n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.steps b { display: block; font-size: 1.15rem; }
.steps p { color: var(--muted); margin-top: 2px; }

/* iPhone mockup */
.phone { width: min(320px, 86vw); aspect-ratio: 320 / 660; margin: 0 auto; border-radius: 52px; background: #0b0b0c; padding: 11px; box-shadow: 0 40px 100px rgba(0,0,0,.22), inset 0 0 0 2px #2a2a2e; position: relative; }
.phone-sm { width: min(290px, 80vw); }
.phone .screen { position: absolute; inset: 11px; border-radius: 42px; overflow: hidden; background: #fff; }
.phone .island { position: absolute; top: 22px; left: 50%; width: 96px; height: 28px; margin-left: -48px; border-radius: 15px; background: #000; z-index: 5; }
.phone .app { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
.phone .app.on { opacity: 1; }
.phone .bar { position: absolute; top: 58px; left: 18px; right: 18px; display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 500; }
.phone .bar .b { font-weight: 700; }
.phone .cam { background: #111; }
.phone .cam .view { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.9); }
.phone .cam .quad { position: absolute; left: 12%; top: 22%; width: 76%; height: 52%; border: 2px solid #fff; background: rgba(255,255,255,.1); border-radius: 3px; }
.phone .cam .quad i { position: absolute; width: 9px; height: 9px; background: #fff; border-radius: 50%; margin: -4.5px; }
.phone .cam .hint { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: rgba(0,0,0,.45); }
.phone .cam .shutter { position: absolute; bottom: 36px; left: 50%; width: 68px; height: 68px; margin-left: -34px; border-radius: 50%; border: 4px solid #fff; transition: transform .15s; }
.phone .cam .shutter::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.phone .proc { display: grid; place-items: center; background: #fff; text-align: center; }
.phone .proc .spin { width: 28px; height: 28px; margin: 0 auto; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 1s linear infinite; }
.phone .proc p { margin-top: 12px; font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }
.phone .result { background: #f2f2f5; }
.phone .result .tools { position: absolute; bottom: 0; left: 0; right: 0; height: 80px; padding: 14px 18px 26px; display: flex; justify-content: space-around; font-size: 11px; color: var(--ink-2); background: #fff; border-top: 1px solid var(--line); }
.phone .home { background: #fff; padding: 58px 18px 0; }
.phone .home h4 { margin: 8px 0 10px; font-size: 26px; letter-spacing: -0.02em; }
.phone .home .search { height: 36px; border-radius: 10px; background: #eeeef1; display: flex; align-items: center; padding: 0 10px; gap: 6px; color: #8e8e93; font-size: 14px; }
.phone .home .search b { color: var(--ink); font-weight: 500; }
.phone .home .search .caret { width: 1.5px; height: 16px; background: var(--ink); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.phone .home .docs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.phone .home .doc { transition: opacity .3s, transform .3s; }
.phone .home .doc.hide { opacity: 0; transform: scale(.96); }
.phone .home .doc .th { height: 118px; border-radius: 10px; background: #f2f2f5 center/contain no-repeat; background-size: 62%; }
.phone .home .doc .t1 { font-size: 12px; font-weight: 600; margin-top: 6px; line-height: 1.2; }
.phone .home .doc .t2 { font-size: 11px; color: #8e8e93; }
.phone .home .doc.new { animation: pop .4s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.phone .scanbtn { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); padding: 12px 26px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
.phone .pages { background: #fff; }
.pagelist { list-style: none; margin: 0; padding: 92px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.pagelist li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: #f6f6f8; font-size: 13px; transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .3s, background .3s; }
.pagelist li i { width: 42px; height: 54px; border-radius: 5px; background: #fff center/contain no-repeat; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.pagelist li span { flex: 1; font-weight: 500; }
.pagelist li b { color: #b0b0b6; font-weight: 400; }
.pagelist li.lift { transform: translateY(var(--dy, 0)) scale(1.03); box-shadow: 0 10px 24px rgba(0,0,0,.16); background: #fff; z-index: 2; position: relative; }
.pagelist li.shift { transform: translateY(var(--dy, 0)); }
.phone .export { position: absolute; bottom: 30px; left: 18px; right: 18px; height: 48px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; transition: transform .15s; }
.phone .export.tap { transform: scale(.97); }

/* Restoration */
.restore-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 0 auto; }
.restore-pair figure { margin: 0; }
.restore-pair img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.10); background: var(--paper); }
.restore-pair figcaption { margin-top: 10px; font-weight: 600; text-align: center; }
@media (max-width: 640px) { .restore-pair { grid-template-columns: 1fr; } }

/* Scan anything */
.things { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .things { grid-template-columns: repeat(2, 1fr); } }
.things li { position: relative; aspect-ratio: 1; border-radius: 18px; background: var(--bg-2) center/62% no-repeat; border: 1px solid var(--line); overflow: hidden; }
.things li[data-fit="tall"] { background-size: auto 78%; }
.things li[data-fit="cover"] { background-size: cover; }
.things li span { position: absolute; left: 14px; bottom: 12px; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.9); }

/* Privacy + share */
.pills { list-style: none; padding: 0; margin: 0; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.pills li { padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; background: #fff; }
.pills li::before { content: "✓"; margin-right: 8px; }
.fineprint { max-width: 620px; margin: 22px auto 0; text-align: center; color: var(--muted); font-size: .95rem; }
.fineprint a { text-decoration: underline; }
.share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; color: var(--ink-2); font-weight: 500; }
.share-row span { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.share-row .fmt { background: var(--ink); color: #fff; border-color: var(--ink); }
.share-row .dot { width: 6px; height: 6px; border-radius: 50%; background: #c7c7cc; padding: 0; border: 0; align-self: center; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 0 auto; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 28px; border-radius: 22px; border: 1px solid var(--line); background: #fff; position: relative; }
.plan.pro { border-color: var(--ink); }
.plan .badge { position: absolute; top: -12px; right: 20px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; }
.plan h3 { font-size: 1rem; color: var(--muted); font-weight: 600; }
.plan .price { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; line-height: 1.1; }
.plan .price small { font-size: 1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan .or { color: var(--muted); margin: 6px 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; color: var(--ink-2); }
.plan li { padding: 5px 0; display: flex; gap: 8px; align-items: center; }
.plan li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); flex: none; }
.plan .tiny { margin-top: 14px; font-size: .8rem; color: var(--muted); }
.pricing-cta { text-align: center; margin-top: 32px; }

/* Final */
.final { text-align: center; }
.final .ba { max-width: 460px; margin: 0 auto 40px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a:hover { color: var(--ink); }
footer .note { width: 100%; font-size: .8rem; color: #9a9aa2; }

/* Prose pages */
.prose { max-width: 720px; margin: 0 auto; padding: 60px 20px 90px; }
.prose h1 { font-size: 2.4rem; margin-bottom: 8px; }
.prose h2 { font-size: 1.4rem; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--ink-2); margin: 10px 0; font-size: 1.02rem; }
.prose ul { padding-left: 20px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
