/*
==================================================
    Digital Marketing Agency Stylesheet (V5 - Future-Forward)
==================================================
    - 1. Global Styles & Variables
    - 2. Typography
    - 3. Layout & Helpers
    - 4. Header & Navigation
    - 5. Footer
    - 6. Buttons & Forms
    - 7. Hero Section
    - 8. Services (Bento Grid) Section
    - 9. Matrix Section
    - 10. Process Section
    - 11. Testimonials & CTA Section
    - 12. Contact & Legal Pages
    - 13. Animations & Keyframes
    - 14. Responsive Design
==================================================
*/

/* 1. Global Styles & Variables
-------------------------------------------------- */
:root {
    --space-black: #0A0A14;
    --dark-blue: #101024;
    --light-gray: #D1D1D8;
    --medium-gray: #8A8A9C;
    --electric-cyan: #00F0FF;
    --vibrant-magenta: #F000FF;
    --border-color: rgba(0, 240, 255, 0.2);

    --font-primary: 'Manrope', sans-serif;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--space-black);
    color: var(--light-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 2. Typography
-------------------------------------------------- */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--medium-gray);
    max-width: 60ch;
}

a {
    text-decoration: none;
    color: var(--electric-cyan);
    transition: color 0.3s ease;
}

a:hover {
    filter: brightness(1.2);
}

::selection {
    background: var(--vibrant-magenta);
    color: #fff;
}

/* 3. Layout & Helpers
-------------------------------------------------- */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 120px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title p {
    max-width: 600px;
    margin: 0.5rem auto 0;
    font-size: 1.1rem;
}

/* 4. Header & Navigation
-------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    background-color: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo img {
    height: 55px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--light-gray);
    font-weight: 600;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    text-shadow: 0 0 5px var(--electric-cyan);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 6px auto;
    background-color: var(--light-gray);
    transition: all 0.3s ease-in-out;
}

/* 5. Footer
-------------------------------------------------- */
.site-footer {
    background-color: var(--dark-blue);
    border-top: 1px solid var(--border-color);
    color: var(--medium-gray);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-column h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 65px;
    margin-bottom: 1rem;
}

.footer-column a {
    color: var(--medium-gray);
}

.footer-column a:hover {
    color: var(--light-gray);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* 6. Buttons & Forms
-------------------------------------------------- */
.cta-button {
    display: inline-block;
    padding: 14px 32px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--electric-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--electric-cyan);
    color: var(--space-black);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--electric-cyan);
    box-shadow: 0 0 15px var(--electric-cyan);
}

.header-cta {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: #101024;
    color: var(--light-gray);
    font-family: var(--font-primary);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--electric-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.error-message {
    color: #ff5555;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

#form-status {
    margin-top: 1rem;
    font-weight: 600;
}

/* 7. Hero Section
-------------------------------------------------- */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(var(--border-color) 1px, transparent 1px), linear-gradient(to right, var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: animatedGrid 10s linear infinite;
    opacity: 0.5;
}

.hero-text h1 {
    font-size: 4.5rem;
}

.hero-text .highlight {
    color: var(--electric-cyan);
}

.cursor {
    color: var(--electric-cyan);
    animation: blink 1s step-end infinite;
}

.hero-text p {
    font-size: 1.2rem;
    margin: 1.5rem 0 2.5rem;
}

/* 8. Services (Bento Grid) Section
-------------------------------------------------- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 1rem;
}

.bento-card {
    background-color: var(--dark-blue);
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: all 0.3s ease;
}

.bento-card:hover {
    border-color: var(--electric-cyan);
    transform: translateY(-5px);
    animation: glitch 0.3s;
}

.card-wide {
    grid-column: span 2;
}

.card-tall {
    grid-row: span 2;
}

.bento-card h3 {
    margin-bottom: 1rem;
}

/* 9. Matrix Section
-------------------------------------------------- */
.matrix-section {
    background-color: var(--dark-blue);
}

.matrix-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    background-color: var(--space-black);
    border: 1px solid var(--border-color);
    padding: 3rem;
}

.control-group {
    margin-bottom: 2rem;
}

.control-group h4 {
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

.matrix-btn {
    background: transparent;
    border: 1px solid var(--medium-gray);
    color: var(--medium-gray);
    padding: 10px 18px;
    margin: 0 10px 10px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.matrix-btn:hover {
    border-color: var(--electric-cyan);
    color: var(--electric-cyan);
}

.matrix-btn.active {
    background-color: var(--electric-cyan);
    color: var(--space-black);
    border-color: var(--electric-cyan);
    font-weight: bold;
}

.matrix-results {
    padding: 2rem;
    border-left: 1px solid var(--border-color);
}

#matrix-output {
    transition: opacity 0.4s ease;
}

/* 10. Process Section
-------------------------------------------------- */
.process-step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.process-step:last-child {
    border-bottom: none;
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--electric-cyan);
    line-height: 1;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

/* 11. Testimonials & CTA Section
-------------------------------------------------- */
.testimonials-section {
    background-color: var(--dark-blue);
}

.testimonial-content {
    text-align: center;
    max-width: 800px;
    margin: auto;
}

.testimonial-quote {
    font-size: 1.8rem;
    line-height: 1.5;
    color: #fff;
    margin-bottom: 2rem;
}

.testimonial-author h4 {
    margin: 0;
    color: var(--electric-cyan);
}

.testimonial-author span {
    color: var(--medium-gray);
}

.cta-section {
    text-align: center;
}

.cta-content p {
    margin: 1rem auto 2.5rem;
}

/* 12. Contact & Legal Pages
-------------------------------------------------- */
.contact-page-section,
.legal-page-section {
    padding-top: calc(var(--header-height) + 100px);
}

.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--dark-blue);
    padding: 3rem;
    border: 1px solid var(--border-color);
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

.legal-content {
    max-width: 800px;
}

.legal-content h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.legal-content ul {
    padding-left: 1.5rem;
}

/* 13. Animations & Keyframes
-------------------------------------------------- */
@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes animatedGrid {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 40px 40px;
    }
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

.animate-on-load {
    animation: fadeIn 0.8s ease-out 0.2s both;
    opacity: 0;
}

.animate-on-load:nth-child(2) {
    animation-delay: 0.4s;
}

.animate-on-load:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 14. Responsive Design
-------------------------------------------------- */
@media (max-width: 992px) {
    h1 {
        font-size: 3.2rem;
    }

    h2 {
        font-size: 2.4rem;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-wide,
    .card-tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .matrix-wrapper {
        grid-template-columns: 1fr;
    }

    .matrix-results {
        border-left: none;
        border-top: 1px solid var(--border-color);
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    h1 {
        font-size: 2.5rem;
    }

    section {
        padding: 80px 0;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--space-black);
        width: 100%;
        height: calc(100vh - var(--header-height));
        text-align: center;
        transition: 0.3s;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
        padding: 1.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .header-cta {
        display: none;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}