/* Augmend Design System - Essential Custom Styles */

/* CSS Custom Properties (Design Tokens) */
:root {
    /* Colors */
    --color-primary: hsl(238, 83%, 67%);
    --color-primary-dark: hsl(238, 83%, 57%);
    --color-primary-light: hsl(238, 83%, 95%);
    --color-primary-50: hsl(238, 83%, 97%);
    
    --color-text-primary: hsl(220, 13%, 18%);
    --color-text-secondary: hsl(220, 13%, 28%);
    --color-text-muted: hsl(220, 9%, 46%);
    --color-text-light: hsl(220, 9%, 64%);
    
    --color-background: hsl(0, 0%, 100%);
    --color-background-light: hsl(220, 14%, 98%);
    --color-background-muted: hsl(220, 14%, 96%);
    --color-page-background: #fff;
    
    --color-heading-on-background: #111;
    --color-body-on-background: #222;
    
    /* Typography */
    --font-family-primary: 'Inter', sans-serif;
    --font-family-display: 'Sora', sans-serif;
    --font-family-mono: 'SF Mono', monospace;
    
    /* Typography Scale - Systematic approach (improved readability) */
    --text-xs: 0.875rem;     /* 14px - Small labels, captions (was 12px) */
    --text-sm: 1rem;         /* 16px - Small text, metadata (was 14px) */
    --text-base: 1.125rem;   /* 18px - Body text (was 16px) */
    --text-lg: 1.25rem;      /* 20px - Large body text (was 18px) */
    --text-xl: 1.5rem;       /* 24px - Small headings (was 20px) */
    --text-2xl: 1.875rem;    /* 30px - Medium headings (was 24px) */
    --text-3xl: 2.25rem;     /* 36px - Large headings (was 30px) */
    --text-4xl: 3rem;        /* 48px - Extra large headings (was 36px) */
    --text-5xl: 3.75rem;     /* 60px - Hero headings (was 48px) */
    --text-6xl: 4.5rem;      /* 72px - Display headings (was 60px) */
    --text-7xl: 5.25rem;     /* 84px - Hero display (was 72px) */
    
    /* Line Heights - Optimized for readability */
    --leading-none: 1;
    --leading-tight: 1.2;
    --leading-snug: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.6;
    --leading-loose: 1.8;
    
    /* Font Weights - Consistent scale */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    
    /* Letter Spacing - Refined for better readability */
    --tracking-tight: -0.02em;
    --tracking-normal: 0em;
    --tracking-wide: 0.01em;
    --tracking-wider: 0.025em;
    --tracking-widest: 0.05em;
    
    /* Spacing Scale - Comprehensive System */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 0.75rem;    /* 12px */
    --space-lg: 1rem;       /* 16px */
    --space-xl: 1.25rem;    /* 20px */
    --space-2xl: 1.75rem;   /* 28px */
    --space-3xl: 2.5rem;    /* 40px */
    --space-4xl: 3rem;      /* 48px */
    --space-5xl: 4rem;      /* 64px */
    --space-6xl: 5rem;      /* 80px */
    --space-7xl: 6rem;      /* 96px */
    --space-8xl: 8rem;      /* 128px */
    
    /* Section Spacing - Consistent Patterns */
    --section-padding-sm: var(--space-4xl);    /* 48px */
    --section-padding-md: var(--space-6xl);    /* 80px */
    --section-padding-lg: var(--space-8xl);    /* 128px */
    
    /* Grid Gaps - Consistent Sizes */
    --grid-gap-sm: var(--space-lg);            /* 16px */
    --grid-gap-md: var(--space-2xl);           /* 28px */
    --grid-gap-lg: var(--space-3xl);           /* 40px */
    
    /* Container Settings */
    --page-max-width: 1200px;
    --container-padding: var(--space-lg);      /* 16px */
}

/* Base Styles */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    zoom: 1;
    /* Prevent zoom on input focus on iOS */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-primary);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    zoom: 1;
    background: var(--color-page-background);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    overflow-x: hidden;
    /* Prevent layout shifts that can cause zoom */
    min-height: 100vh;
    /* Ensure consistent rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Consistent Container Behavior */
.max-w-page {
    max-width: var(--page-max-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* Consistent Section Spacing Classes */
.section-padding-sm {
    padding-top: var(--section-padding-sm);
    padding-bottom: var(--section-padding-sm);
}

.section-padding-md {
    padding-top: var(--section-padding-md);
    padding-bottom: var(--section-padding-md);
}

.section-padding-lg {
    padding-top: var(--section-padding-lg);
    padding-bottom: var(--section-padding-lg);
}

/* Consistent Grid Gap Classes */
.grid-gap-sm {
    gap: var(--grid-gap-sm);
}

.grid-gap-md {
    gap: var(--grid-gap-md);
}

.grid-gap-lg {
    gap: var(--grid-gap-lg);
}

/* Consistent Button Spacing */
.btn-padding {
    padding: var(--space-md) var(--space-2xl);
}

.btn-padding-sm {
    padding: var(--space-sm) var(--space-lg);
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--space-md) var(--space-2xl);
    border-radius: 0.75rem;
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    line-height: var(--leading-none);
    letter-spacing: var(--tracking-wide);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px -12px rgba(0,0,0,0.25);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: 2px solid rgba(255,255,255,0.12);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px -12px rgba(79,70,229,0.45);
}

.btn-secondary {
    background: rgba(255,255,255,0.9);
    color: hsl(238, 83%, 40%);
    border: 2px solid rgba(79,70,229,0.35);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 14px 32px -12px rgba(79,70,229,0.45);
}

/* Typography System - Systematic approach */
.text-display {
    font-size: var(--text-7xl);
    line-height: var(--leading-tight);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tight);
    font-family: var(--font-family-display);
}

