/* ================================================================
   scratch-love.css — Scratch-off Red Velvet Heart Sign  (V2)
   ================================================================
   A large heart-shaped "love sign" with deep crimson velvet
   texture. User scratches with mouse/touch → under the scratch
   layer a photo of the couple is revealed with "Susovon Weds
   Sudipta" overlay text fit inside the heart.

   V2 CHANGES:
   • Standalone section placed ABOVE the hero video.
   • Heart is near full-bleed — touches/almost touches the screen
     edges on mobile, big statement piece on desktop.
   • Heart clip now uses a scalable SVG clip-path so it stays a
     perfect heart at ANY size.
   • Gold rim + glow live on an un-clipped wrapper so they show.
   ================================================================ */

.scratch-love-section {
    position: relative;
    padding: 52px 14px 56px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(168, 22, 42, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse at center, rgba(168, 22, 42, 0.08) 0%, transparent 70%),
        var(--color-bg, #fdf8f0);
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(201, 148, 58, 0.28);
    scroll-margin-top: 150px;
}

.scratch-love-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(201, 148, 58, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 0;
}

.scratch-love-eyebrow {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: clamp(0.7rem, 2.8vw, 0.95rem);
    letter-spacing: 0.4em;
    color: var(--color-crimson, #a8162a);
    text-transform: uppercase;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.scratch-love-title {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: clamp(1.4rem, 5vw, 2rem);
    color: var(--color-text, #2c1a14);
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.scratch-love-subtitle {
    font-size: clamp(0.85rem, 3vw, 1rem);
    color: var(--color-text-muted, #6b5a52);
    margin-bottom: 30px;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* ---- Wrapper — un-clipped: carries the gold rim + glow ---- */
.scratch-heart-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
    filter:
        drop-shadow(0 22px 44px rgba(20, 5, 12, 0.32))
        drop-shadow(0 0 34px rgba(240, 201, 110, 0.22));
}

/* Gold rim drawn just behind the heart (scales with it) */
.scratch-heart-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #c9943a 0%, #f0c96e 45%, #a8162a 100%);
    clip-path: url(#heartClipPath);
    -webkit-clip-path: url(#heartClipPath);
    transform: scale(1.014);
    transform-origin: center;
}

/* Celebration glow after full reveal */
.scratch-heart-wrap.revealed {
    animation: heartWrapGlow 1.8s ease-in-out infinite;
}

@keyframes heartWrapGlow {
    0%, 100% {
        filter: drop-shadow(0 22px 44px rgba(20, 5, 12, 0.32))
                drop-shadow(0 0 26px rgba(240, 201, 110, 0.45));
    }
    50% {
        filter: drop-shadow(0 22px 44px rgba(20, 5, 12, 0.32))
                drop-shadow(0 0 60px rgba(240, 201, 110, 0.85));
    }
}

/* ---- Heart-shaped stage — NEAR FULL-BLEED on every device ---- */
.scratch-heart-stage {
    position: relative;
    width: min(96vw, 640px);
    height: min(96vw, 640px);
    margin: 0 auto;
    /* Scalable heart — follows the element size perfectly */
    clip-path: url(#heartClipPath);
    -webkit-clip-path: url(#heartClipPath);
    background: #2a0a14;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.scratch-heart-stage.is-scratching {
    cursor: grabbing;
}

/* ---- Reveal layer (under the scratch) ---- */
.scratch-reveal {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
}

.scratch-reveal-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.1) contrast(1.05);
}

/* Gradient sheen over the photo for glossy look */
.scratch-reveal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.0) 0%,
        rgba(255, 255, 255, 0.15) 45%,
        rgba(255, 248, 231, 0.35) 50%,
        rgba(255, 255, 255, 0.15) 55%,
        rgba(255, 255, 255, 0.0) 100%);
    background-size: 250% 250%;
    background-position: 0% 0%;
    animation: scratchSheenSweep 4s ease-in-out infinite;
    mix-blend-mode: overlay;
    pointer-events: none;
}

@keyframes scratchSheenSweep {
    0%, 100% { background-position: 0% 0%; }
    50%      { background-position: 100% 100%; }
}

/* ---- Names overlay on the photo ----
   Positioned inside the heart's wide zone (the bottom tapers to
   a point, so text must sit above it to avoid clip-path cuts) */
.scratch-reveal-names {
    position: absolute;
    left: 50%;
    bottom: 34%;
    transform: translateX(-50%);
    z-index: 3;
    width: 78%;
    text-align: center;
    color: #fff8e7;
    font-family: var(--font-display, 'Cinzel', serif);
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.85),
        0 0 18px rgba(168, 22, 42, 0.7);
    pointer-events: none;
    /* Subtle dark plate behind text so it's readable on any photo */
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(20,5,12,0.6) 50%, rgba(20,5,12,0.0) 100%);
    border-radius: 12px;
    backdrop-filter: blur(2px);
}

.scratch-reveal-names .reveal-groom {
    display: block;
    font-size: clamp(1rem, 4.2vw, 1.45rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.scratch-reveal-names .reveal-weds {
    display: block;
    margin: 4px 0;
    font-size: clamp(0.55rem, 2.2vw, 0.75rem);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-gold-light, #f0c96e);
    text-shadow: 0 0 8px rgba(240, 201, 110, 0.9), 0 1px 2px rgba(0, 0, 0, 0.7);
}

.scratch-reveal-names .reveal-bride {
    display: block;
    font-size: clamp(1rem, 4.2vw, 1.45rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

/* ---- Canvas scratch layer (top) ---- */
.scratch-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    cursor: grab;
    touch-action: none;
}

.scratch-heart-stage.is-scratching .scratch-canvas {
    cursor: grabbing;
}

/* ---- "Scratch to reveal" hint ---- */
.scratch-hint {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: rgba(255, 248, 231, 0.9);
    text-align: center;
    transition: opacity 0.4s ease;
}

.scratch-hint .hint-icon {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    margin-bottom: 8px;
    animation: scratchHintBounce 2s ease-in-out infinite;
}

.scratch-hint .hint-text {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: clamp(0.85rem, 3.2vw, 1.05rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.scratch-hint .hint-sub {
    margin-top: 6px;
    font-size: clamp(0.7rem, 2.6vw, 0.85rem);
    font-family: var(--font-bengali, 'Kalpurush', sans-serif);
    letter-spacing: 0.05em;
    text-transform: none;
    opacity: 0.85;
}

.scratch-heart-stage.is-scratching .scratch-hint,
.scratch-heart-stage.revealed .scratch-hint {
    opacity: 0;
}

@keyframes scratchHintBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-6px) scale(1.08); }
}

/* ---- Progress chip — below the heart, never clipped ---- */
.scratch-progress {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: max-content;
    margin: 26px auto 0;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(201, 148, 58, 0.35);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 0.85rem;
    color: var(--color-text, #2c1a14);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scratch-progress.active {
    opacity: 1;
    transform: translateY(0);
}

.scratch-progress .progress-bar-mini {
    width: 80px;
    height: 6px;
    background: rgba(168, 22, 42, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.scratch-progress .progress-bar-mini .progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--color-crimson, #a8162a), var(--color-gold, #c9943a));
    border-radius: 999px;
    transition: width 0.2s ease;
}

/* ---- After full reveal, fade out canvas ---- */
.scratch-heart-stage.revealed .scratch-canvas {
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
    pointer-events: none;
}

/* ---- "Reveal all" button — shows when user has scratched enough ---- */
.scratch-reveal-all-btn {
    margin-top: 26px;
    padding: 12px 28px;
    border: 2px solid var(--color-gold, #c9943a);
    background: transparent;
    color: var(--color-crimson, #a8162a);
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border-radius: 999px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease, background 0.3s ease, color 0.3s ease;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.scratch-reveal-all-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scratch-reveal-all-btn:hover {
    background: var(--color-crimson, #a8162a);
    color: #fff8e7;
}

.scratch-heart-stage.revealed ~ .scratch-reveal-all-btn,
.scratch-reveal-all-btn.hidden-after-reveal {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ---- Responsive — phones get edge-to-edge heart ---- */
@media (max-width: 480px) {
    .scratch-heart-stage {
        width: 97vw;
        height: 97vw;
    }
    .scratch-love-section {
        padding-left: 8px;
        padding-right: 8px;
    }
    .scratch-reveal-names {
        bottom: 32%;
    }
    .scratch-reveal-names .reveal-weds {
        letter-spacing: 0.35em;
    }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .scratch-reveal::after,
    .scratch-hint .hint-icon,
    .scratch-heart-wrap.revealed {
        animation: none !important;
    }
}
