/* ============================================================
   CCTV bar brand: AI badge + CYBER (white) UTOPIA (magenta)
   + secondary monospaced sub-label
   ============================================================ */
.cctv-brand {
  display: inline-flex; align-items: center;
  gap: 0; flex-shrink: 0; min-width: 0;
}
.cctv-ai-badge {
  appearance: none; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--magenta);
  color: #fff;
  background: transparent;
  font-family: var(--font-display);
  font-size: 7px; font-weight: 800; letter-spacing: 0.04em;
  margin-right: 8px; line-height: 1;
  transition: background .15s;
}
.cctv-ai-badge:hover,
.cctv-ai-badge[aria-expanded="true"] { background: rgba(226,0,116,0.20); }

/* AI info dropdown panel */
.ai-info-panel {
  position: absolute; top: calc(100% + 12px); left: 0;
  width: min(440px, 92vw); z-index: 300;
  max-height: min(72vh, 620px); overflow-y: auto; overscroll-behavior: contain;
  background: rgba(6,7,9,0.98);
  border: 1px solid rgba(255,255,255,0.12);
  border-top: 2px solid var(--magenta);
  padding: 18px 20px 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  animation: aiIn .2s ease;
}
.ai-info-panel::-webkit-scrollbar { width: 8px; }
.ai-info-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
.ai-info-h {
  font-family: var(--font-hud); font-size: 12px; letter-spacing: 0.04em;
  font-weight: 700; color: #fff; text-transform: uppercase;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.ai-info-body p { margin: 0 0 11px; }
.ai-info-body p:last-child { margin-bottom: 0; }
.ai-info-body strong { color: rgba(255,255,255,0.95); font-weight: 700; }
.ai-info-panel[hidden] { display: none; }
@keyframes aiIn { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
.ai-info-eyebrow {
  font-family: var(--font-hud); font-size: 9.5px; letter-spacing: 0.22em;
  color: var(--magenta); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.ai-info-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 8px var(--magenta); animation: blink 1.6s step-end infinite; flex-shrink:0; }
.ai-info-body {
  font-family: var(--font-body); font-size: 14px; line-height: 1.6;
  color: rgba(255,255,255,0.80); margin: 0; text-wrap: pretty;
}
.cctv-brand-name {
  display: inline-flex; align-items: baseline; flex-shrink: 0;
}
.cctv-cyber {
  font-family: var(--font-display);
  font-weight: 900; font-size: 13px;
  letter-spacing: 0.05em; color: rgba(255,255,255,0.93);
  text-transform: uppercase; line-height: 1;
}
.cctv-utopia {
  font-family: var(--font-display);
  font-weight: 900; font-size: 13px;
  letter-spacing: 0.05em; color: var(--magenta);
  text-transform: uppercase; margin-left: 5px; line-height: 1;
}
.cctv-brand-sub {
  font-family: var(--font-hud);
  font-size: 9px; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.42);
  text-transform: uppercase;
  margin-left: 14px; white-space: nowrap;
}
@media (max-width: 700px) { .cctv-brand-sub { display: none; } }

/* ============================================================
   Cyber Utopia · Responsive + mobile navigation layer
   Loaded AFTER styles.css. Installation is phone-first (QR),
   so this tunes everything down to small portrait screens and
   short landscape ones. Desktop is unaffected above 900px.
   ============================================================ */

/* ---- Language switch (EN / DE) in the CCTV bar ---- */
.cctv-lang {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--hud-rule);
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
  margin-right: 14px;
}
.cctv-lang button {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--hud-fg-dim);
  font-family: var(--font-hud);
  font-size: 10px; letter-spacing: 0.14em; font-weight: 700;
  text-transform: uppercase;
  padding: 5px 11px;
  cursor: pointer;
  transition: background .15s, color .15s;
  line-height: 1;
}
.cctv-lang button:hover { color: var(--magenta); }
.cctv-lang button.is-active { background: var(--magenta); color: #fff; }

/* ---- Hamburger (hidden on desktop) ---- */
.nav-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--hud-rule);
  border-radius: 4px;
  width: 40px; height: 36px;
  align-items: center; justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-toggle-bars { position: relative; width: 18px; height: 12px; display: block; }
.nav-toggle-bars i {
  position: absolute; left: 0; right: 0; height: 2px;
  background: var(--hud-fg);
  transition: transform .2s ease, opacity .2s ease, top .2s ease;
}
.nav-toggle-bars i:nth-child(1) { top: 0; }
.nav-toggle-bars i:nth-child(2) { top: 5px; }
.nav-toggle-bars i:nth-child(3) { top: 10px; }
.cctv-bar.nav-open .nav-toggle-bars i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.cctv-bar.nav-open .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.cctv-bar.nav-open .nav-toggle-bars i:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* ============================================================
   <= 900px  — tablet + phone: collapse nav into a drawer
   ============================================================ */
