/* Los Quetzales: site styles. Palettes are swapped by <html data-palette="..."> (all contrast-checked). */

:root, [data-palette="quetzal"] {
  --bg: #FBF5EA; --ink: #1C2421; --band: #0E5A45; --on-band: #FBF5EA;
  --action: #B3263A; --on-action: #FFFFFF; --link: #B3263A; --accent: #E9A23B;
  --strip: #E9A23B; --on-strip: #1C2421;
}
[data-palette="otono"] {
  --bg: #FFF7EE; --ink: #2A1A12; --band: #7A2E14; --on-band: #FFF7EE;
  --action: #B4361C; --on-action: #FFFFFF; --link: #B4361C; --accent: #F2A93B;
  --strip: #F2A93B; --on-strip: #2A1A12;
}
[data-palette="rosa"] {
  --bg: #FCF6F8; --ink: #2B1B2A; --band: #4A1942; --on-band: #FCF6F8;
  --action: #C2185B; --on-action: #FFFFFF; --link: #C2185B; --accent: #1B998B;
  --strip: #7FD1C7; --on-strip: #2B1B2A;
}
[data-palette="noche"] {
  --bg: #F7F1E8; --ink: #1A1517; --band: #161214; --on-band: #F7F1E8;
  --action: #E4B24C; --on-action: #1A1517; --link: #161214; --accent: #D8456E;
  --strip: #E4B24C; --on-strip: #1A1517;
}

:root {
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
  --gutter: 16px;
  --max: 1120px;
  --space: clamp(64px, 9vw, 112px);
  /* The skirt-hem ruffle on top of every band */
  --ruffle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 16'%3E%3Cpath d='M0 16 Q12 0 24 16 Q36 0 48 16 Z'/%3E%3C/svg%3E");
}
@media (min-width: 760px) { :root { --gutter: 32px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.125rem/1.6 var(--body);
  display: flex; flex-direction: column; min-height: 100svh; }
main { flex: 1 0 auto; } /* short pages keep the footer at the bottom */
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a[href^="tel:"] { white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.band :focus-visible, .site-header :focus-visible, .hero :focus-visible { outline-color: var(--on-band); }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.skip { position: absolute; left: 8px; top: -64px; z-index: 40; padding: 10px 14px; border-radius: 4px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 8px; }

/* Type */
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.6vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; max-width: 38rem; }
.lead { font-size: 1.25rem; }
.es { margin: .3em 0 0; font-family: var(--display); font-style: italic; font-weight: 400; font-size: 1.25rem; line-height: 1.3; color: var(--band); }
.band .es { color: var(--on-band); }
.wave { display: block; width: 96px; height: 14px; margin-top: 16px; color: var(--accent); }
.section-head { margin-bottom: 28px; }
.when { margin: .45em 0 .15em; font-family: var(--display); font-size: 1.35rem; line-height: 1.3; color: var(--band); }
.band .when { color: var(--on-band); }
.meta { font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px;
  border: 2px solid var(--action); border-radius: var(--radius); background: var(--action); color: var(--on-action);
  font: 700 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn-outline { background: transparent; color: inherit; border-color: currentColor; }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
.btn-ink { background: var(--on-strip); color: var(--strip); border-color: var(--on-strip); }
/* On a band, the main button turns cream: no red-on-green */
.band .btn:not(.btn-outline), .site-header .btn { background: var(--on-band); color: var(--band); border-color: var(--on-band); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; max-width: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--band); color: var(--on-band); }
.header-row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; }
.brand img { width: auto; height: 46px; }
.brand + .header-cta { margin-left: auto; } /* sub-pages have no nav between them */
.nav { margin-left: auto; }
.menu-toggle { min-height: 40px; padding: 8px 12px; border: 0; background: transparent; color: var(--on-band); font: 600 1rem/1 var(--body); cursor: pointer; }
.nav-list { margin: 0; padding: 0; list-style: none; }
.nav-list a { color: var(--on-band); font-weight: 600; text-decoration: none; }
.nav-list a:hover { text-decoration: underline; }
@media (max-width: 899px) {
  .nav-list { display: none; position: absolute; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 100%;
    padding: 4px var(--gutter) 16px; background: var(--band); box-shadow: 0 14px 24px rgba(0, 0, 0, .2); }
  .nav.open .nav-list { display: grid; }
  .nav-list a { display: block; padding: 12px 0; font-size: 1.125rem; }
}
@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .nav-list { display: flex; gap: 26px; }
}

