:root {
  --ink: #17128c;
  --electric: #334dff;
  --sky: #8cb3ff;
  --coral: #ff5c61;
  --butter: #ffd64d;
  --mint: #3ddb99;
  --cream: #fff7eb;
  --idle: #9a9aa8;

  --bg: var(--cream);
  --fg: #16133d;
  --muted: #5d5a7e;
  --card: #ffffff;
  --line: rgba(23, 18, 140, 0.1);
  --code-bg: #16133d;
  --code-fg: #f3f0ff;

  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a2e;
    --fg: #f3f0ff;
    --muted: #a9a6cf;
    --card: #17144a;
    --line: rgba(255, 255, 255, 0.08);
    --code-bg: #05041a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: 0.92em; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* Film grain over everything. */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  margin: 12px;
  border-radius: 32px;
  padding: 0 clamp(20px, 5vw, 64px) clamp(40px, 6vw, 72px);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 55% at 88% 78%, rgba(255, 92, 97, 0.85), transparent 70%),
    radial-gradient(40% 40% at 8% 92%, rgba(255, 214, 77, 0.6), transparent 70%),
    radial-gradient(55% 60% at 18% 8%, rgba(140, 179, 255, 0.7), transparent 70%),
    linear-gradient(135deg, var(--ink), var(--electric) 55%, #5c7bff);
}
.hero-glow {
  position: absolute; inset: auto -10% -30% 30%; height: 60%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 247, 235, 0.25), transparent);
  filter: blur(40px);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
.nav-links { display: flex; gap: 22px; align-items: center; font-weight: 600; font-size: 15px; }
.nav-links a { text-decoration: none; opacity: 0.9; }
.nav-links a:hover { opacity: 1; }
.pill { background: rgba(255, 255, 255, 0.16); padding: 8px 16px; border-radius: 999px; backdrop-filter: blur(8px); }

.wordmark {
  font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -0.05em;
  text-decoration: none; display: inline-flex; align-items: baseline; gap: 3px;
}
.wordmark .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--butter); display: inline-block; }
.wordmark.small { font-size: 22px; }
.wordmark.small .dot { width: 6px; height: 6px; }

.hero-copy { max-width: 820px; margin: clamp(32px, 7vw, 88px) auto 0; text-align: center; }
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); font-size: 14px; font-weight: 600;
}
h1 { font-size: clamp(48px, 9vw, 112px); font-weight: 800; }
h1 em { color: var(--butter); }
.lede { font-size: clamp(18px, 2.2vw, 22px); max-width: 640px; margin: 24px auto 0; opacity: 0.94; }
.kbd-inline {
  font-family: var(--display); font-weight: 700; padding: 1px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.18); white-space: nowrap;
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--cream); color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 18px;
  padding: 14px 24px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(10, 6, 64, 0.35), inset 0 -3px 0 rgba(23, 18, 140, 0.12);
  transition: transform 0.15s ease;
}
.button:hover { transform: translateY(-2px) rotate(-1deg); }
.button svg { width: 20px; height: 20px; fill: currentColor; }
.brew {
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  background: rgba(10, 6, 64, 0.35); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 18px; border-radius: 999px; font: inherit; backdrop-filter: blur(8px);
}
.brew code { font-size: 14.5px; }
.copy-hint { font-size: 12px; font-weight: 700; opacity: 0.7; text-transform: lowercase; }
.fine { font-size: 13.5px; opacity: 0.75; margin-top: 18px; }

