/* Kept website. The same design language as the app (kept-app/apps/web/docs/DESIGN.md): white, Inter, near-black ink,
   one blue for actions, hairlines instead of boxes, no shadows on cards, no gradients, sentence case, no em dashes. */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/assets/fonts/Inter_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/assets/fonts/Inter_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/assets/fonts/Inter_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/assets/fonts/Inter_700Bold.ttf') format('truetype'); }

:root {
  --bg: #ffffff;
  --subtle: #fafafa;
  --fill: #efefef;
  --fill-hover: #e3e3e3;
  --line: #dbdbdb;
  --ink: #0a0a0a;
  --ink-soft: #737373;
  --faint: #a8a8a8;
  --accent: #0095f6;
  --accent-hover: #1877f2;
  --accent-text: #0074cc;
  --accent-tint: #e6f4fe;
  --green: #0e8445;
  --green-tint: #e8f5ec;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --page: 1080px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; } /* the sticky header */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.1px;
  font-feature-settings: 'cv11', 'ss01';
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 640px) { :root { --gutter: 16px; } }

/* Outline icons, as in the app: 1.75 stroke, round ends. */
.icon-tile svg, .ask svg, .eyebrow svg, .file-face svg, .app svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

/* A 40px #EFEFEF circle with an icon: the app's IconTile. */
.icon-tile { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--fill); color: var(--ink); display: grid; place-items: center; }
.icon-tile svg { stroke-width: 1.75; }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.brand span { font-weight: 700; font-size: 22px; letter-spacing: -0.6px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; padding: 8px 10px; border-radius: var(--radius-sm); }
.nav a:hover { color: var(--ink); background: var(--fill); }
.top .actions { margin-left: auto; display: flex; gap: 8px; }
@media (max-width: 760px) { .nav { display: none; } }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  font: 600 15px/1 Inter, system-ui, sans-serif; text-decoration: none; white-space: nowrap;
  border: 0; cursor: pointer; transition: background-color 120ms;
}
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--fill); color: var(--ink); }
.btn.secondary:hover { background: var(--fill-hover); }

/* ---------------------------------------------------------------- hero */
.hero { padding: 56px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 72px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; margin-bottom: 18px;
  border-radius: 999px; background: var(--accent-tint); color: var(--accent-text); font-size: 13px; font-weight: 600;
}
.eyebrow svg { stroke-width: 2; }
.eyebrow .spark { fill: currentColor; stroke: none; }
.hero h1 { font-size: 56px; line-height: 1.05; letter-spacing: -2px; font-weight: 700; max-width: 560px; }
.hero .lead { margin-top: 18px; font-size: 19px; line-height: 1.45; color: var(--ink-soft); max-width: 480px; }
.hero .cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero .offer { margin-top: 12px; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 900px) {
  .hero { padding: 36px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: 40px; letter-spacing: -1.3px; }
  .hero .lead { font-size: 17px; }
}

/* ---------------------------------------------------------------- the phone in the hero
   The app's own phone layout (Library, search, the best match with its words under it), drawn at a real phone's
   375 x 812 and scaled with --s. site.js plays it: it types what someone remembers and shows what Kept finds. */
.stage { justify-self: center; }
.phone { --s: 0.8; position: relative; width: calc(399px * var(--s)); height: calc(836px * var(--s)); }
.phone-body {
  position: absolute; top: 0; left: 0; width: 399px; height: 836px; padding: 12px;
  transform: scale(var(--s)); transform-origin: 0 0;
  border-radius: 62px; background: var(--ink);
  box-shadow: inset 0 0 0 2px #2b2b2b, 0 48px 90px -48px rgba(10, 10, 10, 0.45);
}
@media (max-width: 900px) { .phone { --s: 0.74; } }
@media (max-width: 380px) { .phone { --s: 0.68; } }

.app {
  position: relative; width: 375px; height: 812px; overflow: hidden;
  display: flex; flex-direction: column; border-radius: 50px; background: var(--bg);
  font-size: 15px; line-height: 21px; letter-spacing: -0.1px; color: var(--ink);
  -webkit-user-select: none; user-select: none;
}

.app-status { flex: none; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 8px 32px 0 46px; }
.app-time { font-size: 16px; font-weight: 600; letter-spacing: -0.3px; }
.app-island { position: absolute; top: 11px; left: 50%; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: var(--ink); }
.app-sys { display: flex; align-items: center; gap: 6px; }
.app .app-sys svg { fill: var(--ink); stroke: none; }
.app .app-sys .battery-case { fill: none; stroke: var(--ink); stroke-width: 1; opacity: 0.4; }
.app .app-sys .battery-cap { opacity: 0.4; }

