/* Kol Haneshama Boca Boys Choir - site styles.
   Color scheme from the performance flyer: curtain red and marquee gold.
   Mobile-first: every layout starts single-column and widens with the screen. */

:root {
  --crimson: #a31220;
  --crimson-dark: #5c0810;
  --crimson-deep: #3d050b;
  --gold: #f0b429;
  --gold-dark: #d4a017;
  --gold-bright: #ffd76a;
  --paper: #faf7f2;
  --ink: #2b2320;
  --muted: #6b7280;
  --open-seat: #d9f2e3;
  --open-seat-border: #2f9e6e;
  --selected-seat: #2563eb;
  --reserved-seat: #e5e7eb;
  --reserved-mark: #b91c1c;
  --seat-size: clamp(1.55rem, 6.2vw, 2.6rem);
  --seat-gap: clamp(0.18rem, 1vw, 0.4rem);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

.container {
  width: min(64rem, 100% - 2rem);
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}

/* --- Header ---------------------------------------------------------- */

.site-header {
  background: linear-gradient(180deg, var(--crimson-dark), var(--crimson-deep));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--gold);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.7rem;
  flex-wrap: wrap;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.95rem, 3.5vw, 1.2rem);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-note {
  color: var(--gold);
  font-size: 1.3em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a {
  color: #f3e2c7;
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover {
  color: #fff;
}

.nav-cta {
  background: var(--gold);
  color: var(--crimson-deep) !important;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--gold-bright);
}

/* --- Buttons --------------------------------------------------------- */

.button {
  display: inline-block;
  border: none;
  border-radius: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.button-primary {
  background: var(--crimson);
  color: #fff;
}

.button-primary:hover {
  background: var(--crimson-dark);
}

.button-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--crimson-deep);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.button-gold:hover {
  background: var(--gold-dark);
}

.button-gold:disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
  box-shadow: none;
}

.button-large {
  font-size: 1.15rem;
  padding: 0.9rem 2.2rem;
}

/* --- Homepage hero (flyer-style marquee) ------------------------------ */

.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 215, 106, 0.35), transparent 55%),
    linear-gradient(160deg, var(--crimson) 0%, var(--crimson-dark) 55%, var(--crimson-deep) 100%);
  color: #fff;
  text-align: center;
  padding: clamp(2.5rem, 9vw, 5rem) 0;
}

.bsad {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 1rem;
}

/* Theater-marquee sign around the choir name, built in pure CSS: a dark
   red billboard with a gold frame and glowing bulbs on all four sides,
   echoing the flyer. */

.marquee-sign {
  position: relative;
  width: fit-content;
  margin: 0 auto;
  padding: clamp(0.9rem, 3vw, 1.4rem) clamp(1.6rem, 5vw, 2.8rem);
  background: linear-gradient(180deg, #7a0c16, var(--crimson-deep));
  border: 3px solid var(--gold-dark);
  border-radius: 3rem 3rem 1.1rem 1.1rem / 2.2rem 2.2rem 1.1rem 1.1rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), inset 0 0 28px rgba(255, 215, 106, 0.18);
}

.bulbs {
  position: absolute;
  background-image: radial-gradient(
    circle,
    #fffbe8 0 0.13rem,
    var(--gold-bright) 0.14rem 0.27rem,
    rgba(255, 215, 106, 0.35) 0.28rem 0.42rem,
    transparent 0.43rem
  );
  animation: bulb-chase 2.4s linear infinite;
}

/* The sign is lit in eight segments, one at a time, travelling clockwise:
   top-left, top-middle, top-right, right side, bottom-right,
   bottom-middle, bottom-left, left side, then back to the top-left.
   Each segment stays lit for 0.3s, so a full lap takes 2.4s. The top and
   bottom rows are one strip of bulbs each, shown in thirds with clip-path
   so the bulb spacing runs unbroken across the sign. Negative delays
   start each segment at its place in the lap with no flash on page load.
   A second, offset set of bulbs fills the gaps so a lit segment looks
   evenly strung. */
.bulbs::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: inherit;
  background-size: inherit;
  background-repeat: inherit;
}

.bulbs-top::after,
.bulbs-bottom::after {
  background-position: 0.525rem center;
}

.bulbs-left::after,
.bulbs-right::after {
  background-position: center 0.525rem;
}

