/* =========================
   ROOT VARIABLES
   ========================= */
:root {
    --color-black: #000;
    --color-white: #fff;
    --color-text-dark: #1f1f1f;
    --color-bg-light: #f3f3f1;
    --color-bg-dark: #09072e;
    --color-primary: #4c5eff;
    --color-accent: #c5e90d;
    --transition: 0.3s ease;
    --radius-pill: 999px;
}

/* =========================
   RESET
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    font-family: "Plus Jakarta Sans", sans-serif;
    background: var(--color-black);
}

body {
    position: relative;
    color: var(--color-white);
    overflow-x: hidden;
}

body::selection {
    color: var(--color-primary);
    background-color: var(--color-black);
}

/* =========================
   HERO SECTION
   ========================= */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

#bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2;
    pointer-events: none;
}

/* =========================
   HEADER
   ========================= */
.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 26px 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 100;
    background: transparent;
}

.header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-logo {
    width: 60px;
    height: auto;
    object-fit: contain;
}

.header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
}

.header-nav a {
    position: relative;
    padding-bottom: 4px;
    color: var(--color-white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.header-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-white);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.header-nav a:hover::after {
    width: 100%;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
}

.header-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-socials a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    color: var(--color-white);
    font-size: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
}

.header-socials a:hover {
    transform: translateY(-3px);
    background: var(--color-primary);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.menu-toggle span {
    width: 16px;
    height: 1.8px;
    background: #fff;
    border-radius: 10px;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.menu-toggle:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(76, 94, 255, 0.4);
}

/* Active toggle: glowing X */
.menu-toggle.active {
    background: rgba(76, 94, 255, 0.2);
    border-color: rgba(76, 94, 255, 0.5);
    box-shadow: 0 0 24px rgba(76, 94, 255, 0.35);
}

.menu-toggle.active span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle.active span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* =========================
   SOUND OVERLAY
   ========================= */
.sound-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    transition: 0.4s ease;
}

.sound-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sound-box {
    padding: 24px 34px;
    text-align: center;
    color: var(--color-white);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    animation: floatBox 2s ease-in-out infinite;
}

.sound-box i {
    font-size: 28px;
    margin-bottom: 12px;
}

.sound-box p {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

@keyframes floatBox {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

/* =========================
   AGENCY SECTION
   ========================= */
.agency-section {
    width: 100%;
    padding: 10px 70px 110px;
    background: var(--color-bg-light);
    color: var(--color-text-dark);
}

.agency-top-line {
    width: 100%;
    height: 1px;
    margin-bottom: 70px;
    background: rgba(0, 0, 0, 0.45);
}

.agency-content {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 70px;
    align-items: start;
}

.agency-left h2 {
    max-width: 900px;
    margin-bottom: 56px;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -2px;
}

.agency-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    height: 54px;
    padding: 0 28px;
    border-radius: var(--radius-pill);
    border: 1.5px solid rgba(0, 0, 0, 0.55);
    color: var(--color-text-dark);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
}

.agency-btn:hover {
    border-color: var(--color-accent);
    background: var(--color-accent);
}

.agency-right {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.agency-big-text {
    font-size: clamp(3.5rem, 9vw, 10rem);
    line-height: 0.9;
    font-weight: 800;
    letter-spacing: -8px;
    color: var(--color-text-dark);
}

/* =========================
   CARDS SLIDER SECTION
   ========================= */
.cards-slider-section {
    width: 100%;
    padding: 120px 0;
    overflow: hidden;
    background: var(--color-bg-light);
}

.cards-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.cards-slider {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 90px;
    cursor: grab;
    user-select: none;
}

.cards-slider::-webkit-scrollbar {
    display: none;
}

.project-card {
    position: relative;
    flex: 0 0 420px;
    height: 560px;
    overflow: hidden;
    background: var(--color-black);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.project-card:hover {
    transform: scale(0.97);
}

.project-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover img {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.35) 45%,
        rgba(0, 0, 0, 0.15) 70%,
        rgba(0, 0, 0, 0.08) 100%
    );
}

.card-content {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    z-index: 2;
    color: var(--color-white);
}

.card-content h3 {
    margin-bottom: 14px;
    font-size: 15px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -1px;
}

.card-content span {
    display: inline-block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.82);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 10;
    width: 62px;
    height: 62px;
    border: none;
    border-radius: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #111;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.slider-arrow:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.slider-arrow.left  { left: 16px; }
.slider-arrow.right { right: 16px; }

.cards-slider:hover .project-card     { opacity: 0.65; }
.cards-slider .project-card:hover     { opacity: 1; }

/* =========================
   SERVICES SECTION
   ========================= */
.services-section {
    width: 100%;
    min-height: 100vh;
    padding: 120px 70px;
    background: var(--color-bg-light);
    color: #111;
    transition: background 0.6s ease, color 0.6s ease;
}

.services-section.dark {
    background: var(--color-bg-dark);
    color: var(--color-white);
}

.services-container {
    grid-template-columns: 1fr 2fr;
    gap: 80px;
}

.services-left h2 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -2px;
}