/* Gradient text utility for hero */
.text-gradient-indigo {
    background: linear-gradient(90deg, #6366F1 0%, #A5B4FC 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Solid indigo for hero (consistent color) */
.text-hero-indigo { color: #6366F1; }
.text-indigo-light { color: #C7D2FE; }

/* Hero title responsive behavior */
.hero-title {
    font-size: var(--text-6xl);
    line-height: var(--leading-tight);
}

@media (min-width: 1024px) {
    .hero-title { white-space: nowrap; font-size: 4rem; }
}

@media (min-width: 1280px) {
    .hero-title { font-size: 4.5rem; }
}

@media (max-width: 768px) {
    .hero-title { font-size: var(--text-3xl) !important; }
}

@media (max-width: 480px) {
    .hero-title { font-size: var(--text-base) !important; letter-spacing: -0.01em; }
}

/* Simplify chaos effect on small screens for better wrapping */
@media (max-width: 640px) {
    .chaos-letter { display: inline; transform: none !important; }
}

.text-hero {
    font-size: var(--text-6xl);
    line-height: var(--leading-tight);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tight);
    font-family: var(--font-family-display);
}

.text-h1 {
    font-size: var(--text-5xl);
    line-height: var(--leading-tight);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tight);
    font-family: var(--font-family-display);
}

.text-h2 {
    font-size: var(--text-4xl);
    line-height: var(--leading-snug);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tight);
    font-family: var(--font-family-display);
}

.text-h3 {
    font-size: var(--text-3xl);
    line-height: var(--leading-snug);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-normal);
    font-family: var(--font-family-display);
}

.text-h4 {
    font-size: var(--text-2xl);
    line-height: var(--leading-snug);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-normal);
    font-family: var(--font-family-display);
}

.text-h5 {
    font-size: var(--text-xl);
    line-height: var(--leading-normal);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-normal);
    font-family: var(--font-family-display);
}

.text-h6 {
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-normal);
    font-family: var(--font-family-display);
}

.text-body-lg {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    font-weight: var(--font-normal);
    letter-spacing: var(--tracking-normal);
}

.text-body {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    font-weight: var(--font-normal);
    letter-spacing: var(--tracking-normal);
}

.text-body-sm {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    font-weight: var(--font-normal);
    letter-spacing: var(--tracking-normal);
}

.text-caption {
    font-size: var(--text-xs);
    line-height: var(--leading-normal);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wide);
}

.text-button {
    font-size: var(--text-lg);
    line-height: var(--leading-none);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wide);
}

.text-button-sm {
    font-size: var(--text-base);
    line-height: var(--leading-none);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wide);
}

/* Responsive Typography */
@media (max-width: 768px) {
    .text-display {
        font-size: var(--text-6xl);
    }
    
    .text-hero {
        font-size: var(--text-5xl);
    }
    
    .text-h1 {
        font-size: var(--text-4xl);
    }
    
    .text-h2 {
        font-size: var(--text-3xl);
    }
    
    .text-h3 {
        font-size: var(--text-2xl);
    }
    
    .text-h4 {
        font-size: var(--text-xl);
    }
    
    .text-h5 {
        font-size: var(--text-lg);
    }
}

/* Special Component Styles */
.glass-nav {
    backdrop-filter: none;
    background: rgba(55, 48, 163, 0.9); /* Darker indigo with more opacity */
    font-size: var(--text-xl);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.navbar-inner-border {
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

/* Navbar link styling */
.nav-link {
    color: white;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: rgb(196, 181, 253); /* indigo-200 */
}

.gradient-bg {
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.5) 0%, rgba(224, 231, 255, 0.3) 50%, rgba(238, 242, 255, 0.4) 100%);
}

/* Hero overlay tuned for dark video backgrounds */
.hero-overlay {
    background: linear-gradient(90deg, rgba(0,0,0,0.35) 0%, rgba(2,6,23,0.25) 35%, rgba(79,70,229,0.20) 70%, rgba(224,231,255,0.16) 100%);
}

