/* Saga Labs - Premium AI Studio */

:root {
    --bg-color: #ffffff;
    --bg-secondary: #f9f9fb;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent-color: #0071e3;
    --accent-hover: #0077ed;
    --border-color: rgba(0, 0, 0, 0.08);
    --card-bg: rgba(255, 255, 255, 0.6);
    --nav-bg: rgba(255, 255, 255, 0.72);
}

body.dark-mode {
    --bg-color: #0b0b0c;
    --bg-secondary: #1a1a1b;
    --text-primary: #e5e7eb;
    --text-secondary: #a1a1a6;
    --accent-color: #2997ff;
    --accent-hover: #0077ed;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(30, 30, 32, 0.6);
    --nav-bg: rgba(11, 11, 12, 0.72);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Neural Network Canvas - REMOVED for Apple-style simplification */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 0.5em;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
}

.nav-logo h1 {
    font-size: 19px;
    color: var(--text-primary);
    text-decoration: none;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.nav-logo {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.85;
    padding: 9px 14px;
    border-radius: 8px;
}

.nav-menu a:hover {
    opacity: 1;
    background-color: rgba(127, 127, 127, 0.12);
}

.nav-menu a.icon-link {
    padding: 9px;
}

.nav-menu a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-menu a.icon-link svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Theme Toggle */
.nav-theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    opacity: 0.6;
}

.nav-theme-toggle:hover {
    opacity: 0.9;
    color: var(--text-primary);
}

/* Hamburger Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    padding: 110px 0 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: auto;
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    opacity: 0.8;
}

.hero-content h1 {
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.015em;
    max-width: 800px;
    margin: 0 auto 16px;
    animation: slideInDown 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    letter-spacing: -0.01em;
    animation: slideInUp 1s ease-out 0.2s both;
}

/* Hero CTA */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    animation: slideInUp 1s ease-out 0.4s both;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
    border: none;
    cursor: pointer;
}

.cta-primary:hover {
    opacity: 0.85;
}

/* Animations */
@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Featured Project */
.featured-project {
    padding: 0 0 140px;
    position: relative;
    z-index: 1;
}

.featured-project-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 100px;
    max-width: 1000px;
    margin: 0 auto;
}

.featured-project-tag {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.featured-project-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.05;
}

.featured-project-desc {
    font-size: 19px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.5;
    max-width: 440px;
}

.featured-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: opacity 0.2s ease;
}

.featured-project-btn:hover {
    opacity: 0.85;
}

.featured-project-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.featured-project-img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode .featured-project-img {
    box-shadow: 0 8px 40px rgba(255, 255, 255, 0.04);
}

.featured-project-row:hover .featured-project-img {
    transform: translateY(-4px) scale(1.01);
}

/* App Showcases - Alternating Layout */
.app-section {
    padding: 40px 0 120px;
    position: relative;
    z-index: 1;
}

.app-showcase-container {
    display: flex;
    flex-direction: column;
    gap: 160px;
    padding-bottom: 80px;
}

.app-showcase-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 100px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-showcase-row.animate {
    opacity: 1;
    transform: translateY(0);
}

.app-showcase-row.reverse {
    grid-template-columns: 1fr 1fr;
}

.app-showcase-row.reverse .app-showcase-visual {
    order: -1;
}

.app-showcase-content {
    flex: 1;
    max-width: 440px;
}

.app-showcase-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.app-showcase-title {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    line-height: 1.1;
}

.app-showcase-desc {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.47;
}

.app-showcase-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: opacity 0.2s ease;
    border: none;
}

.app-showcase-btn:hover {
    opacity: 0.85;
}

.app-showcase-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

.app-showcase-visual {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-showcase-img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Brainy App Specific - 20% size increase */
.brainy-app .app-showcase-img {
    max-width: 120%;
}

body.dark-mode .app-showcase-img {
    filter: drop-shadow(0 20px 40px rgba(255, 255, 255, 0.04));
}

.app-showcase-row:hover .app-showcase-img {
    transform: translateY(-6px) scale(1.01);
}

/* About Section */
.about-section {
    padding: 120px 0;
    text-align: center;
    position: relative;
    z-index: 1;
    background-color: var(--bg-secondary);
}

.about-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 24px;
}

.about-content h2 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.025em;
}

.about-intro {
    font-size: 19px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

/* Footer */
footer {
    padding: 48px 0 36px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}

footer p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-social {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 4px;
}

.footer-social a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-social a:hover {
    color: var(--text-primary);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 52px;
        flex-direction: column;
        background-color: var(--nav-bg);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        width: 100%;
        height: calc(100vh - 52px);
        text-align: center;
        transition: left 0.3s ease;
        padding: 2rem 0;
        gap: 0;
        z-index: 999;
        justify-content: flex-start;
        align-items: center;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
    }

    .nav-menu a {
        font-size: 1rem;
        opacity: 1;
    }

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

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

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-section {
        padding: 120px 0 40px;
        min-height: auto;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-primary {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }

    .featured-project-row {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .featured-project-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .featured-project {
        padding: 0 0 80px;
    }

    .app-showcase-row,
    .app-showcase-row.reverse {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .app-showcase-row.reverse .app-showcase-visual {
        order: 0;
    }

    .app-showcase-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .app-showcase-title {
        font-size: 1.8rem;
    }

    .app-showcase-desc {
        font-size: 1rem;
    }

    .about-content h2 {
        font-size: 2rem;
    }

    .about-intro {
        font-size: 1.05rem;
    }

    .tech-logo-item img {
        height: 36px;
    }

    .tech-logos-track {
        gap: 36px;
    }

    .app-showcase-container {
        gap: 120px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .app-showcase-title {
        font-size: 1.5rem;
    }

    .app-showcase-container {
        gap: 100px;
    }

    .about-section {
        padding: 60px 0;
    }

    .tech-logo-item img {
        height: 30px;
    }
}