@media (max-width: 900px) {
  .cctv-bar {
    position: sticky;
    padding: 9px 14px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .cctv-brand {
    font-size: 9.5px;
    letter-spacing: 0.10em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
  }
  .nav-toggle { display: inline-flex; order: 4; }
  .cctv-lang { order: 3; }
  #live-clock { display: none !important; }

  /* nav becomes a full-width drawer below the bar */
  .cctv-bar > nav#cctv-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px;
    background: #0a0a0b;
    border-bottom: 1px solid var(--hud-rule);
    box-shadow: 0 24px 50px rgba(0,0,0,0.6);
    max-height: calc(100dvh - 52px);
    overflow-y: auto;
  }
  .cctv-bar.nav-open > nav#cctv-nav { display: flex; }

  .cctv-bar nav#cctv-nav > a,
  .cctv-bar nav#cctv-nav .nav-has-dropdown > a {
    display: flex; align-items: center;
    width: 100%;
    padding: 14px 14px;
    min-height: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 13px; letter-spacing: 0.14em;
  }
  .cctv-bar nav#cctv-nav .nav-has-dropdown { width: 100%; display: block; }

  /* LEARN sublist: render inline (static) inside the drawer */
  .cctv-bar nav#cctv-nav .nav-dropdown {
    position: static;
    display: none;
    min-width: 0; width: 100%;
    background: rgba(255,255,255,0.03);
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: none;
    backdrop-filter: none;
    padding: 4px 0 8px;
    margin: 0;
  }
  .cctv-bar nav#cctv-nav .nav-has-dropdown.is-open .nav-dropdown { display: block; }
  .cctv-bar nav#cctv-nav .nav-dropdown a { padding: 12px 22px; min-height: 44px; }

  .cctv-bar nav#cctv-nav a.cctv-escape-btn {
    justify-content: center;
    margin: 10px 4px 4px;
    width: auto;
    border-radius: 999px;
    border-bottom: 1px solid var(--magenta);
  }
}

/* ============================================================
   <= 760px — hero, sections, type down-scale
   ============================================================ */
@media (max-width: 760px) {
  .section { padding: 56px 18px; }
  .section-inner { max-width: 100%; }

  /* Hero: fill the visible viewport (dvh dodges mobile URL bars) */
  .hero { height: 100svh; min-height: 560px; }
  .hero-cta-inner { padding: 0 20px; max-width: 100%; }
  .hero-question--above { font-size: 14px; line-height: 1.5; }
}

/* ============================================================
   <= 600px — true phone portrait
   ============================================================ */
@media (max-width: 600px) {
  .section { padding: 48px 16px; }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1.3fr 1fr 1fr;
  }
  .cam.feature { grid-column: 1 / 3; }

  /* Quiz shell breathes less on small screens */
  .quiz-shell { padding: 16px 14px; }
  #quiz .options { gap: 10px; }
  #quiz .opt-btn { padding: 14px 14px; min-height: 48px; font-size: 15px; }
  #quiz .q-text { font-size: clamp(18px, 5.4vw, 24px); }
  #quiz .dialogue-box { padding: 14px 16px; }
  #quiz .btn-next, #quiz .btn-start, #quiz .btn-replay { min-height: 48px; }

  .section-h { font-size: clamp(30px, 9vw, 44px); }

  /* Footer nav wraps comfortably */
  .footer-nav { flex-wrap: wrap; gap: 8px 12px; justify-content: center; }
}

/* ============================================================
   <= 380px — small phones
   ============================================================ */
@media (max-width: 380px) {
  .cctv-brand { font-size: 8.5px; }
  .cctv-lang button { padding: 5px 8px; }
  .section { padding: 40px 13px; }
}

/* ============================================================
   Landscape phones / short viewports — keep the hero usable
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { height: auto; min-height: 460px; }
  .hero-grid { grid-template-rows: 1fr 1fr; }
  .hero-title { font-size: clamp(40px, 12vh, 78px) !important; }
  .hero-question--above { font-size: 12px; margin-bottom: 10px; }
  .cta-btn { padding: 12px 24px !important; }
  /* drawer can't be taller than the short screen */
  .cctv-bar > nav#cctv-nav { max-height: calc(100dvh - 48px); }
}

/* ============================================================
   Dossier CCTV portraits (s.myselle + the Sloth) — fill the
   frame, sit beneath the HUD chrome + corner ticks, and take a
   subtle "recorded" treatment (cooler, slightly crushed).
   ============================================================ */
.ds-cam .ds-cam-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
  z-index: 0;
  filter: grayscale(0.16) contrast(1.07) brightness(1.03) saturate(0.92);
}
.ds-cam::after { z-index: 1; }      /* magenta surveillance tint over the photo */
.ds-cam .ds-c   { z-index: 3; }     /* corner ticks stay on top */
.ds-cam .ds-hud { z-index: 3; }     /* SUBJECT / CAM / LIVE chrome stays on top */
.ds-cam .ds-cam-photo + .ds-c { z-index: 3; }
@media (max-width: 900px) {
  /* never let a wide element force horizontal scroll on a phone */
  html, body { overflow-x: hidden; }
  img, video, svg, canvas { max-width: 100%; }
  /* forms: comfortable inputs, 16px to stop iOS zoom-on-focus */
  .form-input, .raffle-input { font-size: 16px; min-height: 48px; }
  .form-submit, .raffle-submit { min-height: 50px; }
}