/* Complex Background Patterns */
.poem-background,
.section-alt.poem-background {
    position: relative;
    background-image: 
        radial-gradient(circle, rgba(79, 70, 229, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, 
            transparent 0%, 
            rgba(147, 51, 234, 0.15) 35%, 
            rgba(79, 70, 229, 0.25) 45%, 
            rgba(59, 130, 246, 0.25) 55%, 
            rgba(147, 51, 234, 0.15) 65%, 
            transparent 100%);
    background-size: 6px 6px, 100% 100%;
    background-position: 0 0, 0 0;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: 50vw;
    padding-right: 50vw;
}

/* Solid dark background for call-to-action section */
.cta-background {
    position: relative;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(79, 70, 229, 0.45) 35%, 
        rgba(79, 70, 229, 0.75) 55%, 
        transparent 100%);
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: 50vw;
    padding-right: 50vw;
}

/* Dark black background for challenges section */
.challenges-background {
    position: relative;
    background: #000000;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: 50vw;
    padding-right: 50vw;
}

/* Complex Container Styles */
.challenge-image-container {
    width: 100%;
    min-height: 500px;
    padding-top: 100px;
    padding-bottom: 100px;
    background: hsl(238, 83%,100%);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px -8px rgba(99,102,241,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Card System */
.card {
    background: white;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 1rem;
    box-shadow: 0 8px 24px -12px rgba(17,24,39,0.15);
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -16px rgba(17,24,39,0.25);
}

.card-header {
    background: rgba(79, 70, 229, 0.06);
    padding: 1.5rem;
    text-align: center;
}

.card-header h3 {
    color: #4f46e5;
}

.card-body {
    padding: 2rem;
}

/* Video Controls Styling */
#demo-video {
    outline: none !important;
}

#demo-video::-webkit-media-controls {
    display: flex !important;
}

#demo-video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

#demo-video::-webkit-media-controls-play-button {
    display: block !important;
}

#demo-video::-webkit-media-controls-fullscreen-button {
    display: block !important;
}

/* Custom Video Controls Styling */
#video-controls {
    z-index: 1000 !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#video-controls button {
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

#video-controls button:hover {
    transform: scale(1.1);
}

#video-controls button:active {
    transform: scale(0.95);
}

#time-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Video rotation styles */
#video-container {
    transform-origin: center center;
    transition: transform 0.5s ease-in-out, height 0.5s ease-in-out, width 0.5s ease-in-out;
}

#video-container.rotated {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    z-index: 1000;
    max-width: 90vh;
    max-height: 90vw;
}

/* Orientation info styling */
.md\:hidden p {
    transition: all 0.3s ease-in-out;
}

/* Volume Slider Styling */
.slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    background: #374151;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: #2563eb;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: #2563eb;
}

/* Ensure volume slider container is clickable */
.group:hover .group-hover\:pointer-events-auto {
    pointer-events: auto !important;
}

.challenge-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Mobile-Specific Styles */
@media (max-width: 640px) {
    .recognition-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        white-space: nowrap;
        min-height: 44px;
    }
    
    /* Mobile video card positioning */
    #floatingVideoCard {
        right: 0 !important;
        bottom: 1rem !important;
    }
    
    /* Ensure floating CTA doesn't cause horizontal overflow */
    .fixed.z-50 {
        max-width: calc(100vw - 2rem);
        right: 1rem !important;
        left: auto;
    }
    
    /* Ensure button text doesn't cause overflow */
    .fixed.z-50 button {
        max-width: calc(100vw - 4rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


/* Video card slide animation (works on all devices) */
#floatingVideoCard {
    width: 380px !important;
    height: 260px !important;
}

@media (max-width: 768px) {
    #floatingVideoCard {
        width: 270px !important;
        height: 185px !important;
    }
}

#floatingVideoCard.card-hidden {
    transform: translateX(100%) !important;
    transition: transform 0.2s ease-out !important;
}

#floatingVideoCard.card-visible {
    transform: translateX(0) !important;
    transition: transform 0.2s ease-out !important;
}

/* Modal mobile improvements */
@media (max-width: 640px) {
    .modal-overlay {
        padding: 1rem;
    }
    
    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    /* Ensure form inputs don't zoom on iOS */
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* Additional zoom prevention CSS */
/* Prevent zoom issues from layout shifts */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Prevent zoom on input focus (iOS Safari) */
input, textarea, select {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Prevent zoom from dynamic content loading */
main {
    contain: layout;
    will-change: auto;
}

/* Specific fixes for video containers and dynamic content */
#video-container {
    contain: layout style;
    will-change: auto;
}

#useCasesGrid {
    contain: layout style;
    will-change: auto;
}

/* Prevent zoom issues from floating elements */
#floatingVideoCard {
    contain: layout;
    will-change: auto;
}

/* Ensure consistent rendering during dynamic content updates */
.use-case-card {
    contain: layout;
    will-change: auto;
}

/* Ensure consistent viewport behavior */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific fixes */
    body {
        -webkit-text-size-adjust: 100% !important;
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
    
    input, textarea, select {
        -webkit-text-size-adjust: 100% !important;
        font-size: 16px !important;
    }
}

 