:root {
  --red: #e53935;
  --red-dark: #b71c1c;
  --ink: #16161c;
  --muted: #5d5d68;
  --paper: #fffaf8;
  --card: #ffffff;
  --line: #f0dedb;
  --blush: #ffe9e6;
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a { color: var(--red-dark); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

header.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}

.brand svg { width: 34px; height: 34px; }

nav a {
  margin-left: 22px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

nav a:hover { color: var(--red-dark); }

.hero { padding: 72px 0 56px; }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

h1 {
  font-size: clamp(36px, 5.4vw, 58px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

h1 em { font-style: normal; color: var(--red); }

.lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }

.button {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button.soft {
  background: var(--blush);
  color: var(--red-dark);
  margin-left: 10px;
}

.note { font-size: 14px; color: var(--muted); margin-top: 14px; }

.kip-stage {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 380px;
  margin-left: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--blush) 70%);
}

.kip-stage img { width: 62%; height: auto; animation: bob 4s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .kip-stage img { animation: none; }
  html { scroll-behavior: auto; }
}

section { padding: 56px 0; }

section.alt { background: #fff3f1; }

h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.sub { color: var(--muted); max-width: 40em; margin: 0 0 36px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.steps { counter-reset: step; display: grid; gap: 14px; padding: 0; list-style: none; max-width: 40em; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 700;
}

.promise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.promise div {
  border-left: 4px solid var(--red);
  padding: 4px 0 4px 16px;
}

.promise strong { display: block; }
.promise span { color: var(--muted); font-size: 16px; }

footer { padding: 36px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer a { color: var(--muted); margin-right: 18px; }

/* Text pages */
.doc { padding-top: 56px; padding-bottom: 40px; max-width: 808px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 44px); }
.doc h2 { font-size: 24px; margin-top: 40px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.updated { color: var(--muted); font-size: 15px; }

details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

@media (max-width: 760px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .kip-stage { margin: 0 auto; max-width: 260px; order: -1; }
  nav a:not(.keep) { display: none; }
  .button.soft { margin: 10px 0 0; }
}

/* Home page additions */
.eyebrow { margin: 0 0 12px; color: var(--red-dark); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; }

.phone {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 14px;
  box-shadow: 0 18px 50px rgba(183, 28, 28, 0.12);
  max-width: 420px;
  margin-left: auto;
  width: 100%;
}

.demo-tabs { display: flex; gap: 6px; margin-bottom: 12px; }

.demo-tabs button {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 8px 0;
  font: 600 13px/1 inherit;
  background: #f4ebe9;
  color: var(--muted);
  cursor: pointer;
}

.demo-tabs button[aria-selected="true"] { background: var(--red); color: #fff; }

.screen { display: grid; gap: 10px; }

.says { font-weight: 600; text-align: center; min-height: 1.6em; }

.panel { display: grid; gap: 10px; align-content: start; min-height: 330px; }
.panel[hidden] { display: none; }

.tcard {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  border-radius: 14px;
  background: #f8f2f0;
  font-size: 15px;
  line-height: 1.4;
}

.tcard.accent { background: var(--blush); color: #5a0f0d; }
.tcard .label { font-size: 12px; opacity: 0.7; }
.tcard .txt.sel { background: rgba(229, 57, 53, 0.25); border-radius: 4px; justify-self: start; }

.reveal { opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s; }
.reveal.on { opacity: 1; transform: none; }

.aibar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #f4ebe9;
  border-radius: 18px;
  padding: 8px 4px;
}

.bi { display: grid; justify-items: center; gap: 2px; font-size: 9px; color: var(--muted); transition: transform 0.25s; }

.bi i {
  font-style: normal;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  transition: background 0.25s, color 0.25s;
}

.bi.lit { transform: scale(1.12); }
.bi.lit i { background: var(--red); color: #fff; }

#kip-bar.think { animation: wiggle 0.5s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.chips span { padding: 6px 10px; border-radius: 10px; background: #f4ebe9; color: var(--muted); font-size: 13px; font-weight: 500; transition: background 0.25s, color 0.25s; }
.chips span.pick { background: var(--red); color: #fff; }

.mic { position: relative; width: 72px; height: 72px; margin: 6px auto 0; border-radius: 50%; background: #eadfdd; color: #7a6b69; display: grid; place-items: center; transition: background 0.3s, color 0.3s; }
.mic svg { position: relative; }
.mic span { position: absolute; inset: 0; border-radius: 50%; background: var(--red); opacity: 0; }
.mic.live { background: var(--red); color: #fff; }
.mic.live span { animation: ring 1.5s linear infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: 0.35; } 100% { transform: scale(1.5); opacity: 0; } }
.mic-label { text-align: center; color: var(--red-dark); font-weight: 600; font-size: 14px; }

.demo-note { margin: 0; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.4; min-height: 3em; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 700; }

.playground { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 14px; }

.kb { background: var(--kb-bg, #fdecea); border-radius: 16px; padding: 12px; font-family: var(--kb-font, system-ui); transition: background 0.25s; }
.kb-text { color: var(--kb-ink, #1b1b1f); font-size: 15px; padding: 4px 6px 12px; min-height: 2.6em; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--kb-acc, #e53935); margin-left: 2px; vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.kb-rows { display: grid; gap: 6px; }
.kb-row { display: flex; justify-content: center; gap: 4px; }
.key {
  flex: 1 1 0;
  max-width: 34px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--kb-key, #fff);
  color: var(--kb-ink, #1b1b1f);
  border-radius: var(--kb-radius, 8px);
  box-shadow: var(--kb-shadow, 0 1.5px 0 rgba(0,0,0,0.28));
  font-size: 15px;
  transition: background 0.25s, border-radius 0.2s;
}
.key.fn { background: var(--kb-fn, #f4d4d1); max-width: 46px; }
.key.wide { max-width: 52px; font-size: 12px; }
.key.space { flex: 5 1 0; max-width: none; font-size: 12px; opacity: 0.8; }
.key.enter { background: var(--kb-acc, #e53935); color: var(--kb-acc-ink, #fff); max-width: 52px; }
.r1 { padding: 0 4%; }

.controls { display: grid; gap: 12px; margin-top: 14px; }
.ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ctl > span, .ctl > label { width: 64px; font-size: 14px; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.sw.custom { background: conic-gradient(#e53935, #ffb300, #4caf50, #2962ff, #7e57c2, #e53935); }
.sw.custom input { position: absolute; inset: -6px; opacity: 0; cursor: pointer; width: 40px; height: 40px; }
.seg { display: inline-flex; background: #f4ebe9; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font: 500 13px/1 inherit; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
input[type="range"] { accent-color: var(--red); flex: 1; min-width: 120px; }

.kips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kips figure { min-width: 0; margin: 0; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px 12px 8px; }
.kips img { width: 100%; max-width: 96px; height: auto; }
.kips figcaption { color: var(--muted); font-size: 14px; }

.grid.small { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .phone { margin: 0 auto; }
}
