/*
* Digital Marketing Agency - Redesign 3 Stylesheet
* Theme: "Golden Analytics"
*/

/* ---------------------------------- */
/* 1. Global Styles & Variables       */
/* ---------------------------------- */
:root {
    --bg-dark: #121212;
    --bg-medium: #1E1E1E;
    --bg-light: #2A2A2A;
    --accent-gold: #D4AF37;
    --text-light: #EAEAEA;
    --text-medium: #A0A0A0;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --header-height: 80px;
    --border-radius: 6px;
    --transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-medium);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 120px 0;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2.2rem, 4vw, 3rem);
}

a {
    color: var(--accent-gold);
    text-decoration: none;
}

.highlight {
    color: var(--accent-gold);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem;
}

.section-header p {
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--accent-gold);
    border-radius: 50px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--bg-dark);
    transition: width var(--transition);
    z-index: -1;
}

.btn-primary:hover {
    color: var(--accent-gold);
}

.btn-primary:hover::before {
    width: 100%;
}

/* Animation Observer Setup */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-up {
    transform: translateY(40px);
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------- */
/* 2. Header & Navigation             */
/* ---------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    transition: background-color 0.3s, box-shadow 0.3s, height 0.3s;
}

.site-header.scrolled {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    height: 70px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 60px;
    filter: brightness(0) invert(1);
}

.main-nav ul {
    display: flex;
    gap: 45px;
}

.main-nav a {
    color: var(--text-light);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    /* See media queries */
}

/* ---------------------------------- */
/* 3. Hero Section & 3D Orbit         */
/* ---------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-background-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
}

.hero-text-content {
    max-width: 550px;
}

.hero-text-content p {
    font-size: 1.1rem;
    margin: 1.5rem 0 2.5rem;
}

.hero-3d-orbit {
    perspective: 2000px;
}

.orbit-scene {
    width: 450px;
    height: 450px;
    margin: auto;
}

.orbit-container {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateOrbit 40s linear infinite;
}

.orbit-core {
    width: 100px;
    height: 100px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--accent-gold) 0%, rgba(212, 175, 55, 0) 70%);
    border-radius: 50%;
}

.orbiting-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    background-color: var(--bg-medium);
    color: var(--text-light);
    border: 1px solid var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-align: center;
    animation: counter-rotate 40s linear infinite;
}

@keyframes rotateOrbit {
    from {
        transform: rotateY(0deg) rotateX(10deg);
    }

    to {
        transform: rotateY(360deg) rotateX(10deg);
    }
}

@keyframes counter-rotate {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(-360deg);
    }
}

/* ---------------------------------- */
/* 4. Services Section                */
/* ---------------------------------- */
.services-section {
    background-color: var(--bg-medium);
}

.services-accordion-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    background-color: var(--bg-dark);
    padding: 40px;
    border-radius: var(--border-radius);
    min-height: 350px;
}

.services-tabs {
    list-style: none;
}

.service-tab {
    padding: 20px;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    border-left: 3px solid transparent;
}

.service-tab:hover {
    color: var(--text-light);
}

.service-tab.active {
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
}

.services-panels {
    position: relative;
}

.service-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    pointer-events: none;
    padding-top: 20px;
}

.service-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ---------------------------------- */
/* 5. Strategy Builder Section        */
/* ---------------------------------- */
.builder-wrapper {
    background-color: var(--bg-medium);
    padding: 50px;
    border-radius: var(--border-radius);
}

.builder-step {
    display: none;
}

.builder-step.active {
    display: block;
    animation: fadeInStep 0.5s;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.option-card {
    padding: 30px 20px;
    text-align: center;
    font-size: 1.1rem;
    background-color: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s;
}

.option-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
}

#strategy-result {
    min-height: 100px;
    background-color: var(--bg-dark);
    padding: 20px;
    margin-top: 2rem;
}

#strategy-result h4 {
    color: var(--accent-gold);
}

.btn-reset-strategy {
    background: none;
    border: none;
    color: var(--accent-gold);
    margin-top: 1rem;
    cursor: pointer;
}

/* ---------------------------------- */
/* 6. Process Section                 */
/* ---------------------------------- */
.process-section {
    background-color: var(--bg-medium);
    overflow-x: clip;
}

.process-timeline-path {
    position: relative;
    max-width: 900px;
    margin: 5rem auto 0;
    height: 400px;
    /* Adjust as needed */
}

.process-timeline-path::before {
    /* The curved path */
    content: '';
    position: absolute;
    width: 100%;
    height: 200%;
    top: -50%;
    left: 0;
    border: 3px dashed var(--bg-light);
    border-color: transparent transparent var(--bg-light) var(--bg-light);
    border-radius: 50%;
    transform: rotate(60deg);
}

