/* =============================================
   LOGS DIGITAL — hero.css
   Hero section: video placeholder, cupola fallback,
   content overlay, scroll hint
   ============================================= */

/* ---- Hero wrapper ---- */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-cream); /* cream = next section colour, so no black edge ever shows */
}

/* ---- Media layer (video + fallback) ---- */
#hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* =============================================
   VIDEO ELEMENT

   Once you drop in site/assets/hero.mp4,
   the video will auto-show and the CSS fallback
   will hide via JS (see hero.js).

   The video is scroll-scrubbed:
   video.currentTime tracks scroll progress
   through the hero pin.
   ============================================= */
#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* fills edge-to-edge on all screen sizes */
  object-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  will-change: opacity;
  background: #000;
}

#hero-video.loaded {
  opacity: 1;
}

/* Bottom gradient handled by #hero-overlay (animated in by GSAP) */

/* ---- CSS Fallback (shown before video is provided) ---- */
#hero-fallback {
  position: absolute;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Star field */
.star-field {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 72% 8%,  rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 38% 65%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 45%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 90%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 91% 78%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 35%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 15%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 48% 52%, rgba(255,255,255,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 78% 62%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 22% 48%, rgba(255,255,255,0.3) 0%, transparent 100%);
}

/* Cupola window frame */
.cupola-frame {
  position: relative;
  z-index: 1;
  width: min(70vw, 70vh);
  height: min(70vw, 70vh);
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  box-shadow:
    0 0 0 16px #0f0f0f,
    0 0 0 32px #111111,
    0 0 0 48px #0a0a0a,
    0 0 80px 80px rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Planet through the window */
.cupola-window {
  width: 90%;
  height: 90%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

.planet {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 38% 35%,
      #d4a574 0%,
      #b88855 18%,
      #7a6040 35%,
      #4a7c8e 55%,
      #2a5a6e 72%,
      #0d2030 88%,
      #050e18 100%
    );
  animation: planet-rotate 120s linear infinite;
  will-change: transform;
}

/* Subtle atmospheric rim light */
.planet::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset -20px -20px 60px rgba(0,0,0,0.7),
              inset 8px 8px 30px rgba(255, 200, 120, 0.08);
}

@keyframes planet-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .planet { animation: none; }
}

/* Dark overlay on fallback for text readability */
#hero-fallback::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 20%,
    rgba(8, 8, 8, 0.5) 60%,
    rgba(8, 8, 8, 0.85) 100%
  );
  z-index: 2;
}

/* ---- Text contrast veil ---- */
/* Subtle left-side gradient so headline always pops over bright planet frames */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0, 0, 0, 0.52) 0%,
    rgba(0, 0, 0, 0.28) 42%,
    transparent 70%
  );
  z-index: 9;
  pointer-events: none;
}

/* ---- Brand mark: Logs Digital ---- */
/* Subtle nav-level label — not a focal point.
   JS places it centered in the window, scrolls to top-left. */
.hero-brand {
  position: absolute;
  top: 32px;
  left: clamp(32px, 5.5vw, 72px);
  z-index: 20;
  display: flex;
  align-items: center;
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
  pointer-events: none;
  will-change: transform;
}

.hero-brand .logo-dot {
  display: none;
}

/* ---- Bottom-left headline block ---- */
.hero-content {
  position: absolute;
  bottom: clamp(100px, 14vh, 160px); /* sits higher — not jammed to the bottom */
  left: clamp(32px, 5.5vw, 72px);   /* generous left breathing room */
  z-index: 15;
  max-width: min(760px, 88vw);
  will-change: opacity, transform;
}

/* Headline — refined, not oversized */
.hero-content h1 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  color: #ffffff;
  font-size: clamp(32px, 4.2vw, 62px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  /* soft glow so text lifts off the dark video */
  text-shadow:
    0 0 40px rgba(255, 255, 255, 0.22),
    0 0 80px rgba(255, 255, 255, 0.08);
}

/* Tagline — bar on top, text below (vertical stack) */
.hero-tagline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-dash {
  display: block;
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.40);
  flex-shrink: 0;
  font-size: 0;
}

