/* GradeFlow - Student Grade Tracker Styles */
/* Palette: Copper & Slate */

:root {
    /* Primary Colors */
    --copper: #B87333;
    --copper-light: #D4A574;
    --copper-dark: #8B5A2B;
    
    /* Slate Colors */
    --slate-900: #0F172A;
    --slate-800: #1E293B;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748B;
    --slate-400: #94A3B8;
    --slate-300: #CBD5E1;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;
    --slate-50: #F8FAFC;
    
    /* Accent */
    --accent: #B87333;
    --accent-light: #D4A574;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -2px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--slate-50);
    color: var(--slate-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--slate-900);
}

.logo-icon {
    color: var(--copper);
    font-size: 1.75rem;
}

.nav {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    color: var(--slate-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--copper);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--slate-900);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-4xl);
    padding: calc(80px + var(--space-4xl)) var(--space-4xl) var(--space-4xl);
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: linear-gradient(135deg, var(--copper-light), var(--copper));
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.05;
    color: var(--slate-900);
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
}

.title-line.accent {
    color: var(--copper);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--slate-600);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--slate-900);
    color: white;
}

.btn-primary:hover {
    background: var(--copper);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--slate-700);
    border: 2px solid var(--slate-300);
}

.btn-secondary:hover {
    border-color: var(--copper);
    color: var(--copper);
    transform: translateY(-2px);
}

.btn-small {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-window {
    background: var(--slate-900);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform var(--transition-slow);
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--space-md) var(--space-lg);
    background: var(--slate-800);
    border-bottom: 1px solid var(--slate-700);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #EF4444; }
.dot.yellow { background: #F59E0B; }
.dot.green { background: #10B981; }

.code-title {
    margin-left: auto;
    color: var(--slate-400);
    font-size: 0.8125rem;
    font-family: 'SF Mono', monospace;
}

.code-content {
    padding: var(--space-lg);
    margin: 0;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content .keyword { color: #C792EA; }
.code-content .class-name { color: #FFCB6B; }
.code-content .method { color: #82AAFF; }
.code-content .comment { color: #546E7A; }

.floating-stats {
    position: absolute;
    bottom: -20px;
    right: -20px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.stat-card {
    background: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--slate-200);
    min-width: 140px;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--copper);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Features Section */
.features {
    padding: var(--space-4xl) var(--space-xl);
    background: white;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-3xl);
}

.section-eyebrow {
    display: inline-block;
    color: var(--copper);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: var(--space-md);
}

.section-desc {
    color: var(--slate-600);
    font-size: 1.125rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    padding: var(--space-2xl);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--copper-light);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--copper-light), var(--copper));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: var(--space-lg);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: var(--space-sm);
}

.feature-desc {
    color: var(--slate-600);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.code-snippet {
    background: var(--slate-900);
    border-radius: 8px;
    padding: var(--space-md);
    overflow-x: auto;
}

.code-snippet code {
    font-family: 'SF Mono', monospace;
    font-size: 0.8125rem;
    color: #C792EA;
}

/* Demo Section */
.demo {
    padding: var(--space-4xl) var(--space-xl);
    background: linear-gradient(180deg, var(--slate-100) 0%, var(--slate-50) 100%);
}

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

.demo-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.demo-app {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 500px;
}

.app-sidebar {
    background: var(--slate-900);
    padding: var(--space-xl);
    color: white;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--slate-700);
}

.app-icon {
    color: var(--copper);
    font-size: 1.5rem;
}

.app-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.app-stat {
    display: flex;
    flex-direction: column;
}

.app-stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--copper-light);
}

.app-stat-label {
    font-size: 0.8125rem;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-main {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
}

.app-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--slate-200);
}

.app-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--slate-900);
}

.table-container {
    flex: 1;
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.data-table th {
    text-align: left;
    padding: var(--space-md);
    color: var(--slate-500);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--slate-200);
}

.data-table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
}

.data-table tr:hover td {
    background: var(--slate-50);
}

.empty-state {
    text-align: center;
}

.empty-content {
    padding: var(--space-3xl) var(--space-xl);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-md);
}

.empty-content p {
    color: var(--slate-500);
    margin-bottom: var(--space-lg);
}

.status-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-excellent {
    background: #DCFCE7;
    color: #166534;
}

.status-good {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-average {
    background: #FEF3C7;
    color: #92400E;
}

.status-poor {
    background: #FEE2E2;
    color: #991B1B;
}

.action-btn {
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    padding: var(--space-xs);
    transition: color var(--transition-fast);
}

.action-btn:hover {
    color: #EF4444;
}

/* Implementation Section */
.implementation {
    padding: var(--space-4xl) var(--space-xl);
    background: white;
}

.impl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.impl-card {
    background: var(--slate-900);
    border-radius: 16px;
    overflow: hidden;
}

.impl-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    padding: var(--space-lg) var(--space-xl);
    background: var(--slate-800);
    border-bottom: 1px solid var(--slate-700);
}

.impl-code {
    padding: var(--space-lg);
    overflow-x: auto;
}

.impl-code pre {
    margin: 0;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.8;
    color: #E2E8F0;
}

.impl-code .keyword { color: #C792EA; }
.impl-code .class-name { color: #FFCB6B; }
.impl-code .method { color: #82AAFF; }
.impl-code .comment { color: #546E7A; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--slate-200);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--slate-400);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--slate-700);
}

.modal-body {
    padding: var(--space-xl);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--slate-200);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--copper);
}

.form-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--slate-500);
    margin-top: var(--space-xs);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--slate-200);
}

/* Footer */
.footer {
    background: var(--slate-900);
    color: white;
    padding: var(--space-3xl) var(--space-xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.footer-text {
    color: var(--slate-400);
    margin-bottom: var(--space-xl);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
}

.footer-link {
    color: var(--slate-400);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--copper-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: calc(80px + var(--space-3xl));
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .code-window {
        max-width: 400px;
        transform: none;
    }
    
    .floating-stats {
        position: relative;
        bottom: auto;
        right: auto;
        flex-direction: row;
        justify-content: center;
        margin-top: var(--space-lg);
    }
    
    .demo-app {
        grid-template-columns: 1fr;
    }
    
    .app-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-xl);
        align-items: center;
    }
    
    .app-brand {
        margin-bottom: 0;
        border-bottom: none;
        flex: 1;
    }
    
    .app-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .header-content {
        padding: var(--space-md);
    }
    
    .nav {
        display: none;
    }
    
    .hero {
        padding: calc(60px + var(--space-2xl)) var(--space-lg) var(--space-2xl);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .impl-grid {
        grid-template-columns: 1fr;
    }
    
    .app-sidebar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .app-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: var(--space-sm);
    }
}