/* ZigScape — custom layer on Tailwind (CDN) */

:root {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-feature-settings: "kern" 1, "liga" 1;
}

/* Skip link — accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #e06a3b;
  color: #121212;
  font-weight: 700;
  border-radius: 0.375rem;
  transition: left 0.2s ease, box-shadow 0.2s ease;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(224, 106, 59, 0.45);
}

/* Nav logo mark */
.nav-logo {
  filter: drop-shadow(0 0 10px rgba(224, 106, 59, 0.25));
  transition: transform 0.22s ease, filter 0.22s ease;
}
.nav-brand:hover .nav-logo {
  transform: scale(1.06);
  filter: drop-shadow(0 0 14px rgba(224, 106, 59, 0.45));
}

/* Hero — custom layout image + dark overlay for readable text */
.hero-bg {
  background-color: #080808;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-bg.has-hero-photo {
  background-image: url("assets/images/hero.png");
}

.hero-overlay {
  background:
    linear-gradient(
      105deg,
      rgba(8, 8, 8, 0.94) 0%,
      rgba(12, 12, 12, 0.82) 42%,
      rgba(18, 18, 18, 0.72) 68%,
      rgba(8, 8, 8, 0.88) 100%
    ),
    linear-gradient(to bottom, rgba(8, 8, 8, 0.35) 0%, rgba(18, 18, 18, 0.88) 72%, #121212 100%),
    radial-gradient(ellipse 90% 60% at 15% 50%, rgba(0, 0, 0, 0.55), transparent 70%);
  pointer-events: none;
}

.hero-content h1,
.hero-content > p {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* Navigation links */
.nav-link {
  display: block;
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cbd5e1;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}
@media (min-width: 768px) {
  .nav-link {
    padding: 0.5rem 0.85rem;
  }
}
.nav-link:hover {
  color: #fff;
  background-color: rgba(224, 106, 59, 0.08);
  transform: translateY(-1px);
}

/* Mobile menu open state */
.nav-panel.is-open {
  display: flex;
}
@media (min-width: 768px) {
  .nav-panel.is-open {
    display: flex;
  }
}

.nav-toggle.is-open .icon-menu {
  display: none;
}
.nav-toggle.is-open .icon-close {
  display: block;
}

/* Primary / secondary buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.625rem;
  padding: 0.85rem 1.5rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease;
}
.btn-primary {
  border: 1px solid rgba(224, 106, 59, 0.55);
  background: linear-gradient(180deg, #e87747 0%, #e06a3b 45%, #c45a32 100%);
  color: #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(224, 106, 59, 0.25),
    0 8px 28px rgba(224, 106, 59, 0.28);
}
.btn-primary:hover {
  transform: scale(1.03) translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 180, 140, 0.45),
    0 0 28px rgba(224, 106, 59, 0.35),
    0 12px 36px rgba(0, 0, 0, 0.45);
}
.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  border: 1px solid #2a2a2a;
  background: rgba(26, 26, 26, 0.85);
  color: #e2e8f0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.btn-secondary:hover {
  transform: scale(1.02) translateY(-1px);
  border-color: rgba(224, 106, 59, 0.45);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(224, 106, 59, 0.2),
    0 8px 28px rgba(224, 106, 59, 0.12);
}

/* War Room — layout & zone tabs */
.war-room-grid {
  align-items: stretch;
}

.zone-tab {
  border-left: 4px solid transparent;
}

.zone-tab.is-active {
  border-color: rgba(224, 106, 59, 0.45) !important;
  border-left-color: #e06a3b !important;
  box-shadow:
    inset 4px 0 24px rgba(224, 106, 59, 0.12),
    0 0 0 1px rgba(224, 106, 59, 0.2),
    0 0 28px rgba(224, 106, 59, 0.14),
    0 8px 28px rgba(0, 0, 0, 0.45) !important;
  background: linear-gradient(145deg, rgba(224, 106, 59, 0.1) 0%, #1a1a1a 58%) !important;
}

.playlist-tab.is-active {
  border-color: rgba(224, 106, 59, 0.55) !important;
  box-shadow:
    0 0 0 1px rgba(224, 106, 59, 0.2),
    0 0 32px rgba(224, 106, 59, 0.15),
    0 8px 28px rgba(0, 0, 0, 0.45) !important;
  background: linear-gradient(145deg, rgba(224, 106, 59, 0.08) 0%, #1a1a1a 55%) !important;
}

.zone-intel-panel {
  background: linear-gradient(165deg, #1c1c1c 0%, #141414 50%, #121212 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 12px 48px rgba(0, 0, 0, 0.55);
}

.zone-visual-placeholder {
  background-image:
    linear-gradient(rgba(224, 106, 59, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 106, 59, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  padding: 0.4rem 0.85rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #86efac;
}

.live-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25), 0 0 12px rgba(34, 197, 94, 0.85);
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(0.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-status-dot {
    animation: none;
  }
}

/* Zone detail panel transition */
.zone-panel {
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}
.zone-panel.is-updating {
  opacity: 0.55;
  transform: translateY(6px);
}

/* Bento / spec cards — manufacturing dashboard */
.bento-dashboard {
  min-height: 320px;
}

.spec-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #262626;
  background: linear-gradient(155deg, #1e1e1e 0%, #161616 45%, #121212 100%);
  padding: 1.5rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 4px 24px rgba(0, 0, 0, 0.45);
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.spec-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px 180px at 100% 0%, rgba(224, 106, 59, 0.06), transparent 55%);
  pointer-events: none;
}

.spec-card:hover {
  border-color: rgba(224, 106, 59, 0.32);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(224, 106, 59, 0.12),
    0 12px 40px rgba(0, 0, 0, 0.5);
}

.spec-card > * {
  position: relative;
  z-index: 1;
}

.spec-card-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

.spec-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: #e06a3b;
}

.precision-stat {
  line-height: 1;
}

.precision-value {
  font-family: Outfit, system-ui, sans-serif;
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #e06a3b;
  text-shadow: 0 0 40px rgba(224, 106, 59, 0.35);
}

.precision-unit {
  margin-left: 0.15rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: rgba(224, 106, 59, 0.75);
}

.bento-precision {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Community cards */
.community-card {
  border-radius: 1rem;
  border: 1px solid #2a2a2a;
  background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.community-card:hover {
  border-color: rgba(224, 106, 59, 0.35);
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 0 0 1px rgba(224, 106, 59, 0.12),
    0 14px 44px rgba(0, 0, 0, 0.55);
}

.youtube-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.youtube-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 220px;
  border-radius: 0.75rem;
  border: 1px dashed #404040;
  background: linear-gradient(165deg, #1a1a1a 0%, #0f0f0f 100%);
  text-align: center;
  padding: 2rem;
}

.youtube-placeholder-icon {
  font-size: 2.5rem;
  line-height: 1;
  filter: grayscale(0.2);
}

.youtube-placeholder-hidden {
  display: none;
}

.youtube-embed {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #262626;
  background: #000;
}

.youtube-embed-hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.youtube-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tip-shell iframe {
  border: 0;
  border-radius: 0.5rem;
  max-width: 100%;
}

/* Files Vault — allied creator tiles */
.vault-card .vault-cta {
  margin-top: auto;
}

.creator-grid {
  flex: 1;
}

.creator-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-radius: 0.625rem;
  border: 1px solid #262626;
  background: rgba(23, 23, 23, 0.5);
  padding: 0.85rem;
  text-decoration: none;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease,
    background-color 0.22s ease;
}

.creator-card:hover {
  border-color: rgba(224, 106, 59, 0.55);
  background: rgba(28, 28, 28, 0.85);
  box-shadow:
    0 0 0 1px rgba(224, 106, 59, 0.2),
    0 0 20px rgba(224, 106, 59, 0.12);
  transform: translateY(-2px);
}

.creator-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(224, 106, 59, 0.35);
  background: rgba(224, 106, 59, 0.1);
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #e06a3b;
  transition: background-color 0.22s ease, border-color 0.22s ease;
}

.creator-card:hover .creator-mark {
  border-color: rgba(224, 106, 59, 0.65);
  background: rgba(224, 106, 59, 0.18);
}

.creator-name {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.creator-tag {
  font-size: 0.65rem;
  line-height: 1.3;
  color: #94a3b8;
}

.creator-card:hover .creator-tag {
  color: #cbd5e1;
}

/* Screen reader only — Tailwind includes .sr-only; mirror for safety */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
