/* ---------- Variables ---------- */
:root {
  --header-h: 72px;             /* updated by JS */
  --social-h: 0px;              /* updated by JS */

  /* Title bar sizing */
  --nav-row-w: 70vw;            /* ~60% of viewport on desktop */
  --nav-max-w: 1000px;          /* cap on huge screens */
  --nav-gap: clamp(8px, 2.5vw, 20px);

  /* EXACT rendered height for the PNG titles */
  --nav-icon-h: 30px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; }

body {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Header / Title Bar ---------- */
.jk-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; justify-content: center;
  pointer-events: none; /* only the nav is interactive */
}

/* Centered rows when wrapping */
/* Centered rows when wrapping — works on iPhone too */
.jk-nav {
  pointer-events: auto;
  margin: 10px auto 0;

  /* Fallback width (works everywhere) */
  width: 90vw;
  max-width: var(--nav-max-w);

  display: flex;
  flex-wrap: wrap;           /* allow multiple rows */
  justify-content: center;   /* center items on EACH row */
  align-items: center;

  /* Fallback spacing using margins (older iOS Safari doesn’t support gap on flex) */
}


/* Each link centers its image; no forced width/height on the cell */
/* Use margins as the default spacing so old Safari is happy */
.jk-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;            /* keep natural width; no squish */
  min-width: 0;
  text-decoration: none;
  color: #fff;
  line-height: 0;
  padding: 0;

  /* row-gap / column-gap fallback */
  margin: 8px 14px;
}


/* ------ Title PNGs: fixed height, width auto (keeps aspect) ------ */
.jk-icon {
  display: block;
  height: var(--nav-icon-h);  /* 50px tall */
  width: auto;                /* width follows proportionally */
  max-width: 100%;            /* if a word is super wide, shrink to fit cell */
  flex: 0 0 auto;             /* never let flex distort the image */
  vertical-align: middle;
  transition: transform 120ms ease, opacity 120ms ease;
}
.jk-link:hover .jk-icon { transform: translateY(-1px); opacity: .95; }

/* Fallback text (only if an image truly fails) */
.label { display: none; }
.jk-link.fallback .jk-icon { display: none !important; }
.jk-link.fallback .label {
  display: inline-block; white-space: nowrap;
  font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  font-size: 28px;    /* ~visual match to a 50px-tall image */
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}

/* ---------- Page layout ---------- */
.jk-page { padding-top: var(--header-h); min-height: 100%; }

.landing {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 16px;
}

/* ---------- Logo (shrink-to-fit only) ---------- */
.logo {
  display: block; margin: 0 auto;
  width: auto; height: auto;
  max-width: 95vw;
  max-height: calc(100dvh - var(--header-h) - var(--social-h) - 24px);
  flex: 0 0 auto;
}

/* ---------- Social icons ---------- */
.social-icons {
  margin-top: clamp(12px, 3vh, 24px);
  display: flex; justify-content: center;
  gap: clamp(12px, 2.5vw, 24px);
}
.social-icons img {
  width: clamp(36px, 6vw, 50px);
  height: clamp(36px, 6vw, 50px);
  display: block;
}

/* If the browser supports flex gap, switch to gap and remove margins */
@supports (gap: 1rem) {
  .jk-nav { gap: var(--nav-gap); }
  .jk-link { margin: 0; }
}

/* If the browser supports CSS min(), use your nice centered 60% strip */
@supports (width: min(60vw, 1000px)) {
  .jk-nav {
    width: min(var(--nav-row-w), var(--nav-max-w)); /* e.g., ~60% on desktop */
  }
}

/* Tiny phones: give the strip a bit more width so wrapping looks natural */
@media (max-width: 430px) {
  .jk-nav {
    width: 92vw;   /* slightly wider on iPhone */
  }
}




/* ===== Band page: 3 across, last 2 centered & close ===== */
.band-section {
  width: min(80vw, 1200px);
  margin: 0 auto;
  padding: 16px 0;
}

.band-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)); /* 6 tracks */
  gap: clamp(16px, 4vw, 32px);
  justify-items: center;
  align-items: start;
}