.services-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 80px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 28px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.services-section.dark .service-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.service-number {
    width: 40px;
    font-size: 0.9rem;
    opacity: 0.6;
}

.service-item h3 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    transition: transform var(--transition);
}

.service-item:hover h3 {
    transform: translateX(12px);
}

/* =========================
   CLIENTS SECTION
   ========================= */
.clients-section {
    position: relative;
    width: 100%;
    min-height: 340px;
    padding: 120px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--color-bg-light);
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 60px;
    width: max-content;
    animation: scrollLogos 20s linear infinite;
    will-change: transform;
}

.client-logo {
    min-width: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-box {
    width: 200px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: 0.35s ease;
}

.logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.6);
    transition: 0.35s ease;
}

.logo-box:hover {
    opacity: 1;
    transform: scale(1.08);
}

.logo-box:hover img {
    filter: brightness(0) saturate(100%) invert(33%) sepia(98%) saturate(2090%) hue-rotate(217deg) brightness(98%) contrast(101%);
}

.clients-section::before,
.clients-section::after {
    content: "";
    position: absolute;
    top: 0;
    width: 160px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.clients-section::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg-light), transparent);
}

.clients-section::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg-light), transparent);
}

@keyframes scrollLogos {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================
   FINAL CTA SECTION
   ========================= */
.final-cta-section {
    width: 100%;
    padding: 140px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-white);
    color: var(--color-black);
}

.final-cta-container {
    width: 100%;
    max-width: 980px;
    text-align: center;
}

.final-cta-label {
    margin-bottom: 22px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}

.final-cta-title {
    margin-bottom: 28px;
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -3px;
    font-weight: 800;
    color: var(--color-black);
}

.final-cta-text {
    max-width: 700px;
    margin: 0 auto 42px;
    font-size: 1.08rem;
    line-height: 1.7;
    color: rgba(0, 0, 0, 0.78);
}

.final-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    height: 62px;
    padding: 0 34px;
    border: 1px solid var(--color-white);
    border-radius: var(--radius-pill);
    background: var(--color-black);
    color: var(--color-white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.final-cta-button:hover {
    transform: translateY(-4px);
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.08);
}

/* =========================
   REVEAL ANIMATIONS
   ========================= */
.reveal-on-load {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(40px);
    will-change: transform, opacity, filter;
}

.reveal-on-load.revealed {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    will-change: auto;
}

.reveal-on-load.reveal-left          { transform: translateX(-60px); }
.reveal-on-load.reveal-left.revealed  { transform: translateX(0); opacity: 1; filter: blur(0); }

.reveal-on-load.reveal-right          { transform: translateX(60px); }
.reveal-on-load.reveal-right.revealed { transform: translateX(0); opacity: 1; filter: blur(0); }

.reveal-on-load.reveal-scale          { transform: scale(0.92); }
.reveal-on-load.reveal-scale.revealed { transform: scale(1); opacity: 1; filter: blur(0); }

