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

:root {
  --bg:        #202020;
  --bg-card:   #2d2d2d;
  --bg-subtle: #252525;
  --bg-raised: #383838;
  --text:      #ffffff;
  --text-muted:#9e9e9e;
  --border:    #5a5a5a;
  --border-subtle: #3a3a3a;
  --plum:      #8e44ad;
  --plum-light:#a35bc4;
  --plum-dark: #6c2f84;
  --plum-glow: rgba(142, 68, 173, 0.25);
  --green:     #4caf50;
  --amber:     #ffc107;
  --red:       #f44336;
  --radius:    10px;
  --radius-sm: 6px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* grid/table quirks must not widen the scroll canvas */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ─────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(32, 32, 32, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-home {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
}

.nav-home img {
  height: 22px;
  width: 22px;
  object-fit: contain;
  opacity: 0.7;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

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

.btn-plum:hover { background: var(--plum-light); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover { background: var(--bg-raised); }

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: var(--radius-sm);
}

/* ── HERO ────────────────────────────────────────── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--plum-glow);
  border: 1px solid rgba(142, 68, 173, 0.4);
  color: var(--plum-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--plum-light);
}

.hero p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
}

.hero-screenshot {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(142, 68, 173, 0.1);
  display: block;
}

.hero-badge-win {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.hero-badge-win i { color: var(--plum-light); }

/* ── METRICS BAR ─────────────────────────────────── */
.metrics {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  padding: 28px 32px;
  margin-top: 80px;
}

.metrics-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  gap: 24px;
  flex-wrap: wrap;
}

.metric {
  text-align: center;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--plum-light);
  letter-spacing: -0.5px;
  line-height: 1;
}

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── SECTION ─────────────────────────────────────── */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 32px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--plum-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-label::before {
  content: '';
  display: block;
  width: 16px;
  height: 2px;
  background: var(--plum);
  border-radius: 1px;
}

section h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

section > p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ── FEATURES GRID ───────────────────────────────── */
.features-grid {
  display: grid;
  /* min(260px, 100%) keeps tracks inside narrow viewports (padding + minmax(260px) overflowed <~360px) */
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 28px 28px 32px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: rgba(142, 68, 173, 0.4);
  box-shadow: 0 0 0 1px rgba(142, 68, 173, 0.1), 0 8px 24px rgba(0,0,0,0.3);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--plum-glow);
  border: 1px solid rgba(142, 68, 173, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--plum-light);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tag-safe    { background: rgba(76, 175, 80, 0.15);  color: var(--green); }
.tag-caution { background: rgba(255, 193, 7, 0.15);  color: var(--amber); }
.tag-danger  { background: rgba(244, 67, 54, 0.12);  color: var(--red);   }

/* ── SCREENSHOTS ─────────────────────────────────── */
.screenshots-section { background: var(--bg-subtle); }
.screenshots-section > section { max-width: 1200px; }

.screenshots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.screenshot-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.screenshot-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.screenshot-item img {
  width: 100%;
  display: block;
}

.screenshot-caption {
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
}

.screenshot-caption strong {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.screenshot-caption span {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── HEATMAP EXPLAINER ───────────────────────────── */
.heatmap-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.legend-swatch {
  width: 28px;
  height: 18px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── COMPARISON LIST ────────────────────────────── */
.compare-list {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.compare-row {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
}

.compare-row:last-child {
  border-bottom: none;
}

.compare-row:nth-child(odd):not(.compare-header) {
  background: var(--bg-card);
}

.compare-row:nth-child(even) {
  background: rgba(45, 45, 45, 0.5);
}

.compare-header {
  background: var(--bg-subtle);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.compare-header .compare-col-test {
  color: var(--plum-light);
}

.compare-col-test {
  flex: 0 0 auto;
  padding: 14px 20px;
  border-right: 1px solid var(--border-subtle);
}

.compare-col-desc {
  flex: 1 1 auto;
  padding: 14px 20px;
  color: var(--text-muted);
}

.compare-test-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.35;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.chip-green { background: rgba(76,175,80,0.15); color: var(--green); }
.chip-red   { background: rgba(244,67,54,0.12); color: var(--red); }


/* ── CTA BANNER ──────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--plum-dark) 0%, var(--plum) 60%, var(--plum-light) 100%);
  border-radius: var(--radius);
  padding: 60px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: #fff;
}

.cta-banner p {
  color: rgba(255,255,255,0.75);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 32px;
}

.cta-banner .btn-white {
  background: #fff;
  color: var(--plum-dark);
  font-weight: 700;
}

.cta-banner .btn-white:hover { background: rgba(255,255,255,0.9); }

.cta-banner .btn-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

.cta-banner .btn-ghost:hover { background: rgba(255,255,255,0.2); }

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── FOOTER ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  padding: 36px 32px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-logo img {
  height: 22px;
  width: 22px;
  object-fit: contain;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}

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

.footer-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── DIVIDER ─────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 0;
}

/* ── LIGHTBOX ────────────────────────────────────── */
.screenshot-item img {
  cursor: zoom-in;
}

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  overflow: hidden;
  /* lets flex children use the padded box, not overflow past it (esp. Firefox) */
  min-width: 0;
}

#lightbox.open {
  display: flex;
}

#lightbox img {
  /* flex item default min-width:auto uses intrinsic image width → horizontal overflow */
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8);
  cursor: default;
}

#lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
}

#lightbox-close:hover {
  background: var(--bg-raised);
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 64px 24px 48px;
    gap: 48px;
  }

  .hero-badge-win { display: none; }

  nav { padding: 0 20px; }
  .nav-links { display: none; }

  section { padding: 56px 24px; }
  .screenshots-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 40px 24px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}
