/* ClearSlip — landing.
   Layout: left-aligned editorial column; the hero pairs copy with a printed receipt
   that a single scan pass turns into an expense. Everything else stays quiet. */
:root {
  --page: #f3f4f6;
  --surface: #ffffff;
  --ink: #16181b;
  --muted: #5d636c;
  --line: #dcdfe4;
  --red: #b02222;
  --red-ink: #ffffff;
  --red-soft: #f7e4e4;
  --paper: #ffffff;
  --thermal: #2e2e2e;
  --shadow: 0 1px 2px rgba(22, 24, 27, .06), 0 18px 40px -18px rgba(22, 24, 27, .28);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --surface: #141416;
    --ink: #f3f3f4;
    --muted: #a2a6ad;
    --line: #2a2b2f;
    --red: #d93636;
    --red-soft: #2b1213;
    --paper: #f6f6f3;
    --thermal: #2b2b2b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 24px 50px -20px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  font-feature-settings: "tnum" 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.narrow > * { max-width: 780px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand-small { font-size: 16px; }
.nav { display: flex; gap: 22px; margin-right: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.lang select {
  appearance: none; -webkit-appearance: none;
  font: 500 14px var(--font); color: var(--ink);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 32px 8px 12px; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red); color: var(--red-ink);
  font: 600 16px/1 var(--font);
  padding: 15px 22px; border-radius: 12px; border: 1px solid var(--red);
  text-decoration: none; transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 10px 16px; font-size: 14px; border-radius: 10px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); filter: none; }
.text-link { color: var(--red); font-weight: 600; text-underline-offset: 3px; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.version { color: var(--muted); font-size: 15px; font-weight: 500; margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; max-width: 14ch; }
.lead { font-size: 19px; color: var(--muted); max-width: 52ch; margin-top: 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fineprint { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* The receipt */
.demo { margin: 0; position: relative; display: grid; justify-items: center; }
.slip { position: relative; width: min(330px, 100%); transform: rotate(-2.2deg); filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .18)); }
.slip-paper {
  background: var(--paper); color: var(--thermal);
  font: 400 13.5px/1.55 var(--mono); letter-spacing: .01em;
  padding: 26px 24px 56px;
  --tooth: 9px;
  -webkit-mask: conic-gradient(from 135deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x,
                linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat;
          mask: conic-gradient(from 135deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x,
                linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat;
}
.slip-head { display: grid; justify-items: center; gap: 2px; text-align: center; padding-bottom: 14px; border-bottom: 1px dashed #b9b9b9; }
.slip-head strong { font-size: 20px; letter-spacing: .18em; font-weight: 500; }
.slip-head span { font-size: 11.5px; color: #6b6b6b; }
.slip-lines { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 4px; }
.slip-lines li, .slip-total { display: flex; justify-content: space-between; gap: 12px; }
.slip-total { border-top: 1px dashed #b9b9b9; padding-top: 12px; font-weight: 500; font-size: 15.5px; }
.slip-foot { margin-top: 12px; text-align: center; font-size: 11.5px; color: #6b6b6b; }
.scanline {
  position: absolute; left: -6%; right: -6%; top: 0; height: 2px;
  background: var(--red);
  box-shadow: 0 0 14px 3px color-mix(in srgb, var(--red) 55%, transparent);
  opacity: 0; pointer-events: none;
}
.entry {
  position: relative; z-index: 2;
  margin-top: -28px; width: min(360px, 104%);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; box-shadow: var(--shadow);
}
.entry-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.entry-text { display: grid; line-height: 1.3; min-width: 0; }
.entry-text strong { font-weight: 600; }
.entry-text span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .scanline { animation: scan 1.7s cubic-bezier(.45, .05, .35, 1) .5s 1 both; }
  .entry { animation: land .5s ease-out 2.15s 1 both; }
}
@keyframes scan {
  0% { top: 0; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes land {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-6px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* Sections */
.section { padding: 76px 0; }
.section h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; max-width: 22ch; }
.section-lead { color: var(--muted); max-width: 60ch; margin-top: 14px; font-size: 18px; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.two-col .btn, .two-col .text-link { margin-top: 26px; display: inline-flex; }

/* Features: a plain grid, no cards */
.features { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.features h3 { font-size: 18px; font-weight: 600; margin-top: 14px; letter-spacing: -.01em; }
.features p { color: var(--muted); font-size: 15.5px; margin-top: 6px; }
.f-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--red); background: var(--red-soft); }

/* Screenshots */
.screens-section { padding-bottom: 60px; }
.screens {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 34px max(20px, calc((100vw - 1120px) / 2 + 20px)) 20px;
  scrollbar-width: thin;
}
.phone { margin: 0; flex: 0 0 auto; width: 244px; scroll-snap-align: start; }
.phone img { width: 100%; border-radius: 28px; border: 6px solid #1c1c1f; background: #000; box-shadow: var(--shadow); }
.phone figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* Steps: a real sequence */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-weight: 700; font-size: 15px; color: var(--red); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.steps p { color: var(--muted); margin-top: 6px; }
.steps-compact { grid-template-columns: 1fr; gap: 0; margin-top: 0; }
.steps-compact li { border-top: 1px solid var(--line); padding: 16px 0 16px 44px; position: relative; }
.steps-compact li:last-child { border-bottom: 1px solid var(--line); }
.steps-compact li::before { position: absolute; left: 0; top: 16px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); margin: 0; font-size: 14px; }
.steps-compact p { color: var(--ink); margin: 2px 0 0; }

/* Privacy */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.checks li { padding: 18px 0 18px 36px; border-top: 1px solid var(--line); position: relative; }
.checks li:last-child { border-bottom: 1px solid var(--line); }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: 23px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10'%3E%3Cpath d='M1.5 5.2 4.5 8 10.5 1.8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

/* FAQ */
.faq { margin-top: 30px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--muted); padding: 0 0 22px; max-width: 64ch; }

/* Changelog */
.changelog { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 26px; }
.changelog li { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
.changelog h3 { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.changelog p { color: var(--muted); font-size: 16px; }
.changelog li:first-child h3 { color: var(--red); }

/* Contact */
.contact { padding-top: 40px; }
.contact .narrow { display: grid; gap: 16px; justify-items: start; border-top: 1px solid var(--line); padding-top: 40px; }
.beta { color: var(--muted); max-width: 64ch; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: 14px; }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-right: auto; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer .brand { color: var(--ink); }

/* Responsive */
@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .top-actions { margin-left: auto; }
}
@media (max-width: 820px) {
  .hero { padding-top: 44px; }
  .hero-in, .two-col { grid-template-columns: 1fr; gap: 44px; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .changelog li { grid-template-columns: 1fr; gap: 4px; }
  .section { padding: 56px 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; gap: 30px; }
  .topbar .btn-small:not(.btn-ghost) { display: none; }
  .lead { font-size: 17px; }
  .cta-row .btn { flex: 1 1 100%; }
}
