/* ==========================================
   1. FONTS & BASIC RESET
   ========================================== */
@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&family=Inter:wght@400;600;700&family=Bilbo:wght@400;700&family=Tangerine:wght@400;700&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  color: #f5f6fa;
  background-color: #050505;

  /* Safe split background declaration */
  background-image: linear-gradient(-45deg, #000000, #25040d, #000000, #25040d);
  background-size: 400% 400%;
  animation: ambientShift 15s ease infinite;
}

/* Keyframes placed safely outside all CSS selectors */
@keyframes ambientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ==========================================
   2. HERO HEADER SECTION
   ========================================== */
.hero {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: auto; /* Strictly lock to 100% viewport height */
  min-height: 100vh;
  max-height: none; /* Hard cap to eliminate vertical scrolling */

  background-image: url("../Images/RoundPhoenix_New_Large.webp");
  background-position: 10% center;
  background-repeat: no-repeat;
  background-size: 55% auto;

  box-sizing: border-box;
  position: relative;
}

/* Top-Right Ko-fi Button */
.header-kofi-button {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  z-index: 10;
}

.header-kofi-button .kofi-button {
  font-size: 0.85rem !important;
  padding: 6px 14px !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.header-kofi-button .kofi-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233, 22, 106, 0.35);
}

.hero-overlay {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-right: 5%;
}

.text-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  text-align: center;
  margin-left: 5%;
}

.subtitle,
.tech-tag,
.mission-inline,
h1 {
  position: static;
  width: 100%;
  margin: 0;
}

/* Main Title */
h1 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 0.75rem;
  color: #f72585;
  text-shadow:
    0px 3px 6px rgba(0, 0, 0, 0.85),
    0px 0px 12px rgba(0, 0, 0, 0.65),
    0px 0px 10px #d4af37;
}

/* Subtitle */
.subtitle {
  font-family: "Lucida Calligraphy", "Apple Chancery", cursive;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: normal;
  color: #fcfaf2;
  text-shadow:
    0px 1px 2px rgba(0, 0, 0, 0.75),
    0px 0px 3px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

/* Quote Text */
.mission-inline {
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  color: #f16aa0;
  text-shadow:
    0px 2px 4px rgba(0, 0, 0, 0.95),
    0px 0px 6px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  margin-bottom: 10px;
}

/* Technical Tagline */
.tech-tag {
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  letter-spacing: 2px;
  font-weight: 600;
  color: #fcfaf2;
  text-shadow:
    0px 2px 4px rgba(0, 0, 0, 0.95),
    0px 0px 8px rgba(0, 0, 0, 0.9),
    0px 0px 14px rgba(0, 0, 0, 0.8);
  max-width: 70%;
  white-space: normal;
  text-align: center;
}

/* Section Divider */
.section-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 40px 0;
}

/* ==========================================
   3. EXPANSION CONTAINER & FEATURED MEDIA
   ========================================== */
.expansion-container {
  max-width: 1700px;
  width: 90%;
  margin: 20px auto 60px auto;
  padding: 0 40px;
  box-sizing: border-box;
}

.expansion-title {
  font-family: "Lucida Calligraphy", "Apple Chancery", cursive;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: normal;
  color: #f72585;
  margin-bottom: 2rem;
  text-shadow:
    1px 1px 2px rgba(0, 0, 0, 1),
    0 0 8px #d4af37;
  text-align: center;
}

/* Responsive Media Grid */
.media-grid {
  display: grid !important;
  gap: 60px;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}

/* Base Card Styles */
.media-card {
  background-color: rgba(20, 20, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  width: 100%;
}

.media-card h3 {
  font-family: "Inter", sans-serif;
  color: #d4af37;
  font-size: 1.5rem;
  text-shadow:
    1px 1px 2px rgba(0, 0, 0, 1),
    0 0 6px #f9bed5;
  margin-bottom: 12px;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000000;
  border-radius: 4px;
  display: block;
}

.grid-image {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
}

.media-caption {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: #ffffff;
  line-height: 1.5;
  letter-spacing: 0.5px;
  margin: 15px 0 0 0;
}

/* Synthesizer & Pillar Formatting */
.synthesizer-block {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #d4af37;
}

.right-col .pillar-box {
  margin-bottom: 1.25rem;
}

.right-col .pillar-box:last-child {
  margin-bottom: 0;
}

/* ==========================================
   4. VIDEO CAROUSEL DECK
   ========================================== */
.carousel-card-wrapper {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}

.single-card-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  width: 100%;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.single-card-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
}

