/* keyfold.app — layout patterns after cleno.fit, Keyfold's own palette. */
:root {
  --bg: #0b0c10;
  --bg-1: #101218;
  --bg-2: #151821;
  --bg-3: #1c2029;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --fg: #eef0f5;
  --fg-2: #b6bdcc;
  --muted: #828b9d;
  --faint: #545c6d;
  --accent: #8b9cff;
  --accent-2: #6d7dff;
  --accent-soft: rgba(139, 156, 255, 0.14);
  --teal: #4fd8a0;
  --amber: #ffb65c;
  --pink: #ff8fb1;
  --sky: #6cc6ff;
  --violet: #b79cff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --r: 14px;
  --wrap: 1120px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
::selection { background: rgba(139, 156, 255, 0.35); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg);
  font: 600 16px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.24); background: var(--bg-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--accent-2); border-color: transparent; color: #fff; box-shadow: 0 8px 30px rgba(109, 125, 255, 0.35); }
.btn-primary:hover { background: #7d8cff; border-color: transparent; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14.5px; }
.link { color: var(--accent); }
.link:hover { text-decoration: underline; }
.arrow::after { content: " ↗"; font-size: 0.85em; opacity: 0.8; }

/* ---------- floating pill nav ---------- */
.nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(960px, calc(100% - 24px));
  display: flex; align-items: center; gap: 18px;
  padding: 8px 8px 8px 18px; border-radius: 999px;
  background: rgba(16, 18, 24, 0.72); border: 1px solid var(--line-2);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -0.02em; font-size: 17px; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-links a { padding: 7px 12px; border-radius: 999px; color: var(--fg-2); font-size: 15px; }
.nav-links a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.nav .btn { height: 40px; padding: 0 16px; font-size: 15px; gap: 0; }
@media (max-width: 860px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { padding: 156px 0 40px; text-align: center; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto; height: 620px; z-index: -1;
  background: radial-gradient(600px 300px at 50% 40%, rgba(109, 125, 255, 0.22), transparent 70%);
}
h1 {
  font-size: clamp(44px, 7.4vw, 88px); line-height: 1.02; letter-spacing: -0.04em;
  font-weight: 650; margin: 0 auto; max-width: 980px;
}
h1 .soft { color: var(--fg-2); }
.lede { max-width: 660px; margin: 26px auto 0; color: var(--fg-2); font-size: clamp(17px, 1.6vw, 19.5px); line-height: 1.55; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.trust { margin: 24px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 0; color: var(--muted); font-size: 14px; max-width: 980px; }
@media (max-width: 760px) { .trust { gap: 6px 14px; } .trust span + span::before { display: none; } }
.trust span + span::before { content: "·"; margin: 0 10px; color: var(--faint); }
.phone-only { display: none; }
@media (max-width: 760px) { .phone-only { display: inline-flex; } }
.founder { display: flex; gap: 14px; align-items: flex-start; text-align: left; max-width: 640px; margin: 40px auto 0; }
.founder img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.founder q { display: block; color: var(--fg); font-size: 16px; line-height: 1.55; quotes: "“" "”"; }
.founder .by { color: var(--muted); font-size: 14px; margin-top: 6px; }
.founder .by a { color: var(--fg-2); }
.founder .by a:hover { color: var(--fg); }

/* ---------- app window frame ---------- */
.window {
  border-radius: 14px; overflow: hidden; background: var(--bg-1);
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.window .bar { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.window .bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window .bar i:nth-child(2) { background: #febc2e; }
.window .bar i:nth-child(3) { background: #28c840; }
.window .bar b { margin-left: 10px; font-weight: 500; font-size: 13px; color: var(--muted); }
.window .bar .grow { flex: 1; }
.window .bar a { font-size: 13px; color: var(--muted); }
.window .bar a:hover { color: var(--fg); }
.window img, .window video { width: 100%; height: auto; }

/* live demo */
.demo { margin: 64px auto 0; max-width: 1180px; padding: 0 24px; }
.demo-stage { position: relative; aspect-ratio: 1180 / 740; background: var(--bg-1); }
.demo-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: none; }
.demo-poster img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) brightness(0.7); }
.demo-poster span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  background: rgba(16, 18, 24, 0.82); border: 1px solid var(--line-2); font-weight: 600; color: var(--fg);
  backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.demo-poster:hover span { border-color: var(--accent); }
.caption { margin-top: 14px; color: var(--muted); font-size: 14px; text-align: center; }
.caption .mono { font-size: 13px; }
@media (max-width: 760px) { .demo { padding: 0 16px; } }

/* ---------- sections ---------- */
section { padding: 110px 0; position: relative; }
section.tight { padding: 72px 0; }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
h2 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 650; margin: 0; }
h3 { font-size: 19px; letter-spacing: -0.01em; margin: 0 0 6px; font-weight: 620; }
.sub { color: var(--fg-2); max-width: 640px; margin: 16px 0 0; font-size: 18px; }
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }
.c-accent { color: var(--accent); } .c-teal { color: var(--teal); } .c-amber { color: var(--amber); }
.c-pink { color: var(--pink); } .c-sky { color: var(--sky); } .c-violet { color: var(--violet); }

/* feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 64px; align-items: center; padding: 70px 0; }
.feature.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); }
.feature.flip .copy { order: 2; }
.feature .chip { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 20px; }
.feature .chip svg { width: 18px; height: 18px; }
.feature p { color: var(--fg-2); margin: 16px 0 0; }
.feature .stat { margin-top: 18px; font: 13px/1.5 var(--mono); color: var(--muted); }
.feature .try { display: inline-block; margin-top: 18px; font-size: 15px; color: var(--accent); }
.feature .try:hover { text-decoration: underline; }
.feature .narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
@media (max-width: 900px) {
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 48px 0; }
  .feature.flip .copy { order: 0; }
}

/* cards */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
@media (max-width: 900px) { .grid3, .grid2 { grid-template-columns: minmax(0, 1fr); } .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card p { color: var(--fg-2); margin: 0; font-size: 15.5px; }
.card .num { font: 600 12px/1 var(--mono); color: var(--faint); float: right; }
.card .visual { margin-top: 16px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); padding: 12px 14px; font: 12.5px/1.7 var(--mono); color: var(--fg-2); }
.card .visual .ok { color: var(--teal); }
.cards-gap { margin-top: 14px; }

/* compare table */
.table-wrap { margin-top: 40px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); }
table.compare { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14.5px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-weight: 600; color: var(--fg-2); font-size: 13.5px; background: var(--bg-2); }
.compare tbody th { font-weight: 500; color: var(--fg-2); width: 22%; }
.compare td { color: var(--muted); }
.compare .us { background: rgba(109, 125, 255, 0.07); color: var(--fg); }
.compare thead .us { color: var(--fg); }
.yes::before { content: "✓ "; color: var(--teal); font-weight: 700; }
.no::before { content: "✕ "; color: var(--faint); }
.table-note { margin-top: 12px; color: var(--faint); font-size: 13px; }

/* privacy trio + spec strip */
.trio { margin-top: 18px; }
.spec { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); }
.spec > div { padding: 18px 20px; border-right: 1px solid var(--line); }
.spec > div:last-child { border-right: 0; }
.spec .k { font: 600 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.spec .v { font-size: 14.5px; color: var(--fg-2); line-height: 1.6; }
.spec .v a { color: var(--accent); }
@media (max-width: 900px) { .spec > div { border-right: 0; border-bottom: 1px solid var(--line); } .spec > div:last-child { border-bottom: 0; } }

/* pricing */
.big-price { font-size: clamp(36px, 5vw, 58px); font-weight: 650; letter-spacing: -0.035em; }
.price-cards { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; margin-top: 36px; }
@media (max-width: 900px) { .price-cards { grid-template-columns: minmax(0, 1fr); } }
.plan { background: var(--bg-1); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; }
.plan.hot { border-color: rgba(139, 156, 255, 0.5); box-shadow: 0 0 0 1px rgba(139, 156, 255, 0.18), 0 30px 80px rgba(109, 125, 255, 0.14); }
.plan .name { color: var(--fg-2); font-weight: 600; }
.plan .price { font-size: 52px; font-weight: 700; letter-spacing: -0.04em; margin: 6px 0 0; line-height: 1.1; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .tag { color: var(--muted); font-size: 14.5px; margin: 4px 0 18px; }
.ladder { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.ladder li { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; color: var(--fg-2); }
.ladder li b { font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; }
.ladder li.now { border-color: rgba(139, 156, 255, 0.55); background: var(--accent-soft); color: var(--fg); }
.ladder li.gone { color: var(--faint); }
.ladder li.gone b { color: var(--faint); text-decoration: line-through; font-weight: 500; }
.seats { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 13.5px; color: var(--fg-2); }
.seats[hidden] { display: none; }
.meter { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-3); overflow: hidden; }
.meter i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 0.6s ease; }
ul.checks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; flex: 1; align-content: start; }
ul.checks li { display: flex; gap: 10px; color: var(--fg-2); font-size: 15.5px; }
ul.checks li::before {
  content: ""; width: 18px; height: 18px; flex: none; margin-top: 3px; border-radius: 99px; background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b9cff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}
