/* =========================================================
   TALK2MARKET - DIWALI (popup + greeting page)
   All classes are prefixed with "dw-" so nothing else on the site is affected.
========================================================= */

:root {
    --dw-orange: #FF4500;
    --dw-amber: #ff9d00;
    --dw-gold: #ffd36b;
    --dw-night: #12061f;
}

/* ---------- Shared diya ---------- */
.dw-diya { display: block; overflow: visible; }
.dw-flame,
.dw-flame-core {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: dwFlicker 1.4s ease-in-out infinite;
}
.dw-flame-core { animation-duration: 1.1s; animation-delay: .2s; }
.dw-glow { animation: dwGlowPulse 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes dwFlicker {
    0%, 100% { transform: scale(1, 1) skewX(0deg); }
    25%      { transform: scale(.94, 1.08) skewX(2deg); }
    50%      { transform: scale(1.04, .94) skewX(-2deg); }
    75%      { transform: scale(.96, 1.06) skewX(1deg); }
}
@keyframes dwGlowPulse {
    0%, 100% { opacity: .75; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.12); }
}

/* =========================================================
   POPUP
========================================================= */
.dw-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 3, 16, .78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-family: 'Poppins', sans-serif;
}
.dw-overlay.dw-open { display: flex; animation: dwFade .35s ease both; }

.dw-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    text-align: center;
    color: #fff;
    padding: 30px 26px 28px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 157, 0, .35), transparent 60%),
        linear-gradient(160deg, #2a0b3d 0%, #4a1230 55%, #7a1d0b 100%);
    border: 2px solid rgba(255, 211, 107, .55);
    box-shadow: 0 0 0 6px rgba(255, 211, 107, .12), 0 25px 70px rgba(0, 0, 0, .6), 0 0 60px rgba(255, 120, 0, .35);
    animation: dwPop .5s cubic-bezier(.2, 1.2, .3, 1) both;
}

.dw-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    transition: background .2s, transform .2s;
}
.dw-close:hover { background: var(--dw-orange); transform: rotate(90deg); }
.dw-close:focus-visible, .dw-btn:focus-visible, .dw-btn-ghost:focus-visible { outline: 3px solid var(--dw-gold); outline-offset: 2px; }

.dw-diyas {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    margin: 4px auto 6px;
}
.dw-diya-s { width: 58px; }
.dw-diya-m { width: 84px; }
.dw-diyas .dw-diya:nth-child(2) .dw-flame { animation-delay: .35s; }
.dw-diyas .dw-diya:nth-child(3) .dw-flame { animation-delay: .7s; }

.dw-kicker {
    margin: 6px 0 0;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dw-gold);
}
.dw-title {
    margin: 2px 0 14px;
    font-size: clamp(34px, 9vw, 46px);
    font-weight: 700;
    line-height: 1.1;
    background: linear-gradient(90deg, #fff1b8, #ffb300, #ffe9a0, #ff9d00, #fff1b8);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: dwShine 4s linear infinite;
}

.dw-offer {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 34px 14px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff4500, #ff9d00);
    box-shadow: 0 8px 28px rgba(255, 120, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .35);
    animation: dwPulse 1.8s ease-in-out infinite;
}
.dw-offer-small { font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.dw-offer-big { font-size: 46px; font-weight: 800; line-height: 1.05; text-shadow: 0 3px 10px rgba(0, 0, 0, .3); }

.dw-text { margin: 0 auto 20px; max-width: 320px; font-size: 14.5px; line-height: 1.6; color: #f4e6ff; }

.dw-btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffe08a, #ffb300);
    color: #3a1200 !important;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(255, 179, 0, .45);
    transition: transform .2s, box-shadow .2s;
}
.dw-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 28px rgba(255, 179, 0, .6); }

.dw-sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dw-spark {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--dw-gold);
    box-shadow: 0 0 10px 2px rgba(255, 211, 107, .9);
    opacity: 0;
    animation: dwTwinkle 3s ease-in-out infinite;
}

@keyframes dwFade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes dwPop     { from { opacity: 0; transform: scale(.8) translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes dwShine   { to { background-position: 250% 0; } }
@keyframes dwPulse   { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes dwTwinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.1); } }

/* =========================================================
   GREETING PAGE
========================================================= */
.dw-page {
    position: relative;
    min-height: calc(100vh - 90px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px 72px;
    background: var(--dw-night);
    color: #fff;
    font-family: 'Poppins', sans-serif;
}
.dw-page canvas#dwFireworks {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.dw-page::after {              /* warm glow at the bottom */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 45%;
    background: radial-gradient(ellipse at 50% 120%, rgba(255, 110, 0, .45), transparent 70%);
    pointer-events: none;
}

