/* KeyTrainer marketing site */
@font-face { font-family: "Press Start 2P"; src: url("../fonts/PressStart2P.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/Jost-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/Jost-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/Jost-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0B0F1A;
  --space: #000000;
  --yellow: #FFD23F;
  --gold: #F2B600;
  --pink: #FF3E9A;
  --cyan: #4FD8FF;
  --purple: #33185A;
  --deep: #141B33;
  --white: #FFFFFF;
  --muted: #B9C0D9;
  --line: #262F52;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --text: "Jost", "Century Gothic", system-ui, sans-serif;
  --notch: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px), 0 8px, 8px 8px);
  --notch-s: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--space);
  color: var(--white);
  font-family: var(--text);
  font-size: 17px;
  line-height: 26px;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--yellow); color: var(--navy); padding: 8px 16px; }

/* Type */
h1, h2, h3, .pixel { font-family: var(--pixel); font-weight: 400; letter-spacing: 0; }
h1 { font-size: 40px; line-height: 56px; margin: 0 0 24px; }
h2 { font-size: 24px; line-height: 36px; margin: 0 0 24px; }
h3 { font-size: 16px; line-height: 24px; margin: 0 0 16px; }
p { margin: 0 0 16px; }
.intro { font-size: 20px; line-height: 30px; color: var(--white); }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--yellow); margin: 0 0 24px; }
.small { font-size: 14px; line-height: 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.brand img { width: 200px; height: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { color: var(--white); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--yellow); }
.nav-toggle { display: none; background: none; border: 2px solid var(--white); color: var(--white); font-family: var(--pixel); font-size: 8px; padding: 10px 12px; cursor: pointer; }

/* Buttons: yellow keycap with a hard cyan shadow */
.btn { display: inline-block; text-decoration: none; filter: drop-shadow(4px 4px 0 var(--cyan)); transition: transform .06s, filter .06s; }
.btn > span {
  display: block;
  font-family: var(--pixel); font-size: 16px; line-height: 16px;
  padding: 20px 24px;
  background: var(--yellow); color: var(--navy);
  clip-path: var(--notch);
}
.btn:hover > span { background: #ffdd66; }
.btn:active { transform: translate(4px, 4px); filter: drop-shadow(0 0 0 var(--cyan)); }
.btn.ghost { filter: drop-shadow(4px 4px 0 var(--pink)); }
.btn.ghost > span { background: var(--navy); color: var(--white); box-shadow: inset 0 0 0 3px var(--white); }
.btn.ghost:hover > span { background: var(--deep); }
.btn.small > span { font-size: 8px; line-height: 8px; padding: 14px 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: min(80vh, 720px); display: flex; align-items: center; }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transform-origin: 50% 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.6) 60%, rgba(0,0,0,1) 100%),
    radial-gradient(ellipse 60% 55% at center, rgba(11,15,26,.82) 0%, rgba(11,15,26,.55) 55%, rgba(11,15,26,.1) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding: 96px 0; text-align: center; }
.hero-panel { max-width: 1000px; margin-inline: auto; padding: 48px 40px; background: rgba(11,15,26,.72); clip-path: var(--notch); backdrop-filter: blur(2px); }
.hero h1 { max-width: 900px; margin-inline: auto; text-shadow: 4px 4px 0 var(--navy); }
.hero .intro { max-width: 680px; margin: 0 auto 40px; text-shadow: 0 2px 12px var(--navy); }
.hero .btn-row { justify-content: center; }
.hero .launch-note { margin: 32px 0 0; color: var(--muted); font-size: 14px; }

/* Page header (inner pages) */
.page-head { padding: 96px 0 48px; background: linear-gradient(180deg, var(--purple) -60%, var(--navy) 100%); }
.page-head .intro { max-width: 760px; color: var(--muted); }

