/* ==========================================================================
   SANTOPIA 2026 - Festive Red Velvet & Gold Theme
   ========================================================================== */

:root {
  --velvet-dark: #3b0205;
  --velvet-mid: #6b060b;
  --velvet-light: #8d0c12;
  --gold-bright: #ffe28a;
  --gold-mid: #d99b26;
  --gold-deep: #9e6b10;
  --cream-top: #fdf7e9;
  --cream-mid: #f7ebd2;
  --cream-bottom: #f1dfba;
  --crimson-label: #8e0c10;
  --emerald-line: #0d5e1e;
  --emerald-dark: #073e13;
  --text-dark: #2a120b;
  --error-red: #b91c1c;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 215, 110, 0.12), transparent 38%),
    radial-gradient(circle at 80% 85%, rgba(255, 215, 110, 0.1), transparent 40%),
    radial-gradient(ellipse at center, #78080d 0%, #4d0306 55%, #2b0103 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 14px 40px;
}

/* Main Poster Container */
.poster-wrapper {
  width: 100%;
  max-width: 600px;
  position: relative;
}

.poster {
  position: relative;
  width: 100%;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(165, 18, 24, 0.72) 0%, rgba(92, 5, 9, 0.92) 60%, #4b0205 100%);
  border: 3px solid var(--gold-mid);
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 226, 138, 0.35),
    0 0 0 1px rgba(158, 107, 16, 0.6),
    0 24px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  padding: 26px 24px 110px;
}

/* Top Ornaments & Bottom Gifts from Red Velvet Christmas.png (non-stretching) */
.poster::before,
.poster::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  background-image: url('./assets/Red%20Velvet%20Christmas.webp');
  background-repeat: no-repeat;
  background-size: 100% auto;
  z-index: 1;
}

.poster::before {
  top: 0;
  height: 360px;
  background-position: top center;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
}

.poster::after {
  bottom: 0;
  height: 240px;
  background-position: bottom center;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 58%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, #000 58%, transparent 100%);
}

/* Subtle festive golden sparkles */
.poster-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header & Logo */
.brand-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 14px;
}

.brand-logo {
  width: min(82%, 370px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  margin-bottom: 2px;
}

.brand-ticket-header {
  width: min(96%, 480px);
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.form-type-badge {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(13, 94, 30, 0.92), rgba(7, 62, 19, 0.96));
  border: 1.5px solid var(--gold-bright);
  color: var(--gold-bright);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Cream Parchment Form Plaque (Exact 3-part Festive Plaque) */
.form-plaque {
  position: relative;
  width: 100%;
  margin-top: 10px;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.55));
}

.plaque-cap {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.plaque-body {
  background-image: url('./assets/plaque-mid.webp');
  background-repeat: repeat-y;
  background-size: 100% auto;
  padding: 2px 38px 8px;
  margin-top: -1px;
  margin-bottom: -1px;
}

.plaque-title {
  text-align: center;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--crimson-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid rgba(217, 155, 38, 0.45);
}

/* Form Layout */
.registration-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 175px 14px 1fr;
  align-items: end;
  gap: 6px 8px;
}

.form-row.form-row--textarea {
  align-items: start;
}

.form-row.form-row--textarea .form-label,
.form-row.form-row--textarea .form-colon {
  padding-top: 8px;
}

.form-label {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--crimson-label);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.3;
  padding-bottom: 6px;
}

.form-colon {
  font-size: 1rem;
  font-weight: 800;
  color: var(--crimson-label);
  text-align: center;
  padding-bottom: 5px;
  user-select: none;
}

.input-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  border-bottom: 2.5px solid var(--emerald-line);
  border-radius: 4px 4px 0 0;
  padding: 7px 8px 5px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: rgba(42, 18, 11, 0.38);
  font-weight: 500;
  font-size: 0.86rem;
}

.form-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: var(--gold-mid);
  box-shadow: 0 3px 0 0 rgba(217, 155, 38, 0.35);
}

.form-input.is-invalid {
  border-bottom-color: var(--error-red);
  background: rgba(185, 28, 28, 0.06);
}

textarea.form-input {
  resize: vertical;
  min-height: 54px;
  line-height: 1.4;
}

.field-error {
  display: none;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--error-red);
  margin-top: 4px;
}

.field-error.is-visible {
  display: block;
}

/* Submit Button */
.form-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.submit-btn {
  width: 100%;
  max-width: 300px;
  padding: 13px 26px;
  border: 2px solid var(--gold-bright);
  border-radius: 999px;
  background: linear-gradient(180deg, #137a29 0%, var(--emerald-line) 55%, var(--emerald-dark) 100%);
  color: #fff8e7;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 6px 16px rgba(0, 0, 0, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.submit-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 9px 20px rgba(0, 0, 0, 0.38);
}

.submit-btn:active {
  transform: translateY(1px);
}

/* Validity Plaque */
.validity-banner {
  width: 100%;
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.validity-banner img {
  width: min(100%, 490px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

/* Confirmation Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(25, 2, 4, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(165deg, var(--cream-top) 0%, var(--cream-mid) 60%, var(--cream-bottom) 100%);
  border: 3px solid var(--gold-mid);
  border-radius: 22px;
  padding: 28px 24px 24px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 244, 205, 0.85),
    0 24px 60px rgba(0, 0, 0, 0.75);
  text-align: center;
  animation: popIn 0.22s ease-out;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #137a29, var(--emerald-dark));
  border: 2px solid var(--gold-bright);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
}

.modal-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--crimson-label);
  margin-bottom: 6px;
}

.modal-ref {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(13, 94, 30, 0.12);
  border: 1px solid rgba(13, 94, 30, 0.35);
  color: var(--emerald-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.modal-summary {
  text-align: left;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(217, 155, 38, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed rgba(142, 12, 16, 0.18);
  padding-bottom: 5px;
}

.summary-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-key {
  font-weight: 700;
  color: var(--crimson-label);
  flex-shrink: 0;
}

.summary-val {
  font-weight: 600;
  color: var(--text-dark);
  text-align: right;
  word-break: break-word;
}

/* ==========================================================================
   Responsive Breakpoints (Mobile & Tablet/Desktop)
   ========================================================================== */

@media (max-width: 540px) {
  body {
    padding: 10px 8px 24px;
  }

  .poster {
    padding: 18px 14px 86px;
    border-radius: 14px;
  }

  .poster::before {
    height: 240px;
  }

  .poster::after {
    height: 170px;
  }

  .form-plaque {
    margin-top: 8px;
  }

  .plaque-body {
    padding: 2px 24px 6px;
  }

  .plaque-title {
    font-size: 0.94rem;
    margin-bottom: 14px;
  }

  .registration-form {
    gap: 14px;
  }

  .form-row,
  .form-row.form-row--textarea {
    grid-template-columns: 1fr;
    gap: 2px;
    align-items: stretch;
  }

  .form-row.form-row--textarea .form-label {
    padding-top: 0;
  }

  .form-label {
    font-size: 0.8rem;
    padding-bottom: 2px;
  }

  .form-colon {
    display: none;
  }

  .form-input {
    font-size: 0.95rem;
    padding: 8px 8px 6px;
  }

  .submit-btn {
    max-width: 100%;
    padding: 12px 20px;
    font-size: 0.92rem;
  }
}

@media (min-width: 768px) {
  body {
    padding: 36px 24px 56px;
  }

  .poster {
    padding: 32px 34px 128px;
  }

  .plaque-body {
    padding: 4px 44px 10px;
  }
}

