/* ==========================================================================
   THEME: DESAIN 27 - BLUE WATERCOLOR FLORAL
   KitoNgundang Wedding Invitation
   ========================================================================== */

:root {
    --cloud: #f6fafd;
    --sky: #cfe6f5;
    --sky-deep: #9cc7e6;
    --blue: #2276b1;
    --navy: #005189;
    --navy-dark: #003d68;
    --ink: #0f2a44;
    --muted: #46627a;
    --mist: #cdd4e0;
    --line: rgba(34, 118, 177, 0.32);
    --bg-body: #cfd8e3;

    --font-script: 'Allura', cursive;
    --font-serif: 'EB Garamond', Georgia, serif;
    --font-body: 'Work Sans', sans-serif;
    --font-arab: 'Amiri', serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
    --spring: cubic-bezier(0.34, 1.4, 0.5, 1);

    /* bentuk foto hero: tepi seperti bercak cat air */
    --blob: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 380'%3E%3Cpath fill='%23000' d='M150 8C220 0 290 40 296 120C302 190 280 230 292 290C304 350 240 376 160 372C80 368 12 340 8 260C4 190 28 160 14 100C2 50 80 14 150 8Z'/%3E%3C/svg%3E");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--ink);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.locked {
    overflow: hidden;
    height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
}

/* ---------- Elemen dekoratif ---------- */
.deco {
    pointer-events: none;
    user-select: none;
}

.wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 75%;
    z-index: 0;
    background: url('../images/wash.svg') center top / 100% auto no-repeat;
}

.strip {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    aspect-ratio: 480 / 150;
    z-index: 1;
    background: url('../images/strip.svg') center bottom / 100% auto no-repeat;
}

/* kelopak yang melayang jatuh */
.petals {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.petals i {
    position: absolute;
    top: -30px;
    left: var(--x);
    width: var(--s, 12px);
    height: calc(var(--s, 12px) * 1.35);
    border-radius: 80% 0 80% 0;
    background: linear-gradient(135deg, #e3f1fa, #8fbfe0);
    opacity: 0;
    animation: petalFall var(--t, 18s) linear var(--dl, 0s) infinite;
}

/* bunga: pembungkus mengatur posisi, gambar di dalamnya bergoyang dari pangkal batang */
.bloom {
    position: absolute;
    z-index: 2;
    display: block;
}

.bloom img {
    width: 100%;
    height: auto;
    transform-origin: 5% 98%;
    animation: sway var(--sway, 8s) ease-in-out var(--sd, 0s) infinite;
}

/* ---------- Tombol navy ---------- */
.btn-navy {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #0a62a2 0%, var(--navy-dark) 100%);
    color: #ffffff;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.85rem 2.2rem;
    border-radius: 999px;
    border: 1px solid rgba(186, 222, 245, 0.65);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 81, 137, 0.28);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-navy::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
    transform: translateX(-130%);
    transition: transform 0.9s var(--ease);
}

.btn-navy:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 81, 137, 0.36);
}

.btn-navy:hover::before {
    transform: translateX(130%);
}

.btn-navy:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   COVER
   ========================================================================== */
#cover {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%);
    z-index: 9999;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 60%),
        var(--cloud) url('../images/paper.svg') center top / 480px 720px;
    transition:
        transform 1.4s var(--ease-io),
        opacity 1.1s var(--ease-io) 0.15s,
        filter 1.1s var(--ease-io),
        visibility 0s linear 1.4s;
}

/* dibuka: larut seperti air, sedikit membesar dan buram */
#cover.opened {
    transform: translateX(-50%) scale(1.07);
    opacity: 0;
    filter: blur(12px);
    visibility: hidden;
    pointer-events: none;
}

#cover.opened .ring-photo {
    transform: scale(1.35);
    opacity: 0;
    transition: transform 1.3s var(--ease-io), opacity 0.9s ease 0.1s;
}

#cover.opened .bloom img {
    scale: 1.25;
    transition: scale 1.3s var(--ease-io);
}

#cover.opened .cover-guest,
#cover.opened #btn-open,
#cover.opened .cover-names,
#cover.opened .cover-kicker {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.8s var(--ease);
}

.cover-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(0.3rem, 1.6dvh, 1rem);
    padding: 3dvh 1.5rem clamp(76px, 15dvh, 126px);
    text-align: center;
}

.cover-kicker {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--blue);
    letter-spacing: 0.04em;
}

