@font-face {
    font-family: "Amiri";
    src: url("/fonts/amiri-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Amiri";
    src: url("/fonts/amiri-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "Aref Ruqaa";
    src: url("/fonts/aref-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Tajawal";
    src: url("/fonts/tajawal-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Tajawal";
    src: url("/fonts/tajawal-500.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

:root {
    --ink: #2c211c;
    --rose: #8d3d4c;
    --muted: #8d746c;
    --paper: rgba(255, 250, 245, 0.88);
    --line: rgba(141, 61, 76, 0.18);
    --serif: "Amiri", "Noto Naskh Arabic", serif;
    --display: "Aref Ruqaa", "Amiri", serif;
    --sans: "Tajawal", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: #f3ebe3;
    font-family: var(--serif);
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 80% 0%, rgba(255, 244, 230, 0.9), transparent 42%),
        radial-gradient(circle at 10% 100%, rgba(141, 61, 76, 0.08), transparent 36%),
        #f3ebe3;
    pointer-events: none;
}

.progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    z-index: 40;
    background: transparent;
}
.progress span {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: right center;
    transform: scaleX(var(--p, 0));
    background: var(--rose);
}

.gate {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 22px;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.55), transparent 46%),
        #f6f0e8;
    text-align: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}
.gate.away { opacity: 0; visibility: hidden; }
.gate-kicker, .eyebrow, .song, .when, .gate-date {
    margin: 0;
    font-family: var(--sans);
    letter-spacing: 0.14em;
    color: var(--muted);
}
.gate-kicker { font-size: 13px; }
.gate-to {
    margin: 8px 0 0;
    font-family: var(--display);
    font-size: clamp(42px, 10vw, 68px);
    font-weight: 400;
    color: var(--rose);
}
.gate-from { margin: 0; font-size: 22px; }
.gate-date { margin-top: 10px; font-size: 14px; }
.seal, .pill {
    margin-top: 26px;
    border: 0;
    border-radius: 999px;
    padding: 14px 28px;
    background: var(--rose);
    color: #fffaf6;
    font-family: var(--sans);
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}
.seal { box-shadow: 0 16px 30px rgba(141, 61, 76, 0.22); }

.page {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 0 0 120px;
    opacity: 0;
    pointer-events: none;
}
.page.on {
    opacity: 1;
    pointer-events: auto;
    animation: rise 0.8s ease both;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.hero { position: relative; min-height: 92vh; }
.hero picture, .hero img { width: 100%; height: 92vh; object-fit: cover; }
.hero-copy {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    padding: 72px 22px 28px;
    text-align: center;
    color: #fffaf6;
    background: linear-gradient(transparent, rgba(28, 16, 18, 0.72));
}
.hero .kicker, .hero .when { color: rgba(255, 246, 240, 0.82); }
.hero h1 {
    margin: 8px 0;
    font-family: var(--display);
    font-size: clamp(46px, 12vw, 78px);
    font-weight: 400;
}
.hero h1 span { display: inline-block; margin: 0 0.2em; color: #f0c9cf; }

.sheet, .vows, .moon, .close, .quote {
    margin: 18px 14px 0;
    padding: 36px 22px;
    border-radius: 28px;
    background: var(--paper);
    box-shadow: 0 18px 40px rgba(70, 42, 36, 0.06);
    text-align: center;
}
.eyebrow { font-size: 13px; }
.sheet h2, .moon h2, .close h2, .quote b {
    margin: 8px 0 0;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(32px, 8vw, 46px);
    color: var(--rose);
}
.verse {
    margin: 18px auto 0;
    max-width: 18em;
    font-size: 24px;
    line-height: 1.9;
}
.signed { margin: 22px 0 0; font-family: var(--display); font-size: 28px; color: var(--rose); }

.quote p {
    margin: 0 auto;
    max-width: 16em;
    font-size: 28px;
    line-height: 1.8;
}
.quote b { display: block; margin-top: 12px; }

.album { padding: 8px 0 0; }
.frame { margin: 28px 14px 0; }
.frame img {
    width: 100%;
    height: auto;
    border-radius: 28px;
    box-shadow: 0 18px 36px rgba(50, 30, 28, 0.12);
}
.frame figcaption {
    margin: 12px 8px 0;
    text-align: center;
    font-size: 20px;
    line-height: 1.8;
}
.frame.side { margin-inline-start: 18%; }

.vow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}
.vow-grid article {
    padding: 16px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.55);
}
.vow-grid h3 {
    margin: 0;
    font-family: var(--display);
    font-size: 30px;
    font-weight: 400;
    color: var(--rose);
}
.vow-grid p { margin: 6px 0 0; font-family: var(--sans); font-size: 14px; line-height: 1.7; color: var(--muted); }

.moon p, .close p { margin: 12px auto 0; max-width: 20em; font-size: 20px; line-height: 1.8; }
.song { font-size: 14px !important; }
.pill { display: inline-block; }
.button { border: 0; cursor: pointer; }

.music {
    position: fixed;
    z-index: 40;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(255, 250, 245, 0.92);
    color: var(--rose);
    font-family: var(--sans);
    font-size: 13px;
    box-shadow: 0 10px 24px rgba(60, 30, 30, 0.12);
    cursor: pointer;
}
.music.on { background: var(--rose); color: #fffaf6; }

.reveal { animation: rise 0.9s ease both; }

@media (max-width: 640px) {
    .frame.side { margin-inline-start: 14px; }
    .verse { font-size: 22px; }
    .hero picture, .hero img { height: 86vh; }
    .hero { min-height: 86vh; }
}
@media (prefers-reduced-motion: reduce) {
    .page.on, .reveal { animation: none; }
}
