@font-face {
    font-family: "Amiri";
    src: url("/fonts/amiri-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
    font-family: "Amiri";
    src: url("/fonts/amiri-400-lat.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
    font-family: "Amiri";
    src: url("/fonts/amiri-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
    font-family: "Aref Ruqaa";
    src: url("/fonts/aref-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
    font-family: "Aref Ruqaa";
    src: url("/fonts/aref-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
    font-family: "Tajawal";
    src: url("/fonts/tajawal-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
    font-family: "Tajawal";
    src: url("/fonts/tajawal-400-lat.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
    font-family: "Tajawal";
    src: url("/fonts/tajawal-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
    font-family: "Tajawal";
    src: url("/fonts/tajawal-500-lat.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
    font-family: "Tajawal";
    src: url("/fonts/tajawal-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
    --serif: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", "Times New Roman", serif;
    --display: "Aref Ruqaa", "Amiri", "Traditional Arabic", serif;
    --sans: "Tajawal", "Segoe UI", Tahoma, sans-serif;
    --ink: #2f3439;
    --muted: #8b939b;
    --rose: #8d3a49;
    --paper: #e9eef1;
    --card: #ffffff;
    --mark-top: 20%;
    --mark-h: 30vh;
    --names-top: 52%;
    --when-top: 60%;
    --btn-top: 71%;
    --p: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
html, body { margin: 0; padding: 0; }
body {
    min-height: 100%;
    background: #e6e0db;
    color: var(--ink);
    font-family: var(--serif);
    text-rendering: optimizeLegibility;
}
body.locked { overflow: hidden; height: 100%; }
img { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
::selection { background: #f0d5db; color: #3a2428; }
:focus-visible { outline: 2px solid #c9a3ab; outline-offset: 3px; }
.ltr { direction: ltr; unicode-bidi: isolate; }

.phone {
    width: min(480px, 100%);
    margin: 0 auto;
    min-height: 100svh;
    background: var(--paper);
    position: relative;
    box-shadow: 0 0 70px rgba(70, 55, 55, 0.1);
}

.screen {
    position: relative;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #f6f3f1;
}
.screen-bg {
    position: absolute;
    inset: -4%;
    width: 108%;
    height: 108%;
    object-fit: cover;
    animation: drift 22s ease-in-out infinite alternate;
}
.screen-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 58%);
    pointer-events: none;
}
@keyframes drift {
    from { transform: scale(1) translate3d(0, 0, 0); }
    to { transform: scale(1.055) translate3d(0, -1.4%, 0); }
}
.mark {
    position: absolute;
    top: var(--mark-top);
    left: 50%;
    height: var(--mark-h);
    width: auto;
    max-width: 70%;
    transform: translateX(-50%);
    z-index: 2;
    filter: drop-shadow(0 14px 18px rgba(80, 30, 40, 0.14));
    animation: markIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes markIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.94); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.hero-names {
    position: absolute;
    top: var(--names-top);
    left: 0;
    right: 0;
    margin: 0;
    text-align: center;
    z-index: 2;
    font-family: var(--display);
    font-size: 30px;
    color: var(--rose);
    animation: rise 1.1s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.when {
    position: absolute;
    top: var(--when-top);
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 46px;
    color: #5c656d;
    animation: rise 1.1s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.when-item { text-align: center; }
.when-item svg { display: block; margin: 0 auto 3px; }
.when-item small {
    display: block;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--muted);
}
.when-item strong {
    display: block;
    margin-top: 1px;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 16px;
    color: #3e464d;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.chev {
    position: absolute;
    bottom: 5.5%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-left: -10px;
    border-right: 2px solid rgba(255, 255, 255, 0.92);
    border-bottom: 2px solid rgba(255, 255, 255, 0.92);
    transform: rotate(45deg);
    z-index: 2;
    opacity: 0;
    filter: drop-shadow(0 2px 3px rgba(60, 40, 40, 0.2));
}
body.opened .chev { animation: bob 1.6s 0.4s ease-in-out infinite; opacity: 1; }
@keyframes bob {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(7px); }
}

.curtain {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.curtain-left,
.curtain-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: rgba(244, 232, 234, 0.14);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1);
    z-index: 2;
    will-change: transform;
}
.curtain-left {
    left: 0;
    border-right: 1px solid rgba(141, 58, 73, 0.45);
    box-shadow: 8px 0 28px rgba(141, 58, 73, 0.12);
}
.curtain-right {
    right: 0;
    border-left: 1px solid rgba(141, 58, 73, 0.45);
    box-shadow: -8px 0 28px rgba(141, 58, 73, 0.12);
}
.curtain.open .curtain-left { transform: translateX(-100%); }
.curtain.open .curtain-right { transform: translateX(100%); }
.entry {
    position: relative;
    z-index: 3;
    width: 180px;
    height: 180px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(141, 58, 73, 0.22);
    background: #fcfaf8;
    color: var(--rose);
    box-shadow: 0 12px 32px rgba(80, 40, 50, 0.12), inset 0 0 16px rgba(141, 58, 73, 0.05);
    cursor: pointer;
    font-family: var(--display);
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}
.entry-names {
    display: block;
    font-size: 1.45rem;
    line-height: 1.25;
}
.entry-open {
    display: block;
    margin: 6px auto 0;
    width: 72px;
    padding-top: 6px;
    border-top: 1px solid #eadfe2;
    font-family: var(--sans);
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    color: #a8848c;
}
.curtain.open .entry {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.5);
    pointer-events: none;
}

.petal {
    position: absolute;
    top: -8%;
    width: 11px;
    height: 15px;
    border-radius: 80% 10% 80% 10%;
    opacity: 0;
    pointer-events: none;
    z-index: 45;
}
.p1 { left: 16%; background: #e7b7c3; animation: fall 12s linear infinite; }
.p2 { left: 72%; background: #c5d5e2; animation: fall 14s 1.5s linear infinite; }
.p3 { left: 40%; background: #f3d5dc; width: 8px; height: 12px; animation: fall 11s 3s linear infinite; }
.p4 { left: 84%; background: #ddc3c8; animation: fall 15s 2s linear infinite; }
.p5 { left: 8%; background: #d5e2ea; width: 9px; animation: fall 13s 4s linear infinite; }
@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.55; }
    100% { transform: translateY(110vh) rotate(200deg); opacity: 0; }
}

.card {
    position: relative;
    z-index: 2;
    background: var(--card);
    border-radius: 30px;
    margin: 14px 14px 0;
    padding: 34px 22px 30px;
    box-shadow: 0 12px 34px rgba(70, 84, 96, 0.06);
    text-align: center;
}
#letter { margin-top: -34px; padding-top: 42px; }
.kicker {
    margin: 0;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #a0a8b0;
}
.bism {
    margin: 0;
    font-family: var(--display);
    font-size: 34px;
    font-weight: 400;
    line-height: 1.85;
    color: #1c1917;
}
.families {
    margin: 26px 0 0;
    font-size: 22px;
    color: #3a342f;
}
.amp { color: #c4aeb3; padding: 0 0.2em; }
.prose {
    margin: 16px auto 0;
    max-width: 28em;
    font-size: 19px;
    line-height: 2.15;
    color: #3f3a36;
}
.glyph {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-inline-start: 6px;
    vertical-align: -2px;
    color: #b76d7c;
}
.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px auto 0;
    color: #c9a3ab;
    width: min(180px, 60%);
}
.ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #e3c9cf, transparent); }
.names {
    margin: 8px 0 0;
    font-family: var(--display);
    font-size: 36px;
    color: var(--rose);
}
.place-inline { margin-top: 18px; color: #6d747c; font-family: var(--sans); }
.place-inline .kicker { display: block; margin-bottom: 4px; }
.place-inline .en {
    display: block;
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
}
.place-inline span:last-child { display: block; margin-top: 2px; font-size: 14px; line-height: 1.7; }

.date-card { padding-top: 28px; }
.cal {
    width: min(250px, 78%);
    margin: 16px auto 0;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6eaee;
    box-shadow: 0 14px 30px rgba(80, 90, 100, 0.08);
}
.cal-head {
    position: relative;
    background: #b7c0c8;
    color: #fff;
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 500;
    padding: 12px 12px 9px;
}
.cal-head::before,
.cal-head::after {
    content: "";
    position: absolute;
    top: -7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: inset 0 0 0 3px #d5dbe1;
}
.cal-head::before { right: 26%; }
.cal-head::after { left: 26%; }
.cal-body { padding: 8px 12px 16px; }
.cal-num {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 84px;
    line-height: 1;
    color: #2a2f34;
    letter-spacing: -0.03em;
}
.cal-day { margin-top: 2px; font-family: var(--serif); font-size: 18px; color: #5c656d; }
.cal-time { margin-top: 2px; font-family: var(--sans); font-size: 14px; color: var(--muted); }

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    padding: 11px 22px;
    border-radius: 999px;
    background: #f4f6f8;
    color: #5c656e;
    text-decoration: none;
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 500;
    border: 1px solid #e6ebef;
}
.pill.button, button.pill {
    border: 1px solid #e6ebef;
    cursor: pointer;
}
.pill:active { transform: scale(0.98); }

.ticks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 16px;
}
.tick {
    background: #f6f7f8;
    border-radius: 16px;
    padding: 14px 2px 10px;
}
.tick b {
    display: block;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 28px;
    font-variant-numeric: tabular-nums;
    color: #2e3338;
    animation: tick 0.35s ease;
}
.tick span { display: block; margin-top: 2px; font-family: var(--sans); font-size: 12px; color: var(--muted); }
@keyframes tick {
    from { transform: translateY(-5px); opacity: 0.3; }
    to { transform: none; opacity: 1; }
}
.today {
    margin: 22px 0 6px;
    font-family: var(--display);
    font-size: 28px;
    color: var(--rose);
}

.moment { padding-top: 8px; }
.stem {
    display: block;
    width: 1px;
    height: 28px;
    margin: 0 auto 8px;
    background: linear-gradient(#d5dbe0, #c5ced6);
    position: relative;
}
.stem::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 11px;
    height: 11px;
    margin-left: -6px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #c5ced6;
}
.moment .big {
    display: block;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 48px;
    letter-spacing: 0.03em;
    color: #2a2f34;
    line-height: 1;
}
.moment .sub { display: block; margin-top: 2px; font-family: var(--sans); color: var(--muted); }
.moment strong { display: block; margin-top: 10px; font-size: 22px; font-weight: 700; }
.moment p { margin: 6px 0 0; font-family: var(--sans); font-size: 14px; color: var(--muted); }

.loc { padding-top: 8px; }
.pinball {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 8px auto 10px;
    border-radius: 50%;
    background: #f8eef0;
    color: #b76d7c;
}
.loc-en {
    display: block;
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 500;
    color: var(--ink);
}
.loc p { margin: 4px 0 0; font-family: var(--sans); font-size: 15px; line-height: 1.7; color: #6d747c; }

.gallery { display: grid; gap: 14px; padding: 14px 14px 4px; }
.shot {
    position: relative;
    margin: 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(70, 80, 90, 0.1);
}
.shot img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
#photo2 img { aspect-ratio: 4 / 5; object-position: center 42%; }
#photo1 img { object-position: center 22%; }
.shot figcaption {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    margin: 0;
    padding: 54px 16px 16px;
    background: linear-gradient(transparent, rgba(40, 28, 32, 0.5));
    color: #fff;
    text-align: center;
    font-family: var(--display);
    font-size: 30px;
}

.close {
    min-height: 92vh;
    min-height: 92svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 22px 110px;
}
.seal {
    width: 196px;
    height: 196px;
    border-radius: 50%;
    background: #f7f4f2 url("/images/hero.webp") center 28% / cover;
    display: grid;
    place-items: center;
    box-shadow: 0 16px 40px rgba(80, 70, 70, 0.12), inset 0 0 0 10px rgba(255, 255, 255, 0.75);
}
.seal { overflow: hidden; }
.seal img { height: 64%; width: auto; }
.close h2 {
    margin: 22px 0 0;
    font-family: var(--display);
    font-weight: 400;
    font-size: 36px;
    color: var(--rose);
}
.close p { margin: 6px 0 0; font-size: 18px; color: #4e565d; }
.close .soft { font-family: var(--display); font-size: 22px; color: #6d5c60; margin-top: 10px; }

.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 70;
    pointer-events: none;
}
.progress span {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #e7b7c3, #8d3a49);
    transform-origin: 100% 50%;
    transform: scaleX(var(--p));
}
.dock {
    position: fixed;
    z-index: 60;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: max(16px, calc(50% - 240px + 14px));
}
.iconbtn {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    color: var(--rose);
    box-shadow: 0 8px 22px rgba(60, 70, 80, 0.14);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.iconbtn.on { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.hint, .resume {
    position: fixed;
    z-index: 60;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--sans);
}
.hint {
    bottom: calc(22px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.82);
    color: #6d747c;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    backdrop-filter: blur(8px);
    pointer-events: none;
}
.resume {
    bottom: calc(22px + env(safe-area-inset-bottom));
    border: 0;
    cursor: pointer;
    background: #6d2433;
    color: #fff;
    border-radius: 999px;
    padding: 12px 22px;
    font-family: var(--sans);
    font-size: 15px;
    box-shadow: 0 10px 24px rgba(80, 30, 40, 0.25);
}

.motion .reveal:not(.show) { opacity: 0; transform: translateY(18px); }
.reveal.show { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@media (max-width: 360px) {
    .bism { font-size: 28px; }
    .prose { font-size: 17px; }
    .cal-num { font-size: 72px; }
    .names, .close h2, .hero-names { font-size: 28px; }
    :root { --mark-h: 26vh; --names-top: 50%; --when-top: 58%; --btn-top: 69%; }
}
@media (min-height: 820px) {
    :root { --mark-h: 32vh; --names-top: 54%; --when-top: 62%; --btn-top: 72%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .motion .reveal:not(.show) { opacity: 1; transform: none; }
}
