/*
Theme Name: ScanBase
Theme URI: https://scanbase.ru
Description: Custom dark theme for ScanBase — бесплатный аудит сайта на соответствие 152-ФЗ
Author: ScanBase
Author URI: https://scanbase.ru
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Text Domain: scanbase
*/

/* ─── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0a14;
  --bg-card:     rgba(255,255,255,0.03);
  --bg-input:    rgba(255,255,255,0.06);
  --purple:      #8B5CF6;
  --purple-light:#a78bfa;
  --purple-dim:  rgba(139,92,246,0.12);
  --purple-border: rgba(139,92,246,0.25);
  --border:      rgba(255,255,255,0.07);
  --border-thin: rgba(255,255,255,0.06);
  --text:        #fff;
  --text-muted:  rgba(255,255,255,0.5);
  --text-faint:  rgba(255,255,255,0.25);
  --text-ghost:  rgba(255,255,255,0.2);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ─── Skip Link ────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 8px 16px;
  background: var(--purple);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
}
.skip-link:focus { top: 0; }

/* ─── Navigation ───────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,20,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.3px;
}
.site-logo .accent { color: var(--purple); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  font-size: 13px;
  color: var(--text-muted);
  transition: color .15s;
}
.nav-link:hover { color: var(--text); }

.nav-btn {
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .15s;
}
.nav-btn:hover { opacity: .88; }

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--purple-dim);
  color: var(--purple-light);
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 0.5px solid var(--purple-border);
  margin-bottom: 1.5rem;
}
.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}
.hero h1 em { color: var(--purple); font-style: normal; }

.hero-lead {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ─── Scan Form ────────────────────────────────────────────────────────── */
.scan-form {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 10px;
  max-width: 580px;
  margin: 0 auto 1rem;
}

.scan-input, .cta-input {
  flex: 1;
  background: var(--bg-input);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  min-width: 0;
}
.scan-input::placeholder, .cta-input::placeholder { color: rgba(255,255,255,0.3); }
.scan-input:focus, .cta-input:focus { border-color: rgba(139,92,246,0.5); }

.scan-btn, .cta-btn {
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
  flex-shrink: 0;
}
.scan-btn:hover, .cta-btn:hover { opacity: .88; }
.scan-btn:disabled { opacity: .5; cursor: not-allowed; }

.hero-note {
  font-size: 12px;
  color: var(--text-faint);
}

/* ─── Stats Strip ──────────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Stat cards — Variant C */
.stat-card {
  background: rgba(139,92,246,0.06);
  border: 0.5px solid rgba(139,92,246,0.15);
  border-radius: 14px;
  padding: 1.5rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.stat-card-num {
  font-size: 32px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}
.stat-card-icon {
  background: rgba(139,92,246,0.18);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--purple);
  font-size: 18px;
}
.stat-card-label {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.45;
  margin: 0;
  flex: 1;
}
.stat-card-bar {
  height: 3px;
  background: rgba(139,92,246,0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.stat-card-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 2px;
}

/* ─── Content Section ──────────────────────────────────────────────────── */
.section {
  max-width: 760px;
  margin: 0 auto;
  /* Reduced from 3.5rem to avoid excessive gaps between sections */
  padding: 2.5rem 2rem;
}
.section-label {
  font-size: 12px;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.section-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1.75rem;
}

/* ─── Checks Grid ──────────────────────────────────────────────────────── */
.checks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  /* Hard reset — no list styles from WP, even if browser applies them */
  list-style: none;
  padding: 0;
  margin: 0;
}
/* Belt-and-suspenders: kill any ::marker that WP or browser injects */
.checks-grid > *::marker { display: none; content: ''; }

.check-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  list-style: none; /* safe even on div */
}
.check-icon {
  font-size: 20px;
  color: var(--purple);
  margin-bottom: 10px;
  display: block;
  width: 20px;
  height: 20px;
  line-height: 1;
}
.check-icon--dim { color: rgba(139,92,246,0.4); }
.check-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.check-title--dim { color: rgba(255,255,255,0.4); }
.check-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
  margin: 0;
}
.check-count {
  font-size: 11px;
  color: var(--purple);
  margin-top: 8px;
  margin-bottom: 0;
}
.check-count--dim { color: rgba(139,92,246,0.5); }

/* ─── Steps ────────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  /* No list counters — this is now a div, but keep reset for safety */
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: none;
}
.step {
  text-align: center;
  padding: 1.25rem 1rem;
  /* Ensure no inherited list counter leaks in */
  list-style: none;
}
/* Suppress any ::marker content on steps (belt-and-suspenders) */
.step::before,
.step::marker { display: none; content: ''; }

.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(139,92,246,0.15);
  border: 0.5px solid rgba(139,92,246,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--purple);
  margin: 0 auto 1rem;
  /* Prevent WP from treating the number div as a list item */
  list-style: none;
}
.step-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.step-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
  margin: 0;
}

/* ─── Divider ──────────────────────────────────────────────────────────── */
.divider {
  height: 0.5px;
  background: var(--border-thin);
  /* Tighter horizontal inset, no extra vertical margin — sections handle their own spacing */
  margin: 0 2rem;
}

/* ─── CTA Block ────────────────────────────────────────────────────────── */
.cta-block {
  background: rgba(139,92,246,0.08);
  border: 0.5px solid rgba(139,92,246,0.2);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  margin: 0 2rem 3rem;
}
.cta-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.cta-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.cta-form {
  display: flex;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 1.25rem;
}

/* ─── Social Links ─────────────────────────────────────────────────────── */
.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  transition: color .15s, border-color .15s;
}
.social-link:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}
.social-link svg { flex-shrink: 0; }

