:root {
    --cream: #f8f4ee;
    --paper: #fffdf9;
    --brown: #674331;
    --brown-dark: #493025;
    --text: #4c3a30;
    --muted: #89786d;
    --line: #e8ddd1;
    --serif: "Playfair Display", Georgia, serif;
    --sans: "DM Sans", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1160px, calc(100% - 40px));
    margin: auto;
}

.header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 253, 249, .96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.navbar {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-family: var(--serif);
    font-size: 19px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 28px;
    font-size: 12px;
}

.nav-links a:hover {
    color: #a36e4d;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--brown);
    font-size: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 21px;
    border: 1px solid var(--brown);
    border-radius: 999px;
    background: var(--brown);
    color: white;
    font-size: 12px;
    font-weight: 600;
    transition: .2s;
}

.button:hover {
    background: var(--brown-dark);
    transform: translateY(-2px);
}

.button-small {
    padding: 10px 17px;
}

.button-outline {
    background: transparent;
    color: var(--brown);
}

.button-outline:hover {
    color: white;
}

/* BERANDA */

.hero {
    background: linear-gradient(110deg, #fbf7f1, #f2e7da);
}

.hero-grid {
    min-height: 510px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 45px;
    padding-top: 45px;
    padding-bottom: 45px;
}

.eyebrow {
    margin-bottom: 13px;
    color: #98765f;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

h1,
h2 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.2;
}

h1 {
    max-width: 560px;
    margin: 0 0 20px;
    font-size: clamp(38px, 4.5vw, 57px);
}

h1 em {
    color: #9c7359;
    font-weight: 400;
}

.description {
    max-width: 470px;
    margin-bottom: 25px;
    color: var(--muted);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-art {
    position: relative;
    min-height: 370px;
    display: grid;
    place-items: center;
}

.hero-photo {
    position: absolute;
    inset: 0 0 0 14%;
    border-radius: 45% 45% 8px 8px;

    /* Jalankan animasi bernama 'slidePhotos' berdurasi 20 detik secara terus-menerus */
    animation: slidePhotos 20s infinite ease-in-out;
}

/* Keyframes untuk mengganti 5 foto secara bergantian */
@keyframes slidePhotos {

    /* Foto 1 (0% - 16%) */
    0%,
    16% {
        background:
            linear-gradient(rgba(70, 45, 30, .1), rgba(70, 45, 30, .1)),
            url("images/foto-1.jpg") center 80% / cover;
    }

    /* Transisi ke Foto 2 (20% - 36%) */
    20%,
    36% {
        background:
            linear-gradient(rgba(70, 45, 30, .1), rgba(70, 45, 30, .1)),
            url("images/foto-2.jpg") center 70% / cover;
    }

    /* Transisi ke Foto 3 (40% - 56%) */
    40%,
    56% {
        background:
            linear-gradient(rgba(70, 45, 30, .1), rgba(70, 45, 30, .1)),
            url("images/foto-3.jpg") center 85% / cover;
    }

    /* Transisi ke Foto 4 (60% - 76%) */
    60%,
    76% {
        background:
            linear-gradient(rgba(70, 45, 30, .1), rgba(70, 45, 30, .1)),
            url("images/foto-4.jpg") center 70% / cover;
    }

    /* Transisi ke Foto 5 (80% - 96%) */
    80%,
    96% {
        background:
            linear-gradient(rgba(70, 45, 30, .1), rgba(70, 45, 30, .1)),
            url("images/foto-5.jpg") center 70% / cover;
    }

    /* Kembali ke awal secara mulus */
    100% {
        background:
            linear-gradient(rgba(70, 45, 30, .1), rgba(70, 45, 30, .1)),
            url("images/foto-1.jpg") center 80% / cover;
    }
}

.hero-invitation {
    position: relative;
    width: 250px;
    min-height: 315px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border: 1px solid #e8d8c7;
    outline: 1px solid white;
    outline-offset: -8px;
    background: #fffdf8;
    text-align: center;
    box-shadow: 0 18px 45px #49302530;
    transform: rotate(-3deg);
}

.ornament {
    color: #b6a181;
    font-size: 34px;
}

.cover-label {
    margin: 10px 0;
    color: #967b65;
    font-size: 8px;
    letter-spacing: 2px;
}

.hero-invitation h2 {
    margin: 15px 0;
    font-size: 34px;
    line-height: 1.3;
}

.hero-invitation h2 span {
    display: block;
    color: #a58a70;
    font-size: 22px;
    font-style: italic;
}

.line {
    width: 50px;
    height: 1px;
    margin: 10px auto;
    background: #c5ad94;
}

.cover-date {
    color: #8e7764;
    font-size: 9px;
    letter-spacing: 2px;
}

/* KEUNGGULAN */

.benefits {
    border-bottom: 1px solid var(--line);
    text-align: center;
    /* Mengetengahkan teks secara keseluruhan */
}

.benefit-grid {
    /* Mengubah dari Grid kaku menjadi Flexbox agar otomatis ke tengah */
    display: flex;
    justify-content: center;
    /* Membuat item berada persis di tengah */
    align-items: center;
    flex-wrap: wrap;
    /* Agar turun ke bawah secara otomatis jika layar tidak muat */
    gap: 30px;
    /* Jarak antar kotak */
    padding-top: 25px;
    padding-bottom: 25px;
}

.benefit-grid>div {
    padding: 8px;
    /* Memberikan lebar minimal/maksimal agar ukuran kotaknya seragam */
    flex: 0 1 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Mengetengahkan isi dalam setiap kotak */
    text-align: center;
}

.benefit-grid span {
    color: #9c7359;
    font-size: 23px;
}

.benefit-grid h3 {
    margin: 5px 0 0;
    font-size: 12px;
}

.benefit-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

/* CONTAINER KATALOG (Mengetengahkan & Membagi 3 Kolom) */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    /* Membagi rata 3 kolom */
    gap: 20px;
    max-width: 1080px;
    /* Batasi lebar total agar tidak terlalu melebar ke samping */
    margin: 0 auto;
    /* Mengetengahkan seluruh grid */
    padding: 0 15px;
}

/* KARTU KATALOG */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 16px;
    border: 1px solid #efe6dd;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(83, 56, 39, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(83, 56, 39, 0.08);
}

