/* ============================================
   GALA FEST - Loyalty Webapp
   Mobile-first, kiosk-friendly
   ============================================ */

:root {
  --yellow: #FFD23F;
  --yellow-deep: #FFB800;
  --green: #2E9D3A;
  --green-dark: #1F7A29;
  --red: #E63946;
  --red-dark: #B5283A;
  --blue: #1E5BB8;
  --blue-dark: #143E80;
  --orange: #F58220;
  --purple: #8E44AD;
  --pink: #FF6FA0;
  --teal: #18B6B0;
  --cream: #FFF6D6;
  --ink: #1A1A2E;
  --shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
  --radius: 18px;
  --tap: 62px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  color: var(--ink);
  background: var(--yellow);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a, input, label {
  font-family: inherit;
}

img { max-width: 100%; display: block; }

/* ============================================
   LANDING PAGE - FULL POSTER
   ============================================ */

.page-landing-full {
  margin: 0;
  padding: 0;
  background: #FFB800;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.poster-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Only the ticket area is clickable.
   Image natural ratio ~9:16; ticket sits ~77%-92% vertically, ~6%-94% horizontally */
.ticket-hotspot {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 80%;
  bottom: 2%;
  border-radius: 18px;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  animation: pulse-tap 1.6s ease-in-out infinite;
  transition: background 0.15s ease, transform 0.12s ease;
}
@keyframes pulse-tap {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65),
                0 0 0 0 rgba(230, 57, 70, 0.5);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0),
                0 0 30px 10px rgba(255, 255, 255, 0.4);
  }
}

.ticket-hotspot:hover { background: rgba(255, 255, 255, 0.12); }
.ticket-hotspot:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0.97);
}

/* For very wide screens (landscape kiosk/desktop) — fit the poster as portrait */
@media (orientation: landscape) and (min-width: 700px) {
  .page-landing-full {
    background: #000;
  }
  .poster-wrap {
    width: auto;
    aspect-ratio: 9 / 16;
    height: 100vh;
    height: 100dvh;
  }
}

/* ============================================
   LANDING PAGE (legacy CSS-only version)
   ============================================ */

