/* ==================== GOOGLE FONTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ==================== VARIABLES ==================== */
:root {
    --header-height: 3.5rem;
    --primary-color: #EF1818; 
    --primary-color-alt: #FFCDD2;
    --blue-accent-color: #E3F2FD;
    --title-color: #333333;
    --text-color: #555555;
    --body-color: #FFFFFF;
    --container-color: #FFFFFF;
    --body-font: 'Poppins', sans-serif;
    --biggest-font-size: 2.5rem;
    --h1-font-size: 1.75rem;
    --h3-font-size: 1.1rem;
    --normal-font-size: .938rem;
    --z-sticky: 100;
}

/* ==================== RESPONSIVE TYPOGRAPHY ==================== */
@media screen and (max-width: 768px) {
    :root {
        --biggest-font-size: 1.75rem;
        --h1-font-size: 1.25rem;
    }
}

/* ==================== BASE & SCROLL SNAP SETUP ==================== */
* { box-sizing: border-box; padding: 0; margin: 0; }

html, body {
    overflow: hidden;
    height: 100%;
}

html { 
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
}

ul { list-style: none; }
a { text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ==================== MAIN SCROLL CONTAINER ==================== */
.main {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
}

/* ==================== REUSABLE CSS & LAYOUT ==================== */
.section { 
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--header-height) 1.5rem 2rem 1.5rem;
    position: relative;
    scroll-snap-align: start;
}

.container {
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}
.section__title {
    font-size: var(--h1-font-size);
    color: var(--title-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.section__subtitle {
    max-width: 500px;
    margin: 0 auto;
}

/* ==================== HEADER & NAV ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0; left: 0;
    z-index: var(--z-sticky);
    background-color: var(--container-color);
    transition: box-shadow 0.3s ease-in-out;
}
.header-scrolled { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav__logo-img { width: 120px; }
.nav__list { display: flex; gap: 2rem; }
.nav__link { color: var(--text-color); font-weight: 500; transition: color 0.3s; }
.nav__link:hover { color: var(--primary-color); }
.nav__actions { display: flex; align-items: center; gap: 1rem; }
.nav__button {
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
}
.nav__button:hover { background-color: var(--primary-color); color: #fff; }
.nav__toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--title-color); }

/* ==================== HOME (HERO SECTION) ==================== */
.home {
    text-align: center;
    overflow: hidden;
}

/* PERBAIKAN: Styling untuk div background yang baru */
.home__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/wellcome-section-svg.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 600px auto;
    opacity: 0.1;
    z-index: -1; /* Diletakkan di belakang konten .home */
}

.home__container {
    position: relative;
    z-index: 1; /* Pastikan konten teks berada di atas background */
}

.home__data {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}
.home__title {
    font-size: var(--biggest-font-size);
    color: var(--title-color);
    margin-bottom: 1rem;
    font-weight: 700;
}
.home__description {
    margin: 0 auto 2.5rem auto;
    color: var(--text-color);
    max-width: 620px;
}
.button--primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s;
}
.button--primary:hover {
    background-color: #B71C1C;
}

.home__data::before, .home__data::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 320px;
    z-index: -1; /* Berada di belakang form */
}

/* Dekorasi Kiri Atas */
.home__data::before {
    background-image: url('../images/c-b.svg');
    background-size: contain;
    background-repeat: no-repeat;
    top: 0;
    left: -48px;
    transform: translateX(-100%);
}

/* Dekorasi Kanan Bawah */
.home__data::after {
    background-image: url('../images/c-a.svg');
    background-size: contain;
    background-repeat: no-repeat;
    bottom: 0;
    right: -48px;
    transform: translateX(100%);
}

/* ==================== SERVICES (WHAT WE DO) ==================== */
.services {
    background-color: #FAFAFA;
    overflow: hidden;
}
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}
.services__card {
    padding: 2rem 1.5rem;
    background-color: var(--body-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.services__card:hover {
    transform: translateY(-5px);
}
.services__img {
    width: 120px; 
    height: auto;
    margin-bottom: 1.5rem;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.4s ease; 
}


.services__card:hover .services__img {
    filter: grayscale(0%);
}
.services__title {
    font-size: var(--h3-font-size);
    color: var(--primary-color);
    font-weight: 600;
}

.services::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 80px;
    background-image: url('../images/svc-before.svg');
    background-size: contain;
    background-repeat: no-repeat;
    top: 0px;
    right: 0px;
    z-index: 1;
}

.services::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 80px;
    background-image: url('../images/svc-after.svg');
    background-size: contain;
    background-repeat: no-repeat;
    bottom: 0px;
    left: 0px;
    z-index: 1;
}


/* ==================== VALUE (WHY US) ==================== */
.value__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2rem; 
}

