/* ========================================
   ONCE HUMAN PRE-LANDER — style.css
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: hsl(210, 20%, 6%);
  --fg: hsl(180, 10%, 92%);
  --card: hsl(210, 18%, 10%);
  --border: hsl(210, 15%, 18%);
  --muted: hsl(210, 15%, 14%);
  --muted-fg: hsl(210, 10%, 55%);
  --primary: hsl(174, 72%, 52%);
  --primary-fg: hsl(210, 20%, 6%);
  --secondary: hsl(348, 80%, 52%);
  --secondary-fg: hsl(0, 0%, 100%);
  --glow-primary: 0 0 30px hsla(174, 72%, 52%, 0.4);
  --glow-secondary: 0 0 30px hsla(348, 80%, 52%, 0.4);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
}
.popup .section-title {
  margin-bottom: 1rem;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}
.popup .features__grid {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* --- Animations --- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px hsla(174, 72%, 52%, 0.3); }
  50% { box-shadow: 0 0 40px hsla(174, 72%, 52%, 0.6); }
}

@keyframes bounce-scroll {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animate-on-scroll elements */
[data-anim] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-anim].visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- CTA Button --- */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 1rem 2rem;
  border-radius: 4px;
  font-size: 0.875rem;
  animation: pulse-glow 2s ease-in-out infinite;
  transition: transform 0.2s, filter 0.2s;
  cursor: pointer;
}
.cta-button:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}
.cta-button:active { transform: scale(0.97); }
.cta-button__icon { width: 2rem; height: 2rem; object-fit: contain; }
.cta-button--large {
  padding: 1.25rem 2.5rem;
  font-size: 1.1rem;
}

/* ====== HERO ====== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, hsla(210, 20%, 6%, 0.6) 50%, var(--bg) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1rem 2rem;
}

.hero__logo {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  width: clamp(6rem, 10vw, 9rem);
  z-index: 3;
  filter: drop-shadow(0 4px 30px rgba(0,0,0,0.5));
  opacity: 0;
  transform: translateY(-30px);
  animation: fade-up 0.8s ease forwards;
}

.hero__season {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: hsla(180, 10%, 92%, 0.7);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fade-up 0.8s 0.4s ease forwards;
}

.hero__title {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 900;
  text-shadow: var(--glow-primary);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fade-up 0.6s 0.6s ease forwards;
}

.hero__subtitle {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: var(--muted-fg);
  max-width: 32rem;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fade-up 0.6s 0.9s ease forwards;
}

.hero__content .cta-button {
  opacity: 0;
  animation: fade-up 0.5s 1.2s ease forwards, pulse-glow 2s 1.7s ease-in-out infinite;
}

.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce-scroll 1.5s infinite;
}

.hero__scroll-track {
  width: 1.25rem;
  height: 2rem;
  border-radius: 999px;
  border: 2px solid hsla(174, 72%, 52%, 0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.25rem;
}

.hero__scroll-dot {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}

/* ====== FEATURES ====== */
.features {
  padding: 5rem 0;
  background: var(--bg);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.3s;
}
.feature-card:hover {
  border-color: hsla(174, 72%, 52%, 0.5);
}

.feature-card__icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.5rem;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feature-card p {
  font-size: 0.8rem;
  color: var(--muted-fg);
  line-height: 1.4;
}

/* ====== GALLERY ====== */
.gallery {
  padding: 5rem 0;
  background: hsla(210, 15%, 14%, 0.3);
  overflow: hidden;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.gallery__item img {
  width: 100%;
  height: 16rem;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery__item:hover img {
  transform: scale(1.1);
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: hsla(210, 20%, 6%, 0.4);
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery__item:hover::after { opacity: 1; }

/* ====== FINAL CTA ====== */
.final-cta {
  position: relative;
  padding: 6rem 1rem;
  text-align: center;
  overflow: hidden;
}

.final-cta__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.final-cta__overlay {
  position: absolute;
  inset: 0;
  background: hsla(210, 20%, 6%, 0.8);
  backdrop-filter: blur(6px);
}

.final-cta__content {
  position: relative;
  z-index: 2;
}

.final-cta__text {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted-fg);
  max-width: 28rem;
  margin: -1.5rem auto 2.5rem;
}

/* ====== POPUP ====== */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: hsla(210, 20%, 6%, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  max-width: 620px;
  width: 90%;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s ease;
}
.popup-overlay.active .popup {
  transform: scale(1) translateY(0);
}

.popup__close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted-fg);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.popup__close:hover {
  color: var(--primary);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 640px) {
  .features__grid { grid-template-columns: 1fr 1fr; }
  .gallery__grid { grid-template-columns: 1fr; }
  .gallery__item img { height: 12rem; }
  .popup { padding: 1.5rem 1rem; }
  .popup .features__grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .features__grid { grid-template-columns: 1fr; }
}
