:root {
    /* ---- Burgundy / Rose-Gold Palette ---- */
    --color-bg: #FFF8F5;
    /* Soft warm cream-rose */
    --color-bg-secondary: #FBEDEA;
    --color-primary: #B11226;
    /* Elegant red */
    --color-primary-dark: #7A1228;
    /* Deep burgundy */
    --color-primary-deep: #520A18;
    --color-text: #2A1416;
    --color-text-muted: #7A5A5C;

    /* Rose-gold accents (replacing gold) */
    --color-accent: #E0BFB8;
    --color-accent-deep: #C89B92;
    --color-accent-soft: rgba(224, 191, 184, 0.5);

    --font-heading: 'Aref Ruqaa', serif;
    --font-body: 'Tajawal', sans-serif;
    --font-names: 'Reem Kufi', sans-serif;

    --transition-slow: 0.8s ease-in-out;
    --transition-normal: 0.3s ease;
    --ease-lux: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: #2A0A12;
    /* Deep burgundy outside the mobile frame */
    background-image:
        radial-gradient(circle at 20% 10%, rgba(177, 18, 38, 0.25), transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(122, 18, 40, 0.35), transparent 50%);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Mobile Constraint */
.mobile-container {
    width: 100%;
    max-width: 480px;
    /* Phone format */
    min-height: 100vh;
    height: 100vh;
    /* Embroidery (تطريز) pattern tiled across the whole card as the background */
    background-color: #efe2d4;
    /* warm cream behind the red cross-stitch */
    background-image: url("assets/1background.svg");
    background-repeat: repeat;
    background-size: 150px auto;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    box-shadow: 0 0 60px rgba(122, 18, 40, 0.45);
    border-left: 1px solid rgba(224, 191, 184, 0.25);
    border-right: 1px solid rgba(224, 191, 184, 0.25);
}

.mobile-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* ---------------- FALLING PETALS ---------------- */
.petals-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    overflow: hidden;
}

.petal {
    position: absolute;
    top: -8%;
    width: 12px;
    height: 12px;
    border-radius: 50% 0 50% 0;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-deep));
    opacity: 0.7;
    will-change: transform;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translate3d(0, -10vh, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.75;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translate3d(var(--drift, 30px), 110vh, 0) rotate(540deg);
        opacity: 0;
    }
}

/* Hidden Content Wrapper */
.hidden-wrapper {
    display: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.visible-wrapper {
    display: block;
    animation: fadeInWrapper 1s ease forwards;
}

@keyframes fadeInWrapper {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ---------------- VIDEO INTRO (full-screen) ---------------- */

.intro-screen {
    position: absolute;
    inset: 0;
    z-index: 100;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    transition: opacity 0.9s ease, transform 1s var(--ease-lux);
}

.intro-screen.opened {
    opacity: 0;
    transform: scale(1.08);
    pointer-events: none;
}

/* Intro video fills the whole screen (cover) — mobile-safe */
.intro-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Soft vignette so the hint stays readable over any frame */
.intro-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(120% 80% at 50% 32%, transparent 55%, rgba(0, 0, 0, 0.38) 100%);
}

.intro-hint {
    position: absolute;
    bottom: 8%;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    transition: opacity 0.5s ease;
}

.intro-screen.opened .intro-hint {
    opacity: 0;
}

/* "انقر للفتح" in Cairo — clear, legible pill over the video */
.intro-hint__text {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.9rem;
    border-radius: 40px;
    background: rgba(122, 18, 40, 0.6);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
    animation: pulse 1.8s ease-in-out infinite;
}

/* Tap ripple — reinforces "click to open" */
.intro-hint__tap {
    position: relative;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
}

.intro-hint__tap::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    animation: tapRipple 1.6s ease-out infinite;
}

@keyframes tapRipple {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

/* Intro flow states: still frame → click → video → flash → reveal card */
.intro-video,
.intro-overlay {
    transition: opacity 0.4s ease;
}

.intro-screen.started {
    cursor: default;
}

.intro-screen.started .intro-hint {
    opacity: 0;
    pointer-events: none;
}

.intro-screen.revealing {
    background: transparent;
}

.intro-screen.revealing .intro-video,
.intro-screen.revealing .intro-overlay {
    opacity: 0;
}

/* Strong flash when the opening video ends, blooming into the card */
.intro-flash {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    background: #ffffff;
    /* Pure strong white flash */
}

.intro-screen.flashing .intro-flash {
    animation: introFlash 1.2s ease-in-out forwards;
}

@keyframes introFlash {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }

    30% {
        opacity: 1;
        transform: scale(1.05);
    }

    55% {
        opacity: 1;
        transform: scale(1.18);
    }

    100% {
        opacity: 0;
        transform: scale(1.75);
    }
}

