/*
Theme Name: Mutiny Bay Brass Band
Theme URI: https://mutinybaybrass.com
Author: Mutiny Bay Brass Band
Description: Official theme for Mutiny Bay Brass Band – Community Brass Band from Whidbey Island, WA. Features a bold red & black motif with photo galleries, event calendar, video embeds, and contact form.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: mutiny-bay
*/

/* =============================================
   CSS VARIABLES & RESET
============================================= */
:root {
  --red:        #CC0000;
  --red-dark:   #8B0000;
  --red-light:  #FF2222;
  --black:      #0A0A0A;
  --charcoal:   #1A1A1A;
  --dark-gray:  #2A2A2A;
  --mid-gray:   #444444;
  --light-gray: #BBBBBB;
  --off-white:  #F2EDE8;
  --white:      #FFFFFF;

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Source Sans 3', 'Helvetica Neue', sans-serif;
  --font-mono:    'Courier New', monospace;

  --radius:  4px;
  --shadow:  0 4px 24px rgba(0,0,0,0.5);
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--red-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--white); }

/* =============================================
   TYPOGRAPHY
============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 0.5em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1.2em; color: var(--light-gray); }

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 1rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 3px;
  background: var(--red);
}

/* =============================================
   LAYOUT
============================================= */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  padding: 5rem 0;
}
.section--dark  { background: var(--black); }
.section--gray  { background: var(--charcoal); }

/* =============================================
   HEADER / NAV
============================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.97);
  border-bottom: 2px solid var(--red);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  max-width: 1140px;
  margin: 0 auto;
}
.site-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.02em;
}
.site-title span { color: var(--red); }

/* Primary Nav */
#primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}
#primary-nav a {
  color: var(--light-gray);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--transition);
}
#primary-nav a:hover,
#primary-nav .current_page_item a { color: var(--red-light); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  #primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--charcoal);
    border-bottom: 2px solid var(--red);
    padding: 1rem 0;
  }
  #primary-nav.is-open { display: block; }
  #primary-nav ul { flex-direction: column; align-items: center; gap: 0.5rem; }
  #primary-nav a { padding: 0.5rem 1rem; display: block; }
}

/* =============================================
   HERO BANNER
============================================= */
.hero {
  min-height: 92vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: var(--black);
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(10,10,10,0.85) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}
.hero-tagline {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.35rem 1.1rem;
  margin-bottom: 1.2rem;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
  margin-bottom: 1rem;
}
.hero h1 .accent { color: var(--red); }
.hero p {
  font-size: 1.2rem;
  max-width: 540px;
  margin: 0 auto 2rem;
  color: var(--off-white);
}
.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(204,0,0,0.45);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
  margin-left: 1rem;
}
.btn-outline:hover {
  background: var(--white);
  color: var(--black);
  color: var(--black);
}

/* =============================================
   PHOTO GALLERY
============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  background: rgba(204,0,0,0.0);
  transition: background 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.gallery-item:hover .gallery-item-overlay { background: rgba(204,0,0,0.25); }

/* WordPress default gallery class support */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-icon img { width: 100%; height: auto; border-radius: var(--radius); }

/* =============================================
   EVENTS / CALENDAR
============================================= */
.events-list { display: flex; flex-direction: column; gap: 1.2rem; }
.event-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--dark-gray);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.5rem;
  transition: background var(--transition);
}
.event-card:hover { background: var(--mid-gray); }
.event-date {
  text-align: center;
  font-family: var(--font-display);
}
.event-date .month {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--red);
  letter-spacing: 0.12em;
}
.event-date .day {
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.event-info h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.event-info p  { font-size: 0.9rem; margin: 0; color: var(--light-gray); }
.event-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  white-space: nowrap;
}

/* The Events Calendar plugin compatibility */
.tribe-events-list .tribe-events-calendar,
.tribe-events .tribe-events-c-top-bar { color: var(--off-white); }

@media (max-width: 600px) {
  .event-card {
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto;
  }
  .event-badge { grid-column: 1 / -1; justify-self: start; }
}

/* =============================================
   VIDEO SECTION
============================================= */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.video-card {
  background: var(--dark-gray);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(204,0,0,0.3);
}
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}
.video-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.video-caption {
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  color: var(--off-white);
  font-weight: 600;
}

/* =============================================
   CONTACT FORM
============================================= */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}
.contact-info { }
.contact-info h3 { color: var(--red); margin-bottom: 0.4rem; }
.contact-info p { font-size: 0.95rem; }
.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--off-white);
}
.contact-detail svg { flex-shrink: 0; color: var(--red); }

/* WPForms / CF7 / Gravity Forms base resets */
.wpcf7-form,
.wpforms-form,
.gform_wrapper form {
  display: flex; flex-direction: column; gap: 1.2rem;
}
.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form select,
.wpforms-form input,
.wpforms-form textarea,
.gform_wrapper input,
.gform_wrapper textarea,
.mb-form input,
.mb-form textarea,
.mb-form select {
  width: 100%;
  background: var(--dark-gray);
  border: 1.5px solid var(--mid-gray);
  border-radius: var(--radius);
  color: var(--off-white);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition);
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpforms-form input:focus,
.wpforms-form textarea:focus,
.gform_wrapper input:focus,
.gform_wrapper textarea:focus,
.mb-form input:focus,
.mb-form textarea:focus {
  outline: none;
  border-color: var(--red);
}
.wpcf7-form input[type="submit"],
.wpcf7-form button[type="submit"],
.wpforms-submit,
.gform_button,
.mb-form button {
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
  padding: 0.85rem 2.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  align-self: flex-start;
}
.wpcf7-form input[type="submit"]:hover,
.wpcf7-form button[type="submit"]:hover,
.wpforms-submit:hover,
.gform_button:hover,
.mb-form button:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(204,0,0,0.45);
}

.mb-form label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--light-gray);
  margin-bottom: 0.3rem;
  display: block;
}
.mb-form .field { display: flex; flex-direction: column; }

@media (max-width: 768px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 2rem; }
}

/* =============================================
   FOOTER
============================================= */
#site-footer {
  background: var(--charcoal);
  border-top: 2px solid var(--red);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}
.footer-brand .site-title { font-size: 1.3rem; margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.9rem; color: var(--mid-gray); }
.footer-nav h4, .footer-social h4 {
  color: var(--red);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 0.4rem; }
.footer-nav a { color: var(--light-gray); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--red-light); }
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--dark-gray);
  font-size: 0.82rem;
  color: var(--mid-gray);
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 1.5rem; padding-right: 1.5rem;
}

/* =============================================
   ABOUT / BIO SECTION
============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.about-image::before {
  content: '';
  position: absolute;
  inset: -8px -8px auto auto;
  width: 60%; height: 60%;
  border-top: 3px solid var(--red);
  border-right: 3px solid var(--red);
  z-index: 1;
  pointer-events: none;
}
.about-image img { width: 100%; }
.about-text h2 { color: var(--white); }
.about-text .lead {
  font-size: 1.1rem;
  color: var(--off-white);
  border-left: 3px solid var(--red);
  padding-left: 1rem;
  margin-bottom: 1.2rem;
}

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

/* =============================================
   MISC UTILITIES
============================================= */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.red { color: var(--red); }

/* Screen reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* WP admin bar fix */
.admin-bar #site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #site-header { top: 46px; } }

/* =============================================
   SCROLLBAR
============================================= */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--red-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }
