/**
 * VALINA Hero V2 — Full-Width Terminal Edge
 * 
 * Combo B design: Edge glows + terminal context + unified top bar
 * Shared across all subpages. Requires valina.css design tokens.
 *
 * Version: 2.0.0
 */

/* ============================================
   HERO V2: FULL-WIDTH TERMINAL EDGE
============================================ */
.hero {
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 40px 20px 60px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

/* Edge glows removed from hero (KITT scanner lives on val-bar) */
.hero::before,
.hero::after {
  display: none;
}

/* ============================================
   TOP BAR: Fixed Sub-Navbar under val-bar
============================================ */
.hero-top-bar {
  position: fixed;
  top: var(--val-bar-height, 48px);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: transparent;
  z-index: 999;
}

/* Light bar moved to val-bar (top of page) */
.hero-top-bar::before {
  display: none;
}

/* Tagline (swapped from val-bar into sub-bar) */
.hero-top-bar::after {
  content: none;
  font-style: italic;
  font-size: 0.85rem;
  white-space: nowrap;
  background: linear-gradient(
    135deg,
    #f8fafc 0%,
    #8a69c7 30%,
    #22d3ee 60%,
    #f8fafc 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroTaglineShimmer 8s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(138, 105, 199, 0.3));
}
@keyframes heroTaglineShimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  height: 36px;
  background: none;
  border: none;
  border-radius: 0;
  color: rgba(248, 250, 252, 0.7);
  font-family: var(--font-heading, "Orbitron", sans-serif);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
  white-space: nowrap;
}
.hero-back-btn:hover {
  color: var(--val-cyan, #22d3ee);
  background: rgba(34, 211, 238, 0.04);
  box-shadow: none;
}
.hero-back-btn svg {
  width: 12px;
  height: 12px;
  transition: transform 0.3s;
}
.hero-back-btn:hover svg {
  transform: translateX(-3px);
}
/* Active indicator line — matches subnav-label pattern */
.hero-back-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--val-purple, #8a69c7),
    var(--val-cyan, #22d3ee)
  );
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 1px;
  pointer-events: none;
}
.hero-back-btn:hover::after {
  width: 70%;
}

/* Status dots moved to val-bar — hide per-page hero status */
.hero-status {
  display: none;
}
.hero-status-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--val-green, #10b981);
  box-shadow: 0 0 6px var(--val-green, #10b981);
  animation: heroStatusPulse 3s ease-in-out infinite;
}
@keyframes heroStatusPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* ============================================
   TERMINAL CONTEXT LINES (floating background)
============================================ */
.hero-term-context {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  text-align: left;
  pointer-events: none;
  z-index: 1;
}
.hero-term-line {
  font-family: "Courier New", "Fira Code", monospace;
  font-size: 0.7rem;
  color: var(--text-muted, #94a3b8);
  opacity: 0.25;
  margin-bottom: 3px;
  white-space: nowrap;
}
.hero-term-line .cmd {
  color: var(--val-cyan, #22d3ee);
  opacity: 0.5;
}
.hero-term-line .path {
  color: var(--val-purple, #8a69c7);
  opacity: 0.5;
}
.hero-term-line .ok {
  color: var(--val-green, #10b981);
  opacity: 0.5;
}

/* ============================================
   FULL-PAGE SCAN LINE
============================================ */
.hero-scan-line {
  position: fixed;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(34, 211, 238, 0.12),
    rgba(138, 105, 199, 0.08),
    rgba(34, 211, 238, 0.12),
    transparent
  );
  animation: heroScanLine 8s linear infinite;
  pointer-events: none;
  z-index: 998;
}
@keyframes heroScanLine {
  0% {
    top: 2px;
  }
  100% {
    top: 100vh;
  }
}

/* ============================================
   RADIAL GLOW BACKGROUND
============================================ */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(
    ellipse,
    rgba(138, 105, 199, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   HERO CONTENT (title, logo, tagline)
============================================ */
.hero .hero-title {
  font-size: clamp(2.5rem, 10vw, 5.5rem);
  position: relative;
  z-index: 4;
}
.hero .hero-tagline {
  margin-top: 18px;
  position: relative;
  z-index: 4;
}
.hero .hero-logo-wrap {
  display: none;
}

/* ============================================
   SUB-NAV: Quick-access Section Links
   Shows grouped dropdown links in hero-top-bar
============================================ */

/* Tagline stays visible on right when sub-nav is present */
.hero-top-bar.has-subnav::after {
  content: none;
}

/* Subnav now lives in the global hamburger drawer (val-bio-bar.js) */
.hero-top-bar.has-subnav {
  display: none;
}

.subnav {
  display: flex;
  align-items: center;
  gap: 0;
  height: 36px;
}

.subnav-group {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.subnav-label {
  background: none;
  border: none;
  color: rgba(248, 250, 252, 0.7);
  font-family: var(--font-heading, "Orbitron", sans-serif);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  position: relative;
}

.subnav-label:hover {
  color: var(--val-cyan, #22d3ee);
  background: rgba(34, 211, 238, 0.04);
}

/* Active indicator line */
.subnav-label::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--val-purple, #8a69c7),
    var(--val-cyan, #22d3ee)
  );
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 1px;
}
.subnav-group:hover .subnav-label::after {
  width: 70%;
}

/* Dropdown panel */
.subnav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 160px;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(138, 105, 199, 0.15);
  border-radius: 8px;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(138, 105, 199, 0.08);
  z-index: 1001;
}

.subnav-group:hover .subnav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.subnav-dropdown a {
  display: block;
  padding: 8px 18px;
  color: rgba(248, 250, 252, 0.7);
  font-family: var(--font-heading, "Orbitron", sans-serif);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.subnav-dropdown a:hover {
  color: var(--val-cyan, #22d3ee);
  background: rgba(34, 211, 238, 0.06);
  padding-left: 22px;
}

/* Subtle divider between dropdown items */
.subnav-dropdown a + a {
  border-top: 1px solid rgba(138, 105, 199, 0.06);
}

/* Mobile hamburger toggle */
.subnav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.subnav-mobile-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--val-cyan, #22d3ee);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Hamburger → X animation */
.subnav-mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}
.subnav-mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}
.subnav-mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
  .hero {
    padding: 30px 14px 40px;
  }
  .hero-term-context {
    display: none;
  }
  .hero-top-bar {
    padding: 6px 12px;
  }
  .hero-top-bar::after {
    font-size: 0.65rem;
  }
  .hero-back-btn {
    padding: 0 14px;
    font-size: 0.52rem;
    height: 32px;
  }

  /* Sub-nav now in global hamburger (val-bio-bar.js) — mobile overrides no longer needed */
}

@media (max-width: 480px) {
  .hero {
    padding: 24px 10px 30px;
  }
  .hero-top-bar::after {
    display: none;
  }
}
