/* Controles de idioma/tema y pequeñas escenas de circo. */
.header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 24px; padding-inline: 36px; }
.header .brand { grid-column: 1; grid-row: 1; }
.header nav { grid-column: 2; grid-row: 1; justify-self: end; gap: 18px; font-size: 12px; }
.site-tools { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: 8px; }
.language-switch { display: flex; border: 1px solid var(--line); border-radius: 30px; padding: 3px; }
.language-switch button { border: 0; border-radius: 50%; background: transparent; color: var(--wine); width: 31px; height: 31px; font-size: 10px; font-weight: 700; }
.language-switch button[aria-pressed="true"] { background: var(--wine); color: var(--paper); }
.theme-toggle { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; min-height: 39px; border: 1px solid var(--line); border-radius: 30px; color: var(--wine); background: transparent; font-size: 10px; white-space: nowrap; }
#themeIcon { font-size: 18px; line-height: 1; }
.theme-toggle:hover, .language-switch button:hover { outline: 1px solid var(--wine); }
.marquee { width: calc(100% - 4px); margin-inline: auto; }
.juggling-act { position: relative; width: 124px; height: 92px; justify-self: center; margin-top: 8px; pointer-events: none; }
.juggling-act::after { content: ''; position: absolute; bottom: 4px; left: 3px; right: 3px; height: 8px; border-top: 1px dashed var(--wine); border-radius: 50%; opacity: .45; }
.juggle-ball { position: absolute; width: 19px; height: 19px; border-radius: 50%; border: 1px solid #562432; box-shadow: inset -3px -3px 0 #0002; offset-path: path('M 16 72 Q 60 -50 104 72 Q 60 34 16 72'); offset-rotate: 0deg; animation: juggling-flight 2.8s linear infinite; }
.ball-1 { background: var(--yellow); animation-delay: 0s; }
.ball-2 { background: #d75955; animation-delay: -.93s; }
.ball-3 { background: #a7c9c0; animation-delay: -1.86s; }
@keyframes juggling-flight { to { offset-distance: 100%; } }
.tour-footer svg { transform-origin: center; animation: festival-star 18s linear infinite; }
@keyframes festival-star { to { transform: rotate(360deg); } }
.stage-reveal.awaiting-entry { opacity: 0; transform: translateY(24px); }
.stage-reveal.in-view { animation: ticket-entry .7s cubic-bezier(.16,.7,.3,1) var(--entry-delay,0ms) backwards; }
.stage-reveal.entry-complete { animation: none; }
@keyframes ticket-entry { from { opacity: 0; transform: translateY(28px) rotate(-.8deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }
body.motion-paused .stage-reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
body.motion-paused .show-card, body.motion-paused .discipline, body.motion-paused .press-links > a { transition: none; }

/* La paleta nocturna mantiene los acentos de carpa y papel. */
html[data-theme="dark"] { color-scheme: dark; --paper: #19161e; --ink: #f1ded9; --wine: #efadb8; --red: #eb948c; --aqua: #294b46; --text: #f0e7e1; --line: #62535f; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] .topline { background: #381d2b; color: #f6e9e2; }
html[data-theme="dark"] .about { background-color: #24202b; background-image: repeating-linear-gradient(100deg, transparent 0 80px, #ffffff03 80px 160px); }
html[data-theme="dark"] .show-card,
html[data-theme="dark"] .booking-panel,
html[data-theme="dark"] .video-choice,
html[data-theme="dark"] .discipline:not(.active),
html[data-theme="dark"] .press-links > a,
html[data-theme="dark"] .inquiry,
html[data-theme="dark"] dialog { background-color: #25212d; }
html[data-theme="dark"] .video-choice[aria-pressed="true"] { background-color: #3b2932; }
html[data-theme="dark"] .video-filters button { background: #25212d; }
html[data-theme="dark"] .video-filters button[aria-pressed="true"] { background: #efadb8; color: #19161e; }
html[data-theme="dark"] .watch-toolbar { background: #2f2733; }
html[data-theme="dark"] .screen-top { background: #481f31; color: #f9efe4; }
html[data-theme="dark"] .discipline:hover { background-color: #3b2932; }
html[data-theme="dark"] .discipline.active,
html[data-theme="dark"] .booking-topline,
html[data-theme="dark"] .curtain-toggle,
html[data-theme="dark"] .tour-poster,
html[data-theme="dark"] .image-tag,
html[data-theme="dark"] .clip-number,
html[data-theme="dark"] .button.yellow,
html[data-theme="dark"] .floating-contact { color: #54202f; }
html[data-theme="dark"] .tour-poster { background-color: #f5c547; }
html[data-theme="dark"] .image-tag { background: #f5c547; color: #54202f; border-color: #54202f; }
html[data-theme="dark"] .tour-footer { border-color: #54202f; }
html[data-theme="dark"] .pista-ticket { background: #722d40; color: #fff1df; border-color: #fff1df; outline-color: #722d40; }
html[data-theme="dark"] .handwritten { background: #722d40; color: #fff1df; }
html[data-theme="dark"] .gallery-item img { border-color: #3c333e; }
html[data-theme="dark"] .gallery-item:nth-child(even) img { border-color: #6b5534; }
html[data-theme="dark"] .inquiry input,
html[data-theme="dark"] .inquiry textarea,
html[data-theme="dark"] .inquiry select { background: #19161e; border-color: #82707e; color: #f0e7e1; }
html[data-theme="dark"] .inquiry input::placeholder,
html[data-theme="dark"] .inquiry textarea::placeholder { color: #c4b8be; }
html[data-theme="dark"] .form-note,
html[data-theme="dark"] .quote-explainer,
html[data-theme="dark"] .show-label,
html[data-theme="dark"] .gallery-help,
html[data-theme="dark"] .press-links small,
html[data-theme="dark"] .dossier-languages > span,
html[data-theme="dark"] .library-foot label,
html[data-theme="dark"] .clip-info small,
html[data-theme="dark"] .booking-facts dt,
html[data-theme="dark"] .booking-process { color: #cfc0c7; }
html[data-theme="dark"] .quote-summary { background: #382c36; color: #f0d3d9; }
html[data-theme="dark"] .video-ended { background: #481f31; color: #f8eee5; }
html[data-theme="dark"] .video-ended .end-replay { color: #f8eee5; }
html[data-theme="dark"] .festivals,
html[data-theme="dark"] footer { background-color: #271a25; color: #f5e9e2; }
html[data-theme="dark"] .festivals h2,
html[data-theme="dark"] .festival-row h3,
html[data-theme="dark"] .festival-row .country,
html[data-theme="dark"] footer a { color: #efadb8; }
html[data-theme="dark"] .festivals::before { background-image: radial-gradient(circle at 13px 13px, #271a25 12px, transparent 13px); }
html[data-theme="dark"] .contact h2 { text-shadow: none; }
html[data-theme="dark"] .discipline svg { filter: brightness(1.6); }
html[data-theme="dark"] .discipline.active svg { filter: none; }

@media(max-width:1180px) { .header { gap: 16px; padding-inline: 24px; } .header nav { gap: 12px; font-size: 11px; } .brand > span { font-size: 25px; } .brand small { letter-spacing: 1px; font-size: 7px; } .theme-toggle { padding-inline: 8px; } }
@media(max-width:1000px) {
  .header { height: 88px; grid-template-columns: minmax(0,1fr) auto auto; gap: 14px; }
  .site-tools { grid-column: 2; }
  .header .menu-toggle { grid-column: 3; grid-row: 1; display: block; }
  .header nav { grid-column: auto; grid-row: auto; justify-self: stretch; width: auto; position: absolute; top: 100%; left: 0; right: 0; padding: 20px 24px; display: none; flex-direction: column; align-items: stretch; gap: 18px; font-size: 15px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .header nav.open { display: flex; }
}
@media(max-width:600px) {
  .header { height: 76px; padding-inline: 16px; gap: 10px; }
  .brand { gap: 7px; } .brand img { width: 36px; height: 36px; } .brand > span { font-size: 25px; } .brand small { font-size: 5px; letter-spacing: .5px; max-width: 140px; }
  .site-tools { gap: 5px; } .language-switch { padding: 2px; } .language-switch button { width: 27px; height: 29px; font-size: 9px; }
  .theme-toggle { width: 34px; height: 35px; min-height: 35px; padding: 0; } #themeLabel { display: none; }
  .juggling-act { margin: 5px auto 0; }
}
@media(max-width:360px) { .brand > span { font-size: 22px; } .brand img { width: 30px; height: 30px; } .brand small { display: none; } .header { gap: 6px; padding-inline: 12px; } }
@media(prefers-reduced-motion: reduce) {
  .stage-reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
  .juggle-ball { animation: none !important; offset-path: none; top: 32px; }
  .ball-1 { left: 15px; } .ball-2 { left: 52px; } .ball-3 { left: 89px; }
  .tour-footer svg { animation: none !important; }
}
