/* ===== CSS Variables (Root) ===== */
:root {
    --primary-bg: #120F1C;
    --secondary-bg: #1A142D;
    --primary-text: #F5F5F5;
    --secondary-text: #A9A4B9;
    --accent-color: #FFD700; /* Emas */
    --accent-hover: #E6C200;
    --font-family: 'Poppins', sans-serif;
}

/* ===== Global Styles & Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    overflow-x: hidden; /* Mencegah scroll horizontal */
}

section {
    padding: 100px 10%;
    position: relative;
}

h1, h2, h3 {
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    color: white;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-text);
}

p {
    color: var(--secondary-text);
    font-size: 1.1rem;
}

/* ===== Navbar ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, padding 0.4s ease;
}

header.scrolled {
    background-color: rgba(18, 15, 28, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 10%;
    transition: padding 0.4s ease;
}

header.scrolled .navbar {
    padding: 15px 10%;
}

.logo img {
    height: 40px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--primary-text);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--accent-color);
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 15, 28, 0.7);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero-content p {
    font-size: 1.25rem;
    margin: 20px 0 40px;
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--primary-bg);
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
}

/* ===== About Section ===== */
.about {
    background-color: var(--secondary-bg);
    text-align: center;
}
.about p {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    color: white;
    text-decoration: none;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    background-color: var(--secondary-bg);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: brightness(0.6); 
}

.project-card:hover img {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(18, 15, 28, 0.98) 30%, transparent 100%);
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--accent-color);
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.project-card:hover .card-overlay h3 {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.1s;
}

.card-overlay p {
    font-size: 0.9rem;
    color: var(--primary-text);
    margin-bottom: 15px;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.project-card:hover .card-overlay p {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.2s;
}

.view-project-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-card:hover .view-project-btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

/* ===== Services Section ===== */
.services {
    background-color: var(--secondary-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-card {
    background-color: var(--primary-bg);
    padding: 40px 25px;
    border-radius: 15px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    background-color: #2A214A;
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* ===== Contact Section ===== */
.contact {
    text-align: center;
}
.contact p {
    max-width: 600px;
    margin: -30px auto 40px;
}
.contact form {
    max-width: 700px;
    margin: 0 auto;
}
.form-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.contact input, .contact textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--secondary-bg);
    border-radius: 10px;
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
.contact input:focus, .contact textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}
.contact textarea {
    min-height: 150px;
    resize: vertical;
    margin-bottom: 20px;
}
.contact button {
    background-color: var(--accent-color);
    color: var(--primary-bg);
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.contact button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 40px 10%;
    background-color: var(--primary-bg);
    border-top: 1px solid var(--secondary-bg);
}
.social-links {
    margin-bottom: 20px;
}
.social-links a {
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s ease;
}
.social-links a:hover {
    color: var(--accent-color);
}
footer p {
    font-size: 0.9rem;
}

/* ===== Reveal on Scroll Animation ===== */
.reveal {
    position: relative;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 1s, opacity 1s;
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 80px 5%; }
    .nav-links { display: none; } /* Perlu Hamburger Menu untuk mobile */
    .form-group { flex-direction: column; }
}

/* ===== ANIMASI TEKS PER HURUF ===== */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#animated-headline {
    line-height: 1.2; 
}

#animated-headline span {
    display: inline-block;
    opacity: 0;
    animation: slideInUp 0.8s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
    min-width: 1rem;
}