.pulse {
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.85;
    }

    50% {
        transform: scale(1.06);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.85;
    }
}


/* ---------------- MAIN SITE ---------------- */

.mute-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 50;
    background: rgba(255, 248, 245, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--color-accent-deep);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 16px rgba(122, 18, 40, 0.2);
    transition: var(--transition-normal);
}

.mute-btn:hover {
    background: #fff;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(122, 18, 40, 0.3);
}

h1,
h2,
h3,
.bismillah {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    font-weight: 400;
    font-feature-settings: "calt" 1, "liga" 1, "rlig" 1, "swsh" 1;
    font-variant-ligatures: contextual;
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 2rem;
    position: relative;
    color: var(--color-primary-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent-deep), var(--color-primary), var(--color-accent-deep), transparent);
}

.section-title::before {
    content: '❧';
    display: block;
    color: var(--color-accent-deep);
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    opacity: 0.9;
}

/* Poetic blessing above the details section */
.wedding-verse {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    text-align: center;
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    font-size: clamp(1rem, 4.4vw, 1.3rem);
    line-height: 1.5;
    margin-bottom: 2.6rem;
    text-shadow: 0 2px 10px rgba(255, 248, 245, 0.7);
    font-feature-settings: "calt" 1, "liga" 1, "rlig" 1, "swsh" 1;
    font-variant-ligatures: contextual;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Fallback embroidery shown only if the hero video fails to load
       (the video itself carries the embroidery + orange garland). */
    background-color: #efe2d4;
    background-image: url("assets/1background.svg");
    background-repeat: repeat;
    background-size: 150px auto;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem 1.2rem 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
}

/* ---- Oranges & leaves video as the FULL hero background ----
   The video already has the embroidery pattern + animated orange garland baked in,
   so it's shown as-is, filling the whole hero and anchored to the top so the
   garland stays at the crown. */
.hero-oranges {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.oranges-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    /* Richer, deeper colors so the embroidery + oranges match the reference */
    filter: saturate(1.8) contrast(1.55) brightness(0.84);
}

/* ---- Burgundy arch panel (rounded "mihrab" top) holding the names in white ---- */
.arch-panel {
    position: relative;
    z-index: 2;
    width: 86%;
    max-width: 360px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 4.5rem 1.6rem 3rem;
    color: #fff;
    background:
        radial-gradient(circle at 50% 18%, rgba(177, 18, 38, 0.55), transparent 60%),
        linear-gradient(170deg, #7A1228 0%, #5e0f20 55%, #4a0b18 100%);
    /* Rectangle with a strongly rounded arch on top, gentle rounding at the base */
    border-radius: 50% 50% 18px 18px / 30% 30% 4% 4%;
    border: 1.5px solid rgba(224, 191, 184, 0.45);
    box-shadow:
        0 18px 50px rgba(74, 11, 24, 0.45),
        inset 0 0 30px rgba(0, 0, 0, 0.25);
}

/* The text/names fade in only AFTER the white flash has cleared (JS adds
   .content-in once the bloom is gone), so the fade plays on a settled floral
   screen and is clearly visible — not hidden under the white.
   NOTE: easing is ease-in-out (NOT --ease-lux). --ease-lux front-loads opacity
   to ~0.95 in the first ~300ms, which makes a fade look instant. ease-in-out
   spreads the opacity change evenly across the whole duration. */
.hero.content-in .hero-content {
    animation: cardFadeIn 1.8s ease-in-out forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bismillah {
    font-size: 1.7rem;
    margin-bottom: 0.4rem;
    opacity: 0.95;
    color: #FBEAE2;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

/* Inside the arch, the heading inherits white instead of the burgundy default */
.arch-panel .bismillah {
    color: #FBEAE2;
}

.scratch-card-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 240px;
    min-height: 70px;
    margin: 0.4rem auto 0.8rem;
    background: transparent;
    /* No white card behind — scratching reveals the text on the soft card bg */
    border-radius: 14px;
    overflow: hidden;
    touch-action: none;
    /* Prevent scroll while scratching */
    z-index: 5;
}

#scratch-canvas,
.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    z-index: 10;
    border-radius: 12px;
    transition: opacity 0.6s var(--ease-lux);
    touch-action: none;
}

#scratch-canvas:active,
.scratch-canvas:active {
    cursor: grabbing;
}

/* ---- Scratch feedback: dust while scratching + reveal burst ---- */
.scratch-dust {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #F3D9D1, #C89B92 70%);
    box-shadow: 0 0 4px rgba(200, 155, 146, 0.7);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 15;
    will-change: transform, opacity;
    animation: dustFly 0.7s ease-out forwards;
}

@keyframes dustFly {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3);
    }
}

