/* ============================================================
   Top10 CCTV Installers — futuristic dark theme
   Shared design system for the Top10 directory network.
   ============================================================ */

:root {
  --bg: #06080f;
  --bg-raise: #0b101c;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.09);
  --text: #e8edf6;
  --text-dim: #93a0b8;
  --accent: #22d3ee;        /* electric cyan */
  --accent-2: #818cf8;      /* violet */
  --accent-glow: rgba(34, 211, 238, 0.35);
  --gold: #fbbf24;
  --green: #34d399;
  --radius: 18px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  /* `clip` prevents horizontal overflow without creating a scroll
     container (overflow-x: hidden on body breaks anchor scrolling) */
  overflow-x: clip;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ---- ambient background ---- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 15% -5%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(700px 500px at 85% 10%, rgba(129, 140, 248, 0.12), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(34, 211, 238, 0.07), transparent 60%);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---- nav ---- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* no backdrop-filter: stacked blur layers hang low-end compositors */
  background: rgba(6, 8, 15, 0.94);
  border-bottom: 1px solid var(--stroke);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.logo {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo .mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: #04121a;
  box-shadow: 0 0 18px var(--accent-glow);
}

.logo em { color: var(--accent); font-style: normal; }

.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.93rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.2s;
  font-family: var(--font);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--accent-glow); }
.btn-ghost {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--stroke);
}
.btn-ghost:hover { background: var(--glass-strong); }
.btn-lg { padding: 15px 32px; font-size: 1.02rem; }

/* ---- hero ---- */
.hero { padding: 88px 0 64px; text-align: center; }

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 26px;
}
.hero .eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 1.13rem;
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.trust-row {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 44px;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-row .tick { color: var(--green); font-weight: 700; }

/* ---- sections ---- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-head p { color: var(--text-dim); }

/* ---- listing cards ---- */
.listing {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.25s;
  position: relative;
}
.listing:hover {
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(34, 211, 238, 0.15);
}

.listing .rank {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--bg-raise);
  border: 1px solid var(--stroke);
  color: var(--text-dim);
}
.listing.top .rank {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.06));
  border-color: rgba(251, 191, 36, 0.45);
  color: var(--gold);
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.18);
}

.listing h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.listing .meta { color: var(--text-dim); font-size: 0.88rem; margin-top: 4px; }
.listing .stars { color: var(--gold); letter-spacing: 2px; font-size: 0.85rem; }
.listing .score { color: var(--text); font-weight: 700; }

.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent);
}
.badge.gold {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: var(--gold);
}
.badge.sponsored {
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.35);
  color: var(--accent-2);
}

.listing .cta-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.listing .response { font-size: 0.78rem; color: var(--green); }

.sample-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 20px;
  opacity: 0.75;
}

/* ---- quiz / lead form ---- */
.quiz-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 40px;
  background: #0a0f1a;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.quiz-progress {
  height: 5px;
  background: var(--bg-raise);
  border-radius: 999px;
  margin-bottom: 32px;
  overflow: hidden;
}
.quiz-progress .bar {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 12px var(--accent-glow);
}

.quiz-step { display: none; animation: fadeUp 0.35s ease; }
.quiz-step.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-step h3 { font-size: 1.3rem; margin-bottom: 22px; letter-spacing: -0.01em; }

.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option {
  padding: 18px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-raise);
  border: 1px solid var(--stroke);
  cursor: pointer;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.18s;
  color: var(--text);
  font-family: var(--font);
}
.option:hover { border-color: var(--accent); transform: translateY(-2px); }
.option.selected {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(34, 211, 238, 0.15);
}
.option .icon { display: block; font-size: 1.6rem; margin-bottom: 8px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 7px;
  font-weight: 600;
}
.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-raise);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.quiz-nav { display: flex; justify-content: space-between; margin-top: 28px; gap: 12px; }
.quiz-note { font-size: 0.78rem; color: var(--text-dim); text-align: center; margin-top: 18px; }

.quiz-success { text-align: center; padding: 24px 0; }
.quiz-success .big { font-size: 3rem; margin-bottom: 14px; }
.quiz-success h3 { margin-bottom: 10px; }
.quiz-success p { color: var(--text-dim); }

/* ---- stats strip ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.stat {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.stat .num {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .lbl { color: var(--text-dim); font-size: 0.88rem; margin-top: 6px; }

/* ---- steps / how it works ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.step-card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
}
.step-card .n {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  margin-bottom: 18px;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ---- FAQ ---- */
.faq-list { max-width: 760px; margin: 0 auto; }
details {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.98rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; font-weight: 400; }
details[open] summary::after { content: "–"; }
details .answer { padding: 0 24px 20px; color: var(--text-dim); font-size: 0.94rem; }

/* ---- content pages ---- */
.article { max-width: 760px; margin: 0 auto; padding: 64px 24px; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 18px; }
.article h2 { font-size: 1.45rem; margin: 40px 0 14px; letter-spacing: -0.01em; }
.article p, .article li { color: var(--text-dim); margin-bottom: 14px; }
.article ul { padding-left: 22px; }
.article .updated { font-size: 0.82rem; color: var(--text-dim); opacity: 0.7; margin-bottom: 32px; }
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}
.article th, .article td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
}
.article th { color: var(--text); font-weight: 700; background: var(--glass); }
.article td { color: var(--text-dim); }

/* ---- pricing (get listed) ---- */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.tier {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
}
.tier.featured {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.12);
  position: relative;
}
.tier.featured::before {
  content: "MOST POPULAR";
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
}
.tier h3 { font-size: 1.1rem; margin-bottom: 6px; }
.tier .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.tier .price span { font-size: 0.9rem; font-weight: 500; color: var(--text-dim); }
.tier ul { list-style: none; margin: 22px 0 28px; flex: 1; }
.tier li { padding: 7px 0; color: var(--text-dim); font-size: 0.92rem; }
.tier li::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--stroke);
  padding: 48px 0 36px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-grid h4 { font-size: 0.85rem; margin-bottom: 14px; color: var(--text); }
.footer-grid a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 9px;
}
.footer-grid a:hover { color: var(--accent); }
.footer-grid p { color: var(--text-dim); font-size: 0.85rem; }
.disclosure {
  font-size: 0.78rem;
  color: var(--text-dim);
  opacity: 0.75;
  border-top: 1px solid var(--stroke);
  padding-top: 24px;
  line-height: 1.7;
}

/* ---- responsive ---- */
@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .listing { grid-template-columns: 48px 1fr; padding: 20px; }
  .listing .rank { width: 48px; height: 48px; font-size: 1.15rem; border-radius: 12px; }
  .listing .cta-col { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .option-grid { grid-template-columns: 1fr; }
  .quiz-wrap { padding: 28px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
