/* ============================================================
   dressed like boys — tickets
   Look & feel taken from the poster: horizontal pink → yellow
   gradient, black ink, brown treble clef.
   ============================================================ */

:root {
  --pink: #ff67c4;
  --yellow: #ffdd59;
  --ink: #141010;
  --brown: #7b3911;
  --brown-dark: #5a280a;
  --paper: rgba(255, 255, 255, 0.42);
  --paper-strong: rgba(255, 255, 255, 0.7);
  --line: rgba(20, 16, 16, 0.85);
  --muted: rgba(20, 16, 16, 0.68);

  --f-title: "Fondamento", Georgia, serif;
  --f-hand: "Patrick Hand", "Comic Sans MS", system-ui, sans-serif;
  --f-brush: "Caveat Brush", "Patrick Hand", cursive;
  --f-marker: "Permanent Marker", Impact, sans-serif;
  --f-serif: "Bodoni Moda", "Didot", Georgia, serif;

  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--f-hand);
  font-size: 1.2rem;
  line-height: 1.45;
  /* The poster's gradient runs purely left → right, so it tiles down the whole page */
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  background-color: #ffa28e;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.demo-banner {
  position: relative;
  z-index: 5;
  text-align: center;
  font-size: 0.95rem;
  padding: 6px 16px;
  background: var(--ink);
  color: #fff3d6;
  letter-spacing: 0.02em;
}

/* ============================================================
   POSTER (hero)
   ============================================================ */
.poster {
  position: relative;
  min-height: calc(100vh - 34px);
  min-height: calc(100svh - 34px);
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) var(--gutter) clamp(40px, 6vw, 72px);
  overflow: hidden;
  isolation: isolate;
  --mic-top: clamp(90px, 13vw, 170px);
  --mic-w: clamp(110px, 24vw, 330px);
}

.poster__title {
  margin: 0 0 0.2em;
  font-family: var(--f-title);
  font-weight: 400;
  font-size: clamp(2.9rem, 9vw, 7rem);
  line-height: 1;
  text-align: center;
  padding-right: clamp(0px, 10vw, 140px);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  animation: rise 0.9s ease-out both;
}

.poster__mic {
  position: absolute;
  top: var(--mic-top);
  right: var(--gutter);
  width: var(--mic-w);
  height: auto;
  transform-origin: 80% 30%;
  animation: sway 4s ease-in-out infinite;
  z-index: -1;
}

.poster__clef {
  position: absolute;
  right: 0;
  bottom: 0;
  /* fill the space under the microphone, like on the poster */
  height: min(1100px, calc(100% - var(--mic-top) - var(--mic-w) * 0.69 - 12px));
  width: auto;
  max-width: none;
  z-index: -1;
  animation: rise 1.2s 0.2s ease-out both;
}

.poster__body {
  max-width: 560px;
  margin-top: clamp(80px, 12vw, 190px);
}

.poster__facts {
  margin: 0 0 1.2rem;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.5;
}
.poster__facts div { margin-bottom: 0.65em; }
.poster__facts dt, .poster__facts dd { display: inline; margin: 0; }

.poster__countdown {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 2px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.25);
}
.poster__countdown:empty { display: none; }

.brush-title {
  margin: 0.4rem 0 0;
  font-family: var(--f-brush);
  font-weight: 400;
  font-size: clamp(4rem, 9vw, 6.5rem);
  line-height: 0.9;
  text-align: center;
}

.brush-line {
  border: 0;
  height: 4px;
  width: 100%;
  max-width: 500px;
  margin: 0.4rem auto 2rem;
  background: var(--ink);
  border-radius: 50% / 100%;
  transform: rotate(-0.4deg);
}

.poster__price {
  margin: 0 auto 2.4rem;
  max-width: 400px;
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.15;
  text-transform: uppercase;
  text-align: center;
}

.poster__cta {
  display: inline-block;
  font-family: var(--f-marker);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  -webkit-text-stroke: 1.5px var(--ink);
  transform: rotate(-2deg);
  transition: transform 0.2s ease, color 0.2s ease;
  text-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.poster__cta::after {
  content: " →";
  -webkit-text-stroke: 0;
  font-size: 0.6em;
  vertical-align: middle;
}
.poster__cta:hover { transform: rotate(-2deg) scale(1.04); color: var(--brown); -webkit-text-stroke-color: var(--brown); }

@keyframes sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-6deg); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* On narrow screens the clef moves behind the text, softened */
@media (max-width: 760px) {
  .poster__clef { height: 62%; opacity: 0.45; right: -18%; }
  .poster__mic { z-index: 0; }
  .poster__title { padding-right: 0; text-align: left; }
  .poster__body { margin-top: clamp(110px, 30vw, 160px); }
  .poster__cta { font-size: clamp(2.3rem, 11vw, 3.4rem); }
}

/* ============================================================
   SECTIONS
   ============================================================ */
main { position: relative; }

.section-title {
  margin: 0 0 1.5rem;
  font-family: var(--f-marker);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
}

.booking, .mytickets {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  scroll-margin-top: 8px;
}

