/* ===================================================================
   RH JEWELLERS — ELEGANCE CRAFTED IN GOLD
   Warm Cream Marble, Royal Maroon & 24K Brushed Gold Theme
   Screen 1: Customer Details Login -> Screen 2: Scratch & Win Poster
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800;900&family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400;1,600;1,700&family=Montserrat:wght@700;800;900&family=Outfit:wght@700;800;900&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,400;1,600;1,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --cream-bg: #F9F4EB;
  --cream-card: #FBF7F0;
  --maroon-primary: #630D16;
  --maroon-dark: #45060C;
  --maroon-light: #851622;
  --gold-primary: #C59329;
  --gold-bright: #E5B94E;
  --gold-light: #FBF0B9;
  --gold-dark: #8C6214;
  --gold-border: #CDA03B;
  --text-brown: #4A2511;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-height: 100dvh;
  background-color: #EFE6D5;
  color: var(--maroon-dark);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

/* Warm Cream Marble Poster Container */
.poster-shell {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: #FAF5EC;
  background-image:
    radial-gradient(ellipse at 20% 15%, rgba(255, 255, 255, 0.9) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(235, 220, 195, 0.65) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 45%, rgba(252, 248, 240, 0.85) 0%, rgba(242, 231, 213, 0.95) 100%),
    repeating-linear-gradient(125deg, rgba(197, 147, 41, 0.025) 0px, rgba(197, 147, 41, 0.025) 2px, transparent 2px, transparent 38px),
    repeating-linear-gradient(35deg, rgba(160, 125, 70, 0.03) 0px, rgba(160, 125, 70, 0.03) 1px, transparent 1px, transparent 52px);
  box-shadow: 0 20px 60px rgba(69, 6, 12, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
}

@media (max-width: 375px) {
  .poster-shell {
    padding: 8px;
  }
  .gold-frame {
    padding: 14px 10px 12px;
  }
  .ribbon-top-left {
    width: 120px;
    height: 135px;
  }
  .ribbon-bottom-right {
    width: 125px;
    height: 105px;
  }
}

@media (min-width: 640px) {
  body {
    padding: 28px 16px;
    background:
      radial-gradient(circle at 50% 20%, #3B080E 0%, #1F0407 70%, #110204 100%);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .poster-shell {
    max-width: 540px;
    min-height: auto;
    border-radius: 26px;
    padding: 20px;
    border: 2px solid rgba(212, 175, 55, 0.55);
    box-shadow:
      0 30px 80px rgba(0, 0, 0, 0.65),
      0 0 40px rgba(212, 175, 55, 0.2);
  }
  .gold-frame {
    padding: 28px 26px 22px;
  }
  .login-details-card,
  .gold-plaque-outer {
    max-width: 420px;
  }
}

@media (min-width: 1024px) {
  body {
    padding: 36px 24px;
  }
  .poster-shell {
    max-width: 580px;
    padding: 24px;
  }
  .gold-frame {
    padding: 32px 34px 26px;
  }
  .login-details-card,
  .gold-plaque-outer {
    max-width: 450px;
  }
  .scratch-card-wrapper,
  .scratch-inner-card {
    min-height: 240px;
  }
  .perks-footer {
    max-width: 460px;
    margin-top: 16px;
  }
}

/* Inner Gold Frame Border */
.gold-frame {
  position: relative;
  flex: 1;
  border: 1.5px solid rgba(197, 147, 41, 0.55);
  border-radius: 14px;
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.45) 0%, rgba(250,244,232,0.2) 50%, rgba(239,226,203,0.4) 100%);
}

/* Typography Helpers */
.font-cinzel {
  font-family: 'Cinzel', Georgia, serif;
}

.font-playfair {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-cormorant {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* "Scratch & Win" Headline */
.scratch-win-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2.35rem, 9.5vw, 3.1rem);
  line-height: 1.05;
  color: var(--maroon-primary);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(99, 13, 22, 0.08);
  margin: 0;
}

.scratch-win-title .amp {
  background: linear-gradient(180deg, #E7C15A 0%, #C59329 55%, #9B6E15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  padding: 0 4px;
}

/* Center Diamond Divider */
.diamond-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78%;
  max-width: 260px;
  margin: 8px auto 8px;
  gap: 6px;
}