.bulbs-tl,
.bulbs-bl {
  clip-path: inset(0 66.667% 0 0);
}

.bulbs-tm,
.bulbs-bm {
  clip-path: inset(0 33.333% 0 33.333%);
}

.bulbs-tr,
.bulbs-br {
  clip-path: inset(0 0 0 66.667%);
}

.bulbs-tl {
  animation-delay: 0s;
}

.bulbs-tm {
  animation-delay: -2.1s;
}

.bulbs-tr {
  animation-delay: -1.8s;
}

.bulbs-right {
  animation-delay: -1.5s;
}

.bulbs-br {
  animation-delay: -1.2s;
}

.bulbs-bm {
  animation-delay: -0.9s;
}

.bulbs-bl {
  animation-delay: -0.6s;
}

.bulbs-left {
  animation-delay: -0.3s;
}

@keyframes bulb-chase {
  0%, 10.5% {
    opacity: 1;
  }
  13.3%, 97.2% {
    opacity: 0.2;
  }
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bulbs,
  .bulbs::after {
    animation: none;
  }
}

.bulbs-top,
.bulbs-bottom {
  left: 1.1rem;
  right: 1.1rem;
  height: 0.9rem;
  background-size: 1.05rem 100%;
  background-repeat: repeat-x;
  background-position: center;
}

.bulbs-top {
  top: -0.45rem;
}

.bulbs-bottom {
  bottom: -0.45rem;
}

.bulbs-left,
.bulbs-right {
  top: 1.1rem;
  bottom: 1.1rem;
  width: 0.9rem;
  background-size: 100% 1.05rem;
  background-repeat: repeat-y;
  background-position: center;
}

.bulbs-left {
  left: -0.45rem;
}

.bulbs-right {
  right: -0.45rem;
}

.hero-inner {
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.hero-choir-line1 {
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 6vw, 2.6rem);
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 0 14px rgba(255, 215, 106, 0.45), 0 3px 6px rgba(0, 0, 0, 0.5);
}