.hero-tagline p {
  color: rgba(255, 255, 255, 0.52);
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: clamp(12px, 0.85vw, 14px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.01em;
  margin: 0;
}

/* ---- CTA — fixed to viewport, always visible ---- */
.btn-hero-cta {
  position: fixed;
  bottom: clamp(32px, 4.5vh, 52px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  text-decoration: none;
  white-space: nowrap;
}

/* Sliding-bubble pill */
.btn-cta-outer {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 48px;
  /* right padding makes room for the bubble at rest */
  padding: 4px 56px 4px 24px;
  background: #ffffff;
  border-radius: 100px;
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.10),
    0 0 24px rgba(255, 255, 255, 0.22),
    0 4px 20px rgba(0, 0, 0, 0.22);
  transition: padding 0.5s ease, box-shadow 0.22s ease;
}

/* On hover: bubble moves left, so text needs left padding */
.btn-hero-cta:hover .btn-cta-outer {
  padding: 4px 24px 4px 56px;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.16),
    0 0 36px rgba(255, 255, 255, 0.32),
    0 6px 28px rgba(0, 0, 0, 0.28);
}

/* "Get Started" text */
.btn-cta-text {
  position: relative;
  z-index: 10;
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #0a0a0a;
  letter-spacing: -0.01em;
  line-height: 1;
  transition: all 0.5s ease;
  white-space: nowrap;
}

/* Dark bubble — sits on right, slides to left on hover */
.btn-cta-arrow {
  position: absolute;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0a0a0a;
  color: #ffffff;
  flex-shrink: 0;
  transition: right 0.5s ease, transform 0.5s ease;
}

.btn-hero-cta:hover .btn-cta-arrow {
  right: calc(100% - 44px);
  transform: rotate(45deg);
}

/* ---- Scroll hint (bottom right) ---- */
.scroll-hint {
  position: absolute;
  bottom: clamp(40px, 5.5vh, 60px);
  right: clamp(32px, 5.5vw, 72px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Mouse silhouette SVG */
.mouse-icon {
  width: 28px;
  height: 44px;
  animation: mouse-fade 2.4s ease-in-out infinite;
}

/* Scroll wheel scrolls down inside the mouse */
.mouse-wheel {
  animation: wheel-scroll 2.4s ease-in-out infinite;
  transform-origin: center top;
}

@keyframes wheel-scroll {
  0%        { transform: translateY(0);   opacity: 1; }
  60%       { transform: translateY(9px); opacity: 0; }
  61%       { transform: translateY(0);   opacity: 0; }
  100%      { transform: translateY(0);   opacity: 1; }
}

@keyframes mouse-fade {
  0%, 100% { opacity: 0.75; }
  50%       { opacity: 1; }
}

.scroll-label {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Planet → cream transition overlay ---- */
/* Faded in by GSAP during last 25% of scroll.
   Fully opaque solid cream at bottom so the seam is invisible. */
#hero-overlay {
  position: absolute;
  inset: 0;
  /* extend 8px below the section to guarantee no gap at the seam */
  bottom: -8px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(221, 216, 196, 0.15) 30%,
    rgba(221, 216, 196, 0.70) 58%,
    rgba(221, 216, 196, 0.92) 78%,
    var(--bg-cream) 92%,
    var(--bg-cream) 100%
  );
  opacity: 0;
  z-index: 8;
  pointer-events: none;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
  /* Center headline vertically on mobile */
  .hero-content {
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 90vw;
  }

  .hero-content h1 {
    font-size: clamp(30px, 8.5vw, 46px);
    margin-bottom: 20px;
  }

  /* Center the tagline dash on mobile */
  .hero-tagline {
    align-items: center;
  }

  .hero-tagline p {
    font-size: 13px;
  }

  /* Keep brand top-left, nudge up closer to edge */
  .hero-brand {
    top: 16px;
    left: 24px;
    font-size: 17px;
  }

  .scroll-hint {
    display: none;
  }

  .btn-hero-cta {
    display: none;
  }

  /* Slightly smaller CTA button on small screens */
  .btn-cta-outer {
    height: 44px;
    padding: 4px 50px 4px 20px;
  }

  .btn-cta-text {
    font-size: 14px;
  }

  .btn-cta-arrow {
    width: 36px;
    height: 36px;
  }

  .cupola-frame {
    width: min(90vw, 90vh);
    height: min(90vw, 90vh);
  }
}
