/* Deep Web Fundamentals — deepweb.cloudschool.ai
   Same visual language as the other CloudSchool microsites (dark grid, cyan/violet accents). */

:root {
  --bg: #070a12;
  --bg-soft: #0b1020;
  --card: rgba(14, 20, 38, 0.72);
  --card-hover: rgba(18, 27, 50, 0.9);
  --text: #f4f7ff;
  --muted: #929bb3;
  --line: rgba(255, 255, 255, .09);
  --cyan: #48e5ff;
  --blue: #6b8cff;
  --violet: #a875ff;
  --green: #69e6a7;
  --orange: #ffb86b;
  --pink: #ff7ab6;
  --radius: 18px;
  --max: 1160px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 12%, rgba(72, 229, 255, .11), transparent 30%),
    radial-gradient(circle at 18% 28%, rgba(168, 117, 255, .11), transparent 28%),
    var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a { color: inherit; text-decoration: none; }

.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  padding: 8px 14px; border-radius: 8px; background: var(--cyan); color: #041017; font-weight: 600;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- NAV ---------- */

.site-nav {
  position: relative; z-index: 10; height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.03em; }
.logo span { color: var(--muted); font-weight: 500; }

.logo-mark {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px;
  color: #061018; background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 28px rgba(72, 229, 255, .22);
  font-family: var(--mono); font-weight: 900; font-size: .8rem;
}

.nav-links { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: .9rem; }
.nav-links a:hover { color: var(--text); }

/* ---------- HERO ---------- */

.hero { padding: 90px 0 70px; }

.eyebrow {
  color: var(--cyan); font: .78rem var(--mono); letter-spacing: .14em; margin-bottom: 18px;
}
.eyebrow::before { content: "● "; color: var(--green); }

h1 {
  max-width: 900px;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: .98; letter-spacing: -.06em; font-weight: 800;
}

.gradient-text {
  background: linear-gradient(90deg, #fff 0%, var(--cyan) 45%, var(--violet) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-copy { max-width: 680px; margin-top: 26px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero-copy strong { color: #dce5fa; font-weight: 600; }

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

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 12px; font-size: .9rem; font-weight: 650;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #041017; background: linear-gradient(135deg, var(--cyan), #75baff); box-shadow: 0 10px 30px rgba(72, 229, 255, .18); }
.button-secondary { border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: #dce2f1; }
.button-secondary:hover { border-color: rgba(255, 255, 255, .16); }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 60px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line);
}
.stat { padding: 20px 22px; background: rgba(9, 13, 25, .92); }
.stat b { display: block; font-size: 1.6rem; letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: .82rem; }

/* ---------- SECTIONS ---------- */

section { padding: 100px 0; }
section.tight { padding-top: 40px; }

.section-label { color: var(--violet); font: .8rem var(--mono); margin-bottom: 14px; }

h2 { max-width: 820px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -.045em; }

.section-intro { max-width: 680px; margin-top: 18px; color: var(--muted); font-size: 1.05rem; }

/* ---------- PILLARS / SITE CARDS ---------- */

.pillar { margin-top: 56px; }
.pillar + .pillar { margin-top: 44px; }

.pillar-head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.pillar-head h3 { font-size: 1.15rem; letter-spacing: -.02em; }
.pillar-head p { color: var(--muted); font-size: .88rem; }
.pillar-num { color: var(--cyan); font: .75rem var(--mono); }

.site-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.site-card {
  position: relative; display: flex; flex-direction: column;
  padding: 24px; min-height: 230px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); backdrop-filter: blur(10px);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.site-card:hover { transform: translateY(-4px); border-color: rgba(72, 229, 255, .25); background: var(--card-hover); }

.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }

.card-icon {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  color: var(--cyan); background: rgba(72, 229, 255, .08); font: 14px var(--mono);
}
.accent-violet .card-icon { color: var(--violet); background: rgba(168, 117, 255, .1); }
.accent-green .card-icon { color: var(--green); background: rgba(105, 230, 167, .08); }
.accent-orange .card-icon { color: var(--orange); background: rgba(255, 184, 107, .08); }
.accent-pink .card-icon { color: var(--pink); background: rgba(255, 122, 182, .08); }
.accent-blue .card-icon { color: var(--blue); background: rgba(107, 140, 255, .1); }

.card-arrow { color: #5d6884; font-size: 1.1rem; transition: color .2s ease, transform .2s ease; }
.site-card:hover .card-arrow { color: var(--cyan); transform: translate(2px, -2px); }

.site-card h4 { font-size: 1.08rem; letter-spacing: -.02em; margin-bottom: 4px; }
.site-url { color: var(--cyan); font: .76rem var(--mono); margin-bottom: 12px; }
.site-card p { color: var(--muted); font-size: .88rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 16px; }
.tags li {
  list-style: none; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px;
  color: #aab3c9; font: .7rem var(--mono); background: rgba(255, 255, 255, .02);
}

/* ---------- PATH ---------- */

.path-section {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, rgba(72, 229, 255, .025), transparent);
}

.path { margin-top: 45px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; counter-reset: step; }

