/* QWERTY Club — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --blue: #3355ff;
  --butter: #ffcf3f;
  --font: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

body[data-theme="light"] {
  --bg: #f3eee4; --bg-2: #ebe4d6;
  --card-bg: #fbf8f2; --card-border: #ddd5c6;
  --key-face: #fbf8f2; --key-side: #cfc6b5; --key-border: #bfb5a2;
  --inner-bg: #f1ece2; --inner-border: #e2dacb;
  --nav-bg: rgba(251,248,242,0.85);
  --ink: #1c1b19; --ink-soft: #57534b; --ink-faint: #8f897d;
  --divider: rgba(28,27,25,0.1);
  --accent: #3355ff; --accent-2: #e0a800;
  --shadow: 0 1px 0 rgba(28,27,25,0.04), 0 18px 40px -24px rgba(28,27,25,0.35);
  --grid: rgba(28,27,25,0.05);
}
body[data-theme="dark"] {
  --bg: #141412; --bg-2: #1b1a17;
  --card-bg: #1f1e1a; --card-border: #2f2d28;
  --key-face: #2a2924; --key-side: #11100e; --key-border: #3a3832;
  --inner-bg: #262520; --inner-border: #34322c;
  --nav-bg: rgba(31,30,26,0.85);
  --ink: #f3eee4; --ink-soft: #b5aea1; --ink-faint: #7d776c;
  --divider: rgba(243,238,228,0.1);
  --accent: #6f86ff; --accent-2: #ffcf3f;
  --shadow: 0 1px 0 rgba(0,0,0,0.3), 0 18px 40px -20px rgba(0,0,0,0.7);
  --grid: rgba(243,238,228,0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh; font-family: var(--font); color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  transition: background-color .3s ease, color .3s ease;
  overflow-x: hidden;
}

/* ---------- Keycaps ---------- */
.kc {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.5em; height: 1.5em; padding: 0 .25em;
  font-family: var(--mono); font-weight: 700; font-size: 1em; line-height: 1;
  color: var(--ink); background: var(--key-face);
  border: 1px solid var(--key-border); border-radius: .28em;
  box-shadow: 0 .16em 0 var(--key-side), 0 .22em .4em rgba(0,0,0,.12);
  transform: translateY(-.08em);
}
.kc.blue { background: var(--blue); color: #fff; border-color: #2440d6; box-shadow: 0 .16em 0 #1c33b0, 0 .22em .4em rgba(0,0,0,.15); }
.kc.butter { background: var(--butter); color: #1c1b19; border-color: #e0b52a; box-shadow: 0 .16em 0 #b88f12, 0 .22em .4em rgba(0,0,0,.15); }

.logo { display: inline-flex; gap: .16em; text-decoration: none; align-items: center; }
.logo .kc { font-size: inherit; }
.nav .logo { font-size: 15px; }
.footer .logo { font-size: 18px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 16px; z-index: 100; max-width: 1200px; margin: 16px auto 0; padding: 0 24px; }
.nav-inner {
  background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border); border-radius: 16px;
  padding: 12px 12px 14px 18px; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-link { font-weight: 600; font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.nav-link:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 10px; }

.toggle { display: flex; gap: 4px; background: var(--inner-bg); border: 1px solid var(--inner-border); border-radius: 10px; padding: 3px; }
.toggle button {
  font-family: var(--mono); font-weight: 700; font-size: 10.5px; text-transform: uppercase;
  padding: 6px 10px; border: none; background: transparent; color: var(--ink-faint);
  border-radius: 7px; cursor: pointer;
}
.toggle button.active { background: var(--ink); color: var(--bg); }

/* ---------- Buttons (press like a key) ---------- */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
  border-radius: 10px; font-family: var(--font); font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: transform .08s ease, box-shadow .08s ease;
}
.btn { background: var(--blue); color: #fff; border: 1px solid #2440d6; box-shadow: 0 4px 0 #1c33b0; }
.btn:hover { transform: translateY(1px); box-shadow: 0 3px 0 #1c33b0; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 #1c33b0; }
.btn-ghost { background: var(--key-face); color: var(--ink); border: 1px solid var(--key-border); box-shadow: 0 4px 0 var(--key-side); }
.btn-ghost:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--key-side); }
.btn-ghost:active { transform: translateY(4px); box-shadow: 0 0 0 var(--key-side); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 26px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; max-width: 1200px; margin: 0 auto; padding: 90px 40px 70px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 8px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--ink-soft);
  margin-bottom: 26px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--butter); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-h1 { font-size: 76px; font-weight: 700; line-height: .98; letter-spacing: -0.045em; margin-bottom: 24px; }
