/* styles.css - Tiny Corp AI Website Styles */

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #10b981;
    --accent: #f59e0b;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: 0.2s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #9ca3af;
        --border: #374151;
        --shadow: rgba(0, 0, 0, 0.3);
    }
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

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

/* ============================================
   NAVIGATION
   ============================================ */
header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity var(--transition);
}

.logo a:hover {
    opacity: 0.7;
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
    font-weight: 500;
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        box-shadow: -2px 0 10px var(--shadow);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

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

    .nav-links a {
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links .nav-dropdown {
        width: 100%;
    }

    .nav-links .nav-dropdown > a {
        width: 100%;
        padding: 0.75rem 0;
    }

    .nav-links .nav-dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 0;
        width: 100%;
        background: transparent;
    }

    .nav-links .nav-dropdown-content.active {
        display: block !important;
    }

    .nav-links .nav-dropdown-content a {
        padding-left: 1.5rem !important;
        background: var(--bg-secondary) !important;
    }

    .cta-button {
        margin-top: 1rem;
    }
}

/* Dropdown Navigation */
.nav-links .nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-links .nav-dropdown > a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
}

.nav-links .nav-dropdown-content {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 16px var(--shadow);
    min-width: 220px;
    padding: 0.75rem 0;
    margin-top: 0.25rem;
    z-index: 10000;
    white-space: nowrap;
}

/* Add padding to top of dropdown to create hover bridge */
.nav-links .nav-dropdown-content::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.nav-links .nav-dropdown:hover .nav-dropdown-content {
    display: block !important;
}

.nav-links .nav-dropdown-content a {
    display: block !important;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary) !important;
    text-decoration: none;
    transition: all var(--transition);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

.nav-links .nav-dropdown-content a:first-child {
    padding-top: 1rem;
}

.nav-links .nav-dropdown-content a:last-child {
    border-bottom: none;
    padding-bottom: 1rem;
}

.nav-links .nav-dropdown-content a:hover {
    background: var(--bg-secondary) !important;
    color: var(--primary) !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
}

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

.button.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.button.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.button.secondary:hover {
    background: var(--bg-secondary);
}

.cta-button {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 5rem 0;
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* ============================================
   MISSION SECTION
   ============================================ */
.mission {
    background: var(--bg-secondary);
}

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

.mission-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform var(--transition);
    border: 1px solid var(--border);
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow);
}

.mission-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.mission-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.mission-card p {
    color: var(--text-secondary);
}

/* ============================================
   PIPELINE SECTION
   ============================================ */
.how-it-works {
    background: var(--bg-primary);
}

.pipeline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.pipeline-step {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    border: 2px solid var(--border);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
    font-size: 1.25rem;
}

.pipeline-step h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.pipeline-step p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pipeline-arrow {
    font-size: 2rem;
    color: var(--text-secondary);
}

/* ============================================
   AGENTS SECTION
   ============================================ */
.agents {
    background: var(--bg-secondary);
}

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

.agent-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 2px solid var(--border);
    transition: all var(--transition);
}

.agent-card:not(.coming-soon):hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px var(--shadow);
}

.agent-card.coming-soon {
    opacity: 0.6;
}

.agent-avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.agent-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.agent-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--secondary);
    color: white;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.secondary {
    background: var(--text-secondary);
}

/* ============================================
   APPS LEADERBOARD
   ============================================ */
.apps {
    background: var(--bg-primary);
}

.leaderboard {
    max-width: 800px;
    margin: 0 auto;
}

.leaderboard-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.leaderboard-item:not(.coming-soon):hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--shadow);
}

.leaderboard-item.coming-soon {
    opacity: 0.6;
}

.rank {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    min-width: 60px;
}

.app-info {
    flex: 1;
}

.app-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.app-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.app-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.apps-notice {
    text-align: center;
    margin-top: 2rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ============================================
   SUPPORT SECTION
   ============================================ */
.support {
    background: var(--bg-secondary);
    text-align: center;
}

.support p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.support-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.support-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    border: 2px solid var(--border);
}

.support-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.support-card p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--bg-tertiary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p,
.footer-section ul {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        gap: 1rem;
    }

    section {
        padding: 3rem 0;
    }

    section h2 {
        font-size: 2rem;
    }

    .pipeline {
        flex-direction: column;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
    }

    .mission-grid,
    .agents-grid,
    .support-options {
        grid-template-columns: 1fr;
    }
}

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

.hero,
.mission-card,
.agent-card,
.pipeline-step {
    animation: fadeIn 0.6s ease-out;
}
