/* Layout: night-time fiesta. Dark charro-suit ground, gold embroidery rules, rosa mexicano for actions. Single dark look by choice. */
:root {
  --bg: #15110f;        /* charro black */
  --surface: #211a17;
  --fg: #f6eee4;
  --muted: #c3b5a6;
  --line: #3a2f29;
  --gold: #d9a441;      /* embroidery */
  --rosa: #e8287f;      /* rosa mexicano */
  --display: "Abril Fatface", "Didot", Georgia, serif;
  --body: "Karla", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1.0625rem/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--rosa); color: #fff; }
html { scrollbar-color: var(--muted) var(--bg); accent-color: var(--rosa); caret-color: var(--rosa); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--rosa); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
p { margin: 0; }
.wrap { max-width: 70rem; margin-inline: auto; padding-inline: 1.25rem; }
.fr { color: var(--muted); }
.eyebrow { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section > .wrap { display: grid; gap: 2rem; }
.head { display: grid; gap: .6rem; max-width: 42rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
/* gold "embroidery" rule: a row of small diamonds */
.rule { height: 10px; background: radial-gradient(circle, var(--gold) 2px, transparent 2.5px) 0 50% / 18px 10px repeat-x; opacity: .7; }

/* Header, as on the Orchestre Amati site: it slides away while scrolling down and comes back on the first scroll up (build.py) */
.top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: var(--bg); transition: translate .3s ease; }
.top.away:not(:has(:focus-visible)) { translate: 0 -100%; } /* back for keyboard focus only: a tapped menu button must not pin it */
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-block: .9rem; }
.brand { font-family: var(--display); font-size: 1.6rem; color: var(--fg); text-decoration: none; }
.brand em { color: var(--gold); font-style: normal; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: center; }
.top nav a:not(.btn) { color: var(--fg); text-decoration: none; font-weight: 500; }
.top nav a:not(.btn)[aria-current="page"] { color: var(--gold); text-decoration: underline; text-underline-offset: 6px; }
/* Menu button: below the width where the links no longer fit on the brand's line, they fold behind it (build.py adds .menu). */
.menu-btn { display: none; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1.5px solid var(--gold); border-radius: 999px; background: none; color: var(--fg); cursor: pointer; }
.menu-btn svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-btn path { transition: transform .25s ease, opacity .2s; transform-origin: 12px 12px; }
.menu-btn[aria-expanded="true"] path:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] path:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] path:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 43.9375rem) {
  .top.menu .menu-btn { display: grid; }
  .top.menu nav { display: none; }
  .top.menu.open nav { display: flex; flex-direction: column; align-items: stretch; flex-basis: 100%; gap: 0; padding-bottom: .5rem; }
  .top.menu.open nav a:not(.btn) { padding: .7rem 0; border-top: 1px solid var(--line); font-size: 1.1rem; }
  .top.menu.open nav .btn { justify-content: center; margin-top: .75rem; }
}

.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.35rem; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--rosa); background: var(--rosa); color: #fff; font: 700 1rem var(--body); cursor: pointer; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--gold); }
.btn.wa { background: #1f7a4a; border-color: #1f7a4a; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero { position: relative; }
.hero img, .hero video { width: 100%; height: clamp(24rem, 78vh, 44rem); object-fit: cover; object-position: center 45%; }
.hero .over { position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(to top, rgba(21, 17, 15, .97), rgba(21, 17, 15, .55) 45%, rgba(21, 17, 15, 0) 75%); }
.hero .wrap { display: grid; gap: 1rem; padding-block: 2.5rem; width: 100%; }
.hero h1 { font-size: clamp(3rem, 9vw, 6.5rem); }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { font-size: 1.2rem; max-width: 36rem; }

.pagehead { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
.pagehead .wrap { display: grid; gap: .6rem; }
.pagehead h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); }

.occasions { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); border: 1px solid var(--line); }
.occasions li { background: var(--bg); padding: 1.25rem; display: grid; gap: .2rem; }
.occasions b { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--gold); }