/* Each member spans 2 tracks => 3 cards per row */
.member-card {
  grid-column: span 2;
  width: 100%;
  max-width: 500px;              /* your portrait cap */
  text-align: center;
}

/* Last row has exactly 2 items (N ≡ 2 mod 3): center them in cols 2–3 and 4–5 */
.band-grid .member-card:nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
.band-grid .member-card:last-child:nth-child(3n+2)        { grid-column: 4 / span 2; }

/* Images */
.member-photo {
  display: block;
  width: 100%;
  height: auto;                  /* keep aspect ratio */
}

:root { --name-img-h: 32px; }
.name-img {
  display: block;
  margin: 10px auto 0;
  height: var(--name-img-h);
  width: auto;
  max-width: 100%;
}
.name-fallback {
  display: none;
  margin-top: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

/* Narrow screens: stack to 1 column and reset manual placement */
@media (max-width: 780px) {
  .band-grid { grid-template-columns: 1fr; }
  .member-card { grid-column: auto; }
  .band-grid .member-card:nth-last-child(2):nth-child(3n+1),
  .band-grid .member-card:last-child:nth-child(3n+2) { grid-column: auto; }
}


/* ===== Contact page ===== */
.contact-section {
  width: min(80vw, 900px);
  margin: 0 auto;
  padding: 16px 0;
}

.contact-card {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: clamp(16px, 3vw, 28px);
  backdrop-filter: blur(4px);
}

.contact-card .row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.contact-card label {
  font-weight: 700;
  letter-spacing: .02em;
  opacity: .9;
}

.contact-card input[type="text"],
.contact-card input[type="email"],
.contact-card textarea {
  width: 100%;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.contact-card textarea { resize: vertical; min-height: 120px; }

.contact-card input::placeholder,
.contact-card textarea::placeholder { color: rgba(255,255,255,0.6); }

.contact-card input:focus,
.contact-card textarea:focus {
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.15) inset;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

#sendBtn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, opacity 120ms ease;
}

#sendBtn:hover { background: rgba(255,255,255,0.14); transform: translateY(-1px); }

.status { opacity: .85; }

.fallback-note { margin-top: 12px; opacity: .8; }

/* Honeypot field hidden from users */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* Mobile tweaks */
@media (max-width: 480px) {
  .contact-section { width: 90vw; }
}

/* ===== Contact success banner ===== */
.alert-success {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(46, 204, 113, 0.2);
  border: 1px solid rgba(46, 204, 113, 0.35);
  border-radius: 10px;
  font-weight: 700;
}

/* Make the contact panel fully transparent */
.contact-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  /* keep the spacing so fields don't hug the edges */
  padding: clamp(16px, 3vw, 28px);
  border-radius: 20px; /* optional; remove if you want square edges */
}

/* --- Darker inputs on the contact form --- */
/* Too dark or too light? Nudge --input-bg (0.24–0.34 range works nicely) and --input-bg-focus a touch higher. */
:root{
  --input-bg: rgba(0,0,0,0.28);
  --input-bg-focus: rgba(0,0,0,0.36);
  --input-bd: rgba(255,255,255,0.24);
  --input-bd-focus: rgba(255,255,255,0.42);
  --input-ph: rgba(255,255,255,0.75);
}

.contact-card input[type="text"],
.contact-card input[type="email"],
.contact-card textarea {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-bd) !important;
  color: #fff;
}

.contact-card input::placeholder,
.contact-card textarea::placeholder {
  color: var(--input-ph);
}

.contact-card input:focus,
.contact-card textarea:focus {
  background: var(--input-bg-focus) !important;
  border-color: var(--input-bd-focus) !important;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.18) inset;
}








/* ===== Concert page ===== */
.concert-wrap {
  width: min(80vw, 1200px);
  margin: 0 auto;
  padding: 16px 0 24px;
}

/* Title images (30px high) with text fallback */
.concert-title {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0 10px;
  text-align: center;
}
.concert-title .title-img {
  height: auto;
  width: auto;
  max-height: 100px;
  max-width: 100%;
  display: block;
}
.concert-title .title-fallback {
  display: none;
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 20px;
}

