/* Paapi landing page. Tokens first; no literal colours below this block. */
:root {
  color-scheme: dark;
  --bg: #0c0a15;
  --bg-2: #13111f;
  --bg-3: #1b1829;
  --line: #2b2742;
  --line-2: #3b3659;
  --text: #f3f1fa;
  --text-2: #c3bfd8;
  --muted: #9690b3;
  --accent: #8b7cff;
  --accent-hover: #a89cff;
  --accent-ink: #0c0a15;
  --accent-deep: #1e1748;
  --paper: #ecebf1;
  --paper-ink: #17141f;
  --paper-muted: #6b657f;
  --font-display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1240px;
  --gutter: 32px;
  --radius: 22px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 16px; top: -64px; z-index: 1000; padding: 12px 18px; background: var(--accent); color: var(--accent-ink); border-radius: 10px; font-weight: 600; transition: top 160ms var(--ease); }
.skip:focus { top: 12px; }
.ic { width: 18px; height: 18px; flex: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; text-wrap: balance; overflow-wrap: break-word; }
h2 { font-size: clamp(2.25rem, 4.4vw, 3.75rem); max-width: 18ch; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color 180ms var(--ease), transform 120ms var(--ease), box-shadow 180ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-light:hover { background: var(--paper); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }

/* nav */
.nav { position: sticky; top: 0; z-index: 300; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.03em; }
.brand img { height: 26px; width: auto; }
.nav-links { display: flex; gap: 8px; margin-left: auto; margin-right: 12px; }
.nav-links a { padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 0.9375rem; transition: color 160ms var(--ease), background-color 160ms var(--ease); }
.nav-links a:hover { color: var(--text); background: var(--bg-3); }

/* hero */
.hero { padding-top: clamp(40px, 6vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; column-gap: 72px; align-items: center; }
.hero h1 { font-size: clamp(3rem, 7vw, 6.25rem); font-weight: 800; line-height: 0.96; letter-spacing: -0.032em; max-width: 12ch; }
.hero-sub { margin-top: 28px; font-size: clamp(1.1875rem, 1.6vw, 1.375rem); line-height: 1.5; color: var(--text-2); max-width: 34ch; }
.cta-block { margin-top: 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.cta-note { color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }
.os-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.os-pills a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 14px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.9375rem; transition: background-color 160ms var(--ease), border-color 160ms var(--ease); }
.os-pills a:hover { background: var(--bg-3); border-color: var(--muted); }
.os-pills .ic { width: 20px; height: 20px; }

/* the receipt: the one memorable object */
.receipt-wrap { justify-self: end; width: 100%; max-width: 330px; transform: rotate(2.4deg); filter: drop-shadow(0 30px 40px color-mix(in oklab, var(--bg) 70%, transparent)); }
.receipt { background: var(--paper); color: var(--paper-ink); font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.55; padding: 28px 24px 44px; -webkit-mask: conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) 50% / 18px 100%; mask: conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) 50% / 18px 100%; }
.receipt-body { animation: print 1.9s steps(20, end) 0.35s both; }
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.r-title { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.r-req { margin-top: 4px; color: var(--paper-muted); overflow-wrap: anywhere; }
.receipt hr { border: 0; border-top: 1px dashed var(--paper-muted); margin: 14px 0; }
.receipt dl > div { display: flex; justify-content: space-between; gap: 12px; }
.receipt dd { margin: 0; font-variant-numeric: tabular-nums; }
.r-miss dt, .r-miss dd { color: var(--paper-muted); font-style: italic; }
.r-total { display: flex; justify-content: space-between; font-weight: 500; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.r-foot { margin-top: 10px; color: var(--paper-muted); font-size: 0.75rem; }

.hero-shot { margin-top: clamp(48px, 6vw, 88px); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 10%, transparent), 0 50px 140px -40px color-mix(in oklab, var(--accent) 38%, transparent); }
.hero-shot img { width: 100%; }

/* sections */
.section { padding-block: clamp(88px, 11vw, 150px) 0; }
.section-sub { margin-top: 14px; color: var(--muted); }

/* bento: real crops of the real app */
.bento { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.t7 { grid-column: span 7; }
.t5 { grid-column: span 5; }
.tile { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 200ms var(--ease); }
.tile:hover { border-color: var(--line-2); }
.tile.flip { flex-direction: column-reverse; }
.tile { justify-content: space-between; }
.tile figure { flex: none; background: var(--bg-3); overflow: hidden; }
.tile img { width: 100%; height: auto; }
.tile-text { padding: 28px 32px 32px; }
.tile h3 { font-size: 1.75rem; letter-spacing: -0.02em; }
.tile p { margin-top: 10px; color: var(--text-2); max-width: 46ch; }
.tile:not(.flip) figure { border-bottom: 1px solid var(--line); }
.tile.flip figure { border-top: 1px solid var(--line); }

/* statement */
.manifest { padding-block: clamp(96px, 13vw, 180px); }
.manifest-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: 72px; align-items: end; }
.manifest h2 { font-size: clamp(2.75rem, 6.6vw, 6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 0.98; max-width: none; }
.manifest h2 span { display: block; }
.manifest p { color: var(--text-2); font-size: 1.1875rem; line-height: 1.55; max-width: 36ch; padding-bottom: 10px; }

/* pricing */
.pricing { background: var(--accent-deep); border-block: 1px solid var(--line-2); padding-block: clamp(72px, 9vw, 120px); }
.pricing-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 72px; align-items: center; }
.pricing h2 { font-size: clamp(3.5rem, 9vw, 8rem); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; max-width: none; }
.pricing-side { display: grid; gap: 32px; }
.pricing ul { display: grid; gap: 16px; }
.pricing li { display: flex; align-items: center; gap: 14px; font-size: 1.1875rem; color: var(--text); }
.pricing li .ic { color: var(--accent-hover); width: 22px; height: 22px; }
.pricing .btn { justify-self: start; }

/* downloads */
.dl-grid { margin-top: clamp(40px, 5vw, 56px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.dl-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 36px 32px 32px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.dl-card:hover { border-color: var(--line-2); }
.dl-card[data-current] { border-color: var(--accent); background: var(--bg-3); }
.os-logo { width: 52px; height: 52px; margin-bottom: 22px; color: var(--text); }
.dl-card h3 { font-size: 2rem; }
.dl-card p { color: var(--text-2); min-height: 3.2em; }
.dl-card .btn { margin-top: 22px; width: 100%; }
.tag { display: none; position: absolute; top: 24px; right: 24px; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.8125rem; font-weight: 600; line-height: 1.2; }
.dl-card[data-current] .tag { display: inline-flex; }

.firstrun { margin-top: 32px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
.firstrun summary { cursor: pointer; padding: 18px 24px; min-height: 56px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.firstrun summary::-webkit-details-marker { display: none; }
.firstrun summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--muted); transition: transform 200ms var(--ease); }
.firstrun[open] summary::after { transform: rotate(45deg); }
.firstrun-body { padding: 0 24px 24px; display: grid; gap: 14px; color: var(--text-2); max-width: 70ch; }
.firstrun-body ul { display: grid; gap: 8px; padding-left: 0; }
.firstrun code { font-family: var(--font-mono); font-size: 0.875em; padding: 2px 8px; border-radius: 6px; background: var(--bg-3); color: var(--text); }
.firstrun a { color: var(--accent-hover); text-underline-offset: 3px; }

/* footer */
.footer { margin-top: clamp(88px, 11vw, 150px); border-top: 1px solid var(--line); padding-block: 40px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; color: var(--muted); font-size: 0.9375rem; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot-row nav a { text-decoration: none; padding: 10px 0; transition: color 160ms var(--ease); }
.foot-row nav a:hover { color: var(--text); }
.foot-row .brand { color: var(--text); }

@media (max-width: 64rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
  .receipt-wrap { justify-self: start; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .t7, .t5 { grid-column: auto; }
  .manifest-grid, .pricing-grid { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-card p { min-height: 0; }
}
@media (max-width: 40rem) {
  :root { --gutter: 20px; }
  .nav-links { display: none; }
  .nav-row { justify-content: space-between; }
  .btn-lg { width: 100%; }
  .tile-text { padding: 22px 22px 26px; }
  .dl-card { padding: 28px 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
