/**
 * DeltaWave HUD — componentes pixel (vídeo 1280×720)
 * Importar DEPOIS de tokens.css
 */

:root {
  --dw-black: #080808;
  --dw-black-abs: #000000;
  --dw-white: #ffffff;
  --dw-gray: #858585;
  --dw-line: #393939;
  --dw-coral: #a82223;
  --dw-font-display: "Anton", Impact, sans-serif;
  --dw-font-condensed: "Oswald", sans-serif;
  --dw-font-mono: "JetBrains Mono", ui-monospace, monospace;
  --dw-vw: min(100vw, 1440px);
  --dw-u: calc(var(--dw-vw) / 1280);
  --dw-overlay-hero: rgba(8, 8, 8, 0.32);
  --dw-overlay-section: rgba(8, 8, 8, 0.4);
  --dw-panel-bg: rgba(8, 8, 8, 0.42);
}

/* —— Video —— */
.dw-band {
  position: relative;
  overflow: hidden;
  background: var(--dw-black);
  color: var(--dw-white);
  min-height: 100vh;
}
.dw-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
  pointer-events: none;
}
.dw-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--dw-overlay-hero);
  pointer-events: none;
}
.dw-video-overlay.section {
  background: var(--dw-overlay-section);
}

/* —— Bright cell grid —— */
.dw-bright-grid {
  position: absolute;
  inset: calc(32 * var(--dw-u));
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 1px;
  opacity: 0.5;
  pointer-events: none;
}
.dw-bright-grid span {
  border: 1px solid var(--dw-line);
}
.dw-bright-grid span.on {
  background: rgba(255, 255, 255, 0.18);
}
.dw-bright-grid span.accent {
  background: rgba(168, 34, 35, 0.45);
}

/* —— HudFrame —— */
.dw-hud-frame {
  position: absolute;
  inset: calc(28 * var(--dw-u));
  z-index: 4;
  pointer-events: none;
}
.dw-hud-frame .c {
  position: absolute;
  width: calc(28 * var(--dw-u));
  height: calc(28 * var(--dw-u));
  border-color: var(--dw-white);
  border-style: solid;
  border-width: 0;
}
.dw-hud-frame .c.tl {
  top: 0;
  left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
  border-color: var(--dw-coral);
}
.dw-hud-frame .c.tr {
  top: 0;
  right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
}
.dw-hud-frame .c.bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
}
.dw-hud-frame .c.br {
  bottom: 0;
  right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
  border-color: var(--dw-coral);
}
.dw-hud-label {
  position: absolute;
  top: calc(10 * var(--dw-u));
  font-family: var(--dw-font-mono);
  font-size: calc(10 * var(--dw-u));
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dw-gray);
}
.dw-hud-label.left {
  left: calc(40 * var(--dw-u));
}
.dw-hud-label.right {
  right: calc(40 * var(--dw-u));
}

/* —— Focus bracket —— */
.dw-focus {
  position: absolute;
  z-index: 6;
  pointer-events: none;
}
.dw-focus .fc {
  position: absolute;
  width: 22px;
  height: 22px;
  border-style: solid;
  border-width: 0;
  border-color: var(--dw-white);
}
.dw-focus .fc.tl {
  top: 0;
  left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
  border-color: var(--dw-coral);
}
.dw-focus .fc.tr {
  top: 0;
  right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
}
.dw-focus .fc.bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
}
.dw-focus .fc.br {
  bottom: 0;
  right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
  border-color: var(--dw-coral);
}
.dw-focus-label {
  position: absolute;
  top: -18px;
  left: 0;
  font-family: var(--dw-font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--dw-coral);
  text-transform: uppercase;
}

/* —— Orbit —— */
.dw-orbit {
  position: absolute;
  z-index: 5;
  border-radius: 50%;
  border: 1px solid var(--dw-line);
  pointer-events: none;
}
.dw-orbit.dashed {
  border-style: dashed;
  opacity: 0.75;
}
.dw-orbit .dot {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: var(--dw-coral);
}
.dw-orbit-wrap {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  animation: dw-spin 28s linear infinite;
}
@keyframes dw-spin {
  to {
    transform: rotate(360deg);
  }
}

/* —— Crosshair —— */
.dw-crosshair {
  position: absolute;
  z-index: 5;
  pointer-events: none;
}
.dw-crosshair .ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--dw-white);
  border-radius: 50%;
  opacity: 0.5;
}
.dw-crosshair .v,
.dw-crosshair .h {
  position: absolute;
  background: var(--dw-coral);
  opacity: 0.75;
}
.dw-crosshair .v {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
}
.dw-crosshair .h {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  margin-top: -0.5px;
}