.cover-names {
    --nm: clamp(2.7rem, 7.6dvh, 4.1rem);
    width: min(100%, 320px);
    display: flex;
    flex-direction: column;
    font-family: var(--font-script);
    font-weight: 400;
    font-size: var(--nm);
    line-height: 0.95;
    color: var(--navy);
}

.cover-names .ink {
    display: block;
    width: fit-content;
}

.cover-names .n2 {
    align-self: flex-end;
    padding-right: 0.15em;
}

.cover-names .amp-sep {
    align-self: center;
    font-size: 0.6em;
    line-height: 1.1;
    margin: 0.1em 0;
}

.cover-names .n1 {
    padding-left: 0.15em;
}

.ring-photo {
    --ring: min(56vw, clamp(150px, 26dvh, 224px));
    position: relative;
    width: var(--ring);
    height: var(--ring);
    margin: clamp(0.6rem, 2.6dvh, 1.4rem) 0 clamp(0.6rem, 2.2dvh, 1.2rem);
}

.ring-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow:
        0 0 0 4px #ffffff,
        0 0 0 6px var(--sky-deep),
        0 16px 34px rgba(0, 81, 137, 0.28);
}

/* cincin tipis berkilau yang mengelilingi foto */
.ring {
    position: absolute;
    inset: -12px;
    z-index: 1;
    border-radius: 50%;
    pointer-events: none;
    background: conic-gradient(from 30deg, #9cc7e6, #2276b1, #cfe6f5, #005189, #9cc7e6);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.8px), #000 calc(100% - 1.2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 1.8px), #000 calc(100% - 1.2px));
    opacity: 0.8;
}

.bloom-a {
    left: -36%;
    top: -34%;
    width: 68%;
}

.bloom-b {
    right: -36%;
    bottom: -34%;
    width: 64%;
    transform: rotate(180deg);
}

.bloom-b img {
    --sway: 9.5s;
    --sd: -2s;
}

.cover-guest {
    max-width: 300px;
}

.cover-to {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--navy);
}

.cover-guest-name {
    font-family: var(--font-script);
    font-size: clamp(1.9rem, 5dvh, 2.4rem);
    line-height: 1.2;
    color: var(--blue);
    word-break: break-word;
}

.cover-note {
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--muted);
    margin-top: 0.15rem;
}

/* ==========================================================================
   LAYOUT UMUM
   ========================================================================== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--cloud) url('../images/paper.svg') center top / 480px 720px;
    box-shadow: 0 0 50px rgba(15, 42, 68, 0.22);
}

section {
    position: relative;
    padding: 4.5rem 1.75rem;
    text-align: center;
    overflow: hidden;
}

section > *:not(.deco) {
    position: relative;
    z-index: 1;
}

.sec-title {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 3.3rem;
    line-height: 1.15;
    color: var(--navy);
    word-spacing: 0.1em;
}

.blue-rule {
    display: block;
    width: 120px;
    height: 2px;
    margin: 0.7rem auto 1.8rem;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--sky-deep) 22%, var(--blue) 50%, var(--sky-deep) 78%, transparent);
}

.lead {
    font-size: 0.92rem;
    color: var(--muted);
    max-width: 340px;
    margin: 0 auto;
}

/* bunga di tepi bagian */
.bloom-side {
    width: 190px;
    opacity: 0.95;
}

.bloom-side.bloom-right {
    right: -78px;
    top: 14px;
    transform: rotate(180deg);
}

.bloom-side.bloom-left {
    left: -78px;
    top: 10px;
}

/* ==========================================================================
   HERO
   ========================================================================== */
#home {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3.5rem;
    padding-bottom: 5.5rem;
}

.hero-seq {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.script-sm {
    font-family: var(--font-script);
    font-size: 2.4rem;
    line-height: 1.2;
    color: var(--blue);
}

.blob-photo {
    width: min(72vw, 296px);
    aspect-ratio: 300 / 380;
    margin: 1rem auto 1.4rem;
    filter: drop-shadow(0 18px 22px rgba(0, 81, 137, 0.25));
}

.blob-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-mask: var(--blob) center / 100% 100% no-repeat;
    mask: var(--blob) center / 100% 100% no-repeat;
}

.hero-names {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(2.8rem, 13vw, 3.6rem);
    line-height: 1.15;
    color: var(--navy);
    word-spacing: 0.1em;
    white-space: nowrap;
}

.hero-names .ink {
    display: inline-block;
    padding: 0 0.1em;
}

.hero-date {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
    font-style: italic;
    color: var(--blue);
    margin-top: 0.2rem;
}

