/* Columbia Transport — enhance layer v3 (BOLD: starfield+comete, aurora forte, tilt marcato) */

/* ── Starfield dietro tutto ── */
#bg-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
section, footer, nav.site { position: relative; z-index: 1; }

/* Sezioni trasparenti: lo spazio respira dietro */
section.stats    { background: linear-gradient(180deg, rgba(5,9,18,0) 0%, rgba(10,15,31,0.4) 100%); }
section.lanes    { background: rgba(10,15,31,0.35); }
section.services { background: transparent; }
section.cta      { background: transparent; }

/* ── Aurora hero: MARCATA ── */
.aurora {
  position: absolute;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 38% at 28% 60%, rgba(200,53,42,0.38), transparent 68%),
    radial-gradient(50% 42% at 74% 30%, rgba(79,195,247,0.30), transparent 68%),
    radial-gradient(36% 30% at 55% 78%, rgba(201,166,107,0.28), transparent 68%);
  filter: blur(70px) saturate(1.3);
  animation: aurora-drift 18s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  0%   { transform: translate3d(-6%, -3%, 0) rotate(0deg)  scale(1); }
  50%  { transform: translate3d( 5%,  4%, 0) rotate(6deg)  scale(1.15); }
  100% { transform: translate3d(-4%,  6%, 0) rotate(-5deg) scale(1.05); }
}

/* ── Headline: blur-reveal ── */
.headline .reveal-line {
  display: inline-block;
  opacity: 0;
  filter: blur(16px);
  transform: translateY(0.4em) scale(0.97);
  transition: opacity 1000ms cubic-bezier(.2,.7,.2,1),
              filter 1000ms cubic-bezier(.2,.7,.2,1),
              transform 1000ms cubic-bezier(.2,.7,.2,1);
}
.headline .reveal-line.in {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

/* ── Word-by-word reveal ── */
.wr .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.7em) rotateX(40deg);
  filter: blur(8px);
  transition: opacity 650ms cubic-bezier(.2,.7,.2,1),
              transform 650ms cubic-bezier(.2,.7,.2,1),
              filter 650ms cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i) * 80ms);
}
.wr.in .w {
  opacity: 1;
  transform: translateY(0) rotateX(0);
  filter: blur(0);
}
.section-header h2 { perspective: 600px; }

/* ── Eyebrow: linea che si disegna ── */
.section-header .eyebrow { position: relative; display: inline-block; padding-bottom: 0.7rem; }
.section-header .eyebrow::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  height: 1px; width: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: width 900ms cubic-bezier(.2,.7,.2,1) 200ms, left 900ms cubic-bezier(.2,.7,.2,1) 200ms;
}
.section-header.in .eyebrow::after { width: 160%; left: -30%; }

/* ── Stats: numeri teatrali ── */
.stat-item { position: relative; padding: 2rem 0.5rem; }
.stat-item .num {
  text-shadow: 0 0 30px rgba(201,166,107,0.4);
  animation: num-breathe 3.2s ease-in-out infinite;
}
.stat-item:nth-child(2) .num { animation-delay: 0.8s; }
.stat-item:nth-child(3) .num { animation-delay: 1.6s; }
.stat-item:nth-child(4) .num { animation-delay: 2.4s; }
@keyframes num-breathe {
  0%, 100% { text-shadow: 0 0 20px rgba(201,166,107,0.25); transform: translateY(0); }
  50%      { text-shadow: 0 0 60px rgba(201,166,107,0.75), 0 0 120px rgba(201,166,107,0.3); transform: translateY(-3px); }
}
.stat-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(201,166,107,0.45);
  box-shadow: 0 -8px 24px -6px rgba(201,166,107,0.35);
  transform: scaleX(0);
  transition: transform 1100ms cubic-bezier(.2,.7,.2,1);
}
section.stats.in .stat-item::before { transform: scaleX(1); }

/* ── Service cards: tilt marcato + bordo gradient animato ── */
.services-grid { perspective: 900px; }
.svc {
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
  transition: box-shadow 400ms ease, border-color 400ms ease, background 400ms ease;
}
.svc::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%),
              rgba(201,166,107,0.28), transparent 60%);
}
.svc:hover::before { opacity: 1; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.svc::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: 1px;
  background: conic-gradient(from var(--ang, 0deg),
      transparent 0%, var(--gold) 12%, transparent 26%,
      transparent 50%, rgba(79,195,247,0.8) 62%, transparent 76%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 300ms ease;
}
.svc:hover::after { opacity: 1; animation: border-spin 3s linear infinite; }
@keyframes border-spin { to { --ang: 360deg; } }
.svc:hover {
  box-shadow: 0 24px 60px -18px rgba(201,166,107,0.35);
}
.svc .icon-3d { transform: translateZ(46px); }
.svc h3 { transform: translateZ(30px); }
.svc .num, .svc p { transform: translateZ(16px); }

/* ── CTA: sheen + alone pulsante ── */
section.cta .btn { position: relative; overflow: hidden; }
section.cta .btn::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(232,208,161,0.5), transparent);
  transform: skewX(-20deg);
  animation: sheen 3.2s ease-in-out infinite;
}
@keyframes sheen {
  0%, 55% { left: -80%; }
  100%    { left: 130%; }
}
section.cta h2 em { text-shadow: 0 0 40px rgba(201,166,107,0.6); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .aurora, .stat-item .num, section.cta .btn::after, .svc:hover::after { animation: none; }
  .wr .w, .headline .reveal-line { transition: none; opacity: 1; transform: none; filter: none; }
  #bg-stars { display: none; }
}
@media (max-width: 900px) {
  .aurora { filter: blur(46px) saturate(1.2); }
}