.booking__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, 340px) 1fr;
  grid-template-areas:
    "tickets seats"
    "checkout seats";
  align-items: start;
}
.panel--tickets { grid-area: tickets; }
.panel--seats { grid-area: seats; }
.panel--checkout { grid-area: checkout; }

@media (max-width: 960px) {
  .booking__grid {
    grid-template-columns: 1fr;
    grid-template-areas: "tickets" "seats" "checkout";
  }
}

.panel {
  margin: 0;
  min-width: 0;
  padding: 22px clamp(16px, 2.5vw, 26px) 24px;
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(90, 40, 10, 0.12);
}

.panel__step {
  float: left;           /* pulls legend inside the border */
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  font-family: var(--f-brush);
  font-size: 2rem;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel__step + * { clear: both; }
.panel__step span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--f-marker);
  font-size: 1.15rem;
}

.panel__hint {
  margin: 14px 0 0;
  font-size: 1rem;
  color: var(--muted);
}
.panel__hint:empty { display: none; }

/* ----- ticket types ----- */
.ticket-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 2px dashed rgba(20, 16, 16, 0.35);
}
.ticket-type:last-of-type { border-bottom: 0; }
.ticket-type p { margin: 0; }
.ticket-type__name { font-size: 1.35rem; }
.ticket-type__name small { font-size: 0.85em; color: var(--muted); }
.ticket-type__price {
  font-family: var(--f-serif);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.05rem;
  color: var(--brown);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stepper__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--paper-strong);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.stepper__btn:hover:not(:disabled) { background: #fff; }
.stepper__btn:active:not(:disabled) { transform: scale(0.92); }
.stepper__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper__value {
  min-width: 2ch;
  text-align: center;
  font-size: 1.5rem;
  font-family: var(--f-marker);
}

/* ----- seat map ----- */
.seat-status {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--paper-strong);
  font-size: 1.1rem;
}
.seat-status.is-done { background: var(--ink); color: var(--yellow); }

.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 18px;
  width: 78%;
  padding: 8px 0 10px;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--f-marker);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 1rem;
}
.stage img { width: 36px; height: auto; filter: invert(88%) sepia(60%) saturate(500%) hue-rotate(350deg); }

.seatmap {
  --seat: clamp(20px, calc((100vw - 2 * var(--gutter) - 90px) / 23), 28px);
  display: grid;
  grid-template-columns: auto repeat(10, var(--seat)) calc(var(--seat) * 0.8) repeat(10, var(--seat)) auto;
  gap: clamp(3px, 0.6vw, 6px);
  justify-content: safe center;
  align-items: center;
  overflow-x: auto;
  padding: 4px 2px 8px;
  overscroll-behavior-x: contain;
  user-select: none;
  -webkit-user-select: none;
}
@media (min-width: 961px) {
  .seatmap { --seat: clamp(14px, calc((100vw - 2 * var(--gutter) - 340px - 24px - 140px) / 23), 30px); }
}
@media (min-width: 1280px) {
  .seatmap { --seat: 30px; }
}

.row-label {
  font-family: var(--f-marker);
  font-size: clamp(0.7rem, calc(var(--seat) * 0.55), 1rem);
  text-align: center;
  padding: 0 4px;
  color: var(--muted);
}

.seat {
  width: var(--seat, 22px);
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 30% 30% 22% 22%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  position: relative;
  transition: transform 0.12s, background 0.12s;
}
.seat:hover:not(:disabled) { transform: translateY(-2px); background: #fff; }
.seat.is-selected {
  background: var(--brown);
  border-color: var(--brown-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(90, 40, 10, 0.35);
}
.seat.is-selected:hover { background: var(--brown-dark); }
.seat.is-taken {
  background: rgba(20, 16, 16, 0.22);
  border-color: transparent;
  cursor: not-allowed;
}
.seat.is-mine {
  background: var(--ink);
  border-color: var(--ink);
  cursor: not-allowed;
}
.seat.is-mine::after {
  content: "♪";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-size: calc(var(--seat, 22px) * 0.6);
  line-height: 1;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
}
.legend li { display: flex; align-items: center; gap: 8px; }
.seat--demo { --seat: 20px; display: inline-block; cursor: default; }
.seat--demo:hover { transform: none; }

.seatmap-hint { display: none; margin: -6px 0 8px; text-align: center; font-size: 0.95rem; color: var(--muted); }
@media (max-width: 600px) { .seatmap-hint { display: block; } }

/* ----- checkout ----- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 4px; font-size: 1.1rem; }
.field small { color: var(--muted); }
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--paper-strong);
  font-size: 1.15rem;
}
.field input:focus { outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(123, 57, 17, 0.35); }
.field input.is-invalid { border-color: #b3001b; background: #fff0f3; }

.paymethods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.paymethods label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-strong);
  cursor: pointer;
  font-size: 1.05rem;
}
.paymethods label:has(input:checked) { background: var(--ink); color: var(--yellow); }
.paymethods input { accent-color: var(--brown); margin: 0; }

.summary {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--paper-strong);
  font-size: 1.1rem;
}
.summary p { margin: 0; }
.summary__row { display: flex; justify-content: space-between; gap: 12px; }
.summary__seats { color: var(--muted); font-size: 1rem; margin-top: 4px !important; }
.summary__total {
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 2px solid var(--ink);
  font-family: var(--f-serif);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.15rem;
}

.pay-btn {
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--f-marker);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s;
  box-shadow: 0 8px 20px rgba(20, 16, 16, 0.25);
}
.pay-btn:hover:not([aria-disabled="true"]) { background: var(--brown); transform: translateY(-2px); }
.pay-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.pay-btn--small { width: auto; font-size: 1.05rem; padding: 10px 22px; }

/* ============================================================
   MY TICKETS
   ============================================================ */
.bookings {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}
.bookings__empty {
  margin: 0;
  padding: 22px 26px;
  border: 2.5px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.25);
  font-size: 1.2rem;
}
.bookings__empty a { color: inherit; }

.booking-card {
  padding: 20px 22px;
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(90, 40, 10, 0.12);
}
.booking-card h3 {
  margin: 0;
  font-family: var(--f-marker);
  font-weight: 400;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}
.booking-card p { margin: 4px 0; }
.booking-card__meta { color: var(--muted); font-size: 1rem; }
.booking-card__seats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}
.booking-card__seats li {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--yellow);
  font-size: 0.95rem;
}
.booking-card__seats li.kid { background: var(--brown); color: #fff3d6; }
.booking-card__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.link-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 1.05rem;
}
.link-btn:hover { color: var(--brown); }

