/* Core & Variables */
:root {
    --primary-color: #9e2a2b;
    --primary-hover: #7b1e1e;
    --dark-bg: #111111;
    --dark-surface: #1e1e1e;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #e0e0e0;

    --pale: #f7f4ef;
    --earthy-red: #542e2e;
    --earthy-dark-brown: #332020;
    --night-black: #121212;

    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

body {
    background-color: var(--white);
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--white) !important;
}

.text-dark {
    color: var(--text-main) !important;
}

.bg-dark {
    background-color: var(--dark-bg);
}

.bg-light {
    background-color: var(--light-bg);
}

.bg-pale {
    background-color: var(--pale);
}

.w-100 {
    width: 100%;
}

.mt-3 {
    margin-top: 15px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.section-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--night-black);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.section-subtitle .line {
    width: 30px;
    height: 2px;
    background-color: var(--earthy-red);
}

.text-accent {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(158, 42, 43, 0.2);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--dark-bg);
}

.btn-secondary {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.btn-secondary:hover {
    border-color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition-fast);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-flag {
    position: absolute;
    top: 0;
    z-index: 10;
    background: rgba(17, 17, 17, 0.95);
    padding: 10px 10px 20px 10px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.logo-flag img {
    height: 100px;
    display: block;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-fast);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
}

/* Hero */
.hero {
    position: relative;
    padding: 160px 0 100px;
    /* Reduced padding slightly to avoid feeling too tall */
    display: flex;
    align-items: center;
    background: #111111 url('../images/home.webp') right center/contain no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(17, 17, 17, 1) 0%, rgba(17, 17, 17, 0.95) 45%, rgba(17, 17, 17, 0) 100%);
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
}

.hero-content {
    color: var(--white);
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-features {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(17, 17, 17, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.feature-item i {
    font-size: 2rem;
    color: var(--white);
    opacity: 0.8;
}

.feature-item div {
    display: flex;
    flex-direction: column;
}

.feature-item strong {
    font-size: 1rem;
    margin-bottom: 3px;
}

.feature-item span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Services */
.services {
    background-color: var(--pale);
}

/* Service Vertical Cards */
.services-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.service-card.interactive-card {
    width: calc((100% - 60px) / 3);
    height: 250px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition-slow);
    cursor: pointer;
}

.service-card.interactive-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Make the last two cards wider to fill the second row perfectly */
.service-card.interactive-card:nth-last-child(-n+2) {
    width: calc((100% - 30px) / 2);
}

.interactive-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.9) 0%, rgba(17, 17, 17, 0.4) 50%, rgba(17, 17, 17, 0.1) 100%);
    transition: var(--transition-slow);
}

.service-card.interactive-card:hover .card-overlay {
    background: linear-gradient(to top, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.8) 50%, rgba(17, 17, 17, 0.6) 100%);
}

.interactive-card .service-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
}

.interactive-card h3 {
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 0;
    color: var(--white);
    transition: var(--transition-slow);
    transform: translateY(20px);
}

.interactive-card h3 span {
    color: var(--primary-color);
}

.interactive-card p {
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.5;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-slow);
    max-height: 0;
    overflow: hidden;
}

.service-card.interactive-card:hover h3 {
    transform: translateY(0);
    margin-bottom: 5px;
}

.service-card.interactive-card:hover p {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
}

/* Portfolio */
.portfolio {
    border-top: 2px solid rgba(84, 46, 46, 0.15);
    /* earthy-red slightly visible */
}

.portfolio-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
}

.portfolio-text h2.section-title {
    color: var(--night-black);
}

.portfolio-text p {
    color: var(--night-black);
    opacity: 0.8;
    line-height: 1.6;
    margin-top: 15px;
}

.bg-dark .portfolio-text h2.section-title,
.bg-dark .portfolio-text p,
.bg-dark .section-subtitle {
    color: var(--white);
}

.bg-dark .section-subtitle .line {
    background-color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.portfolio-item {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.portfolio-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: var(--transition-fast);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item:hover::after {
    opacity: 1;
}

/* Portofolio Pagar */
#portofolio-pagar .portfolio-text p {
    color: var(--text-light);
}

/* Workflow */
.workflow-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-top: 60px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 15px;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.2rem;
    position: relative;
    box-shadow: 0 10px 20px rgba(158, 42, 43, 0.2);
    transition: var(--transition-fast);
}

.step:hover .step-icon {
    transform: scale(1.1);
}

.step-number {
    position: absolute;
    bottom: -10px;
    background: var(--dark-bg);
    color: var(--white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 3px solid var(--white);
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark-bg);
}

.step p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-connector {
    flex: 0 0 50px;
    height: 2px;
    background: #eaeaea;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

/* Testimonials */
.testimonials {
    background-color: var(--pale);
}

.testimonials-inner {
    background: var(--dark-bg);
    border-radius: 24px;
    padding: 60px 0;
    overflow: hidden;
    position: relative;
}

.testimonials .section-header p {
    color: var(--text-light);
    margin-top: 10px;
}

.testimonial-slider-container {
    width: 100%;
    margin-top: 50px;
    overflow: hidden;
    position: relative;
}

/* Optional fade edges */
.testimonial-slider-container::before,
.testimonial-slider-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.testimonial-slider-container::before {
    left: 0;
    background: linear-gradient(to right, var(--dark-bg), transparent);
}

.testimonial-slider-container::after {
    right: 0;
    background: linear-gradient(to left, var(--dark-bg), transparent);
}

.testimonial-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.testimonial-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 15px));
    }
}

.testimonial-card {
    background: var(--dark-surface);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 350px;
    flex-shrink: 0;
}

.stars {
    color: #ffb400;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.review {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 20px;
    font-style: italic;
}

.client {
    display: flex;
    align-items: center;
    gap: 15px;
}

.client img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.client h4 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 2px;
}

.client span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.dot.active,
.dot:hover {
    background: var(--white);
    transform: scale(1.2);
}

/* Footer */
.footer {
    background: #fdfdfd;
    padding-top: 80px;
    border-top: 1px solid #eaeaea;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 20px;
    font-size: 0.95rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.1rem;
    color: var(--dark-bg);
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid #eaeaea;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible,
.fade-in-right.visible {
    opacity: 1;
    transform: translate(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-overlay {
        background: linear-gradient(to right, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.7) 100%);
    }

    .portfolio-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .portfolio-text {
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 180px 0 80px;
        background-size: cover;
        background-position: center;
    }

    .hero-overlay {
        background: rgba(17, 17, 17, 0.85);
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-features {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links,
    .nav-contact {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .workflow-steps {
        flex-direction: column;
        gap: 40px;
    }

    .step-connector {
        display: none;
    }

    .step {
        width: 100%;
    }

    .service-card.interactive-card,
    .service-card.interactive-card:nth-last-child(-n+2) {
        width: 100%;
        height: 220px;
    }

    .interactive-card h3 {
        font-size: 1.4rem;
        transform: translateY(0);
    }

    .interactive-card p {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }

    .interactive-card .card-overlay {
        background: linear-gradient(to top, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.6) 100%);
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .navbar.mobile-active .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-bg);
        padding: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--white);
    animation: bounce 2s infinite;
    z-index: 10;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-20px) translateX(-50%);
    }

    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: block;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}