/* ==========================================================================
   SumGeniusAI Design System v2.0
   Modern Dark Theme - Space/Horizon Inspired
   ========================================================================== */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    /* Monochrome-first palette */
    --primary: #FFFFFF;
    --primary-light: #F4F4F5;
    --primary-dark: #E4E4E7;
    --accent: #5046E5;
    --accent-light: #6366F1;

    /* True black backgrounds */
    --bg-primary: #000000;
    --bg-secondary: #0A0A0A;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.05);
    --bg-card-solid: rgba(10, 10, 10, 0.95);

    /* High contrast text */
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-muted: #52525B;
    --text-bright: rgba(255, 255, 255, 0.75);

    /* Minimal borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.05);
    --border-glow: rgba(255, 255, 255, 0.15);
    --border-visible: rgba(255, 255, 255, 0.1);

    /* Legacy compatibility */
    --gradient-primary: #5046E5;
    --gradient-secondary: #4338CA;
    --glass-bg: rgba(0, 0, 0, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
}

/* ==========================================================================
   Hero Background Image
   ========================================================================== */
.hero-bg {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    max-width: 2000px;
    height: auto;
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .hero-bg {
        width: 140%;
        max-width: none;
        bottom: 15%;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.page-title {
    font-family: 'Satoshi', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-bright);
    line-height: 1.6;
    max-width: 600px;
}

.section-heading {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-primary);
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.2s ease;
}

.card:hover {
    background: rgba(20, 20, 20, 0.98);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.nav-links a:hover {
    color: #fff;
}

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

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

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

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

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    transition: right 0.2s ease;
    z-index: 999;
    padding: 5rem 1.5rem 2rem;
}

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

.mobile-menu a {
    display: block;
    padding: 0.875rem 0;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu a:hover {
    color: #fff;
}

.mobile-menu .mobile-cta {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.mobile-menu .mobile-cta:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-menu-overlay,
    .mobile-menu {
        display: block;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 240px;
}

.footer-logo {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.8125rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h3 {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    text-transform: none;
    letter-spacing: 0;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.15s ease;
    font-weight: 400;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: span 2;
        max-width: 100%;
    }
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   Portal Specific Styles
   ========================================================================== */
.portal-container {
    padding-top: 5rem;
    min-height: 100vh;
}

.portal-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.portal-sidebar {
    background: rgba(0, 0, 0, 0.5);
    border-right: 1px solid var(--border);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.portal-sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
    margin-bottom: 0.25rem;
}

.portal-sidebar a:hover,
.portal-sidebar a.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

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

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

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hide-mobile {
        display: none !important;
    }

    .page-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