body.locked .hero-seq > * {
    opacity: 0;
}

body.opened .hero-seq > * {
    animation: riseSoft 1.4s var(--ease) backwards;
}

body.opened .hero-seq > :nth-child(1) { animation-delay: 0.6s; }
body.opened .hero-seq > :nth-child(2) { animation-delay: 0.85s; }
body.opened .hero-seq > :nth-child(3) { animation-delay: 1.2s; }
body.opened .hero-seq > :nth-child(4) { animation-delay: 1.6s; }

body.opened .hero-names .ink {
    animation: write 1.6s var(--ease-io) 1.3s backwards;
}

.bloom-hero-tr {
    right: -96px;
    top: -78px;
    width: 180px;
    transform: rotate(180deg);
}

.bloom-hero-bl {
    left: -84px;
    bottom: -74px;
    width: 200px;
}

.bloom-hero-bl img {
    --sway: 10s;
    --sd: -3s;
}

body.locked #home .bloom {
    opacity: 0;
}

body.opened #home .bloom img {
    animation:
        bloomIn 1.8s var(--spring) var(--d, 0.8s) backwards,
        sway var(--sway, 8s) ease-in-out var(--sd, 0s) infinite;
}

/* ==========================================================================
   PEMBUKAAN
   ========================================================================== */
#opening .bloom-side {
    top: -46px;
}

.salam {
    font-family: var(--font-arab);
    font-size: 1.7rem;
    line-height: 1.9;
    color: var(--navy);
    margin-bottom: 1rem;
}

.ayat {
    margin: 2.4rem auto 0;
    padding: 1.8rem 0;
    max-width: 360px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.ayat-ar {
    font-family: var(--font-arab);
    font-size: 1.45rem;
    line-height: 2.3;
    color: var(--ink);
}

.ayat-id {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--muted);
    margin-top: 0.9rem;
}

.ayat cite {
    display: block;
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--blue);
    margin-top: 1rem;
}

/* ==========================================================================
   MEMPELAI
   ========================================================================== */
.person {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.round-frame {
    position: relative;
    width: 190px;
    height: 190px;
    margin-bottom: 1.8rem;
}

.round-frame > img:first-child {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow:
        0 0 0 4px #ffffff,
        0 0 0 5.5px var(--sky-deep),
        0 14px 30px rgba(0, 81, 137, 0.22);
}

.round-frame::before {
    content: '';
    position: absolute;
    inset: -14px;
    border: 1px solid rgba(34, 118, 177, 0.45);
    border-radius: 50%;
    transform: rotate(-14deg) scaleY(0.96);
    pointer-events: none;
}

.bloom-mini {
    width: 112px;
}

.mini-l {
    left: -48px;
    top: -36px;
}

.mini-r {
    right: -48px;
    bottom: -36px;
    transform: rotate(180deg);
}

.person-name {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 3.2rem;
    line-height: 1.2;
    color: var(--navy);
}

.person-full {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    font-style: italic;
    color: var(--blue);
    margin-bottom: 0.7rem;
}

.person-parents {
    font-size: 0.85rem;
    line-height: 1.75;
    color: var(--muted);
}

.person-parents strong {
    font-weight: 500;
    color: var(--ink);
}

.person-ig {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 1rem;
    padding-bottom: 2px;
    font-size: 0.82rem;
    color: var(--navy);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: color 0.3s, border-color 0.3s;
}

.person-ig:hover {
    color: var(--blue);
    border-color: var(--blue);
}

.amp {
    font-family: var(--font-script);
    font-size: 4.4rem;
    line-height: 1;
    color: var(--sky-deep);
    margin: 1.8rem 0;
}

/* ==========================================================================
   ACARA
   ========================================================================== */
.sec-date {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    font-style: italic;
    color: var(--blue);
    margin-top: -0.6rem;
}

.countdown {
    display: flex;
    justify-content: center;
    margin: 1.6rem 0 1rem;
}

.cd-item {
    min-width: 66px;
    padding: 0 0.7rem;
    border-left: 1px solid var(--line);
}

.cd-item:first-child {
    border-left: 0;
}

.cd-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.cd-label {
    display: block;
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin-top: 2.4rem;
}

.event-card,
.bank-card {
    transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

.event-card:hover,
.bank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 81, 137, 0.14);
}

.event-card {
    padding: 2.2rem 1.5rem 2rem;
    border: 1px solid var(--line);
    border-radius: 26px 26px 26px 80px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 30px rgba(0, 81, 137, 0.08);
}