.hero-choir-line2 {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: clamp(0.8rem, 3vw, 1.15rem);
  margin: 0.3rem 0 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.hero-presents {
  color: #f3e2c7;
  font-style: italic;
  margin: 0.35rem 0 0;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.hero h1 {
  color: var(--gold);
  font-size: clamp(2.2rem, 8vw, 4.25rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0.2rem 0 1rem;
  line-height: 1.05;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.hero-details {
  border: 2px solid var(--gold);
  border-radius: 0.75rem;
  width: fit-content;
  margin: 0 auto 1.5rem;
  padding: 0.6rem 1.5rem;
  background: rgba(0, 0, 0, 0.25);
}

.hero-date {
  font-size: clamp(1.2rem, 4.5vw, 1.8rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.hero-time {
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  color: var(--gold-bright);
  font-weight: 700;
  margin: 0.1rem 0;
}

.hero-venue {
  color: #f3e2c7;
  margin: 0.1rem 0 0.2rem;
  font-size: clamp(0.85rem, 2.6vw, 1rem);
}

/* --- Homepage cards --------------------------------------------------- */

.event-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-block: 2.25rem;
}

@media (min-width: 48rem) {
  .event-details {
    grid-template-columns: 1fr 1fr;
  }
}

.detail-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(61, 5, 11, 0.1);
  border-top: 4px solid var(--gold);
}

.detail-card h2 {
  margin-top: 0;
  color: var(--crimson-dark);
}

.detail-list {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.5rem;
}

.detail-list div {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail-list dt {
  font-weight: 700;
  min-width: 6.5rem;
  color: var(--crimson-dark);
}

.detail-list dd {
  margin: 0;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.6rem;
}

.price-tag {
  display: inline-block;
  min-width: 3rem;
  text-align: center;
  font-weight: 700;
  border-radius: 0.4rem;
  padding: 0.1rem 0.5rem;
  margin-right: 0.4rem;
  color: var(--crimson-deep);
}

.price-50 { background: var(--gold-bright); }
.price-36 { background: #f8d98c; }
.price-18 { background: #fbeed3; }

.about-choir {
  margin-bottom: 3rem;
  max-width: 44rem;
}

.about-choir h2 {
  color: var(--crimson-dark);
}

/* --- Seat selection page --------------------------------------------- */

.seats-page {
  padding-block: 1.75rem 3rem;
}

.seats-page h1 {
  color: var(--crimson-dark);
  margin-bottom: 0.25rem;
}

.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0;
  margin: 1rem 0 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-seat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.legend-seat.seat-open {
  background: var(--open-seat);
  border: 2px solid var(--open-seat-border);
}

.legend-seat.seat-selected-legend {
  background: var(--selected-seat);
}

.legend-seat.seat-reserved {
  background: var(--reserved-seat);
  border: 2px solid #9ca3af;
  color: var(--reserved-mark);
}

.seats-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 60rem) {
  .seats-layout {
    grid-template-columns: 1fr 19rem;
  }
}

.seat-map-column {
  background: #fff;
  border-radius: 0.75rem;
  padding: clamp(0.75rem, 3vw, 1.75rem);
  box-shadow: 0 2px 10px rgba(61, 5, 11, 0.1);
  overflow-x: auto;
}

.stage {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--crimson-deep);
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 0.55rem 0;
  border-radius: 0.5rem;
  width: min(70%, 24rem);
  margin: 0 auto 1.5rem;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  box-shadow: 0 2px 8px rgba(212, 160, 23, 0.45);
}

.seat-map {
  display: flex;
  flex-direction: column;
  gap: var(--seat-gap);
  min-width: max-content;
  margin-inline: auto;
  width: fit-content;
}

.seat-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--seat-gap) * 4);
}

.seat-half {
  display: flex;
  gap: var(--seat-gap);
}

.seat {
  width: var(--seat-size);
  height: var(--seat-size);
  border-radius: 0.35rem;
  border: 2px solid var(--open-seat-border);
  background: var(--open-seat);
  color: #14532d;
  font-size: calc(var(--seat-size) * 0.34);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, background 0.12s ease;
}

.seat:hover:not(:disabled) {
  transform: scale(1.12);
}

.seat.selected {
  background: var(--selected-seat);
  border-color: var(--selected-seat);
  color: #fff;
}

.seat.with-buyer {
  font-size: 7.5px;
  line-height: 1.15;
  padding: 1px;
  white-space: normal;
  word-break: break-word;
}

.seat.reserved {
  background: var(--reserved-seat);
  border-color: #9ca3af;
  color: var(--reserved-mark);
  cursor: not-allowed;
}

.row-gap {
  height: clamp(1.1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-style: italic;
  font-size: clamp(0.7rem, 2.5vw, 0.9rem);
}

/* --- Checkout panel --------------------------------------------------- */

.checkout-panel {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(61, 5, 11, 0.1);
  border-top: 4px solid var(--gold);
  position: sticky;
  top: 4.5rem;
}

.checkout-panel h2 {
  margin-top: 0;
  color: var(--crimson-dark);
}

.selection-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.selection-list li {
  display: flex;
  justify-content: space-between;
  background: var(--paper);
  border-radius: 0.4rem;
  padding: 0.35rem 0.7rem;
  font-weight: 600;
}

.selection-list .remove-seat {
  border: none;
  background: none;
  color: var(--reserved-mark);
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.2rem;
}

.total-row {
  font-size: 1.15rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.75rem;
}

#checkout-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

#checkout-form label {
  font-weight: 600;
  font-size: 0.95rem;
}

#checkout-form input {
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  font-size: 1rem;
  width: 100%;
}

#checkout-form input:focus {
  outline: 2px solid var(--crimson);
  outline-offset: 1px;
}

#pay-button {
  margin-top: 0.5rem;
}

.form-error {
  color: var(--reserved-mark);
  font-weight: 600;
  min-height: 1.2em;
}

/* --- Simple pages (demo pay, success, cancelled) ---------------------- */

.narrow-page {
  max-width: 38rem;
  padding-block: 2.5rem 3rem;
}

.demo-badge {
  background: #fef3c7;
  border: 1px solid var(--gold-dark);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
}

.success-card h1 {
  color: var(--crimson);
}

/* --- Footer ----------------------------------------------------------- */

.site-footer {
  background: var(--crimson-deep);
  color: #d8b8a0;
  text-align: center;
  padding: 1.25rem 0;
  margin-top: 2rem;
  font-size: 0.9rem;
  border-top: 2px solid var(--gold);
}