/* Hero */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(88svh, 780px); background: var(--band); color: var(--on-band); }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--band) 84%, transparent) 0%, color-mix(in srgb, var(--band) 38%, transparent) 55%, transparent 80%),
    linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--band) 92%, transparent) 100%);
}
.hero-copy { padding: 140px 0 56px; }
.hero h1 { max-width: 11em; }
.hero-lead { margin-top: 18px; font-size: 1.25rem; max-width: 30rem; }
@media (max-width: 759px) {
  .hero-img { object-position: 50% 20%; }
  .hero::before { background: linear-gradient(180deg, transparent 18%, color-mix(in srgb, var(--band) 70%, transparent) 50%, var(--band) 92%); }
}

/* Concert strip */
.strip { background: var(--strip); color: var(--on-strip); }
.strip-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 0; }
.strip p { margin: 0; max-width: none; }

/* Sections and bands */
.section { padding-block: var(--space); }
.band { position: relative; background: var(--band); color: var(--on-band); }
.band::before {
  content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px; background: var(--band);
  -webkit-mask: var(--ruffle) left bottom / 48px 16px repeat-x; mask: var(--ruffle) left bottom / 48px 16px repeat-x;
}
.band a:not(.btn) { color: var(--on-band); }
.band-slim { padding-block: clamp(56px, 7vw, 88px); }

.split { display: grid; gap: 40px; align-items: center; }
.split img { width: 100%; border-radius: 4px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.flyer { box-shadow: 0 18px 40px rgba(0, 0, 0, .28); }

/* Classes: a printed-program feel, schedule first */
.class { display: grid; gap: 20px; padding-block: 40px; border-top: 1px solid color-mix(in srgb, var(--band) 22%, transparent); }
.class:first-of-type { padding-top: 16px; border-top: 0; }
.class img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.class img[src*="class-kids"] { object-position: 50% 18%; }
.class img[src*="class-adults"] { object-position: 85% 50%; } /* keep both dancers on the right in frame */
.class img[src*="class-teens"] { object-position: 50% 6%; }   /* portrait photo: keep both faces in the 4:3 crop */
.class h3 { font-size: clamp(1.6rem, 3vw, 2.05rem); }
.class .btn { margin-top: 8px; }
@media (min-width: 900px) {
  .class { grid-template-columns: 5fr 7fr; gap: 52px; align-items: start; }
  .class:nth-of-type(even) { grid-template-columns: 7fr 5fr; } /* mirror, so every photo gets the narrow column */
  .class:nth-of-type(even) img { order: 2; }
}
.aside { margin-top: 28px; }

/* About */
.quote { margin: 36px 0 0; font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.3; }
.quote p { max-width: 22em; margin: 0; }
.portrait { margin: 0; max-width: 420px; justify-self: center; }
.portrait img { box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.portrait figcaption { margin-top: 14px; font-family: var(--display); font-style: italic; font-size: 1.125rem; }
@media (max-width: 899px) { .portrait { max-width: 340px; } }

/* Book us */
.list-title { margin: 56px 0 14px; font-size: 1.4rem; }
.venues { margin: 0 0 56px; padding: 0; list-style: none; columns: 2 340px; column-gap: 44px; }
.venues li { padding: 11px 0; border-top: 1px solid color-mix(in srgb, var(--band) 20%, transparent); break-inside: avoid; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; grid-auto-flow: dense; gap: 8px; }
.gallery-item { display: block; overflow: hidden; border-radius: 3px; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item:nth-child(1), .gallery-item:nth-child(10) { grid-column: span 2; }
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 10px; }
  .gallery-item:nth-child(1) { grid-column: 1 / span 2; grid-row: span 2; }
  .gallery-item:nth-child(6) { grid-column: 3 / span 2; grid-row: span 2; }
  .gallery-item:nth-child(10) { grid-column: auto; }
}

/* Tap to enlarge */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 56px 12px 64px;
  border: 0; background: rgba(12, 14, 13, .95); color: #F4F1EC;
  touch-action: pan-y pinch-zoom; /* sideways swipes go to the gallery, pinch-zoom still works */ }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox figure { display: grid; justify-items: center; gap: 12px; max-width: 100%; margin: 0; }