.app-bar { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 16px; }
.app-brand { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; letter-spacing: -0.6px; }
.app-brand img { width: 24px; height: 24px; }
.app-bar-icons { display: flex; gap: 18px; }
.app-bar-icons svg { stroke-width: 1.75; }

.app-search {
  flex: none; height: 36px; margin: 6px 16px 2px; padding: 0 8px 0 10px;
  display: flex; align-items: center; gap: 8px; border-radius: var(--radius-md); background: var(--fill);
  font-size: 16px; transition: background-color 150ms;
}
.app-search > svg { flex: none; color: var(--ink-soft); stroke-width: 2; }
.app.press .app-search { background: var(--fill-hover); }
.app-field { flex: 1; min-width: 0; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.app-placeholder { color: var(--ink-soft); }
.app.typed .app-placeholder { display: none; }
.app-caret { flex: none; width: 2px; height: 20px; margin: 0 1px; border-radius: 1px; background: var(--accent); opacity: 0; }
.app.focus .app-caret { opacity: 1; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.app-clear {
  flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--faint); color: #fff;
  display: grid; place-items: center; opacity: 0; transform: scale(0.6);
  transition: opacity 150ms var(--ease), transform 150ms var(--ease), background-color 120ms;
}
.app-clear svg { stroke-width: 2.5; }
.app.typed .app-clear { opacity: 1; transform: none; }
.app.clearing .app-clear { background: var(--ink-soft); transform: scale(0.88); }

.app-body { flex: 1; position: relative; overflow: hidden; }
.app-view { position: absolute; inset: 0; transition: opacity 220ms var(--ease), transform 220ms var(--ease); }

.app-library { padding-top: 10px; }
.app-title { padding: 0 16px 14px; }
.app-title b { display: block; font-size: 24px; line-height: 30px; letter-spacing: -0.5px; }
.app-title span { display: block; font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.app-grid .col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Grid tiles: their own shape, 2px corners, no borders, no shadows. */
.tile, .shot { width: 100%; border-radius: 2px; object-fit: cover; background: var(--fill); }
.r32 { aspect-ratio: 3 / 2; }
.r43 { aspect-ratio: 4 / 3; }
.r45 { aspect-ratio: 4 / 5; }
.r34 { aspect-ratio: 3 / 4; }
.r23 { aspect-ratio: 2 / 3; }

.app-results { padding-top: 10px; opacity: 0; transform: translateY(10px); }
.app.results .app-library { opacity: 0; transform: scale(0.985); }
.app.results .app-results { opacity: 1; transform: none; }

.app-count { height: 22px; margin: 0 16px 12px; display: flex; align-items: center; font-size: 17px; line-height: 22px; font-weight: 700; letter-spacing: -0.2px; }
.app-dots { display: none; align-items: center; gap: 5px; margin-left: 6px; }
.app-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: 0.25; animation: dot 760ms var(--ease) infinite; }
.app-dots i:nth-child(2) { animation-delay: 160ms; }
.app-dots i:nth-child(3) { animation-delay: 320ms; }
.app.busy .app-dots { display: inline-flex; }
@keyframes dot { 0%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* The best match leads, full width, with its words under it like a post caption. The rest follow, two across. */
.app-lead, .app-caption, .app-more .tile { opacity: 0; transform: translateY(8px); transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.app.found .app-lead, .app.found .app-caption, .app.found .app-more .tile { opacity: 1; transform: none; }
.app.found .app-caption { transition-delay: 90ms; }
.app.found .app-more .tile:nth-child(1) { transition-delay: 160ms; }
.app.found .app-more .tile:nth-child(2) { transition-delay: 220ms; }
.app-caption { padding: 8px 16px 16px; }
.app-caption-text { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.3px; text-wrap: pretty; }
.app-caption-meta { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.app-more { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; align-items: start; }

/* A file without a preview: its kind, its name, its extension (the app's FileFace). */
.file-face { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; background: var(--fill); }
.file-face svg { color: var(--ink-soft); stroke-width: 1.5; }
.file-face b { font-size: 15px; line-height: 21px; font-weight: 600; }
.file-face span { font-size: 13px; line-height: 18px; color: var(--ink-soft); }

.app-tabs { flex: none; height: 54px; padding-top: 6px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 0.5px solid var(--line); background: var(--bg); }
.app-tabs span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; line-height: 13px; font-weight: 500; color: var(--ink-soft); }
.app-tabs svg { stroke-width: 1.75; }
.app-tabs .on { color: var(--ink); }
.app-tabs .on svg { stroke-width: 2.4; }
.app-home { flex: none; height: 30px; position: relative; }
.app-home::after { content: ''; position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--ink); }

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

/* ---------------------------------------------------------------- sections */
section.block { padding: 72px 0; border-top: 1px solid var(--line); }
.block h2 { font-size: 34px; line-height: 1.15; letter-spacing: -1px; font-weight: 700; max-width: 640px; }
.block .sub { margin-top: 12px; color: var(--ink-soft); font-size: 17px; max-width: 620px; }
@media (max-width: 640px) {
  section.block { padding: 48px 0; }
  .block h2 { font-size: 27px; letter-spacing: -0.6px; }
}
.note { margin-top: 18px; font-size: 13px; color: var(--ink-soft); max-width: 720px; }

/* How it works */
.steps { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step h3 { margin-top: 14px; font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.step p { margin-top: 6px; color: var(--ink-soft); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* What you can type, and what it finds: the search, the file, its words under it. */
.finds { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 16px; align-items: start; }
.ask {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; margin-bottom: 10px;
  border-radius: var(--radius-md); background: var(--fill); font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden;
}
.ask svg { flex: none; color: var(--ink-soft); stroke-width: 2; }
.find figcaption { padding-top: 8px; }
.find figcaption b { display: block; font-size: 15px; line-height: 21px; font-weight: 600; letter-spacing: -0.1px; text-wrap: pretty; }
.find figcaption span { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.find p { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 960px) { .finds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* On a phone the examples scroll sideways, like a row of posts. */
@media (max-width: 560px) {
  .finds {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 24px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 4px; scroll-padding: 0 var(--gutter);
  }
  .finds::-webkit-scrollbar { display: none; }
  .find { flex: 0 0 78%; scroll-snap-align: start; }
}

/* Connections: settings-style rows in one hairline card, as in the app. */
.rows { margin-top: 28px; max-width: 720px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.row { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 68px; right: 0; border-top: 1px solid var(--line); }
.row > div { flex: 1; min-width: 0; }
.row h3 { font-size: 15px; line-height: 21px; font-weight: 600; }
.row p { margin-top: 1px; font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.badge { flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0; padding: 3px 7px; border-radius: 4px; background: var(--fill); color: var(--ink-soft); }
.badge.live { background: var(--green-tint); color: var(--green); }

/* Pricing */
.plans { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 640px; }
.plan { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.plan.free { border-color: var(--accent); }
.plan h3 { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.plan .size { margin-top: 6px; font-size: 30px; font-weight: 700; letter-spacing: -1px; }
.plan .price { margin-top: 2px; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.plan .btn { margin-top: 18px; width: 100%; }
@media (max-width: 480px) { .plans { grid-template-columns: 1fr; } }

/* Privacy */
.privacy-points { margin-top: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }
.privacy-points > div { display: flex; gap: 12px; align-items: flex-start; }
.privacy-points h3 { margin-top: 1px; font-size: 15px; line-height: 21px; font-weight: 600; }
.privacy-points p { margin-top: 2px; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 760px) { .privacy-points { grid-template-columns: 1fr; } }

/* Closing call to action */
.closing { text-align: center; }
.closing h2 { margin: 0 auto; }
.closing .sub { margin: 12px auto 0; }
.closing .cta { margin-top: 24px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--ink-soft); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
footer nav { display: flex; gap: 16px; margin-left: auto; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- a plain document page (privacy) */
.doc-page { padding: 48px 0 72px; }
.doc-page .wrap { max-width: 720px; }
.doc-page h1 { font-size: 36px; letter-spacing: -1px; font-weight: 700; }
.doc-page h2 { margin-top: 36px; font-size: 20px; letter-spacing: -0.3px; font-weight: 700; }
.doc-page p, .doc-page li { margin-top: 10px; color: #333; font-size: 15px; line-height: 1.6; }
.doc-page ul { padding-left: 20px; margin: 0; }
.draft { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--fill); font-size: 13px; color: var(--ink); }
.updated { margin-top: 8px; color: var(--ink-soft); font-size: 13px; }
