/* Gosok & Buka (anniversary/gosok-hati): burgundy velvet, rose-gold filigree, red roses */

:root {
    --ec-bg: #36061a;
    --ec-bg2: #701030;
    --ec-paper: #fff8f2;
    --ec-ink: #3d0a1b;
    --ec-light: #fff1e8;
    --ec-muted: #efbcc6;
    --ec-accent: #e8204f;
    --ec-gold: #e8a98c;
    --ec-petal: #ef3b57;
    --ec-petal-deep: #9c0a28;
    --ec-leaf: #3f8f5e;
    /* foil of the variant's metal (rose gold or gold): deep, bright, metal, bright, deep */
    --gh-foil: linear-gradient(135deg,
        color-mix(in srgb, var(--ec-gold) 55%, #2a0a00),
        color-mix(in srgb, var(--ec-gold) 40%, #fffaf0) 28%,
        var(--ec-gold) 50%,
        color-mix(in srgb, var(--ec-gold) 30%, #fffaf0) 72%,
        color-mix(in srgb, var(--ec-gold) 50%, #2a0a00));
    --gh-rule: color-mix(in srgb, var(--ec-gold) 85%, #3a1000);
    --gh-serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --gh-script: 'Pinyon Script', 'Cormorant Garamond', cursive;
    --gh-text: 'Lora', Georgia, serif;
    /* velvet damask: a quiet woven motif over the deep ground */
    --gh-damask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%23ffd9c8' stroke-opacity='.13' stroke-width='1'%3E%3Cpath d='M48 8c10 12 10 22 0 32-10-10-10-20 0-32Z'/%3E%3Cpath d='M48 88c10-12 10-22 0-32-10 10-10 20 0 32Z'/%3E%3Cpath d='M8 48c12-10 22-10 32 0-10 10-20 10-32 0Z'/%3E%3Cpath d='M88 48c-12-10-22-10-32 0 10 10 20 10 32 0Z'/%3E%3Cpath d='M30 30c6 2 10 6 12 12M66 30c-6 2-10 6-12 12M30 66c6-2 10-6 12-12M66 66c-6-2-10-6-12-12'/%3E%3C/g%3E%3Cg fill='%23ffd9c8' fill-opacity='.18'%3E%3Ccircle cx='48' cy='48' r='2.4'/%3E%3Ccircle cx='0' cy='0' r='2'/%3E%3Ccircle cx='96' cy='0' r='2'/%3E%3Ccircle cx='0' cy='96' r='2'/%3E%3Ccircle cx='96' cy='96' r='2'/%3E%3C/g%3E%3C/svg%3E");
    --gh-velvet:
        var(--gh-damask) 0 0 / 96px 96px,
        radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--ec-petal) 32%, transparent), transparent 60%),
        radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--ec-bg2) 90%, var(--ec-petal)), transparent 65%),
        linear-gradient(180deg, var(--ec-bg2), var(--ec-bg) 55%, color-mix(in srgb, var(--ec-bg) 80%, black));
}

body.gh {
    background: var(--gh-velvet);
    background-attachment: fixed;
    color: var(--ec-light);
    font-family: var(--gh-text);
    font-size: 1.04rem;
    line-height: 1.85;
}
.gh-defs { position: absolute; }

