/* Kipi website. Same tokens as the app (src/theme/colors.ts).
   Layout: one centered column, 1120px max; hero splits copy | phone, everything stacks under 860px. */
:root {
  --canvas: #F7F7F5;
  --surface: #FFFFFF;
  --sunken: #EEEEEA;
  --line: #E2E2DD;
  --ink: #141416;
  --muted: #5E5E66;
  --faint: #8A8A93;
  --accent: #4F46E5;
  --on-accent: #FFFFFF;
  --accent-soft: #EEEDFD;
  --accent-ink: #3730A3;
  --amber: #FBBF24;
  --ticket: #141416;
  --on-ticket: #FFFFFF;
  --on-ticket-muted: #A1A1AA;
  --band: #4F46E5;
  --on-band: #FFFFFF;
  --on-band-muted: #C7C4FF;
  --shadow: 0 1px 2px rgba(20, 20, 22, .06), 0 12px 40px rgba(20, 20, 22, .10);

  --display: 'Bricolage Grotesque', 'Avenir Next', system-ui, sans-serif;
  --body: 'Geist', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0E0E10; --surface: #18181B; --sunken: #232328; --line: #2A2A30;
    --ink: #F2F2F4; --muted: #A0A0AA; --faint: #6E6E78;
    --accent: #9D97FF; --on-accent: #0E0E10; --accent-soft: #25234A; --accent-ink: #C7C4FF;
    --ticket: #26262B; --on-ticket: #F2F2F4;
    --band: #1C1A3D; --on-band: #F2F2F4; --on-band-muted: #C7C4FF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #0E0E10; --surface: #18181B; --sunken: #232328; --line: #2A2A30;
  --ink: #F2F2F4; --muted: #A0A0AA; --faint: #6E6E78;
  --accent: #9D97FF; --on-accent: #0E0E10; --accent-soft: #25234A; --accent-ink: #C7C4FF;
  --ticket: #26262B; --on-ticket: #F2F2F4;
  --band: #1C1A3D; --on-band: #F2F2F4; --on-band-muted: #C7C4FF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 17px/1.55 var(--body); }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img, svg { max-width: 100%; }

.wrap {
  width: 100%; 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));
}

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--canvas); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 24px/1 var(--display); letter-spacing: -.02em; }
.brand svg { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.top nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; color: var(--muted); }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .top nav { display: none; } .top .btn { margin-left: auto; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--ink); color: var(--canvas); font: 600 16px/1 var(--body); text-decoration: none; white-space: nowrap; transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }
.btn small { display: block; font-size: 11px; font-weight: 500; opacity: .7; margin-bottom: 3px; }
.btn.tall { height: 58px; padding: 0 22px; }
.btn.sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }

