/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Barlow', sans-serif;
  background: #0a0e1a;
  color: #fff;
  cursor: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

/* Show cursor on touch/mouse movement, hide after 3s idle */
body.cursor-visible {
  cursor: default;
}

/* ===== Slideshow Container ===== */
#slideshow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0a0e1a;
}

#slideContainer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ===== Slide Images ===== */
.slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain so SVG content isn't cropped on portrait/wide viewports.
     The SVG background matches the page background (#0a0e1a) so any
     letterbox bars blend seamlessly. */
  object-fit: contain;
  background: #0a0e1a;
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 1;
}

.slide-image.active {
  opacity: 1;
  z-index: 2;
}

/* Fallback gradient when no image */
.slide-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-placeholder.active {
  opacity: 1;
  z-index: 2;
}

.slide-placeholder:nth-child(1) {
  background: linear-gradient(135deg, #0a0e1a 0%, #1a1040 40%, #2d1060 70%, #0a0e1a 100%);
}
.slide-placeholder:nth-child(2) {
  background: linear-gradient(135deg, #0a0e1a 0%, #0a2040 40%, #0a3060 70%, #0a0e1a 100%);
}
.slide-placeholder:nth-child(3) {
  background: linear-gradient(135deg, #0a0e1a 0%, #102a10 40%, #1a4020 70%, #0a0e1a 100%);
}
.slide-placeholder:nth-child(4) {
  background: linear-gradient(135deg, #0a0e1a 0%, #2a1a0a 40%, #402a0a 70%, #0a0e1a 100%);
}

.slide-placeholder__icon {
  width: 120px;
  height: 120px;
  opacity: 0.15;
  color: #fff;
}

/* Dark vignette overlay for readability */
.slide-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Lighter middle band so SVG content (charts/diagrams) stays visible,
     while top/bottom remain darker for header/CTA legibility */
  background:
    linear-gradient(180deg, rgba(10,14,26,0.85) 0%, rgba(10,14,26,0.05) 25%, rgba(10,14,26,0.05) 75%, rgba(10,14,26,0.9) 100%);
  pointer-events: none;
}

.slide-overlay * {
  pointer-events: auto;
}

/* ===== Header ===== */
.slide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
}

.slide-header__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.slide-header__logo {
  height: 44px;
  width: auto;
}

.slide-header__divider {
  width: 2px;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(226,48,42,0.8), transparent);
}

.slide-header__fortix {
  height: 40px;
  width: auto;
}

.slide-header__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 8px 16px;
}

/* ===== Pulse Dot ===== */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #22c55e; }
  50% { opacity: 0.5; box-shadow: 0 0 4px #22c55e; }
}

/* ===== Slide Content ===== */
.slide-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 4vh 40px 0;
}

.slide-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 6vw, 72px);
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.1;
  /* Strong text backdrop so the title is readable over any SVG content */
  text-shadow:
    0 0 40px rgba(10,14,26,1),
    0 0 24px rgba(10,14,26,1),
    0 0 12px rgba(10,14,26,1),
    0 4px 30px rgba(0,0,0,0.8);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-subtitle {
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 2vw, 22px);
  color: rgba(255,255,255,0.85);
  margin-top: 12px;
  letter-spacing: 1px;
  max-width: 900px;
  text-shadow:
    0 0 24px rgba(10,14,26,0.95),
    0 0 12px rgba(10,14,26,0.95),
    0 2px 20px rgba(0,0,0,0.7);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s;
}

.slide-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Footer / Dots / CTA ===== */
.slide-footer {
  padding: 24px 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.slide-dots {
  display: flex;
  gap: 10px;
}

.slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.4s ease;
}

.slide-dot.active {
  background: #e2302a;
  border-color: #e2302a;
  box-shadow: 0 0 12px rgba(226,48,42,0.5);
  transform: scale(1.2);
}

/* CTA */
.slide-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.5);
  animation: cta-breathe 3s ease-in-out infinite;
}

@keyframes cta-breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.cta-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(226,48,42,0.6);
  animation: cta-ring 2s ease-out infinite;
}

@keyframes cta-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* ===== Relay indicator flash ===== */
.relay-flash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e2302a, #22c55e, transparent);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.relay-flash.active {
  opacity: 1;
}

/* ===== Touch ripple ===== */
.touch-ripple {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(226,48,42,0.3);
  transform: scale(0);
  animation: ripple-expand 0.6s ease-out forwards;
  pointer-events: none;
  z-index: 50;
}

@keyframes ripple-expand {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(8); opacity: 0; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .slide-header {
    padding: 16px 20px;
  }

  .slide-header__logo {
    height: 32px;
  }

  .slide-header__fortix {
    height: 30px;
  }

  .slide-header__status {
    font-size: 9px;
    padding: 6px 12px;
  }

  .slide-footer {
    padding: 16px 20px 24px;
  }

  .slide-cta {
    font-size: 11px;
    letter-spacing: 2px;
  }
}