.dw-lanterns { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.dw-lantern {
    position: absolute;
    bottom: -120px;
    width: 34px; height: 46px;
    border-radius: 12px 12px 14px 14px;
    background: linear-gradient(180deg, #ffcf5c, #ff6a00);
    box-shadow: 0 0 22px 6px rgba(255, 150, 0, .55);
    opacity: .85;
    animation: dwRise linear infinite;
}
.dw-lantern::before {
    content: "";
    position: absolute;
    top: -6px; left: 50%;
    width: 14px; height: 6px;
    transform: translateX(-50%);
    background: #7a2e08;
    border-radius: 3px 3px 0 0;
}
.dw-lantern::after {
    content: "";
    position: absolute;
    bottom: -9px; left: 50%;
    width: 2px; height: 12px;
    background: #ffd36b;
    transform: translateX(-50%);
}
@keyframes dwRise {
    0%   { transform: translateY(0) translateX(0) rotate(-4deg); opacity: 0; }
    10%  { opacity: .9; }
    50%  { transform: translateY(-55vh) translateX(18px) rotate(4deg); }
    100% { transform: translateY(-120vh) translateX(-14px) rotate(-3deg); opacity: 0; }
}

.dw-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 820px;
    text-align: center;
}

.dw-row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(6px, 2vw, 22px);
    margin-bottom: 8px;
}
.dw-row .dw-diya { width: clamp(46px, 11vw, 92px); }
.dw-row .dw-diya:nth-child(even) { width: clamp(58px, 14vw, 116px); }
.dw-row .dw-diya:nth-child(2) .dw-flame { animation-delay: .25s; }
.dw-row .dw-diya:nth-child(3) .dw-flame { animation-delay: .5s; }
.dw-row .dw-diya:nth-child(4) .dw-flame { animation-delay: .75s; }
.dw-row .dw-diya:nth-child(5) .dw-flame { animation-delay: 1s; }

.dw-page .dw-kicker { font-size: clamp(13px, 3.2vw, 18px); letter-spacing: 4px; margin-bottom: 4px; }
.dw-page .dw-title {
    font-size: clamp(46px, 13vw, 104px);
    font-weight: 800;
    margin: 0 0 8px;
    filter: drop-shadow(0 0 22px rgba(255, 150, 0, .55));
    animation: dwShine 4s linear infinite, dwFloat 4s ease-in-out infinite;
}
@keyframes dwFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.dw-wish {
    margin: 0 auto 30px;
    max-width: 600px;
    font-size: clamp(15px, 3.6vw, 19px);
    line-height: 1.7;
    color: #f4e6ff;
}

.dw-banner {
    position: relative;
    margin: 0 auto 34px;
    max-width: 640px;
    padding: 28px 22px 30px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 69, 0, .95), rgba(255, 157, 0, .95));
    border: 2px solid rgba(255, 255, 255, .45);
    box-shadow: 0 0 0 8px rgba(255, 211, 107, .15), 0 18px 60px rgba(255, 110, 0, .5);
    animation: dwPulse 2.4s ease-in-out infinite;
}
.dw-banner-top { font-size: clamp(12px, 3vw, 15px); font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.dw-banner-big {
    display: block;
    font-size: clamp(60px, 18vw, 120px);
    font-weight: 800;
    line-height: 1;
    margin: 4px 0;
    text-shadow: 0 5px 18px rgba(0, 0, 0, .35);
}
.dw-banner-text { margin: 0; font-size: clamp(16px, 4vw, 22px); font-weight: 600; line-height: 1.5; }

.dw-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.dw-actions .dw-btn { display: inline-flex; align-items: center; gap: 8px; }
.dw-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 999px;
    border: 2px solid rgba(255, 211, 107, .8);
    color: #fff !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    background: rgba(255, 255, 255, .08);
    transition: background .2s, transform .2s;
}
.dw-btn-ghost:hover { background: rgba(255, 211, 107, .22); transform: translateY(-2px); }

.dw-note { margin: 26px 0 0; font-size: 13px; color: #d9c3ee; }

/* ---------- Small screens & accessibility ---------- */
@media (max-width: 480px) {
    .dw-card { padding: 26px 18px 24px; border-radius: 18px; }
    .dw-offer { padding: 10px 24px 12px; }
    .dw-offer-big { font-size: 40px; }
    .dw-actions .dw-btn, .dw-actions .dw-btn-ghost { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .dw-flame, .dw-flame-core, .dw-glow, .dw-title, .dw-offer, .dw-banner, .dw-lantern, .dw-spark,
    .dw-page .dw-title { animation: none !important; }
    .dw-overlay.dw-open, .dw-card { animation: none !important; }
}