/* Type */
h1, h2, h3 { font-family: var(--display); letter-spacing: -.025em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(42px, 6.4vw, 76px); line-height: .98; font-weight: 700; }
h2 { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.04; font-weight: 700; }
h3 { font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.eyebrow { font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 34em; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; padding-block: 56px 72px; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.hero h1 .fold { position: relative; white-space: nowrap; }
.hero h1 .fold::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .14em; background: var(--amber); border-radius: 2px; z-index: -1; }
.hero h1 { position: relative; z-index: 0; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.cta-note { font-size: 14px; color: var(--muted); }
.apps { display: flex; flex-wrap: wrap; gap: 8px; }
.apps span { font: 500 13px/1 var(--body); padding: 8px 11px; border-radius: 999px; background: var(--sunken); color: var(--ink); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 32px 56px; } }

/* Phone mock: a real Kipi timeline */
.stage { position: relative; display: flex; justify-content: center; min-width: 0; }
.phone { width: 320px; max-width: 100%; aspect-ratio: 320 / 660; background: var(--canvas); border-radius: 46px; border: 10px solid #141416; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; font-family: var(--body); }
:root[data-theme="dark"] .phone { border-color: #2A2A30; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phone { border-color: #2A2A30; } }
.ph-status { height: 38px; display: flex; justify-content: space-between; align-items: center; padding: 6px 24px 0; font: 600 13px/1 var(--body); }
.ph-island { width: 90px; height: 26px; border-radius: 20px; background: #000; }
.ph-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px 10px; }
.ph-bar b { font: 700 22px/1 var(--display); letter-spacing: -.02em; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--sunken); font-size: 11px; font-weight: 500; }
.pill svg { width: 10px; height: 10px; }
.ph-chips { display: flex; gap: 6px; padding: 0 14px 10px; border-bottom: 1px solid var(--line); overflow: hidden; }
.ph-chips span { flex-shrink: 0; font-size: 12px; font-weight: 500; height: 28px; display: inline-flex; align-items: center; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.ph-chips span.on { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.ph-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; align-content: start; overflow: hidden; }
.ph-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tile .img { display: block; height: 96px; }
.tile .img.tall { height: 150px; }
.tile .meta { padding: 7px 9px 9px; display: flex; flex-direction: column; gap: 3px; }
.tile .src, .ticket .src { font: 600 9.5px/1 var(--body); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.tile .ttl, .ticket .ttl { font-size: 12px; line-height: 1.25; font-weight: 600; }
.tile .fact { font-size: 10.5px; color: var(--muted); }
.ticket { background: var(--ticket); color: var(--on-ticket); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.ticket .src { color: var(--on-ticket-muted); }
.ticket .code { font: 600 15px/1 var(--mono); color: var(--amber); letter-spacing: .04em; }
.ticket .due { font-size: 10.5px; color: var(--amber); font-weight: 600; }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--canvas); }
.ticket::before { left: -6px; } .ticket::after { right: -6px; }

/* Placeholder "photos", drawn in CSS so the page ships with no image files */
.p-ramen { background: radial-gradient(circle at 50% 62%, #F5D08A 0 22%, transparent 23%), radial-gradient(circle at 50% 60%, #C2410C 0 34%, transparent 35%), radial-gradient(circle at 50% 58%, #2B2B2F 0 44%, #E9B872 45%); }
.p-cafe { background: linear-gradient(180deg, transparent 58%, #6B4F3A 58% 64%, transparent 64%), radial-gradient(ellipse at 30% 40%, #F3E3CF 0 18%, transparent 19%), linear-gradient(135deg, #9BC1BC, #D9B48F); }
.p-book { background: linear-gradient(90deg, transparent 30%, #3730A3 30% 70%, transparent 70%), linear-gradient(90deg, transparent 33%, #C7C4FF 33% 34%, transparent 34%), #E6D5C3; }
.p-shot { background: linear-gradient(180deg, #FFFFFF 0 18%, transparent 18%), repeating-linear-gradient(180deg, #C9D7F8 0 6px, transparent 6px 14px) 12px 30px / 60% 60% no-repeat, #EEF2FB; }
.p-pasta { background: radial-gradient(circle at 55% 50%, #FCA5A5 0 14%, transparent 15%), radial-gradient(circle at 50% 50%, #FDE68A 0 38%, transparent 39%), #FDBA74; }

/* Share card floating beside the phone */
.share { position: absolute; left: -8px; bottom: 64px; width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 10px; animation: rise .7s .3s both cubic-bezier(.2, .8, .2, 1); }
.share .row { display: flex; gap: 10px; align-items: center; }
.share .row svg { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }
.share b { font-size: 13px; }
.share .sub { font-size: 12px; color: var(--muted); }
.share .tags { display: flex; gap: 5px; flex-wrap: wrap; }
.share .tags span { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
@keyframes rise { from { transform: translateY(12px); } to { transform: none; } }
@media (max-width: 1000px) { .share { left: 0; } }
@media (max-width: 480px) { .share { position: static; width: 100%; margin-top: 16px; } .stage { flex-direction: column; align-items: center; } }

/* Sections */
section { padding-block: 0; }
.sec { padding-block: 88px; display: flex; flex-direction: column; gap: 40px; }
.sec-head { display: flex; flex-direction: column; gap: 14px; max-width: 40em; }

/* How it works: a real three-step sequence */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.step { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 2px solid var(--ink); min-width: 0; }
.step::before { counter-increment: s; content: "Step " counter(s); font: 600 12px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }
.step p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* Card types */
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.kind { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kind .facts { display: flex; flex-wrap: wrap; gap: 6px; }
.kind .facts span { font: 500 12px/1 var(--mono); padding: 6px 8px; border-radius: 8px; background: var(--sunken); }
.kind p { color: var(--muted); font-size: 15px; }

/* Privacy band */
.band { background: var(--band); color: var(--on-band); }
.band .sec { gap: 48px; }
.band .eyebrow { color: var(--amber); }
.band .lede { color: var(--on-band-muted); }
.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.promise { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.promise b { font: 700 26px/1.1 var(--display); letter-spacing: -.02em; }
.promise p { color: var(--on-band-muted); font-size: 15px; }
@media (max-width: 900px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .promises { grid-template-columns: minmax(0, 1fr); } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 880px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.plan.pro { border: 2px solid var(--accent); }
.plan .price { font: 700 40px/1 var(--display); letter-spacing: -.02em; }
.plan .price small { font: 500 15px/1 var(--body); color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan li::before { content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='%234F46E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.plan .alt { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq { display: flex; flex-direction: column; max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font: 600 18px/1.3 var(--body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 24px/1 var(--body); color: var(--muted); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 40em; }

/* Closing CTA */
.closer { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: 88px; }
.closer h2 { max-width: 14em; }

/* Footer */
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; padding-block: 28px 40px; font-size: 14px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--ink); }
footer .copy { margin-left: auto; }

/* Legal and support pages */
.doc { max-width: 720px; padding-block: 48px 88px; display: flex; flex-direction: column; gap: 20px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); }
.doc h2 { font-size: 26px; margin-top: 20px; letter-spacing: -.015em; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.doc .updated { font: 500 13px/1 var(--mono); color: var(--faint); }
.doc .summary { background: var(--accent-soft); color: var(--accent-ink); border-radius: 16px; padding: 18px 20px; }
.doc .summary p { color: var(--accent-ink); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; color: var(--ink); }
.doc td { color: var(--muted); }
.scroll-x { overflow-x: auto; }
.mail { font: 600 18px/1.2 var(--mono); color: var(--ink); user-select: all; }
