/* ==== FULLY RESPONSIVE BACKGROUND ==== */

/* New star background styles from clear2go */
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;  /* Prevents scroll if content overflows; adjust if needed */
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  gap: 1rem;                     /* space between elements */
  isolation: isolate;
}


/* ==== TOP-LEFT LOGO ==== */
.site-logo {
  position: fixed;     /* ← changed from absolute to fixed */
  top: 20px;
  left: 20px;
  z-index: 100;
}

.logo {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7)) brightness(1.3);
  transition: transform .25s;
}

.logo:hover { transform: scale(1.15); }

/* On very small mobile screens, make it a bit smaller so it doesn’t crowd */
@media (max-width: 480px) {
  .site-logo { top: 12px; left: 12px; }
  .logo { width: 58px; height: 58px; }
}


/* ==== TEXT & ICONS ==== */
h1 { font-size: 4rem; margin: 0; }
.slogan { font-size: 1.4rem; margin: .5rem 0 1.5rem; }

.social { 
  display: flex; 
  gap: 1.5rem; 
  margin: 1.5rem 0; 
}
.social a { 
  display: inline-block; 
  transition: transform .2s, filter .2s; 
}
.social a:hover { 
  transform: scale(1.15); 
  filter: brightness(1.3); 
}
.icon { 
  width: 48px; 
  height: 48px; 
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); 
}

#quote {
font-size: 1.6rem;
  line-height: 1.5;
  font-style: italic;
  text-align: center;
  max-width: 90vw;
  margin: 1.5rem auto;
  padding: 0 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  opacity: 1;
  transition: opacity 0.6s ease;   /* smooth fade */
  min-height: 3em;                /* prevent layout jump */
  display: flex;
  align-items: center;
  justify-content: center;

  @media (min-width: 768px) {
     #quote {
       font-size: 1.8rem;
       max-width: 85vw;
     }
  }

  @media (min-width: 1200px) {
     #quote {
       font-size: 2rem;
       max-width: 80vw;
     }
  }
}

#musicToggle {
  background: rgba(0, 0, 0, 0.75);
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  padding: 0.9rem 2rem;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 10;
  min-width: 140px;
  text-align: center;
}

#musicToggle:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

#musicToggle.playing {
  background: rgba(0, 0, 0, 0.75);   /* Crimson red when playing */
  border: 2px solid #FFFFFF;
}

#musicToggle.playing:hover {
  background: rgba(0, 0, 0, 0.75);
}

#stars-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;  /* Behind all content */
  width: 100%;
  height: 100%;
}

/* Spinning Graphic Styles */
.spinning-graphic {
  width: 50vw;              /* Responsive: 50% of viewport width */
  max-width: 600px;         /* Cap for large screens */
  min-width: 200px;         /* Minimum for small screens */
  height: auto;             /* Maintain aspect ratio */
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));  /* Matches your logo shadow */
  animation: spin var(--spin-duration) linear infinite;  /* Use variable for speed */
  transform-origin: center; /* Rotate from center */
}

/* Define the spin animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Variables for easy control (edit these) */
:root {
  --spin-duration: 10s;     /* Spin speed: time for one full rotation */
  --spin-direction: normal; /* Or 'reverse' for counterclockwise */
  /* Add more if needed, e.g., --spin-delay: 0s; and use in animation */
}

/* Media queries for finer responsiveness (optional) */
@media (max-width: 768px) {
  .spinning-graphic {
    width: 70vw;  /* Larger relative size on mobile */
  }
}

@media (min-width: 1200px) {
  .spinning-graphic {
    max-width: 800px;  /* Allow bigger on wide screens */
  }
}

/* Ensure canvas is behind everything */
#stars-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;                 /* Already there – keep it */
  pointer-events: none;        /* NEW: prevents canvas from blocking clicks */
}

/* Optional: make sure the hero itself establishes a stacking context */
.hero {
  position: relative;
  overflow: hidden;            /* Contains the absolute canvas */
}

/* New: Wrapper for centered content – fixes any flex interference from canvas */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;              /* Matches your existing gap */
  text-align: center;
  z-index: 1;             /* Ensures it's above canvas if needed */
  pointer-events: none;   /* Allows clicks to pass through empty space */
}

.hero-content > * {
  pointer-events: auto;    /* Re-enables clicks on button and links */
}