.plan .btn { width: 100%; }
.fine { color: var(--muted); font-size: 13px; margin-top: 12px; text-align: center; line-height: 1.6; }
ol.steps { list-style: none; counter-reset: s; margin: 6px 0 0; padding: 0; display: grid; gap: 16px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
ol.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-3); color: var(--fg-2); font: 600 13px/1 var(--mono); }
ol.steps b { display: block; color: var(--fg); font-weight: 600; }
ol.steps span { color: var(--fg-2); font-size: 15px; }
.free-line { margin-top: 18px; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 56px; }
@media (max-width: 900px) { .faq { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.faq .group + .group { margin-top: 28px; }
.faq .gtitle { font: 600 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
details { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
details summary { list-style: none; cursor: pointer; padding: 15px 18px; font-weight: 550; display: flex; justify-content: space-between; gap: 16px; font-size: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 18px 16px; color: var(--fg-2); font-size: 15.5px; }
details > div p { margin: 0 0 8px; }
details > div a { color: var(--accent); }

/* final CTA */
.final { text-align: center; padding: 120px 0 130px; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(520px 260px at 50% 40%, rgba(109, 125, 255, 0.18), transparent 70%); }
.final img.icon { width: 96px; height: 96px; margin: 0 auto 26px; border-radius: 22px; box-shadow: 0 20px 60px rgba(109, 125, 255, 0.35); }
.final .fine a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 34px 0 0; overflow: hidden; color: var(--muted); font-size: 14.5px; }
.askai { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.askai .label { font: 600 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-right: auto; }
.askai a { display: inline-flex; align-items: center; gap: 7px; color: var(--fg-2); font-size: 14px; }
.askai a:hover { color: var(--fg); }
.askai svg { width: 15px; height: 15px; }
.fcols { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding: 40px 0; }
@media (max-width: 860px) { .fcols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fcols .about { grid-column: 1 / -1; } }
.fcols .about p { margin: 14px 0 0; max-width: 320px; line-height: 1.6; }
.fcols h4 { margin: 0 0 12px; color: var(--fg); font-size: 14.5px; font-weight: 600; }
.fcols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fcols a:hover { color: var(--fg); }
.legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.wordmark {
  font-size: clamp(120px, 24vw, 320px); font-weight: 800; letter-spacing: -0.06em; line-height: 0.78;
  text-align: center; margin: 10px 0 -0.08em; user-select: none;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
  background: repeating-linear-gradient(90deg, rgba(139, 156, 255, 0.12) 0 1px, transparent 1px 6px);
  -webkit-background-clip: text; background-clip: text;
}

/* ---------- inner pages ---------- */
.page { padding: 150px 0 90px; }
.page h1 { margin: 0; }
.page.center h1 { margin: 0 auto; }
.page .lede-l { color: var(--fg-2); font-size: 19px; max-width: 680px; margin: 18px 0 0; }
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 56px 0 12px; }
.prose h3 { margin: 30px 0 8px; }
.prose p, .prose li { color: var(--fg-2); }
.prose a { color: var(--accent); }
.prose code, .codebox code { font-family: var(--mono); font-size: 0.9em; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.codebox { display: flex; align-items: center; gap: 10px; margin: 10px 0; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-x: auto; }
.codebox code { background: none; border: 0; padding: 0; white-space: nowrap; color: var(--fg); }
.codebox button { margin-left: auto; flex: none; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg-2); font: 500 13px var(--font); cursor: pointer; }
.release { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); padding: 24px; margin-top: 22px; }
.release h3 { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.release time, .release .meta { color: var(--muted); font-size: 14px; font-weight: 400; }
.badge { font: 600 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(139, 156, 255, 0.4); border-radius: 999px; padding: 4px 8px; }
.notice { border: 1px solid rgba(139, 156, 255, 0.35); background: var(--accent-soft); border-radius: var(--r); padding: 18px 20px; color: var(--fg-2); margin-top: 22px; }
.notice b { color: var(--fg); }
.roadmap .col h2 { font-size: 22px; margin: 0 0 12px; }
.roadmap ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.roadmap li { background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--fg-2); font-size: 15px; }
.roadmap li b { color: var(--fg); display: block; font-weight: 600; }
.roadmap li span { color: var(--muted); font-size: 14px; }

/* thanks */
.licence-box { margin: 26px auto 8px; max-width: 520px; text-align: left; }
.licence-box textarea { width: 100%; min-height: 104px; resize: none; background: var(--bg-1); color: var(--fg); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; font: 12px/1.5 var(--mono); word-break: break-all; }
.licence-box .row { display: flex; justify-content: flex-end; margin-top: 8px; }
[hidden] { display: none !important; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