.accent { color: var(--accent); }
.hl { background: linear-gradient(transparent 62%, var(--butter) 62%, var(--butter) 92%, transparent 92%); padding: 0 .05em; }
body[data-theme="dark"] .hl { color: var(--ink); background: linear-gradient(transparent 62%, rgba(255,207,63,.35) 62%, rgba(255,207,63,.35) 92%, transparent 92%); }
.hero-sub { font-size: 19px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 32px; max-width: 48ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-price { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.hero-price strong { color: var(--ink); }

.trust { margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--divider); }
.trust-label { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 12px; }
.trust-row { display: flex; gap: 28px; flex-wrap: wrap; font-weight: 700; font-size: 15px; color: var(--ink-faint); }

/* Hero visual: keyboard + chat */
.board {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px;
  padding: 18px; box-shadow: var(--shadow); transform: rotate(-1.2deg);
}
.board-row { display: flex; gap: 6px; margin-bottom: 6px; }
.board-row:nth-child(2) { padding-left: 14px; }
.board-row:nth-child(3) { padding-left: 28px; }
.board .kc { font-size: 13px; flex: 1; height: 34px; min-width: 0; }
.chat-preview { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--divider); }
.chat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chat-head-name { font-family: var(--mono); font-weight: 700; font-size: 12px; }
.live-status { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.live-dot { width: 6px; height: 6px; border-radius: 2px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
.chat-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.chat-avatar { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; }
.chat-avatar.user { background: var(--inner-bg); border: 1px solid var(--inner-border); }
.chat-avatar.qw, .cb-msg.qw .cb-msg-avatar {
  background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 12px; box-shadow: 0 2px 0 #1c33b0;
}
.chat-text .who { display: block; font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--ink-faint); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .08em; }
.chat-text .msg { font-size: 13.5px; line-height: 1.45; }

/* ---------- Sections ---------- */
.section { position: relative; max-width: 1200px; margin: 0 auto; padding: 60px 40px; }
.section-head { margin-bottom: 32px; }
.section-kicker { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; margin-bottom: 10px; }
.section-title { font-size: 40px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.section-sub { font-size: 15px; color: var(--ink-soft); max-width: 52ch; line-height: 1.55; margin-top: 10px; }

.card {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px;
  padding: 30px 26px; box-shadow: var(--shadow);
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card-icon { font-size: 18px; margin-bottom: 18px; }
.card-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.card-desc { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); margin-bottom: 16px; }
.card-list { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); line-height: 1.8; }
.card-list span { display: block; }
.card-list span::before { content: "> "; color: var(--accent); }

/* Feature band */
.band {
  background: var(--ink); color: var(--bg); border-radius: 24px; padding: 48px 40px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center;
}
.band .section-kicker { color: var(--butter); }
.band h2 { font-size: 42px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 14px; }
.band p { font-size: 16px; line-height: 1.55; opacity: .75; margin-bottom: 22px; max-width: 48ch; }
.band ul { list-style: none; margin-bottom: 26px; }
.band li { padding: 10px 0; border-bottom: 1px solid rgba(127,127,127,.25); font-size: 14.5px; display: flex; gap: 12px; }
.band li::before { content: "✓"; color: var(--butter); font-weight: 700; }
.drop-card { background: var(--bg); color: var(--ink); border-radius: 18px; padding: 28px; text-align: center; }
.drop-card .big-key { font-size: 54px; margin: 10px 0 22px; }
.drop-card .meta { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); line-height: 1.6; }
.drop-card .meta strong { color: var(--ink); }

/* Notes from members */
.note-quote { font-size: 16px; line-height: 1.5; margin-bottom: 18px; }
.note-attr { display: flex; align-items: center; gap: 12px; }
.note-avatar { width: 36px; height: 36px; font-size: 13px; }
.note-name { font-weight: 700; font-size: 13.5px; }
.note-role { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }

/* ---------- Pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.tier { display: flex; flex-direction: column; }
.tier > .kc { align-self: flex-start; font-size: 14px; }
.tier.featured { border: 2px solid var(--blue); position: relative; }
.tier .badge { position: absolute; top: -12px; left: 24px; background: var(--butter); color: #1c1b19; font-family: var(--mono); font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: .08em; }
.tier-price { font-size: 48px; font-weight: 700; letter-spacing: -0.04em; margin: 8px 0 2px; }
.tier-price small { font-size: 15px; font-weight: 500; color: var(--ink-faint); letter-spacing: 0; }
.tier-meta { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); margin-bottom: 20px; }
.tier ul { list-style: none; margin-bottom: 24px; flex: 1; }
.tier li { padding: 9px 0; border-bottom: 1px solid var(--divider); font-size: 14px; display: flex; gap: 10px; }
.tier li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.tier .btn, .tier .btn-ghost { justify-content: center; }

.faq details { border-bottom: 1px solid var(--divider); padding: 18px 0; }
.faq summary { font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 10px; color: var(--ink-soft); line-height: 1.6; font-size: 14.5px; max-width: 70ch; }

.page-hero { max-width: 1200px; margin: 0 auto; padding: 80px 40px 30px; text-align: center; }
.page-hero .hero-sub { margin: 0 auto 10px; }

/* ---------- Footer ---------- */
.footer { max-width: 1200px; margin: 60px auto 0; padding: 40px 40px 32px; border-top: 1px solid var(--divider); }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-bottom: 28px; }
.footer-tag { font-size: 13.5px; color: var(--ink-soft); margin-top: 14px; max-width: 36ch; line-height: 1.5; }
.footer-cols { display: flex; gap: 56px; }
.footer-col-title { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13.5px; color: var(--ink-soft); text-decoration: none; margin-bottom: 8px; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); padding-top: 24px; border-top: 1px solid var(--divider); }
.footer-bottom a { color: inherit; }