.diamond-divider .line-left {
  height: 1.5px;
  flex: 1;
  background: linear-gradient(90deg, transparent, #C59329);
}

.diamond-divider .line-right {
  height: 1.5px;
  flex: 1;
  background: linear-gradient(270deg, transparent, #C59329);
}

.diamond-divider .dots {
  color: #C59329;
  font-size: 11px;
  letter-spacing: 3px;
  line-height: 1;
}

/* Subtitle */
.surprise-subtitle {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.08rem, 4.3vw, 1.32rem);
  color: #4A1219;
  margin: 0 0 10px;
  text-align: center;
}

/* ===================================================================
   SCREEN 1: LOGIN / CUSTOMER DETAILS CARD
   =================================================================== */
.login-details-card {
  width: 100%;
  max-width: 370px;
  margin: 4px auto;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96) 0%, rgba(251, 244, 230, 0.96) 100%);
  border: 2px solid #CDA03B;
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow:
    0 14px 32px -8px rgba(84, 52, 8, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  position: relative;
}

.luxury-label {
  display: block;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon-primary);
  margin-bottom: 5px;
}

.luxury-input-wrap {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid rgba(197, 147, 41, 0.55);
  border-radius: 11px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.luxury-input-wrap:focus-within {
  border-color: var(--maroon-primary);
  box-shadow: 0 0 0 3px rgba(99, 13, 22, 0.12);
}

.luxury-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #3D080E;
}

.luxury-input::placeholder {
  color: #A89882;
  font-weight: 400;
}

/* Luxury 3-Dropdown Date of Birth Selector (Day, Month, Year) */
.luxury-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid rgba(197, 147, 41, 0.55);
  border-radius: 11px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.luxury-select-wrap:focus-within {
  border-color: var(--maroon-primary);
  box-shadow: 0 0 0 3px rgba(99, 13, 22, 0.12);
}

.luxury-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 22px 10px 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: #3D080E;
  cursor: pointer;
  font-family: inherit;
}

.luxury-select:disabled,
.luxury-select option[disabled] {
  color: #9CA3AF;
  font-weight: 500;
}

.luxury-select-icon {
  position: absolute;
  right: 6px;
  width: 13px;
  height: 13px;
  color: #8C6214;
  pointer-events: none;
}

