﻿/* Google Material Design System for Chain Events Landing Page */
/* Consistent with main web app design language */

:root {
    /* Primary Colors - Same as main app */
    --google-blue: #1a73e8;
    --google-blue-50: #e8f0fe;
    --google-blue-100: #d2e3fc;
    --google-blue-500: #1a73e8;
    --google-blue-600: #1557b8;
    --google-blue-700: #1f4788;

    /* Surface Colors */
    --google-surface: #ffffff;
    --google-surface-variant: #f8f9fa;
    --google-surface-container: #f1f3f4;
    --google-surface-container-high: #e8eaed;

    /* Text Colors */
    --google-on-surface: #202124;
    --google-on-surface-variant: #5f6368;
    --google-on-surface-secondary: #80868b;

    /* Semantic Colors */
    --google-success: #137333;
    --google-success-container: #e6f4ea;
    --google-warning: #f29900;
    --google-warning-container: #fef7e0;
    --google-error: #d93025;
    --google-error-container: #fce8e6;

    /* Spacing Scale - Same as main app */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Typography - Same as main app */
    --font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-body-large: 16px;
    --font-size-body-medium: 14px;
    --font-size-body-small: 12px;
    --font-size-title-large: 22px;
    --font-size-title-medium: 16px;
    --font-size-headline: 24px;

    /* Border Radius - Same as main app */
    --border-radius-small: 4px;
    --border-radius-medium: 8px;
    --border-radius-large: 12px;
    --border-radius-xl: 16px;

    /* Shadows & Elevation - Same as main app */
    --shadow-1: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --shadow-2: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    --shadow-3: 0 4px 8px 3px rgba(60, 64, 67, 0.15), 0 1px 3px rgba(60, 64, 67, 0.3);
    --elevation-1: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --elevation-2: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    --elevation-3: 0 4px 8px 3px rgba(60, 64, 67, 0.15), 0 1px 3px rgba(60, 64, 67, 0.3);
}

/* Base Styles - Same as main app */
html, body {
    font-family: var(--font-family);
    color: var(--google-on-surface);
    background-color: var(--google-surface-variant);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    font-size: var(--font-size-body-medium);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography - Same as main app */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 500;
    margin: 0 0 var(--space-4) 0;
    line-height: 1.25;
}

h1 {
    font-size: 32px;
    font-weight: 400;
}

h2 {
    font-size: var(--font-size-headline);
    font-weight: 400;
}

h3 {
    font-size: var(--font-size-title-large);
    font-weight: 500;
}

/* Google-Style Dashboard Layout */
.google-dashboard {
    background-color: var(--google-surface-variant);
    min-height: 100vh;
}

/* Page Header - Same as main app */
.google-page-header {
    margin-bottom: var(--space-6);
}

.google-page-title {
    font-size: 32px;
    font-weight: 400;
    color: var(--google-on-surface);
    margin-bottom: var(--space-2);
    line-height: 1.25;
}

.google-page-subtitle {
    font-size: var(--font-size-body-large);
    color: var(--google-on-surface-variant);
    margin: 0;
}

/* Cards - Same as main app */
.google-card {
    background: var(--google-surface);
    border-radius: var(--border-radius-large);
    box-shadow: var(--elevation-1);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    overflow: hidden;
}

.google-card:hover {
    box-shadow: var(--elevation-2);
    transform: translateY(-1px);
}

.google-card-header {
    display: flex;
    align-items: center;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--google-surface-container);
    margin-bottom: var(--space-6);
}

.google-card-title {
    font-size: var(--font-size-title-large);
    font-weight: 500;
    color: var(--google-on-surface);
    margin: 0;
}

.google-card-content {
    padding: var(--space-6);
}

.google-card-text {
    line-height: 1.6;
    color: var(--google-on-surface-variant);
    margin: 0;
}

/* Metrics Grid - Same as main app */
.google-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.google-metric-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6);
    background: var(--google-surface);
    border-radius: var(--border-radius-large);
    box-shadow: var(--elevation-1);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.google-metric-card:hover {
    box-shadow: var(--elevation-2);
    transform: translateY(-1px);
}

.google-metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-medium);
    background-color: var(--google-blue-50);
    flex-shrink: 0;
}

.google-metric-content {
    flex: 1;
}

.google-metric-value {
    font-size: 28px;
    font-weight: 500;
    color: var(--google-on-surface);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.google-metric-label {
    font-size: var(--font-size-body-small);
    color: var(--google-on-surface-variant);
    font-weight: 400;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--google-blue) 0%, var(--google-blue-600) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-pattern.svg') center/cover;
    opacity: 0.15;
    z-index: -1; /* Move to negative z-index so it stays behind content */
}

/* Ensure all content in hero section is properly layered */
.hero-section > *,
.hero-section .mud-container,
.hero-section .mud-grid,
.hero-section .mud-item,
.hero-section .mud-stack,
.hero-section .mud-paper {
    position: relative;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--elevation-3);
}

