/* diplomacy.bar - Flat-design diplomatic briefing */
/* Fonts: Bebas Neue, Caveat, Space Mono */
/* Palette: #c8e6c9 #d1c4e9 #ffccbc #b3e5fc #fff9c4 #2d2d2d #1a1a1a #fafafa #5c5c5c */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Caveat', cursive;
  background: #fafafa;
  color: #1a1a1a;
  overflow-x: hidden;
}

/* ============ DISPATCH COUNTER (fixed HUD) ============ */
.dispatch-counter {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.65rem, 1.2vw, 0.85rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fafafa;
  background: #2d2d2d;
  padding: 8px 14px;
  border: 1px solid #5c5c5c;
}

.dispatch-sep {
  color: #5c5c5c;
  margin: 0 2px;
}

/* ============ CRT SCAN LINE ============ */
.crt-scan {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.3);
  z-index: 9999;
  pointer-events: none;
  transform: translateY(-100%);
}

.crt-scan.active {
  animation: crtSweep 400ms linear forwards;
}

@keyframes crtSweep {
  from { transform: translateY(0); }
  to { transform: translateY(100vh); }
}

/* ============ HERO PANELS ============ */
.hero-panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
}

.panel-briefing { background: #c8e6c9; }
.panel-lavender { background: #d1c4e9; }
.panel-peach { background: #ffccbc; }
.panel-powder { background: #b3e5fc; }
.panel-lemon { background: #fff9c4; }
.panel-lavender-alt { background: #d1c4e9; }
.panel-closing {
  background: #c8e6c9;
  animation: closingColorCycle 10s linear infinite;
}

@keyframes closingColorCycle {
  0% { background: #c8e6c9; }
  20% { background: #d1c4e9; }
  40% { background: #ffccbc; }
  60% { background: #b3e5fc; }
  80% { background: #fff9c4; }
  100% { background: #c8e6c9; }
}

/* ============ SCAN LINES OVERLAY ============ */
.scan-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.03) 2px,
    rgba(255,255,255,0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ============ CORNER BRACKETS ============ */
.corner-bracket {
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: 2;
  pointer-events: none;
}

.corner-bracket.top-left {
  top: 15px;
  left: 15px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}
.corner-bracket.top-right {
  top: 15px;
  right: 15px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.corner-bracket.bottom-left {
  bottom: 15px;
  left: 15px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
}
.corner-bracket.bottom-right {
  bottom: 15px;
  right: 15px;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.panel-briefing .corner-bracket { color: rgba(200,230,201,0.4); }
.panel-lavender .corner-bracket { color: rgba(209,196,233,0.4); }
.panel-peach .corner-bracket { color: rgba(255,204,188,0.4); }
.panel-powder .corner-bracket { color: rgba(179,229,252,0.4); }
.panel-lemon .corner-bracket { color: rgba(255,249,196,0.4); }
.panel-lavender-alt .corner-bracket { color: rgba(209,196,233,0.4); }
.panel-closing .corner-bracket { color: rgba(200,230,201,0.4); }

/* ============ HERO HEADLINE ============ */
.hero-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(5rem, 14vw, 12rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2d2d2d;
  text-align: center;
  line-height: 0.95;
  z-index: 5;
  opacity: 0;
  transition: opacity 600ms ease;
}

.hero-headline.visible {
  opacity: 1;
}

/* ============ DISPATCH HEADLINES ============ */
.dispatch-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 7rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2d2d2d;
  text-align: center;
  line-height: 1;
  z-index: 5;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275),
              transform 600ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dispatch-headline.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ ILLUSTRATIONS ============ */
.hero-illustration {
  position: relative;
  width: 90%;
  max-width: 500px;
  margin-top: 30px;
  z-index: 5;
}

.dispatch-illustration {
  position: relative;
  width: 80%;
  max-width: 450px;
  margin-top: 20px;
  z-index: 5;
}

/* SVG Drawing Styles */
.draw-path {
  stroke: #2d2d2d;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.handshake-svg,
.sketch-svg {
  width: 100%;
  height: auto;
}

.handshake-svg .draw-path,
.sketch-svg .draw-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.5s ease;
}

.handshake-svg.drawn .draw-path,
.sketch-svg.drawn .draw-path {
  stroke-dashoffset: 0;
}

.redaction-mark {
  opacity: 0;
  transition: opacity 0.5s ease 1s;
}

.sketch-svg.drawn .redaction-mark {
  opacity: 1;
}

/* HUD Reticle */
.hud-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 350px;
  opacity: 0;
  transition: opacity 500ms ease;
  pointer-events: none;
}

.hud-reticle.visible {
  opacity: 0.5;
}

.reticle-outer,
.reticle-inner {
  stroke: #c8e6c9;
  opacity: 0.6;
}

.reticle-line {
  stroke: #c8e6c9;
  opacity: 0.6;
}

.hud-reticle-small {
  position: absolute;
  top: 10%;
  right: -10%;
  width: 80px;
  opacity: 0;
  transition: opacity 500ms ease 0.3s;
}

.dispatch-illustration.visible .hud-reticle-small {
  opacity: 0.5;
}

.reticle-accent {
  stroke: #d1c4e9;
  opacity: 0.6;
}

.panel-peach .reticle-accent { stroke: #ffccbc; }
.panel-powder .reticle-accent { stroke: #b3e5fc; }
.panel-lemon .reticle-accent { stroke: #fff9c4; }
.panel-lavender-alt .reticle-accent { stroke: #d1c4e9; }

/* Coord readout */
.coord-readout {
  position: absolute;
  bottom: -25px;
  right: 0;
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.55rem, 1vw, 0.75rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #5c5c5c;
}

/* ============ DISPATCH ANNOTATIONS ============ */
.dispatch-annotation {
  font-family: 'Caveat', cursive;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: #4a4a4a;
  text-align: center;
  max-width: 600px;
  margin-top: 40px;
  z-index: 5;
  opacity: 0;
  transition: opacity 600ms ease 0.3s;
}

.dispatch-annotation.visible {
  opacity: 1;
}

/* ============ HUD STATUS (Panel 1) ============ */
.hud-status {
  position: absolute;
  bottom: 30px;
  left: 30px;
  z-index: 5;
}

.status-text {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.6rem, 1vw, 0.8rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #5c5c5c;
}

/* ============ HUD BARS (Interstitials) ============ */
.hud-bar {
  min-height: 15vh;
  background: #2d2d2d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  position: relative;
  overflow: hidden;
}

.hud-data {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-coord,
.hud-code {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.6rem, 1vw, 0.8rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #c8e6c9;
}

.hud-label {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.55rem, 0.9vw, 0.7rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d4d4d4;
}

.hud-progress {
  flex: 1;
  max-width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 0 30px;
  position: relative;
}

.hud-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  transition: width 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hud-progress-bar[data-color='mint'] { background: #c8e6c9; }
.hud-progress-bar[data-color='lavender'] { background: #d1c4e9; }
.hud-progress-bar[data-color='peach'] { background: #ffccbc; }
.hud-progress-bar[data-color='powder'] { background: #b3e5fc; }
.hud-progress-bar[data-color='lemon'] { background: #fff9c4; }

/* ============ CLOSING PANEL ============ */
.closing-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(5rem, 16vw, 14rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2d2d2d;
  text-align: center;
  line-height: 0.95;
  z-index: 5;
  display: flex;
  gap: 0;
}

.closing-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275),
              transform 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.closing-letter.visible {
  opacity: 1;
  transform: translateY(0);
}

.closing-arrow {
  width: 40px;
  margin-top: 20px;
  z-index: 5;
  opacity: 0;
  transition: opacity 500ms ease 1s;
}

.closing-arrow.visible {
  opacity: 1;
}

.closing-arrow .draw-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 0.8s ease 1.2s;
}

.closing-arrow.visible .draw-path {
  stroke-dashoffset: 0;
}

/* ============ CONTACT FIELD ============ */
.contact-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
  z-index: 5;
  opacity: 0;
  transition: opacity 500ms ease 1.5s;
}

.contact-field.visible {
  opacity: 1;
}

.contact-label {
  font-family: 'Caveat', cursive;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #4a4a4a;
}

.contact-input {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.7rem, 1.2vw, 0.9rem);
  letter-spacing: 0.1em;
  padding: 10px 16px;
  border: 2px solid #2d2d2d;
  background: transparent;
  color: #2d2d2d;
  width: 280px;
  max-width: 90vw;
  text-align: center;
}

.contact-input::placeholder {
  color: #5c5c5c;
  opacity: 0.6;
}

.contact-submit {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  letter-spacing: 0.15em;
  padding: 8px 30px;
  border: 2px solid #2d2d2d;
  background: #2d2d2d;
  color: #fafafa;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.contact-submit:hover {
  background: transparent;
  color: #2d2d2d;
}

/* ============ DECORATIVE REDACTION TAPE ============ */
.hud-bar::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 10%;
  width: 80%;
  height: 16px;
  opacity: 0.3;
  transform: rotate(-1deg);
  pointer-events: none;
}

.hud-bar:nth-of-type(2)::before { background: #d1c4e9; }
.hud-bar:nth-of-type(4)::before { background: #ffccbc; }
.hud-bar:nth-of-type(6)::before { background: #b3e5fc; }
.hud-bar:nth-of-type(8)::before { background: #fff9c4; }
.hud-bar:nth-of-type(10)::before { background: #d1c4e9; }
.hud-bar:nth-of-type(12)::before { background: #c8e6c9; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .hud-bar {
    flex-direction: column;
    gap: 10px;
    padding: 15px 20px;
    text-align: center;
  }
  
  .hud-progress {
    width: 100%;
    max-width: none;
    margin: 10px 0;
  }
  
  .dispatch-counter {
    top: 10px;
    right: 10px;
    padding: 5px 10px;
  }
  
  .corner-bracket {
    width: 20px;
    height: 20px;
  }
  
  .hero-illustration,
  .dispatch-illustration {
    width: 95%;
  }
  
  .hud-reticle-small {
    width: 50px;
    right: -5%;
  }
}
