/* Keyhand website. Colors follow the app icon: deep blue, white key cap, yellow label. */

:root {
  --bg: #f7f8ff;
  --surface: #ffffff;
  --tint: #eef1ff;
  --ink: #0f1758;
  --text: #262d4f;
  --muted: #545c80;
  --line: rgba(15, 23, 88, 0.12);
  --blue: #3653f5;
  --blue-deep: #1b2685;
  --on-blue: #ffffff;
  --yellow: #ffd60a;
  --coffee: #7a4a1e;
  --focus: #ffb000;
  --shadow: 0 24px 60px rgba(15, 23, 88, 0.16);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1030;
    --surface: #151a44;
    --tint: #10153a;
    --ink: #f1f3ff;
    --text: #d9ddf5;
    --muted: #a3aad0;
    --line: rgba(255, 255, 255, 0.12);
    --blue: #6f86ff;
    --on-blue: #0c1030;
    --coffee: #e2b27f;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

/* Everything reachable by Tab gets an obvious ring: the audience navigates by keyboard. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

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

.narrow {
  max-width: 780px;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Key caps */
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.45em;
  margin: 0 0.08em;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: 600 0.85em/1.4 "Inter", sans-serif;
  text-align: center;
  vertical-align: 0.05em;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--blue);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(54, 83, 245, 0.3);
}

.button-small {
  padding: 8px 18px;
  font-size: 0.95rem;
}

.button-ghost {
  background: transparent;
  color: var(--blue);
}

.button-ghost:hover {
  box-shadow: none;
  background: var(--tint);
}

.button-coffee {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #2b1a05;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
  .button:hover {
    transform: none;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

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

.brand img {
  border-radius: 8px;
}

nav {
  margin-left: auto;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
}

.nav-links a:hover {
  color: var(--blue);
}

@media (max-width: 760px) {
  nav {
    display: none;
  }
  .header-row > .button {
    margin-left: auto;
  }
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  /* Glows fade out well inside the section, so there's no edge where it ends */
  background:
    radial-gradient(900px 420px at 85% 20%, rgba(54, 83, 245, 0.14), transparent 70%),
    radial-gradient(560px 300px at 12% 55%, rgba(255, 214, 10, 0.14), transparent 70%);
}

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

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1f1a00;
  font-weight: 700;
  font-size: 0.9rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 14px;
}

.fineprint {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.hero-shot,
.wide-shot {
  margin: 0;
}

.hero-shot img,
.wide-shot img,
.feature-shot {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-window {
  box-shadow: none;
  border-radius: 0;
  max-width: 480px;
  justify-self: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Sections */
.section {
  padding: 88px 0;
}

.section-tint {
  background: var(--tint);
}

.section-lead {
  color: var(--muted);
  font-size: 1.15rem;
  margin: -0.2em 0 40px;
}

/* How it works */
.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.step-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 9px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  color: #1f1a00;
  font-weight: 800;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.step p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 820px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Features */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: center;
  margin: 56px 0;
}

.feature-flip .feature-copy {
  order: 2;
}

.feature-copy p {
  color: var(--muted);
  margin: 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 72px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.feature-list p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .feature-flip .feature-copy {
    order: 0;
  }
  .feature-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .feature-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Install */
.install-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.install-steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 56px;
  border-bottom: 1px solid var(--line);
}

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

.tip {
  background: var(--tint);
  border-left: 4px solid var(--yellow);
  border-radius: 10px;
  padding: 18px 22px;
}

.tip p {
  margin: 0;
}

/* FAQ */
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 12px 0;
  padding: 0 22px;
}

summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 700;
  color: var(--ink);
  list-style-position: outside;
}

details p {
  margin: 0 0 18px;
  color: var(--muted);
}

/* Donate */
.donate {
  padding: 64px 0 96px;
}

.donate-box {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.donate-box h2 {
  font-size: 1.6rem;
  margin: 0 0 4px;
}

.donate-box p {
  margin: 0;
  color: var(--muted);
}

.donate-box .button {
  margin-left: auto;
}

.donate-icon {
  font-size: 2.6rem;
}

@media (max-width: 680px) {
  .donate-box {
    flex-direction: column;
    text-align: center;
  }
  .donate-box .button {
    margin-left: 0;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-row p {
  margin: 0;
}

.footer-row ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: var(--muted);
}

/* Privacy page */
.page {
  padding: 64px 0 96px;
}

.page h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.page .updated {
  color: var(--muted);
  margin-top: -0.4em;
}

.page h2 {
  font-size: 1.3rem;
  margin-top: 1.8em;
}
