/* Halaman utama templateundangan.net: etalase 4 template parallax Laxy Motions. */

:root {
    --ink: #080c0a;
    --paper: #f3eee4;
    --muted: #b8b1a3;
    --gold: #c5a85c;
    --gold-hover: #d4ba74;
    --gold-line: rgba(197, 168, 92, 0.42);
    --hairline: rgba(243, 238, 228, 0.16);
    --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
    --display: 'Viaoda Libre', Georgia, 'Times New Roman', serif;
    --ui: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    background: var(--ink);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--ui);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
}

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

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
    border-radius: 6px;
}

/* Navigasi */

.hp-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) var(--gutter) 1rem;
}

.hp-logo {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--display);
    font-size: 1.3rem;
    line-height: 1;
    white-space: nowrap;
}

.hp-logo span {
    color: var(--gold);
}

.hp-nav-links {
    display: flex;
    gap: 0.25rem;
}

.hp-nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.75rem;
    font-size: 0.92rem;
    color: var(--muted);
    transition: color 0.4s var(--ease);
}

.hp-nav-links a:hover {
    color: var(--paper);
}

.hp-nav-links .hp-nav-desktop {
    display: none;
}

/* Tombol */

.hp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
}

.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1.5rem;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--paper);
    text-align: center;
    transition: transform 0.5s var(--ease), background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.hp-btn:hover {
    border-color: var(--gold-line);
    background-color: rgba(197, 168, 92, 0.08);
}

.hp-btn:active {
    transform: scale(0.98);
}

.hp-btn-gold {
    border-color: var(--gold);
    background-color: var(--gold);
    color: var(--ink);
    font-weight: 500;
}

.hp-btn-gold:hover {
    border-color: var(--gold-hover);
    background-color: var(--gold-hover);
}

.hp-scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    font-size: 0.92rem;
    color: var(--muted);
    transition: color 0.4s var(--ease);
}

.hp-scroll-cue:hover {
    color: var(--paper);
}

/* Jendela gerbang (motif identitas) */

.hp-arch {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    border-radius: 50% 50% 10px 10px / 28.2% 28.2% 10px 10px;
    background: #121512;
    isolation: isolate;
}

.hp-arch > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Pembuka */

.hp-intro {
    display: grid;
    align-content: center;
    gap: clamp(2.5rem, 6vh, 4rem);
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(6rem + env(safe-area-inset-top, 0px)) var(--gutter) clamp(3rem, 8vh, 5rem);
}

.hp-intro-copy {
    max-width: 40rem;
}

.hp-intro h1 {
    margin: 0 0 1.25rem;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.3rem, 6vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.hp-intro-copy p {
    max-width: 34rem;
    margin: 0 0 2rem;
    font-size: clamp(1rem, 1.3vw, 1.125rem);
    color: var(--muted);
}

.hp-gates {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.5rem, 2vw, 1.5rem);
    max-width: 46rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hp-gate {
    display: block;
}

.hp-gate .hp-arch {
    box-shadow: 0 0 0 1px var(--gold-line);
}

.hp-gate .hp-arch > img {
    transition: transform 1.2s var(--ease);
}

.hp-gate:hover .hp-arch > img {
    transform: scale(1.06);
}

.hp-gate-name {
    display: block;
    margin-top: 0.75rem;
    font-family: var(--display);
    font-size: clamp(0.95rem, 1.6vw, 1.3rem);
    line-height: 1.2;
}

.hp-gate-name em {
    display: block;
    margin-top: 0.15rem;
    font-family: var(--ui);
    font-style: normal;
    font-size: 0.78rem;
    color: var(--muted);
}

/* Babak parallax per template */

.hp-scene {
    position: relative;
    height: 200vh;
    height: 200svh;
    background: var(--tone, var(--ink));
}

.hp-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    isolation: isolate;
}

