/* Enhanced Apple/Jobs Style Reveal.js Theme with Improvements */

/* Import Fireflies brand fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* Global overrides */
.reveal {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: transparent;
    color: #ffffff;
}

/* Let reveal.js handle backgrounds - don't override with CSS */
.reveal .slides section {
    background: none !important;
}

.reveal .slides {
    text-align: center;
}

/* Base heading styles */
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
    margin: 0;
    padding: 0 10%; /* Horizontal breathing room */
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: none;
    text-shadow: none;
    word-wrap: break-word;
    font-weight: 300;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Fade in animation for all headings */
.reveal .slides section h1 {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Title slide styling */
.reveal .title-slide {
    font-size: 7em;
    font-weight: 200;
    line-height: 1.0;
    margin-top: -5vh;
    margin-bottom: 0;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-align: center;
    animation: titleFadeIn 1.5s ease-out;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

@keyframes titleFadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.95) translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

/* Main text styling - ultra minimal */
.reveal .main-text {
    font-size: 8em;
    font-weight: 200;
    line-height: 1.1;
    margin: -5vh 0 0 0;
    padding: 0 10%;
    color: #ffffff;
    text-align: center;
    letter-spacing: -0.02em;
    animation: fadeInUp 1s ease-out;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Special emphasis for key slides */
.reveal .main-text.ethics {
    font-size: 9em;
    font-weight: 300;
    color: #7A5AF8;
    text-shadow: 0 0 60px rgba(122, 90, 248, 0.3);
}

.reveal .main-text.permission {
    font-size: 10em;
    font-weight: 300;
    color: #7A5AF8;
    text-shadow: 0 0 60px rgba(122, 90, 248, 0.3);
}

.reveal .main-text.finale {
    font-size: 10em;
    font-weight: 400;
    color: #7A5AF8;
    text-shadow: 0 0 80px rgba(122, 90, 248, 0.4);
    animation: pulse 2s ease-in-out infinite;
    background: radial-gradient(circle, rgba(122, 90, 248, 0.08) 0%, transparent 70%);
}

/* Enhanced pulse animation */
@keyframes pulse {
    0% { 
        opacity: 1; 
        transform: scale(1); 
        text-shadow: 0 0 80px rgba(122, 90, 248, 0.4);
    }
    50% { 
        opacity: 0.95; 
        transform: scale(1.02); 
        text-shadow: 0 0 100px rgba(122, 90, 248, 0.6);
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
        text-shadow: 0 0 80px rgba(122, 90, 248, 0.4);
    }
}

/* Present slide enhancement */
.reveal .slides section.present {
    filter: contrast(1.05) brightness(1.02);
}

/* Remove all backgrounds and borders */
.reveal .slides section {
    background: none;
    border: none;
    box-shadow: none;
}

/* Subtle progress bar */
.reveal .progress {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.reveal .progress span {
    background: rgba(122, 90, 248, 0.8);
    transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
}

/* Minimal controls with hover effects */
.reveal .controls {
    color: rgba(255, 255, 255, 0.2);
    bottom: 20px;
    right: 20px;
    transition: all 0.3s ease;
}

.reveal .controls button {
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.reveal .controls button:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Minimal slide numbers */
.reveal .slide-number {
    font-size: 12px;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.3);
    background: none;
    padding: 5px 10px;
    bottom: 10px;
    right: 10px;
}

.reveal .slide-number-delimiter {
    margin: 0 3px;
    opacity: 0.5;
}

/* Smooth transitions */
.reveal .slides section {
    transition: all 0.8s cubic-bezier(0.26, 0.46, 0.30, 0.95);
}

/* Typography refinements */
.reveal .main-text br {
    line-height: 0.8;
}

/* Keyboard shortcut hint */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 200;
    animation: fadeOut 5s ease-in-out forwards;
    animation-delay: 2s;
    z-index: 1000;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

@keyframes fadeOut {
    0% { opacity: 0.3; }
    80% { opacity: 0.3; }
    100% { opacity: 0; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .reveal .title-slide {
        font-size: 4em;
        padding: 0 5%;
    }
    
    .reveal .main-text {
        font-size: 4.5em;
        padding: 0 5%;
    }
    
    .reveal .main-text.ethics {
        font-size: 5em;
    }
    
    .reveal .main-text.permission {
        font-size: 5.5em;
    }
    
    .reveal .main-text.finale {
        font-size: 6em;
    }
    
    .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
        margin: 0;
        padding: 0 5%;
    }
    
    /* Scale logo for mobile */
    .fireflies-logo img {
        height: 15px;
    }
    
    .presentation-timer {
        right: 30px; /* Adjusted for smaller logo */
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .reveal .title-slide {
        font-size: 2.5em;
    }
    
    .reveal .main-text {
        font-size: 3em;
    }
    
    .reveal .main-text.ethics {
        font-size: 3.5em;
    }
    
    .reveal .main-text.permission {
        font-size: 4em;
    }
    
    .reveal .main-text.finale {
        font-size: 4.5em;
    }
}

/* Perfect centering */
.reveal .slides section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Contact info styling */
.contact-info {
    position: relative;
    margin-top: 2em;
    text-align: center;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.contact-info p {
    margin: 4px 0;
    font-size: 1.3em;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
}

/* Slide-specific text colors - higher specificity to override base heading styles */
.reveal .text-red { color: #FF3B30 !important; }
.reveal .text-blue { color: #007AFF !important; }
.reveal .text-green { color: #34C759 !important; }
.reveal .text-purple { color: #7A5AF8 !important; }
.reveal .text-white { color: #ffffff !important; }

/* Font size variants */
.text-8em { font-size: 8em; }
.text-7em { font-size: 7em; }
.text-6em { font-size: 6em; }
.text-5em { font-size: 5em; }

/* Spacing utilities */
.mt-small { margin-top: 0.1em; }
.mt-medium { margin-top: 0.2em; }

/* Final slide text adjustments */
.finale-text-1 {
    margin-top: 0 !important;
    margin-bottom: 0.3em !important;
    font-size: 4em !important;
}

.finale-text-2 {
    margin-top: 0 !important;
    margin-bottom: 0.5em !important;
    font-size: 3.5em !important;
}

/* Z-index utilities */
.z-2 { position: relative; z-index: 2; }

/* Demo image styling - now using reveal.js background images, keeping class for potential future use */

/* Title slide text shadow */
.title-shadow {
    text-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 80px rgba(0, 0, 0, 0.6);
}

/* Remove any default styling that might interfere */
.reveal p {
    margin: 0;
    line-height: 1;
}

/* Default black background only for reveal container, let sections use data-background */
.reveal {
    background-color: #000000;
}

/* Micro-interactions */
.reveal .slides section {
    cursor: none;
}

.reveal .slides section:hover {
    cursor: none;
}

/* Navigation areas cursor */
.reveal .controls-arrow {
    cursor: pointer !important;
}

/* Fade in animation for slides */
.reveal .slides section {
    opacity: 0;
    transform: scale(0.95);
}

.reveal .slides section.present {
    opacity: 1;
    transform: scale(1);
    transition: all 0.8s cubic-bezier(0.26, 0.46, 0.30, 0.95);
}

/* Font family already set in base heading styles - this is redundant */

/* Accessibility improvements */
.reveal .slides section {
    outline: none;
}

.reveal .slides section:focus {
    outline: 2px solid rgba(0, 122, 255, 0.5);
    outline-offset: 10px;
}

/* Skip link for screen readers - completely hidden */
.skip-link {
    position: absolute;
    top: -9999px;
    left: -9999px;
    background: #007AFF;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
}

.skip-link:focus {
    top: 10px;
    left: 10px;
    opacity: 1;
    pointer-events: auto;
}

/* Performance optimizations */
.reveal .slides section {
    will-change: transform, opacity;
}

/* Preload hint for next slide */
.reveal .slides section.future {
    pointer-events: none;
}

/* Print styles for handouts */
@media print {
    .reveal .slides section {
        page-break-after: always;
        height: 100vh !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .reveal .progress,
    .reveal .controls,
    .reveal .slide-number,
    .keyboard-hint,
    .fireflies-logo {
        display: none !important;
    }
    
    .reveal .main-text {
        font-size: 4em !important;
        color: #000000 !important;
        font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif !important;
    }
    
    .reveal {
        background: #ffffff !important;
        font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    }
}

/* Loading animation */
.reveal-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    font-weight: 200;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Touch feedback for mobile */
@media (pointer: coarse) {
    .reveal .slides section {
        -webkit-tap-highlight-color: rgba(0, 122, 255, 0.1);
    }
    
    .reveal .slides section:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Custom cursor for desktop */
@media (pointer: fine) {
    .reveal {
        cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle cx="10" cy="10" r="2" fill="white" opacity="0.5"/></svg>') 10 10, auto;
    }
}

/* Timer display for practice mode */
.presentation-timer {
    position: fixed;
    top: 7px;
    right: 40px; /* Adjusted for smaller logo */
    font-size: 14px;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 4px;
    display: none;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.presentation-timer.active {
    display: block;
}

/* Fireflies logo on every slide */
.fireflies-logo {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fireflies-logo:hover {
    opacity: 1;
}

.fireflies-logo img {
    height: 20px;
    width: auto;
    filter: brightness(1) contrast(1);
}

/* Meta improvements for social sharing */
.reveal-viewport {
    background: #000000;
    background-image: radial-gradient(circle at center, rgba(0, 122, 255, 0.02) 0%, transparent 50%);
}

/* Particle animation for 3 billion slide */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(122, 90, 248, 1);
    border-radius: 50%;
    animation: float-particle 15s linear infinite;
    box-shadow: 0 0 20px rgba(122, 90, 248, 0.8);
    opacity: 0.8;
}

.particle:nth-child(odd) {
    width: 3px;
    height: 3px;
    background: rgba(122, 90, 248, 0.8);
    opacity: 0.6;
}

.particle:nth-child(3n) {
    width: 5px;
    height: 5px;
    background: rgba(52, 199, 89, 1);
    box-shadow: 0 0 25px rgba(52, 199, 89, 0.8);
    opacity: 0.9;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0);
    }
    100% {
        transform: translateY(-100vh) translateX(20px);
    }
}