/*
    styles.css
    Version: 4.1 (Enhanced UI - Glassmorphism + Weaver Hero)
    Description: Premium, visually enhanced stylesheet with glassmorphism, gradients, and fluid animations.
*/

/* TABLE OF CONTENTS
---------------------------
1.  Global Styles & Variables
2.  Typography & Base Styles
3.  Layout & Container
4.  Buttons & Forms
5.  Header & Navigation
6.  Footer
7.  HERO SECTION (DIGITAL WEAVER) <--- NEW
8.  Services Section (Glass Cards)
9.  Why Us Section (3D Card)
10. Process Section (SVG Timeline)
11. Testimonials Section
12. CTA Section
13. Page-Specific Styles (Contact, Legal)
14. Animations & Keyframes
15. Utility & Helper Classes
16. Media Queries (Responsiveness)
--------------------------- */

/* 1. GLOBAL STYLES & VARIABLES */
:root {
    --color-bg: #121212;
    --color-surface: #1E1E1E;
    --color-primary: #00F5A0;
    /* Bright Teal */
    --color-secondary: #8E2DE2;
    /* Vibrant Purple */
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #B3B3B3;
    --color-border: rgba(255, 255, 255, 0.1);

    --font-family-sans: 'Inter', sans-serif;
    --header-height: 80px;
    --border-radius: 16px;
    --glass-bg: rgba(30, 30, 30, 0.5);
    --transition-speed: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* 2. TYPOGRAPHY & BASE STYLES */
body {
    background-color: var(--color-bg);
    color: var(--color-text-secondary);
    font-family: var(--font-family-sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    color: var(--color-text-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 4rem;
    letter-spacing: -2px;
}

h2 {
    font-size: 3rem;
    letter-spacing: -1px;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 1.5rem;
    max-width: 60ch;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-text-primary);
}

/* 3. LAYOUT & CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 7rem 0;
    position: relative;
    overflow: hidden;
}

.section-title {
    margin-bottom: 4rem;
}

.section-title p {
    max-width: 550px;
}

.text-center {
    text-align: center;
}

.text-center p {
    margin-left: auto;
    margin-right: auto;
}

.text-left {
    text-align: left;
}

/* 4. BUTTONS & FORMS */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-text-primary);
    background-size: 200% 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background-position: 100% 0;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-text-primary);
    color: var(--color-bg);
}

.btn-lg {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
}

/* 5. HEADER & NAVIGATION */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 1.5rem;
}

.logo img {
    height: 70px;
    margin-right: 12px;
    filter: invert(1);
}

.main-nav {
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.main-nav a {
    color: var(--color-text-secondary);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--color-text-primary);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hamburger {
    display: none;
    /* ... */
}

.mobile-nav {
    display: none;
    /* ... */
}

/* 6. FOOTER */
.site-footer {
    background-color: #0A0A0A;
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.8rem;
}

.footer-col a,
.footer-col p,
.footer-col li {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
}

/* 7. HERO SECTION (DIGITAL WEAVER) */
.hero-weaver {
    min-height: 100vh;
    padding: 0;
    /* Override section padding */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #050816;
    /* Deep space blue */
}

#weaver-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-weaver .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-weaver h1 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(90deg, #93f5ec, #a777f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.hero-weaver p {
    font-size: 1.2rem;
    color: #a9a9c2;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-weaver .btn-primary {
    background: linear-gradient(90deg, #93f5ec, #a777f5);
    color: #050816;
    border: none;
    box-shadow: 0 0 20px rgba(147, 245, 236, 0.3);
}

.hero-weaver .scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 3;
}

.hero-weaver .scroll-indicator span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: #fff;
    animation: scroll-down-anim 2.5s infinite;
}

/* 8. SERVICES SECTION (GLASS CARDS) */
.services-section {
    background-color: var(--color-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    position: relative;
    padding: 2px;
    background: linear-gradient(var(--angle), var(--color-primary), var(--color-secondary));
    border-radius: var(--border-radius);
    animation: gradient-rotate 5s linear infinite;
    --angle: 0deg;
}

@property --angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.service-card-content {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: calc(var(--border-radius) - 2px);
    transition: background 0.3s ease;
    height: 100%;
}

.service-card:hover {
    --angle: 360deg;
}

.service-card .learn-more {
    font-weight: 600;
    transition: letter-spacing 0.3s ease;
    display: inline-block;
    margin-top: 1rem;
}

.service-card:hover .learn-more {
    letter-spacing: 1px;
}

.service-icon {
    margin-bottom: 1rem;
}

.service-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
}