/* Lukisan template yang sama dipakai sebagai suasana latar, digelapkan agar teks tetap terbaca. */
.hp-ambient {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.hp-sticky::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(8, 12, 10, 0.94) 0%, rgba(8, 12, 10, 0.62) 55%, rgba(8, 12, 10, 0.82) 100%);
}

.hp-scene-flip .hp-sticky::before {
    background: linear-gradient(270deg, rgba(8, 12, 10, 0.94) 0%, rgba(8, 12, 10, 0.62) 55%, rgba(8, 12, 10, 0.82) 100%);
}

.hp-scene-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "copy window";
    align-items: center;
    gap: clamp(2rem, 6vw, 7rem);
    height: 100%;
    max-width: 82rem;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.hp-scene-flip .hp-scene-inner {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "window copy";
}

.hp-window {
    grid-area: window;
    position: relative;
    display: block;
}

/* Bingkai luar emas: lapisan kedua yang mengikuti lengkung jendela. */
.hp-window::before {
    content: '';
    position: absolute;
    inset: -12px;
    border: 1px solid var(--gold-line);
    border-radius: 50% 50% 18px 18px / 28.6% 28.6% 18px 18px;
    pointer-events: none;
}

.hp-arch-lg {
    height: min(80vh, 860px);
    height: min(80svh, 860px);
    box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.6);
}

.hp-layer {
    position: absolute;
}

img.hp-layer {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.14);
}

.hp-couple {
    transform-origin: 50% 100%;
    left: 0;
    right: 0;
    bottom: 3%;
    height: 66%;
    display: flex;
    justify-content: center;
}

.hp-couple img {
    width: auto;
    max-width: none;
    height: 100%;
}

.hp-semak {
    transform-origin: 50% 100%;
    bottom: -9%;
    width: 72%;
}

.hp-semak img {
    width: 100%;
    height: auto;
}

.hp-semak-l {
    left: -6%;
}

.hp-semak-r {
    right: -6%;
}

.hp-semak-r img {
    transform: scaleX(-1);
}

.hp-copy {
    grid-area: copy;
    max-width: 32rem;
}

.hp-count {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--gold);
}

.hp-copy h2 {
    margin: 0 0 1.5rem;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(3.2rem, 7vw, 6rem);
    line-height: 0.95;
}

.hp-copy h2 em,
.hp-shelf-name em {
    font-style: normal;
    color: var(--muted);
}

.hp-copy h2 em {
    display: block;
    margin-top: 0.3em;
    font-size: 0.42em;
}

.hp-desc {
    max-width: 30rem;
    margin: 0 0 2rem;
    font-size: 1.05rem;
    color: var(--muted);
}

/* Penutup */

.hp-closing {
    max-width: 82rem;
    margin: 0 auto;
    padding: clamp(5rem, 14vh, 9rem) var(--gutter);
}

.hp-closing-head {
    max-width: 40rem;
    margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.hp-closing h2 {
    margin: 0 0 1rem;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2rem, 4.6vw, 3.5rem);
    line-height: 1.08;
    text-wrap: balance;
}

.hp-closing-head p {
    margin: 0;
    font-size: 1.05rem;
    color: var(--muted);
}

.hp-shelf {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2.4vw, 1.75rem) clamp(0.75rem, 2.4vw, 1.75rem);
    margin: 0 0 clamp(2.5rem, 6vh, 3.5rem);
    padding: 0;
    list-style: none;
}

.hp-shelf-item {
    display: block;
}

.hp-shelf-frame {
    display: block;
    padding: 6px;
    border: 1px solid var(--hairline);
    border-radius: 22px;
    background: rgba(243, 238, 228, 0.03);
    transition: border-color 0.5s var(--ease);
}

/* Potong judul bawaan gambar mockup; yang tampil hanya tiga layar HP berisi tampilan undangan. */
.hp-shelf-frame img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 50% 71%;
    border-radius: 16px;
}

.hp-shelf-item:hover .hp-shelf-frame {
    border-color: var(--gold-line);
}

.hp-shelf-name {
    display: block;
    margin-top: 0.9rem;
    font-family: var(--display);
    font-size: 1.2rem;
    line-height: 1.2;
}

