/* ============================================================
   LUNARWORKS — cinematic.css
   Premium motion layer. Sits on top of style.css.
   ============================================================ */

/* ---- Override style.css hero line animations —
   cinematic.js handles hero text via word-wrap reveal      ---- */
.hero-heading .line-1,
.hero-heading .line-2 {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
.hero-sub,
.hero-cta,
.hero-trust {
  opacity: 1 !important;
  animation: none !important;
}

/* ---- Hero heading sizing & contrast ---------------------- */
.hero-heading {
  font-size: unset !important;
  line-height: 1 !important;
  letter-spacing: unset !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
/* "We are" — lightweight, restrained */
.hero-heading .line-1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.6rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  color: var(--text-secondary) !important;
  display: block;
}
/* "LunarWorks" — massive, dominant */
.hero-heading .line-2 {
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 10vw, 9rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 0.92 !important;
  display: block;
  /* Strip gradient from parent — JS wraps into child .word spans */
  background: none !important;
  -webkit-text-fill-color: unset !important;
}
/* Re-apply gradient to the actual word spans after JS wrapping */
.hero-heading .line-2 .word {
  background: linear-gradient(130deg, var(--accent-bright) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
/* Fallback: if JS hasn't run yet, line-2 itself gets gradient */
.hero-heading .line-2:not(.words-ready) {
  background: linear-gradient(130deg, var(--accent-bright) 0%, var(--gold-light) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ---- Cinematic timing tokens ------------------------------ */
:root {
  --ease-cinema:  cubic-bezier(0.76, 0, 0.24, 1);   /* signature drag */
  --ease-spring:  cubic-bezier(0.16, 1, 0.3, 1);    /* snap in */
  --ease-out:     cubic-bezier(0.0, 0, 0.2, 1);     /* clean exit */
  --dur-slow:     1.1s;
  --dur-med:      0.75s;
  --dur-fast:     0.38s;
}

/* ============================================================
   CURSOR — refined dot + ring
   ============================================================ */
.c-outer {
  position: fixed; top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1.5px solid rgba(167,139,250,0.45);
  border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition:
    width  var(--dur-fast) var(--ease-spring),
    height var(--dur-fast) var(--ease-spring),
    border-color var(--dur-fast) ease,
    background    var(--dur-fast) ease;
  will-change: transform;
  mix-blend-mode: normal;
}
.c-dot {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px;
  background: #a78bfa;
  border-radius: 50%;
  pointer-events: none; z-index: 10000;
  transform: translate(-50%,-50%);
  transition:
    width  0.15s var(--ease-spring),
    height 0.15s var(--ease-spring),
    background 0.15s ease;
  will-change: transform;
  box-shadow: 0 0 8px rgba(167,139,250,0.8);
}
body.cur-hover .c-outer {
  width: 54px; height: 54px;
  border-color: var(--gold);
  background: rgba(201,168,76,0.04);
}
body.cur-hover .c-dot { width: 4px; height: 4px; }
body.cur-click .c-dot {
  width: 10px; height: 10px;
  background: var(--gold-light);
  box-shadow: 0 0 16px rgba(201,168,76,0.9);
}

/* ============================================================
   HERO — background orbs (react to mouse via JS)
   ============================================================ */
.hero-orbs { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.orb-a {
  position: absolute;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,40,217,0.28) 0%, transparent 65%);
  top: -20%; left: -10%;
  animation: orbDrift 18s ease-in-out infinite;
  will-change: transform;
  filter: blur(2px);
}
.orb-b {
  position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.10) 0%, transparent 65%);
  bottom: -10%; right: -5%;
  animation: orbDrift 22s ease-in-out infinite reverse;
  animation-delay: -7s;
  will-change: transform;
}
.orb-c {
  position: absolute;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.18) 0%, transparent 65%);
  top: 40%; left: 55%;
  animation: orbDrift 14s ease-in-out infinite;
  animation-delay: -3s;
  will-change: transform;
}

@keyframes orbDrift {
  0%,100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.05); }
  66%      { transform: translate(-25px, 20px) scale(0.97); }
}

/* ============================================================
   TEXT REVEAL — words slide up through a clip mask
   ============================================================ */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.08;
}
.word {
  display: inline-block;
  transform: translateY(105%);
  transition: transform var(--dur-slow) var(--ease-cinema);
  transition-delay: var(--wd, 0s);
}
.words-ready .word { transform: translateY(0); }

/* Subtitle fade-up by word */
.sub-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity   var(--dur-med) ease,
    transform var(--dur-med) var(--ease-spring);
  transition-delay: var(--wd, 0s);
}
.sub-ready .sub-word { opacity: 1; transform: none; }

/* ============================================================
   SECTION REVEAL — clip-path curtain wipe
   ============================================================ */
