/* ==========================================================================
   Landing page — cinematic layer (loaded by index.html only)
   GSAP owns the choreography; everything here degrades to a static page
   when JS is unavailable or prefers-reduced-motion is set.
   ========================================================================== */

/* ---------- Cinematic intro overlay ---------- */

#cine-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background:
    radial-gradient(1200px 600px at 50% 40%, rgba(242, 107, 33, 0.07), transparent 60%),
    #121316;
  overflow: hidden;
  /* Failsafe: if scripting dies after parse, the overlay clears itself */
  animation: cineFailsafe 0.6s ease 7s forwards;
}
html.cine-off #cine-intro { display: none; }
html.cine-lock { overflow: hidden; }

@keyframes cineFailsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

.cine-stage {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
}

.cine-tile {
  position: absolute;
  width: clamp(130px, 21vw, 290px);
  aspect-ratio: 4 / 3;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  opacity: 0; /* GSAP fades each tile in */
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.75);
  outline: 1px solid rgba(255, 255, 255, 0.12);
  outline-offset: -1px;
}
.cine-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cine-tile figcaption {
  position: absolute;
  left: 10px;
  bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(18, 19, 22, 0.55);
  backdrop-filter: blur(4px);
}

/* Collage layout: a loose ring around the centre wordmark */
.cine-tile[data-tile="1"] { left: 6%;  top: 8%; }
.cine-tile[data-tile="2"] { left: 33%; top: 2%; }
.cine-tile[data-tile="3"] { right: 8%; top: 7%; }
.cine-tile[data-tile="4"] { left: 3%;  top: 42%; }
.cine-tile[data-tile="5"] { right: 4%; top: 40%; }
.cine-tile[data-tile="6"] { left: 10%; bottom: 6%; }
.cine-tile[data-tile="7"] { left: 38%; bottom: 2%; }
.cine-tile[data-tile="8"] { right: 9%; bottom: 7%; }

@media (max-width: 640px) {
  .cine-tile { width: clamp(120px, 34vw, 180px); }
  .cine-tile[data-tile="2"] { left: 36%; top: 4%; }
  .cine-tile[data-tile="4"] { left: -6%; top: 38%; }
  .cine-tile[data-tile="5"] { right: -6%; top: 38%; }
  .cine-tile[data-tile="7"] { left: 34%; bottom: 3%; }
}

.cine-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
  opacity: 0; /* GSAP */
  pointer-events: none;
}
.cine-mark-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #94a3b8;
}
.cine-mark-name {
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  color: #fdfdfc;
  text-shadow: 0 0 50px rgba(242, 107, 33, 0.35);
}
.cine-mark-line {
  width: 130px;
  height: 2px;
  transform-origin: center;
  background: linear-gradient(90deg, transparent, #f9863a 30%, #38bdf8 70%, transparent);
}

#cine-skip {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 5;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
#cine-skip:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
#cine-skip:focus-visible { outline: 2px solid #f9863a; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  #cine-intro { display: none; }
}

/* ---------- Hero headline line masks ---------- */

.cine-line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.cine-line-inner { display: block; will-change: transform; }

/* ---------- Command-center telemetry chips ---------- */

.cine-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
}
.cine-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex: none;
}
.cine-dot-blue { background: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.9); animation: cinePulse 2.2s ease-in-out infinite; }
.cine-dot-gold { background: #f9863a; box-shadow: 0 0 8px rgba(249, 134, 58, 0.9); animation: cinePulse 2.2s ease-in-out 0.8s infinite; }

@keyframes cinePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .cine-dot-blue, .cine-dot-gold { animation: none; }
}

/* ---------- Metallic details ---------- */

/* Hairline sheen between sections */
.cine-sheen {
  background: linear-gradient(90deg,
    transparent 5%,
    rgba(249, 134, 58, 0.45) 35%,
    rgba(56, 189, 248, 0.3) 65%,
    transparent 95%);
}

/* Stat cells: brushed hairline above each number */
.cine-stat-grid > div { position: relative; padding-top: 1.4rem; }
.cine-stat-grid > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(249, 134, 58, 0.7), transparent);
}