/* Hero banner: widescreen image, responsive */
.concert-hero {
  margin-bottom: clamp(16px, 3vw, 28px);
}
.concert-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;          /* optional */
}

/* Base posters grid (previous concerts already uses this) */
.posters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 24px);
  justify-items: center;
  align-items: start;
  --poster-max-w: 560px; /* default cap */
}

.poster-card { width: 100%; max-width: var(--poster-max-w); }
.poster-card img { width: 100%; height: auto; display: block; }

/* Center single last poster if odd count */
.posters-grid .poster-card:last-child:nth-child(odd) {
  grid-column: 1 / -1; justify-self: center;
}

/* Upcoming-specific size: just change the cap */
.posters-grid.upcoming { --poster-max-w: 420px; }   /* <— adjust to taste */

/* (Optional) per-card sizes if you want variety */
.poster-card.sm { --poster-max-w: 360px; }
.poster-card.md { --poster-max-w: 480px; }
.poster-card.lg { --poster-max-w: 640px; }

/* Narrow screens */
@media (max-width: 720px) {
  .posters-grid { grid-template-columns: 1fr; }
}


/* Posters: 2 per row, centered; last one centered if odd */
.posters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 24px);
  justify-items: center;
  align-items: start;
}
.poster-card {
  width: 100%;
  max-width: 560px;             /* cap poster width per card */
}
.poster-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;           /* optional */
}

/* Base hero: for upcoming concert posters; */
.concert-hero {
  /* centered inside your 80vw container */
  display: flex;
  justify-content: center;
  margin-bottom: clamp(16px, 3vw, 28px);

  /* default max width for hero image */
  --hero-max-w: 900px;
}

/* image keeps aspect ratio, never stretched */
.concert-hero img {
  width: 100%;
  height: auto;
  max-width: var(--hero-max-w);
  display: block;
  border-radius: 10px;
}

/* Large option */
.concert-hero.lg { --hero-max-w: 1200px; }

/* phones just use full container width */
@media (max-width: 720px) {
  .concert-hero { --hero-max-w: 100%; }
}


/* Center the last poster when there's an odd total count */
.posters-grid .poster-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
}

/* Narrow screens: 1 per row */
@media (max-width: 720px) {
  .posters-grid { grid-template-columns: 1fr; }
}






/* ===== Repertoire page ===== */
/* Repertoire grid: 150×150 logos, last row centered */
:root { --rep-size: 150px; }  /* was 250px */

.rep-grid{
  display: grid;
  /* fixed-size tracks so leftover items can be centered */
  grid-template-columns: repeat(auto-fit, minmax(var(--rep-size), var(--rep-size)));
  gap: clamp(12px, 3vw, 24px);
  justify-content: center;     /* centers the whole track list (last row too) */
  justify-items: center;
  align-items: start;
}

.rep-card{
  width: var(--rep-size);
  height: var(--rep-size);
  display: grid;
  place-items: center;
}
.rep-card img{
  width: 100%;
  height: 100%;
  object-fit: contain;  /* keep logo proportions */
  display: block;
}

/* Optional: slightly smaller on tiny phones */
@media (max-width: 560px){
  :root { --rep-size: 120px; }
}


/* Repertoire container: 70% width, centered */
:root {
  --rep-size: 150px;              /* your 150×150 logos */
  --rep-container-w: 70vw;        /* use ~70% of the window */
  --rep-container-max: 1100px;    /* cap so it never gets too wide */
}

.rep-section {
  width: min(var(--rep-container-w), var(--rep-container-max));
  margin: 0 auto;                 /* center the whole section */
}

/* Grid: fixed-size tracks + centered rows (incomplete last row centered) */
.rep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--rep-size), var(--rep-size)));
  gap: clamp(12px, 3vw, 24px);
  justify-content: center;        /* centers each row */
  justify-items: center;
  align-items: start;
}
.rep-card { width: var(--rep-size); height: var(--rep-size); display: grid; place-items: center; }
.rep-card img { width: 100%; height: 100%; object-fit: contain; }

/* One-per-line text logos: match the same container width */
.rep-list { align-items: stretch; }  /* let lines fill the section width */
.rep-line { width: 100%; display: flex; justify-content: center; }