/* Primary Gold/Maroon Button */
.btn-maroon-gold {
  background: linear-gradient(135deg, #7B111D 0%, #590912 55%, #3E040A 100%);
  color: #FCE8A6;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  border: 1.5px solid #D4AF37;
  box-shadow: 0 8px 20px -4px rgba(99, 13, 22, 0.4);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-maroon-gold:hover {
  background: linear-gradient(135deg, #8F1523 0%, #680B16 100%);
  transform: translateY(-1px);
}

.btn-maroon-gold:active {
  transform: scale(0.98);
}

/* ===================================================================
   SCREEN 2: 24K BRUSHED GOLD SCRATCH PLAQUE (Matches Reference Image)
   =================================================================== */
.gold-plaque-outer {
  position: relative;
  width: 100%;
  max-width: 370px;
  margin: 4px auto;
  border-radius: 20px;
  padding: 5px;
  background: linear-gradient(135deg, #FCE8A6 0%, #B8861E 25%, #8A5E0B 50%, #E6BD53 78%, #9A6C15 100%);
  box-shadow:
    0 14px 32px -6px rgba(84, 52, 8, 0.38),
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.85);
}

/* Sparkle Glints on Top & Bottom Border */
.gold-plaque-outer::before,
.gold-plaque-outer::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 6px;
  background: radial-gradient(circle, #FFFFFF 0%, rgba(255, 244, 184, 0.8) 40%, transparent 75%);
  z-index: 15;
  pointer-events: none;
}

.gold-plaque-outer::before {
  top: -2px;
  right: 26%;
}

.gold-plaque-outer::after {
  bottom: -2px;
  left: 32%;
}

.scratch-card-wrapper {
  position: relative;
  width: 100%;
  min-height: 300px;
  border-radius: 15px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #FFFDF7 0%, #F7EDD9 65%, #EAD6B3 100%);
  border: 1.5px solid rgba(140, 98, 20, 0.65);
  box-shadow: inset 0 0 18px rgba(122, 82, 16, 0.25);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Underlying Revealed Voucher Plaque */
.scratch-inner-card {
  width: 100%;
  min-height: 300px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background:
    radial-gradient(circle at 50% 25%, #FFFDF9 0%, #FAF0DC 68%, #EFE0C2 100%);
}

.scratch-inner-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(184, 134, 30, 0.55);
  border-radius: 11px;
  pointer-events: none;
}

/* 3-Tier Gold Privilege Discount Table */
.gold-tier-table {
  width: 100%;
  max-width: 310px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #CDA03B;
  background: #FFFDF9;
  box-shadow: 0 4px 12px -2px rgba(184, 134, 30, 0.22);
}

#scratchCanvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 10 !important;
  cursor: pointer;
  transition: opacity 0.45s ease;
}

/* Redeemed Stamp & Red Scratch on Coupon Code */
.coupon-code-scratched {
  position: relative;
  display: inline-block;
  color: #B91C1C !important;
  opacity: 0.85;
}

.coupon-code-scratched::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  top: 50%;
  height: 3.5px;
  background: linear-gradient(90deg, #DC2626 0%, #EF4444 48%, #991B1B 100%);
  transform: translateY(-50%) rotate(-4deg);
  border-radius: 9999px;
  box-shadow: 0 1px 4px rgba(185, 28, 28, 0.45);
}

.redeemed-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  border: 3px solid #B91C1C;
  color: #B91C1C;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.18em;
  padding: 6px 18px;
  border-radius: 10px;
  background: rgba(255, 250, 245, 0.94);
  box-shadow: 0 6px 20px rgba(185, 28, 28, 0.25);
  z-index: 25;
  pointer-events: none;
}

/* Screen Fade Animation */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-animate {
  animation: fadeSlideUp 0.35s ease-out forwards;
}

/* Bottom 3 Perks Row (Matches Reference Image) */
.perks-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 390px;
  margin: 12px auto 2px;
  padding: 6px 2px;
}

.perk-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(0.75rem, 3.1vw, 0.92rem);
  color: var(--maroon-primary);
  white-space: nowrap;
}

