/* ============================================================
   wannabegeek.dev — site.css
   Shared stylesheet for all pages.
   All pages import:
     Bootstrap 5 (CDN)  →  base grid / components
     Nunito + Share Tech Mono (Google Fonts)  →  typography
     site.css (this file)  →  design tokens + all shared UI
   ============================================================ */

/* ── Design tokens ────────────────────────────────────────── */
:root {
  --clr-bg:      #1b1b1b;
  --clr-surface: #242424;
  --clr-card:    #2a2a2a;
  --clr-border:  #363636;
  --clr-green:   #39d98a;
  --clr-red:     #e5534b;
  --clr-amber:   #f0a500;
  --clr-blue:    #4d9de0;
  --clr-text:    #e0e0e0;
  --clr-muted:   #7a7a8a;
  --font-ui:     'Nunito', sans-serif;
  --font-mono:   'Share Tech Mono', monospace;
}

/* ── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--clr-blue); }
a:hover { color: var(--clr-green); }

code {
  background: rgba(255,255,255,0.08);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--clr-amber);
}

/* ── Navbar ───────────────────────────────────────────────── */
.wbg-nav {
  background: #111 !important;
  border-bottom: 1px solid var(--clr-border);
  padding: 0.5rem 0;
}
.wbg-nav .navbar-brand {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #fff !important;
}
.wbg-nav .navbar-brand span { color: var(--clr-green); }
.wbg-nav .nav-link {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: #999 !important;
  padding: 0.4rem 1rem !important;
  transition: color 0.2s;
}
.wbg-nav .nav-link:hover,
.wbg-nav .nav-link.active { color: #fff !important; }
.navbar-toggler {
  border-color: rgba(255,255,255,0.2);
  padding: 0.25rem 0.5rem;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Page hero ────────────────────────────────────────────── */
.page-hero {
  background: #111;
  border-bottom: 1px solid var(--clr-border);
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(57,217,138,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,217,138,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.page-hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--clr-green);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.page-hero h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}
.page-hero h1 em {
  font-style: normal;
  color: var(--clr-green);
}
.page-hero .lead {
  font-size: 0.95rem;
  color: var(--clr-muted);
  max-width: 560px;
  margin-top: 0.85rem;
  line-height: 1.7;
}

/* ── Card shared ──────────────────────────────────────────── */
.wbg-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
  opacity: 0;
  animation: cardIn 0.45s ease forwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wbg-card:nth-child(1)  { animation-delay: 0.04s; }
.wbg-card:nth-child(2)  { animation-delay: 0.10s; }
.wbg-card:nth-child(3)  { animation-delay: 0.16s; }
.wbg-card:nth-child(4)  { animation-delay: 0.22s; }
.wbg-card:nth-child(5)  { animation-delay: 0.28s; }
.wbg-card:nth-child(6)  { animation-delay: 0.34s; }
.wbg-card:nth-child(7)  { animation-delay: 0.40s; }
.wbg-card:nth-child(8)  { animation-delay: 0.46s; }
.wbg-card:nth-child(9)  { animation-delay: 0.52s; }

/* Card banner (image-top, same pattern as Mobirise mbr.jpg blocks) */
.card-banner {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.card-banner::before {           /* dot-grid texture */
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 18px 18px;
}
.card-banner::after {            /* bottom fade so text stays readable */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 65%);
}
.banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.banner-icon {
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.banner-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  line-height: 1;
  margin-bottom: 0.18rem;
}
.banner-h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.banner-badge {
  margin-left: auto;
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
  align-self: flex-end;
  white-space: nowrap;
}
.badge-high { background: rgba(229,83,75,0.22);  color: #ff7b73; border: 1px solid rgba(229,83,75,0.4); }
.badge-med  { background: rgba(240,165,0,0.18);  color: #f0c060; border: 1px solid rgba(240,165,0,0.35); }
.badge-info { background: rgba(77,157,224,0.18); color: #7dc4f0; border: 1px solid rgba(77,157,224,0.35); }
.badge-ok   { background: rgba(57,217,138,0.15); color: #5decaf; border: 1px solid rgba(57,217,138,0.3); }

/* Collapse toggle strip */
.card-toggle-bar {
  display: flex;
  align-items: center;
  padding: 0.55rem 1.4rem;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--clr-border);
  cursor: pointer;
  user-select: none;
  font-size: 0.75rem;
  color: var(--clr-muted);
  transition: background 0.15s;
}
.card-toggle-bar:hover { background: rgba(255,255,255,0.04); }
.card-toggle-bar .toggle-label { flex: 1; }
.toggle-arrow { font-size: 0.6rem; transition: transform 0.22s; }
.wbg-card.collapsed .toggle-arrow { transform: rotate(-90deg); }
.card-body-inner { padding: 1.4rem; }
.wbg-card.collapsed .card-body-inner { display: none; }

/* ── Banner gradient presets (one per section) ────────────── */
.banner-cookies     { background: linear-gradient(135deg, #0f1924 0%, #1a3a5c 40%, #2d1f42 100%); }
.banner-fingerprint { background: linear-gradient(135deg, #0a0f1e 0%, #122040 40%, #0e2a38 100%); }
.banner-vpn         { background: linear-gradient(135deg, #0a1e14 0%, #0d3324 40%, #12261a 100%); }
.banner-headers     { background: linear-gradient(135deg, #1e1000 0%, #3a1f00 40%, #2a1200 100%); }
.banner-hardware    { background: linear-gradient(135deg, #0a1022 0%, #0e1f42 40%, #181030 100%); }
.banner-permissions { background: linear-gradient(135deg, #200a10 0%, #3a0f1e 40%, #2a0a10 100%); }
.banner-behaviour   { background: linear-gradient(135deg, #0a1e1e 0%, #0d3030 40%, #102222 100%); }
.banner-score       { background: linear-gradient(135deg, #181400 0%, #302800 40%, #221e00 100%); }
.banner-protect     { background: linear-gradient(135deg, #0a1c0a 0%, #0f3018 40%, #0e2012 100%); }
.banner-contact     { background: linear-gradient(135deg, #0a0f1e 0%, #122040 40%, #1a1030 100%); }
.banner-home        { background: linear-gradient(135deg, #0a1e14 0%, #111 40%, #0e1a2e 100%); }

/* ── Data rows (whoami page) ──────────────────────────────── */
.data-row {
  display: grid;
  grid-template-columns: 195px 1fr auto;
  gap: 0.4rem 1rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.82rem;
}
.data-row:last-of-type { border-bottom: none; }
.data-label { font-weight: 700; color: var(--clr-muted); white-space: nowrap; }
.data-label::after { content: ':'; }
.data-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--clr-green);
  word-break: break-all;
}
.data-value.loading { color: var(--clr-muted); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.data-risk { font-family: var(--font-mono); font-size: 0.62rem; white-space: nowrap; }
.risk-high { color: var(--clr-red); }
.risk-med  { color: var(--clr-amber); }
.risk-low  { color: var(--clr-green); }

/* ── Why it matters block ─────────────────────────────────── */
.why-matters {
  margin-top: 1.1rem;
  padding: 0.8rem 1rem;
  background: rgba(229,83,75,0.07);
  border-left: 3px solid var(--clr-red);
  border-radius: 0 4px 4px 0;
  font-size: 0.8rem;
  color: #bbb;
  line-height: 1.65;
}
.why-matters strong { color: #f08080; }

/* ── Header note (blue, informational) ───────────────────── */
.header-note {
  font-size: 0.78rem;
  color: var(--clr-muted);
  margin-bottom: 0.85rem;
  padding: 0.6rem 0.85rem;
  background: rgba(77,157,224,0.07);
  border-left: 3px solid var(--clr-blue);
  border-radius: 0 4px 4px 0;
  line-height: 1.6;
}

/* ── Misc shared utilities ────────────────────────────────── */
hr.subtle { border: none; border-top: 1px solid var(--clr-border); margin: 0.75rem 0; }
.tracker-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--clr-muted);
  margin-top: 0.9rem;
  margin-bottom: 0.35rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.wbg-footer {
  background: #111;
  border-top: 1px solid var(--clr-border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--clr-muted);
  margin-top: auto;
}
.wbg-footer a { color: var(--clr-muted); text-decoration: none; margin: 0 0.5rem; }
.wbg-footer a:hover { color: var(--clr-text); }
.wbg-footer .footer-sub { margin-top: 0.5rem; font-size: 0.7rem; }

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 600px) {
  .data-row { grid-template-columns: 1fr 1fr; }
  .data-risk { display: none; }
}