/* ---------- Chatbot ---------- */
.cb-toggle {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  width: 58px; height: 58px; border-radius: 14px;
  background: var(--blue); border: 1px solid #2440d6; box-shadow: 0 5px 0 #1c33b0, 0 14px 30px rgba(51,85,255,.35);
  color: #fff; font-family: var(--mono); font-weight: 700; font-size: 22px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.cb-toggle:active { transform: translateY(5px); box-shadow: 0 0 0 #1c33b0; }
.cb-toggle .close-icon { display: none; font-size: 26px; font-weight: 400; }
.cb-toggle.open .key-icon { display: none; }
.cb-toggle.open .close-icon { display: block; }

.cb-panel {
  position: fixed; bottom: 100px; right: 24px; z-index: 1000;
  width: 380px; max-width: calc(100vw - 48px); height: 540px; max-height: calc(100vh - 140px);
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px;
  box-shadow: 0 30px 60px -10px rgba(0,0,0,.3);
  display: none; flex-direction: column; overflow: hidden;
}
.cb-panel.open { display: flex; }
.cb-head { padding: 16px 18px; border-bottom: 1px solid var(--divider); display: flex; align-items: center; gap: 10px; }
.cb-head .kc { font-size: 13px; }
.cb-head-name { font-family: var(--mono); font-weight: 700; font-size: 12.5px; }
.cb-head-status { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.cb-head-dot { width: 6px; height: 6px; border-radius: 2px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
.cb-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.cb-msg { display: flex; gap: 9px; align-items: flex-start; }
.cb-msg.user { flex-direction: row-reverse; }
.cb-msg-avatar { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; }
.cb-msg.user .cb-msg-avatar { background: var(--inner-bg); border: 1px solid var(--inner-border); }
.cb-bubble { max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.cb-msg.qw .cb-bubble { background: var(--inner-bg); border: 1px solid var(--inner-border); border-bottom-left-radius: 3px; }
.cb-msg.user .cb-bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 3px; }
.cb-bubble a { color: var(--accent); text-decoration: underline; }
.cb-msg.user .cb-bubble a { color: #fff; }
.cb-typing { display: flex; gap: 4px; padding: 4px 0; }
.cb-typing span { width: 6px; height: 6px; border-radius: 2px; background: var(--ink-faint); animation: typing 1.4s infinite ease-in-out; }
.cb-typing span:nth-child(2) { animation-delay: .2s; }
.cb-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.cb-input-row { padding: 12px 14px 14px; border-top: 1px solid var(--divider); display: flex; gap: 8px; }
.cb-input { flex: 1; padding: 11px 14px; border-radius: 10px; background: var(--inner-bg); border: 1px solid var(--inner-border); font-family: var(--font); font-size: 14px; color: var(--ink); outline: none; }
.cb-input:focus { border-color: var(--accent); }
.cb-input::placeholder { color: var(--ink-faint); }
.cb-send { width: 40px; height: 40px; border-radius: 10px; background: var(--blue); border: none; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 3px 0 #1c33b0; }
.cb-send:disabled { opacity: .4; cursor: not-allowed; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 60px 24px 40px; gap: 40px; }
  .hero-h1 { font-size: 48px; }
  .grid-3, .grid-2, .tiers { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; padding: 36px 26px; gap: 30px; }
  .band h2 { font-size: 32px; }
  .nav-links { display: none; }
  .section, .page-hero { padding-left: 24px; padding-right: 24px; }
  .footer-cols { gap: 32px; }
  .tier.featured { margin-top: 10px; }
}
@media (max-width: 520px) {
  .nav { padding: 0 12px; }
  .nav-inner { padding: 10px 10px 12px 14px; gap: 10px; }
  .nav .logo { font-size: 12px; }
  .toggle button { padding: 5px 7px; }
  .nav .btn-sm { white-space: nowrap; }
}
