/*——————————————————————————————————————————————
  1) Reset & Layout
——————————————————————————————————————————————*/
/* Ensure consistent box model and remove default margins/padding */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Define base color variables */
:root {
  --bg-color:     #fefefe;
  --text-color:   #111;
  --button-bg:    #111;
  --button-text:  #fff;
  --footer-color: #777;
}

/* Dark mode overrides using CSS custom properties */
body.dark-mode {
  --bg-color:     #111;
  --text-color:   #fefefe;
  --button-bg:    #fefefe;
  --button-text:  #111;
  --footer-color: #aaa;
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Base body styles */
body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Centered content container (optional) */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  padding: 2rem;
}

/* Hide old logo if still present in markup */
.logo {
  display: none;
}

/*——————————————————————————————————————————————
  2) Typography
——————————————————————————————————————————————*/
h1, h2 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
p {
  font-size: 1.1rem;
  opacity: 0.85;
}
.pride-text {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
}

/*——————————————————————————————————————————————
  3) Layout Sections
——————————————————————————————————————————————*/
header, section, footer {
  padding: 3rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
footer {
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--footer-color);
}
footer a {
  color: #F76C9C;
  text-decoration: none;
  font-weight: 600;
}
footer a:hover {
  text-decoration: underline;
}

/*——————————————————————————————————————————————
  4) Dark-mode toggle button
——————————————————————————————————————————————*/
#dark-mode-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 999;
  color: var(--text-color);
  transition: color 0.3s ease;
}

/*——————————————————————————————————————————————
  5) Call-to-action button
——————————————————————————————————————————————*/
.cta-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s ease, color 0.3s ease;
}
.cta-button:hover {
  background-color: #444;
}

/*——————————————————————————————————————————————
  6) Fade-in scroll animations
——————————————————————————————————————————————*/
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}
.visible {
  opacity: 1;
  transform: translateY(0);
}

/*——————————————————————————————————————————————
  7) Animated Meld Logo
——————————————————————————————————————————————*/
#logo-container {
  position: relative;
  width: 90vw;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  margin: 4rem auto 2rem;
  animation: fadeLogo 1.2s ease-out;
}

/* Central "core" orb */
#core {
  position: absolute;
  top: 20%;
  left: 20%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: linear-gradient(to bottom, #1A1C40 0%, #A88FD1 100%);
  z-index: 1;
}

/* Orbit paths */
.orbit-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: rotate-orbit 14s linear infinite;
}
.orbit1 { animation-delay: 0s; }
.orbit2 { animation-delay: -3.5s; transform: rotate(90deg); }
.orbit3 { animation-delay: -7s;   transform: rotate(180deg); }
.orbit4 { animation-delay: -10.5s; transform: rotate(270deg); }

/* Orbiting orbs */
.orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  margin-left: -240px; /* <-- Fixed offset for max 500px logo width */
  border-radius: 50%;
}

/* Orbit colors and trailing shadows */
.orbit1 .orb { --r: 247; --g: 108; --b: 156; }
.orbit2 .orb { --r: 255; --g: 235; --b: 45;  }
.orbit3 .orb { --r: 51;  --g: 92;  --b: 255; }
.orbit4 .orb { --r: 67;  --g: 178; --b: 143; }

.orbit1 .orb,
.orbit2 .orb,
.orbit3 .orb,
.orbit4 .orb {
  background: rgb(var(--r), var(--g), var(--b));
  box-shadow:
    0px 10px 6px rgba(var(--r), var(--g), var(--b), 0.2),
    0px 20px 12px rgba(var(--r), var(--g), var(--b), 0.15),
    0px 30px 18px rgba(var(--r), var(--g), var(--b), 0.1);
}

/* Orbit animation */
@keyframes rotate-orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Logo fade-in animation */
@keyframes fadeLogo {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/*——————————————————————————————————————————————
  8) Mobile Responsiveness (≤600px)
——————————————————————————————————————————————*/
@media (max-width: 600px) {
  #logo-container {
    width: 90vw;
    margin: 3rem auto 1rem;
  }

  .orb {
    margin-left: calc(-42vw); /* <-- Dynamic offset for small screens */
  }

  header, section, footer {
    padding: 2rem 1rem;
    text-align: center;
  }

  h1 {
    font-size: 1.5rem;
  }

  p {
    font-size: 1rem;
  }

  .cta-button {
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
  }
}