/* Sections */
section { padding: 64px 0; }
.panel { background: var(--deep); clip-path: var(--notch); padding: 32px; }
.panel.purple { background: var(--purple); }
.narrow > * { max-width: 760px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.card h3 { color: var(--yellow); }
.card p:last-child { margin-bottom: 0; }

.tag { display: inline-block; font-family: var(--pixel); font-size: 8px; line-height: 8px; padding: 8px; margin-bottom: 16px; clip-path: var(--notch-s); color: var(--navy); }
.tag.pink { background: var(--pink); }
.tag.cyan { background: var(--cyan); }
.tag.yellow { background: var(--yellow); }

.who-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.who-list li { background: var(--deep); clip-path: var(--notch); padding: 16px 24px 16px 56px; position: relative; }
.who-list li::before { content: ""; position: absolute; left: 24px; top: 23px; width: 12px; height: 12px; background: var(--yellow); box-shadow: 3px 3px 0 var(--cyan); }

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

/* Steps on How It Works */
.step { display: grid; grid-template-columns: 96px 1fr; gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step-num { font-family: var(--pixel); font-size: 40px; line-height: 40px; color: var(--yellow); text-shadow: 4px 4px 0 var(--pink); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--deep); clip-path: var(--notch); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 16px 24px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--pixel); font-size: 8px; line-height: 16px; color: var(--yellow); font-weight: 400; background: rgba(51,24,90,.45); }
tr:last-child td { border-bottom: 0; }
td.action { font-weight: 700; white-space: nowrap; }
.pricing td:first-child { font-weight: 500; color: var(--muted); }
.pricing th:nth-child(3), .pricing td:nth-child(3) { background: rgba(255,210,63,.06); }
.price { font-family: var(--pixel); font-size: 16px; line-height: 24px; color: var(--yellow); }

/* Keycaps */
kbd {
  display: inline-block; font-family: var(--text); font-weight: 700; font-size: 14px; line-height: 20px;
  min-width: 28px; text-align: center; padding: 2px 8px; margin: 2px 0;
  background: var(--yellow); color: var(--navy);
  box-shadow: 0 3px 0 var(--pink), 3px 3px 0 var(--cyan);
  clip-path: none; white-space: nowrap;
}
.combo { white-space: nowrap; }
.plus, .or { color: var(--muted); font-size: 14px; margin: 0 4px; }
.or { display: inline-block; margin: 0 8px; }
.cat-title { margin-top: 48px; }
.note {
  border-left: 4px solid var(--cyan); background: var(--deep);
  padding: 16px 24px; margin: 0 0 32px; color: var(--muted);
}
.note strong { color: var(--white); }

/* Prose pages (privacy) */
.prose h2 { font-size: 16px; line-height: 24px; color: var(--yellow); margin-top: 40px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }

/* Team */
.team { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.team li { background: var(--deep); clip-path: var(--notch); padding: 32px; }
.team .name { font-family: var(--pixel); font-size: 16px; line-height: 24px; display: block; margin-bottom: 8px; }
.team .role { color: var(--cyan); }

/* Contact list */
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 16px; }
.contact-list li { background: var(--deep); clip-path: var(--notch); padding: 24px; display: grid; grid-template-columns: 160px 1fr; gap: 16px; }
.contact-list .label { font-family: var(--pixel); font-size: 8px; line-height: 26px; color: var(--yellow); }

/* CTA band on the pixel galaxy */
.cta-band {
  position: relative; padding: 96px 0;
  background: var(--navy) url("../img/galaxy.png") center / cover no-repeat;
  image-rendering: pixelated;
}
.cta-band .panel { max-width: 720px; margin-inline: auto; text-align: center; padding: 48px 32px; image-rendering: auto; }
.waitlist { display: flex; flex-direction: column; gap: 12px; max-width: 520px; margin: 32px auto 0; text-align: left; }
.field-label { display: block; font-weight: 500; font-size: 17px; margin: 12px 0 4px; padding: 0; }
.field-label .opt { color: var(--muted); font-weight: 400; font-size: 14px; }
.waitlist input[type=email], .waitlist .other-input {
  font: inherit; font-size: 17px; padding: 14px 16px; width: 100%;
  border: 2px solid rgba(255,255,255,.6); border-radius: 8px; background: rgba(0,0,0,.6); color: var(--white);
}
.waitlist input::placeholder { color: var(--muted); }
.waitlist .other-input { margin-top: 10px; }
.choices { border: 0; margin: 0; padding: 0; min-width: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; flex: 1 1 110px; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: block; text-align: center; padding: 12px 16px; border-radius: 8px;
  background: rgba(255,255,255,.08); border: 2px solid transparent; font-weight: 500; transition: background .12s, color .12s;
}
.chip:hover span { background: rgba(255,255,255,.14); }
.chip input:checked + span { background: var(--yellow); color: var(--navy); border-color: var(--yellow); box-shadow: 3px 3px 0 var(--cyan); }
.chip input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 3px; }
.waitlist button { border: 0; background: none; padding: 0; cursor: pointer; margin-top: 16px; align-self: center; }
.form-msg { min-height: 26px; margin-top: 16px; color: var(--cyan); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 32px; }
.footer-top img { width: 200px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px 24px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--white); text-decoration: none; }
.footer-links a:hover { color: var(--yellow); }
.legal { max-width: 760px; }