/* soft red light breathing behind everything */
.gh-glow { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.gh-glow span { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; background: radial-gradient(circle, color-mix(in srgb, var(--ec-accent) 70%, transparent), transparent 70%); }
.gh-glow span:nth-child(1) { width: 70vmax; height: 70vmax; left: -36vmax; top: -30vmax; }
.gh-glow span:nth-child(2) { width: 60vmax; height: 60vmax; right: -32vmax; bottom: -26vmax; background: radial-gradient(circle, color-mix(in srgb, var(--ec-gold) 55%, transparent), transparent 70%); opacity: .35; }
@media (prefers-reduced-motion: no-preference) {
    .gh-glow span { animation: gh-drift 20s ease-in-out infinite alternate; }
    .gh-glow span:nth-child(2) { animation-duration: 26s; animation-delay: -9s; }
}
@keyframes gh-drift { to { transform: translate(7vw, 5vh) scale(1.1); } }

.gh-hearts { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.gh-hearts i { position: absolute; left: 0; top: 0; display: block; font-style: normal; line-height: 1; will-change: transform, opacity; text-shadow: 0 2px 6px rgb(0 0 0 / .3); }

/* ---------- shared ornaments ---------- */
.gh-filigree { position: absolute; width: 4.6rem; height: 4.6rem; overflow: visible; pointer-events: none; }
.gh-filigree--tl { top: 0; left: 0; }
.gh-filigree--tr { top: 0; right: 0; transform: scaleX(-1); }
.gh-filigree--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.gh-filigree--br { bottom: 0; right: 0; transform: scale(-1); }
.gh-flourish { display: block; width: 11rem; height: auto; margin: .2rem auto; overflow: visible; }
.gh-flourish--small { width: 8.5rem; }
/* lace: ivory scallops with a row of pierced dots */
.gh-lace {
    height: 14px;
    background:
        radial-gradient(circle at 50% 100%, var(--ec-paper) 6.5px, transparent 7px) 0 0 / 14px 14px repeat-x,
        radial-gradient(circle, color-mix(in srgb, var(--gh-rule) 80%, transparent) 1.1px, transparent 1.5px) 7px 2px / 14px 14px repeat-x;
}

/* ---------- cover ---------- */
.gh-cover {
    --ec-open-ms: 700;
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .55rem;
    min-height: 100vh;
    padding: 2.6rem 1.6rem;
    text-align: center;
    transition: opacity .6s ease;
}
.ec-js .gh-cover { background: var(--gh-velvet); }
/* a double rule of foil with filigree in each corner */
.gh-frame { position: absolute; inset: 12px; pointer-events: none; }
.gh-frame::before { content: ''; position: absolute; inset: 6px; border: 2px solid transparent; border-image: var(--gh-foil) 1; }
.gh-frame::after { content: ''; position: absolute; inset: 12px; border: 1px solid transparent; border-image: var(--gh-foil) 1; opacity: .7; }
.gh-frame .gh-filigree { width: 5rem; height: 5rem; }

.gh-sparkles { position: absolute; inset: 0; pointer-events: none; }
.gh-sparkles span {
    position: absolute; left: var(--x); top: var(--y);
    width: var(--s); height: var(--s);
    background: var(--gh-foil);
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
    opacity: .85;
}
@media (prefers-reduced-motion: no-preference) {
    .gh-sparkles span { animation: gh-twinkle 3.4s ease-in-out var(--d) infinite; }
}
@keyframes gh-twinkle { 0%, 100% { opacity: .15; transform: scale(.5) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }

.gh-cover__from .ec-from__label { font-family: var(--gh-serif); font-size: .74rem; letter-spacing: .36em; color: var(--ec-muted); opacity: 1; }
.gh-cover__from .ec-from__name { font-family: var(--gh-script); font-size: 2.2rem; line-height: 1.2; color: var(--ec-light); }
.gh-cover__to { margin-bottom: 1.4rem; }
.gh-cover__to .ec-recipient__greeting { font-family: var(--gh-serif); letter-spacing: .36em; color: var(--ec-muted); }
.gh-cover__to .ec-recipient__name {
    max-width: 20rem;
    font-family: var(--gh-script); font-size: clamp(2.6rem, 11.5vw, 3.3rem); line-height: 1.15;
    background: var(--gh-foil); -webkit-background-clip: text; background-clip: text; color: transparent;
    text-wrap: balance;
    padding: 0 .15em;
}

/* the plaque: an ornate jewellery-box frame around the scratch card, red roses tucked in */
.gh-plaque { position: relative; width: min(82vw, 330px); margin: .4rem 0 .8rem; }
.gh-plaque__rose { position: absolute; z-index: 3; height: auto; overflow: visible; pointer-events: none; filter: drop-shadow(0 6px 8px rgb(0 0 0 / .45)); }
.gh-plaque__box {
    position: relative;
    aspect-ratio: 320 / 230;
    border-radius: 22px;
    background:
        radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--ec-bg2) 80%, var(--ec-petal)), var(--ec-bg));
    box-shadow: 0 28px 50px -22px rgb(0 0 0 / .75), inset 0 0 0 1px rgb(255 255 255 / .06);
}
.gh-plaque__frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.gh-plaque .gh-lace { position: absolute; left: 12%; right: 12%; z-index: 1; }
.gh-lace--top { top: -12px; }
.gh-lace--bottom { bottom: -12px; transform: scaleY(-1); }

