/* ==========================================================================
   EngineX - Black & White Theme Override
   UI Theme is monochrome/black & white, images & media stay in original FULL COLOR
   ========================================================================== */

:root {
  --c-bg: #000000 !important;
  --c-fg: #ffffff !important;
  --c-accent: #ffffff !important;
  --c-ink: #000000 !important;
  --c-dim: rgba(255, 255, 255, 0.68) !important;
  --c-faint: rgba(255, 255, 255, 0.48) !important;
  --c-line: rgba(255, 255, 255, 0.16) !important;
  --c-ghost: rgba(255, 255, 255, 0.05) !important;
  --c-raise: #0c0c0c !important;

  /* Black & White monochrome sphere gradient for hero */
  --sphere: radial-gradient(
    circle at 32% 28%,
    #ffffff 0%,
    #e0e0e0 10%,
    #a8a8a8 28%,
    #4a4a4a 58%,
    #181818 84%,
    #000000 100%
  ) !important;
}

/* Backgrounds & surfaces */
html, body {
  background-color: #000000 !important;
  color: #ffffff !important;
}

/* Button overrides: crisp monochrome inverted buttons */
.btn--light,
.btn--primary,
.btn[href*="innovation-lab"],
.btn-primary,
.nav__cta .btn {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

.btn--light .roll,
.btn--light .roll > span,
.btn--primary .roll,
.btn--primary .roll > span,
.btn[href*="innovation-lab"] .roll,
.btn[href*="innovation-lab"] .roll > span,
.nav__cta .btn .roll,
.nav__cta .btn .roll > span {
  color: #000000 !important;
}

.btn--light .btn__ico,
.btn--primary .btn__ico,
.btn[href*="innovation-lab"] .btn__ico,
.nav__cta .btn .btn__ico {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #000000 !important;
}

.btn--light .arrow path,
.btn--primary .arrow path,
.btn[href*="innovation-lab"] .arrow path,
.nav__cta .btn .arrow path {
  stroke: #000000 !important;
}

.btn--light:hover,
.btn--primary:hover,
.btn[href*="innovation-lab"]:hover,
.nav__cta .btn:hover {
  background: #e8e8e8 !important;
  color: #000000 !important;
}

/* Links & Accents */
a:hover,
.link:hover,
.menu__links a:hover,
.menu__side a:hover {
  color: #ffffff !important;
}

/* Custom cursor */
.cursor,
.app__cursor i {
  border-color: #ffffff !important;
}

.cursor.is-down,
.cursor--dot {
  background: #ffffff !important;
}

/* Selection */
::selection {
  background: #ffffff !important;
  color: #000000 !important;
}

/* Live clock dot */
.nav__dot {
  background: #ffffff !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8) !important;
}

/* Gradients and glow scrims */
.mgrad,
.mgrad--menu i {
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.12) 0%, transparent 70%) !important;
}

/* INSTANT VIDEO VISIBILITY: All video cards show and play without delay */
video,
.reel__frame video,
.case-fig--vid video,
.wk-g video,
.depth__media video {
  opacity: 1 !important;
  display: block !important;
  pointer-events: none;
}

/* FIX DEPTH SECTION: Always visible, no black/broken image overlay */
.depth__media {
  background: #000 !important;
}

.depth__media picture,
.depth__media picture img,
.depth__media img,
.depth__img,
.depth__img--s,
.js .depth__img--s {
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
}

/* Ensure missing animation sequence canvas does not block still visuals */
.depth__seq {
  display: none !important;
}

/* Strip animation scanline helper overlay */
.depth__strips i {
  background-image: var(--img) !important;
}

/* Specific fallback for Fig. 10 (Character study) */
section[aria-labelledby="chr-t"] .depth__media img {
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
  z-index: 2 !important;
}

section[aria-labelledby="chr-t"] .depth__strips i {
  opacity: 1 !important;
}

/* Ensure subsequent section doesn't cast a dark blackout veil prematurely */
section[aria-labelledby="chr-t"] + *:before {
  opacity: var(--cov, 0.4) !important;
}

/* Ensure background mockups display cleanly while video is playing */
.reel__frame picture,
.reel__frame img {
  opacity: 0.25 !important;
  transition: opacity 0.5s ease;
}

.reel__frame.is-playing picture,
.reel__frame.is-playing img {
  opacity: 0 !important;
}

/* IMAGES & MEDIA: Preserved in full original vivid color */
img,
picture img,
.spiral img,
.fv img,
.depth img,
.card img,
.journal img,
.wkc img,
video {
  filter: none !important;
}

/* ==========================================================================
   5-SCROLL EXTENDED HOLD ON NEON WORKSTATION & MOBILE RECTANGLE FRAMING
   ========================================================================== */

/* Extended scroll run for 5 scrolls / 5 seconds hold */
.depth--fade.depth--seq .depth__run,
.depth--fade .depth__run,
.depth__run {
  height: 480vh !important;
}

/* ==========================================================================
   ENGINEX LOGO STYLING & SCANLINE ANIMATION
   ========================================================================== */

.logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 14px !important;
  width: auto !important;
  height: 54px !important;
  position: relative !important;
  justify-self: start !important;
  text-decoration: none !important;
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.logo .lg {
  position: relative !important;
  display: block !important;
  width: 54px !important;
  height: 54px !important;
  flex-shrink: 0 !important;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1), height 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav.is-scrolled .logo {
  height: 40px !important;
}

.nav.is-scrolled .logo .lg {
  width: 40px !important;
  height: 40px !important;
}

.logo__brand {
  font-family: var(--f-display, "Space Grotesk", sans-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  white-space: nowrap;
  display: inline-block;
  line-height: 1;
  pointer-events: auto;
  transition: font-size 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.is-scrolled .logo__brand {
  font-size: 16px;
}

@media (max-width: 600px) {
  .logo {
    gap: 10px !important;
  }
  .logo__brand {
    font-size: 15px;
  }
  .nav.is-scrolled .logo__brand {
    font-size: 14px;
  }
}

.lg__r,
.lg__b {
  position: absolute !important;
  left: 0 !important;
  width: 100% !important;
  display: block !important;
}

/* Original scanline strip timing and entrance */
.lg__r {
  animation: lgS 7.76s linear calc(var(--i) * 55ms) infinite backwards !important;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i) * 12ms) !important;
}

.lg__b {
  background: #ffffff !important;
  transform-origin: 0 50% !important;
  animation: lgB 7.76s linear calc(var(--i) * 55ms) infinite backwards !important;
}

/* Hover glitch slice displacement (matching the original signature interaction) */
.logo:hover .lg__r:nth-child(8n+1) {
  transform: translate(-6%) !important;
}

.logo:hover .lg__r:nth-child(8n+5) {
  transform: translate(7%) !important;
}

/* Mobile view: full portrait framing & clean navigation layout */
@media (max-width: 767px) {
  .depth__media img,
  .depth__img,
  .depth__img--s,
  .depth__last-frame img {
    object-fit: cover !important;
    object-position: center center !important;
  }

  .depth {
    --cxm: 0% !important;
    --cym: 0% !important;
  }

  .depth__title {
    font-size: clamp(32px, 10vw, 48px) !important;
    margin-bottom: max(6svh, 36px) !important;
  }

  .depth__meta {
    top: calc(var(--nav-hs, 64px) + 12px) !important;
  }

  .depth--fade.depth--seq .depth__run,
  .depth--fade .depth__run,
  .depth__run {
    height: 420vh !important;
  }

  /* Navbar mobile layout: prevent wrapping or overlap */
  .nav__in {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .logo {
    gap: 10px !important;
    flex-shrink: 0 !important;
  }

  .logo .lg {
    width: 38px !important;
    height: 38px !important;
  }

  .logo__brand {
    font-size: 15px !important;
  }

  .nav__end {
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .nav__cta .btn {
    padding: 0 14px !important;
    font-size: 13px !important;
    height: 38px !important;
  }
}

/* GALLERY IMAGES GUARANTEED VISIBILITY */
.wk-g img,
.wk-g picture,
.wk-g picture img {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  max-width: none !important;
}
.wk-g {
  clip-path: none !important;
}
.wk-g figcaption {
  opacity: 1 !important;
  transform: none !important;
}

/* ==========================================================================
   ENGINEX EMBLEM IN BRIEF ASSISTANT APP WIDGET
   ========================================================================== */
.bw__fav,
.app__icon {
  position: relative !important;
  background-image: url("img/enginex-slices/slice-18.png") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
}

.bw__fav svg,
.app__icon svg {
  opacity: 0 !important;
  visibility: hidden !important;
}

.app__name b {
  font-family: var(--f-display, "Space Grotesk", sans-serif) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  letter-spacing: -0.01em !important;
}

/* ==========================================================================
   ENGINEX WORK PORTFOLIO ENHANCEMENTS (Black, White & Solar Orange)
   ========================================================================== */

:root {
  --ex-orange: #ff5500;
  --ex-orange-glow: rgba(255, 85, 0, 0.25);
  --ex-surface: #0a0a0d;
  --ex-border: rgba(255, 255, 255, 0.08);
}

/* Category & Concept Badges */
.wkc__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  font-family: var(--f-mono, "Space Grotesk", monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(255, 85, 0, 0.12);
  color: var(--ex-orange);
  border: 1px solid rgba(255, 85, 0, 0.28);
  margin-bottom: 0.75rem;
}

.wkc__badge--client {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.wkc__badge i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Solar Orange Accents & Micro-Interactions */
.wkc__head h3 a:hover {
  color: var(--ex-orange) !important;
}

.wkc__go:hover {
  color: var(--ex-orange) !important;
  border-color: var(--ex-orange) !important;
}

.wkc__tags li.wkc__ind {
  color: var(--ex-orange) !important;
}

.wkc__tags li.wkc__ind i {
  background: var(--ex-orange) !important;
}

/* Modern Project Card Frame Overlays */
.case-fig--clean {
  position: relative;
  background: #050507;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ex-border);
}

/* Tech Capabilities Grid in Work Page */
.ex-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.ex-tech-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ex-border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.ex-tech-card:hover {
  border-color: rgba(255, 85, 0, 0.4);
  transform: translateY(-2px);
}

.ex-tech-card h3 {
  font-family: var(--f-display, "Space Grotesk", sans-serif);
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.ex-tech-card p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}
