/* ============================================================
   Geneltec Hero — local styles
   Builds on top of geneltec-tokens.css (Inter Tight + brand cyan)
   ============================================================ */

html, body {
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-family: var(--font-sans);
  color: var(--fg);
}

/* NB: don't put overflow-x:hidden on html/body — it makes them a scroll
   container, which breaks position:sticky on descendants. The hero card
   already clips its own contents via overflow:hidden; sections set widths
   that fit inside the viewport so there's no horizontal overflow to clip. */

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

/* ============================================================
   Glassmorphism utilities
   ============================================================ */

.gl-glass-card {
  background: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1px 0 rgba(255, 255, 255, 0.10),
    0 18px 40px -16px rgba(11, 27, 38, 0.28),
    0 4px 12px -4px rgba(11, 27, 38, 0.12);
}

.gl-glass-pill {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.40);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 6px 20px -10px rgba(11, 27, 38, 0.30);
}

.gl-glass-strip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 100%);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 12px 30px -10px rgba(11, 27, 38, 0.35);
}

/* The brand-blue primary CTA — specular highlight built in */
.gl-cta {
  background: linear-gradient(180deg, #3BC4E6 0%, #1AB6E0 60%, #119FC8 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(11, 27, 38, 0.20),
    0 8px 22px -6px rgba(26, 182, 224, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.10);
}

.gl-cta:hover {
  background: linear-gradient(180deg, #4FCCEA 0%, #25BFE8 60%, #1AB6E0 100%);
}

/* Subtle film-grain overlay so the glass picks up texture */
.gl-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.15;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  z-index: 6;
}

/* Light wash on top of the video so the glass sits on something readable.
   Subtle gradient — top has a brand-tinted highlight, bottom a deeper ink veil. */
.gl-video-veil::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(11, 27, 38, 0.30) 0%, rgba(11, 27, 38, 0.20) 40%, rgba(11, 27, 38, 0.55) 100%);
  z-index: 1;
}

/* Faint engineering grid layered over the video — technical brand feel */
.gl-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.10;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 64px 64px;
  z-index: 2;
  mix-blend-mode: overlay;
}

/* Nav hover underline */
.gl-menu-item {
  position: relative;
}
.gl-menu-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  height: 1px;
  width: 0%;
  background: rgba(255, 255, 255, 0.85);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.gl-menu-item:hover::after {
  width: 100%;
  left: 0%;
}

/* Pulsing live dot */
@keyframes glPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}
.gl-live-dot {
  animation: glPulse 1.8s ease-in-out infinite;
}

/* Play button outer ring pulse */
@keyframes glRing {
  0%   { transform: scale(1);   opacity: 0.45; }
  100% { transform: scale(1.9); opacity: 0;    }
}
.gl-play-ring {
  animation: glRing 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

/* Spotlight that follows the cursor */
.gl-spotlight {
  position: absolute;
  pointer-events: none;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 182, 224, 0.22) 0%, rgba(26, 182, 224, 0) 65%);
  transform: translate(-50%, -50%);
  z-index: 2;
  mix-blend-mode: screen;
  transition: opacity 0.4s ease;
  filter: blur(4px);
}

/* Ticker rail — runs along the very bottom inside the card */
@keyframes glMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.gl-ticker-track {
  display: flex;
  width: max-content;
  animation: glMarquee 38s linear infinite;
  gap: 48px;
  padding-right: 48px;
}

/* Headline italic accent — brand blue */
.gl-accent {
  color: var(--brand-500);
  font-style: italic;
  font-weight: 500;
}

/* Ensure the video doesn't show controls in any browser */
video::-webkit-media-controls { display: none !important; }

/* ============================================================
   Spotlight cards — mouse-tracked radial highlight + animated
   border light. Position is driven by CSS custom properties
   --mx / --my set imperatively from a mousemove handler — no
   React state re-renders, so it stays smooth.
   ============================================================ */
.gl-spotlight-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  isolation: isolate;
}
/* Soft brand-cyan fill highlight under the cursor */
.gl-spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx) var(--my),
    rgba(26, 182, 224, 0.20),
    rgba(26, 182, 224, 0.05) 25%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  pointer-events: none;
  z-index: 0;
}
/* Glowing 1px border outline (mask-composite trick — only the border ring
   shows the gradient, the interior is masked out) */
.gl-spotlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    280px circle at var(--mx) var(--my),
    rgba(26, 182, 224, 0.95),
    rgba(26, 182, 224, 0.25) 40%,
    transparent 70%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  pointer-events: none;
  z-index: 1;
}
.gl-spotlight-card:hover::before,
.gl-spotlight-card:hover::after {
  opacity: 1;
}
.gl-spotlight-card > * {
  position: relative;
  z-index: 2;
}

/* Modal / gallery entry animations (activities + others) */
@keyframes glFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes glPopIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes glScaleY {
  from { opacity: 0; transform: scaleY(0.2); }
  to   { opacity: 1; transform: scaleY(1); }
}
@keyframes glSlideY {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Scroll-revealed fade-up. An IntersectionObserver in App adds
   .is-in when the element enters the viewport. Use --fade-delay
   inline for staggered groups (e.g. card grids).
   ============================================================ */
.gl-fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
  transition-delay: var(--fade-delay, 0ms);
  will-change: opacity, transform;
}
.gl-fade-up.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .gl-fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
