/* ═══ Audience-Selector Overlay ════════════════════════════════════════ */

#dil-selector {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #000;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: #0f0;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1.5rem, 6vw, 5rem);
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
}

#dil-selector.active {
  display: block;
}

/* Scanlines */
#dil-selector::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.3) 3px,
    rgba(0,0,0,0) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Vignette */
#dil-selector::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 1;
}

.dil-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

/* Boot header */
.dil-boot {
  color: #0f0;
  opacity: 0.6;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid #0a1f0a;
  padding-bottom: 1rem;
}

/* Prompt lines */
.dil-line {
  color: #0f0;
  margin: 0.15rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.dil-line.muted { color: #3a3a3a; }
.dil-line.echo  { color: #fff; }
.dil-line.info  { color: #0a0; font-size: 0.85em; }
.dil-line.ok    { color: #0f0; }

/* Blinking cursor */
.dil-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: #0f0;
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: dil-blink 1.05s steps(1) infinite;
}

@keyframes dil-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Options */
.dil-options {
  margin: 0.6rem 0 0.2rem;
}

.dil-option {
  display: block;
  padding: 0.35rem 0;
  cursor: pointer;
  color: #0f0;
  transition: text-shadow 0.12s, color 0.12s;
  opacity: 0;
  transform: translateX(-8px);
  animation: dil-slide-in 0.2s ease forwards;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  letter-spacing: 0.04em;
}

@keyframes dil-slide-in {
  to { opacity: 1; transform: translateX(0); }
}

.dil-option:hover,
.dil-option:focus {
  text-shadow: 0 0 10px rgba(0,255,0,0.8);
  color: #fff;
}

.dil-option.selected {
  color: #fff;
  text-shadow: 0 0 6px rgba(0,255,0,0.5);
}

.dil-option.faded {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.18s;
}

.dil-stagger-0 { animation-delay: 40ms; }
.dil-stagger-1 { animation-delay: 120ms; }
.dil-stagger-2 { animation-delay: 200ms; }
.dil-stagger-3 { animation-delay: 280ms; }

/* Loading lines */
.dil-loading {
  color: #0a0;
  font-size: 0.85em;
  letter-spacing: 0.1em;
}

/* Skip button */
#dil-skip {
  position: fixed;
  top: 1.25rem;
  right: 1.75rem;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.65rem;
  color: #2a2a2a;
  letter-spacing: 0.2em;
  cursor: pointer;
  z-index: 9010;
  background: none;
  border: none;
  padding: 0.5rem;
  transition: color 0.15s;
}

#dil-skip:hover { color: #555; }

/* Fade-out animation for full overlay */
#dil-selector.fade-out {
  animation: dil-fade 0.35s ease forwards;
}

@keyframes dil-fade {
  to { opacity: 0; pointer-events: none; }
}

/* ═══ Audience Hero Section ═════════════════════════════════════════════ */

#dil-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(2rem, 8vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  position: relative;
}

/* Default hero (no-JS / pre-selection) */
#dil-hero[data-default] .dil-hero-headline {
  font-size: clamp(2rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.3;
  color: #fff;
}

/* Rendered hero */
.dil-hero-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: #0f0;
  opacity: 0.7;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.dil-hero-headline {
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 1.25rem;
}

.dil-hero-sub {
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: #666;
  letter-spacing: 0.15em;
  margin: 0 0 2.5rem;
  max-width: 600px;
}

.dil-hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.dil-cta-primary {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: #0f0;
  color: #000 !important;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.dil-cta-primary:hover { filter: brightness(1.15); }
.dil-cta-primary:active { transform: translateY(1px); }

.dil-cta-secondary {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  background: transparent;
  color: #555 !important;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none !important;
  border: 1px solid #1a1a1a;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.dil-cta-secondary:hover {
  border-color: #0f0;
  color: #0f0 !important;
}

/* Video placeholder (multimedia mode) */
.dil-video-slot {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16/9;
  background: #050505;
  border: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a2a2a;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  margin: 2rem auto;
}

/* Multimedia mode: extra CRT flicker on hero */
#dil-hero[data-mode="multimedia"] {
  animation: crt-flicker 6s infinite steps(1, end);
}

/* Hero enter animation */
@keyframes dil-hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dil-hero-inner {
  animation: dil-hero-in 0.5s ease forwards;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dil-cursor           { animation: none; opacity: 1; }
  .dil-option           { animation: none; opacity: 1; transform: none; }
  #dil-selector.fade-out { animation: none; opacity: 0; }
  .dil-hero-inner       { animation: none; }
  #dil-hero[data-mode="multimedia"] { animation: none; }
}

/* Mobile */
@media (max-width: 480px) {
  #dil-skip { top: 0.75rem; right: 1rem; }
  .dil-hero-ctas { flex-direction: column; align-items: center; }
  .dil-cta-primary, .dil-cta-secondary { width: 100%; max-width: 280px; text-align: center; }
}