/* FRAME HP (MOCKUP) */
.phone-mockup {
    position: relative;
    width: 140px;
    /* Ukuran HP dipaskan */
    height: 250px;
    /* Proporsi tinggi layar HP */
    background: #181818;
    border-radius: 28px;
    padding: 6px;
    /* Bezel HP lebih tipis dan elegan */
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.12),
        inset 0 0 2px rgba(255, 255, 255, 0.15);
    margin-bottom: 12px;
}

/* PONI HP / NOTCH */
.phone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 7px;
    background: #181818;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    z-index: 10;
}

/* LAYAR HP */
.phone-screen {
    width: 100%;
    height: 100%;
    background: #f9f9f9;
    border-radius: 22px;
    overflow: hidden;
}

.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* DETAIL TEKS INFORMASI */
.card-info {
    width: 100%;
    text-align: center;
    padding: 4px 0 10px;
}

.card-info .code {
    margin: 0;
    color: #a08470;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.card-info h3 {
    margin: 2px 0 1px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text, #333);
}

.card-info p:not(.code) {
    margin: 0 0 4px;
    color: #8c7a6e;
    font-size: 11px;
}

.card-info strong {
    color: var(--brown, #533827);
    font-size: 11.5px;
    font-weight: 700;
}

/* TOMBOL LEBIH PROPORSIONAL & TIDAK KEGEDEAN */
.card-buttons {
    width: 100%;
    max-width: 220px;
    /* Batasi lebar tombol agar tidak melebar memenuhi kartu */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
    /* Memastikan posisi tombol sejajar di paling bawah */
}

.card-buttons .button {
    padding: 7px 10px;
    /* Padding lebih kecil agar ramping */
    font-size: 11px;
    font-weight: 500;
    border-radius: 8px;
    /* Sudut tombol lebih halus */
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

/* RESPONSIVE UNTUK TABLET & HP */
@media (max-width: 850px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Layar sedang (Tablet) jadi 2 sebaris */
    }
}

@media (max-width: 550px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        /* Layar HP jadi 1 sebaris */
    }
}

