/* ===================================================
   Namibian Magic — Promotional Site Styles
   =================================================== */

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

:root {
  /* Warm Namibian palette */
  --clr-sand: #f5c77e;
  --clr-amber: #e6942b;
  --clr-rust: #c04e24;
  --clr-deep-rust: #8b2c14;
  --clr-night: #0d0b14;
  --clr-night-mid: #161225;
  --clr-night-light: #1f1a33;
  --clr-violet: #7b4dff;
  --clr-violet-muted: #5a3ab3;
  --clr-white: #f8f4ef;
  --clr-white-pure: #ffffff;
  --clr-gray: #b0a8c0;
  --clr-glass: rgba(255, 255, 255, 0.06);
  --clr-glass-border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body: 'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;

  /* Transitions */
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--ff-body);
  background: var(--clr-night);
  color: var(--clr-white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---- Particle Canvas ---- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---- Navigation ---- */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: var(--space-sm) 0;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#main-nav.scrolled {
  background: rgba(13, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.nav-logo {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--clr-sand);
  letter-spacing: 0.02em;
  transition: opacity 0.3s;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-gray);
  transition: color 0.3s;
  letter-spacing: 0.02em;
}

.nav-links a:hover {
  color: var(--clr-white);
}

.nav-cta {
  background: linear-gradient(135deg, var(--clr-amber), var(--clr-rust));
  color: var(--clr-white-pure) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-weight: 600 !important;
  transition: transform 0.3s var(--ease-out-quad), box-shadow 0.3s !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192, 78, 36, 0.4);
}

/* ---- Hero ---- */
#hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(192, 78, 36, 0.25), transparent),
    radial-gradient(ellipse 60% 50% at 70% 70%, rgba(123, 77, 255, 0.15), transparent),
    linear-gradient(180deg, var(--clr-night) 0%, #1a0f0a 50%, var(--clr-night) 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-conic-gradient(rgba(245, 199, 126, 0.02) 0% 25%, transparent 0% 50%) 50% / 60px 60px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-pre-title {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--clr-sand);
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 900;
  line-height: 1;
  color: var(--clr-white);
  margin-bottom: var(--space-md);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero-accent {
  background: linear-gradient(135deg, var(--clr-sand), var(--clr-amber), var(--clr-rust));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--clr-gray);
  max-width: 500px;
  margin: 0 auto var(--space-lg);
  font-weight: 300;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--clr-amber), var(--clr-rust));
  color: var(--clr-white-pure);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.9rem 2.4rem;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out-quad), box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.hero-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--clr-rust), var(--clr-deep-rust));
  opacity: 0;
  transition: opacity 0.3s;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(192, 78, 36, 0.5);
}

.hero-btn:hover::before {
  opacity: 1;
}

.hero-btn span,
.hero-btn .btn-icon {
  position: relative;
  z-index: 1;
}

.btn-icon {
  font-size: 1.2rem;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-scroll-indicator span {
  display: block;
  width: 24px;
  height: 38px;
  border-radius: 12px;
  border: 2px solid rgba(245, 199, 126, 0.4);
  position: relative;
}

.hero-scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--clr-sand);
  border-radius: 4px;
  animation: scrollDot 2s infinite;
}

@keyframes scrollDot {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---- Animations ---- */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s var(--ease-out-expo) forwards;
}

.delay-1 {
  animation-delay: 0.15s;
}

.delay-2 {
  animation-delay: 0.3s;
}

.delay-3 {
  animation-delay: 0.45s;
}

.delay-4 {
  animation-delay: 0.6s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Section Shared ---- */
section {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) 0;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-amber);
  margin-bottom: var(--space-xs);
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--clr-gray);
  max-width: 560px;
  margin-bottom: var(--space-lg);
  font-weight: 300;
}

/* ---- About Section ---- */
#about {
  background: linear-gradient(180deg, var(--clr-night) 0%, var(--clr-night-mid) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.about-card {
  background: var(--clr-glass);
  border: 1px solid var(--clr-glass-border);
  border-radius: 20px;
  padding: var(--space-lg) var(--space-md);
  transition: transform 0.4s var(--ease-out-quad), box-shadow 0.4s;
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.about-icon {
  font-size: 2.2rem;
  margin-bottom: var(--space-sm);
}

.about-card h3 {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
  color: var(--clr-sand);
}

.about-card p {
  color: var(--clr-gray);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ---- Music Section ---- */
#music {
  background: var(--clr-night-mid);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

#music .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#music .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.songs-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.song-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.song-item-body {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.song-item-body .player-wrapper {
  flex: 1;
  min-width: 0;
}

.song-item-body .poster-wrapper {
  flex-shrink: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ---- Poster thumbnail button ---- */
.poster-btn {
  position: relative;
  display: block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  /* give it a subtle glow border */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.3s var(--ease-out-quad), box-shadow 0.3s;
}

.poster-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(245, 199, 126, 0.3);
}

.song-item-body .poster-image {
  width: 160px;
  display: block;
  border-radius: 12px;
}

.poster-zoom-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.4rem 0.4rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  color: var(--clr-white);
  font-size: 0.72rem;
  font-family: var(--ff-body);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.poster-btn:hover .poster-zoom-hint {
  opacity: 1;
}

/* On mobile: poster drops below player and fills container width */
@media (max-width: 700px) {
  .song-item-body {
    flex-direction: column;
  }

  .poster-btn,
  .song-item-body .poster-image {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
  }

  .poster-zoom-hint {
    opacity: 1;
    /* always visible on touch devices */
  }
}

.song-title {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-sand);
  letter-spacing: 0.02em;
  text-align: left;
  padding-left: 0.25rem;
}

.player-wrapper {
  display: flex;
  justify-content: center;
  padding: var(--space-md);
  background: var(--clr-glass);
  border: 1px solid var(--clr-glass-border);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.player-wrapper iframe {
  border-radius: 16px;
  max-width: 100%;
}

/* ---- Footer ---- */
#main-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--clr-glass-border);
  padding: var(--space-md) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-logo {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--clr-sand);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--clr-gray);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links {
    gap: var(--space-sm);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .form-group {
    flex-direction: column;
  }

  .signup-card {
    padding: var(--space-lg) var(--space-md);
  }

  .player-wrapper {
    padding: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .nav-links li:not(:last-child) {
    display: none;
  }

  .hero-title {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out-quad);
  pointer-events: none;
}

.lightbox:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.lightbox[hidden] {
  /* override browser 'display:none' so the fade-out still plays */
  display: flex !important;
  visibility: hidden;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 12, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 500px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.92);
  transition: transform 0.35s var(--ease-out-expo);
}

.lightbox:not([hidden]) .lightbox-content {
  transform: scale(1);
}

.lightbox-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--clr-night-light);
  color: var(--clr-white);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.lightbox-close:hover {
  background: var(--clr-rust);
  transform: scale(1.1);
}