/* Base Styles & CSS Variables */
:root {
    /* Glass Morphism Colors */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-bg-hover: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --glass-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --text-primary: rgba(0, 0, 0, 0.9);
    --text-secondary: rgba(0, 0, 0, 0.7);
    --text-tertiary: rgba(0, 0, 0, 0.5);
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --accent-color: #000000;
    
    /* Transitions */
    --spring-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --spring-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --spring-snappy: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Body Section */
.main-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 40px 20px;
    backdrop-filter: blur(20px);
    animation: fadeInUp 1.2s var(--spring-smooth) forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

/* Highlights Panel */
.highlights-panel {
    position: relative;
    max-width: 680px;
    width: 100%;
    padding: 0 20px;
    margin-bottom: 40px;
    overflow: visible;
}

.highlights-carousel {
    position: relative;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--spring-smooth);
    overflow: hidden;
}

.highlights-carousel:hover {
    background: var(--glass-bg-hover);
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.highlight-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s var(--spring-smooth), 
                transform 0.6s var(--spring-smooth),
                visibility 0.6s;
}

.highlight-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 2;
}

/* Slide out animations */
.highlight-slide.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
}

.highlight-slide.slide-out-right {
    transform: translateX(100%);
    opacity: 0;
}

/* Slide in animations */
.highlight-slide.slide-in-left {
    transform: translateX(-100%);
    opacity: 0;
}

.highlight-slide.slide-in-right {
    transform: translateX(100%);
    opacity: 0;
}

.highlight-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.highlight-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.highlight-title {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.highlight-text {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.highlight-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    align-self: flex-start;
    transition: all 0.3s var(--spring-smooth);
    padding: 8px 0;
}

.highlight-link:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.highlight-link:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Navigation Arrows */
.highlight-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--spring-smooth);
    z-index: 10;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
}

.highlights-panel:hover .highlight-nav {
    opacity: 1;
    pointer-events: all;
}

.highlight-nav:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.highlight-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.highlight-nav:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.5);
    outline-offset: 2px;
    opacity: 1;
}

.highlight-nav-prev {
    left: 28px;
}

.highlight-nav-next {
    right: 28px;
}

/* Indicators */
.highlight-indicators {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 16px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--spring-smooth);
    padding: 0;
}

.indicator:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.2);
}

.indicator.active {
    background: rgba(0, 0, 0, 0.6);
    width: 24px;
    border-radius: 4px;
}

.indicator:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.5);
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .highlights-panel {
        margin-bottom: 32px;
    }
    
    .highlight-image {
        max-height: 200px;
    }
    
    .highlight-content {
        padding: 20px;
        gap: 10px;
    }
    
    .highlight-title {
        font-size: 18px;
    }
    
    .highlight-text {
        font-size: 14px;
    }
    
    .highlight-nav {
        width: 36px;
        height: 36px;
        opacity: 0.8;
        pointer-events: all;
    }
    
    .highlight-nav-prev {
        left: 16px;
    }
    
    .highlight-nav-next {
        right: 16px;
    }
}

/* Button Container */
.button-container {
    display: grid;
    gap: 24px;
    max-width: 680px;
    width: 100%;
    padding: 0 20px;
}

/* Contact Button Container - Centered below main buttons */
.contact-button-container {
    display: flex;
    justify-content: center;
    max-width: 680px;
    width: 100%;
    padding: 0 20px;
    margin-top: 24px;
}

.contact-button-container .big-button {
    width: 100%;
    max-width: 328px; /* Half of container width minus gap */
}

/* Responsive Grid */
@media (min-width: 768px) {
    .button-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    
    .contact-button-container {
        margin-top: 28px;
    }
    
    .contact-button-container .big-button {
        max-width: 326px; /* (680px - 28px gap) / 2 */
    }
}

@media (max-width: 767px) {
    .button-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-button-container {
        margin-top: 20px;
    }
    
    .contact-button-container .big-button {
        max-width: 100%;
    }
}

