/* Kartu Pos (Tema Fase 4, 3 Dec 2026): travel postcards. Base layout from cine-seri.css; this file gives the palette
 * (brick red, teal, paper), the type (Fraunces for display, Josefin Sans for reading and the block letters), a warm
 * Kodachrome grade over the photos, and the post: the addressed postcard that flips on open, block letters filled with
 * the couple's photo, passport pages, postmarked cards, a dotted route, a split-flap board, luggage tags, a sheet of
 * stamps, the reply card stamped once sent, and the closing postmark. The paper pieces stay paper in both modes. */
@font-face { font-family: "Fraunces"; src: url("/frontend/assets/fonts/fraunces-latin.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/frontend/assets/fonts/fraunces-italic-latin.woff2") format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("/frontend/assets/fonts/josefin-sans-latin.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
    --c-night: #12292b; --c-ink: #f1e6d2; --c-muted: rgba(241, 230, 210, .82); --c-accent: #f0b39f; /* 8.6:1 on deep teal */ --c-accent-ink: #12292b;
    --c-line: rgba(240, 179, 159, .42); --c-glass: rgba(16, 36, 38, .66); --c-field: rgba(241, 230, 210, .08);
    --c-veil: rgba(14, 32, 34, .55); --c-shade-top: rgba(14, 32, 34, .82); --c-shade-foot: rgba(14, 32, 34, .92); --c-photo-foot: rgba(14, 32, 34, .95);
    --f-display: "Fraunces", Georgia, serif; --f-script: "Fraunces", Georgia, serif; --f-body: "Josefin Sans", system-ui, sans-serif;
    --ct-shine: #ffd3c2;
    --perf: linear-gradient(#000 0 0) content-box, radial-gradient(circle at .3rem .3rem, transparent .16rem, #000 .18rem) -.3rem -.3rem / .6rem .6rem padding-box;
    --paper: #f1e6d2; --paper-ink: #2a201a; --paper-muted: #5c4a3c; --brick: #a63d27; /* 5.2:1 on paper */ --teal: #2f6f73; /* 5:1 on paper */
}
:root[data-scheme="light"] {
    --c-night: #efe4cf; --c-ink: #2a201a; --c-muted: #5c4a3c; --c-accent: #9a3822; /* 6:1 on paper */ --c-accent-ink: #fff8ee;
    --c-line: rgba(154, 56, 34, .34); --c-glass: rgba(248, 241, 228, .88); --c-field: rgba(255, 255, 255, .72);
    --c-veil: rgba(239, 228, 207, .76); --c-shade-top: rgba(239, 228, 207, .9); --c-shade-foot: rgba(239, 228, 207, .94); --c-photo-foot: rgba(239, 228, 207, .95);
    --ct-shine: #c4553a;
}
.cine-backdrop { background: radial-gradient(120% 80% at 50% 18%, #1f4144, #12292b 72%); }
.kp-amp { color: var(--c-accent); font-style: italic; }

/* Kodachrome: warm, rich colour, a touch of fade (CSS only; the files are untouched). */
.cine-slide, .cine-backdrop-video, .cine-section-photo img { filter: saturate(1.15) contrast(1.05) sepia(.18) brightness(.9); }
.cs-sign { background: linear-gradient(180deg, rgba(166, 61, 39, .12), transparent 30%, transparent 70%, rgba(47, 111, 115, .18)); }

/* Shared paper: a card with a faint grain and a soft shadow. */
.kp-card, .kp-passport, .kp-postcard, .kp-stop, .kp-reply-card, .kp-mailbox .cine-wish-list li, .kp-face-front {
    background: radial-gradient(120% 90% at 20% 10%, #f8efde, var(--paper) 60%, #e9dbc2); color: var(--paper-ink); text-shadow: none; }

/* ---- Cover: the postcard, flipped on open ----------------------------------------------------- */
.kp-opening { justify-content: center; align-items: center; gap: 1.3rem; padding-inline: 1rem; background: #12292b; }
.kp-opening .cine-opening-photo { filter: saturate(1.1) blur(6px) brightness(.55); transform: scale(1.08); }
.kp-flip { position: relative; z-index: 2; width: min(100%, 24rem); }
.kp-face { border-radius: .4rem; box-shadow: 0 1.6rem 3.4rem rgba(0, 0, 0, .55); }
.kp-face-front { position: relative; padding: 1.1rem 1.2rem 1.3rem; text-align: left; animation: kp-arrive 1s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes kp-arrive { from { opacity: 0; transform: translateY(2rem) rotate(-4deg); } }
.kp-face-back { position: absolute; inset: 0; display: grid; place-items: end start; padding: 1.2rem; visibility: hidden; background: var(--cover, #2f6f73) center / cover;
    color: #fff; font: 700 clamp(1.6rem, 8vw, 2.2rem)/1 var(--f-body); letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.kp-face-head { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: .6rem; }
.kp-face-label { color: var(--brick); font: 700 .8rem/1 var(--f-body); letter-spacing: .34em; text-transform: uppercase; }
/* The stamp: the couple's photo with perforated edges. */
.kp-face-stamp { width: 4.4rem; aspect-ratio: 4 / 5; box-sizing: border-box; padding: .3rem; background: var(--cover, linear-gradient(#2f6f73, #2f6f73)) center / cover content-box, #fff;
    -webkit-mask: var(--perf); mask: var(--perf);
    box-shadow: 0 .1rem .3rem rgba(0, 0, 0, .25); transform: rotate(3deg); }
.kp-face-postmark { position: absolute; right: 3.4rem; top: 2.2rem; display: grid; place-content: center; width: 4.4rem; height: 4.4rem; border: 2px solid rgba(47, 111, 115, .8); border-radius: 50%;
    color: var(--teal); font: 700 .75rem/1.25 var(--f-body); letter-spacing: .08em; text-align: center; text-transform: uppercase; transform: rotate(-14deg); }
.kp-face-postmark::after { content: ""; position: absolute; right: -3.6rem; top: 50%; width: 3.4rem; height: .9rem; translate: 0 -50%;
    background: repeating-linear-gradient(180deg, rgba(47, 111, 115, .8) 0 2px, transparent 2px 6px); border-radius: 2px; }
.kp-face-message { margin-top: 1rem; }
.kp-opening .cine-opening-kicker { color: var(--teal); text-align: left; }
.kp-cover-names { margin: .5rem 0 0; color: var(--paper-ink); font: italic 400 clamp(2.4rem, 11vw, 3.2rem)/1.05 var(--f-display); }
.kp-cover-names .kp-amp { color: var(--brick); }
.kp-cover-date { margin: .5rem 0 0; color: var(--paper-muted); font: 600 .85rem/1.4 var(--f-body); letter-spacing: .06em; }
.kp-face-address { margin-top: 1.1rem; padding-top: .8rem; border-top: 1px dashed rgba(92, 74, 60, .4); }
.kp-opening .cine-guest-label { color: var(--paper-muted); text-align: left; }
.kp-opening .cine-guest-name { margin-top: .2rem; padding-bottom: .3rem; border-bottom: 1px solid rgba(92, 74, 60, .35); color: var(--paper-ink); font: 500 clamp(1.45rem, 6.5vw, 1.8rem)/1.25 var(--f-display); text-align: left; }
.kp-opening .cine-guest-note { max-width: none; margin: .5rem 0 0; color: var(--paper-muted); text-align: left; }
.kp-cover-foot { position: relative; z-index: 2; }
.kp-opening .cine-opening-cta { background: var(--brick); color: #fff8ee; animation: cine-in 1s ease .8s both; }
.kp-opening .cine-opening-cta:focus-visible { outline-color: #f1e6d2; }
.kp-opening.is-closing { background-color: transparent; }
/* The flip in two halves: the address side turns edge-on, then the picture side turns in from the other edge. */
.kp-opening.is-closing .kp-face-front { animation: kp-half-out .45s ease-in forwards; }
.kp-opening.is-closing .kp-face-back { visibility: visible; animation: kp-half-in .45s ease-out .45s both; }
@keyframes kp-half-out { to { transform: perspective(1200px) rotateY(90deg); } }
@keyframes kp-half-in { from { transform: perspective(1200px) rotateY(-90deg); } }
.kp-opening.is-closing .kp-flip { animation: kp-away .55s ease-in 1.05s forwards; }
@keyframes kp-away { to { opacity: 0; transform: translateY(-2rem) scale(.92); } }
.kp-opening.is-closing .kp-cover-foot { animation: cine-out .5s ease-in both; }
.kp-opening.is-closing .cine-opening-photo { opacity: 0; transform: scale(1.02); filter: saturate(1.1); }
.kp-opening.is-closing .cine-opening-shade { opacity: 0; }
@media (max-height: 40rem) { .kp-opening { justify-content: flex-start; } .kp-face-message { margin-top: .4rem; } }

/* ---- Home: block letters filled with the couple's photo ------------------------------------- */
.kp-greetings { color: var(--c-accent); font: italic 400 clamp(1.5rem, 6vw, 1.9rem)/1.2 var(--f-display); }
.kp-names { margin: .4rem 0 0; text-shadow: none; }
.kp-block { display: block; background: var(--fill, linear-gradient(var(--c-accent), var(--c-accent))) center 35% / cover; -webkit-background-clip: text; background-clip: text; color: transparent;
    -webkit-text-stroke: 2px var(--paper); font: 700 clamp(3.4rem, 19vw, 6rem)/.92 var(--f-body); letter-spacing: .02em; text-transform: uppercase; filter: drop-shadow(.25rem .3rem 0 var(--brick)); overflow-wrap: anywhere; }
.kp-names .kp-amp { display: block; margin: .2rem 0; font: italic 400 clamp(1.6rem, 7vw, 2.2rem)/1 var(--f-display); }
.kp-date { margin-top: 1.1rem !important; font: 600 .85rem/1.4 var(--f-body); letter-spacing: .26em; text-transform: uppercase; }

/* ---- Verse: the back of a card -------------------------------------------------------------- */
.kp-card { position: relative; max-width: 25rem; margin: 0 auto; padding: 2.2rem 1.4rem 1.6rem; border-radius: .3rem; box-shadow: 0 1.2rem 2.6rem rgba(0, 0, 0, .35); transform: rotate(1.2deg); }
.kp-corner-stamp { position: absolute; right: 1rem; top: 1rem; width: 2.8rem; aspect-ratio: 4 / 5; border: 2px dashed rgba(166, 61, 39, .55); border-radius: .15rem; }
.kp-card .cine-arabic { color: var(--teal); }
.kp-small-title { margin: 0 0 1rem; color: var(--brick); font: 700 .75rem/1.4 var(--f-body); letter-spacing: .3em; text-transform: uppercase; }
.kp-verse { margin: 0; }
.kp-verse + .kp-verse { margin-top: 1.2rem; }
.kp-verse blockquote { margin: 0; font: italic 400 clamp(1.15rem, 4.8vw, 1.35rem)/1.6 var(--f-display); text-wrap: pretty; }
.kp-verse figcaption { margin-top: .8rem; color: var(--paper-muted); font-size: .85rem; letter-spacing: .08em; }
.kp-card .cine-lead { margin-top: 1rem; color: var(--paper-muted); }

/* ---- Passports ------------------------------------------------------------------------------ */
.kp-passports { justify-content: center; gap: 1.6rem; }
.kp-passport { position: relative; width: 100%; max-width: 26rem; box-sizing: border-box; margin: 0 auto; padding: 0 0 1.1rem; overflow: hidden; border-radius: .5rem; box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, .35); }
.kp-passport-head { display: flex; justify-content: space-between; padding: .65rem 1rem; background: var(--teal); color: #f1e6d2; font: 700 .75rem/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; }
.kp-passport-body { display: grid; grid-template-columns: 6.2rem 1fr; gap: 1rem; padding: 1rem 1rem 0; }
.kp-passport-photo { display: grid; place-items: center; aspect-ratio: 3 / 4; overflow: hidden; border-radius: .2rem; background: #d8c8ad; color: var(--teal); font: italic 2.4rem/1 var(--f-display); }
.kp-passport-photo img { width: 100%; height: 100%; object-fit: cover; }
.kp-fields { display: grid; gap: .55rem; margin: 0; }
.kp-fields dt { color: var(--brick); font: 700 .75rem/1.2 var(--f-body); letter-spacing: .2em; text-transform: uppercase; }
.kp-fields dd { margin: .1rem 0 0; font-size: .9rem; line-height: 1.45; }
.kp-passport-name { font: 500 1.15rem/1.2 var(--f-display) !important; }
.kp-passport .cine-socials { padding: 0 1rem; }
.kp-passport .cine-socials a { border-color: rgba(47, 111, 115, .45); color: var(--teal); }
/* An entry stamp across the corner. */
.kp-visa { position: absolute; right: .9rem; bottom: .9rem; padding: .3rem .6rem; border: 2px solid rgba(166, 61, 39, .6); border-radius: .3rem; color: rgba(166, 61, 39, .75);
    font: 700 .75rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; rotate: -9deg; }
@media (prefers-reduced-motion: no-preference) {
    .kp-visa { transition: scale .5s cubic-bezier(.3, 1.6, .5, 1) .6s, opacity .3s ease .6s; }
    .has-reveal .kp-passport:not(.is-revealed) .kp-visa { opacity: 0; scale: 1.8; }
}

/* ---- Story: postmarked cards ---------------------------------------------------------------- */
.kp-postcard { position: relative; width: min(70vw, 16rem); padding: .6rem .6rem 1.1rem; border-radius: .25rem; box-shadow: 0 .8rem 1.6rem rgba(0, 0, 0, .3); scroll-snap-align: start; }
.kp-postcard:nth-child(even) { transform: rotate(1.4deg); }
.kp-postcard:nth-child(odd) { transform: rotate(-1deg); }
.kp-postcard-shot { aspect-ratio: 4 / 3; overflow: hidden; background: #d8c8ad; }
.kp-postcard-shot img { width: 100%; height: 100%; object-fit: cover; }
.kp-postmark { display: inline-block; margin: -1.3rem 0 0 .4rem !important; position: relative; padding: .35rem .7rem; border: 2px solid var(--teal); border-radius: 999px; background: var(--paper);
    color: var(--teal); font: 700 .75rem/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; transform: rotate(-5deg); }
.kp-postcard h3 { margin: .6rem .4rem .4rem; font: italic 400 1.35rem/1.2 var(--f-display); }
.kp-postcard p:not(.kp-postmark) { margin: 0 .4rem !important; color: var(--paper-muted); font-size: .9rem; line-height: 1.6; }

/* ---- Itinerary: a dotted route ------------------------------------------------------------- */
.kp-itinerary .cine-block { margin-inline: auto; text-align: center; }
.kp-route { position: relative; width: 100%; max-width: 26rem; box-sizing: border-box; margin: 0 auto; padding: 0 0 0 2.2rem; list-style: none; counter-reset: stop; }
.kp-route::before { content: ""; position: absolute; left: .7rem; top: 1rem; bottom: 1rem; border-left: 3px dotted var(--c-accent); }
.kp-stop { position: relative; padding: 1.1rem 1.1rem 1.2rem; border-radius: .3rem; box-shadow: 0 .8rem 1.6rem rgba(0, 0, 0, .3); counter-increment: stop; }
.kp-stop + .kp-stop { margin-top: 1.2rem; }
.kp-stop::before { content: counter(stop); position: absolute; left: -2.2rem; top: 1rem; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    background: var(--brick); color: transparent; box-shadow: 0 0 0 3px var(--c-night); }
.kp-stop h3 { margin: 0; color: var(--brick); font: italic 400 clamp(1.6rem, 7vw, 1.95rem)/1.1 var(--f-display); }
.kp-stop-date { margin-top: .5rem !important; font-weight: 700; font-size: .95rem; }
.kp-stop-time { margin-top: .15rem !important; color: var(--paper-muted); font-size: .92rem; }
.kp-stop address { margin-top: .7rem; color: var(--paper-muted); font-style: normal; font-size: .9rem; line-height: 1.55; }
.kp-stop address strong { display: block; color: var(--paper-ink); }
.kp-stop .cine-directions { margin-top: .9rem; border-color: rgba(47, 111, 115, .5); color: var(--teal); }

/* ---- Countdown: a split-flap board ---------------------------------------------------------- */
.kp-board .cine-clock-cells { gap: .4rem; }
.kp-board .cine-clock-cells div { padding: .5rem .3rem .6rem; border: 0; border-radius: .35rem; background: #1b1b1a; text-shadow: none; box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .06), 0 .4rem .9rem rgba(0, 0, 0, .35); }
.kp-board .cine-clock-cells span { position: relative; display: block; padding: .5rem 0; border-radius: .2rem; color: #f5c84c; font: 700 clamp(2rem, 9vw, 2.6rem)/1 var(--f-body);
    background: linear-gradient(180deg, #2a2a28 0 49%, #111 49% 51%, #232321 51%); }
.kp-board .cine-clock-cells small { margin-top: .35rem; color: #d8d2c4; }

/* ---- Dress: luggage tags -------------------------------------------------------------------- */
.kp-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin: 0 0 1.4rem; }
.kp-tag { position: relative; width: 2.8rem; height: 4.6rem; border-radius: .35rem; background: var(--swatch); clip-path: polygon(22% 0, 78% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.kp-tag::before { content: ""; position: absolute; left: 50%; top: .55rem; width: .6rem; height: .6rem; margin-left: -.3rem; border-radius: 50%; background: var(--c-night); box-shadow: 0 0 0 2px #e9dbc2; }
.kp-tag:nth-child(odd) { transform: rotate(-6deg); }
.kp-tag:nth-child(even) { transform: rotate(5deg); }

/* ---- Gallery: a sheet of stamps ------------------------------------------------------------- */
.kp-stamps-page .cine-block { margin-inline: auto; text-align: center; }
.kp-gallery-line { color: var(--c-muted); font: italic 400 1.05rem/1.6 var(--f-display); }
.kp-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; width: 100%; max-width: 26rem; box-sizing: border-box; margin: 0 auto; padding: .8rem; list-style: none; border-radius: .2rem;
    background: var(--paper); box-shadow: 0 1rem 2.2rem rgba(0, 0, 0, .35); }
.kp-stamp { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: .35rem; border: 0; background: #fff; cursor: zoom-in;
    -webkit-mask: var(--perf); mask: var(--perf); }
.kp-stamp img { display: block; }
.kp-stamp img { width: 100%; height: 100%; object-fit: cover; }
.kp-stamp:focus-visible { outline: 3px solid var(--brick); outline-offset: -3px; }
.kp-all { align-self: center; }

/* ---- RSVP: the reply card, stamped once sent ------------------------------------------------ */
.kp-reply-card { position: relative; border: 0; border-radius: .3rem; box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, .35); }
.kp-reply-card .cine-kicker { color: var(--brick); }
.kp-reply-card .cine-lead, .kp-reply-card legend, .kp-reply-card .cine-field { color: var(--paper-muted); }
.kp-reply-card .cine-title { color: var(--paper-ink); }
.kp-reply-card :is(input:not([type=radio]), select, textarea) { border-color: rgba(92, 74, 60, .35); background: #fffaf0; color: var(--paper-ink); }
.kp-reply-card .cine-attendance-options label { border-color: rgba(92, 74, 60, .4); color: var(--paper-ink); }
.kp-reply-card .cine-attendance-options input:checked + label { background: var(--teal); border-color: var(--teal); color: #fff8ee; }
.kp-reply-card .cine-submit { background: var(--brick); color: #fff8ee; }
.kp-reply-card .cine-form-status { color: var(--paper-muted); }
.kp-reply-card .cine-field :is(input, textarea)::placeholder { color: #85705e; opacity: 1; }
.kp-sent-stamp { position: absolute; right: -.5rem; top: -1.6rem; background: rgba(241, 230, 210, .85); display: grid; place-items: center; width: 4.6rem; height: 4.6rem; border: 3px double var(--brick); border-radius: 50%;
    color: var(--brick); font: 700 .75rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; opacity: 0; transform: rotate(-16deg) scale(1.8); pointer-events: none;
    transition: opacity .25s ease, transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.has-reveal .cine .kp-reply:not(:has(form.is-sent)) .kp-sent-stamp, .kp-reply:not(:has(form.is-sent)) .kp-sent-stamp { opacity: 0; transform: rotate(-16deg) scale(1.8); }
.has-reveal .cine .kp-reply:has(form.is-sent) .kp-sent-stamp, .kp-reply:has(form.is-sent) .kp-sent-stamp { opacity: .9; transform: rotate(-16deg); }

/* ---- Wishes: cards from the guests ---------------------------------------------------------- */
.kp-mailbox .cine-wish-list { gap: .8rem; }
.kp-mailbox .cine-wish-list li { padding: .9rem 1rem; border: 0; border-radius: .25rem; box-shadow: 0 .5rem 1.1rem rgba(0, 0, 0, .25); }
.kp-mailbox .cine-wish-list li:nth-child(odd) { transform: rotate(-.6deg); }
.kp-mailbox .cine-wish-list li:nth-child(even) { transform: rotate(.6deg); }
.kp-mailbox .cine-wish-list li :is(p, span, small, time) { color: inherit; }

/* ---- Closing: the postmark ------------------------------------------------------------------- */
.kp-postmark-big { display: grid; place-content: center; gap: .25rem; width: 9rem; height: 9rem; margin: 0 auto 1.4rem !important; border: 3px double var(--c-accent); border-radius: 50%;
    color: var(--c-accent); font: 700 .75rem/1.2 var(--f-body); letter-spacing: .14em; text-align: center; text-transform: uppercase; rotate: -10deg; }
.kp-postmark-big span:first-child { font-size: 1.05rem; letter-spacing: .2em; }
@media (prefers-reduced-motion: no-preference) {
    .kp-postmark-big { transition: scale .5s cubic-bezier(.3, 1.6, .5, 1) .4s, opacity .3s ease .4s; }
    .has-reveal .kp-sent [data-reveal]:not(.is-revealed) .kp-postmark-big { opacity: 0; scale: 1.7; }
}
.kp-end-names { margin-top: 1.3rem !important; font: italic 400 clamp(1.9rem, 8vw, 2.4rem)/1.1 var(--f-display); }