.timeline-item {
    position: absolute;
    width: 250px;
    background-color: var(--bg-dark);
    padding: 20px;
    border-radius: var(--border-radius);
    border-top: 3px solid var(--accent-gold);
}

.item-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

/* Manual positioning for the S-curve */
#item1 {
    top: -20px;
    left: 0;
}

#item2 {
    top: 180px;
    left: 25%;
}

#item3 {
    top: -20px;
    left: 50%;
}

#item4 {
    top: 180px;
    left: 75%;
}

/* ---------------------------------- */
/* 7. Results / Testimonials Section  */
/* ---------------------------------- */
.testimonial-stack-wrapper {
    position: relative;
    max-width: 700px;
    margin: 4rem auto 0;
    height: 280px;
}

.testimonial-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.testimonial-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--bg-medium);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.testimonial-card p {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-light);
}

.client-info {
    text-align: right;
    margin-top: 1.5rem;
}

.stack-controls {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.stack-controls button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--text-medium);
    background: none;
    color: var(--text-medium);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.stack-controls button:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
    border-color: var(--accent-gold);
}

/* ---------------------------------- */
/* 8. Other Sections (CTA, Footer)    */
/* ---------------------------------- */
.cta-section {
    text-align: center;
    background: linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.9)), url('https://images.unsplash.com/photo-1516321497487-e288fb19713f?q=80&w=2070&auto=format&fit=crop') center/cover;
}

.cta-section h2 {
    max-width: 600px;
    margin: 0 auto 1rem;
}

.cta-section p {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.site-footer {
    padding: 80px 0 30px;
    background-color: #000;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo img {
    height: 60px;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-medium);
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--bg-light);
    font-size: 0.9rem;
}

/* ---------------------------------- */
/* 9. Other Pages (Contact, Legal)    */
/* ---------------------------------- */
.page-header-minimal {
    padding: 150px 0 80px;
    text-align: center;
}

.contact-page-section {
    padding-top: 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.main-contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    background-color: var(--bg-medium);
    border: 1px solid var(--bg-light);
    border-radius: var(--border-radius);
    color: var(--text-light);
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.contact-details-container h3 {
    margin-bottom: 1.5rem;
}

.contact-list li {
    display: flex;
    margin-bottom: 1rem;
}

.contact-list strong {
    color: var(--text-light);
    min-width: 80px;
}

.legal-content-section {
    padding: 80px 0;
}

.legal-content {
    max-width: 800px;
    margin: auto;
}

.legal-content h2 {
    margin: 2.5rem 0 1rem;
    border-bottom: 1px solid var(--bg-light);
    padding-bottom: 0.5rem;
}

.legal-content ul {
    padding-left: 25px;
    list-style: circle;
}

/* ---------------------------------- */
/* 10. Live Chat & Responsive         */
/* ---------------------------------- */
.live-chat {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 998;
}

.chat-icon {
    width: 60px;
    height: 60px;
    background-color: var(--accent-gold);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-popup {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 300px;
    background: var(--bg-medium);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: 0 5px 20px #000;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s;
}

.live-chat:hover .chat-popup {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.live-chat:hover .chat-icon {
    transform: scale(1.1) rotate(-15deg);
}

.popup-header {
    font-weight: bold;
    color: var(--text-light);
}

.popup-body {
    font-size: 0.9rem;
    margin: 10px 0;
}

.popup-input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--bg-light);
    padding: 8px;
    border-radius: 4px;
    color: var(--text-light);
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-3d-orbit {
        display: none;
    }

    .services-accordion-wrapper {
        grid-template-columns: 1fr;
    }

    .process-timeline-path {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        height: auto;
    }

    .process-timeline-path::before {
        display: none;
    }

    .timeline-item {
        position: static;
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    #footer-brand {
        grid-column: 1 / -1;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-medium);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        z-index: 1001;
        cursor: pointer;
    }

    .hamburger {
        display: block;
        width: 30px;
        height: 2px;
        background: var(--text-light);
        position: relative;
        transition: all 0.3s;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        background: var(--text-light);
        left: 0;
        transition: all 0.3s;
    }

    .hamburger::before {
        top: -8px;
    }

    .hamburger::after {
        bottom: -8px;
    }

    .mobile-nav-toggle.active .hamburger {
        background: transparent;
    }

    .mobile-nav-toggle.active .hamburger::before {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-nav-toggle.active .hamburger::after {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .header-cta {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .main-contact-form {
        grid-template-columns: 1fr;
    }
}