:root {
  --bg: #fafaf7;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #1a1a1a;
  --accent-fg: #fafaf7;
  --border: #e5e5e0;
  --kbd-bg: #fff;
  --kbd-glow: rgba(179, 212, 252, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 24px 48px;
}

.hero {
  text-align: center;
  margin-bottom: 80px;
}

.logo {
  font-size: 56px;
  margin-bottom: 24px;
  opacity: 0.85;
}

h1 {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.tagline {
  font-size: 22px;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.tagline strong {
  color: var(--fg);
  font-weight: 600;
}

kbd {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 2px;
  font-family: -apple-system, BlinkMacSystemFont, monospace;
  font-size: 0.85em;
  background: var(--kbd-bg);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--fg);
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.app-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.app-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.app-pill svg {
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 14px;
}

.app-pill:not(.app-pill-slack):not(.app-pill-telegram) svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 17px;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.button.primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.button.primary:hover { opacity: 0.88; }
.button.primary:active { transform: translateY(1px); }

.meta {
  font-size: 14px;
  color: var(--muted);
}

/* ---- Demo animation ---- */

.demo {
  margin-bottom: 40px;
  text-align: left;
}

.demo-window {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.demo-chrome {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #f5f5f0;
}

.demo-chrome .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d4d4d0;
}

.demo-body {
  padding: 28px 24px 22px;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.demo-stack {
  position: relative;
  min-height: 54px;
}

.demo-text {
  position: absolute;
  inset: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--fg);
  display: grid;
  opacity: 0;
  animation: pairCycle 18s steps(1, end) infinite;
}

.text-bad, .text-good {
  grid-area: 1 / 1;
  justify-self: start;
  width: max-content;
  max-width: 100%;
}

.text-bad { position: relative; }

/* Selection overlay sweeps across the text */
.selection {
  position: absolute;
  left: 0;
  top: -2px;
  bottom: -2px;
  width: 0;
  background: #b3d4fc;
  mix-blend-mode: multiply;
  border-radius: 2px;
  pointer-events: none;
  animation: sweep 18s ease-in-out infinite;
}

/* Swap the visible text mid-animation */
.text-bad { animation: showBad 18s steps(1, end) infinite; }
.text-good { animation: showGood 18s steps(1, end) infinite; opacity: 0; }

.pair-2,
.pair-2 .text-bad,
.pair-2 .text-good,
.pair-2 .selection {
  animation-delay: -12s;
}

.pair-3,
.pair-3 .text-bad,
.pair-3 .text-good,
.pair-3 .selection {
  animation-delay: -6s;
}

.demo-keys {
  display: flex;
  gap: 6px;
  align-items: center;
}

.demo-keys kbd {
  font-size: 13px;
  animation: keyPress 18s ease-in-out infinite;
}

.demo-note {
  max-width: 520px;
  margin: 18px auto 0;
  text-align: center;
  color: var(--muted);
}

@keyframes pairCycle {
  0%, 33.333% { opacity: 1; }
  33.334%, 100% { opacity: 0; }
}

@keyframes sweep {
  0%, 4%     { width: 0; opacity: 1; }
  14%        { width: 100%; opacity: 1; }
  17%        { width: 100%; opacity: 1; }
  20%        { width: 100%; opacity: 0; }
  100%       { width: 0; opacity: 0; }
}

@keyframes showBad {
  0%, 19%   { opacity: 1; }
  20%, 100% { opacity: 0; }
}

@keyframes showGood {
  0%, 19%   { opacity: 0; }
  20%, 33.333% { opacity: 1; }
  33.334%, 100% { opacity: 0; }
}

@keyframes keyPress {
  0%, 12%   { box-shadow: none; transform: scale(1); }
  17%       { box-shadow: 0 0 0 4px var(--kbd-glow), 0 0 14px var(--kbd-glow); transform: scale(1.04); }
  24%, 45%  { box-shadow: none; transform: scale(1); }
  50%       { box-shadow: 0 0 0 4px var(--kbd-glow), 0 0 14px var(--kbd-glow); transform: scale(1.04); }
  57%, 78%  { box-shadow: none; transform: scale(1); }
  83%       { box-shadow: 0 0 0 4px var(--kbd-glow), 0 0 14px var(--kbd-glow); transform: scale(1.04); }
  90%, 100% { box-shadow: none; transform: scale(1); }
}

/* ---- FAQ ---- */

.faq {
  margin-top: 40px;
}

.faq h2 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 18px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.faq-item h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.faq-item p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Pricing ---- */

.pricing {
  margin-top: 120px;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  background: #fff;
}

.price-card h2 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
}

.price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.amount {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.period {
  font-size: 18px;
  color: var(--muted);
}

.quota {
  color: var(--muted);
  margin-bottom: 28px;
}

.price-card .button {
  margin-bottom: 12px;
}

.fineprint {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 480px) {
  main { padding: 64px 20px 32px; }
  h1 { font-size: 42px; }
  .tagline { font-size: 19px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0c;
    --fg: #f5f5f0;
    --muted: #9a9a95;
    --accent: #f5f5f0;
    --accent-fg: #0e0e0c;
    --border: #2a2a26;
    --kbd-bg: #1a1a18;
    --kbd-glow: rgba(120, 160, 220, 0.45);
  }
  .demo-window { background: #161614; }
  .price-card { background: #161614; }
  .faq-item { background: rgba(255, 255, 255, 0.03); }
  .demo-chrome { background: #1a1a17; }
  .demo-chrome .dot { background: #3a3a36; }
  .selection { background: #2a4a7a; mix-blend-mode: screen; }
}
