/* Custom Styles for Blue Tangerine IT Solutions Redesign */

/* Hero Canvas Background Constellation */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Ensure hero content is above the canvas */
.hero-content {
  position: relative;
}

/* Material Symbols Adjustments */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}

/* CSS Scroll-driven header shrinking (progressive enhancement for supported browsers) */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  header {
    animation: shrink-header auto linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 80px;
  }
  header nav {
    animation: shrink-nav auto linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 80px;
  }
}

@keyframes shrink-header {
  to {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }
}

@keyframes shrink-nav {
  to {
    height: 60px; /* shrink from h-20 (80px) */
  }
}

/* Fallback class for browsers without scroll-timeline support (applied via JS) */
header.scrolled {
  background-color: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

header.scrolled nav {
  height: 60px !important;
}

/* Smooth mobile menu slide animation details */
#mobile-menu {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

#mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ============================================================
   Animation Redesign (2026-06) — hero reveal, cinematic system,
   per-page signatures. See docs/superpowers/specs/.
   ============================================================ */

/* --- Page-load overlay sweep (element created by animations.js) --- */
.page-overlay {
  position: fixed;
  inset: 0;
  background: #0F172A;
  z-index: 9999;
  pointer-events: none;
}

/* --- Hero: feathered device photo reveal --- */
.device-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, black 45%, transparent 72%);
  mask-image: radial-gradient(ellipse 50% 50% at center, black 45%, transparent 72%);
}
.device-photo.show { opacity: 1; }

.device-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(ellipse at center, rgba(249, 115, 22, 0.18) 0%, rgba(56, 116, 203, 0.10) 40%, transparent 65%);
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.device-glow.show { opacity: 1; }

.device-label {
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #F97316;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.device-label.show { opacity: 1; }

/* --- About: journey timeline --- */
.timeline { position: relative; padding: 24px 0; }
.timeline-rail {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #F97316, #1e3a8a);
  border-radius: 2px;
}
.timeline-item { position: relative; width: 50%; padding: 16px 40px 16px 0; text-align: right; }
.timeline-item.right { margin-left: 50%; padding: 16px 0 16px 40px; text-align: left; }
.timeline-dot {
  position: absolute;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #F97316;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}
.timeline-item.left .timeline-dot { right: -8px; }
.timeline-item.right .timeline-dot { left: -8px; }
@media (max-width: 767px) {
  .timeline-rail { left: 8px; transform: none; }
  .timeline-item,
  .timeline-item.right { width: 100%; margin-left: 0; padding: 12px 0 12px 32px; text-align: left; }
  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot { left: 0; right: auto; }
}

/* --- Services: icon boot-up ping ring (element created by page-signatures.js) --- */
.icon-ping {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid #F97316;
  animation: icon-ping 0.8s ease-out forwards;
  pointer-events: none;
}
@keyframes icon-ping {
  from { opacity: 0.8; transform: scale(0.8); }
  to { opacity: 0; transform: scale(1.9); }
}

/* --- Products: feathered image + hover light sweep --- */
.img-vignette {
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at center, black 55%, transparent 98%);
  mask-image: radial-gradient(ellipse 75% 75% at center, black 55%, transparent 98%);
}
.sweep-container { position: relative; overflow: hidden; }
.sweep-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-175%) skewX(-20deg);
  transition: transform 0.7s ease;
  pointer-events: none;
  z-index: 2;
}
.sweep-container:hover::after { transform: translateX(275%) skewX(-20deg); }

/* --- Partners: infinite logo marquee (built by page-signatures.js) --- */
.partner-marquee { overflow: hidden; position: relative; }
.partner-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
}
.partner-marquee:hover .partner-marquee-track { animation-play-state: paused; }
.partner-marquee-cell { flex: 0 0 auto; width: 160px; margin-right: 48px; }
.partner-marquee-cell .h-24 { margin-bottom: 0 !important; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- Contact: map pin drop + ripple (elements created by page-signatures.js) --- */
.map-pin-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 5;
  pointer-events: none;
}
.map-pin {
  font-size: 48px !important;
  color: #EF4444;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  display: block;
}
.map-ripple {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  border: 2px solid #EF4444;
  animation: map-ripple 1.6s ease-out infinite;
}
@keyframes map-ripple {
  from { opacity: 0.8; transform: scale(0.5); }
  to { opacity: 0; transform: scale(2.2); }
}

/* --- Reduced motion: stop continuous CSS loops --- */
@media (prefers-reduced-motion: reduce) {
  .partner-marquee-track { animation: none; }
  .map-ripple { animation: none; }
  .icon-ping { animation: none; }
  .sweep-container::after { transition: none; }
  .device-photo, .device-glow, .device-label { transition: none; }
}