/* CTA Buttons - Same styling as main app buttons */
.cta-button {
    background-color: var(--google-surface) !important;
    color: var(--google-blue) !important;
    border-radius: var(--border-radius-xl) !important;
    font-family: var(--font-family) !important;
    font-weight: 500 !important;
    text-transform: none !important;
    box-shadow: var(--elevation-1) !important;
    transition: all 0.2s ease !important;
    border: none !important;
    height: 48px !important;
    padding: 0 var(--space-6) !important;
}

.cta-button:hover {
    background-color: var(--google-blue-50) !important;
    box-shadow: var(--elevation-2) !important;
    transform: translateY(-1px);
}

.cta-secondary {
    background-color: transparent !important;
    color: var(--google-surface) !important;
    border: 1px solid var(--google-surface) !important;
    border-radius: var(--border-radius-xl) !important;
    font-family: var(--font-family) !important;
    font-weight: 500 !important;
    text-transform: none !important;
    height: 48px !important;
    padding: 0 var(--space-6) !important;
    transition: all 0.2s ease !important;
}

.cta-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--google-surface) !important;
}

/* Optimized Images */
.img-optimized {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer Styles */
.landing-footer {
    background: var(--google-on-surface);
    color: var(--google-surface);
    padding: var(--space-16) 0;
    border-top: 1px solid var(--google-surface-container-high);
}

.footer-section {
    margin-bottom: var(--space-6);
}

.footer-link {
    color: var(--google-blue-100) !important;
    text-decoration: none;
    font-size: var(--font-size-body-small);
    font-weight: 400;
    transition: color 0.2s ease;
    display: block;
    padding: var(--space-1) 0;
}

.footer-link:hover {
    color: var(--google-blue-50) !important;
    text-decoration: underline;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-medium);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Newsletter section styling */
.landing-footer .mud-paper {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--border-radius-xl) !important;
    backdrop-filter: blur(10px);
}

/* Trust badges styling */
.landing-footer .mud-chip {
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-medium) !important;
}

/* Glass Header Styles - iOS Style Glassmorphism */
.glass-header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-header.scrolled {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Dark mode glass header */
.glass-header.dark {
    background: rgba(18, 18, 18, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-header.dark.scrolled {
    background: rgba(18, 18, 18, 0.9) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Header content styling */
.glass-header .mud-toolbar {
    background: transparent !important;
    backdrop-filter: none;
}

.glass-header .mud-toolbar-content {
    padding: var(--space-4) var(--space-6);
}

/* Navigation items glass effect */
.glass-nav-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-xl);
    transition: all 0.2s ease;
    padding: var(--space-2) var(--space-4);
    margin: 0 var(--space-1);
}

.glass-nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Logo and brand text glass styling */
.glass-header .brand-logo {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.glass-header .brand-text {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

/* Button glass effects */
.glass-button {
    background: rgba(26, 115, 232, 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(26, 115, 232, 0.2) !important;
    border-radius: var(--border-radius-xl) !important;
    color: var(--google-blue) !important;
    transition: all 0.2s ease !important;
}

.glass-button:hover {
    background: rgba(26, 115, 232, 0.2) !important;
    border-color: rgba(26, 115, 232, 0.3) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

.glass-button-primary {
    background: rgba(26, 115, 232, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(26, 115, 232, 0.3) !important;
    color: white !important;
}

.glass-button-primary:hover {
    background: rgba(26, 115, 232, 1) !important;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
}

/* Mobile glass header adjustments */
@media (max-width: 768px) {
    .glass-header {
        backdrop-filter: blur(15px) saturate(180%);
        -webkit-backdrop-filter: blur(15px) saturate(180%);
    }
    
    .glass-header .mud-toolbar-content {
        padding: var(--space-3) var(--space-4);
    }
    
    .glass-nav-item {
        padding: var(--space-1) var(--space-3);
        margin: 0 var(--space-1);
        font-size: var(--font-size-body-small);
    }
}

/* Ensure body has proper top padding for fixed header */
body.has-glass-header {
    padding-top: 64px;
}

@media (max-width: 768px) {
    body.has-glass-header {
        padding-top: 56px;
    }
}

/* Safari-specific backdrop filter support */
@supports (-webkit-backdrop-filter: blur(20px)) {
    .glass-header {
        -webkit-backdrop-filter: blur(20px) saturate(180%);
    }
    
    .glass-header.scrolled {
        -webkit-backdrop-filter: blur(25px) saturate(180%);
    }
}

/* Focus Styles - Same as main app */
*:focus {
    outline: 2px solid var(--google-blue);
    outline-offset: 2px;
}

/* Loading State */
.google-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-6);
    text-align: center;
}

/* Section Spacing */
.py-16 {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--google-on-surface-variant);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.h-100 {
    height: 100%;
}
