/* =====================================================
   DHIRAJ FASHION — Diwali Scratch & Win (landing page)
   Used only by index.html. admin.html still uses style.css
   ===================================================== */

:root {
  --gold: #f6c744;
  --gold-l: #ffe9a3;
  --gold-d: #b98a14;
  --red: #d7131d;
  --red-d: #8f0f17;
  --ink: #14060a;
  --panel: rgba(28, 8, 12, .86);
  --line: #e9b73a;
  --maxw: 1536px;
  --gut: clamp(12px, 3vw, 58px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: #12050a; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }

body.diwali {
  font-family: 'Poppins', system-ui, sans-serif;
  color: #fff;
  min-height: 100vh;
  display: block;
  background:
    radial-gradient(1200px 520px at 50% 22%, rgba(150, 25, 40, .38), transparent 70%),
    radial-gradient(500px 400px at 4% 60%, rgba(246, 199, 68, .10), transparent 70%),
    radial-gradient(500px 400px at 96% 70%, rgba(246, 199, 68, .10), transparent 70%),
    linear-gradient(180deg, #0d0407 0%, #1a070c 40%, #12050a 100%);
  overflow-x: hidden;
}
/* soft gold bokeh dust */
body.diwali::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background-image:
    radial-gradient(2px 2px at 12% 30%, #ffd978 50%, transparent 52%),
    radial-gradient(2px 2px at 27% 62%, #ffd978 50%, transparent 52%),
    radial-gradient(3px 3px at 44% 82%, #ffd978 50%, transparent 52%),
    radial-gradient(2px 2px at 63% 40%, #ffd978 50%, transparent 52%),
    radial-gradient(3px 3px at 78% 74%, #ffd978 50%, transparent 52%),
    radial-gradient(2px 2px at 91% 36%, #ffd978 50%, transparent 52%),
    radial-gradient(2px 2px at 6% 88%, #ffd978 50%, transparent 52%),
    radial-gradient(2px 2px at 55% 12%, #ffd978 50%, transparent 52%);
}
main, .topbar, .foot { position: relative; z-index: 1; }
.hidden { display: none !important; }
svg { display: block; }

/* ---------------- header ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 8px var(--gut);
  height: 74px;
  background: linear-gradient(180deg, #0a0305, #14060a);
  border-bottom: 1px solid rgba(246, 199, 68, .35);
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; }
.logo svg { width: 62px; height: 44px; }
.logo span { display: flex; flex-direction: column; line-height: .98; }
.logo b {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 25px; letter-spacing: .4px;
  background: linear-gradient(180deg, #fff3bd, #f1bd36 60%, #c8931a); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav { display: flex; gap: clamp(18px, 3vw, 54px); }
.nav a {
  color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; letter-spacing: .2px; white-space: nowrap;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav a.on, .nav a:hover { color: var(--gold); border-color: var(--gold); }
.happy {
  justify-self: end; display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; color: #3b0d12;
  padding: 8px 18px 8px 22px; border-radius: 30px;
  background: linear-gradient(180deg, #ffe9a3, #f6c744 55%, #e0a622);
  box-shadow: 0 0 0 1px #fff3 inset, 0 4px 18px rgba(246, 199, 68, .35);
}
.happy svg { width: 30px; height: 30px; }

/* ---------------- hero ---------------- */
.hero { max-width: var(--maxw); margin: 0 auto; background: #2a070d; }
.hero img { display: block; width: 100%; height: auto; }

/* ---------------- register ---------------- */
.register { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); position: relative; z-index: 3; margin-top: -4px; }
.reg-bar {
  display: grid; grid-template-columns: minmax(300px, 1.2fr) repeat(3, minmax(140px, 1fr)) minmax(200px, .8fr); align-items: center; gap: 16px;
  padding: 14px 22px 14px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(40, 10, 14, .96), rgba(18, 5, 8, .96));
  border: 2px solid var(--line);
  box-shadow: 0 0 0 1px #000 inset, 0 0 26px rgba(246, 199, 68, .22), 0 10px 30px rgba(0, 0, 0, .5);
}
.reg-title { display: flex; align-items: center; gap: 14px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 26px; line-height: 1.1; color: var(--gold-l); }
.reg-gift { width: 60px; height: 60px; flex: none; filter: drop-shadow(0 0 8px rgba(246, 199, 68, .5)); }
.field {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 6px; background: #f1f1f1; color: #3a3a3a;
  border: 2px solid transparent; transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246, 199, 68, .35); }
.field svg { width: 20px; height: 20px; flex: none; color: #222; }
.field input {
  flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent;
  font: 500 15px 'Poppins', sans-serif; color: #111;
}
.field input::placeholder { color: #555; }
.field input[type=number]::-webkit-outer-spin-button, .field input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type=number] { -moz-appearance: textfield; }

.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; border: 0;
  font: 700 20px 'Poppins', sans-serif; color: #2a0a0a; text-decoration: none;
  height: 54px; padding: 0 26px; border-radius: 30px; white-space: nowrap;
  background: linear-gradient(180deg, #fff0b0 0%, #f6c744 48%, #d9a21f 100%);
  box-shadow: 0 0 0 2px #7a560088 inset, 0 0 20px rgba(246, 199, 68, .45), 0 6px 14px rgba(0, 0, 0, .45);
  transition: transform .15s, filter .15s;
}
.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-gold:active { transform: translateY(1px); }
.btn-gold:disabled { opacity: .7; cursor: wait; }
.btn-gold svg { width: 20px; height: 20px; }
.btn-gold.small { height: 44px; font-size: 15px; padding: 0 20px; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  font: 600 14px 'Poppins', sans-serif; color: var(--gold-l); height: 44px; padding: 0 20px; border-radius: 30px;
  background: transparent; border: 1.5px solid rgba(246, 199, 68, .6);
}
.btn-ghost:hover { background: rgba(246, 199, 68, .12); }
.btn-ghost.small { font-size: 14px; }

.err { margin-top: 10px; text-align: center; color: #ffd0d0; background: rgba(215, 19, 29, .25); border: 1px solid rgba(255, 90, 90, .55); padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.reg-note { margin-top: 8px; text-align: center; font-size: 12.5px; color: rgba(255, 233, 163, .75); }
.reg-note b { color: var(--gold); }

/* ---------------- prizes ---------------- */
.prizes { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 8px var(--gut) 8px; }
.ribbon-h {
  position: relative; z-index: 2; text-align: center; margin: 18px auto 20px; width: fit-content;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: .3px; color: #4a0d0f;
}
.ribbon-h span {
  display: block; padding: 4px clamp(40px, 6vw, 84px) 6px; position: relative; z-index: 1;
  background: linear-gradient(180deg, #ffe9a3 0%, #f6c744 50%, #d9a21f 100%);
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55));
}
/* gold hairlines left/right of ribbon */
.prizes::before {
  content: ''; position: absolute; left: var(--gut); right: var(--gut); top: 54px; height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent 4%, rgba(246, 199, 68, .7) 24%, transparent 36%, transparent 64%, rgba(246, 199, 68, .7) 76%, transparent 96%);
}

.prize-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(10px, 1.4vw, 22px); margin: 0 clamp(0px, 3vw, 50px); position: relative; z-index: 2; }
.pc {
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
  border: 2px solid var(--line); background: #3a1208;
  box-shadow: 0 0 0 1px #000 inset, 0 0 22px rgba(246, 199, 68, .28), 0 10px 22px rgba(0, 0, 0, .45);
  transition: transform .2s, box-shadow .2s;
}
.pc:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px #000 inset, 0 0 30px rgba(246, 199, 68, .5), 0 14px 26px rgba(0, 0, 0, .5); }
.pc-art {
  position: relative; aspect-ratio: 1.55 / 1; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 55%, #ffdf86 0%, #e3a52a 45%, #9b5a10 100%);
}
.pc-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-art svg { width: 100%; height: 100%; }
.pc h3 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: clamp(18px, 1.55vw, 22px); line-height: 1.05; text-align: center;
  padding: 8px 6px 9px; min-height: 3.1em; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #c8161f, #8a0c13);
  border-top: 1.5px solid #ffd978;
}

.side-diya { position: absolute; width: clamp(54px, 6vw, 96px); z-index: 1; top: 52%; filter: drop-shadow(0 0 18px rgba(255, 170, 40, .55)); }
.side-diya svg { width: 100%; height: auto; aspect-ratio: 1; }
.side-diya.left { left: 0; }
.side-diya.right { right: 0; }

/* ---------------- scratch ---------------- */
.scratch-sec { max-width: var(--maxw); margin: 26px auto 0; padding: 0 var(--gut); }
.scratch-panel {
  display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.7fr) minmax(200px, .8fr); align-items: center; gap: 24px;
  padding: 22px 34px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(40, 10, 14, .94), rgba(18, 5, 8, .94));
  border: 2px solid var(--line);
  box-shadow: 0 0 0 1px #000 inset, 0 0 26px rgba(246, 199, 68, .22), 0 10px 30px rgba(0, 0, 0, .5);
}
.sc-intro { display: flex; align-items: center; gap: 18px; position: relative; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: clamp(26px, 2.3vw, 34px); line-height: 1.1; color: var(--gold-l); }
.sc-hand { width: 76px; height: 76px; flex: none; transform: rotate(-12deg); filter: drop-shadow(0 0 10px rgba(246, 199, 68, .5)); }
.sc-luck { justify-self: end; }
.btn-gold.luck { cursor: default; font-size: 22px; height: 58px; padding: 0 30px; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; letter-spacing: .3px; }
.btn-gold.luck svg { width: 30px; height: 30px; }
.btn-gold.luck:hover { transform: none; filter: none; }

.sc-stage { min-width: 0; }
.scratch-wrap {
  position: relative; width: 100%; height: clamp(120px, 12vw, 150px); border-radius: 12px; overflow: hidden;
  border: 3px solid var(--line); box-shadow: 0 0 0 1px #000, 0 0 24px rgba(246, 199, 68, .4);
  background: #1b0709; user-select: none; -webkit-user-select: none;
}
.prize {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; padding: 8px 14px;
  background: radial-gradient(ellipse at 50% 40%, #ffe9a3 0%, #f6c744 55%, #c8901a 100%); color: #3b0d12;
}
.p-won { font: 800 12px 'Poppins', sans-serif; letter-spacing: 1.5px; color: #8f0f17; }
.p-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.p-icon { font-size: clamp(34px, 4vw, 50px); line-height: 1; }
.p-txt { text-align: left; }
.p-title { font: 800 clamp(22px, 2.6vw, 32px)/1 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.p-sub { font: 600 12.5px 'Poppins', sans-serif; margin-top: 3px; color: #5a1a1a; }
.scratch-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; touch-action: none; cursor: grab; transition: opacity .7s ease; }
.scratch-wrap canvas.gone { opacity: 0; pointer-events: none; }
.scratch-wrap.won { animation: pop .7s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.03); box-shadow: 0 0 40px rgba(246, 199, 68, .9); } 100% { transform: scale(1); } }

/* locked card (before registration) */
.lock-card {
  position: absolute; inset: 0; z-index: 3; width: 100%; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font: 700 17px 'Poppins', sans-serif; color: #111;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .22) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(62deg, rgba(0, 0, 0, .10) 0 1px, transparent 1px 9px),
    linear-gradient(135deg, #b9b9b9, #efefef 28%, #9c9c9c 52%, #e4e4e4 76%, #adadad);
}
.lock-card svg { width: 46px; height: 46px; filter: none; }
.lock-card svg use { fill: #1a1a1a; }
.lock-card:hover span { text-decoration: underline; }
.lock-card:focus-visible { outline: 3px solid var(--gold); outline-offset: -6px; }
.lock-card.gone { display: none; }

.hint { text-align: center; margin-top: 8px; font-size: 12.5px; color: rgba(255, 233, 163, .8); }
.repeat { margin-bottom: 10px; text-align: center; font-size: 13px; font-weight: 600; color: #ffe9a3; background: rgba(246, 199, 68, .14); border: 1px dashed var(--gold); border-radius: 10px; padding: 8px 12px; }

/* customer + claim */
.cust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.cust > div { background: rgba(255, 255, 255, .06); border: 1px solid rgba(246, 199, 68, .4); border-radius: 12px; padding: 10px 14px; text-align: center; }
.cust small { display: block; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255, 233, 163, .7); }
.cust b { display: block; margin-top: 2px; font-size: 16px; color: #fff; overflow-wrap: anywhere; }
.claim {
  margin: 14px auto 0; max-width: 720px; text-align: center; padding: 20px 22px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(40, 10, 14, .94), rgba(18, 5, 8, .94)); border: 2px solid var(--line); box-shadow: 0 0 24px rgba(246, 199, 68, .25);
}
.claim-t { font: 700 26px 'Barlow Condensed', sans-serif; color: var(--gold); letter-spacing: .5px; }
.claim-code { margin: 8px auto; width: fit-content; padding: 8px 20px; border: 2px dashed var(--gold); border-radius: 10px; font: 700 24px/1 'Poppins', monospace; letter-spacing: 3px; color: #fff; }
.claim-d { font-size: 14px; color: rgba(255, 255, 255, .85); }
.claim-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0 8px; }
.claim-note { font-size: 12.5px; color: rgba(255, 233, 163, .75); margin-bottom: 12px; }

/* ---------------- trust strip ---------------- */
.trust {
  max-width: var(--maxw); margin: 26px auto 0; padding: 18px var(--gut);
  display: grid; grid-template-columns: repeat(4, auto); justify-content: center; gap: clamp(20px, 6vw, 110px);
}
.trust > div { display: flex; align-items: center; gap: 14px; position: relative; font: 600 17px 'Poppins', sans-serif; color: #fff; }
.trust > div + div::before { content: ''; position: absolute; left: calc(clamp(20px, 6vw, 110px) / -2); top: 50%; height: 44px; width: 1px; transform: translateY(-50%); background: linear-gradient(180deg, transparent, var(--gold), transparent); }
.trust svg { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 0 8px rgba(246, 199, 68, .4)); }

/* ---------------- winners + terms ---------------- */
.info { max-width: 1100px; margin: 18px auto 0; padding: 0 var(--gut); display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }
.info-card { padding: 22px 26px; border-radius: 16px; background: rgba(28, 8, 12, .8); border: 1px solid rgba(246, 199, 68, .45); }
.info-card h2 { font: 800 28px 'Barlow Condensed', sans-serif; color: var(--gold); margin-bottom: 10px; }
.info-card p, .info-card li { font-size: 14px; line-height: 1.65; color: rgba(255, 255, 255, .86); }
.info-card ul { padding-left: 18px; }
.info-card li + li { margin-top: 4px; }

.foot { text-align: center; padding: 30px 16px 40px; font-size: 14px; color: rgba(255, 255, 255, .75); }
.foot em { display: block; margin-top: 4px; color: var(--gold-l); font-style: normal; font-weight: 600; letter-spacing: .5px; }
.adminlink { display: inline-block; margin-top: 12px; font-size: 11px; color: rgba(255, 255, 255, .28); text-decoration: none; }
.adminlink:hover { color: rgba(255, 255, 255, .6); }

/* toast + confetti (index page) */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 40px); opacity: 0; z-index: 50; background: #fff; color: #111; padding: 10px 18px; border-radius: 30px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); transition: .3s; max-width: 90vw; text-align: center; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ================= responsive ================= */
@media (max-width: 1280px) {
  .reg-bar { grid-template-columns: 1fr 1fr 1fr; }
  .reg-title { grid-column: 1 / -1; justify-content: center; text-align: center; }
  .reg-bar .btn-gold { grid-column: 1 / -1; justify-self: center; min-width: 260px; }
}
@media (max-width: 1100px) {
  .prize-row { grid-template-columns: repeat(3, 1fr); margin: 0; }
  .side-diya { display: none; }
  .prizes::before { display: none; }
  .scratch-panel { grid-template-columns: 1fr; gap: 16px; padding: 20px 18px; text-align: center; }
  .sc-intro { justify-content: center; }
  .sc-luck { justify-self: center; }
  .trust { grid-template-columns: repeat(2, auto); gap: 18px 40px; }
  .trust > div + div::before { display: none; }
  .info { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topbar { grid-template-columns: 1fr auto; height: auto; row-gap: 6px; padding-top: 8px; padding-bottom: 8px; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; gap: 22px; padding-bottom: 2px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 13.5px; }
  html { scroll-padding-top: 110px; }
  .logo svg { width: 48px; height: 34px; }
  .logo b { font-size: 20px; }
  .happy { font-size: 13px; padding: 6px 12px 6px 14px; }
  .happy svg { width: 22px; height: 22px; }
  /* hero: show the centre "Diwali Scratch & Win" artwork instead of a tiny full-width strip */
  .hero img { height: clamp(168px, 46vw, 260px); object-fit: cover; object-position: 50% 50%; }
  .register { margin-top: 12px; }
  .reg-bar { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .reg-title { font-size: 22px; }
  .reg-gift { width: 48px; height: 48px; }
  .reg-bar .btn-gold { width: 100%; min-width: 0; }
}
@media (max-width: 560px) {
  .prize-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pc h3 { font-size: 18px; }
  .scratch-wrap { height: 150px; }
  .p-won { font-size: 10.5px; }
  .cust { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr 1fr; gap: 16px 10px; padding-left: 14px; padding-right: 14px; }
  .trust > div { font-size: 13.5px; gap: 8px; }
  .trust svg { width: 34px; height: 34px; }
  .claim-code { font-size: 19px; letter-spacing: 2px; }
  .sc-intro { font-size: 24px; }
  .sc-hand { width: 58px; height: 58px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .scratch-wrap.won { animation: none; } .pc, .btn-gold { transition: none; } }