/* 9. WHY US SECTION (3D CARD) */
.why-us-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.why-us-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 2rem;
}

.why-us-content li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1rem;
}

.why-us-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

.why-us-3d-card-container {
    perspective: 1000px;
}

.interactive-3d-card {
    background: var(--glass-bg);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    transition: transform 0.1s;
    transform-style: preserve-3d;
}

.interactive-3d-card .card-content {
    transform: translateZ(50px);
}

.interactive-3d-card img {
    width: 80px;
    filter: invert(1);
    margin-bottom: 1.5rem;
}

/* 10. PROCESS SECTION (SVG TIMELINE) */
.process-section {
    background-color: var(--color-surface);
}

.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-svg {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 3px;
    z-index: 0;
}

.timeline-path {
    stroke: var(--color-border);
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.timeline-path.animate {
    animation: draw-path 4s ease-out forwards;
}

.timeline-container {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.timeline-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding-top: 3rem;
}

.step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 3px solid var(--color-border);
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    transition: all 0.5s ease;
}

.timeline-step.active .step-dot {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
}

.step-content h4 {
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

/* 11. TESTIMONIALS SECTION */
.testimonials-section {
    background-color: var(--color-bg);
}

.testimonial-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.testimonial-slider {
    position: relative;
    height: 300px;
}

.testimonial-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.testimonial-slide.active {
    opacity: 1;
    transform: translateY(0);
    z-index: 1;
}

.slide-content {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-content p {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 2rem;
}

.author {
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

.author-name {
    display: block;
    font-weight: 600;
    color: var(--color-text-primary);
}

.testimonial-controls button {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.testimonial-controls button:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* 12. CTA SECTION */
.cta-section {
    background-color: var(--color-surface);
}

.cta-section p {
    max-width: 600px;
    margin: 1.5rem auto 2.5rem;
}

/* 13. PAGE-SPECIFIC STYLES */
.contact-page-section {
    padding: 8rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.contact-container {
    position: relative;
    z-index: 1;
}

.contact-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.contact-form-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--color-border);
    padding: 3rem;
    border-radius: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 2rem;
}

.form-group {
    margin-bottom: 2rem;
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--color-text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.legal-page {
    padding: 10rem 0 5rem;
}

.legal-page .container {
    max-width: 800px;
}

.legal-content {
    margin-top: 3rem;
}

.legal-content h2 {
    margin-top: 3rem;
    color: var(--color-primary);
}

.legal-content ul {
    list-style: disc;
    padding-left: 2rem;
}

/* 14. ANIMATIONS & KEYFRAMES */
@keyframes scroll-down-anim {
    0% {
        top: -30px;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        top: 60px;
        opacity: 0;
    }
}

@keyframes gradient-rotate {
    to {
        --angle: 360deg;
    }
}

@keyframes draw-path {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 15. UTILITY & HELPER CLASSES */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
}

.fade-in-up {
    transform: translateY(30px);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 16. MEDIA QUERIES */
@media (max-width: 1024px) {

    h1,
    .hero-weaver h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .why-us-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .why-us-content ul {
        display: inline-block;
        text-align: left;
    }

    .why-us-3d-card-container {
        margin-top: 3rem;
    }

    .testimonial-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {

    h1,
    .hero-weaver h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    h2 {
        font-size: 2rem;
    }

    section {
        padding: 5rem 0;
    }

    .main-nav,
    .header-cta {
        display: none;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger span {
        width: 30px;
        height: 3px;
        background-color: var(--color-text-primary);
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .mobile-nav {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--color-surface);
        z-index: 999;
        transition: right 0.4s ease;
        padding-top: 100px;
    }

    .mobile-nav.open {
        right: 0;
    }

    .mobile-nav nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .timeline-container {
        flex-direction: column;
        gap: 2rem;
        align-items: flex-start;
    }

    .timeline-svg {
        display: none;
    }

    .timeline-step {
        padding-left: 3rem;
        text-align: left;
    }

    .step-dot {
        left: 0;
        top: 5px;
        transform: none;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}