/* ============================================
   Reflex Creative Studio - Main Stylesheet
   ============================================ */

/* CSS Variables for easy theming */
:root {
    /* Colors */
    --color-primary: #1a1a1a;
    --color-secondary: #2d2d2d;
    --color-accent: #ff6b35;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-background: #ffffff;
    --color-background-alt: #f8f8f8;
    --color-border: #e0e0e0;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Container */
    --container-width: 1200px;
    --container-padding: 2rem;

    /* Transitions */
    --transition-speed: 0.3s;
}

/* ============================================
   Reset & Base Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

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

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

/* ============================================
   Utility Classes
   ============================================ */

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

.section {
    padding: var(--spacing-xl) 0;
}

.section-alt {
    background-color: var(--color-background-alt);
}

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

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: #ff5722;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

/* ============================================
   Header & Navigation
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.site-header.scrolled .site-logo,
.site-header.scrolled .main-nav a {
    color: var(--color-primary);
}

.site-header.scrolled .mobile-menu-toggle {
    color: var(--color-primary);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem var(--container-padding);
    max-width: var(--container-width);
    margin: 0 auto;
    transition: padding 0.3s ease;
}

.site-header.scrolled .header-content {
    padding: 1rem var(--container-padding);
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b35;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-logo:hover {
    color: var(--color-accent);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.main-nav a {
    color: #ff6b35;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-speed) ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--color-accent);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    transition: color 0.3s ease;
}

/* Mobile Menu */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background-color: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right var(--transition-speed) ease;
        padding: 5rem 2rem 2rem;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .main-nav a {
        font-size: 1.2rem;
        color: var(--color-primary);
        text-shadow: none;
    }
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d2d2d 50%, #3d3d3d 100%);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), #ff8f6b, var(--color-accent));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    color: white;
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), #ff8f6b);
    border-radius: 2px;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: var(--spacing-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--color-accent), #ff8f6b);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.social-links a:hover svg,
.social-links a:hover svg text {
    fill: #fff;
}

.social-links svg {
    width: 22px;
    height: 22px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

/* ============================================
   Main Content Area
   ============================================ */

main {
    min-height: calc(100vh - 80px);
}

/* ============================================
   Back to Top Button
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-accent), #ff8f6b);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.45);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --spacing-xl: 3rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .section {
        padding: var(--spacing-lg) 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ============================================
   Loading & Animation Classes
   ============================================ */

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Scroll Animation Base Styles */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* Section Header Animations */
.section-header {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-header.animated {
    opacity: 1;
    transform: translateY(0);
}

.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header.animated h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), #ff8f6b);
    border-radius: 2px;
    animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

/* Hero Animations */
.hero-title,
.hero-subtitle,
.hero-services,
.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-title.animated,
.hero-subtitle.animated,
.hero-services.animated,
.hero-cta.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Service Tags Animation */
.hero-services .service-tag {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-services.animated .service-tag {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-services.animated .service-tag:nth-child(1) { transition-delay: 0.1s; }
.hero-services.animated .service-tag:nth-child(2) { transition-delay: 0.2s; }
.hero-services.animated .service-tag:nth-child(3) { transition-delay: 0.3s; }
.hero-services.animated .service-tag:nth-child(4) { transition-delay: 0.4s; }
.hero-services.animated .service-tag:nth-child(5) { transition-delay: 0.5s; }

/* CTA Buttons Animation - appears after service tags finish */
.hero-cta .btn {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-cta.animated .btn {
    opacity: 1;
    transform: translateY(0);
}

/* Delay buttons until after service tags (500ms + 500ms + 5*100ms = 1050ms total) */
.hero-cta.animated .btn:nth-child(1) { transition-delay: 1.05s; }
.hero-cta.animated .btn:nth-child(2) { transition-delay: 1.15s; }

/* Generic Scroll Animation Class */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