/* TENTANG KAMI */

.about {
    background: var(--paper);
}

.about-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    align-items: center;
    gap: 70px;
}

.about-art {
    min-height: 350px;
    display: grid;
    place-items: center;
    padding: 25px;
    background: #eee1d3;
}

.about-paper {
    width: 80%;
    min-height: 280px;
    display: grid;
    place-items: center;
    padding: 25px;
    border: 1px solid #c8ad91;
    outline: 1px solid white;
    outline-offset: -9px;
    background: #fffdf8;
    color: #80634c;
    font-family: var(--serif);
    font-size: 25px;
    font-style: italic;
    text-align: center;
}

.about-grid>div:last-child>p:not(.eyebrow) {
    color: var(--muted);
    font-size: 13px;
}

/* KONTAK */

.contact {
    background: #f8f3ec;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 75px;
    align-items: start;
}

.contact-grid>div>p:not(.eyebrow) {
    color: var(--muted);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 25px;
    border: 1px solid #eee2d5;
    border-radius: 10px;
    background: #fffdfa;
    box-shadow: 0 14px 35px #53382712;
}

.contact-form label {
    margin-top: 5px;
    color: #725846;
    font-size: 11px;
    font-weight: 600;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e7ddd3;
    border-radius: 5px;
    outline: none;
    background: #fffdfa;
    color: var(--text);
    font-size: 12px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: #a98569;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .button {
    margin-top: 10px;
    border-radius: 5px;
}

/* FOOTER */

.footer {
    padding: 25px 0;
    background: #50372a;
    color: #f8eee3;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.footer-inner p {
    margin: 0;
    color: #d9c6b6;
    font-size: 10px;
}

/* PREVIEW */

.preview-dialog {
    position: fixed;
    width: min(440px, calc(100% - 30px));
    padding: 28px;
    border: 1px solid #dfcdbb;
    background: #f8f1e6;
    color: var(--text);
}

.preview-dialog::backdrop {
    background: #261b15a8;
    backdrop-filter: blur(4px);
}

.close-preview {
    position: absolute;
    top: 5px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--brown);
    font-size: 28px;
}

.preview-paper {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border: 1px solid #d7c0a7;
    outline: 1px solid white;
    outline-offset: -9px;
    background: #fffdf7;
    text-align: center;
}

.preview-paper h2 {
    font-size: 37px;
}

.preview-paper>p:not(.cover-label) {
    max-width: 270px;
    color: var(--muted);
    font-size: 12px;
}

.preview-paper small {
    color: #9b8a7e;
    font-size: 10px;
}

/* RESPONSIVE */

@media (max-width: 850px) {
    .nav-links {
        gap: 14px;
    }

    .hero-grid {
        gap: 20px;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-grid,
    .contact-grid {
        gap: 35px;
    }
}

@media (max-width: 600px) {
    .container {
        width: calc(100% - 30px);
    }

    .navbar {
        min-height: 65px;
        gap: 10px;
    }

    .brand {
        font-size: 15px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .navbar>.button {
        padding: 9px 11px;
        font-size: 10px;
    }

    .nav-links {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 10px 20px;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 9px 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        padding-top: 45px;
    }

    h1 {
        font-size: 40px;
    }

    .hero-art {
        min-height: 330px;
    }

    .hero-photo {
        inset: 0 5% 0 12%;
    }

    .hero-invitation {
        width: 225px;
        min-height: 290px;
    }

    .benefit-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .section {
        padding: 60px 0;
    }

    .section-heading h2,
    .about h2,
    .contact h2 {
        font-size: 31px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
        max-width: 390px;
        margin: auto;
    }

    .design {
        min-height: 330px;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-art {
        min-height: 290px;
    }

    .about-paper {
        min-height: 240px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}