/* ═══ HERO + 3D MacBook (Spline Runtime) ═══════════════════════════════════
   Sticky hero with Spline 3D scene filling the viewport.
   Text overlays with gradient for readability, fades out on scroll.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hero Section ────────────────────────────────────────────────────── */
#hero {
  height: 280vh;
  position: relative;
  background: #000;
}

.hero-pin {
  position: sticky;
  top: 0;
  height: 100vh;
}

/* ── Background ────────────────────────────────────────────────────────── */
.hero-bg-circles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.hero-bg-circle:nth-child(1) {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: radial-gradient(
    ellipse,
    rgba(124, 147, 195, 0.05) 0%,
    transparent 70%
  );
}

.hero-bg-circle:nth-child(2) {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -80px;
  background: radial-gradient(
    ellipse,
    rgba(107, 138, 219, 0.04) 0%,
    transparent 70%
  );
}

.hero-bg-circle:nth-child(3) {
  width: 400px;
  height: 400px;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse,
    rgba(124, 147, 195, 0.03) 0%,
    transparent 70%
  );
}

/* ── Text-readability gradient over 3D scene ──────────────────────────── */
.hero-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 65%;
  z-index: 8;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.6) 40%,
    rgba(0, 0, 0, 0.15) 75%,
    transparent 100%
  );
  pointer-events: none;
}

/* ── Hero Content (text) ───────────────────────────────────────────────── */
.hero-content {
  position: absolute;
  top: 80px; /* Clear fixed nav (60px) + breathing room */
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  opacity: 1;
  pointer-events: none; /* Let mouse events pass through to 3D scene */
}

/* Keep buttons/links clickable above the 3D scene */
.hero-content a,
.hero-content button {
  pointer-events: auto;
}

.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(91, 185, 139, 0.07);
  border: 1px solid rgba(91, 185, 139, 0.2);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--green);
  margin-bottom: 24px;
}

.avail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse-dot 2.2s ease-in-out infinite;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 20px;
}

h1.hero-hl {
  font-family: var(--ff-serif);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-hl-line1 {
  display: block;
  background: linear-gradient(
    135deg,
    var(--text) 0%,
    var(--text) 50%,
    var(--text2) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-hl-tw {
  display: block;
  font-style: italic;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.cursor-blink {
  display: inline-block;
  width: 3px;
  height: 0.75em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

.hero-sub {
  color: var(--text2);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.hero-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text4);
  margin-top: 14px;
  letter-spacing: 0.03em;
}

/* ── Spline 3D (Runtime API canvas) ───────────────────────────────────── */
.hero-laptop {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
}

#laptopCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #hero {
    height: auto;
    min-height: 100vh;
  }

  .hero-pin {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
  }

  .hero-content {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    opacity: 1 !important;
    transform: none !important;
  }

  #laptopCanvas {
    display: none;
  }

  .hero-laptop {
    position: relative;
    inset: auto;
    width: 90%;
    height: 250px;
    background: #0a0a0a;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin: 20px auto 0;
  }

  .hero-laptop::after {
    content: "n8n Workflow Preview";
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text4);
  }
}

/* ── Reduced Motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #hero {
    height: auto;
    min-height: 100vh;
  }

  .hero-pin {
    position: relative;
  }

  .hero-content {
    opacity: 1 !important;
    transform: none !important;
  }
}
