:root {
  --bg: #0b0b0d;
  --panel: #0f1416;
  --text: #e6eef2;
  --muted: #a8b0b6;
  --accent: #ffffff;
  --max-width: 1200px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%;
  overscroll-behavior: none;
}

/* Ensure the root element uses the same background so overscroll/bounce
   doesn't reveal a white page background on macOS or mobile devices. */
html {
  background: #070708;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  color: var(--text);
  -webkit-overflow-scrolling: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 6, 7, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03)
}

/* prevent header from covering content */
.site-header+main {
  padding-top: 64px
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text)
}

.logo {
  height: 40px;
  width: auto
}

.band-name {
  font-weight: 600
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1rem
}

.site-nav a:hover {
  color: var(--accent)
}

.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden
}

/* Background photo layer for the hero. Replace the URL with your image file.
   Put your image at `images/photo_background.jpg` (or change the path below). */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('images/photo_background.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  /* change this value (0.0 - 1.0) to adjust photo opacity */
  filter: brightness(.9);
  /* slight darken for better contrast with text */
  z-index: 0;
}

.hero-inner {
  padding: 6rem 0;
  text-align: center;
  position: relative;
  z-index: 2
}

/* Hero logo: centered and responsive, sits above the photo background but below the fixed header */
.hero-logo {
  display: block;
  width: 100%;
  max-width: var(--max-width);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
  transition: opacity .25s ease, transform .25s ease;
}

@media (max-width:900px) {
  .hero-logo {
    max-width: 92%;
    max-height: 220px
  }
}

.hero-title {
  font-size: clamp(2rem, 4vw, 4rem);
  margin: 0 0 0.5rem
}

.hero-sub {
  color: var(--muted);
  margin: 0 0 1.25rem
}

.btn {
  background: var(--accent);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-right: 0.5rem
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text)
}

.section {
  padding: 1rem 0
}

.section h2 {
  margin: 0 0 1rem
}

.muted {
  color: var(--muted)
}

/* Band / lineup styles */
.band-intro {
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
  text-align: center;
  font-weight: 600
}

.band-sub {
  margin: 1.5rem;
  text-align: center;
  font-size: 1.15rem
}

.contact-sub {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 1.1rem
}

/* Shared content-block styles (editable placeholders) */
.content-block {
  padding: 2rem 0
}

.content-block .container {
  text-align: center
}

.content-title {
  margin: 0 0 0.75rem
}

hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1rem auto;
}

.mission-statement, 
.contact-sub {
  min-height: 120px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  outline: none;
  margin: 0 auto;
  text-align: center;
  line-height: 1.4;
  font-size: 1.1em;
}

.mission-statement:focus {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  color: var(--text)
}

.gallery-mid {
  margin: 1.5rem 0
}

/* Use flex so we can create the 3 / 4 / 3 centered rows via widths on items */
.band-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center
}

.band-member {
  background-color: rgba(0, 0, 0, 0.18);
  padding: 1.25rem;
  border-radius: 12px;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease;
  flex: 0 1 220px;
  min-width: 160px;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat
}

.band-member:focus-within,
.band-member:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55)
}

.band-member::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.62));
  transition: background .18s ease;
  border-radius: inherit;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-sizing: border-box
}

.band-member:hover::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.52))
}

.band-member>* {
  position: relative;
  z-index: 2
}

.member-name {
  font-weight: 700;
  font-size: 1.05rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6)
}

.member-role {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.6rem;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45)
}

.member-name,
.member-role {
  text-align: center
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0
}

/* layout helpers to create 3 / 4 / 3 rows */
.span-3 {
  flex-basis: calc(33.333% - 1rem);
  max-width: 320px
}

.span-4 {
  flex-basis: calc(25% - 1rem);
  max-width: 260px
}

@media (max-width:1100px) {
  .span-3 {
    flex-basis: calc(33.333% - 1rem)
  }

  .span-4 {
    flex-basis: calc(33.333% - 1rem)
  }
}