.step {
  display: flex; gap: 20px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .025);
}
.step-num { color: var(--cyan); font: 11px var(--mono); padding-top: 4px; }
.step h3 { font-size: .98rem; margin-bottom: 5px; }
.step p { color: var(--muted); font-size: .86rem; }
.step a { color: var(--cyan); }
.step a:hover { text-decoration: underline; }

/* ---------- AUDIENCE ---------- */

.audience { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.who { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.who h3 { font-size: .98rem; margin-bottom: 6px; }
.who p { color: var(--muted); font-size: .85rem; }

/* ---------- CTA ---------- */

.cta { text-align: center; padding: 120px 0; }
.cta h2 { margin: 0 auto; max-width: 800px; }
.cta p { max-width: 590px; margin: 20px auto 0; color: var(--muted); }
.cta .hero-actions { justify-content: center; }

.notify { margin-top: 32px; color: #66718a; font: 11px var(--mono); }

/* ---------- FOOTER ---------- */

footer { border-top: 1px solid var(--line); padding: 34px 0; color: #626d84; font-size: .8rem; }

.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; max-width: 640px; }
.footer-links a:hover { color: var(--cyan); }

.powered-by { color: #626d84; transition: color .2s ease; }
.powered-by strong { color: #8994aa; font-weight: 600; }
.powered-by:hover, .powered-by:hover strong { color: var(--cyan); }

/* ---------- PAGE HERO / PROSE ---------- */

.page-hero { padding: 70px 0 30px; }
.page-hero h1 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); }
.nav-links a[aria-current="page"] { color: var(--text); }

.prose > * { max-width: 860px; }
.prose > .table-wrap { max-width: none; }
.prose h2 { margin-top: 64px; scroll-margin-top: 20px; }
.prose h3 { margin-top: 34px; font-size: 1.25rem; letter-spacing: -.02em; scroll-margin-top: 20px; }
.prose h4 { margin-top: 22px; font-size: 1rem; color: #dce5fa; }
.prose p, .prose li { color: #b8c1d6; font-size: 1rem; }
.prose p { margin-top: 14px; }
.prose ul, .prose ol { margin: 14px 0 0 22px; }
.prose li { margin-top: 6px; }
.prose strong { color: #eef2fb; }
.prose a, .link { color: var(--cyan); }
.prose a:hover, .link:hover { text-decoration: underline; }
.prose code, code.inline { font: .86em var(--mono); color: #dce5fa; background: rgba(255,255,255,.05); padding: 1px 6px; border-radius: 6px; word-break: break-all; }

.toc { margin-top: 26px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.toc b { font: .75rem var(--mono); color: var(--violet); letter-spacing: .1em; }
.toc ol { margin: 10px 0 0 20px; columns: 2; column-gap: 30px; }
.toc li { color: var(--muted); font-size: .9rem; }
.toc a:hover { color: var(--cyan); }

.callout {
  margin-top: 22px; padding: 18px 22px; border-radius: 14px;
  border: 1px solid rgba(255, 184, 107, .28); background: rgba(255, 184, 107, .06);
}
.callout p { margin-top: 6px; color: #e9dcc8; }
.callout p:first-child { margin-top: 0; }
.callout.info { border-color: rgba(72, 229, 255, .25); background: rgba(72, 229, 255, .05); }
.callout.info p { color: #cfe6ef; }
.callout-title { font: .75rem var(--mono); letter-spacing: .12em; color: var(--orange); }
.callout.info .callout-title { color: var(--cyan); }

.table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th, table.data td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data th { color: #dce5fa; font-weight: 650; background: rgba(255,255,255,.03); white-space: nowrap; }
table.data td { color: #b8c1d6; }
table.data tr:last-child td { border-bottom: 0; }
table.data a { color: var(--cyan); }

.onion { font: .78rem var(--mono); color: var(--green); word-break: break-all; }

.layers { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.layer { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.layer h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.layer p { color: var(--muted); font-size: .88rem; }
.layer .pct { font: .75rem var(--mono); color: var(--cyan); }
.layer.deep .pct { color: var(--violet); }
.layer.dark .pct { color: var(--pink); }

.onion-box {
  margin-top: 36px; padding: 30px; border-radius: var(--radius);
  border: 1px dashed rgba(105, 230, 167, .45); background: rgba(105, 230, 167, .05);
}
.onion-box h3 { font-size: 1.3rem; }
.onion-box p { color: var(--muted); margin-top: 10px; }
.onion-placeholder {
  display: inline-block; margin-top: 16px; padding: 10px 14px; border-radius: 10px;
  font: .9rem var(--mono); color: var(--orange); background: rgba(0,0,0,.35); border: 1px solid var(--line);
}

/* ---------- 404 ---------- */

.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.notfound h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0 auto; }
.notfound p { color: var(--muted); margin-top: 16px; }
.notfound .hero-actions { justify-content: center; }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 960px) {
  .site-grid { grid-template-columns: repeat(2, 1fr); }
  .audience { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .layers { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .site-nav { height: auto; padding: 14px 0; flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav-links { flex-wrap: wrap; gap: 8px 16px; font-size: .85rem; }
  .hero, .page-hero { padding-top: 50px; }
  section { padding: 70px 0; }
  .site-grid, .path, .audience { grid-template-columns: 1fr; }
  .pillar-head { flex-direction: column; gap: 2px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .toc ol { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