/* ============================================================
   TICKETS (dialog + print)
   ============================================================ */
.ticket-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 22px clamp(16px, 3vw, 30px) 26px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  color: var(--ink);
}
.ticket-dialog::backdrop { background: rgba(20, 16, 16, 0.6); backdrop-filter: blur(3px); }
.ticket-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ticket-dialog__head h2 {
  margin: 0;
  font-family: var(--f-marker);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 2rem;
}
.ticket-dialog__intro { margin: 6px 0 18px; }
.ticket-dialog__actions { display: flex; justify-content: flex-end; margin-top: 18px; }

.close-btn {
  width: 42px;
  height: 42px;
  flex: none;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-strong);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.ticket-list { display: grid; gap: 14px; }

.ticket {
  display: grid;
  grid-template-columns: 1fr auto;
  background: #fff8ec;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(20, 16, 16, 0.18);
  position: relative;
}
.ticket__main {
  padding: 16px 20px;
  border-right: 3px dashed rgba(20, 16, 16, 0.4);
  background:
    linear-gradient(90deg, rgba(255, 103, 196, 0.22), rgba(255, 221, 89, 0.22));
}
.ticket__band {
  margin: 0;
  font-family: var(--f-title);
  font-size: 1.9rem;
  line-height: 1;
}
.ticket__info { margin: 6px 0 10px; font-size: 1rem; color: var(--muted); }
.ticket__seat {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
}
.ticket__seat div { display: flex; flex-direction: column; }
.ticket__seat dt { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ticket__seat dd { margin: 0; font-family: var(--f-marker); font-size: 1.25rem; }
.ticket__stub {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.ticket__stub canvas { width: 92px; height: 92px; image-rendering: pixelated; }
.ticket__void {
  position: absolute;
  right: 120px;
  top: 10px;
  transform: rotate(8deg);
  padding: 0 8px;
  border: 2px solid #b3001b;
  border-radius: 6px;
  color: #b3001b;
  font-family: var(--f-marker);
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.75;
}

@media (max-width: 520px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket__main { border-right: 0; border-bottom: 3px dashed rgba(20, 16, 16, 0.4); }
  .ticket__stub { grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
  .ticket__void { right: 12px; }
}

/* ============================================================
   OVERLAY, TOAST, FOOTER
   ============================================================ */
.processing {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(20, 16, 16, 0.55);
  backdrop-filter: blur(4px);
}
.processing[hidden] { display: none; }
.processing__box {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 36px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  border: 3px solid var(--ink);
  text-align: center;
}
.processing__box p { margin: 8px 0 0; font-family: var(--f-marker); font-size: 1.4rem; }
.processing__box small { color: var(--muted); }
.spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 6px solid rgba(20, 16, 16, 0.2);
  border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--yellow);
  font-size: 1.1rem;
  box-shadow: 0 10px 30px rgba(20, 16, 16, 0.3);
  transform: translate(-50%, 160%);
  transition: transform 0.25s ease;
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); }

.footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 2.5px solid var(--line);
  text-align: center;
}
.footer p { margin: 0 0 4px; }
.footer__small { font-size: 1rem; color: var(--muted); }

/* ============================================================
   PRINT — only the tickets in the open dialog
   ============================================================ */
@media print {
  body { background: #fff; }
  body > *:not(.ticket-dialog) { display: none !important; }
  .ticket-dialog {
    position: static;
    display: block;
    width: 100%;
    max-height: none;
    border: 0;
    background: #fff;
    padding: 0;
  }
  .close-btn, .ticket-dialog__actions { display: none; }
  .ticket { break-inside: avoid; box-shadow: none; border: 2px solid #000; }
}