/* Repertoire logos: center every row, including the last */
:root { --rep-size: 150px; } /* keep your 150×150 tiles */

.rep-grid{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;                 /* <-- centers each row */
  gap: clamp(12px, 3vw, 24px);
}

.rep-card{
  flex: 0 0 var(--rep-size);               /* fixed tile width */
  width: var(--rep-size);
  height: var(--rep-size);
  display: grid;
  place-items: center;
}

.rep-card img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


/* One-per-line text logos under the grid */
:root { --rep-line-h: 30px; }             /* logo height */

.rep-list {
  list-style: none;
  padding: 0;
  margin: clamp(18px, 3vw, 28px) 0 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.6vw, 14px);
  align-items: center;                    /* center each line */
}

.rep-line {
  width: min(80vw, 1000px);               /* match page width nicely */
  display: flex;
  justify-content: center;
}

.rep-line img {
  height: var(--rep-line-h);              /* 30px tall */
  width: auto;                            /* keep aspect ratio */
  max-width: 100%;
  display: block;
}

/* Fallback text if an image fails to load */
.name-fallback {
  font-weight: 800;
  letter-spacing: .02em;
  font-size: calc(var(--rep-line-h) * 0.7);
  line-height: 1;
}










/* ===== Galerie ===== */
.gallery-wrap {
  width: min(70vw, 1400px);      /* max 70% window width */
  margin: 0 auto;
  padding: 16px 0 24px;
}

/* Centered, wrapping grid; each photo capped at 400px */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;       /* center each row */
  gap: clamp(12px, 2.5vw, 20px);
}

.g-card {
  flex: 1 1 300px;               /* good starting width */
  max-width: 400px;              /* hard cap per requirement */
}

.g-card img {
  display: block;
  width: 100%;
  height: auto;                  /* keep original aspect ratio */
  border-radius: 8px;            /* optional: remove if you prefer square */
}

/* ===== Lightbox (no deps) ===== */
html.lb-open, body.lb-open { overflow: hidden; }

.lb {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center;
}
.lb[hidden] { display: none !important; }

.lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(2px);
}

.lb-inner {
  position: relative;
  max-width: 92vw; max-height: 92vh;
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: auto auto;
  gap: 10px;
  z-index: 1;
}

.lb-img {
  max-width: 92vw; max-height: 80vh;
  width: auto; height: auto; display: block;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  justify-self: center;
}

.lb-cap {
  margin: 0;
  text-align: center;
  color: #fff;
  opacity: .9;
  font-weight: 600;
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  width: 44px; height: 44px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: 28px; line-height: 1;
  cursor: pointer;
  user-select: none;
}
.lb-btn:hover { background: rgba(255,255,255,0.25); }
.lb-prev { left: -56px; }
.lb-next { right: -56px; }

/* Close button */
.lb-close {
  top: -56px; right: 0; left: auto; transform: none;
}

/* Tighten on very small screens */
@media (max-width: 480px) {
  .lb-prev { left: -44px; }
  .lb-next { right: -44px; }
  .lb-close { top: -48px; }
}







/* Footer spacing + title sizing */
:root { --footer-title-h: 40px; } /* tweak height here */

.jk-footer{
  margin-top: clamp(24px, 6vh, 60px);
  padding-bottom: clamp(16px, 3vw, 28px);
  display:flex; flex-direction:column; align-items:center;
}

.footer-title{
  height: var(--footer-title-h);
  width:auto; max-width:min(70vw, 1000px);
  display:block; margin-bottom: clamp(12px, 2vh, 20px);
}

/* reuse your existing .social-icons, but tighten spacing in footer */
.jk-footer .social-icons{ margin-top:0; gap: clamp(12px, 2vw, 20px); }







/* Contact: band photo under the form */
.contact-photo{
  margin: clamp(18px, 4vh, 32px) auto 0;
  width: 100%;                 /* match the contact-section width */
}

.contact-photo img{
  width: 100%;                 /* responsive */
  height: auto;                /* keep aspect ratio */
  display: block;
  border-radius: 10px;         /* optional – remove if you prefer square edges */
}
