/* ==========================================================================
   LUMINAE — FIRE PASS
   Sits after Cinema V6. Adds heat, ember light, living wisps and motion;
   never changes the reading order or the underlying content. The canvas is
   painted by fire.js and disappears under reduced motion.
   ========================================================================== */

:root {
  --fire-ember: #ff6b35;
  --fire-gold: #ffb347;
  --fire-deep: #b53b1d;
}

@supports (background: conic-gradient(from 0deg, #000, #fff)) {
  @property --fire-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
  }
}

.fire-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.82;
  mix-blend-mode: screen;
}

/* A warm, lagging aura makes the pointer feel like a live flame. */
.fire-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 48% 45%, rgba(255, 248, 218, 0.2), rgba(255, 133, 56, 0.09) 34%, transparent 68%),
    conic-gradient(from 210deg, transparent, rgba(255, 102, 41, 0.12) 24%, transparent 48%, rgba(255, 188, 92, 0.1) 76%, transparent);
  filter: blur(2px);
  transition: opacity 0.3s ease;
  will-change: transform;
}

.fire-cursor::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 190, 105, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(255, 104, 42, 0.18), inset 0 0 14px rgba(255, 174, 82, 0.1);
  animation: fire-cursor-turn 7.5s linear infinite;
}

.fire-cursor.is-live { opacity: 0.92; }
.fire-cursor.is-flaring::after { animation: fire-cursor-flare 0.48s ease-out; }

/* Reading progress becomes a thin burning filament. */
.fire-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  width: 100%;
  height: 2px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #ffb347, #ff6b35 48%, #ffd58a 78%, #ff6b35);
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.7), 0 0 32px rgba(255, 107, 53, 0.24);
}

/* The display faces glow like metal in a forge rather than merely sitting still. */
.hero-title .grad,
.section-head h2 .grad,
.section-head h2 em {
  animation: fire-word-glow 7.5s ease-in-out infinite;
}

.workforce-release {
  transition: box-shadow 0.45s ease, transform 0.45s var(--ease);
}

.workforce-release:hover {
  box-shadow: 0 30px 90px -56px rgba(255, 92, 36, 0.72);
  transform: translateY(-3px);
}

.workforce-release:hover::after { opacity: 0.9; filter: blur(26px) saturate(1.3); }

/* A low flame that breathes under the hero. */
.hero::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -16%;
  z-index: 1;
  height: 68%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 68% at 50% 100%, rgba(255, 101, 42, 0.22), transparent 62%),
    radial-gradient(ellipse 34% 56% at 72% 92%, rgba(255, 171, 72, 0.16), transparent 66%),
    radial-gradient(ellipse 28% 44% at 28% 96%, rgba(213, 67, 30, 0.14), transparent 70%);
  filter: blur(22px) saturate(1.2);
  animation: fire-breathe 11s ease-in-out infinite;
  will-change: transform, opacity;
}

.hero-scrim::after {
  content: "";
  position: absolute;
  inset: 48% 0 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(255, 88, 36, 0.11), transparent 58%),
    radial-gradient(ellipse 42% 44% at 78% 78%, rgba(255, 154, 65, 0.12), transparent 66%);
  mix-blend-mode: screen;
  animation: fire-drift 14s ease-in-out infinite alternate;
}

.hero-art .orbit-svg { z-index: 1; }

.hero-art::after {
  content: "";
  position: absolute;
  inset: 15%;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    transparent 0 24%,
    rgba(255, 100, 40, 0.14) 38%,
    transparent 52%,
    rgba(255, 185, 92, 0.12) 68%,
    transparent 82%
  );
  filter: blur(24px);
  animation: fire-orbit 20s linear infinite;
}

.medallion {
  box-shadow:
    0 0 90px rgba(255, 104, 42, 0.24),
    0 0 42px rgba(255, 184, 94, 0.15),
    0 20px 60px -20px rgba(0, 0, 0, 0.95);
}

.live-lumi {
  box-shadow: 0 0 46px rgba(255, 120, 44, 0.28), 0 0 24px rgba(255, 190, 98, 0.16);
}

.hero-title {
  animation:
    title-in 1.1s var(--ease) both,
    fire-heat 7.5s 1.2s ease-in-out infinite;
}

.hero-line {
  text-shadow: 0 0 34px rgba(255, 118, 54, 0.08);
}

/* The primary action keeps a slow molten sweep. */
.btn--primary,
.nav-cta {
  background-size: 210% 210%;
  animation: fire-sheen 9s ease-in-out infinite;
}

.btn.is-magnetic {
  transform: translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0);
  transition: transform 0.16s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.btn.is-magnetic:hover {
  transform: translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0);
}

.btn--primary:hover {
  box-shadow:
    0 12px 40px -14px rgba(255, 100, 42, 0.9),
    0 0 24px rgba(255, 188, 96, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.3);
}

/* Section headings receive a short live fuse. */
.section-head h2 {
  position: relative;
}

