:root {
  color-scheme: dark;
  --bg: #0d0f11;
  --bg-warm: #15181b;
  --surface: #191c20;
  --text: #f4f2ef;
  --text-2: #bbb7b1;
  --text-muted: #918c85;
  --border: #35393f;
  --border-light: #25292e;
  --accent: #ff7467;
  --accent-hover: #ff8a7f;
  --accent-bg: #321b1a;
  --accent-text: #200706;
  --focus: #ff8a7f;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Cascadia Code', monospace;
  --r: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--accent-text); }
body.modal-open { overflow: hidden; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
:where(a, button):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* --- Topbar --- */
.topbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.brand img { border-radius: 6px; }
.topbar nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.topbar nav a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.15s;
}
.topbar nav a:hover { color: var(--text); }
.topbar nav button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.topbar nav button:hover {
  border-color: var(--text-muted);
  background: var(--bg-warm);
}

/* --- Hero --- */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
}
.hero-badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 4px 10px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text);
}
.hero-sub {
  max-width: 52ch;
  margin-top: 20px;
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.version-tag {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-main {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s, transform 0.1s;
}
.btn-main:hover { background: var(--accent-hover); }
.btn-main:active { transform: translateY(1px); }

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--border);
  padding-left: 24px;
}
.stat {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.stat:last-child { border-bottom: 0; }
.stat-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Client section --- */
.client-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 0.4fr 1fr;
  gap: 48px;
  align-items: start;
  border-top: 1px solid var(--border-light);
}
.client-text h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.client-text p {
  margin-top: 12px;
  color: var(--text-2);
  line-height: 1.65;
}
.client-shot { margin: 0; }
.client-shot img {
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.32);
}
.client-shot figcaption {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

/* --- Features --- */
.features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px;
  border-top: 1px solid var(--border-light);
}
.features h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}
.feature-card {
  padding: 28px;
  background: var(--surface);
}
.feature-num {
  display: none;
}
.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

/* --- Scan result --- */
.scan-result {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.scan-result figure { margin: 0; }
.scan-result figure img {
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.32);
}
.result-text h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.result-text p {
  margin-top: 12px;
  color: var(--text-2);
  line-height: 1.65;
}

/* --- Download section --- */
.download-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.download-content h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.download-content p {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 15px;
}

/* --- Footer --- */
footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Modals --- */
.captcha-layer,
.password-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 5, 6, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 150ms ease, visibility 150ms;
}
.captcha-layer.active,
.password-layer.active { opacity: 1; visibility: visible; }
.captcha,
.password-modal {
  position: relative;
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--text-muted);
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--bg-warm); color: var(--text); }
.captcha-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.captcha-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.captcha-copy { margin-bottom: 24px; }
.captcha-eyebrow { display: none; }
.captcha h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.captcha-copy p {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}
.challenge {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.challenge:hover:not(:disabled) { border-color: var(--accent); background: var(--bg-warm); }
.challenge:active:not(:disabled) { transform: translateY(1px); }
.challenge:disabled { cursor: wait; opacity: 0.65; }
.challenge > span:last-child { display: grid; gap: 2px; }
.challenge strong { font-size: 15px; font-weight: 600; }
.challenge small { color: var(--text-muted); font-size: 12px; }
.check-box {
  flex: 0 0 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border);
  border-radius: 4px;
}
.check-box > * { grid-area: 1 / 1; }
.check-box svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}
.spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--text-muted);
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0;
}
.challenge.checking .spinner { opacity: 1; animation: spin 600ms linear infinite; }
.challenge.verified { border-color: #27ae60; }
.challenge.verified .check-box { border-color: #27ae60; }
.challenge.verified svg { stroke: #27ae60; opacity: 1; }
.challenge.error { border-color: var(--accent); }
.captcha-note {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.password-modal h2 {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.password-modal > p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}
.archive-password {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
  margin: 24px 0 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
}
.archive-password span {
  color: var(--text-muted);
  font-size: 11px;
}
.archive-password strong {
  grid-row: 2;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.08em;
}
.archive-password button {
  grid-column: 2;
  grid-row: 1 / 3;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}
.archive-password button:hover { border-color: var(--text-muted); background: var(--bg-warm); }
.password-download { width: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 24px 40px;
    gap: 32px;
  }
  .hero-stats {
    flex-direction: row;
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
    gap: 24px;
  }
  .stat { padding: 0; border-bottom: 0; }
  .topbar nav a { display: none; }
  .client-section {
    grid-template-columns: 1fr;
    padding: 40px 24px;
  }
  .features-grid { grid-template-columns: 1fr; }
  .scan-result {
    grid-template-columns: 1fr;
    padding: 40px 24px;
  }
  .scan-result .result-text { order: -1; }
  .download-section {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 24px;
  }
  .download-section .btn-main { width: 100%; }
  footer { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 36px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-stats { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