.lightbox img { width: auto; height: auto; max-width: min(92vw, 1600px); max-height: calc(100dvh - 170px); object-fit: contain; border-radius: 2px;
  user-select: none; -webkit-user-drag: none; }
.lightbox figcaption { max-width: 40rem; font-size: 1rem; text-align: center; }
.lightbox button { padding: 10px 14px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .14); color: #FFFFFF; font: 600 1rem/1 var(--body); cursor: pointer; }
.lightbox :focus-visible { outline-color: #FFFFFF; }
.lb-count { position: absolute; left: 16px; top: 16px; margin: 0; font-weight: 600; }
.lb-close { position: absolute; right: 12px; top: 10px; }
.lb-prev, .lb-next { position: absolute; top: 50%; width: 48px; height: 64px; font-size: 2.2rem !important; transform: translateY(-50%); }
.lb-prev { left: 6px; }
.lb-next { right: 6px; }
html:has(.lightbox[open]) { overflow: hidden; }

/* Contact */
.contact { display: grid; gap: 48px; }
@media (min-width: 900px) { .contact { grid-template-columns: 7fr 5fr; gap: 72px; } }
form label { display: block; margin: 18px 0 6px; font-weight: 600; }
.opt { font-weight: 400; opacity: .78; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid color-mix(in srgb, var(--ink) 38%, transparent);
  border-radius: 4px; background: #FFFFFF; color: var(--ink); font: inherit;
}
textarea { resize: vertical; }
form .btn { margin-top: 26px; }
.honeypot { display: none !important; }
.form-status { margin: 16px 0 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status[data-state="ok"] { color: var(--band); }
.form-status[data-state="error"] { color: var(--action); }
.visit h3 { margin: 30px 0 8px; font-size: 1.25rem; }
.visit h3:first-child { margin-top: 6px; }
.phone { font-family: var(--display); font-size: 1.5rem; }

/* Footer */
.site-footer { padding-block: 64px 44px; }
.footer-row { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-row { grid-template-columns: 220px 1fr; gap: 52px; align-items: start; } }
.footer-logo { width: 200px; }
.footer-text p { font-size: .95rem; max-width: 46rem; }
.footer-links { display: flex; gap: 22px; }

/* Sub-pages (privacy, 404) */
.page-h2 { margin: 40px 0 10px; font-size: clamp(1.4rem, 3vw, 1.75rem); }

/* Preview only: palette switcher for Laura */
.palette-switcher {
  position: fixed; right: 12px; bottom: 12px; z-index: 30; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px;
  max-width: calc(100vw - 24px); padding: 6px; border-radius: 10px; background: #FFFFFF; color: #222222;
  font: 600 .85rem/1 var(--body); box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
}
.palette-switcher button { padding: 7px 10px; border: 1.5px solid #C9C9C9; border-radius: 6px; background: #FFFFFF; color: #222222; font: inherit; cursor: pointer; }
.palette-switcher .ps-toggle { border-color: transparent; }
.palette-switcher .ps-options { display: flex; flex-wrap: wrap; gap: 6px; }
.palette-switcher button[aria-pressed="true"] { border-color: #222222; background: #222222; color: #FFFFFF; }