/* Big Buttons */
.big-button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-decoration: none;
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.02em;
    border-radius: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
    transition: all 0.4s var(--spring-smooth);
    box-shadow: var(--glass-shadow);
    animation: slideInScale 0.6s var(--spring-bounce) forwards;
    animation-delay: calc(var(--index, 0) * 0.1s);
}

.big-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s var(--spring-smooth);
}

.big-button:hover::before {
    left: 100%;
}

.big-button:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--glass-shadow-hover);
    border-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.big-button:active {
    transform: translateY(-4px) scale(0.98);
    transition: all 0.15s var(--spring-snappy);
}

.big-button:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.5);
    outline-offset: 4px;
    box-shadow: var(--glass-shadow-hover), 0 0 0 4px rgba(0, 0, 0, 0.05);
}

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

/* Contact Button */
#contact-button {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 500;
}

#contact-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glass-bg-hover);
    backdrop-filter: blur(30px);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s var(--spring-smooth);
}

#contact-button.open::after {
    opacity: 1;
}

#contact-button:hover {
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-8px) scale(1.03);
    background: var(--glass-bg-hover);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.message-icon {
    width: 18px;
    height: 18px;
    margin-left: 10px;
    transition: transform 0.3s var(--spring-bounce);
}

#contact-button:hover .message-icon {
    transform: rotate(12deg) scale(1.1);
}

/* Contact Form */
#contact-form-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

#contact-form-container.contact-form-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.contact-form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 36px;
    width: min(420px, 90vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

#contact-form-container.contact-form-visible .contact-form {
    transform: scale(1);
}

.close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: all 0.3s var(--spring-smooth);
}

.close-button:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    transform: scale(1.05);
}

.close-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.contact-form h2 {
    text-align: center;
    margin-bottom: 32px;
    font-weight: 500;
    font-size: 24px;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    transition: all 0.3s var(--spring-smooth);
    resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.3);
    background: var(--glass-bg-hover);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
    font-size: 15px;
    line-height: 1.5;
}

.send-button {
    width: 100%;
    padding: 16px 24px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.3s var(--spring-smooth);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.send-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s var(--spring-smooth);
}

.send-button:hover::before {
    left: 100%;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

.send-button:active {
    transform: translateY(0);
    transition: all 0.15s var(--spring-snappy);
}

.send-button:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.5);
    outline-offset: 2px;
}

/* Send button states */
.send-button.sending {
    background: #666;
    cursor: not-allowed;
    transform: scale(0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    color: transparent; /* Hide text but keep button size */
}

.send-button.sending::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.send-button.success {
    background: #10b981;
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
    color: transparent; /* Hide text, show checkmark */
}

.send-button.success::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: white;
    animation: checkmark 0.5s var(--spring-bounce);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes checkmark {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.2);
    transition: all 0.5s var(--spring-bounce);
    opacity: 0;
    max-width: 400px;
    text-align: center;
    scale: 0.8;
}

.notification:not(.hidden) {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    scale: 1;
}

.notification.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border-color: rgba(34, 197, 94, 0.3);
    color: #059669;
    box-shadow: 0 16px 64px rgba(34, 197, 94, 0.2);
}

.notification.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
    box-shadow: 0 16px 64px rgba(239, 68, 68, 0.2);
}

/* Footer */
.footer {
    padding: 32px 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-tertiary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    letter-spacing: 0.01em;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

/* Enhanced Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.6);
    outline-offset: 2px;
    transition: outline-color 0.2s ease;
}

/* 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;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(255, 255, 255, 0.95);
        --glass-bg-hover: rgba(255, 255, 255, 1);
        --glass-border: rgba(0, 0, 0, 0.2);
        --text-primary: #000000;
        --text-secondary: #000000;
        --text-tertiary: #333333;
    }
}

/* Button Animation Delays */
.big-button:nth-child(1) { --index: 0; }
.big-button:nth-child(2) { --index: 1; }
.big-button:nth-child(3) { --index: 2; }
.big-button:nth-child(4) { --index: 3; }
.big-button:nth-child(5) { --index: 4; }
.big-button:nth-child(6) { --index: 5; }