/* Responsive */
@media (max-width: 900px) {
  h1 { font-size: 24px; line-height: 40px; }
  h2 { font-size: 16px; line-height: 28px; }
  .grid-3, .grid-2, .split, .team, .who-list { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 80px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--navy); border-bottom: 1px solid var(--line); padding: 8px 24px 24px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
  .nav .btn { margin-top: 12px; align-self: flex-start; }
  .step { grid-template-columns: 1fr; gap: 16px; }
  .contact-list li { grid-template-columns: 1fr; gap: 4px; }
  th, td { padding: 12px 16px; }
  .hero .wrap { padding: 48px 0; }
  .hero-panel { padding: 32px 20px; }
  section { padding: 48px 0; }
}
@media (max-width: 700px) {
  table.keys colgroup, table.keys thead { display: none; }
  table.keys, table.keys tbody, table.keys tr, table.keys td { display: block; width: 100%; }
  table.keys tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  table.keys tr:last-child { border-bottom: 0; }
  table.keys td { border: 0; padding: 4px 20px; }
  table.keys td.action { font-family: var(--pixel); font-weight: 400; font-size: 8px; line-height: 16px; color: var(--yellow); white-space: normal; padding-bottom: 8px; }
  table.keys td[data-label]::before { content: attr(data-label); display: inline-block; width: 72px; color: var(--muted); font-size: 14px; }
  table.keys td.why { padding-top: 8px; }
  .pricing th, .pricing td { padding: 12px 10px; font-size: 15px; line-height: 22px; }
  .pricing .price { font-family: var(--text); font-weight: 700; font-size: 20px; line-height: 28px; }
}
@media (max-width: 520px) {
  .btn > span { font-size: 12px; line-height: 12px; padding: 18px 18px; }
  .brand img { width: 200px; }
  .intro { font-size: 18px; line-height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero video { display: none; }
  .btn { transition: none; }
}

/* Match the app: black sky with twinkling stars */
.stars { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
.site-footer, .page-head { position: relative; }
.page-head { background: linear-gradient(180deg, rgba(51,24,90,.55) -40%, rgba(0,0,0,0) 100%); }
.hero-panel { background: rgba(0,0,0,.72); }
.hero-logo { width: min(640px, 100%); height: auto; margin: 0 auto 32px; }
.hero h1 { font-size: 24px; line-height: 40px; text-wrap: balance; }
.panel { background: rgba(20,27,51,.85); }

/* Learn / Test / Train cards, same style as the app's home screen */
.mode { border: 2px solid; border-radius: 16px; padding: 32px; text-align: center; transition: transform .15s; backdrop-filter: blur(2px); }
.mode:hover { transform: scale(1.02); }
.mode h3 { font-family: var(--pixel); font-weight: 400; font-size: 24px; line-height: 32px; margin: 24px 0; }
.mode p { margin: 0; color: rgba(255,255,255,.8); }
.mode.learn { border-color: rgba(79,216,255,.7); background: rgba(79,216,255,.12); }
.mode.learn h3 { color: var(--cyan); }
.mode.test { border-color: rgba(255,210,63,.6); background: rgba(255,210,63,.12); }
.mode.test h3 { color: var(--yellow); }
.mode.train { border-color: rgba(255,62,154,.6); background: rgba(255,62,154,.12); }
.mode.train h3 { color: var(--pink); }
@media (max-width: 900px) { .hero h1 { font-size: 16px; line-height: 28px; } }