.scratch-sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #F2C879 42%, rgba(214, 160, 70, 0) 72%);
    box-shadow: 0 0 7px rgba(242, 200, 121, 0.9);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 16;
    will-change: transform, opacity;
    animation: sparkleBurst 0.9s ease-out forwards;
}

@keyframes sparkleBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }

    25% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(1.15);
    }
}

/* Let the sparkle/dust burst spill past the card edges once it's revealed
   (the cover canvas has faded out, so clipping is no longer needed) */
.scratch-card-wrapper.revealed {
    overflow: visible;
}

/* Warm bloom the moment a card is revealed */
.scratch-card-wrapper.revealed::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(245, 230, 200, 0.85), transparent 70%);
    pointer-events: none;
    z-index: 12;
    animation: revealFlash 0.75s ease-out forwards;
}

@keyframes revealFlash {
    0% {
        opacity: 0.9;
    }

    100% {
        opacity: 0;
    }
}

/* Revealed text pops in with a soft glow */
.scratch-card-wrapper.revealed .reveal-text {
    animation: revealPop 0.75s var(--ease-lux);
}

@keyframes revealPop {
    0% {
        transform: scale(0.82);
        filter: brightness(1.5);
        text-shadow: 0 0 16px rgba(224, 191, 184, 0.95);
    }

    55% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
        text-shadow: 0 0 0 rgba(224, 191, 184, 0);
    }
}

.scratch-instruction {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-primary);
    margin-bottom: 0;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    animation: pulse 2s infinite ease-in-out;
}

.scratch-instruction.hidden-instruction {
    opacity: 0;
    transform: translateY(5px);
    pointer-events: none;
}

.scratch-label {
    font-size: 1.1rem;
    color: var(--color-primary-dark);
    margin-top: 0.6rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
    font-family: var(--font-body);
}

.scratch-general-instruction {
    text-align: center;
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    animation: pulse 2s infinite ease-in-out;
}

.reveal-text {
    padding: 0.8rem 0.5rem;
    margin: 0;
    width: 100%;
    text-align: center;
    font-weight: 700;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.15rem;
}

/* ---- Date split into يوم / شهر / سنة squares ---- */
.date-boxes {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    max-width: 300px;
    margin: 0.5rem auto 0.6rem;
}

.date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
}

.scratch-card-wrapper.date-square {
    width: 100%;
    max-width: none;
    min-height: 0;
    aspect-ratio: 1 / 1;
    margin: 0 0 0.45rem;
    background: #fff;
    border: 1px solid var(--color-accent-soft);
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(122, 18, 40, 0.08);
}

.reveal-text.date-num {
    padding: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-primary);
}