.event-title {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 2.9rem;
    line-height: 1.2;
    color: var(--navy);
}

.event-time {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--blue);
    margin-top: 0.1rem;
}

.event-place {
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.9rem;
}

.event-addr {
    font-size: 0.83rem;
    color: var(--muted);
    max-width: 260px;
    margin: 0.1rem auto 1.3rem;
}

/* ==========================================================================
   KISAH & SUSUNAN ACARA
   ========================================================================== */
.timeline {
    position: relative;
    list-style: none;
    max-width: 340px;
    margin: 0 auto;
    text-align: left;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--blue) 12%, var(--blue) 88%, transparent);
}

.timeline li {
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 2.1rem;
}

.timeline li:last-child {
    margin-bottom: 0;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid var(--blue);
    background: var(--cloud);
    box-shadow: 0 0 0 4px var(--cloud);
}

.tl-year {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
    font-style: italic;
    color: var(--blue);
    line-height: 1.3;
}

.timeline h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
}

.timeline p {
    font-size: 0.87rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.rundown {
    list-style: none;
    max-width: 330px;
    margin: 0 auto;
    text-align: left;
}

.rundown li {
    display: grid;
    grid-template-columns: 4.4rem 1fr;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.8rem 0;
    border-bottom: 1px dashed var(--line);
}

.rundown li:last-child {
    border-bottom: 0;
}

.rd-time {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.rd-text {
    font-size: 0.92rem;
    color: var(--ink);
}

/* ==========================================================================
   GALERI
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.g-item {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 1;
    background: var(--mist);
    box-shadow: 0 6px 18px rgba(0, 81, 137, 0.16);
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease);
}

.g-item:hover img {
    transform: scale(1.06);
}

.g-tall {
    grid-row: span 2;
    aspect-ratio: auto;
    height: 100%;
}

.g-wide {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 28, 48, 0.94);
}

.lightbox[hidden] {
    display: none;
}

.lightbox:not([hidden]) {
    animation: fadeIn 0.4s ease;
}

.lb-img {
    max-width: 92vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lb-img.swap {
    animation: lbImg 0.6s var(--ease);
}

.lb-close,
.lb-prev,
.lb-next {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(186, 222, 245, 0.55);
    background: rgba(255, 255, 255, 0.08);
    color: #cfe6f5;
    font-size: 1rem;
    cursor: pointer;
}

.lb-close { top: 16px; right: 16px; }
.lb-prev  { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 10px; top: 50%; transform: translateY(-50%); }

.lb-close:focus-visible,
.lb-prev:focus-visible,
.lb-next:focus-visible {
    outline-color: #cfe6f5;
}

/* ==========================================================================
   TANDA KASIH
   ========================================================================== */
.bank-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 340px;
    margin: 1.8rem auto 0;
}

.bank-card {
    padding: 1.5rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
}

.bank-name {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--navy);
    line-height: 1.2;
}

.bank-number {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    margin-top: 0.5rem;
}

.bank-holder {
    font-size: 0.85rem;
    color: var(--muted);
}

.btn-copy {
    margin-top: 1rem;
    padding: 0.5rem 1.3rem;
    border-radius: 999px;
    border: 1px solid var(--navy);
    background: transparent;
    color: var(--navy);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.btn-copy:hover {
    background: var(--navy);
    color: #ffffff;
}

/* ==========================================================================
   RSVP & UCAPAN
   ========================================================================== */
.rsvp-form {
    max-width: 380px;
    margin: 0 auto;
    text-align: left;
}

.field {
    margin-bottom: 1.1rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--ink);
}

.field textarea {
    resize: vertical;
}

.wishes-feed {
    max-width: 380px;
    max-height: 420px;
    margin: 2.4rem auto 0;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    overflow-y: auto;
    text-align: left;
}

.wish-card {
    padding: 1rem 1.1rem;
    border-left: 3px solid var(--blue);
    border-radius: 4px 16px 16px 4px;
    background: rgba(255, 255, 255, 0.8);
}

.wish-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.wish-author {
    font-size: 0.9rem;
    font-weight: 500;
}

.wish-status {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--blue);
}

.wish-status-no {
    color: #8a5a4a;
}

.wish-new {
    animation: wishIn 0.9s var(--ease);
}

