/* ==================================================
   🌌 Google Fonts
================================================== */
@import url("https://fonts.googleapis.com/css2?family=Marcellus&family=Josefin+Sans:wght@300;400;600&display=swap");

/* ==================================================
   ✨ Global Reset & Base Styles
================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Josefin Sans", sans-serif;
  scroll-behavior: smooth;
}

body {
  color: white;
  text-align: center;
  z-index: 0;
}

.logo,
.main-text,
.glow-text {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================================================
   🌠 Background Layer
================================================== */
.background-layer {
  position: fixed;
  inset: 0;
  background: #1a1a2e; /* fallback solid color */
  background-image: url("../images/celestial-gateway.jpg"); /* JPG fallback */
  background-position: center center;
  background-size: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 1; /* start hidden for fade-in */
  transition: opacity 0.6s ease-in;
}
.background-layer.webp {
  background-image: url("../images/celestial-gateway.webp"); /* Use WebP if supported */
}

/* ==================================================
   🌌 Sticky Header
================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  z-index: 1000;
}

@media (max-width: 760px) {
  .header {
    padding: 10px 10px;
  }
}

/* ==================================================
   🌠 Logo
================================================== */
.logo {
  font-size: 26px;
  font-weight: 600;
  font-family: "Marcellus", serif;
  color: white;
  margin-left: 10px;
  text-decoration: none;
}

@media (max-width: 499px) {
  .logo {
    font-size: 22px;
  }
}

/* ==================================================
   🌙 Navigation - Wrapper
================================================== */
.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ==================================================
   🌙 Navigation - Desktop
================================================== */
.mobile-nav {
  display: none;
}

.desktop-nav {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: inline-block;
}

.nav-links a {
  color: white;
  font-size: 18px;
  text-decoration: none;
  font-weight: 300;
}

.desktop-nav a {
  position: relative;
  padding: 0 16px;
  border-radius: 30px;
  transition: all 0.3s ease-in-out;
  font-weight: 300;
  color: white;
  display: inline-flex;
  align-items: center;
  height: 40px;
  overflow: hidden;
}

.desktop-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  font-weight: 400;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: rgba(255, 182, 193, 0.15);
  opacity: 0;
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
  z-index: -1;
}

.desktop-nav a:hover::after {
  opacity: 1;
  transform: scale(1.06);
  box-shadow: 0 0 18px rgba(255, 182, 193, 0.5),
    0 0 8px rgba(201, 167, 235, 0.4);
}

/* ==================================================
   📱 Mobile Navigation
================================================== */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: white;
  z-index: 1002;
  position: relative;
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  transform: rotate(90deg);
}

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav {
    position: fixed;
    top: 50px;
    right: 0;
    width: 100vw;
    height: 100vw;
    padding: 40px 30px;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 16px 16px;
    box-shadow: inset -4px 0px 20px rgba(255, 255, 255, 0.05),
      -4px 0px 24px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease-in-out, opacity 0.3s ease-in-out;
  }

  .mobile-nav.active {
    display: flex;
    transform: translateX(0%);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav::before {
    content: none !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
  }

  .mobile-nav li {
    list-style: none;
  }

  .mobile-nav a {
    color: white;
    font-size: 20px;
    padding: 10px 20px;
    text-align: right;
    border-radius: 30px;
    position: relative;
    z-index: 1;
    display: inline-block;
    overflow: hidden;
    transition: color 0.3s ease-in-out;
  }

  .mobile-nav a:hover {
    font-weight: 400;
    color: white;
  }

  .mobile-nav a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 182, 193, 0.15);
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    z-index: -1;
  }

  .mobile-nav a:hover::after {
    opacity: 1;
    transform: scale(1.06);
    box-shadow: 0 0 18px rgba(255, 182, 193, 0.5),
      0 0 8px rgba(201, 167, 235, 0.4);
  }

  .hero {
    padding: 10px;
  }

  .hero-content {
    max-width: 95vw;
  }
}

/* ==================================================
   🌗 Theme Toggle Switch
================================================== */
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 30px;
  height: 30px;
  cursor: pointer;
  padding-left: clamp(10px, 2vw, 20px);
  padding-right: clamp(10px, 2vw, 20px);
}

.toggle-icon {
  width: clamp(22px, 3vw, 30px);
  height: clamp(22px, 3vw, 30px);
  justify-content: center;
  position: absolute;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  cursor: pointer;
}

.toggle-icon:hover {
  transform: scale(1.1);
}

body:not(.light-mode) #light-icon,
body.light-mode #dark-icon {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