.page-landing {
  background:
    radial-gradient(circle at 50% 0%, #FFE066 0%, var(--yellow) 50%, var(--yellow-deep) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.landing {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 24px;
  position: relative;
  min-height: 100vh;
}

/* Bunting (banderines) */
.bunting {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  margin: 0 -16px 8px;
}
.flag {
  width: 11%;
  aspect-ratio: 1 / 1.4;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  display: block;
}
.flag-red    { background: var(--red); }
.flag-blue   { background: var(--blue); }
.flag-green  { background: var(--green); }
.flag-orange { background: var(--orange); }
.flag-purple { background: var(--purple); }

/* Globos decorativos */
.balloons {
  position: absolute;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.balloons-left  { left: 4px; }
.balloons-right { right: 4px; }
.balloon {
  width: 38px;
  height: 48px;
  border-radius: 50%;
  position: relative;
  box-shadow: inset -6px -8px 12px rgba(0,0,0,0.15);
}
.balloon::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 50%;
  width: 1px;
  height: 22px;
  background: rgba(0,0,0,0.3);
}
.b-blue   { background: var(--blue); }
.b-green  { background: var(--green); }
.b-orange { background: var(--orange); }
.b-purple { background: var(--purple); }
.b-pink   { background: var(--pink); }
.b-teal   { background: var(--teal); }

/* Hero / Logo */
.hero {
  text-align: center;
  padding: 12px 0 16px;
  position: relative;
  z-index: 1;
}
.stars {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 22px;
  margin-bottom: 4px;
}
.s-blue   { color: var(--blue); }
.s-yellow { color: #FFC107; font-size: 30px; }
.s-red    { color: var(--red); }

.logo {
  margin: 0;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -2px;
}
.logo-gala, .logo-fest {
  display: block;
  font-size: clamp(72px, 22vw, 110px);
  -webkit-text-stroke: 4px #FFF6D6;
  text-shadow:
    0 6px 0 rgba(0,0,0,0.25),
    0 0 0 #FFF6D6;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.2));
  font-family: "Arial Black", "Helvetica Neue", sans-serif;
}
.logo-gala { color: var(--green); }
.logo-fest { color: var(--red); margin-top: -8px; }

.tagline-banner {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  margin-top: 14px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow);
}
.tagline-banner .dot { color: #FFD23F; }

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.feature-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: #FFF6D6;
  display: grid;
  place-items: center;
  font-size: 36px;
  border: 3px solid rgba(0,0,0,0.08);
  box-shadow: var(--shadow);
}
.feature-label {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.feature:nth-child(2) .feature-label { background: var(--orange); }
.feature:nth-child(3) .feature-label { background: var(--green); }
.feature:nth-child(4) .feature-label { background: var(--red); }

/* Event card */
.event-info {
  margin: 16px 0;
}
.event-card {
  background: #FFF6D6;
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  border: 3px solid rgba(0,0,0,0.06);
  position: relative;
}
.event-icon {
  font-size: 36px;
  background: #fff;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 2px solid var(--red);
}
.event-text { text-align: center; }
.event-day  { color: var(--blue-dark); font-weight: 900; font-size: 15px; }
.event-date { color: var(--red); font-weight: 900; font-size: 18px; line-height: 1.1; margin: 2px 0; }
.event-time { color: var(--blue-dark); font-weight: 700; font-size: 13px; }

.badge-free {
  background: var(--blue);
  color: #fff;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
  font-size: 11px;
  line-height: 1.1;
  clip-path: polygon(
    50% 0%, 61% 12%, 75% 6%, 79% 21%, 95% 21%,
    91% 36%, 100% 50%, 91% 64%, 95% 79%, 79% 79%,
    75% 94%, 61% 88%, 50% 100%, 39% 88%, 25% 94%,
    21% 79%, 5% 79%, 9% 64%, 0% 50%, 9% 36%,
    5% 21%, 21% 21%, 25% 6%, 39% 12%
  );
}
.badge-free span { display: block; }

/* CTA Ticket */
.cta-ticket {
  display: block;
  text-decoration: none;
  margin: 20px 0;
  position: relative;
  min-height: var(--tap);
  transition: transform 0.15s ease;
}
.cta-ticket:active { transform: scale(0.97); }

.ticket {
  background: var(--cream);
  border: 4px dashed var(--red);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  font-weight: 900;
  color: var(--blue-dark);
  font-size: 22px;
  line-height: 1.1;
  box-shadow: var(--shadow);
  position: relative;
}
.ticket-text {
  color: var(--red);
}
.ticket-star {
  color: var(--red);
  font-size: 22px;
}
.ticket-cursor {
  position: absolute;
  right: 14px;
  bottom: -4px;
  font-size: 28px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
  animation: tap 1.4s ease-in-out infinite;
}
@keyframes tap {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Tents footer */
.tents {
  position: relative;
  margin-top: 24px;
  height: 80px;
}
.tent {
  position: absolute;
  bottom: 14px;
  width: 60px;
  height: 60px;
  background:
    repeating-linear-gradient(180deg, var(--red) 0 8px, #fff 8px 16px);
  clip-path: polygon(50% 0, 100% 50%, 100% 100%, 0 100%, 0 50%);
}
.tent-left  { left: 0; }
.tent-right { right: 0; }
.lights {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: var(--red-dark);
  padding: 8px 0;
  border-radius: 8px 8px 0 0;
}
.lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FFE066;
  box-shadow: 0 0 8px #FFE066;
  animation: blink 1.6s ease-in-out infinite;
}
.lights span:nth-child(odd)  { background: #fff; box-shadow: 0 0 8px #fff; animation-delay: 0.2s; }
.lights span:nth-child(3n)   { background: var(--orange); box-shadow: 0 0 8px var(--orange); animation-delay: 0.4s; }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ============================================
   REGISTER PAGE
   ============================================ */

.page-register {
  margin: 0;
  padding: 0;
  background: #000;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.register {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 14px 14px 24px;
  background:
    radial-gradient(circle at 50% 0%, #FFE066 0%, var(--yellow) 50%, var(--yellow-deep) 100%);
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

/* Match landing's 9:16 aspect ratio in landscape/wide screens */
@media (orientation: landscape) and (min-width: 700px) {
  .register {
    width: auto;
    aspect-ratio: 9 / 16;
    height: 100vh;
    height: 100dvh;
    padding: 14px 24px 24px;
  }
}

.register-header {
  display: grid;
  grid-template-columns: var(--tap) 1fr var(--tap);
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  padding: 10px 12px;
  border-radius: 18px 18px 0 0;
  border: 4px solid var(--red-dark);
  border-bottom: none;
}
.back-btn, .info-btn {
  width: var(--tap);
  height: var(--tap);
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  border-radius: 12px;
  display: grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
}
.register-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.register-title h1 {
  margin: 0;
  font-size: clamp(18px, 5vw, 22px);
  color: #FFE066;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.2);
}
.title-icon { font-size: 24px; }

.register-form {
  background: var(--cream);
  padding: 24px 18px 24px;
  border-radius: 0 0 18px 18px;
  border: 4px solid var(--red-dark);
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  position: relative;
  flex: 1;
}

/* Decorative confetti dots inside form */
.register-form::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px dashed rgba(230, 57, 70, 0.35);
  border-radius: 0 0 12px 12px;
  pointer-events: none;
}

.field input {
  width: 100%;
  height: var(--tap);
  border-radius: 999px;
  border: 3px solid var(--blue);
  background: #fff;
  padding: 0 24px;
  font-size: 18px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative;
  z-index: 1;
}
.field input::placeholder {
  color: #777;
  font-weight: 500;
  text-transform: none;
}

#firstName, #lastName, #address, #city, #state {
  text-transform: capitalize;
}
.field input:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(46, 157, 58, 0.3);
}
.field input:required {
  border-color: var(--red);
  background: #fff;
}
.field input:required:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(46, 157, 58, 0.3);
}
.field input.error {
  border-color: var(--red-dark);
  background: #FFE9EC;
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.3);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.required-note {
  margin: 4px 0 0;
  text-align: right;
  color: var(--red-dark);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.warn-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--orange);
  color: #fff;
  border-radius: 4px;
  font-weight: 900;
}

/* Consent */
.consent-section {
  margin-top: 6px;
  color: var(--ink);
  position: relative;
  z-index: 1;
}
.consent-question {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
}
.consent-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  min-height: 44px;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.checkmark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #fff;
  border: 2px solid var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.check input:checked + .checkmark {
  background: var(--green);
  border-color: var(--green-dark);
}
.check input:checked + .checkmark::after {
  content: '✓';
  color: #fff;
  font-weight: 900;
  font-size: 18px;
}
.check-label {
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 14px;
}

.legal {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(26, 26, 46, 0.7);
}

/* Form actions */
.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}
.btn {
  min-height: 76px;
  border-radius: 16px;
  border: none;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  padding: 0 8px;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: var(--shadow);
  white-space: nowrap;
  min-width: 0;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.18); }
