/* HERO SECTION - MAIN LAYOUT SYSTEM */

/* Full-viewport hero container with flexible layout */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4rem 4rem 2rem;
  position: relative;
}

/* HERO CONTENT - PRIMARY INFORMATION DISPLAY */

/* Main content container with staggered animations */
.hero-content {
  text-align: left;
  max-width: 900px;
  margin-top: 6rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.2s forwards;
}

/* Primary heading styling */
.hero-content h1 {
  font-size: 4rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Descriptive paragraph with delayed entrance */
.hero-content p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 825px;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

/* TECHNOLOGY TAG LIST */

.hero-tech {
  list-style: none;
  margin: 1.75rem 0 0.9rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  max-width: 825px;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-tech li {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.hero-tech li + li::before {
  content: "";
  position: absolute;
  left: -0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 0.85rem;
  background-color: hsla(220, 9%, 46%, 0.4);
}

.hero-tech > li {
  cursor: default;
}

.hero-tech > li > span {
  transition: color 0.3s ease;
}

.hero-tech > li:hover > span,
.hero-tech > li:focus-within > span {
  color: var(--text-primary);
}

.hero-tech-sub {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 0.75rem 0 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 1.75rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.hero-tech > li:hover .hero-tech-sub,
.hero-tech > li:focus-within .hero-tech-sub {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-tech-sub li {
  font-size: 0.75rem;
}

.hero-tech-sub li + li::before {
  height: 0.75rem;
}

/* CALL-TO-ACTION LINK SYSTEM */

/* Primary CTA link with sophisticated hover effects */
.cta-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 4px;
  padding-top: 4px;
  display: inline-block;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1s forwards;
}

/* Gradient background effect - hidden by default */
.cta-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(238, 142, 78, 0.4) 50%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 0% 100%;
  opacity: 0;
  transition:
    background-size 0.5s ease,
    opacity 0.4s ease-out;
  z-index: -1;
}

/* Bottom border line - expands from center */
.cta-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: var(--accent-orange);
  opacity: 0;
  transition:
    width 0.3s ease,
    opacity 0.4s ease-out;
  transform: translateX(-50%);
}

/* Top border line using nested span pseudo-element */
.cta-link span::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: var(--accent-orange);
  opacity: 0;
  transition:
    width 0.3s ease,
    opacity 0.4s ease-out;
  transform: translateX(-50%);
}

/* CTA HOVER STATE ANIMATIONS */

/* Activate gradient background on hover */
.cta-link:hover::before {
  background-size: 100% 100%;
  opacity: 1;
}

/* Expand bottom border line */
.cta-link:hover::after {
  width: 100%;
  opacity: 1;
}

/* Expand top border line */
.cta-link:hover span::before {
  width: 100%;
  opacity: 1;
}

/* HERO NAVIGATION SYSTEM */

/* Navigation container positioned at bottom of hero */
.hero-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1s forwards;
}

/* Horizontal navigation list */
.hero-nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Vertical separator between every nav item */
.hero-nav-list li + li::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1rem;
  background-color: hsla(220, 9%, 46%, 0.6);
}

/* Navigation list item positioning context */
.hero-nav-list li {
  position: relative;
}

/* NAVIGATION LINK STYLING AND EFFECTS */

/* Base navigation link appearance */
.hero-nav-list a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 4px;
  padding-top: 4px;
  display: inline-block;
  z-index: 2;
}

/* Gradient background hover effect */
.hero-nav-list a::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -4px;
  right: -4px;
  bottom: -2px;
  background: linear-gradient(
    to left,
    rgba(238, 142, 78, 0.5),
    rgba(238, 142, 78, 0.3)
  );
  opacity: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
  z-index: -1;
  border-radius: 2px;
}

/* Left accent bar hover effect */
.hero-nav-list a::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -6px;
  width: 2px;
  bottom: -2px;
  background-color: rgba(238, 142, 78, 0.7);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
  border-radius: 1px;
}

/* NAVIGATION HOVER STATE ACTIVATIONS */

/* Activate left accent bar */
.hero-nav-list a:hover::after {
  opacity: 1;
}

/* Activate and expand gradient background */
.hero-nav-list a:hover::before {
  opacity: 1;
  transform: scaleX(1);
  transform-origin: left;
}

/* Maintain text color consistency on hover */
.hero-nav-list a:hover {
  color: var(--text-primary);
}

/* KRAKE.RUN NAV LINK */

.hero-nav-list .krake-nav-link {
  color: var(--text-primary);
  font-weight: 600;
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
}

.krake-nav-logo {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  position: relative;
  top: -1px;
}

/* Email link styling */
.email-link {
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-fast);
}

.email-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-orange);
  transition: width var(--transition-fast);
}

.email-link:hover {
  color: var(--accent-orange);
}

.email-link:hover::after {
  width: 100%;
}

/* MOBILE RESPONSIVE OVERRIDES */

@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 100dvh;
    padding: 2.5rem 2rem 1.5rem;
    align-items: center;
  }

  .hero-content {
    margin-top: 3rem;
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-content h1 {
    font-size: 2.75rem;
    line-height: 1.15;
  }

  .hero-content p {
    font-size: 1.05rem;
  }

  .hero-tech {
    gap: 0.5rem 1.25rem;
    margin: 1.25rem 0 0.75rem;
    justify-content: center;
  }

  .hero-tech li + li::before {
    display: none;
  }

  .hero-tech-sub {
    display: none;
  }

  .cta-link {
    margin-top: 1.5rem;
  }

  .hero-nav {
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    justify-content: center;
  }

  .hero-nav-list {
    gap: 1.25rem;
    flex-wrap: wrap;
    row-gap: 0.75rem;
    justify-content: center;
  }

  .hero-nav-list li + li::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 1.25rem 1.25rem;
  }

  .hero-content {
    margin-top: 1.5rem;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-tech {
    gap: 0.4rem 1rem;
  }

  .hero-tech li {
    font-size: 0.8rem;
  }

  .cta-link {
    font-size: 1.05rem;
    margin-top: 1.25rem;
  }

  .hero-nav-list {
    gap: 0.9rem;
  }

  .hero-nav-list a {
    font-size: 0.85rem;
  }
}