/* —— Chip —— */
.dw-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--dw-line);
  font-family: var(--dw-font-mono);
  font-size: calc(10 * var(--dw-u));
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dw-gray);
  background: transparent;
}
.dw-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--dw-coral);
  flex-shrink: 0;
  animation: dw-blink 1.2s step-end infinite;
}
@keyframes dw-blink {
  50% {
    opacity: 0.25;
  }
}
.dw-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* —— Display type —— */
.dw-display {
  font-family: var(--dw-font-display);
  text-transform: uppercase;
  letter-spacing: calc(-2 * var(--dw-u));
  line-height: 0.85;
  font-weight: 400;
  color: var(--dw-white);
  margin: 0;
}
.dw-display.hero {
  font-size: clamp(56px, calc(96 * var(--dw-u)), 108px);
}
.dw-display.case {
  font-size: clamp(48px, calc(88 * var(--dw-u)), 96px);
}
.dw-underline-coral {
  width: calc(64 * var(--dw-u));
  height: 3px;
  background: var(--dw-coral);
  margin-top: calc(24 * var(--dw-u));
}
.dw-mono {
  font-family: var(--dw-font-mono);
  font-size: calc(12 * var(--dw-u));
  letter-spacing: 1.2px;
  line-height: 1.55;
  color: var(--dw-gray);
  text-transform: uppercase;
}
.dw-index {
  color: var(--dw-coral);
  font-family: var(--dw-font-mono);
  font-size: calc(13 * var(--dw-u));
  letter-spacing: 1px;
}

/* —— Panel —— */
.dw-panel {
  border: 1px solid var(--dw-line);
  background: var(--dw-panel-bg);
  border-radius: 0;
}
.dw-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--dw-line);
}
.dw-panel-head .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dw-line);
}
.dw-panel-head .dot.on {
  background: var(--dw-coral);
}
.dw-panel-head .title {
  margin-left: 8px;
  font-family: var(--dw-font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--dw-gray);
  text-transform: uppercase;
}
.dw-panel-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--dw-line);
}
.dw-panel-row:last-child {
  border-bottom: none;
}
.dw-panel-row .rule {
  width: 16px;
  height: 1px;
  background: var(--dw-line);
}
.dw-panel-row .label {
  font-family: var(--dw-font-mono);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dw-white);
}

/* —— Buttons —— */
.dw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  font-family: var(--dw-font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 24px;
  cursor: pointer;
}
.dw-btn-primary {
  background: var(--dw-white);
  color: var(--dw-black-abs);
  border: none;
}
.dw-btn-primary:hover {
  outline: 1px solid var(--dw-coral);
}
.dw-btn-ghost {
  background: transparent;
  color: var(--dw-white);
  border: 1px solid var(--dw-white);
}

/* —— Icon badge —— */
.dw-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dw-icon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--dw-line);
  background: rgba(8, 8, 8, 0.85);
}
.dw-icon-badge span {
  font-family: var(--dw-font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dw-white);
}
.dw-icon {
  width: 20px;
  height: 20px;
  color: var(--dw-white);
}
.dw-icon.accent {
  color: var(--dw-coral);
}

/* —— Waveform —— */
.dw-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 48px;
}
.dw-wave i {
  flex: 1;
  display: block;
  background: var(--dw-white);
  opacity: 0.45;
  min-width: 3px;
}
.dw-wave i.coral {
  background: var(--dw-coral);
  opacity: 1;
}

/* —— Ticker —— */
.dw-ticker {
  height: 22px;
  overflow: hidden;
  border-top: 1px solid var(--dw-line);
  border-bottom: 1px solid var(--dw-line);
  background: rgba(8, 8, 8, 0.75);
  display: flex;
  align-items: center;
  z-index: 8;
  position: relative;
}
.dw-ticker .track {
  display: flex;
  white-space: nowrap;
  font-family: var(--dw-font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dw-gray);
  animation: dw-marquee 28s linear infinite;
}
.dw-ticker .track b {
  color: var(--dw-coral);
  font-weight: 500;
}
@keyframes dw-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.dw-content {
  position: relative;
  z-index: 7;
}

@media (prefers-reduced-motion: reduce) and (max-width: 0px) {
  .dw-video-bg,
  .dw-orbit-wrap,
  .dw-ticker .track,
  .dw-chip::before {
    animation: none !important;
  }
}
