/* ============================================
   Sheet AI - Main Stylesheet
   Brand Design System
   ============================================ */

/* ---------------------------------------------
   CSS Variables (Brand Tokens)
   --------------------------------------------- */
:root {
    /* Core Brand */
    --color-primary: #173d4e;
    --color-secondary: #34af9e;
    --color-accent: #e1f1f1;
    
    /* Action Colors */
    --color-secondary-strong: #217c71;
    --color-secondary-strong-hover: #1a625a;
    --color-secondary-soft-bg: #e6faf7;
    --color-secondary-soft-border: #93e6dc;
    
    /* Neutrals */
    --color-surface: #ffffff;
    --color-subtle-surface: #f7fafb;
    --color-divider: #d9e3e6;
    --color-text: #0c2230;
    --color-text-secondary: #3b515b;
    --color-text-muted: #526a75;
    
    /* Semantic */
    --color-danger-strong: #c14f5a;
    --color-info-strong: #1f5fa6;
    --color-warning-bg: #f2b23a;
    
    /* Control */
    --control-border: #6f8791;
}

/* ---------------------------------------------
   Base & Typography
   --------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    color: white;
    min-height: 100vh;
}

/* ---------------------------------------------
   Utility Classes
   --------------------------------------------- */
.gradient-text {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-strong) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--color-secondary-strong) 0%, var(--color-secondary) 100%);
}

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow {
    box-shadow: 0 0 60px rgba(52, 175, 158, 0.3);
}

.glow-sm {
    box-shadow: 0 0 30px rgba(52, 175, 158, 0.2);
}

/* ---------------------------------------------
   Components
   --------------------------------------------- */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-glow:hover::after {
    opacity: 1;
}

.btn-primary {
    background-color: var(--color-secondary-strong);
    color: white;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--color-secondary-strong-hover);
}

/* ---------------------------------------------
   Background Effects
   --------------------------------------------- */
.mesh-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(52, 175, 158, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(33, 124, 113, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 60%, rgba(52, 175, 158, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ---------------------------------------------
   Feature Icons
   --------------------------------------------- */
.feature-icon {
    background: linear-gradient(135deg, rgba(52, 175, 158, 0.2) 0%, rgba(33, 124, 113, 0.2) 100%);
    border: 1px solid rgba(52, 175, 158, 0.3);
}

/* ---------------------------------------------
   Animations
   --------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: reveal 0.6s ease forwards;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.6s ease forwards;
}

/* ---------------------------------------------
   Scrollbar
   --------------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(52, 175, 158, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 175, 158, 0.5);
}

/* ---------------------------------------------
   Accessibility
   --------------------------------------------- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-secondary-strong);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------------------------------------------
   Cookie Consent Banner
   --------------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

/* ---------------------------------------------
   Loading States
   --------------------------------------------- */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------------------------------------------
   Mobile Navigation
   --------------------------------------------- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    z-index: 100;
    transition: right 0.3s ease;
    padding: 2rem;
}

.mobile-menu.open {
    right: 0;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Hamburger Icon */
.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    cursor: pointer;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: white;
    border-radius: 2px;
    transition: 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 9px;
}