.value__item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.value__img {
    width: 80px;
    height: 80px;
    flex-shrink: 0; 
    margin-top: 0.25rem;
}

.value__title {
    font-size: var(--h3-font-size);
    color: var(--title-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.value__description {
    font-size: var(--normal-font-size);
    line-height: 1.6;
}

.value::before, .value::after,
.value__grid::before, .value__grid::after {
    content: '';
    position: absolute;
    z-index: 1;
}

/* Pojok Kanan Atas (Biru, Lingkaran) */
.value::before {
    background-image: url('../images/wu-br.svg');
    background-size: contain;
    background-repeat: no-repeat;
    width: 80px;
    height: 80px;
    top: 0px;
    right: 0px;
}

/* Pojok Kiri Bawah (Pink, Segitiga) */
.value::after {
    background-image: url('../images/wu-al.svg');
    background-size: contain;
    background-repeat: no-repeat;
    bottom: 0px;
    left: 0px;
    width: 80px;
    height: 80px;
}

/* Pojok Kiri Atas (Pink, Lingkaran) - BARU */
.value__grid::before {
    background-image: url('../images/wu-bl.svg');
    background-size: contain;
    background-repeat: no-repeat;
    top: 0px;
    left: 0px;
    width: 240px;
    height: 80px;
}

/* Pojok Kanan Bawah (Biru, Segitiga) - BARU */
.value__grid::after {
    background-image: url('../images/wu-ar.svg');
    background-size: contain;
    background-repeat: no-repeat;
    bottom: 0px;
    right: 0px;
    width: 80px;
    height: 320px;
}

/* ==================== CONTACT (LET'S TALK) ==================== */
.contact {
    background-color: #FAFAFA;
}
.contact__form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative; /* Menjadi acuan posisi untuk pseudo-element */
    z-index: 2;
}
.contact__group {
    position: relative;
}
.contact__input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: var(--body-color);
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    outline: none;
    transition: border-color 0.3s;
}
.contact__input:focus {
    border-color: var(--primary-color);
}
.contact__label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-color);
    pointer-events: none;
    transition: all 0.3s ease;
}
.contact__input:focus + .contact__label,
.contact__input:not(:placeholder-shown) + .contact__label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: var(--small-font-size, 0.75rem);
    background-color: #FAFAFA;
    padding: 0 0.25rem;
    color: var(--primary-color);
}
textarea.contact__input {
    min-height: 150px;
    resize: vertical;
}
.contact__button {
    align-self: center;
    cursor: pointer;
    border: none;
}

/* Dekorasi untuk section contact, sekarang relatif terhadap form */
.contact__form::before, .contact__form::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 320px;
    z-index: -1; /* Berada di belakang form */
}

/* Dekorasi Kiri Atas */
.contact__form::before {
    background-image: url('../images/c-b.svg');
    background-size: contain;
    background-repeat: no-repeat;
    top: 0;
    left: -48px;
    transform: translateX(-100%);
}

/* Dekorasi Kanan Bawah */
.contact__form::after {
    background-image: url('../images/c-a.svg');
    background-size: contain;
    background-repeat: no-repeat;
    bottom: 0;
    right: -48px;
    transform: translateX(100%);
}

/* ==================== FLASH NOTIFICATION ==================== */
.flash {
    position: fixed;
    top: calc(var(--header-height) + 1rem);
    right: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1001;
    opacity: 0;
    transform: translateX(110%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.flash.show {
    opacity: 1;
    transform: translateX(0);
}

.flash--success {
    background-color: #D4EDDA;
    color: #155724;
    border-left: 5px solid #155724;
}

.flash--danger {
    background-color: #F8D7DA;
    color: #721C24;
    border-left: 5px solid #721C24;
}

/* ==================== MEDIA QUERIES (RESPONSIVE) ==================== */
@media screen and (max-width: 768px) {
    html, body, .main {
        overflow: auto;
        height: auto;
    }
    .main {
        scroll-snap-type: none;
    }
    .header {
        position: sticky;
    }
    .nav__menu {
        position: fixed; top: var(--header-height); right: -100%;
        width: 70%; height: 100vh;
        background-color: var(--container-color);
        box-shadow: -2px 0 4px rgba(0,0,0,0.1);
        padding: 3rem 2rem;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    }
    .show-menu { right: 0; }
    .nav__list { flex-direction: column; gap: 2.5rem; }
    .nav__toggle { display: block; }
    .nav__button { display: none; }
    
    .section, .home {
        min-height: auto;
        padding: 4rem 0 1rem;
    }
    .home { 
        background-size: 90% auto;
    }
    .services__grid, .value__grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 350px) {
    .container {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}