.perk-divider {
  width: 1px;
  height: 22px;
  background: rgba(160, 120, 40, 0.45);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Decorative Corner Ribbons & Floral Art */
.ribbon-top-left {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 155px;
  height: 175px;
  pointer-events: none;
  z-index: 4;
}

.ribbon-bottom-right {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 165px;
  height: 135px;
  pointer-events: none;
  z-index: 3;
}

.floral-left {
  position: absolute;
  bottom: 24%;
  left: 4px;
  width: 68px;
  height: 135px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.72;
}

.floral-right {
  position: absolute;
  top: 32%;
  right: 4px;
  width: 72px;
  height: 145px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.72;
}

.corner-ornament-tr {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 56px;
  height: 56px;
  pointer-events: none;
  z-index: 3;
}

.corner-ornament-bl {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 56px;
  height: 56px;
  pointer-events: none;
  z-index: 3;
}

/* ===================================================================
   COUPON DISPENSER VENDING MACHINE (Matches Reference Image)
   =================================================================== */
.dispenser-wrapper {
  width: 100%;
  max-width: 360px;
  margin: 4px auto 8px;
  position: relative;
  transition: opacity 0.6s ease, max-height 0.6s ease, transform 0.6s ease;
}

.dispenser-bezel {
  position: relative;
  width: 100%;
  max-width: 310px;
  margin: 0 auto;
  padding: 8px 12px;
  background: linear-gradient(180deg, #FFFFFF 0%, #E2E8F0 25%, #94A3B8 55%, #64748B 85%, #CBD5E1 100%);
  border-radius: 18px;
  box-shadow:
    0 8px 24px -4px rgba(15, 23, 42, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 2px 2px #FFFFFF,
    inset 0 -2px 3px rgba(0, 0, 0, 0.35);
  border: 1.5px solid #94A3B8;
  z-index: 20;
}

.dispenser-slit {
  position: relative;
  width: 100%;
  height: 16px;
  background: radial-gradient(ellipse at center, #0F172A 0%, #020617 100%);
  border-radius: 8px;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.85);
  overflow: visible;
}

/* Animated Stage where single ticket slides out from the slit */
.dispenser-stage {
  position: relative;
  width: 100%;
  max-width: 235px;
  height: 255px;
  margin: -6px auto 4px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 10;
}

/* Ticket Slide-Out Animation */
.slide-down-ticket {
  animation: ticketDispenseSlide 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ticketDispenseSlide {
  0% {
    transform: translateY(-88%) scale(0.96);
    opacity: 0.2;
  }
  60% {
    transform: translateY(4%) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* 3 Standing Coupons Showcase (Big, Luxury, Perforated Tickets) */
.standing-coupons-grid {
  display: flex;
  gap: 7px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 410px;
  margin: 6px auto 14px;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.standing-ticket {
  flex: 1;
  min-width: 0;
  min-height: 255px;
  background: #FFFDF9;
  border-radius: 14px 14px 0 0;
  box-shadow:
    0 12px 28px -4px rgba(184, 134, 30, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.08);
  border: 1.5px solid rgba(212, 175, 55, 0.9);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
}

.standing-ticket:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px -4px rgba(184, 134, 30, 0.55);
}

.standing-ticket.vip-ticket {
  border: 2px solid #CDA03B;
  box-shadow:
    0 14px 32px -3px rgba(184, 134, 30, 0.5),
    0 0 16px rgba(251, 191, 36, 0.4);
}

/* Yellow Header Tab with Barcode */
.ticket-barcode-tab {
  background: linear-gradient(180deg, #FDE047 0%, #EAB308 100%);
  padding: 8px 4px 6px;
  border-radius: 12px 12px 0 0;
  border-bottom: 2px dashed rgba(184, 134, 30, 0.85);
  text-align: center;
  position: relative;
}

.ticket-barcode-tab.vip {
  background: linear-gradient(180deg, #FDE68A 0%, #F59E0B 50%, #D97706 100%);
}

.barcode-svg {
  width: 100%;
  max-width: 90px;
  height: 17px;
  margin: 0 auto;
  display: block;
}

.barcode-sub {
  font-family: monospace;
  font-size: 8px;
  font-weight: 800;
  color: #78350F;
  letter-spacing: 0.06em;
  display: block;
  margin-top: 2.5px;
  line-height: 1;
}

/* Ticket Main Body */
.ticket-body {
  padding: 8px 5px 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  background: #FFFDF9;
}

/* Modern, Bold, Luxury Retail Discount Typography (Matches Reference Korean Voucher) */
.ticket-pct-val {
  font-family: 'Montserrat', 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-weight: 900;
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
}

@media (min-width: 640px) {
  .ticket-pct-val {
    font-size: 50px;
  }
}

.ticket-pct-val .pct-sign {
  font-family: 'Montserrat', 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.76em;
  font-weight: 800;
  margin-left: 2px;
  transform: translateY(-2px);
  display: inline-block;
}

.ticket-scallop-svg {
  width: 100%;
  height: 11px;
  display: block;
  margin-top: -1px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.05));
}

/* ========================================================
   COMPREHENSIVE MOBILE OPTIMIZATIONS
   - iPhone / Android responsive text scaling
   - Elimination of iOS Safari zoom on input focus
   - Smooth touch interactions & momentum scrolling
   ======================================================== */
@media (max-width: 640px) {
  input, select, textarea {
    font-size: 16px !important; /* Prevents iOS auto-zoom on focus */
  }
  
  .poster-shell {
    width: 100vw;
    max-width: 100vw;
    padding: 10px 8px;
    margin: 0;
    border-radius: 0;
  }

  .gold-frame {
    padding: 14px 10px 12px;
    border-radius: 18px;
  }
}

@media (max-width: 380px) {
  .ticket-pct-val {
    font-size: 34px !important;
  }

  .standing-coupons-grid {
    gap: 4px;
  }

  .ticket-body {
    padding: 6px 3px 4px;
  }

  .standing-ticket {
    min-height: 235px;
  }

  .scratch-win-title {
    font-size: 26px !important;
  }
}

@media (max-width: 330px) {
  .ticket-pct-val {
    font-size: 29px !important;
  }
}

/* Touch improvements */
button, a, input, select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}