/* ─── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 0.5px solid var(--border-thin);
  padding: 1.5rem 2rem;
  margin-top: auto;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}
.footer-logo .accent { color: var(--purple); }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  transition: color .15s;
}
.footer-social-btn:hover { color: var(--text-muted); }
.footer-middle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  transition: color .15s;
}
.footer-links a:hover { color: var(--text-muted); }
.footer-copy { font-size: 12px; color: var(--text-ghost); }
.footer-disclaimer {
  border-top: 0.5px solid rgba(255,255,255,0.04);
  padding-top: 1rem;
}
.footer-disclaimer p {
  font-size: 11px;
  color: var(--text-ghost);
  line-height: 1.6;
}

/* ─── Results Page ─────────────────────────────────────────────────────── */
.results-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.results-url-label {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.results-url-val {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
}

.score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

/* Scan progress bar */
.scan-progress {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}
.scan-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin: 1rem 0;
  overflow: hidden;
}
.scan-progress-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 2px;
  width: 0%;
  transition: width .4s ease;
}
.scan-status { font-size: 13px; color: var(--text-muted); }

/* Result categories */
.result-category { margin-bottom: 1.5rem; }
.result-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  margin-bottom: 8px;
}
.result-cat-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  flex: 1;
}
.result-cat-summary {
  font-size: 12px;
  color: var(--text-faint);
}

.result-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
  transition: border-color .15s;
}
.result-card:hover { border-color: rgba(255,255,255,0.12); }

.result-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 700;
}
.result-icon--pass { background: rgba(52,211,153,0.15); color: #34d399; }
.result-icon--fail { background: rgba(248,113,113,0.15); color: #f87171; }
.result-icon--warn { background: rgba(251,191,36,0.15);  color: #fbbf24; }

.result-body { flex: 1; min-width: 0; }
.result-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}
.result-desc { font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.5; }

.result-fine {
  flex-shrink: 0;
  font-size: 12px;
  color: #f87171;
  background: rgba(248,113,113,0.08);
  border: 0.5px solid rgba(248,113,113,0.2);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  align-self: flex-start;
}
.result-fine--none { display: none; }

/* Results summary */
.results-summary {
  background: rgba(255,255,255,0.03);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Violations section header */
.violations-section { margin-bottom: 1.5rem; }
.violations-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  margin-bottom: 8px;
}
.violations-section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  flex: 1;
}
.violations-section-count {
  font-size: 12px;
  color: var(--text-faint);
}

/* Locked / blurred violations */
.violations-locked {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 180px; /* ensures overlay has room even with few blurred cards */
}
.violations-cards-blur {
  /* DEV: blur disabled for development — re-enable before launch */
  /* filter: blur(4px); */
  /* pointer-events: none; */
  /* user-select: none; */
}
.violations-locked-overlay {
  /* DEV: overlay hidden so blurred violations are fully readable */
  display: none !important;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(10,10,20,0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
}
.violations-lock-icon {
  width: 42px;
  height: 42px;
  background: rgba(139,92,246,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-size: 18px;
  flex-shrink: 0;
}
.violations-lock-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}
.violations-lock-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0;
}
.violations-lock-btn {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  margin-top: 4px;
  transition: opacity .15s;
}
.violations-lock-btn:hover { opacity: .85; }

/* Blurred card — no extra styles needed beyond filter on parent */
.result-card--blurred { margin-bottom: 6px; }

/* New scan bar */
.new-scan-bar {
  background: rgba(139,92,246,0.08);
  border: 0.5px solid rgba(139,92,246,0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 10px;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.new-scan-bar .scan-input { min-width: 200px; }

/* ─── Generic page ─────────────────────────────────────────────────────── */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.page-content h1 { font-size: 28px; font-weight: 500; margin-bottom: 1.5rem; }
.page-content h2 { font-size: 20px; font-weight: 500; margin: 2rem 0 1rem; color: var(--text-muted); }
.page-content p  { color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.page-content a  { color: var(--purple-light); }
.page-content ul, .page-content ol { padding-left: 1.5rem; color: var(--text-muted); line-height: 1.7; }

/* ─── Utilities ────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.hidden { display: none !important; }

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-nav { padding: 0 1rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .hero h1 { font-size: 24px; }
  .scan-form { flex-direction: column; }
  .scan-btn { width: 100%; justify-content: center; }
  .stats { grid-template-columns: 1fr; gap: 12px; padding: 0 1rem; }
  .checks-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1rem; }
  .cta-block { padding: 1.5rem; margin: 0 1rem 2rem; }
  .cta-form { flex-direction: column; }
  .cta-btn { width: 100%; }
  .footer-top, .footer-middle { flex-direction: column; align-items: flex-start; }
  .divider { margin: 0 1rem; }
  .section { padding: 2.5rem 1rem; }
  .results-wrap { padding: 1.5rem 1rem 3rem; }
  .results-header { flex-direction: column; }
  .new-scan-bar { flex-direction: column; }
  .new-scan-bar .scan-btn { width: 100%; }
}

@media (max-width: 480px) {
  .checks-grid { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 0.5rem; }
}

/* ── Legal contact form — centered card ──────────────────────────── */
#legal-form {
  display: flex;
  justify-content: center;
}
#legal-form .legal-section-inner {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
#legal-form .section-label,
#legal-form .section-title,
#legal-form .legal-form-sub { text-align: center; }
.legal-contact-form {
  width: 100%;
  margin: 0 auto;
  text-align: left;
  background: rgba(255,255,255,0.03);
  border: 0.5px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 2rem;
}
.legal-form-submit { justify-content: center; }
