/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  width: 100%;
  min-height: 90vh;
  background: var(--dark);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Animated gradient mesh — Anglesey teal/slate tones */
.hero-bg-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 60% at 75% 40%, rgba(161, 194, 189, 0.13) 0%, transparent 70%),
    radial-gradient(ellipse 45% 55% at 15% 65%, rgba(112, 137, 147, 0.09) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 50% 5%,  rgba(15, 98, 254, 0.06)   0%, transparent 60%);
  animation: meshPulse 12s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes meshPulse {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.06); }
}

/* ── Layout ─────────────────────────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(5rem, 10vh, 8rem) clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* ── Left: Text ─────────────────────────────────────────────── */
.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(161, 194, 189, 0.75);
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-size: clamp(2.8rem, 4.8vw, 4.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 0 0 1.5rem 0;
}

.hero-headline-bold {
  font-weight: 800;
  display: block;
}

.hero-subtext {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.75;
  margin: 0 0 2.5rem 0;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s;
}

.hero-link:hover {
  color: var(--white);
}

/* ── Right: Tech badges ─────────────────────────────────────── */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  max-width: 400px;
}

.hero-tech-stack span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: badgeFadeIn 0.5s ease forwards;
  transition: background 0.2s, color 0.2s;
}

.hero-tech-stack span:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* Staggered fade-in for each badge */
.hero-tech-stack span:nth-child(1)  { animation-delay: 0.3s; }
.hero-tech-stack span:nth-child(2)  { animation-delay: 0.45s; }
.hero-tech-stack span:nth-child(3)  { animation-delay: 0.6s; }
.hero-tech-stack span:nth-child(4)  { animation-delay: 0.75s; }
.hero-tech-stack span:nth-child(5)  { animation-delay: 0.9s; }
.hero-tech-stack span:nth-child(6)  { animation-delay: 1.05s; }
.hero-tech-stack span:nth-child(7)  { animation-delay: 1.2s; }
.hero-tech-stack span:nth-child(8)  { animation-delay: 1.35s; }
.hero-tech-stack span:nth-child(9)  { animation-delay: 1.5s; }
.hero-tech-stack span:nth-child(10) { animation-delay: 1.65s; }

@keyframes badgeFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll hint ────────────────────────────────────────────── */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  z-index: 10;
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.9; }
}

/* ── Buttons (used site-wide) ───────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 0.95rem 2.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  border: none;
  cursor: pointer;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(15, 98, 254, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  padding: 0.95rem 2.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: background 0.25s, color 0.25s, transform 0.2s;
  cursor: pointer;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--dark);
  transform: translateY(-2px);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .hero-tech-stack {
    max-width: 100%;
  }

  .hero-scroll-hint {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 100svh;
    align-items: flex-end;
    padding-bottom: 3rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 0;
    padding: clamp(6rem, 14vw, 8rem) clamp(1.5rem, 5vw, 2rem) 0;
    align-items: flex-end;
  }

  /* Hide the tech badge cloud on small screens — too much clutter */
  .hero-visual {
    display: none;
  }

  .hero-text {
    padding-bottom: 0;
  }

  .hero-headline {
    font-size: clamp(2.8rem, 11vw, 4rem);
    letter-spacing: -2px;
    margin-bottom: 1rem;
  }

  .hero-subtext {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .hero-actions .btn-primary {
    text-align: center;
  }

  .hero-eyebrow {
    margin-bottom: 1rem;
  }
}

@media (max-width: 400px) {
  .hero-headline {
    font-size: clamp(2.4rem, 12vw, 3rem);
  }
}
