/* CH57x Keypad Toolbox — marketing site */
:root {
  --bg: #0a0a0c;
  --bg-elevated: #121216;
  --bg-card: #16161c;
  --border: #2a2a32;
  --text: #f2f2f5;
  --text-muted: #9a9aa8;
  --text-dim: #6e6e7a;
  --accent: #e6a30b;
  --accent-soft: rgba(230, 163, 11, 0.14);
  --accent-hover: #f0b429;
  --primary: #3d8bfd;
  --primary-hover: #5ca0ff;
  --success: #3dd68c;
  --danger: #f07178;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  text-align: center;
}

.section-lead {
  color: var(--text-muted);
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.75rem;
  font-size: 1.05rem;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 12, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 12, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: 1rem;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

.nav-cta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, color 0.15s;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #1a1200;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #1a1200;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: #4a4a58;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-lg {
  padding: 0.95rem 1.5rem;
  font-size: 1.05rem;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% 10% auto;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(61, 139, 253, 0.12), transparent 65%),
    radial-gradient(ellipse at 70% 30%, rgba(230, 163, 11, 0.1), transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(230, 163, 11, 0.28);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  font-weight: 750;
}

.hero h1 span {
  background: linear-gradient(120deg, #fff 30%, #9ec5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.hero-meta strong {
  color: var(--text-muted);
  font-weight: 600;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero-badge {
  position: absolute;
  left: -0.75rem;
  bottom: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  max-width: 14rem;
}

.hero-badge strong {
  display: block;
  color: var(--success);
  margin-bottom: 0.15rem;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
  transition: border-color 0.15s, transform 0.15s;
}

.feature-card:hover {
  border-color: #3d3d4a;
  transform: translateY(-2px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(61, 139, 253, 0.12);
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 0.95rem;
}

.feature-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Pricing */
.pricing {
  background: linear-gradient(180deg, transparent, rgba(61, 139, 253, 0.04), transparent);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 820px;
  margin: 0 auto;
  align-items: stretch;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.75rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card.featured {
  border-color: rgba(230, 163, 11, 0.55);
  box-shadow: 0 0 0 1px rgba(230, 163, 11, 0.15), var(--shadow);
  background: linear-gradient(165deg, #1c1810 0%, var(--bg-card) 45%);
}

.price-badge {
  position: absolute;
  top: -0.7rem;
  right: 1.25rem;
  background: var(--accent);
  color: #1a1200;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.price-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.price-card .tagline {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 1.25rem;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.price .amount {
  font-size: 2.6rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price .period {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.price-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 1.35rem;
}

.price-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  flex: 1;
}

.price-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.price-list li:first-child {
  border-top: 0;
}

.price-list .check {
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.price-list .cross {
  color: var(--text-dim);
  flex-shrink: 0;
}

.price-list .muted {
  color: var(--text-dim);
}

/* Download */
.download-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.download-box h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.download-box p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.req-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.req-list li {
  margin-bottom: 0.3rem;
}

.download-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
}

.download-panel .file {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.65rem 0 0.25rem;
  word-break: break-all;
}

.download-panel .size {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

/* FAQ */
.faq {
  max-width: 720px;
  margin: 0 auto;
}

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
  margin-bottom: 0.65rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--text-dim);
  font-size: 1.2rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0.75rem 0 0.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: linear-gradient(135deg, rgba(61, 139, 253, 0.14), rgba(230, 163, 11, 0.08));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
}

.cta-band h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.cta-band p {
  margin: 0 auto 1.4rem;
  color: var(--text-muted);
  max-width: 28rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

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

.footer-links a:hover {
  color: var(--text);
}

/* License key notice */
.license-note {
  margin-top: 1.75rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.license-note code {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.85em;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .hero-visual {
    order: -1;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .download-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links,
  .nav-cta .btn-ghost {
    display: none;
  }

  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 12, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.25rem;
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .features-grid,
  .pricing-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero-badge {
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
    bottom: 0.75rem;
  }
}
