/* ═══════════════════════════════════════════════
   HOME PAGE — Full-screen hero with Matrix rain
   ═══════════════════════════════════════════════ */

/* ── Matrix Rain Canvas ── */
#matrix-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.12;
}

/* ── Hero: full viewport, left-right split ── */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 0 var(--content-padding);
  max-width: var(--max-width);
  margin: 0 auto;
  gap: var(--space-8);
}

/* ── Left column: text ── */
.hero-left {
  flex: 1;
  min-width: 0;
  padding: var(--space-10) 0;
  z-index: 2;
}

/* Line 1 — status line with blinking cursor */
.hero-line1 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-wider);
  color: var(--color-accent-dim);
  margin-bottom: var(--space-5);
  white-space: nowrap;
  overflow: hidden;
}

.hero-line1__text {
  animation: flicker 3s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
  25%, 75% { opacity: 0.85; }
}

.hero-cursor {
  display: inline-block;
  color: var(--color-accent);
  animation: blink-cursor 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Line 2 — big typed title */
.hero-line2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 1.2;
  color: var(--color-accent);
  text-transform: uppercase;
  min-height: 3.6em;
  margin-bottom: var(--space-6);
  text-shadow:
    0 0 20px rgba(0, 255, 65, 0.3),
    0 0 60px rgba(0, 255, 65, 0.08);
}

/* Typed cursor inside JS-generated span */
.typed-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--color-accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink-cursor 0.8s step-end infinite;
}

/* Glow pulse after typing completes */
.hero-line2--glow {
  animation: text-glow 3s ease-in-out infinite;
}

@keyframes text-glow {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(0, 255, 65, 0.3),
      0 0 60px rgba(0, 255, 65, 0.08);
  }
  50% {
    text-shadow:
      0 0 30px rgba(0, 255, 65, 0.5),
      0 0 80px rgba(0, 255, 65, 0.15),
      0 0 120px rgba(0, 255, 65, 0.05);
  }
}

/* Line 3 — description */
.hero-line3 {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 520px;
}

/* ── Right column: photo ── */
.hero-right {
  flex: 0 0 45%;
  max-width: 550px;
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
}

.hero-photo-wrap {
  position: absolute;
  top: 0;
  right: -60px;
  bottom: 0;
  width: calc(100% + 60px);
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: brightness(0.75) contrast(1.1) saturate(0.4);
}

/* Edge fade overlay — four-sided linear gradients using page bg color */
.hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to right, #0a0a0a 0%, transparent 25%),
    linear-gradient(to left, #0a0a0a 0%, transparent 20%),
    linear-gradient(to bottom, #0a0a0a 0%, transparent 15%),
    linear-gradient(to top, #0a0a0a 0%, transparent 25%);
}

/* Subtle green tint overlay on photo */
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 60% 40%,
    rgba(0, 255, 65, 0.04) 0%,
    transparent 60%
  );
  pointer-events: none;
}

/* ── Explore section — card hover accents ── */
.home-explore .card {
  position: relative;
  overflow: hidden;
}

.home-explore .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}

.home-explore .card:hover::before {
  transform: scaleX(1);
}

.home-explore .card-icon {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
  opacity: 0.5;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    min-height: auto;
    padding-top: 0;
    padding-bottom: var(--space-8);
  }

  .hero-right {
    flex: none;
    width: 100%;
    max-width: none;
    height: auto;
    align-self: center;
    order: -1;
  }

  .hero-photo-wrap {
    position: relative;
    right: 0;
    width: 100%;
  }

  .hero-photo {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center center;
    mask-image: linear-gradient(
      to bottom,
      black 40%,
      rgba(0, 0, 0, 0.4) 75%,
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to bottom,
      black 40%,
      rgba(0, 0, 0, 0.4) 75%,
      transparent 100%
    );
  }

  .hero-left {
    padding: 0 0 var(--space-6);
    order: 1;
  }

  .hero-line2 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .hero-photo {
    max-height: 70vh;
  }
}