.btn-cancel {
  background: #fff;
  color: var(--red);
  border: 3px solid var(--red);
}
.btn-cancel .btn-icon {
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.btn-register {
  background: var(--green);
  color: #fff;
  border: 3px solid var(--green-dark);
}
.btn-register .btn-icon {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}
.brand-pill {
  background: var(--yellow);
  border-radius: 16px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow);
  border: 3px solid var(--yellow-deep);
  min-height: 76px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.brand-leaf { font-size: clamp(18px, 5vw, 26px); }
.brand-name {
  font-weight: 900;
  font-size: clamp(13px, 3.5vw, 16px);
  background: linear-gradient(180deg, var(--red), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Success overlay — transparent backdrop so the form stays visible behind */
.success-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 10;
  pointer-events: none;
  animation: fadein 0.25s ease;
}
.success-overlay[hidden] {
  display: none;
}
@keyframes fadein {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.success-card {
  background: #fff;
  padding: 28px 22px;
  border-radius: 22px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.35),
              0 0 0 6px rgba(255, 210, 63, 0.6);
  border: 4px solid var(--green);
  pointer-events: auto;
  animation: pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop {
  0%   { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}
.success-icon {
  font-size: 56px;
  margin-bottom: 6px;
  animation: bounce 1.2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.success-card h2 {
  margin: 0 0 6px;
  color: var(--green-dark);
  font-size: 26px;
  font-weight: 900;
}
.success-card.status-returning h2 { color: var(--blue, #1E5BB8); }
.success-card.status-returning {
  border-color: var(--blue, #1E5BB8);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 0 0 6px rgba(30,91,184,0.35);
}
.success-card.status-duplicate h2 { color: var(--red-dark, #B5283A); }
.success-card.status-duplicate {
  border-color: var(--red, #E63946);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 0 0 6px rgba(230,57,70,0.25);
}
.success-card p {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 15px;
}
.ticket-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 8px auto 12px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.success-card .btn-register {
  display: inline-flex;
  width: 100%;
}

.countdown-bar {
  width: 100%;
  height: 6px;
  background: rgba(46, 157, 58, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.countdown-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  transform-origin: left center;
  animation: countdown 3s linear forwards;
}
@keyframes countdown {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ============================================
   RESPONSIVE - Tablet & Kiosk
   ============================================ */

@media (min-width: 600px) {
  .field input { height: 68px; font-size: 19px; }
  .btn { min-height: 84px; font-size: 19px; }
  .brand-pill { min-height: 84px; }
  .back-btn, .info-btn { width: 64px; height: 64px; font-size: 30px; }
}

@media (min-width: 900px) {
  /* Kiosk mode - large screens */
  .field input { height: 76px; font-size: 20px; padding: 0 28px; }
  .btn { min-height: 92px; font-size: 21px; }
  .brand-pill { min-height: 92px; }
  .register-title h1 { font-size: 26px; }
  .back-btn, .info-btn { width: 72px; height: 72px; font-size: 32px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