/* ---------- Card hover: cursor-tracked glow ---------- */

.cine-card { position: relative; overflow: hidden; }
.cine-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%),
    rgba(249, 134, 58, 0.12), transparent 65%);
}
.cine-card:hover::after { opacity: 1; }
.cine-card:hover { --ring-glow: 1; }
@media (hover: hover) {
  .cine-card { transition: box-shadow 0.35s ease; }
  .cine-card:hover {
    box-shadow:
      0 18px 45px -18px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(249, 134, 58, 0.35);
  }
}

/* Industry chips: slide the marker dot on hover */
.cine-chip-card { transition: background 0.3s ease, transform 0.3s ease; }
.cine-chip-card:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }

/* ---------- Three.js sourcing globe ---------- */

#globe-wrap { touch-action: pan-y; }
#globe-canvas { display: block; cursor: grab; }
#globe-canvas:active { cursor: grabbing; }
.globe-glow {
  position: absolute;
  inset: 8%;
  border-radius: 9999px;
  background: radial-gradient(circle,
    rgba(242, 107, 33, 0.10) 0%,
    rgba(56, 189, 248, 0.05) 52%,
    transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}
.globe-hint { opacity: 0; transition: opacity 0.8s ease 0.4s; }
.globe-ready + .globe-hint { opacity: 1; }

/* ---------- Hero word cycler ---------- */

.cine-cycle {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  min-width: 9.5ch;
}
.cine-cycle-word { display: inline-block; will-change: transform; }

/* ---------- "We're there for you" scroll story ---------- */

.support-step + .support-step { margin-top: 2rem; }
.support-step-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #94a3b8;
}
.support-step-num {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  background: #1c1d20;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: "Sora", "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #f9863a;
}
.support-photos-sticky { display: grid; gap: 1.25rem; }
.support-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}
.support-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.support-photo .support-svg {
  display: block;
  width: 100%;
  height: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(640px 420px at 70% 20%, rgba(242, 107, 33, 0.06), transparent 60%),
    #16171c;
  background-size: 48px 48px, 48px 48px, auto, auto;
}
.support-stage.is-pinned .support-photo .support-svg { height: 100%; }
.support-photo figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(18, 19, 22, 0.55);
  backdrop-filter: blur(4px);
}

/* Story mode (applied by JS on large screens only): the photo column is
   sticky and crossfades while the steps scroll past it. Without JS the
   section reads as three stacked step/photo blocks. */
.support-stage.is-pinned { align-items: stretch; }
.support-stage.is-pinned .support-step {
  /* Enough scroll distance to drive the crossfade, never a void */
  min-height: clamp(230px, 30vh, 320px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
  padding: 1rem 0;
  transition: opacity 0.3s ease;
}
.support-stage.is-pinned .support-step:not(.is-active) { opacity: 0.38; }
.support-stage.is-pinned .support-photos { position: relative; }
.support-stage.is-pinned .support-photos-sticky {
  position: sticky;
  top: 12vh;
  aspect-ratio: 4 / 3;
  display: block;
}
.support-stage.is-pinned .support-photo { position: absolute; inset: 0; opacity: 0; }

/* ---------- Micro-interactions ---------- */

/* Shine sweep across primary buttons */
[data-magnet] { position: relative; overflow: hidden; }
[data-magnet]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
[data-magnet]:hover::before { left: 130%; }

/* Nav links: underline sweep (home page only — this sheet loads only here) */
header nav ul a { position: relative; }
header nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: #f9863a;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
header nav ul a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Marquee slows to a stop under the cursor */
.marquee-mask:hover .marquee { animation-play-state: paused; }

/* Service-card icons tick on hover */
.cine-card > span:first-of-type { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.cine-card:hover > span:first-of-type { transform: rotate(-6deg) scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  [data-magnet]::before { display: none; }
  .support-stage.is-pinned .support-step { transition: none; }
}

/* ---------- Focus visibility on dark ---------- */

#cine-intro button:focus-visible,
a:focus-visible {
  outline: 2px solid #f9863a;
  outline-offset: 2px;
  border-radius: 6px;
}
