@font-face {
    font-family: "Cairo";
    src: url("cairo.woff2") format("woff2");
    font-weight: 200 900;
    font-display: swap;
}

:root {
    --ink: #0a0706;
    --cream: #f6efe3;
    --gold: #d9b877;
    --gold-light: #f3e2bd;
    --gold-deep: #a9814a;
    --wine: #5d1626;
    --wine-deep: #3d0d18;
    --display: "Cairo", system-ui, sans-serif;
    --body: "Cairo", system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* الخلفية: نفس صورة المرجع، مموّهة وداكنة عشان تبان نفس الأجواء */

body {
    background-color: var(--ink);
    color: var(--cream);
    font-family: var(--body);
    line-height: 1.75;
    overflow-x: hidden;
    min-height: 100vh;
}

.bg-art {
    position: fixed;
    inset: -12%;
    z-index: 0;
    background: url("wedding-photo.jpg") center/cover no-repeat;
    filter: blur(22px) brightness(0.34) saturate(0.9);
    transform: scale(1.06);
    pointer-events: none;
}

.bg-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(10, 7, 6, 0.35), rgba(10, 7, 6, 0.88) 72%),
        linear-gradient(180deg, rgba(10, 7, 6, 0.7), rgba(10, 7, 6, 0.55) 45%, rgba(10, 7, 6, 0.92));
}

.stage {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.page-frame {
    position: absolute;
    inset: 9px;
    color: rgba(217, 184, 119, 0.55);
}

.page-frame::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(217, 184, 119, 0.16);
}

.corner {
    position: absolute;
    width: 42px;
    height: 42px;
    color: rgba(217, 184, 119, 0.75);
}

.corner-tl {
    top: -1px;
    right: -1px;
}

.corner-tr {
    top: -1px;
    left: -1px;
    transform: scaleX(-1);
}

.corner-bl {
    bottom: -1px;
    right: -1px;
    transform: scaleY(-1);
}

.corner-br {
    bottom: -1px;
    left: -1px;
    transform: scale(-1, -1);
}

/* ================= ورق الورد (نفس حركة المرجع) ================= */

.flowers {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.flowers.active {
    opacity: 1;
}

.petal {
    position: absolute;
    top: -40px;
    width: var(--size);
    height: calc(var(--size) * 1.4);
    border-radius: 85% 0 85% 0;
    opacity: 0.8;
    background: linear-gradient(135deg, var(--petal-light), var(--petal-dark));
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    animation: petalFall var(--duration) linear var(--delay) infinite;
    will-change: transform;
}

.petal.tone-1 {
    --petal-light: #f8eadb;
    --petal-dark: #d9bda5;
}

.petal.tone-2 {
    --petal-light: #f4dce0;
    --petal-dark: #d8adb6;
}

.petal.tone-3 {
    --petal-light: #eee1cc;
    --petal-dark: #cbb28c;
}

.petal.tone-4 {
    --petal-light: #fff0e5;
    --petal-dark: #e4c8b5;
}

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

    25% {
        transform: translate3d(var(--drift), 25vh, 0) rotate(100deg);
    }

    50% {
        transform: translate3d(calc(var(--drift) * -1), 55vh, 0) rotate(220deg);
    }

    75% {
        transform: translate3d(var(--drift), 80vh, 0) rotate(300deg);
    }

    100% {
        transform: translate3d(0, 115vh, 0) rotate(420deg);
    }
}

/* ================= عناصر مشتركة ================= */

.eyebrow {
    display: block;
    font-family: var(--body);
    font-size: 0.78rem;
    letter-spacing: 0.46em;
    color: var(--gold-light);
    opacity: 0.92;
}

.flourish {
    display: flex;
    justify-content: center;
    color: var(--gold);
    margin: 1.4rem 0;
}

.flourish svg {
    width: min(240px, 66vw);
    height: auto;
}

.flourish-small svg {
    width: min(200px, 56vw);
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 0.8, 0.28, 1);
    transition-delay: var(--d, 0s);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ================= الغلاف ================= */

.welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.2rem 1.2rem;
    background: radial-gradient(ellipse at 50% 45%, rgba(10, 7, 6, 0.965), rgba(10, 7, 6, 0.995) 82%);
    transition: opacity 1.2s ease, visibility 1.2s ease;
}

.welcome-screen.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.doorway {
    position: relative;
    width: min(430px, 100%);
    min-height: min(560px, 74vh);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.2rem 1.6rem 2.6rem;
    border: 1px solid rgba(217, 184, 119, 0.5);
    border-radius: 260px 260px 18px 18px;
    background:
        radial-gradient(ellipse at 50% 8%, rgba(93, 22, 38, 0.5), rgba(10, 7, 6, 0.97) 70%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 60px rgba(0, 0, 0, 0.45);
    animation: doorwayIn 1.6s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

.doorway::before {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(217, 184, 119, 0.2);
    border-radius: 250px 250px 12px 12px;
}

@keyframes doorwayIn {
    from {
        opacity: 0;
        transform: translateY(26px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.doorway-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.cover-eyebrow {
    font-size: 0.95rem;
    letter-spacing: 0.52em;
    margin-bottom: 0.4rem;
}

.welcome-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(2.9rem, 15vw, 4.4rem);
    line-height: 1.5;
    margin-top: 0.6rem;
    background: linear-gradient(165deg, #fdf6e4 4%, #e8cf9a 38%, #bd9257 68%, #f8ebca 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 8px 28px rgba(217, 184, 119, 0.22));
}

/* زرار الختم */

.seal {
    position: relative;
    margin-top: 2.6rem;
    width: clamp(150px, 42vw, 176px);
    height: clamp(150px, 42vw, 176px);
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 28%, rgba(93, 22, 38, 0.96), rgba(42, 11, 19, 0.99) 74%);
    box-shadow:
        inset 0 0 0 1px rgba(217, 184, 119, 0.55),
        inset 0 0 34px rgba(217, 184, 119, 0.16),
        0 18px 46px rgba(0, 0, 0, 0.55);
    color: var(--gold-light);
    cursor: pointer;
    font-family: var(--body);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.28, 1), box-shadow 0.5s ease;
    -webkit-tap-highlight-color: transparent;
}

.seal:hover,
.seal:focus-visible {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        inset 0 0 0 1px rgba(243, 226, 189, 0.85),
        inset 0 0 44px rgba(217, 184, 119, 0.26),
        0 24px 56px rgba(0, 0, 0, 0.6);
    outline: none;
}

.seal:active {
    transform: scale(0.985);
}

.seal-halo {
    position: absolute;
    inset: -13px;
    border-radius: 50%;
    border: 1px solid rgba(217, 184, 119, 0.32);
    animation: haloPulse 3.6s ease-in-out infinite;
}

.seal-halo::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(217, 184, 119, 0.14);
}

@keyframes haloPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

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

.seal-ring {
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 1px dashed rgba(217, 184, 119, 0.35);
}

.seal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.seal-bow {
    width: clamp(58px, 16vw, 68px);
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.seal-label {
    font-size: clamp(0.9rem, 3.7vw, 1rem);
    letter-spacing: 0.1em;
    color: var(--gold-light);
}

/* ================= المحتوى ================= */

main {
    position: relative;
    z-index: 2;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5.5rem 1.1rem 4rem;
    gap: 2.2rem;
}

.arch {
    width: min(520px, 100%);
    padding: clamp(2.6rem, 9vw, 3.4rem) clamp(1rem, 5vw, 2rem) clamp(2.2rem, 8vw, 3rem);
    border: 1px solid rgba(217, 184, 119, 0.42);
    border-radius: 280px 280px 20px 20px;
    background: radial-gradient(ellipse at 50% 6%, rgba(93, 22, 38, 0.34), rgba(10, 7, 6, 0.5) 72%);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.basmala {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.15rem, 5vw, 1.5rem);
    color: var(--gold-light);
    letter-spacing: 0.02em;
    margin-bottom: 0.9rem;
    text-shadow: 0 0 26px rgba(217, 184, 119, 0.25);
}

.blessing {
    font-size: clamp(0.88rem, 3.5vw, 1rem);
    letter-spacing: 0.14em;
    color: rgba(246, 239, 227, 0.85);
}

.names {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 1rem 0 0.4rem;
}

.name {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(3.6rem, 20vw, 6.4rem);
    line-height: 1.18;
    background: linear-gradient(165deg, #fdf6e4 4%, #e8cf9a 42%, #bd9257 72%, #f8ebca 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 10px 30px rgba(217, 184, 119, 0.22));
}

.and {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    font-family: var(--body);
    font-size: clamp(0.95rem, 4vw, 1.15rem);
    color: var(--gold);
    opacity: 0.9;
    line-height: 1;
    margin: 0.15rem 0;
}

.and::before,
.and::after {
    content: "";
    display: block;
    width: clamp(34px, 12vw, 54px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217, 184, 119, 0.7), transparent);
}

.invite-line {
    margin-top: 0.4rem;
    font-size: clamp(0.95rem, 3.9vw, 1.08rem);
    color: rgba(246, 239, 227, 0.92);
}

/* ================= صورة العروسين ================= */

.couple {
    position: relative;
    width: min(56vw, 214px);
    margin: 1.7rem auto 0.6rem;
    display: block;
}

.couple img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5)) saturate(1.03) contrast(1.02);
    animation: coupleFloat 7.5s ease-in-out infinite;
}