.date-box-label {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.names {
    font-family: var(--font-names);
    font-size: 2.6rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 14px rgba(255, 248, 245, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.4;
    color: var(--color-primary-dark);
}

.name-part {
    opacity: 0;
    transform: translateY(30px);
    background: linear-gradient(100deg, var(--color-primary-dark) 0%, var(--color-primary) 45%, var(--color-accent-deep) 55%, var(--color-primary-dark) 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 5s linear infinite;
}

/* Names rendered as SVG calligraphy, recolored to white for the burgundy arch */
.name-svg {
    display: block;
    width: auto;
    height: 3.4rem;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    /* brightness(0) invert(1) turns the solid red glyphs pure white */
    filter: brightness(0) invert(1) drop-shadow(0 3px 10px rgba(0, 0, 0, 0.4));
}

.name-svg.name-groom {
    height: 3.8rem;
}

.name-svg.name-bride {
    height: 3.1rem;
    margin-top: 4px;
}

@keyframes shimmerText {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.hero.content-in .name-groom {
    animation: slideUpFade 0.9s var(--ease-lux) forwards 0.2s, shimmerText 5s linear infinite 1s;
}

.hero.content-in .name-and {
    animation: slideUpFade 0.9s var(--ease-lux) forwards 0.5s;
    font-size: 2.4rem;
    margin: 5px 0;
}

/* The "&" separator reads in cream on the burgundy arch (no burgundy shimmer) */
.arch-panel .name-and {
    background: none;
    -webkit-text-fill-color: #F3D9D1;
    color: #F3D9D1;
    -webkit-background-clip: initial;
    background-clip: initial;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.hero.content-in .name-bride {
    animation: slideUpFade 0.9s var(--ease-lux) forwards 0.8s, shimmerText 5s linear infinite 1.6s;
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.55rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
    text-shadow: 0 2px 8px rgba(255, 248, 245, 0.9);
    font-feature-settings: "calt" 1, "liga" 1, "rlig" 1, "swsh" 1;
    font-variant-ligatures: contextual;
}

/* Subtitle inside the burgundy arch reads in soft cream */
.arch-panel .subtitle {
    color: #ffffff;
    margin-bottom: 1.6rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Word-by-word reveal (set up by JS) */
.word {
    display: inline-block;
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
}

.show-section .word {
    animation: wordIn 0.6s var(--ease-lux) forwards;
    animation-delay: var(--word-delay, 0s);
}

@keyframes wordIn {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: relative;
    margin-top: 1.4rem;
    z-index: 2;
    color: var(--color-primary-dark);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 6px rgba(255, 248, 245, 0.95);
    animation: floatIndicator 2.5s ease-in-out infinite;
}

@keyframes floatIndicator {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.scroll-indicator .arrow {
    width: 15px;
    height: 15px;
    border-right: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: rotate(45deg);
    margin: 8px auto 0;
}

section {
    padding: 5rem 1.5rem;
}

/* Cream panel that carries the lower content above the embroidery background */
.content-panel {
    position: relative;
    z-index: 2;
    background: var(--color-bg);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(224, 191, 184, 0.3), transparent 55%);
    border-top: 1.5px solid rgba(224, 191, 184, 0.5);
    border-bottom: 1.5px solid rgba(224, 191, 184, 0.5);
    box-shadow: 0 -10px 40px rgba(74, 11, 24, 0.18);
}

/* Details Section */
.details-cards {
    display: flex;
    flex-direction: column;
    /* Stacked for mobile */
    gap: 1.4rem;
}

/* Card-less detail blocks — clean & centered, no box */
.card {
    background: transparent;
    padding: 0.5rem 0.5rem;
    text-align: center;
    position: relative;
}

.card .icon {
    font-size: 2.6rem;
    margin-bottom: 0.6rem;
    display: inline-block;
    animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.8rem;
    color: var(--color-primary-dark);
}

.card p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* Decorative wedding divider between detail blocks (SVG ornament) */
.ornament-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0;
}

.ornament-divider__svg {
    width: 82%;
    max-width: 320px;
    height: auto;
    display: block;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-outline {
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(177, 18, 38, 0.3);
}

.btn-primary {
    background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #FFF1ED;
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 6px 18px rgba(177, 18, 38, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(177, 18, 38, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Countdown */
.countdown-section {
    background:
        linear-gradient(180deg, var(--color-bg-secondary), #fff);
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: nowrap;
    /* Tighter for mobile */
    direction: ltr;
    /* Order يوم → ساعة → دقيقة → ثانية from left to right */
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid var(--color-accent-soft);
    padding: 1rem 0.5rem;
    border-radius: 12px;
    flex: 1;
    box-shadow: 0 6px 16px rgba(122, 18, 40, 0.08);
}

.time-box .number {
    font-family: var(--font-heading);
    font-size: 2.45rem;
    color: var(--color-primary);
    line-height: 1;
}

.time-box .label {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--color-primary-dark);
    color: var(--color-accent);
    font-size: 0.9rem;
}

.footer-credit {
    font-family: var(--font-heading);
    /* Aref Ruqaa — خط الرقعة */
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    color: var(--color-accent);
    font-feature-settings: "calt" 1, "liga" 1, "rlig" 1, "swsh" 1;
    font-variant-ligatures: contextual;
}

/* Animations */
.hidden-section {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(6px);
    transition: opacity 0.9s var(--ease-lux), transform 0.9s var(--ease-lux), filter 0.9s var(--ease-lux);
}

.show-section {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* ---- Smooth staggered entrance for individual elements ---- */
.reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.9s var(--ease-lux),
        transform 0.9s var(--ease-lux);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.reveal-item.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) rotate(45deg);
    }

    40% {
        transform: translateY(-8px) rotate(45deg);
    }

    60% {
        transform: translateY(-4px) rotate(45deg);
    }
}

/* ---------------- ACCESSIBILITY: REDUCED MOTION ---------------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .petals-layer {
        display: none;
    }

    .word {
        opacity: 1;
        transform: none;
        filter: none;
        -webkit-text-fill-color: var(--color-primary-dark);
    }

    .hidden-section {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .reveal-item {
        opacity: 1 !important;
        transform: none !important;
    }

    /* EXCEPTION: the card's one-shot entrance (fade + slide-up) is the heart of
       this invitation, so we keep it even under reduced motion — it's short,
       gentle and never loops. We re-enable its real durations here (the blanket
       rule above forced every animation to 0.01ms) and keep the hero visible. */
    .hero.hidden-section {
        opacity: 1;
    }

    .hero.content-in .hero-content {
        animation-duration: 1.8s !important;
    }

    .hero.content-in .name-groom,
    .hero.content-in .name-and,
    .hero.content-in .name-bride {
        animation-duration: 0.9s !important;
    }
}