.carousel-card-wrapper .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #d4af37;
  border: 1px solid #d4af37;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-card-wrapper .carousel-btn:hover {
  background: #f72585;
  color: #ffffff;
  border-color: #ca075f;
  box-shadow: 0 0 15px rgba(247, 37, 133, 0.6);
}

.carousel-card-wrapper .prev-btn {
  left: 8px;
}

.carousel-card-wrapper .next-btn {
  right: 8px;
}

/* Comments Title */
.comments-title {
  font-family: "Inter", sans-serif;
  font-size: 1.5rem;
  color: #e9166a;
  text-align: center;
  margin-bottom: 24px;
}

/* ==========================================
   5. SITE FOOTER STYLING
   ========================================== */
.site-footer {
  width: 100%;
  background-color: #000000;
  border-top: 3px solid #d4af37;
  padding: 30px 20px;
  margin-top: 60px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Row 1: Text Links */
.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-link {
  font-family: "Inter", sans-serif;
  font-size: 10pt;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #e9166a;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: #f5f6fa;
  text-shadow: 0 0 8px rgba(245, 246, 250, 0.4);
}

/* Row 2: Community Buttons (Centered Below Links) */
.footer-community-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
}

/* Shared Button Styles */
.forum-btn,
.discord-btn {
  display: inline-flex;
  align-items: center;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: none !important;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.3s ease;
  vertical-align: middle;
}

/* Forum Button Specifics */
.forum-btn {
  color: #ffffff;
  background-color: #ea2a6f;
  border: 1px solid #ea2a6f;
}

.forum-btn:hover {
  color: #000000;
  background-color: #f5f6fa;
  border-color: #f5f6fa;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(245, 246, 250, 0.4);
}

/* Discord Button Specifics */
.discord-btn {
  gap: 8px;
  color: #ffffff;
  background-color: #5865f2;
  border: 1px solid #5865f2;
}

.discord-btn:hover {
  background-color: #ea2a6f;
  border-color: #ea2a6f;
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.discord-icon {
  display: inline-block;
  vertical-align: middle;
}

/* Footer 3-Column Copyright Row */
.footer-copyright-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 15px;
  box-sizing: border-box;
}

.copyright-text {
  font-family: "Inter", sans-serif;
  font-size: 10pt;
  color: #b3afaf;
  letter-spacing: 0.5px;
  text-align: center;
  margin: 0;
}
/* ==========================================
   6. RESPONSIVE MOBILE STYLES
   ========================================== */
@media (max-width: 768px) {
  /* Restores image and lets hero expand naturally on phone screens */
  .hero {
    height: auto;
    min-height: auto;
    max-height: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 15px 30px 15px;

    /* Keeps desktop image, but centers it at top of mobile screens */
    background-position: center 30px;
    background-size: 200px auto;
  }
  @media (prefers-reduced-motion: reduce) {
    body {
      animation: none;
    }
  }

  @media (max-width: 768px) {
    .expansion-container {
      width: 100%;
      padding: 0 32px;
      box-sizing: border-box;
    }

    .media-grid {
      grid-template-columns: 1fr;
      gap: 30px;
    }
  }
  /* Un-pins Ko-fi button from top-right so it sits below top graphic */
  .header-kofi-button {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 200px;
    margin-bottom: 45px;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  /* Resets desktop right-padding & left-margins on mobile */
  .hero-overlay {
    padding-right: 0;
    align-items: center;
    width: 100%;
  }

  .text-group {
    margin-left: 0;
    width: 100%;
  }

  /* Prevents horizontal text overflow on narrow screens */
  .subtitle,
  .mission-inline {
    white-space: normal;
  }

  .tech-tag {
    max-width: 90%;
  }

  .copyright-text {
    font-family: "Inter", sans-serif;
    font-size: 10pt;
    color: #b3afaf;
    letter-spacing: 0.5px;
    text-align: center;
    margin: 0;
  }
}