.cin-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity   var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-cinema);
  transition-delay: var(--delay, 0s);
}
.cin-reveal.in { opacity: 1; transform: none; }

.cin-reveal-left {
  opacity: 0;
  transform: translateX(-48px);
  transition:
    opacity   var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-cinema);
  transition-delay: var(--delay, 0s);
}
.cin-reveal-left.in { opacity: 1; transform: none; }

.cin-reveal-right {
  opacity: 0;
  transform: translateX(48px);
  transition:
    opacity   var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-cinema);
  transition-delay: var(--delay, 0s);
}
.cin-reveal-right.in { opacity: 1; transform: none; }

/* Section label clip wipe */
.cin-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transition:
    opacity   0.3s ease,
    clip-path 0.8s var(--ease-cinema);
  transition-delay: var(--delay, 0s);
}
.cin-label.in { opacity: 1; clip-path: inset(0 0% 0 0); }

/* Staggered children helper */
.cin-stagger > * { transition-delay: calc(var(--si, 0) * 0.08s); }

/* ============================================================
   HERO CTA BUTTONS — cinematic hover
   ============================================================ */
.btn {
  transition:
    transform  var(--dur-fast) var(--ease-spring),
    box-shadow var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease !important;
  will-change: transform;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.4), 0 8px 32px rgba(139,92,246,0.35) !important;
}
.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--accent-bright) !important;
  box-shadow: 0 0 20px rgba(139,92,246,0.15);
}

/* ============================================================
   NAVIGATION — cinematic hover
   ============================================================ */
.nav-link {
  position: relative;
  transition: color var(--dur-fast) ease !important;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent-bright), var(--gold));
  transition: width 0.5s var(--ease-cinema) !important;
}
.nav-link:hover::after { width: 100%; }
.navbar.scrolled {
  transition: background 0.6s ease, border-color 0.6s ease !important;
}

/* ============================================================
   PROJECT CARDS — cinematic hover + image zoom
   ============================================================ */
.project-card {
  transition:
    transform  0.55s var(--ease-spring),
    box-shadow 0.55s ease,
    border-color 0.55s ease !important;
  transform-style: preserve-3d;
}
.project-card:hover {
  box-shadow:
    0 0 0 1px rgba(139,92,246,0.25),
    0 28px 60px rgba(139,92,246,0.18),
    0 0 80px rgba(139,92,246,0.06) !important;
}
.project-preview img {
  transition: transform 0.9s var(--ease-cinema) !important;
}
.project-card:hover .project-preview img {
  transform: scale(1.07) !important;
}

/* ============================================================
   WHY / SERVICE / ANYONE CARDS
   ============================================================ */
.why-card, .service-card, .anyone-card {
  transition:
    transform  0.5s var(--ease-spring),
    box-shadow 0.5s ease,
    border-color 0.5s ease,
    background   0.5s ease !important;
}
.why-card:hover, .service-card:hover {
  transform: translateY(-6px) !important;
}
.anyone-card:hover { transform: translateY(-5px) scale(1.02) !important; }

/* Vision cards */
.vision-card {
  transition:
    transform  0.5s var(--ease-spring),
    box-shadow 0.5s ease,
    border-color 0.5s ease,
    background 0.5s ease !important;
}
.vision-card:hover { transform: translateY(-5px) !important; }

/* ============================================================
   SCROLL PROGRESS LINE (top of page)
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  z-index: 9998;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ============================================================
   ABOUT — cinematic zoom wrap
   ============================================================ */
.about-zoom-wrap {
  will-change: transform, filter, opacity;
  transform-origin: center top;
}

/* ============================================================
   MARQUEE — smooth deceleration on hover
   ============================================================ */
.marquee-inner {
  transition: animation-play-state 0.4s ease;
}

/* ============================================================
   HERO SCROLL INDICATOR — refined
   ============================================================ */
.hero-scroll-indicator {
  opacity: 0;
  animation: fadeInScroll 1s ease 2.2s forwards;
}
@keyframes fadeInScroll {
  to { opacity: 0.4; }
}

/* ============================================================
   SECTION DIVIDERS — animated gradient line
   ============================================================ */
.cin-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--gold-dim), var(--border), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease-cinema);
}
.cin-divider.in { transform: scaleX(1); }

/* ============================================================
   FOOTER — fade up
   ============================================================ */
.footer { opacity: 0; transition: opacity 1s ease; }
.footer.in { opacity: 1; }

/* ============================================================
   MOBILE — disable heavy effects
   ============================================================ */
@media (max-width: 768px) {
  .c-outer, .c-dot { display: none; }
  body { cursor: auto; }
  .btn { cursor: pointer; }
  .orb-a, .orb-b, .orb-c { filter: blur(30px); }
}
