/*
Theme Name: Things Happened Theme
Theme URI: https://thingshappened.band
Author: Antigravity
Author URI: https://google.com
Description: Custom WordPress theme for Things Happened band.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-theme, band
Text Domain: things-happened
*/

:root {
  /* Colors */
  --color-midnight-violet: #3A3042;
  --color-sky-blue: #B9CFD4;
  --color-sand: #DB9D47;
  /* Updated to requested color */
  --color-white: #ffffff;
  --color-off-white: #f9f9f9;
  --color-text: #222222;
  --color-text-light: #666666;
  --color-border: #e0e0e0;

  /* Typography */
  --font-family-base: 'Inter', sans-serif;

  /* Spacing */
  --container-width: 1200px;
  --header-height: 80px;

  /* Refined spacing/sizes */
  --spacing-fluid: clamp(1rem, 5vw, 4rem);
}

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

body {
  font-family: var(--font-family-base);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-white);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-off-white);
}

::-webkit-scrollbar-thumb {
  background: var(--color-midnight-violet);
  border: 3px solid var(--color-off-white);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-sand);
}

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

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* Utility */
.container {
  width: 92%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

.section-padding {
  padding: var(--spacing-fluid) 0;
}

/* Header (Mobile First) */
header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  position: relative;
  background: var(--color-white);
  z-index: 1000;
}

/* Social Icons */
.social-bar {
  display: flex;
  gap: 1.5rem;
}

.social-bar a {
  font-size: 1.4rem;
  color: var(--color-midnight-violet);
}

.social-bar a:hover {
  color: var(--color-sand);
}

.social-bar a:active {
  transform: scale(0.9);
}

/* Hamburger */
.mobile-toggle {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1002;
}

.bar {
  width: 24px;
  height: 2px;
  background-color: var(--color-midnight-violet);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1001;
}

.mobile-nav-overlay.active {
  transform: translateY(0);
}

.mobile-nav-overlay ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
}

.mobile-nav-overlay li a {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-midnight-violet);
  text-transform: uppercase;
}

.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
}

/* Hero Section */
/* Hero Section */
.hero {
  position: relative;
  padding: clamp(4rem, 15vw, 8rem) 0;
  text-align: center;

  /* Fallback */
  background: var(--color-midnight-violet);

  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;

  color: var(--color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  overflow: hidden;
}

/* Background Media Container */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Hero Overlay */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(58, 48, 66, 0.6);
  z-index: 1;
}

.hero-logo,
.hero-content,
.desktop-nav {
  position: relative;
  z-index: 2;
}

.hero-logo img {
  height: clamp(120px, 20vw, 150px);
  /* Increased mobile size */
  width: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.hero-content h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: -1px;
}

.hero-content p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: rgba(255, 255, 255, 0.95);
  max-width: 650px;
  margin: 0 auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Desktop Nav */
.desktop-nav {
  display: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 6px;
  border: 2px solid var(--color-white);
  background: transparent;
  color: var(--color-white);
  margin-top: 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.9rem;
}

.btn:hover {
  background: var(--color-white);
  color: var(--color-midnight-violet);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: var(--color-sand);
  /* Updated to requested color */
  border-color: var(--color-sand);
  color: var(--color-white);
}

.btn-primary:hover {
  background: #c88a38;
  /* Slightly darker sand for hover */
  border-color: #c88a38;
  color: var(--color-white);
}

/* Release Announcement */
.release-announcement {
  padding: var(--spacing-fluid) 0;
  background-color: var(--color-white);
}

.release-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 10vw, 4rem);
  flex-wrap: wrap;
}

.release-image {
  flex: 0 0 auto;
  width: clamp(250px, 40vw, 350px);
  max-width: 100%;
}

.release-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.release-text {
  flex: 1;
  min-width: 300px;
  max-width: 550px;
}

.release-text h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 1.5rem;
  color: var(--color-midnight-violet);
  letter-spacing: -0.5px;
}

/* Featured Listen */
.featured-listen {
  padding: var(--spacing-fluid) 0;
  background-color: var(--color-off-white);
}

.featured-listen h2 {
  margin-bottom: 2rem;
  text-align: center;
}

.video-container {
  max-width: 900px;
  margin: 0 auto 3rem auto;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  overflow: hidden;
  background: black;
}

/* Bandcamp Support Section */
.bandcamp-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 4rem;
}

.bandcamp-embed h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 1rem;
  color: var(--color-midnight-violet);
}

.bandcamp-embed p {
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 2rem auto;
  font-size: 1.1rem;
}

.bandcamp-embed iframe {
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 0;
  width: 100%;
  height: 120px;
  max-width: 700px;
}