.hero-shot { margin: clamp(40px, 6vw, 72px) auto 0; max-width: 1040px; }
.hero-shot img {
  border-radius: 22px;
  box-shadow: 0 40px 80px -20px rgba(10, 6, 64, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
  transform: rotate(-0.6deg);
}

/* ---------- sections ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section { padding: clamp(56px, 9vw, 112px) 0 0; }
h2 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 800; }
h2 em { color: var(--electric); }
@media (prefers-color-scheme: dark) { h2 em { color: var(--sky); } }
section p { color: var(--muted); max-width: 560px; }

.menubar-demo { text-align: center; }
.menubar {
  display: flex; align-items: center; gap: 14px; height: 34px; padding: 0 16px; max-width: 560px; margin: 0 auto;
  border-radius: 12px; background: rgba(23, 18, 140, 0.06); border: 1px solid var(--line);
  font: 600 14px var(--body);
}
@media (prefers-color-scheme: dark) { .menubar { background: rgba(255, 255, 255, 0.05); } }
.apple { width: 13px; height: 15px; border-radius: 6px 6px 7px 7px; background: var(--fg); opacity: 0.8; }
.menubar-spacer { flex: 1; }
.barn-dots { display: inline-flex; gap: 4px; }
.barn-dots i { width: 8px; height: 8px; border-radius: 50%; transition: background 0.4s ease, box-shadow 0.4s ease; }
.coral { background: var(--coral); box-shadow: 0 0 8px var(--coral); }
.mint { background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.electric { background: var(--electric); box-shadow: 0 0 8px var(--electric); }
.idle { background: var(--idle); }
.caption { margin: 14px auto 0; font-size: 15px; }
.c-coral { color: var(--coral); font-weight: 700; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 36px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 26px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(23, 18, 140, 0.35);
  transition: transform 0.2s ease;
}
.card:nth-child(1) { transform: rotate(-0.8deg); }
.card:nth-child(3) { transform: rotate(0.8deg); }
.card:hover { transform: rotate(0) translateY(-4px); }
.card h3 { font-size: 26px; margin: 18px 0 8px; }
.card p { margin: 0; font-size: 16px; }
.card-art { height: 96px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.art-eyes { background: var(--electric); }
.art-eyes span { width: 26px; height: 34px; border-radius: 50%; background: var(--cream); position: relative; animation: blink 4s infinite; }
.art-eyes span::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); left: 8px; top: 13px; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.art-tabs { background: var(--butter); }
.art-tabs span { width: 46px; height: 30px; border-radius: 8px; background: rgba(23, 18, 140, 0.18); }
.art-tabs span.on { background: var(--ink); transform: translateY(-6px); box-shadow: 0 8px 0 -2px rgba(23, 18, 140, 0.2); }
.art-tap { background: var(--coral); }
.art-tap span { width: 34px; height: 34px; border-radius: 50%; background: var(--cream); animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 247, 235, 0.8); } 100% { box-shadow: 0 0 0 26px rgba(255, 247, 235, 0); } }

.keys { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 6vw, 72px); align-items: center; }
.keycaps { display: flex; gap: 10px; }
kbd {
  font-family: var(--display); font-weight: 700; font-size: 34px; color: var(--ink);
  min-width: 78px; height: 78px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(#fff, #f1ecff); border-radius: 18px;
  box-shadow: 0 6px 0 #c9c2f2, 0 14px 24px -8px rgba(23, 18, 140, 0.45), inset 0 1px 0 #fff;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
kbd.space { font-size: 22px; min-width: 190px; }
.keycaps:hover kbd { transform: translateY(4px); box-shadow: 0 2px 0 #c9c2f2, 0 8px 16px -8px rgba(23, 18, 140, 0.45); }

.deck-section { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.legend { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 12px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.mini-deck {
  display: grid; grid-template-columns: repeat(2, 120px); gap: 12px; justify-content: center;
  padding: 28px; border-radius: 30px;
  background:
    radial-gradient(60% 60% at 80% 90%, rgba(255, 92, 97, 0.7), transparent 70%),
    linear-gradient(140deg, var(--ink), var(--electric));
  transform: rotate(2deg);
}
.tile {
  height: 120px; border-radius: 26px; padding: 14px; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 20px -10px rgba(5, 3, 40, 0.6);
  position: relative;
}
.tile b { position: absolute; top: 12px; left: 14px; font: 800 11px var(--display); opacity: 0.75; }
.tile strong { font: 700 18px var(--display); }
.tile small { font-size: 12px; font-weight: 600; opacity: 0.85; }
.t-coral { background: rgba(255, 92, 97, 0.3); }
.t-coral::after { content: ""; position: absolute; inset: -1px; border-radius: 26px; border: 2px solid var(--coral); animation: pulse 1.4s ease-in-out infinite; }
.t-coral small { color: #ffd0d1; }
.t-mint { background: rgba(61, 219, 153, 0.25); }
.t-mint small { color: #b9f5dc; }
.t-blue small { color: var(--sky); }

.sub { margin-top: 14px; }
.tag { font: 700 11px var(--display); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.tag.exact { background: rgba(61, 219, 153, 0.18); color: #13995f; }
.tag.hook { background: rgba(51, 77, 255, 0.12); color: var(--electric); }
@media (prefers-color-scheme: dark) { .tag.exact { color: var(--mint); } .tag.hook { color: var(--sky); } }
.badges { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.badges li {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 15px;
}
.badges b {
  font: 800 10px var(--display); color: #fff; background: var(--electric);
  width: 30px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
}
.badges li:nth-child(5n + 2) b { background: var(--coral); }
.badges li:nth-child(5n + 4) b { background: var(--ink); }
.badges .yours { border-style: dashed; }
.badges .yours b { background: var(--butter); color: var(--ink); }

.hooks { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.hooks p code { background: var(--line); padding: 2px 6px; border-radius: 6px; }
.code {
  margin: 0; padding: 26px 28px; border-radius: 22px; overflow-x: auto;
  background: var(--code-bg); color: var(--code-fg); font: 14.5px/1.7 var(--mono);
  box-shadow: 0 30px 60px -30px rgba(23, 18, 140, 0.6);
}
.code .c { color: #8a86c9; }

.privacy {
  display: flex; gap: 32px; align-items: center; margin-top: clamp(56px, 9vw, 112px); padding: 40px;
  border-radius: 32px; background: var(--butter); color: var(--ink);
}
.privacy h2 em { color: var(--ink); }
.privacy p { color: rgba(23, 18, 140, 0.8); margin-bottom: 0; }
.lock { flex: none; width: 88px; height: 72px; border-radius: 18px; background: var(--ink); position: relative; margin-top: 30px; }
.lock::before {
  content: ""; position: absolute; left: 18px; top: -36px; width: 52px; height: 48px;
  border: 10px solid var(--ink); border-bottom: 0; border-radius: 30px 30px 0 0;
}
.lock::after { content: ""; position: absolute; left: 38px; top: 24px; width: 12px; height: 22px; border-radius: 6px; background: var(--butter); }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; max-width: 760px; }
.faq h2 { margin-bottom: 18px; }
.faq summary { cursor: pointer; font: 700 20px var(--display); letter-spacing: -0.01em; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 28px; color: var(--electric); }
.faq details[open] summary::before { content: "–"; }
.faq p { margin: 10px 0 0 28px; }

.final { text-align: center; padding-bottom: 40px; }
.final img { margin: 0 auto 18px; width: 112px; transform: rotate(-6deg); }
.final h2 { margin-bottom: 8px; }
.cta.center .brew { background: var(--ink); }

footer {
  display: flex; gap: 20px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 40px 20px 56px; color: var(--muted); font-size: 15px;
}
footer a { color: var(--fg); }

@media (max-width: 760px) {
  .nav-links a:not(.pill) { display: none; }
  .keys, .deck-section, .hooks { grid-template-columns: 1fr; }
  .keycaps { justify-content: center; }
  kbd { min-width: 60px; height: 60px; font-size: 26px; }
  kbd.space { min-width: 130px; font-size: 18px; }
  .privacy { flex-direction: column; align-items: flex-start; padding: 28px; }
  .brew code { font-size: 12.5px; }
  .hero { margin: 8px; border-radius: 24px; }
}

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