/* =================================
   Custom Styles for Summaia Landing Page
   ================================= */

/* Color Palette Variables */
:root {
    --primary: #4E2A40;
    --primary-contrast: #FDFBF8;
    --background: #FAF7F5;
    --background-alt: #F3F0ED;
    --surface: #FFFFFF;
    --surface-alt: #f5f2f0;
    --border: #DCD9D5;
    --border-input: #C8C4C0;
    --text: #2E2A27;
    --text-muted: #6E6A66;
    --text-inverse: #FDFBF8;
    --success: #3A7D44;
    --warning: #B89B65;
    --danger: #9B2226;
}

/* Custom Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d2133;
}

/* Typography Enhancements */
body {
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background-color: var(--primary);
    color: var(--primary-contrast);
}

::-moz-selection {
    background-color: var(--primary);
    color: var(--primary-contrast);
}

/* Gradient Text Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Card Hover Effects */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(78, 42, 64, 0.15);
}

/* Button Pulse Effect */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.btn-pulse:hover {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-contrast);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Prose Styling for About Section */
.prose {
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1.25em;
}

.prose strong {
    font-weight: 600;
}

.prose ul {
    list-style-type: none;
    padding-left: 0;
}

.prose ul li {
    padding-left: 0;
}

/* Mobile Menu Toggle (if needed for future expansion) */
@media (max-width: 768px) {
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.active {
        display: block;
    }
}

/* Hero Section Gradient Background Enhancement */
.hero-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--warning) 100%);
}

/* Feature Card Glow Effect */
.feature-glow {
    position: relative;
}

.feature-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--warning), var(--primary));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

.feature-glow:hover::before {
    opacity: 0.3;
}

/* Print Styles */
@media print {
    header {
        position: static;
    }
    
    .no-print {
        display: none;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-gradient-to-r,
    .bg-gradient-to-br {
        background: var(--primary);
    }
    
    .text-text-muted {
        color: var(--text);
    }
}

/* Utility Classes */
.text-balance {
    text-wrap: balance;
}

.backdrop-blur-custom {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Image Loading State */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: var(--primary-contrast);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Blog post body (generated from Markdown) */
.blog-prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.blog-prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.blog-prose ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}

.blog-prose li {
    margin: 0.35rem 0;
}

.blog-prose a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-prose a:hover {
    opacity: 0.85;
}

.blog-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    margin: 1rem 0;
}

.blog-prose strong {
    font-weight: 600;
    color: var(--text);
}