.gh-ticket {
    position: absolute; inset: 17px; z-index: 1;
    border-radius: 14px;
    overflow: hidden;
    background: var(--ec-paper);
    color: var(--ec-ink);
    touch-action: none;
    user-select: none; -webkit-user-select: none;
}
.gh-ticket__inside {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: .8rem 1rem;
    background:
        radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--ec-accent) 14%, transparent), transparent 45%),
        radial-gradient(circle at 85% 90%, color-mix(in srgb, var(--ec-gold) 30%, transparent), transparent 45%);
}
.gh-ticket__crest { width: 3.4rem; height: 3.4rem; overflow: visible; }
.gh-ticket__title {
    margin: .2rem 0 0;
    font-family: var(--gh-serif); font-style: italic; font-weight: 600;
    font-size: clamp(1.5rem, 7vw, 1.9rem); line-height: 1.05; text-wrap: balance;
    color: var(--ec-petal-deep);
}
.gh-ticket__sender { margin: .3rem 0 0; font-family: var(--gh-script); font-size: 1.3rem; line-height: 1.1; color: var(--ec-ink); }
.gh-foil { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; transition: opacity .6s ease; }
.gh-foil.is-gone { opacity: 0; pointer-events: none; }

.gh-hint { margin: .5rem 0 0; font-family: var(--gh-serif); font-style: italic; font-size: 1.12rem; color: var(--ec-muted); }
.gh-skip {
    padding: .3rem .8rem; border: 0; background: none; cursor: pointer;
    color: var(--ec-muted); font: inherit; font-size: .78rem; letter-spacing: .04em;
    text-decoration: underline; text-underline-offset: 3px;
}
.ec-opening .gh-cover { opacity: 0; }

/* ---------- the card: a short scroll ---------- */
.gh-page {
    position: relative; z-index: 1;
    width: 100%; max-width: 32rem;
    margin: 0 auto;
    padding: 0 1.1rem;
    cursor: pointer;
}