.wish-text {
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   PENUTUP
   ========================================================================== */
.closing {
    position: relative;
    margin-top: 1rem;
    padding: 5rem 1.75rem 12.5rem;
    text-align: center;
    overflow: hidden;
}

.closing > *:not(.deco) {
    position: relative;
    z-index: 2;
}

/* pita bunga diangkat sedikit agar tidak tertutup pill navigasi, tepi bawahnya memudar ke kertas */
.closing .strip {
    bottom: 66px;
    -webkit-mask-image: linear-gradient(#000 60%, transparent 100%);
    mask-image: linear-gradient(#000 60%, transparent 100%);
}

.closing-text {
    max-width: 330px;
    margin: 0 auto 1.8rem;
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--muted);
}

.closing-regards {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--blue);
}

.closing-names {
    font-family: var(--font-script);
    font-size: clamp(2.8rem, 13vw, 3.6rem);
    line-height: 1.15;
    color: var(--navy);
    word-spacing: 0.1em;
    white-space: nowrap;
}

.footer-credit {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.footer-credit i {
    color: var(--blue);
}

.footer-credit a {
    color: var(--navy);
    font-weight: 500;
    text-decoration: none;
}

/* ==========================================================================
   MUSIK & NAVIGASI BAWAH (gaya sama dengan desain 16-26)
   ========================================================================== */
#music-btn {
    position: fixed;
    top: 18px;
    right: max(18px, calc(50% - 240px + 18px));
    width: 42px;
    height: 42px;
    border: 1px solid rgba(186, 222, 245, 0.75);
    border-radius: 50%;
    background: rgba(0, 81, 137, 0.92);
    color: #e6f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(0, 61, 104, 0.35);
    animation: rotateMusic 4s linear infinite;
}

#music-btn.paused {
    animation-play-state: paused;
    opacity: 0.8;
}

#music-btn::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid rgba(186, 222, 245, 0.9);
    opacity: 0;
    pointer-events: none;
}

#music-btn:not(.paused)::after {
    animation: ripple 2.4s var(--ease) infinite;
}

.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 81, 137, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(186, 222, 245, 0.45);
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    display: flex;
    gap: clamp(0.7rem, 3.6vw, 1.5rem);
    z-index: 998;
    box-shadow: 0 8px 25px rgba(0, 61, 104, 0.4);
}

.nav-item {
    color: #9fc3de;
    text-decoration: none;
    font-size: 0.72rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: color 0.3s, transform 0.3s;
}

.nav-item i {
    font-size: 1.1rem;
}

.nav-item.active,
.nav-item:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-item:focus-visible {
    outline-color: #e6f4ff;
}

body.opened .bottom-nav {
    animation: navIn 1.2s cubic-bezier(0.34, 1.45, 0.64, 1) 1.8s backwards;
}

.nav-item.active i {
    animation: navPop 0.55s cubic-bezier(0.34, 1.8, 0.64, 1);
}

/* ==========================================================================
   ANIMASI
   Konsep: tinta air menyebar, bunga mekar. Gerak masuk memakai easing
   "keluar cepat, berhenti pelan"; jeda diatur berurutan.
   ========================================================================== */
@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}

@keyframes riseSoft {
    from { opacity: 0; transform: translateY(28px) scale(0.98); filter: blur(7px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

/* nama "tertulis" dari kiri ke kanan */
@keyframes write {
    from { clip-path: inset(-25% 100% -25% -5%); }
    to   { clip-path: inset(-25% -10% -25% -5%); }
}

@keyframes washBleed {
    from { clip-path: circle(0% at 50% 0%); opacity: 0.4; }
    to   { clip-path: circle(150% at 50% 0%); opacity: 1; }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.86); }
    to   { opacity: 1; transform: none; }
}

@keyframes bloomIn {
    from { opacity: 0; scale: 0.3; rotate: -28deg; }
    to   { opacity: 1; scale: 1; rotate: 0deg; }
}

@keyframes sway {
    0%, 100% { rotate: -1.8deg; }
    50%      { rotate: 2.4deg; }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.025); }
}

@keyframes petalFall {
    0%   { transform: translate3d(0, -40px, 0) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.85; }
    50%  { transform: translate3d(30px, 45dvh, 0) rotate(190deg); }
    90%  { opacity: 0.8; }
    100% { transform: translate3d(-18px, 106dvh, 0) rotate(380deg); opacity: 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 8px 20px rgba(0, 81, 137, 0.28), 0 0 0 0 rgba(34, 118, 177, 0.4); }
    50%      { box-shadow: 0 8px 20px rgba(0, 81, 137, 0.28), 0 0 0 11px rgba(34, 118, 177, 0); }
}