/* Footer */

.hp-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 1.5rem;
    padding: 1.25rem var(--gutter) calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--hairline);
    font-size: 0.9rem;
    color: var(--muted);
}

.hp-footer p {
    margin: 0;
}

.hp-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
}

.hp-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    transition: color 0.4s var(--ease);
}

.hp-footer a:hover {
    color: var(--paper);
}

/* Gerak (hanya jika pengunjung tidak mematikan animasi) */

@keyframes hp-rise {
    from {
        opacity: 0;
        transform: translate3d(0, 28px, 0);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hp-gates li {
        animation: hp-rise 1.2s var(--ease) both;
    }

    .hp-gates li:nth-child(2) { animation-delay: 0.08s; }
    .hp-gates li:nth-child(3) { animation-delay: 0.16s; }
    .hp-gates li:nth-child(4) { animation-delay: 0.24s; }

    .hp-js .hp-couple,
    .hp-js .hp-copy {
        opacity: 0;
    }

    /* Pengguna keyboard yang melompat ke tombol babak selalu melihat teksnya utuh. */
    .hp-js .hp-copy:focus-within {
        opacity: 1 !important;
        transform: none !important;
    }

    .hp-scene.is-active .hp-layer,
    .hp-scene.is-active .hp-copy {
        will-change: transform, opacity;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
    }
}

/* Layar lebar */

@media (min-width: 720px) {
    .hp-nav-links .hp-nav-desktop {
        display: inline-flex;
    }
}

@media (min-width: 960px) {
    .hp-intro {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        align-items: center;
        gap: clamp(3rem, 6vw, 6rem);
        max-width: 82rem;
        margin: 0 auto;
    }

    .hp-gates li:nth-child(even) {
        margin-top: 2.5rem;
    }

    .hp-shelf {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Navigasi HP: logo + 2 tautan harus muat di lebar 360px; di bawah itu tautan turun ke baris kedua. */

@media (max-width: 479px) {
    .hp-nav {
        flex-wrap: wrap;
        gap: 0 0.5rem;
    }

    .hp-logo {
        font-size: 1.08rem;
    }

    .hp-nav-links {
        margin-right: -0.45rem;
    }

    .hp-nav-links a {
        padding: 0 0.45rem;
        font-size: 0.86rem;
    }
}

@media (max-width: 359px) {
    .hp-nav-links {
        margin-left: -0.45rem;
    }

    .hp-intro {
        padding-top: calc(8.75rem + env(safe-area-inset-top, 0px));
    }
}

/* Layar HP: babak memenuhi layar, teks di atas lukisan */

@media (max-width: 959px) {
    .hp-ambient,
    .hp-sticky::before,
    .hp-window::before {
        display: none;
    }

    .hp-scene-inner {
        position: relative;
        display: block;
        max-width: none;
        padding: 0;
    }

    .hp-window {
        position: absolute;
        inset: 0;
    }

    .hp-arch-lg {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 0;
        box-shadow: none;
    }

    /* Penggelap bawah agar teks di atas lukisan tetap kontras. */
    .hp-arch-lg::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 3;
        background: linear-gradient(180deg, rgba(8, 12, 10, 0) 36%, rgba(8, 12, 10, 0.74) 60%, rgba(8, 12, 10, 0.96) 84%);
        pointer-events: none;
    }

    .hp-couple {
        bottom: 22%;
        height: 56%;
    }

    .hp-semak {
        bottom: 13%;
        width: 80%;
    }

    .hp-semak-l {
        left: -10%;
    }

    .hp-semak-r {
        right: -10%;
    }

    .hp-copy {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 4;
        max-width: none;
        padding: 0 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
    }

    .hp-copy h2 {
        margin-bottom: 1rem;
        font-size: clamp(2.6rem, 12vw, 3.6rem);
    }

    .hp-desc {
        margin-bottom: 1.25rem;
        font-size: 0.98rem;
    }
}