/* =========================
   REDUCED MOTION
   ========================= */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal-on-load {
        opacity: 1; filter: none; transform: none; will-change: auto;
    }
    .reveal-on-load.reveal-left,
    .reveal-on-load.reveal-right,
    .reveal-on-load.reveal-scale {
        opacity: 1; filter: none; transform: none;
    }
    .clients-track { animation: none; will-change: auto; }
    .sound-box     { animation: none; }

    /* Nav links appear instantly */
    .header-nav a {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* =========================
   RESPONSIVE — DESKTOP
   ========================= */

/* --- Tablet landscape --- */
@media (max-width: 1200px) {
    .main-header {
        padding: 22px 24px;
        grid-template-columns: auto 1fr auto;
        gap: 20px;
    }
    .header-nav { gap: 28px; }
    .header-nav a { font-size: 14px; }
    .header-logo { width: 80px; }
    .header-socials a { width: 38px; height: 38px; font-size: 16px; }
    .agency-section { padding: 10px 40px 90px; }
    .agency-content { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* --- Tablet --- */
@media (max-width: 1100px) {
    .cards-slider { padding: 20px 70px; gap: 28px; }
    .project-card { flex: 0 0 340px; height: 480px; }
    .card-content h3 { font-size: 1.6rem; }
}

/* --- Small tablet --- */
@media (max-width: 992px) {
    .agency-section { padding: 10px 24px 70px; }
    .agency-top-line { margin-bottom: 40px; }
    .agency-content { grid-template-columns: 1fr; gap: 40px; }
    .agency-left h2 { margin-bottom: 34px; letter-spacing: -1.2px; }
    .agency-right { justify-content: flex-start; }
}

/* =========================
   MOBILE NAV — GLASS LUXURY
   ========================= */
@media (max-width: 900px) {

    /* Header layout */
    .main-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 18px;
    }

    .header-logo    { width: 74px; }
    .header-socials { display: none; }
    .menu-toggle    { display: flex; }

    /* ── Glass panel ── */
    .header-nav {
        position: absolute;
        top: 76px;
        left: 12px;
        right: 12px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 6px 0 10px;
        z-index: 200;

        /* Deep glass morphism */
        background: rgba(5, 3, 22, 0.52);
        backdrop-filter: blur(32px) saturate(200%);
        -webkit-backdrop-filter: blur(32px) saturate(200%);
        border-radius: 22px;

        /* Layered shadow system for depth + glow */
        border: 1px solid rgba(255, 255, 255, 0.09);
        box-shadow:
            0 0 0 1px rgba(76, 94, 255, 0.22),
            0 32px 80px rgba(0, 0, 0, 0.5),
            0 8px 24px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);

        /* Hidden state */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-18px) scale(0.96);
        transform-origin: top center;
        transition:
            opacity   0.42s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0.42s;
    }

    /* Gradient accent line along the top edge of the panel */
    .header-nav::before {
        content: "";
        position: absolute;
        top: 0;
        left: 20px;
        right: 20px;
        height: 1px;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(76, 94, 255, 0.9) 30%,
            rgba(197, 233, 13, 0.6) 70%,
            transparent
        );
        border-radius: 1px;
    }

    /* Open state */
    .header-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    /* ── Nav links ── */
    .header-nav a {
        position: relative;
        width: 100%;
        padding: 16px 24px;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0.4px;
        color: rgba(255, 255, 255, 0.72);
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);

        /* Pre-animation state */
        opacity: 0;
        transform: translateX(-12px);
        transition:
            opacity      0.38s cubic-bezier(0.22, 1, 0.36, 1),
            transform    0.38s cubic-bezier(0.22, 1, 0.36, 1),
            color        0.22s ease,
            background   0.22s ease,
            padding-left 0.22s ease;
    }

    .header-nav a:last-child {
        border-bottom: none;
    }

    /* Left accent bar — animates in on hover */
    .header-nav a::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%) scaleY(0);
        width: 2px;
        height: 50%;
        background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
        border-radius: 0 2px 2px 0;
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    /* Remove the desktop underline on mobile */
    .header-nav a::after {
        display: none;
    }

    /* Link hover */
    .header-nav a:hover {
        color: #fff;
        background: rgba(76, 94, 255, 0.1);
        padding-left: 32px;
    }

    .header-nav a:hover::before {
        transform: translateY(-50%) scaleY(1);
    }

    /* ── Staggered entrance ── */
    .header-nav.active a {
        opacity: 1;
        transform: translateX(0);
    }

    .header-nav.active a:nth-child(1) { transition-delay: 0.07s; }
    .header-nav.active a:nth-child(2) { transition-delay: 0.14s; }
    .header-nav.active a:nth-child(3) { transition-delay: 0.21s; }
    .header-nav.active a:nth-child(4) { transition-delay: 0.28s; }

    /* Sound overlay */
    .sound-box {
        width: 85%;
        padding: 22px 18px;
    }

    /* Services */
    .services-section   { padding: 80px 24px; }
    .services-container { grid-template-columns: 1fr; gap: 40px; }
    .services-left h2   { font-size: 2.5rem; }
    .services-right     { grid-template-columns: 1fr; }
    .service-item h3    { font-size: 1.5rem; }
}

/* --- Mobile portrait --- */
@media (max-width: 768px) {
    .cards-slider-section { padding: 90px 0; }
    .cards-slider { padding: 20px 24px; gap: 20px; }
    .project-card { flex: 0 0 82vw; height: 440px; }
    .slider-arrow       { width: 50px; height: 50px; }
    .slider-arrow.left  { left: 8px; }
    .slider-arrow.right { right: 8px; }
    .card-content { left: 20px; right: 20px; bottom: 20px; }
    .card-content h3  { font-size: 1.45rem; }
    .card-content span { font-size: 0.9rem; }
    .final-cta-section  { padding: 100px 20px; }
    .final-cta-title    { margin-bottom: 22px; letter-spacing: -1.5px; }
    .final-cta-text     { margin-bottom: 34px; font-size: 0.98rem; }
    .final-cta-button   { min-width: 190px; height: 56px; padding: 0 26px; }
}

/* --- Small mobile --- */
@media (max-width: 600px) {
    .agency-btn { min-width: 170px; height: 50px; font-size: 0.95rem; }
}
