/* =============================================
   HERO SECTION — PULSO DIGITAL
   ============================================= */

/* ---- Loading Screen — Liquid Logo ---- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  clip-path: inset(0 0 0% 0);
  will-change: clip-path;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Logo wrapper (holds ring + logo) ── */
.loader-liquid-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loaderFadeUp 0.25s ease both;
}

@keyframes loaderFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── Circular progress ring SVG ── */
.loader-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* ring starts at top (−90°) */
  transform: rotate(-90deg);
}

/* Track — faint grey background circle */
.loader-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 2;
}

/* Glow copy — blurred orange behind the progress arc */
.loader-ring-glow {
  fill: none;
  stroke: #fb3502;
  stroke-width: 5;
  stroke-linecap: round;
  /* circumference = 2π×118 ≈ 741.4 */
  stroke-dasharray: 741.4;
  stroke-dashoffset: 741.4;    /* starts empty — JS updates this */
  opacity: 0.25;
  filter: blur(6px);
  transition: stroke-dashoffset 0.1s linear;
}

/* Progress arc — sharp accent line */
.loader-ring-progress {
  fill: none;
  stroke: #fb3502;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 741.4;
  stroke-dashoffset: 741.4;    /* starts empty — JS drives it */
  transition: stroke-dashoffset 0.08s linear;
  filter: drop-shadow(0 0 4px rgba(251, 53, 2, 0.8));
}

/* The logo image — centered inside the ring */
.loader-liquid-logo {
  display: block;
  width: 160px;
  height: auto;
  position: relative;
  z-index: 1;
  filter: url(#liquid-filter);
  animation: liquidSettle 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
  user-select: none;
  pointer-events: none;
}

/* The liquid distortion animates scale from heavy → 0 */
@keyframes liquidSettle {
  0%   {
    filter: url(#liquid-filter);
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  20%  {
    opacity: 1;
    filter: url(#liquid-filter);
  }
  75%  {
    filter: url(#liquid-filter);
    transform: scale(1.01) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Rising wave overlay — masks the logo from bottom */
.loader-liquid-fill {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  /* restrict wave to logo area */
  border-radius: 50%;
}

.loader-fill-svg {
  position: absolute;
  bottom: -2px;
  left: -5%;
  width: 110%;
  height: 110%;
}

/* Wave rises from bottom then dissolves */
.loader-wave-path {
  fill: #000;
  animation: waveRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.02s forwards;
}

@keyframes waveRise {
  0%   { transform: translateY(0);      opacity: 1; }
  65%  { transform: translateY(-90px);  opacity: 1; }
  85%  { transform: translateY(-95px);  opacity: 0.6; }
  100% { transform: translateY(-100px); opacity: 0; }
}

/* ── Minimal progress line (hidden — ring replaces it) ── */
.loader-line { display: none; }
.loader-line-bar { display: none; }



/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 100px var(--space-xl) var(--space-5xl);
  text-align: center;
}

/* Background gradient orbs */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Three.js mesh waves canvas */
#hero-three-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.06;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #fb3502, transparent 70%);
  top: -100px;
  left: -100px;
  animation: floatY 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #fb3502, transparent 70%);
  bottom: 0;
  right: -80px;
  animation: floatY 10s ease-in-out 2s infinite reverse;
  opacity: 0.03;
}

/* Grid bg */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 20%, transparent 100%);
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: loadingPulse 2s ease infinite;
  box-shadow: 0 0 8px var(--accent);
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: var(--text-primary);
}

.hero-title .accent-word {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(var(--text-lg), 2.2vw, var(--text-xl));
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* Pulse SVG Animation */
.hero-pulse-container {
  width: min(600px, 90vw);
  height: 100px;
  margin: var(--space-md) 0;
  position: relative;
}

.hero-pulse-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-pulse-path {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(251, 53, 2, 0.7));
}

.hero-pulse-path-glow {
  stroke: var(--accent);
  stroke-width: 6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.15;
  filter: blur(4px);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: fadeIn 1s var(--ease-apple) 1.5s both;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
  animation: floatY 2s ease-in-out infinite;
}

/* Parallax wrapper */
.hero-parallax {
  will-change: transform, opacity;
  transition: none;
}

@media (max-width: 768px) {
  .hero {
    padding: 90px var(--space-md) var(--space-4xl);
    text-align: center;
    min-height: 100svh;   /* use svh to avoid mobile browser UI overlap */
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }
  .hero-actions .btn { width: 100%; max-width: 280px; }
  .hero-pulse-container { height: 70px; }
  .hero-scroll { display: none; }   /* hide scroll indicator on mobile */
}

/* ── Hero 3D Torus Knot canvas ── */
.hero-3d-canvas {
  width: 100%;
  height: 260px;
  position: relative;
  margin: 24px 0 8px;
  /* subtle radial glow underneath */
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(251,53,2,0.06) 0%, transparent 70%);
  border-radius: 16px;
  overflow: hidden;
}

.hero-3d-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 768px) {
  .hero-3d-canvas { height: 200px; }
}

@media (max-width: 480px) {
  .hero {
    padding: 80px var(--space-md) var(--space-3xl);
  }
  .hero-badge { font-size: 10px; padding: 6px 12px; }
  .hero-pulse-container { height: 55px; }
  .hero-3d-canvas { height: 160px; }
  .hero-actions .btn { max-width: 100%; }
}