/* ==================================================
   ✨ Hero Section & Content
================================================== */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 20px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(50, 50, 80, 0.6),
    rgba(80, 80, 120, 0.6)
  );
  z-index: 0;
  transition: background 0.5s ease-in-out;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 10px;
}

.hero-title {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 0;
}

.hero-title div {
  display: inline;
  align-items: center;
}

.hero-title h1 {
  margin-bottom: 0;
  line-height: 1.2;
}

.main-text {
  font-size: clamp(35px, 10vw, 45px);
  font-weight: 700;
  font-family: "Marcellus", serif;
  background: linear-gradient(90deg, #c9a7eb, #ffb6c1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 2;
  line-height: 1.2;
}

.glow-text {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(0);
  font-size: clamp(35px, 10vw, 45px);
  font-weight: 700;
  font-family: "Marcellus", serif;
  color: rgba(255, 255, 255, 0.6);
  filter: blur(8px);
  z-index: 1;
  pointer-events: none;
  width: 100%;
  line-height: 1.2;
}
/* ==================================================
   💬 Hero Subtitle Text
================================================== */
.hero p {
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 300;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 10px auto 20px;
  opacity: 0.9;
  line-height: 1.4;
  text-align: center;
}

.hero p.fade-in {
  opacity: 0;
  animation: fadeInUp 1.6s ease-in-out forwards;
}

.fade-in {
  font-size: 20px;
  margin: 20px 0;
  font-weight: 300;
  opacity: 0;
  animation: fadeInUp 0.8s ease-in-out forwards;
}

.fade-in.visible {
  opacity: 1;
}

/* ==================================================
   🚀 CTA Button
================================================== */
.cta-button {
  background: linear-gradient(135deg, #c9a7eb, #ffb6c1);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 18px;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-weight: 400;
  font-size: clamp(14px, 4vw, 16px);
  box-shadow: 0px 4px 12px rgba(201, 167, 235, 0.15);
  transition: transform 0.3s ease-in-out, background 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
  animation: pulse 2s infinite;
}

.cta-button:hover {
  transform: scale(1.03);
  background: linear-gradient(-135deg, #c9a7eb, #ffb6c1);
  box-shadow: 0px 6px 16px rgba(201, 167, 235, 0.25);
}

/* Arrow inside CTA */
.cta-button .cta-arrow {
  margin-left: 3px;
  transition: transform 0.3s ease-in-out;
  display: inline-block;
  color: white;
}

.cta-button:hover .cta-arrow {
  transform: translateX(5px);
}
/* ==================================================
   🪐 Floating Particle Background
================================================== */
.particles-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0.2;
  animation: floatParticles linear infinite;
}

/* ==================================================
   ✨ Animations - Keyframes
================================================== */
@keyframes pulse {
  0% {
    box-shadow: 0px 0px 10px rgba(201, 167, 235, 0.7);
  }
  50% {
    box-shadow: 0px 0px 20px rgba(201, 167, 235, 0.5);
  }
  100% {
    box-shadow: 0px 0px 10px rgba(201, 167, 235, 0.7);
  }
}
@keyframes etsy-pulse {
  0%, 100% {
    box-shadow: 0px 4px 16px rgba(255, 255, 255, 0.25),
                0px 0px 20px rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 0px 4px 20px rgba(255, 255, 255, 0.4),
                0px 0px 30px rgba(255, 255, 255, 0.2);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatParticles {
  0% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-30px) translateX(15px);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.2;
  }
}

@keyframes glow-pulse {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.4;
  }
  100% {
    transform: scale(1);
    opacity: 0.2;
  }
}

/* Apply Glow Pulse to Hover States */
.desktop-nav a:hover::after,
.mobile-nav a:hover::after {
  animation: glow-pulse 0.8s ease-in-out;
}
/* ==================================================
   📱 Responsive Padding Adjustments
================================================== */

/* ——— For screens ≤ 760px ——— */
@media (max-width: 760px) {
  .glow-text,
  .main-text {
    margin: 0;
    padding-inline: 127px !important;
  }

  .main-text h1 {
    padding-inline: 127px !important;
  }

  .main-text::after {
    display: none;
  }

  .hero p {
    padding-inline: 150px;
  }
}

/* ——— For screens ≤ 700px ——— */
@media (max-width: 700px) {
  .glow-text,
  .main-text {
    padding-inline: 97px !important;
  }

  .main-text h1 {
    padding-inline: 97px !important;
  }

  .hero p {
    padding-inline: 120px;
  }
}

/* ——— For screens ≤ 629px ——— */
@media (max-width: 629px) {
  .glow-text,
  .main-text {
    padding-inline: 65px !important;
  }

  .main-text h1 {
    padding-inline: 65px !important;
  }

  .hero p {
    padding-inline: 85px;
  }
}

/* ——— For screens ≤ 549px ——— */
@media (max-width: 549px) {
  .glow-text,
  .main-text {
    padding-inline: 40px !important;
  }

  .main-text h1 {
    padding-inline: 40px !important;
  }

  .hero p {
    padding-inline: 50px;
  }
}

/* ——— For screens ≤ 499px ——— */
@media (max-width: 499px) {
  .glow-text,
  .main-text {
    padding-inline: 0 !important;
  }

  .main-text h1 {
    padding-inline: 0 !important;
  }

  .hero p {
    padding-inline: 15px;
    margin: 5px auto 10px;
  }

  .mobile-nav {
    top: 40px;
  }

  .mobile-nav a {
    text-align: right;
  }
}
/* ==================================================
   🌑 Dark Mode Defaults (when .light-mode is NOT active)
================================================== */

body:not(.light-mode) .glow-text {
  display: none;
}

body:not(.light-mode) #light-icon,
body.light-mode #dark-icon {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

/* ==================================================
   🌞 Light Mode Overrides
   These styles only apply when body has class 'light-mode'
================================================== */

/* === Global === */

body.light-mode .background-layer {
  background-image: url("../images/celestial-gateway.jpg");
}

/* === Hero Section Overlay === */
body.light-mode .hero::before {
  background: rgba(255, 255, 255, 0.3);
}

/* === Hero Title & Glow === */
body.light-mode .hero-title h1 {
  margin-bottom: 0;
}

body.light-mode .main-text {
  background: linear-gradient(90deg, #8c6db3, #ff8fa3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-mode .main-text::after {
  content: attr(data-text);
  position: absolute;
  top: 6px;
  left: 6px;
  width: 100%;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.5);
  filter: blur(8px);
  z-index: 1;
  pointer-events: none;
  line-height: 1.2;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background: inherit;
}

/* === Hero Subtitle === */
body.light-mode .hero p {
  color: rgba(0, 0, 0, 0.8);
  line-height: 1.4;
}

/* === Desktop Navigation Hover === */
body.light-mode .desktop-nav a:hover::after {
  background: rgba(140, 109, 179, 0.2);
  box-shadow: 0 0 18px rgba(140, 109, 179, 0.4),
    0 0 8px rgba(255, 143, 163, 0.3);
}

/* === Mobile Nav === */
body.light-mode .mobile-nav {
  background: rgba(181, 165, 201, 0.4);
  box-shadow: -4px 0px 12px rgba(150, 150, 150, 0.1);
}

body.light-mode .mobile-nav a:hover::after {
  background: rgba(140, 109, 179, 0.2);
  box-shadow: 0 0 18px rgba(140, 109, 179, 0.4),
    0 0 8px rgba(255, 143, 163, 0.3);
}

/* === CTA Button === */
body.light-mode .cta-button {
  background: linear-gradient(135deg, #8c6db3, #ff8fa3);
  box-shadow: 0px 4px 12px rgba(255, 182, 193, 0.5);
  color: white;
}

body.light-mode .cta-button:hover {
  background: linear-gradient(-135deg, #8c6db3, #ff8fa3);
  box-shadow: 0px 4px 12px rgba(255, 182, 193, 0.5);
}

body.light-mode .cta-button:hover .cta-arrow {
  color: white;
}
/* ==================================================
   🛍️ Etsy Purchase Button - Fixed Position
================================================== */
.etsy-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #F56400; /* Etsy brand color */
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  border-radius: 50px;
 box-shadow: 0px 4px 16px rgba(255, 255, 255, 0.25),
            0px 0px 20px rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 999;
  animation: etsy-pulse 3s ease-in-out infinite;  /* ← ADD THIS LINE */
}

.etsy-button:hover {
  transform: translateY(-3px);
  box-shadow: 0px 6px 24px rgba(255, 255, 255, 0.7),
              0px 0px 35px rgba(255, 255, 255, 0.4);
  animation: none;
}

.etsy-icon {
  width: 20px;
  height: 20px;
}

/* Light Mode Support */
body.light-mode .etsy-button {
  box-shadow: 0px 4px 16px rgba(245, 100, 0, 0.35),
              0px 0px 20px rgba(255, 255, 255, 0.4);
}

body.light-mode .etsy-button:hover {
  box-shadow: 0px 6px 24px rgba(245, 100, 0, 0.45),
              0px 0px 35px rgba(255, 255, 255, 0.5);
}
/* Mobile adjustments */
@media (max-width: 760px) {
  .etsy-button {
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .etsy-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 499px) {
  .etsy-button {
    bottom: 15px;
    right: 15px;
    padding: 9px 14px;
    font-size: 13px;
  }
}