@media (max-width:700px) {
  .band-intro {
    font-size: 1rem
  }

  .span-3,
  .span-4 {
    flex-basis: calc(50% - 1rem);
    max-width: none
  }

  /* Make specific members break to a new row on small screens */
  .band-member.break-sm {
    flex-basis: 100%;
    max-width: 100%;
    align-self: stretch
  }

  .mission-statement {
    min-height: 80px
  }
}

@media (max-width:420px) {

  .span-3,
  .span-4 {
    flex-basis: 100%
  }
}

/* smaller variant for members without photos yet */
.band-member.small {
  min-height: 100px;
  padding: 0.65rem 0.9rem;
  height: auto;
  align-items: center;
  justify-content: center;
  align-self: flex-start
}

.band-member.small .member-name {
  font-size: 0.98rem
}

.band-member.small .member-role {
  font-size: 0.86rem;
  margin-top: 0.35rem
}

/* Photo credit under gallery */
.photo-credit {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem
}

/* Contact block: centered email + social icons */
.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem
}

.contact-email {
  color: var(--text);
  font-weight: 600;
  text-decoration: none
}

.social-icons {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.25rem
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  position: relative
}

.social-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  transition: color .15s ease, transform .15s ease
}

.social-icon:hover,
.social-icon:focus {
  color: var(--accent);
  transform: translateY(-2px)
}

.social-icon:focus {
  outline: 2px solid rgba(255, 255, 255, 0.06);
  outline-offset: 3px;
  border-radius: 6px
}

/* Tooltip styling using the data-tooltip attribute */
.social-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 10;
}

.social-icon:hover::after,
.social-icon:focus::after,
.social-icon:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0)
}

/* reduce tooltip motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .social-icon::after {
    transition: none
  }

  .social-icon {
    transition: none
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-items: start
}

/* Fade-in reveal when items enter the viewport */
.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.2, .9, .2, 1), transform .6s cubic-bezier(.2, .9, .2, 1);
  will-change: opacity, transform;
  aspect-ratio: 4/3;
  /* keeps a pleasing large shape */
  min-height: 320px;
  /* ensures prominent size on larger screens */
}

.gallery-item.in-view {
  opacity: 1;
  transform: none
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease
}

.gallery-item:hover img {
  transform: scale(1.03)
}

@media (prefers-reduced-motion: reduce) {

  .gallery-item,
  .gallery-item img {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important
  }
}

@media (max-width:900px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem
  }

  .gallery-item {
    min-height: 220px
  }
}

/* Calendar embed: emulate a dark theme for third-party iframe using CSS filters.
   Note: filter affects the rendered iframe bitmap (images/icons) — cannot change internal CSS
   because the iframe is cross-origin. If you control the calendar host, prefer a native
   dark-mode param or a proxy that rewrites the embed's CSS. */
.calendar-wrapper {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  padding: 15px;
}

.calendar-wrapper iframe {
  width: 100%;
  height: 450px;
  border: 0;
  display: block;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased
}

/* Apply a darkening filter to the iframe render. Tweak values if colors look off. */
.calendar-wrapper .planning-center-calender-embed {
  filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.95)
}

/* Smaller height on narrow viewports */
@media (max-width:900px) {
  .calendar-wrapper iframe {
    height: 380px
  }
}

@media (max-width:420px) {
  .calendar-wrapper iframe {
    height: 280px
  }
}

.contact .social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem
}

.contact .social a {
  color: var(--muted);
  text-decoration: none
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: 1rem 0;
  margin-top: 2rem
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem
}

@media (max-width:700px) {
  .header-inner {
    padding: 0.5rem 0
  }

  .site-header+main {
    padding-top: 56px
  }

  .hero-inner {
    padding: 3rem 0
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem
  }

  .site-nav {
    display: none
  }

  /* Reduce hero height and shift background on small screens to avoid heavy cropping */
  .hero {
    min-height: 30vh
  }

  .hero-inner {
    padding: 2.25rem 0
  }

  /* Compromise for narrow viewports: slightly zoom (avoid letterbox) and nudge focal point */
  .hero::before {
    background-position: center 35%;
    background-size: 130% auto;
    /* slightly zoomed so edges are less likely to letterbox */
    background-repeat: no-repeat;
    background-color: #000;
    /* fallback behind the image */
  }
}

/* visually hidden (accessible) */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0
}