/* hero: an arched window of velvet crowned with red roses */
.gh-hero {
    position: relative;
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 3.2rem 0 3.4rem;
}
.gh-arch { position: relative; width: min(90vw, 350px); aspect-ratio: 300 / 450; }
.gh-arch__frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 24px 34px rgb(0 0 0 / .55)); }
.gh-arch__inside {
    position: absolute; left: 11%; right: 11%; top: 24%; bottom: 8%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .2rem;
    text-align: center;
}
.gh-lace--arch { position: absolute; left: 6%; right: 6%; bottom: -12px; transform: scaleY(-1); }
.gh-crest { display: block; flex: none; width: 5.2rem; height: 5.2rem; overflow: visible; margin: 0 auto 1.3rem; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .5)); }
.gh-hero__to .ec-recipient__greeting { font-family: var(--gh-serif); letter-spacing: .42em; color: var(--ec-muted); }
.gh-hero__to .ec-recipient__name { font-family: var(--gh-script); font-size: clamp(2rem, 9vw, 2.5rem); line-height: 1.25; color: var(--ec-light); }
.gh-hero__title {
    /* bronze-to-bright metal that glows on the velvet */
    --ec-foil-1: color-mix(in srgb, var(--ec-gold) 65%, #3a1000);
    --ec-foil-2: color-mix(in srgb, var(--ec-gold) 35%, #fffaf0);
    --ec-foil-3: var(--ec-gold);
    filter: drop-shadow(0 3px 4px rgb(0 0 0 / .5));
    margin: .3rem 0 .2rem;
    font-family: var(--gh-serif); font-style: italic; font-weight: 500;
    font-size: clamp(2.5rem, 12vw, 3.4rem); line-height: .98; letter-spacing: -.01em;
    text-wrap: balance;
    overflow-wrap: break-word;
    padding: 0 .1em .1em;
}
.gh-scroll { position: absolute; bottom: 1rem; left: 0; right: 0; margin: 0; text-align: center; font-family: var(--gh-serif); font-style: italic; color: var(--ec-muted); }
@media (prefers-reduced-motion: no-preference) {
    .gh-scroll span { display: inline-block; animation: gh-bob 1.8s ease-in-out infinite; }
}
@keyframes gh-bob { 50% { transform: translateY(5px); } }

/* photos: cameos in a beaded oval of foil */
.gh-gallery { padding: .5rem 0 3rem; text-align: center; }
.gh-gallery .gh-flourish { margin-bottom: 1.6rem; }
.gh-photos { width: min(72%, 16rem); margin: 0 auto; }
.gh-photos .ec-photos__item {
    margin: 0; padding: 7px;
    border-radius: 50%;
    background:
        radial-gradient(circle, #fff3ea 1.4px, transparent 1.8px) 0 0 / 9px 9px,
        var(--gh-foil);
    box-shadow: 0 22px 36px -18px rgb(0 0 0 / .7);
}
.gh-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 50%; border: 3px solid var(--ec-bg); }
.gh-gallery__hint { margin: 1.4rem 0 0; font-family: var(--gh-serif); font-style: italic; color: var(--ec-muted); }

/* the letter: ivory paper with a lace edge, filigree corners, a crest watermark */
.gh-letter {
    position: relative;
    margin-top: 1rem;
    padding: 3.4rem clamp(1.7rem, 8vw, 2.8rem) 4rem;
    background-color: var(--ec-paper);
    color: var(--ec-ink);
    box-shadow: 0 36px 64px -30px rgb(0 0 0 / .8);
}
.gh-letter::before { content: ''; position: absolute; inset: 12px; border: 1px solid var(--gh-rule); pointer-events: none; }
.gh-lace--letter { position: absolute; left: 0; right: 0; top: -13px; }
.gh-letter .gh-filigree { width: 4.2rem; height: 4.2rem; }
.gh-letter .gh-filigree--tl { top: 6px; left: 6px; }
.gh-letter .gh-filigree--tr { top: 6px; right: 6px; }
.gh-letter .gh-filigree--bl { bottom: 6px; left: 6px; }
.gh-letter .gh-filigree--br { bottom: 6px; right: 6px; }
.gh-letter__watermark { position: absolute; left: 50%; top: 50%; width: 13rem; height: 13rem; translate: -50% -50%; opacity: .07; pointer-events: none; }
.gh-letter__message { position: relative; font-size: 1.08rem; color: color-mix(in srgb, var(--ec-ink) 92%, transparent); }
/* an illuminated initial on a red ground in a double metal rule */
.gh-letter__message .ec-initial {
    float: left; margin: .12em .16em 0 0; padding: .06em .14em .02em;
    font-family: var(--gh-serif); font-weight: 600; font-size: 3.1em; line-height: .9;
    color: #fff6ee;
    background: radial-gradient(circle at 30% 25%, var(--ec-petal), var(--ec-petal-deep) 75%);
    border: 2px solid var(--gh-rule);
    outline: 1px solid var(--gh-rule); outline-offset: 2px;
    border-radius: 3px;
}
.gh-letter__sign { position: relative; margin-top: 2rem; text-align: center; }
.gh-letter__closing { margin: .4rem 0 0; font-family: var(--gh-serif); font-style: italic; font-size: 1.2rem; color: color-mix(in srgb, var(--ec-ink) 65%, var(--ec-petal-deep)); }
.gh-signature { color: var(--ec-petal-deep); }
.gh-signature text { font-family: var(--gh-script); font-size: 76px; }

/* wax seal on two ribbon ends */
.gh-seal { position: absolute; left: 50%; bottom: -2.2rem; width: 4.4rem; height: 4.4rem; translate: -50% 0; }
.gh-seal__ribbon { position: absolute; top: 2.2rem; width: 1.6rem; height: 3.2rem; background: linear-gradient(90deg, var(--ec-petal-deep), color-mix(in srgb, var(--ec-petal) 70%, white) 50%, var(--ec-petal-deep)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }
.gh-seal__ribbon--left { left: .6rem; transform: rotate(16deg); }
.gh-seal__ribbon--right { right: .6rem; transform: rotate(-16deg); }
.gh-seal__wax {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ec-accent) 60%, white), var(--ec-accent) 50%, color-mix(in srgb, var(--ec-accent) 55%, black));
    box-shadow: 0 6px 12px -4px rgb(0 0 0 / .55), inset 0 0 0 5px color-mix(in srgb, var(--ec-accent) 75%, black), inset 0 0 0 7px color-mix(in srgb, var(--ec-gold) 55%, transparent);
}
.gh-seal__wax span { font-family: var(--gh-script); font-size: 2.2rem; line-height: 1; color: #fff1e6; text-shadow: 0 1px 0 rgb(0 0 0 / .35); }

.gh-actions { margin-top: 4.4rem; color: var(--ec-light); }
.gh-actions .ec-actions__button { border-color: var(--ec-gold); background: rgb(0 0 0 / .18); }
.gh-tap-hint { margin: .6rem 0 0; text-align: center; font-size: .78rem; color: var(--ec-muted); }
.gh-branding { color: var(--ec-muted); }

@media (min-width: 768px) {
    .gh-page { max-width: 34rem; }
}

/* picture mode: the arch and the letter fit the stage; the dark ground does not stay fixed */
.ec-image .gh-hero { padding: 2.2rem 0 1.4rem; }
.ec-image .gh-letter { margin-bottom: 3rem; }