.couple-arch {
    position: absolute;
    z-index: 0;
    left: -8%;
    right: -8%;
    top: -6%;
    bottom: 9%;
    border: 1px solid rgba(217, 184, 119, 0.5);
    border-bottom: 0;
    border-radius: 50% 50% 0 0 / 44% 44% 0 0;
    background: radial-gradient(ellipse at 50% 24%, rgba(93, 22, 38, 0.52), rgba(10, 7, 6, 0.18) 72%);
    box-shadow: inset 0 0 34px rgba(217, 184, 119, 0.14), 0 0 30px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.couple-arch::after {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(217, 184, 119, 0.22);
    border-bottom: 0;
    border-radius: inherit;
}

.couple-glow {
    position: absolute;
    z-index: 1;
    inset: -18% -20% 6%;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 46%, rgba(243, 226, 189, 0.26), rgba(217, 184, 119, 0.1) 44%, transparent 72%);
    filter: blur(9px);
    pointer-events: none;
}

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

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

.date-card {
    margin-top: 1.8rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.75rem 1.4rem;
    border: 1px solid rgba(217, 184, 119, 0.34);
    border-radius: 999px;
    background: rgba(12, 9, 8, 0.45);
    font-size: clamp(0.86rem, 3.6vw, 1rem);
    color: var(--gold-light);
}

.date-sep {
    color: rgba(217, 184, 119, 0.85);
    font-size: 0.7rem;
}

/* العد التنازلي */

.countdown {
    width: min(430px, 100%);
}

.countdown-label {
    font-size: 0.8rem;
    letter-spacing: 0.32em;
    color: rgba(246, 239, 227, 0.6);
    margin-bottom: 0.9rem;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(0.4rem, 2.2vw, 0.75rem);
}

.cd-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: clamp(0.55rem, 2.8vw, 0.8rem) 0.2rem;
    border: 1px solid rgba(217, 184, 119, 0.28);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(24, 16, 13, 0.68), rgba(10, 7, 6, 0.5));
    box-shadow: inset 0 1px 0 rgba(243, 226, 189, 0.1);
}

.cd-value {
    font-family: var(--body);
    font-weight: 600;
    font-size: clamp(1.25rem, 5.8vw, 1.7rem);
    line-height: 1.25;
    color: var(--gold-light);
    font-variant-numeric: tabular-nums;
}

.cd-unit {
    font-size: clamp(0.6rem, 2.5vw, 0.7rem);
    letter-spacing: 0.12em;
    color: rgba(246, 239, 227, 0.58);
}