.section-head h2::after {
  content: "";
  display: block;
  width: clamp(46px, 7vw, 82px);
  height: 2px;
  margin-top: 0.9rem;
  background: linear-gradient(90deg, #ffd27a, #ff6b35 58%, transparent);
  box-shadow: 0 0 16px rgba(255, 103, 42, 0.5);
  transform-origin: left center;
  animation: fire-rule 5.4s ease-in-out infinite;
}

/* Cards share the heat with the pointer. */
.card:hover::before {
  background: conic-gradient(
    from var(--fire-angle, 0deg),
    rgba(255, 130, 54, 0.62),
    rgba(255, 213, 132, 0.5) 14%,
    transparent 33%,
    rgba(255, 92, 39, 0.36) 54%,
    transparent 76%
  );
  animation: fire-border 7s linear infinite;
}

.card:hover::after {
  background: radial-gradient(
    24rem 24rem at var(--mx, 50%) var(--my, 0%),
    rgba(255, 108, 42, 0.17),
    rgba(255, 180, 86, 0.07) 34%,
    transparent 64%
  );
}

.feature::before {
  background: linear-gradient(180deg, #ffd27a, #ff6b35 52%, #a93218);
  box-shadow: 0 0 12px rgba(255, 104, 44, 0.35);
  animation: feature-fire 4.8s ease-in-out infinite;
}

.feature:hover {
  box-shadow: 0 18px 36px -30px rgba(255, 90, 42, 0.55);
}

.being {
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s var(--ease);
}

.being:hover {
  border-color: rgba(255, 122, 55, 0.3);
  box-shadow: 0 24px 60px -40px rgba(255, 92, 36, 0.6);
  transform: translateY(-2px);
}

/* The current WorkForce release gets a living edge. */
.workforce-release {
  isolation: isolate;
}

.workforce-release > * {
  position: relative;
  z-index: 1;
}

.workforce-release::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--fire-angle, 0deg),
    rgba(255, 122, 48, 0.65),
    rgba(255, 205, 122, 0.55) 12%,
    transparent 30%,
    rgba(255, 84, 36, 0.42) 54%,
    transparent 78%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: fire-border 8s linear infinite;
}

.workforce-release::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -18px;
  z-index: -1;
  height: 54%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 89, 36, 0.18), transparent 68%);
  filter: blur(22px);
  pointer-events: none;
  animation: fire-breathe 8s ease-in-out infinite;
}

.catalog-row {
  transition: background 0.3s ease, padding 0.3s ease;
}

.catalog-row:hover {
  background: linear-gradient(90deg, rgba(255, 104, 44, 0.055), transparent 58%);
}

.token-stage .halo {
  animation: fire-breathe 8s ease-in-out infinite;
  box-shadow: 0 0 120px rgba(255, 102, 42, 0.16);
}

/* ----------------------------------------------------------------------- */
@keyframes fire-cursor-turn {
  from { transform: rotate(0deg) scale(0.92); }
  50% { transform: rotate(180deg) scale(1.08); }
  to { transform: rotate(360deg) scale(0.92); }
}

@keyframes fire-cursor-flare {
  0% { transform: scale(1); opacity: 0.7; }
  38% { transform: scale(1.55); opacity: 1; border-color: rgba(255, 232, 178, 0.8); }
  100% { transform: scale(0.92); opacity: 0.25; }
}

@keyframes fire-word-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 120, 48, 0)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 114, 44, 0.22)); }
}

@keyframes fire-breathe {
  0%, 100% { opacity: 0.58; transform: translate3d(-1%, 2%, 0) scale(0.97); }
  42% { opacity: 0.96; transform: translate3d(2%, -2%, 0) scale(1.06); }
  70% { opacity: 0.74; transform: translate3d(0, 0, 0) scale(1.02); }
}

@keyframes fire-drift {
  from { opacity: 0.48; transform: translate3d(-1.5%, 1%, 0) scale(1.01); }
  to { opacity: 0.9; transform: translate3d(1.5%, -1%, 0) scale(1.08); }
}

@keyframes fire-orbit {
  from { transform: rotate(0deg) scale(0.95); }
  to { transform: rotate(360deg) scale(1.06); }
}

@keyframes fire-heat {
  0%, 100% { filter: drop-shadow(0 6px 30px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 0 rgba(255, 105, 42, 0)); }
  50% { filter: drop-shadow(0 6px 30px rgba(0, 0, 0, 0.42)) drop-shadow(0 0 26px rgba(255, 108, 44, 0.24)); }
}

@keyframes fire-sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes fire-rule {
  0%, 100% { transform: scaleX(0.42); opacity: 0.6; }
  50% { transform: scaleX(1); opacity: 1; }
}

@keyframes fire-border {
  to { --fire-angle: 360deg; }
}

@keyframes feature-fire {
  0%, 100% { opacity: 0.46; transform: scaleY(0.72); }
  50% { opacity: 0.95; transform: scaleY(1); }
}

@media (max-width: 620px) {
  .fire-field { opacity: 0.62; }
  .hero::after { opacity: 0.72; filter: blur(18px); }
  .fire-cursor { display: none; }
}

@media (hover: none) {
  .fire-cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fire-field { display: none; }
  .hero::after,
  .hero-scrim::after,
  .hero-art::after,
  .hero-title,
  .btn--primary,
  .nav-cta,
  .section-head h2::after,
  .card:hover::before,
  .feature::before,
  .workforce-release::before,
  .workforce-release::after,
  .token-stage .halo,
  .hero-title .grad,
  .section-head h2 .grad,
  .section-head h2 em {
    animation: none;
  }
  .fire-cursor,
  .fire-progress { display: none; }
  .workforce-release { transition: none; }
  .workforce-release:hover { transform: none; }
}
