/**
 * Homepage Styles
 * Extracted from src/pages/index.astro for maintainability
 */

/* Animation CSS is loaded via global.css -> animations.css */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    overflow-x: hidden;
    font-weight: 400;
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    position: relative;
    text-align: center;
}

.hero-section {
    background:
        linear-gradient(135deg, rgba(39, 82, 128, 0.85) 0%, rgba(119, 119, 128, 0.85) 100%),
        url('/images/backgrounds/webp/fractal_ai_pattern_02.webp'),
        url('/images/backgrounds/jpg/fractal_ai_pattern_02.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding-top: 6rem; /* Account for fixed header */
}

.about-section {
    background:
        linear-gradient(135deg, rgba(0, 108, 128, 0.85) 0%, rgba(43, 141, 255, 0.85) 100%),
        url('/images/backgrounds/webp/macro_glass_closeup_01.webp'),
        url('/images/backgrounds/jpg/macro_glass_closeup_01.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

.portfolio-section {
    background:
        linear-gradient(135deg, rgba(22, 45, 70, 0.85) 0%, rgba(28, 28, 30, 0.85) 100%),
        url('/images/backgrounds/webp/macro_glass_closeup_03.webp'),
        url('/images/backgrounds/jpg/macro_glass_closeup_03.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--color-light);
}

.services-section {
    background:
        linear-gradient(135deg, rgba(22, 45, 70, 0.85) 0%, rgba(28, 28, 30, 0.85) 100%),
        url('/images/backgrounds/webp/dense_web_of_interconnected_nodes_01.webp'),
        url('/images/backgrounds/jpg/dense_web_of_interconnected_nodes_01.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

.contact-section {
    background:
        linear-gradient(135deg, rgba(0, 176, 207, 0.75) 0%, rgba(22, 45, 70, 0.85) 100%),
        url('/images/backgrounds/webp/contact_elements.webp'),
        url('/images/backgrounds/jpg/contact_elements.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.hero-logo {
    width: 350px;
    max-width: 85vw;
    height: auto;
    margin: 2rem auto 2rem auto;
    padding: 1.5rem 0;
    animation: fadeInUp 0.8s ease-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}


.about-section h2, .services-section h2, .contact-section h2, .portfolio-section h2 {
    color: var(--color-light);
}

.portfolio-section h3 {
    color: var(--color-light);
}

.portfolio-section p {
    color: rgba(247, 249, 252, 0.9);
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    margin-top: -1rem;
    color: #F5A623;
    font-style: italic;
}

p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.7;
    font-weight: 400;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-section p {
    font-size: 1.3rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

.about-section p, .services-section p, .contact-section p {
    color: rgba(255, 255, 255, 0.9);
}


.domain-info {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #666;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}


.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.portfolio-item.featured {
    border: 2px solid rgba(0, 176, 207, 0.5);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 176, 207, 0.2), 0 0 40px rgba(0, 176, 207, 0.1);
}

.portfolio-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 176, 207, 0.8);
    transform: translateY(-5px);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 176, 207, 0.2);
}


.portfolio-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 1rem;
    margin-top: -0.5rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 176, 207, 0.1);
    color: var(--color-primary);
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.portfolio-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

.portfolio-links > div:first-child {
    display: flex;
    gap: 1rem;
}

.portfolio-app-store {
    margin-top: 0.5rem;
}

.portfolio-button {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.portfolio-button.primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 176, 207, 0.3);
}

.portfolio-button.primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-accent));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 176, 207, 0.4);
}

.portfolio-button.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.portfolio-button.secondary:hover {
    background: rgba(0, 176, 207, 0.25);
    color: var(--color-light);
    border-color: rgba(0, 176, 207, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 176, 207, 0.4);
}


.navigation {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.nav-link {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(245, 166, 35, 0.2);
    border-color: rgba(245, 166, 35, 0.5);
    color: #F5A623;
    transform: translateY(-2px);
}

.services-philosophy-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
    text-align: center;
}

.services-closing {
    margin-top: 3rem;
    font-size: 1.2rem;
    font-style: italic;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.services-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.service-link:hover {
    transform: translateY(-8px);
    background: rgba(245, 166, 35, 0.15);
    border-color: rgba(245, 166, 35, 0.4);
    box-shadow: 0 15px 40px rgba(245, 166, 35, 0.2);
}

.service-link h3 {
    color: var(--color-light);
    margin-bottom: 1rem;
}

.service-link p {
    color: rgba(255, 255, 255, 0.85);
}

.service-arrow {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.5rem;
    color: rgba(245, 166, 35, 0.7);
    transition: all 0.3s ease;
    transform: translateX(0);
}

.service-link:hover .service-arrow {
    color: #F5A623;
    transform: translateX(5px);
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(245, 166, 35, 0.1);
    border-color: rgba(245, 166, 35, 0.3);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 30px;
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0, 176, 207, 0.3);
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-accent));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 176, 207, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    z-index: 1001;
    transition: width 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 176, 207, 0.3);
}

/* Fixed Header Navigation */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.fixed-header.scrolled {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 45px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.header-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.header-nav-link:hover::before {
    left: 100%;
}

.header-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    color: #F5A623;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border: none;
    background: transparent;
    position: relative;
    z-index: 1002;
}

.hamburger-line {
    width: 25px;
    height: 2px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(20px);
    padding: 5rem 2rem 2rem;
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-menu.active {
    right: 0;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link:hover {
    background: rgba(0, 176, 207, 0.2);
    border-color: rgba(0, 176, 207, 0.4);
    color: #F5A623;
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 1rem;
    }

    .container {
        margin: 0;
        padding: 0;
    }

    h1 {
        font-size: 2.5rem;
        letter-spacing: -0.01em;
    }

    h2 {
        font-size: 2.2rem;
        letter-spacing: -0.005em;
    }

    p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .hero-section p {
        font-size: 1.2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .services-philosophy-title {
        font-size: 1.5rem;
    }

    .services-closing {
        font-size: 1.1rem;
        margin-top: 2rem;
    }

    .service-arrow {
        top: 1.5rem;
        right: 1.5rem;
        font-size: 1.3rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-links {
        flex-direction: column;
    }

    .hero-logo {
        width: 280px;
        max-width: 92vw;
        display: block !important;
        margin: 1.5rem auto 1.5rem auto !important;
        padding: 1rem 0 !important;
    }

    /* Mobile Header Navigation */
    .header-container {
        padding: 0 1rem;
    }

    .header-nav {
        display: none;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    /* Hide original navigation on mobile */
    .navigation {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-nav-toggle,
    .mobile-nav-menu,
    .mobile-nav-overlay {
        display: none !important;
    }
}