@keyframes rotateMusic {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes ripple {
    from { transform: scale(1); opacity: 0.7; }
    to   { transform: scale(1.9); opacity: 0; }
}

@keyframes navIn {
    from { transform: translate(-50%, 160%); opacity: 0; }
    to   { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes navPop {
    0%   { transform: scale(0.7); }
    60%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lbImg {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: none; }
}

@keyframes wishIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); background: rgba(156, 199, 230, 0.55); }
    to   { opacity: 1; transform: none; }
}

@keyframes tick {
    from { opacity: 0.25; transform: translateY(-9px); }
    to   { opacity: 1; transform: none; }
}

/* sampul masuk bertahap */
.cv {
    animation: rise 1.1s var(--ease) var(--d, 0s) backwards;
}

#btn-open.cv {
    animation:
        rise 1.1s var(--ease) var(--d, 0s) backwards,
        glow 2.8s ease-in-out 3.2s infinite;
}

#cover .wash {
    animation: washBleed 2.4s var(--ease) backwards;
}

#cover .ink {
    animation: write 1.5s var(--ease-io) var(--d, 0s) backwards;
}

.ring-photo {
    animation: popIn 1.5s var(--ease) 0.4s backwards;
}

.ring-img {
    animation: breathe 7s ease-in-out 2s infinite;
}

#cover .bloom img {
    animation:
        bloomIn 1.7s var(--spring) var(--d, 0.9s) backwards,
        sway var(--sway, 8s) ease-in-out var(--sd, 0s) infinite;
}

#cover .strip {
    animation: rise 1.6s var(--ease) 0.8s backwards;
}

body.opened #home .wash {
    animation: washBleed 2.6s var(--ease) 0.4s backwards;
}

body.locked #home .wash {
    opacity: 0;
}

/* muncul saat digulir: kelas .js dipasang oleh script.js, atribut data-reveal diberi otomatis */
.js [data-reveal] {
    opacity: 0;
    transition:
        opacity 1s var(--ease) var(--d, 0s),
        transform 1.2s var(--ease) var(--d, 0s),
        scale 1.6s var(--spring) var(--d, 0s),
        rotate 1.6s var(--spring) var(--d, 0s),
        clip-path 1.5s var(--ease-io) var(--d, 0s);
}

.js [data-reveal="up"]    { transform: translateY(28px); }
.js [data-reveal="card"]  { transform: translateY(46px) scale(0.96); }
.js [data-reveal="photo"] { transform: translateY(44px) scale(0.93); }
.js [data-reveal="pop"]   { transform: scale(0.9); }
.js [data-reveal="amp"]   { transform: scale(0.5) rotate(-14deg); }
.js [data-reveal="title"] { opacity: 1; clip-path: inset(-25% 100% -25% -5%); }
.js [data-reveal="rule"]  { opacity: 1; clip-path: inset(-6px 50% -6px 50%); }
.js [data-reveal="line"]  { opacity: 1; }
.js [data-reveal="bloom"] { scale: 0.45; rotate: -24deg; }

.js [data-reveal="line"]::before {
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 2s var(--ease-io) var(--d, 0s);
}

.js [data-reveal].in {
    opacity: 1;
    scale: 1;
    rotate: 0deg;
}

/* bunga punya transform bawaan (dibalik 180 derajat), jangan direset */
.js [data-reveal].in:not([data-reveal="bloom"]) {
    transform: none;
}

.js [data-reveal="title"].in {
    clip-path: inset(-25% -10% -25% -5%);
}

.js [data-reveal="rule"].in {
    clip-path: inset(-6px 0 -6px 0);
}

.js [data-reveal="line"].in::before {
    transform: scaleY(1);
}

.cd-number.tick {
    animation: tick 0.55s var(--ease);
}

/* ==========================================================================
   RESPONSIF & AKSESIBILITAS
   ========================================================================== */
@media (max-width: 360px) {
    section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .bottom-nav {
        padding: 0.45rem 0.9rem;
    }

    .nav-item {
        font-size: 0.66rem;
    }

    .cd-item {
        min-width: 58px;
        padding: 0 0.5rem;
    }

    .cd-number {
        font-size: 2.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .petals {
        display: none;
    }

    body.locked .hero-seq > *,
    body.locked #home .wash,
    .js [data-reveal] {
        opacity: 1;
        transform: none;
        scale: 1;
        rotate: 0deg;
        clip-path: none;
    }
}