.scroll-cue {
    width: 22px;
    height: 36px;
    border: 1px solid rgba(217, 184, 119, 0.5);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-cue span {
    width: 3px;
    height: 8px;
    border-radius: 2px;
    background: rgba(217, 184, 119, 0.85);
    animation: cueDrop 2.2s ease-in-out infinite;
}

@keyframes cueDrop {
    0% {
        transform: translateY(0);
        opacity: 0.2;
    }

    40% {
        opacity: 1;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

/* ================= المكان ================= */

.venue {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 1.1rem;
}

.venue-card {
    position: relative;
    width: min(520px, 100%);
    text-align: center;
    padding: clamp(2.6rem, 9vw, 3.4rem) clamp(1.2rem, 6vw, 2.4rem);
    border: 1px solid rgba(217, 184, 119, 0.32);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 0%, rgba(93, 22, 38, 0.5), rgba(10, 8, 7, 0.86) 64%),
        rgba(10, 8, 7, 0.75);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(217, 184, 119, 0.08);
    backdrop-filter: blur(3px);
    color: rgba(217, 184, 119, 0.7);
}

.card-corner {
    position: absolute;
    width: 46px;
    height: 46px;
}

.card-corner-tl {
    top: 8px;
    right: 8px;
}

.card-corner-tr {
    top: 8px;
    left: 8px;
    transform: scaleX(-1);
}

.card-corner-bl {
    bottom: 8px;
    right: 8px;
    transform: scaleY(-1);
}

.card-corner-br {
    bottom: 8px;
    left: 8px;
    transform: scale(-1, -1);
}

.venue-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(2rem, 9vw, 2.8rem);
    line-height: 1.5;
    margin-top: 0.35rem;
    background: linear-gradient(165deg, #fdf6e4 4%, #e8cf9a 44%, #bd9257 74%, #f8ebca 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.venue-kind {
    font-size: clamp(0.78rem, 3.3vw, 0.9rem);
    letter-spacing: 0.28em;
    color: rgba(246, 239, 227, 0.6);
}

.venue-name {
    margin-top: 0.6rem;
    font-family: var(--display);
    font-size: clamp(1.6rem, 7vw, 2.1rem);
    color: var(--gold-light);
}

.venue-address {
    margin-top: 0.25rem;
    font-size: clamp(0.92rem, 3.9vw, 1.05rem);
    color: rgba(246, 239, 227, 0.88);
}

.maps-btn {
    margin-top: clamp(1.7rem, 6.5vw, 2.2rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.35rem;
    border-radius: 999px;
    border: 1px solid rgba(243, 226, 189, 0.42);
    background: linear-gradient(160deg, var(--wine) 0%, var(--wine-deep) 100%);
    color: var(--gold-light);
    text-decoration: none;
    font-family: var(--body);
    font-size: clamp(0.85rem, 3.7vw, 0.98rem);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(243, 226, 189, 0.18);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.maps-btn:hover,
.maps-btn:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(243, 226, 189, 0.28);
    outline: none;
}

.maps-icon {
    width: 17px;
    height: 17px;
    flex: none;
}

/* ================= الختام ================= */

.closing {
    padding: 1rem 1.5rem 4.5rem;
    display: flex;
    justify-content: center;
    color: rgba(217, 184, 119, 0.75);
}

/* ================= الموسيقى ================= */

.music-toggle {
    position: fixed;
    bottom: calc(1.2rem + env(safe-area-inset-bottom));
    left: 1.2rem;
    z-index: 40;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(217, 184, 119, 0.55);
    background: rgba(12, 9, 8, 0.7);
    backdrop-filter: blur(8px);
    color: var(--gold-light);
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    -webkit-tap-highlight-color: transparent;
}

.music-toggle:hover,
.music-toggle:focus-visible {
    transform: scale(1.06);
    outline: none;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.music-icon {
    display: block;
    line-height: 1;
}

/* ================= الشاشات الكبيرة ================= */

@media (min-width: 768px) {
    .page-frame {
        inset: 16px;
    }

    .corner {
        width: 54px;
        height: 54px;
    }

    .hero {
        gap: 2.6rem;
    }

    .arch {
        padding: 3.6rem 3rem 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .seal-halo,
    .scroll-cue span,
    .couple img {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .petal {
        animation-duration: 24s;
    }

    .doorway {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}
