@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: "Aref Ruqaa";
    src: url("/fonts/aref-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "Tajawal";
    src: url("/fonts/tajawal-500.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

:root {
    --rose: #e06b7e;
    --ink: #3a2c2e;
    --script: "Aref Ruqaa", "Amiri", serif;
    --serif: "Amiri", "Noto Naskh Arabic", serif;
    --sans: "Tajawal", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
    background: #fff;
    color: var(--ink);
    font-family: var(--serif);
    overflow: hidden;
}
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
picture { display: block; height: 100%; }

.poster, .gate {
    position: relative;
    width: min(430px, 100%);
    margin: 0 auto;
    background:
        radial-gradient(circle at 50% 0%, #fff, transparent 46%),
        linear-gradient(180deg, #fff7f6 0%, #fdeff1 100%);
    overflow: hidden;
}
.poster {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding: 54px 26px 40px;
}
.poster.on { overflow-y: auto; -webkit-overflow-scrolling: touch; }

.brush {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.brush path {
    fill: none;
    stroke: #f6b7c8;
    stroke-width: 30;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.float {
    position: absolute;
    width: 34px;
    height: 32px;
    fill: none;
    stroke: #f3b0c2;
    stroke-width: 1.6;
    pointer-events: none;
}
.h1, .g1 { top: 7%; right: 10%; width: 28px; }
.h2, .g2 { top: 16%; left: 8%; width: 22px; }
.h3, .g3 { top: 28%; right: 6%; width: 18px; }
.h4 { top: 62%; left: 5%; }
.h5, .g4 { bottom: 8%; right: 12%; width: 24px; }
.g1 { top: 12%; }
.g2 { top: 22%; }
.g3 { top: 8%; right: 18%; left: auto; }

.title, .gate-copy { position: relative; z-index: 1; text-align: center; }
.title p, .gate-copy p, h1, h2 {
    margin: 0;
    font-family: var(--script);
    font-weight: 700;
    color: var(--rose);
    line-height: 1.15;
}
.title p, .gate-copy > p:first-child { font-size: clamp(34px, 9vw, 46px); }
h1, h2 { font-size: clamp(52px, 14vw, 72px); }
.dear {
    margin-top: 8px !important;
    font-family: var(--serif) !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    color: #6a4e52 !important;
    line-height: 1.7 !important;
}
.flourish {
    display: block;
    width: 92px;
    height: 16px;
    margin: 8px auto 0;
    background:
        radial-gradient(circle at 50% 50%, var(--rose) 0 3px, transparent 3.5px),
        linear-gradient(var(--rose), var(--rose)) left 8px center / 28px 1.5px no-repeat,
        linear-gradient(var(--rose), var(--rose)) right 8px center / 28px 1.5px no-repeat;
}

.polaroid {
    position: relative;
    z-index: 1;
    width: min(300px, 86%);
    margin: 28px auto 0;
    padding: 12px 12px 18px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(120, 60, 70, 0.12);
    transform: rotate(-1.5deg);
}
.polaroid.soft { transform: rotate(1.4deg); margin-top: 26px; }
.polaroid picture, .polaroid img { height: 280px; }
.polaroid figcaption {
    margin: 12px 8px 4px;
    text-align: center;
    font-size: 17px;
    line-height: 1.8;
    color: #6d5658;
}

.words {
    position: relative;
    z-index: 1;
    margin: 26px auto 0;
    max-width: 18em;
    text-align: center;
}
.words p {
    margin: 0;
    font-size: 22px;
    line-height: 1.95;
}
.words p + p { margin-top: 14px; }

.foot {
    position: relative;
    z-index: 1;
    margin-top: 36px;
    min-height: 230px;
    text-align: center;
}
.lavender {
    position: absolute;
    left: 8%;
    bottom: 36px;
    width: 86px;
    height: 150px;
}
.lavender .stem { fill: none; stroke: #6f8f55; stroke-width: 2.2; stroke-linecap: round; }
.lavender ellipse { fill: #b99ad8; }
.env {
    position: relative;
    display: inline-block;
    width: 230px;
    height: 150px;
    margin-top: 36px;
    transform: rotate(-8deg);
    filter: drop-shadow(0 12px 16px rgba(180, 80, 100, 0.18));
}
.env-back, .env-sheet, .env-flap { position: absolute; inset: 0; }
.env-back {
    background: #f3a9bb;
    border-radius: 6px;
    clip-path: polygon(0 28%, 50% 62%, 100% 28%, 100% 100%, 0 100%);
}
.env-sheet {
    top: 18px;
    right: 16px;
    left: 16px;
    bottom: 22px;
    background:
        repeating-linear-gradient(180deg, transparent 0 16px, rgba(255, 255, 255, 0.55) 16px 18px),
        #f7c3d0;
    border-radius: 4px;
}
.env-flap {
    background: #f8c9d4;
    clip-path: polygon(0 0, 100% 0, 50% 58%);
    height: 78%;
}
.eh { position: absolute; width: 16px; height: 15px; fill: #e25b73; stroke: none; }
.e1 { top: 28%; right: 18%; }
.e2 { top: 48%; left: 22%; width: 12px; }
.e3 { bottom: 18%; right: 36%; width: 13px; }
.by {
    margin: 18px 0 0;
    font-family: var(--sans);
    font-size: 14px;
    color: #8d6a70;
}
.share {
    margin-top: 8px;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--rose);
}

.gate {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4vh 24px 3vh;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.gate-copy { width: 100%; }
.gate.away { opacity: 0; visibility: hidden; pointer-events: none; }
.open-mail {
    position: relative;
    width: 280px;
    height: 196px;
    margin-top: 8px;
    padding: 0;
}
.open-mail .lavender { left: 6px; bottom: 28px; }
.open-mail .env { margin-top: 8px; }
.open-mail span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 26px;
    white-space: nowrap;
    color: var(--rose);
}

@media (max-width: 360px) {
    .polaroid picture, .polaroid img { height: 230px; }
    h1, h2 { font-size: 48px; }
}
