/* Buket untuk Ibu (hari-ibu/buket-ibu): the luxe flagship, fine classic stationery */

:root {
    --ec-bg: #ffe1ea;
    --ec-bg2: #f7a9c0;
    --ec-paper: #fffaf7;
    --ec-ink: #4b0f2e;
    --ec-muted: #8c3a5e;
    --ec-gold: #c9962e;
    --ec-petal: #ff8fb1;
    --ec-petal-deep: #d81b60;
    --ec-leaf: #3f9a6e;
    --ec-wrap: #fffaf5;
    --ec-ribbon: #c2185b;
    /* rich foil gold, the same in every colour variant */
    --bki-foil: linear-gradient(135deg, #a8741a, #ffe9a6 28%, #d4a63c 50%, #fff1c2 72%, #9a6614);
    --bki-gold: #b98523;
    --bki-serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --bki-script: 'Allura', 'Cormorant Garamond', cursive;
    --bki-text: 'Lora', Georgia, serif;
    /* damask: a quiet woven motif in white over the rose ground */
    --bki-damask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.42' 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='%23ffffff' fill-opacity='.5'%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");
}

body.bki {
    background:
        var(--bki-damask) 0 0 / 96px 96px,
        radial-gradient(ellipse at 50% -10%, color-mix(in srgb, #fff 70%, transparent), transparent 55%),
        linear-gradient(180deg, var(--ec-bg) 0%, color-mix(in srgb, var(--ec-bg) 50%, var(--ec-bg2)) 45%, var(--ec-bg2) 100%);
    background-attachment: fixed;
    color: var(--ec-ink);
    font-family: var(--bki-text);
    font-size: 1.04rem;
    line-height: 1.85;
}
.bki-defs { position: absolute; }

/* ---------- watercolour light drifting behind everything ---------- */
.bki-wash { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bki-wash span {
    position: absolute; border-radius: 50%; filter: blur(42px); opacity: .62;
    background: radial-gradient(circle, color-mix(in srgb, var(--ec-petal-deep) 45%, var(--ec-petal)), transparent 70%);
}
.bki-wash span:nth-child(1) { width: 70vmax; height: 70vmax; left: -34vmax; top: -28vmax; }
.bki-wash span:nth-child(2) { width: 60vmax; height: 60vmax; right: -30vmax; top: 34vh; background: radial-gradient(circle, color-mix(in srgb, #ffd36b 75%, white), transparent 70%); opacity: .5; }
.bki-wash span:nth-child(3) { width: 55vmax; height: 55vmax; left: 10vw; bottom: -34vmax; background: radial-gradient(circle, color-mix(in srgb, var(--ec-petal-deep) 60%, var(--ec-ribbon)), transparent 70%); opacity: .4; }
@media (prefers-reduced-motion: no-preference) {
    .bki-wash span { animation: bki-drift 18s ease-in-out infinite alternate; }
    .bki-wash span:nth-child(2) { animation-duration: 22s; animation-delay: -6s; }
    .bki-wash span:nth-child(3) { animation-duration: 26s; animation-delay: -11s; }
}
@keyframes bki-drift { to { transform: translate(6vw, 4vh) scale(1.08); } }

.bki-petals { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.bki-petals i { position: absolute; left: 0; top: 0; display: block; border-radius: 80% 0 80% 0; will-change: transform, opacity; }

/* ---------- shared ornaments ---------- */
.bki-filigree { position: absolute; width: 4.6rem; height: 4.6rem; overflow: visible; pointer-events: none; }
.bki-filigree--tl { top: 0; left: 0; }
.bki-filigree--tr { top: 0; right: 0; transform: scaleX(-1); }
.bki-filigree--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.bki-filigree--br { bottom: 0; right: 0; transform: scale(-1); }
.bki-flourish { display: block; width: 11rem; height: auto; margin: .2rem auto; overflow: visible; }
.bki-flourish--small { width: 8.5rem; }
/* lace: scallops with a row of pierced dots, as an edge of paper */
.bki-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(--bki-gold) 70%, transparent) 1.1px, transparent 1.5px) 7px 2px / 14px 14px repeat-x;
}

/* ---------- cover ---------- */
.bki-cover {
    --ec-open-ms: 600;
    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 .bki-cover {
    background:
        var(--bki-damask) 0 0 / 96px 96px,
        radial-gradient(ellipse at 50% -10%, color-mix(in srgb, #fff 70%, transparent), transparent 55%),
        linear-gradient(180deg, var(--ec-bg) 0%, color-mix(in srgb, var(--ec-bg) 50%, var(--ec-bg2)) 45%, var(--ec-bg2) 100%);
}
/* a double rule of real foil gold with filigree in each corner */
.bki-frame { position: absolute; inset: 12px; pointer-events: none; }
.bki-frame::before { content: ''; position: absolute; inset: 6px; border: 2px solid transparent; border-image: var(--bki-foil) 1; }
.bki-frame::after { content: ''; position: absolute; inset: 12px; border: 1px solid transparent; border-image: var(--bki-foil) 1; opacity: .7; }
.bki-frame .bki-filigree { width: 5rem; height: 5rem; }

/* gold glints that twinkle over the cover */
.bki-sparkles { position: absolute; inset: 0; pointer-events: none; }
.bki-sparkles span {
    position: absolute; left: var(--x); top: var(--y);
    width: var(--s); height: var(--s);
    background: var(--bki-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) {
    .bki-sparkles span { animation: bki-twinkle 3.2s ease-in-out var(--d) infinite; }
}
@keyframes bki-twinkle { 0%, 100% { opacity: .15; transform: scale(.5) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }

.bki-cover__from .ec-from__label { font-family: var(--bki-serif); font-size: .74rem; letter-spacing: .36em; color: var(--ec-muted); opacity: 1; }
.bki-cover__from .ec-from__name { font-family: var(--bki-script); font-size: 2.2rem; line-height: 1.1; color: var(--ec-ink); }
.bki-cover__to .ec-recipient__greeting { font-family: var(--bki-serif); letter-spacing: .36em; color: var(--ec-muted); }
.bki-cover__to .ec-recipient__name { max-width: 20rem; font-family: var(--bki-script); font-size: clamp(2.7rem, 12vw, 3.5rem); line-height: 1.05; color: var(--ec-ink); text-wrap: balance; }

/* the bouquet stands in a softly lit arched window */
.bki-stage { position: relative; width: min(70vw, 280px); }
.bki-stage__arch { position: absolute; left: -4%; right: -4%; bottom: -2%; width: 108%; height: auto; overflow: visible; }
.bki-bouquet {
    position: relative;
    width: 100%;
    padding: 0; border: 0; background: none; cursor: pointer;
    transform-origin: 50% 92%;
    filter: drop-shadow(0 22px 26px color-mix(in srgb, var(--ec-ink) 26%, transparent));
    -webkit-tap-highlight-color: transparent;
}
.bki-bouquet svg { display: block; width: 100%; height: auto; overflow: visible; }
.bki-bouquet:focus-visible { outline: 1px solid var(--bki-gold); outline-offset: 8px; border-radius: 12px; }
@media (prefers-reduced-motion: no-preference) {
    .ec-js:not(.ec-opening) .bki-bouquet:not(.is-untied) { animation: bki-sway 5s ease-in-out infinite; }
    .ec-js:not(.ec-opening) .bki-bouquet:not(.is-untied) .bki-tag { animation: bki-tag 3.4s ease-in-out infinite; }
}
@keyframes bki-sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
@keyframes bki-tag { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(7deg); } }

.bki-tissue { fill: color-mix(in srgb, var(--ec-wrap) 88%, transparent); stroke: color-mix(in srgb, var(--bki-gold) 30%, transparent); stroke-width: .6; }
.bki-tissue--back { fill: color-mix(in srgb, var(--ec-petal) 35%, var(--ec-wrap)); }
.bki-wrap__paper { fill: var(--ec-wrap); stroke: color-mix(in srgb, var(--bki-gold) 35%, transparent); stroke-width: .8; }
.bki-wrap__fold { fill: color-mix(in srgb, var(--ec-wrap) 80%, var(--ec-ink)); opacity: .18; }
.bki-wrap__fold--light { opacity: .08; }
.bki-wrap { transition: transform .9s cubic-bezier(.3, .7, .2, 1), opacity .7s ease .3s; transform-origin: 150px 352px; }
.bki-bow > * { transition: transform .7s cubic-bezier(.3, .7, .2, 1), opacity .5s ease; transform-box: fill-box; transform-origin: center; }
.bki-tag { transform-box: fill-box; transform-origin: 0 0; transition: transform .8s ease, opacity .5s ease; }
.bki-tag__string { fill: none; stroke: var(--bki-gold); stroke-width: 1; }
.bki-tag__hole { fill: color-mix(in srgb, var(--ec-ink) 60%, transparent); }
.bki-tag__heart { fill: var(--ec-ribbon); }
.bki-flowers { transform-box: fill-box; transform-origin: center bottom; transition: transform 1s cubic-bezier(.3, .7, .2, 1), filter 1s ease; }
.bki-glow {
    position: absolute; left: 50%; top: 32%; width: 120%; aspect-ratio: 1; translate: -50% -50%;
    border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, #fff 85%, #ffd36b) 0, transparent 60%);
    opacity: 0; transition: opacity .9s ease;
}

/* untie: the bow comes apart, the wrap opens, the flowers lift into the light */
.bki-bouquet.is-untied .bki-bow__loop:first-of-type { transform: translate(-30px, 24px) rotate(-60deg) scale(.6); opacity: 0; }
.bki-bouquet.is-untied .bki-bow__loop:last-of-type { transform: translate(30px, 24px) rotate(60deg) scale(.6); opacity: 0; }
.bki-bouquet.is-untied .bki-bow__knot { transform: scale(0); opacity: 0; }
.bki-bouquet.is-untied .bki-bow__tail { transform: translateY(60px); opacity: 0; }
.bki-bouquet.is-untied .bki-tag { transform: translateY(80px) rotate(40deg); opacity: 0; }
.bki-bouquet.is-untied .bki-wrap--left { transform: rotate(-24deg) translateX(-18px); opacity: 0; }
.bki-bouquet.is-untied .bki-wrap--right { transform: rotate(24deg) translateX(18px); opacity: 0; }
.bki-bouquet.is-untied .bki-flowers { transform: translateY(-14px) scale(1.06); filter: brightness(1.06); }
.bki-bouquet.is-untied .bki-glow { opacity: .9; }

.bki-hint { margin: .4rem 0 0; font-family: var(--bki-serif); font-style: italic; font-size: 1.1rem; color: var(--ec-muted); }
.bki-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 .bki-cover { opacity: 0; }

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

/* hero: an arched window crowned with a garland */
.bki-hero {
    position: relative;
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 3.2rem 0 3.4rem;
}
.bki-arch { position: relative; width: min(90vw, 350px); aspect-ratio: 300 / 450; }
.bki-arch__frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 22px 30px color-mix(in srgb, var(--ec-ink) 22%, transparent)); }
.bki-arch__inside {
    position: absolute; left: 11%; right: 11%; top: 27%; bottom: 6%;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    gap: .2rem;
    text-align: center;
}
.bki-arch .bki-lace { position: absolute; left: 6%; right: 6%; bottom: -12px; transform: scaleY(-1); }
.bki-crest { display: block; flex: none; width: 5rem; height: 5rem; overflow: visible; margin: 0 auto 1.4rem; filter: drop-shadow(0 4px 6px color-mix(in srgb, var(--ec-ink) 25%, transparent)); }
.bki-hero__to .ec-recipient__greeting { font-family: var(--bki-serif); letter-spacing: .42em; color: var(--ec-muted); }
.bki-hero__to .ec-recipient__name { font-family: var(--bki-script); font-size: clamp(2.1rem, 9.5vw, 2.7rem); line-height: 1.1; color: var(--ec-ink); }
.bki-hero__title {
    /* rich gold that reads on light grounds: deep bronze, a warm shine, a soft berry shadow */
    --ec-foil-1: #6e4206;
    --ec-foil-2: #e2ad3f;
    --ec-foil-3: #9c6410;
    filter: drop-shadow(0 1px 0 #fff8e6) drop-shadow(0 3px 4px color-mix(in srgb, var(--ec-ink) 30%, transparent));
    margin: .3rem 0 .1rem;
    font-family: var(--bki-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;
}
.bki-scroll { position: absolute; bottom: 1rem; left: 0; right: 0; margin: 0; text-align: center; font-family: var(--bki-serif); font-style: italic; color: var(--ec-muted); }
@media (prefers-reduced-motion: no-preference) {
    .bki-scroll span { display: inline-block; animation: bki-bob 1.8s ease-in-out infinite; }
}
@keyframes bki-bob { 50% { transform: translateY(5px); } }

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

/* the letter: lace-edged paper, filigree corners, a laurel watermark */
.bki-letter {
    position: relative;
    margin-top: 1rem;
    padding: 3.4rem clamp(1.7rem, 8vw, 2.8rem) 4rem;
    background-color: var(--ec-paper);
    box-shadow: 0 2px 3px color-mix(in srgb, var(--ec-ink) 8%, transparent), 0 36px 64px -34px color-mix(in srgb, var(--ec-ink) 55%, transparent);
}
.bki-letter::before { content: ''; position: absolute; inset: 12px; border: 1px solid transparent; border-image: var(--bki-foil) 1; pointer-events: none; }
.bki-letter .bki-lace--top { position: absolute; left: 0; right: 0; top: -13px; }
.bki-letter .bki-filigree { width: 4.2rem; height: 4.2rem; }
.bki-letter .bki-filigree--tl { top: 6px; left: 6px; }
.bki-letter .bki-filigree--tr { top: 6px; right: 6px; }
.bki-letter .bki-filigree--bl { bottom: 6px; left: 6px; }
.bki-letter .bki-filigree--br { bottom: 6px; right: 6px; }
.bki-letter__watermark { position: absolute; left: 50%; top: 50%; width: 13rem; translate: -50% -50%; opacity: .07; pointer-events: none; }
.bki-letter__message { position: relative; font-size: 1.08rem; color: color-mix(in srgb, var(--ec-ink) 92%, transparent); }
/* an illuminated initial, as in old manuscripts */
.bki-letter__message .ec-initial {
    float: left; margin: .12em .16em 0 0; padding: .06em .14em .02em;
    font-family: var(--bki-serif); font-weight: 600; font-size: 3.1em; line-height: .9;
    color: #fff6e6;
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--ec-ribbon) 60%, white), var(--ec-ribbon) 70%);
    border: 2px solid #d4a63c;
    outline: 1px solid #d4a63c; outline-offset: 2px;
    border-radius: 3px;
}
.bki-letter__sign { position: relative; margin-top: 2rem; text-align: center; }
.bki-letter__closing { margin: .4rem 0 0; font-family: var(--bki-serif); font-style: italic; font-size: 1.2rem; color: var(--ec-muted); }
.bki-signature { color: var(--ec-ink); }
.bki-signature text { font-family: var(--bki-script); }

/* wax seal on two ribbon ends */
.bki-seal { position: absolute; left: 50%; bottom: -2.2rem; width: 4.4rem; height: 4.4rem; translate: -50% 0; }
.bki-seal__ribbon { position: absolute; top: 2.2rem; width: 1.6rem; height: 3.2rem; background: linear-gradient(90deg, var(--ec-ribbon), color-mix(in srgb, var(--ec-ribbon) 70%, white) 50%, var(--ec-ribbon)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }
.bki-seal__ribbon--left { left: .6rem; transform: rotate(16deg); }
.bki-seal__ribbon--right { right: .6rem; transform: rotate(-16deg); }
.bki-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-ribbon) 60%, white), var(--ec-ribbon) 55%, color-mix(in srgb, var(--ec-ribbon) 65%, black));
    box-shadow: 0 6px 12px -4px color-mix(in srgb, var(--ec-ink) 55%, transparent), inset 0 0 0 5px color-mix(in srgb, var(--ec-ribbon) 82%, black), inset 0 0 0 7px color-mix(in srgb, #d4a63c 50%, transparent);
}
.bki-seal__wax span { font-family: var(--bki-script); font-size: 2.2rem; line-height: 1; color: #fff1d6; text-shadow: 0 1px 0 rgb(0 0 0 / .3); }

.bki-actions { margin-top: 4.4rem; color: var(--ec-ink); }
.bki-actions .ec-actions__button { border-color: var(--bki-gold); background: color-mix(in srgb, var(--ec-paper) 60%, transparent); }
.bki-tap-hint { margin: .6rem 0 0; text-align: center; font-size: .78rem; color: var(--ec-muted); }
.bki-branding { color: var(--ec-muted); }

/* tablets and computers: the card stays a letter in the middle, the light fills the screen */
@media (min-width: 768px) {
    .bki-page { max-width: 34rem; }
}

/* picture mode: the arch and the letter fit the stage */
.ec-image .bki-hero { padding: 2.2rem 0 1.4rem; }
.ec-image .bki-letter { margin-bottom: 3rem; }
/* the picture maker fills a gradient border-image across the whole box: a plain gold rule there */
.ec-image .bki-letter::before { border-image: none; border-color: #c9962e; }