.split { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.split .text { display: grid; gap: 1.1rem; }
.figures { display: flex; flex-wrap: wrap; gap: 2rem; }
.figures div { display: grid; }
.figures b { font-family: var(--display); font-weight: 400; font-size: 2.6rem; line-height: 1; color: var(--rosa); }
.figures span { color: var(--muted); font-size: .95rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.ticks li { padding-left: 1.6rem; position: relative; }
.ticks li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); }
.clients { color: var(--muted); }
.clients b { color: var(--fg); font-weight: 600; }

.band { background: var(--surface); border-block: 1px solid var(--line); }
.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.tracks li { display: grid; gap: .5rem; padding: 1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.tracks b { font-family: var(--display); font-weight: 400; font-size: 1.35rem; }
.tracks audio { width: 100%; }

.offers { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.offer { display: grid; gap: .8rem; align-content: start; }
.offer img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: 6px; }
.offer h3 { font-size: 1.9rem; }

.grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.grid figure { margin: 0; display: grid; gap: .35rem; }
.grid button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 4px; overflow: hidden; }
.grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .3s ease; }
.grid button:hover img { transform: scale(1.03); }
.grid figcaption { font-size: .9rem; color: var(--muted); }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1400px); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(5, 4, 3, .92); }
dialog.lightbox img { max-height: 84vh; width: auto; margin-inline: auto; cursor: zoom-out; }
dialog.lightbox p { color: #fff; text-align: center; padding-top: .5rem; }
dialog.lightbox button { position: fixed; top: 1rem; right: 1rem; }

.videos { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.video { display: grid; gap: .5rem; color: var(--fg); text-decoration: none; }
.video .thumb { position: relative; border-radius: 4px; overflow: hidden; }
.video .thumb img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.video .play { position: absolute; inset: 0; margin: auto; width: 3.5rem; height: 3.5rem; fill: var(--rosa); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.video .play path { fill: #fff; }
.video:hover .play { transform: scale(1.08); }
.video h3 { font-family: var(--body); font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; }
.video.big { grid-column: 1 / -1; }
.video.big h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }

.contact { display: grid; gap: 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); align-items: start; }
.direct { display: grid; gap: 1.25rem; }
.direct dl { margin: 0; display: grid; gap: .9rem; }
.direct dt { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.direct dd { margin: 0; font-size: 1.2rem; user-select: all; }
form { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2rem); }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
label span { font-weight: 400; color: var(--muted); }
input, select, textarea { font: 1rem var(--body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: .7rem .8rem; width: 100%; }
textarea { min-height: 8rem; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.status { font-weight: 600; }
.status.ok { color: #5fd18f; }
.status.err { color: #ff8a80; }

.cta-band { background: var(--rosa); color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cta-band .btn { background: var(--bg); border-color: var(--bg); }
.cta-band .btn.wa { background: #1f7a4a; border-color: #1f7a4a; }
footer { padding-block: 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
footer .wrap { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
footer h3 { font-family: var(--body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--fg); margin-bottom: .5rem; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* Phones: photo first, then the title below it, so faces stay visible */
@media (max-width: 48rem) {
  .hero img, .hero video { height: 22rem; object-position: center 30%; }
  .hero .over { position: static; background: none; }
  .hero .wrap { padding-block: 1.75rem 0; }
}

/* KIE AI: hero loop + ambient band */
.hero video { display: block; }
.ambiance { position: relative; isolation: isolate; overflow: hidden; display: grid; min-height: clamp(20rem, 62vh, 34rem); color: #fff; }
.ambiance img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; animation: ambiance-drift 32s ease-in-out infinite alternate; }
.ambiance::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(8, 10, 14, .62), rgba(8, 10, 14, .2) 75%); }
.ambiance .wrap { display: grid; place-content: center; justify-items: center; gap: .8rem; text-align: center; padding-block: 3rem; }
.ambiance .eyebrow { color: var(--gold); }
.ambiance .say { margin: 0; font-family: var(--display); font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.1; max-width: 18ch; text-shadow: 0 2px 20px rgba(0, 0, 0, .55); }
.ambiance .sub { margin: 0; font-size: 1.1rem; max-width: 34rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
@keyframes ambiance-drift { from { transform: scale(1); } to { transform: scale(1.08) translateX(-1.5%); } }
@media (prefers-reduced-motion: reduce) { .ambiance img { animation: none; } }

/* ---------- Motion, adapted from 21st.dev components (js/fx.js runs the word rotation, waveform and confetti) ----------
   Scroll effects use CSS: without support, or with "reduce motion", the page simply stays still. */
:root { --confetti: #e8287f, #d9a441, #f6eee4, #1f7a4a, #3a8fd9; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Squash Text: the title bounces in letter by letter */
.letters .w { display: inline-block; white-space: nowrap; }
.letters .w span { display: inline-block; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .letters .w span { animation: squash .9s calc(var(--i) * 55ms + .15s) both; }
}
@keyframes squash {
  0% { opacity: 0; transform: translateY(-.9em) scale(.75, 1.35); }
  50% { opacity: 1; transform: translateY(0) scale(1.3, .68); animation-timing-function: ease-out; }
  72% { transform: translateY(-.08em) scale(.92, 1.1); }
  100% { transform: none; }
}

/* Word Rotate: « Para bodas · cumpleaños · fiestas · serenatas » */
.hero .para { font-family: var(--display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.1; }
.rot { display: inline-block; color: var(--rosa); }

.hero { overflow: hidden; } /* keeps the drifting hero photo inside its frame */

/* Elastic Gallery: the two formulas as photo cards; the one under the mouse widens */
.offer .chip { justify-self: start; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--bg); background: var(--gold); border-radius: 999px; padding: .3rem .75rem; }
.offer .txt { display: grid; gap: .7rem; align-content: start; }
@media (min-width: 48rem) {
  .offers { display: flex; gap: 1rem; }
  .offer { position: relative; flex: 1 1 0; min-width: 0; height: clamp(26rem, 64vh, 34rem); border-radius: 8px; overflow: hidden; transition: flex-grow .6s cubic-bezier(.32, .72, 0, 1); }
  .offer.on { flex-grow: 1.75; }
  .offer img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: 0; transition: filter .6s, transform .9s cubic-bezier(.32, .72, 0, 1); }
  .offer:not(.on) img { filter: brightness(.55) saturate(.8); }
  .offer.on img { transform: scale(1.04); }
  .offer .txt { position: absolute; inset: auto 0 0; padding: 5rem 1.5rem 1.5rem; background: linear-gradient(to top, rgba(21, 17, 15, .95), rgba(21, 17, 15, .6) 55%, transparent); }
  .offer:not(.on) .txt p { display: none; }
}
/* The mariachi alone (home): one large photo across the column, in its full-size version */
.offer.solo img { aspect-ratio: 3 / 2; }
.offer.solo .btn { justify-self: start; }
@media (min-width: 48rem) {
  .offer.solo { height: clamp(30rem, 82vh, 46rem); }
  .offer.solo .txt { padding-right: 40%; }
}

/* Scroll Velocity Text: the four songs of the repertoire */
.marquee { overflow: hidden; margin-bottom: 2.5rem; padding-block: .6rem; border-block: 1px solid var(--line); }
.marquee .track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee span { font-family: var(--display); font-size: clamp(2rem, 5vw, 3.4rem); white-space: nowrap; color: var(--gold); padding-right: .3em; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee.end { margin-bottom: 0; border-top: 0; } /* at the very end of the home page, just above the footer */

/* Waveform: bars dance next to the song that is playing */
.tracks .tt { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 1.4rem; }
.wave i { width: 4px; height: 100%; border-radius: 2px; background: var(--rosa); transform: scaleY(.2); transition: transform .3s; }
.tracks li.playing { border-color: var(--rosa); }
@media (prefers-reduced-motion: no-preference) {
  .playing .wave i { animation: bar .9s ease-in-out infinite alternate; }
  .playing .wave i:nth-child(2) { animation-duration: .6s; }
  .playing .wave i:nth-child(3) { animation-duration: 1.1s; }
  .playing .wave i:nth-child(4) { animation-duration: .75s; }
  .playing .wave i:nth-child(5) { animation-duration: .95s; }
}
@keyframes bar { from { transform: scaleY(.2); } to { transform: scaleY(1); } }

/* 3D Carousel: a slowly turning ring of photos above the gallery */
.ring { --w: clamp(9rem, 18vw, 15rem); --r: calc(var(--w) * 1.62); height: calc(var(--w) * 1.9); perspective: 1600px; overflow: hidden; margin-top: 1.5rem; }
.ring-track { position: relative; width: var(--w); aspect-ratio: 3 / 2; margin: calc(var(--w) * .45) auto 0; transform-style: preserve-3d; transform: rotateX(-6deg); }
.ring img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; border: 2px solid var(--gold);
  transform: rotateY(calc(var(--k) * 360deg / var(--n))) translateZ(var(--r)); }
@media (prefers-reduced-motion: no-preference) {
  .ring-track { animation: spin 48s linear infinite; }
  .ring:hover .ring-track { animation-play-state: paused; }
}
@keyframes spin { from { transform: rotateX(-6deg) rotateY(0); } to { transform: rotateX(-6deg) rotateY(-360deg); } }

.confetti { position: fixed; z-index: 50; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }

/* ---------- Taken from the Orchestre Amati site ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* Parallax Image: the hero photo drifts slower than the page (wide screens) */
    @media (min-width: 48rem) {
      .hero > img { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    }
    /* 3D Parallax Unfurling Gallery: the photo wall unfolds row by row */
    .grid.unfurl { overflow-x: clip; } /* the tilted rows would otherwise widen the page on phones */
    .grid.unfurl figure { transform-origin: 50% 0; animation: unfurl linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    .grid.unfurl figure:nth-child(2n) { animation-range: entry 10% entry 100%; }
  }
}
@keyframes drift { to { translate: 0 22%; } }
@keyframes unfurl { from { transform: perspective(1100px) rotateX(32deg) translateY(2.5rem); opacity: .15; } }
/* Ink blot carousel (js/ink.js): « De Chillon a Gstaad », each photo spreads in like ink. Empty, so hidden, without JavaScript. */
.ink { position: relative; overflow: hidden; height: clamp(26rem, min(82vh, 68vw), 54rem); margin-block: 1rem; background: #0d0a09; color: #fff; user-select: none; touch-action: pan-y; cursor: pointer; }
.ink:empty { display: none; }
.ink:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.ink-img, .ink-in { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; pointer-events: none; }
.ink-shade { position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(to top, rgba(21, 17, 15, .75), transparent); pointer-events: none; }
.ink-cap { position: absolute; left: clamp(16px, 4vw, 48px); right: clamp(140px, 20vw, 260px); bottom: clamp(16px, 4vh, 36px); margin: 0; font: 1.4rem/1.2 var(--display); pointer-events: none; }
.ink-nav { position: absolute; right: clamp(16px, 4vw, 48px); bottom: clamp(12px, 3vh, 32px); display: flex; align-items: center; gap: 12px; cursor: default; }
.ink-count { font: 700 12px/1 var(--body); letter-spacing: .14em; color: var(--gold); }
.ink-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.ink-nav button:hover { background: var(--rosa); border-color: var(--rosa); }
.ink-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .ink { height: 125vw; } }

/* Keyboard access and readable service pages, retaining the existing visual identity. */
.skip { position: fixed; top: .5rem; left: 1rem; z-index: 100; padding: .75rem 1rem; background: var(--bg); color: var(--fg); transform: translateY(-180%); }
.skip:focus { transform: none; }
#main:focus { outline: none; }
.formule h3 a { color: inherit; }
.intro > img { width: 100%; border-radius: 6px; }
.direct a { overflow-wrap: anywhere; }
html { scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
  .formules.stack .formule { position: relative; top: auto; }
}