/* News Section */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.news-card {
  border: 1px solid var(--color-border);
  padding: 2.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.news-card:hover {
  border-color: var(--color-sand);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.news-date {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Contact Preview */
.contact-preview {
  background: linear-gradient(135deg, var(--color-midnight-violet) 0%, #2a2230 100%);
  padding: var(--spacing-fluid) 2rem;
  text-align: center;
  border-radius: 16px;
  color: var(--color-white);
  margin: var(--spacing-fluid) auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.contact-preview h2 {
  color: var(--color-sand);
  margin-bottom: 1rem;
  font-size: clamp(2rem, 6vw, 3rem);
}

.contact-preview p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  font-size: 1.15rem;
}

.contact-form {
  max-width: 550px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Subpage Consolidation Styles */
.about-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
}

.about-image {
  flex: 0 0 auto;
  width: 400px;
  max-width: 100%;
}

.placeholder-img {
  background: #f0f0f0;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #aaa;
  border: 2px dashed #ddd;
  font-weight: 600;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 4rem;
}

.gigs-list {
  margin-top: 1.5rem;
}

.gig-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.gig-item strong {
  color: var(--color-midnight-violet);
  font-size: 1.1rem;
  margin-right: 0.5rem;
}

.form-input {
  padding: 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  background: #fdfdfd;
  color: var(--color-text);
  width: 100%;
  font-family: inherit;
  transition: all 0.3s ease;
}

.contact-preview .form-input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-sand);
  box-shadow: 0 0 0 3px rgba(219, 157, 71, 0.15);
}

/* Footer */
footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  margin-top: 5rem;
}

footer p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.animate-fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scroll Animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}



/* DESKTOP STYLES (min-width: 1024px for cleaner transition) */
@media (min-width: 1024px) {
  header {
    justify-content: flex-start;
    padding: 0 8%;
    height: 100px;
  }

  .mobile-toggle,
  .mobile-nav-overlay {
    display: none;
  }

  .hero {
    gap: 2.5rem;
    padding: 10rem 0 8rem 0;
  }

  .hero-logo img {
    height: 220px;
    /* Increased desktop size */
  }

  .desktop-nav-force-wrapper {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
  }

  .site-desktop-nav-container {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Target the explicit list class, bypass WP core .menu formatting */
  .site-desktop-nav-container .site-desktop-nav-list {
    list-style: none !important;
    display: flex !important;
    flex-direction: row !important;
    /* Force horizontal layout */
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4rem !important;
    margin: 1.5rem 0 !important;
    padding: 0 !important;
  }

  /* Force list items to behave */
  .site-desktop-nav-container .site-desktop-nav-list li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Target any link inside the nav list items */
  .site-desktop-nav-container .site-desktop-nav-list li a {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    color: var(--color-white) !important;
    letter-spacing: 2px !important;
    padding: 0.5rem 0 !important;
    position: relative !important;
    display: inline-block !important;
    text-decoration: none !important;
    background: transparent !important;
  }

  .site-desktop-nav-container .site-desktop-nav-list li a::after {
    content: '' !important;
    position: absolute !important;
    width: 0 !important;
    height: 2px !important;
    bottom: -5px !important;
    left: 0 !important;
    background-color: var(--color-sand) !important;
    transition: width 0.3s ease !important;
    display: block !important;
  }

  .site-desktop-nav-container .site-desktop-nav-list li a:hover::after,
  .site-desktop-nav-container .site-desktop-nav-list li.current-menu-item>a::after {
    width: 100% !important;
  }

  .site-desktop-nav-container .site-desktop-nav-list li a:hover,
  .site-desktop-nav-container .site-desktop-nav-list li.current-menu-item>a {
    color: var(--color-sand) !important;
  }
}

/* Modal / Newsletter Popup */
#mailing-list-modal {
  display: none;
  /* Controlled by JS active class */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(58, 48, 66, 0.6);
  /* Midnight violet overlay */
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#mailing-list-modal.active {
  display: flex !important;
  opacity: 1;
}

.modal-content {
  background: var(--color-white);
  padding: clamp(2rem, 8vw, 4rem);
  border-radius: 24px;
  max-width: 500px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transform: translateY(30px) scale(0.95);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#mailing-list-modal.active .modal-content {
  transform: translateY(0) scale(1);
}

.close-modal {
  position: absolute;
  top: 25px;
  right: 25px;
  font-size: 2.5rem;
  cursor: pointer;
  color: var(--color-text-light);
  line-height: 0.5;
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: var(--color-midnight-violet);
  transform: rotate(90deg);
}

.modal-content h2 {
  color: var(--color-midnight-violet);
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 800;
}

.modal-content p {
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-input {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fdfdfd;
  color: var(--color-text);
  width: 100%;
  font-family: inherit;
  transition: all 0.3s ease;
}

.modal-input:focus {
  outline: none;
  border-color: var(--color-sand);
  box-shadow: 0 0 0 4px rgba(219, 157, 71, 0.1);
}

/* ==========================================================
   Homepage Videos Section
   ========================================================== */
.section-videos {
  background-color: #111111;
  color: var(--color-white);
  padding: 5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.videos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .videos-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-white);
}

.videos-action {
  text-align: center;
}

.btn-ghost-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border: 1px solid var(--color-sand);
  color: var(--color-sand);
  background: transparent;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.btn-ghost-gold:hover {
  background: var(--color-sand);
  color: var(--color-white);
}