:root {
    /* ---- White / Greige / Blush / Gold Palette ---- */
    --color-bg: #FAF8F3;
    /* Near-white warm */
    --color-bg-secondary: #E7E4DB;
    /* Greige */
    --color-primary: #B0902A;
    /* Gold (headings, numbers) */
    --color-primary-dark: #8E7018;
    /* Deep gold */
    --color-primary-deep: #6E520F;
    /* Bronze */
    --color-text: #4A4234;
    --color-text-muted: #8C8068;

    /* Blush / dusty-rose accents */
    --color-accent: #E9C9C4;
    --color-accent-deep: #D2A39C;
    --color-accent-soft: rgba(233, 201, 196, 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: #2A2620;
    /* Deep warm taupe outside the mobile frame */
    background-image:
        radial-gradient(circle at 20% 10%, rgba(233, 201, 196, 0.28), transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(201, 162, 39, 0.3), 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: #E7E4DB;
    /* greige behind the blush 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(140, 106, 26, 0.45);
    border-left: 1px solid rgba(201, 162, 39, 0.25);
    border-right: 1px solid rgba(201, 162, 39, 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, #dbe2ca, #98a77f);
    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(140, 106, 26, 0.65);
    -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(140, 106, 26, 0.22);
    transition: var(--transition-normal);
}

.mute-btn:hover {
    background: #fff;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(140, 106, 26, 0.32);
}

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: flex-start;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Cream fallback that blends with the watercolor cover's sky
       (shown only briefly while assets/cover.png loads). */
    background-color: #F2EDE5;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 6vh 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;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    /* Soft watercolor — shown as-is, no heavy color grading */
}

/* ---- Text block sitting directly on the cover image (no panel/rectangle) ---- */
.arch-panel {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0 1rem;
    color: #303231;
}

/* 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.95rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
    color: #303231;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Sits directly on the cover image, dark ink color */
.arch-panel .bismillah {
    color: #303231;
}

.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%, #F7E7A8, #C9A227 70%);
    box-shadow: 0 0 4px rgba(201, 162, 39, 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(245, 224, 138, 0.95);
    }

    55% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
        text-shadow: 0 0 0 rgba(245, 224, 138, 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(140, 106, 26, 0.1);
}

.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 — gold glyphs with a subtle 1px shadow */
.name-svg {
    display: block;
    width: auto;
    height: 3.8rem;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    /* SVG is already gold (#A6831D); just a soft 1px shadow for definition */
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

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

.name-svg.name-bride {
    height: 3.5rem;
    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.7rem;
    margin: 5px 0;
}

/* The "&" separator reads in gold to match the names */
.arch-panel .name-and {
    background: none;
    -webkit-text-fill-color: #A6831D;
    color: #A6831D;
    -webkit-background-clip: initial;
    background-clip: initial;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.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.8rem;
    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 sits on the cover image in dark ink */
.arch-panel .subtitle {
    color: #303231;
    margin-bottom: 1.6rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* "يتشرف" lead-in above the parents' names */
.invite-lead {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #303231;
    opacity: 0.92;
    margin-top: 0.2rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* The two fathers' names, each on its own line with a small connector between */
.parents {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.2rem 0 1rem;
}

.parents .parent {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    line-height: 1.4;
    color: #303231;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.parents .parent-and {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: #303231;
    opacity: 0.85;
}

/* 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: absolute;
    bottom: 1.1rem;
    left: 0;
    right: 0;
    z-index: 3;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 4px rgba(5, 5, 5, 0.7);
    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 #ffffff;
    border-bottom: 2px solid #ffffff;
    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(233, 201, 196, 0.35), transparent 55%);
    border-top: 1.5px solid rgba(210, 163, 156, 0.5);
    border-bottom: 1.5px solid rgba(210, 163, 156, 0.5);
    box-shadow: 0 -10px 40px rgba(110, 82, 15, 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(184, 144, 31, 0.32);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(184, 144, 31, 0.42);
}

.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(140, 106, 26, 0.1);
}

.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;
}

/* ---------------- RSVP / تأكيد الحضور ---------------- */
.rsvp-section {
    text-align: center;
}

.rsvp-intro {
    font-family: var(--font-body);
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 1.7rem;
}

.rsvp-form {
    max-width: 340px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.rsvp-field {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    text-align: right;
}

.rsvp-label {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary-dark);
}

.rsvp-input {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    border: 1.5px solid var(--color-accent-soft);
    background: #fff;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--color-text);
    text-align: right;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.rsvp-input::placeholder {
    color: #b8b0a0;
}

.rsvp-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(176, 144, 42, 0.16);
}

/* Attending choice: two pills backed by hidden radio inputs */
.rsvp-choices {
    display: flex;
    gap: 0.7rem;
}

.rsvp-choice {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.rsvp-choice input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.rsvp-choice__pill {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0.7rem 0.6rem;
    border-radius: 14px;
    border: 1.5px solid var(--color-accent-soft);
    background: #fff;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text-muted);
    text-align: center;
    transition: all 0.25s ease;
}

/* Selected "بحضر" → gold; selected "ما بقدر" → soft blush */
.rsvp-choice input:checked+.rsvp-choice--yes {
    background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-color: var(--color-primary-dark);
    color: #fff;
    box-shadow: 0 6px 16px rgba(176, 144, 42, 0.25);
}

.rsvp-choice input:checked+.rsvp-choice--no {
    background: var(--color-accent);
    border-color: var(--color-accent-deep);
    color: #6e4f49;
}

.rsvp-choice input:focus-visible+.rsvp-choice__pill {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.rsvp-submit {
    margin-top: 0.3rem;
}

.rsvp-submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.rsvp-status {
    min-height: 1.2em;
    font-family: var(--font-body);
    font-size: 0.98rem;
    margin: 0.1rem 0 0;
}

.rsvp-status--success {
    color: #2e7d52;
}

.rsvp-status--error {
    color: #b3402e;
}

.rsvp-status--pending {
    color: var(--color-text-muted);
}

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

.footer-credit {
    font-family: var(--font-heading);
    /* Aref Ruqaa — خط الرقعة */
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    color: #FBF1E2;
    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;
    }
}