/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light, #fafaf9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loading-logo {
    width: 120px;
    height: auto;
    animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.loading-progress-container {
    width: 200px;
    height: 4px;
    background: rgba(139, 115, 85, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color, #8b7355), var(--accent-gold, #d4af37));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

:root {
    --primary-color: #8b7355;
    --secondary-color: #6b5d52;
    --accent-gold: #d4af37;
    --bg-light: #fafaf9;
    --bg-white: #ffffff;
    --text-dark: #2d2d2d;
    --text-muted: #6b7280;
    --border-light: #e5e5e5;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    letter-spacing: -0.01em;
    transition: background-color 1.5s ease, color 1.5s ease;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.6rem 0.9rem;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
    z-index: 10001;
}

.skip-link:focus {
    transform: translateY(0);
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Elegant Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
}

.particle {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: floatSubtle 25s infinite ease-in-out;
}

@keyframes floatSubtle {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-50vh) scale(1.5);
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    z-index: 100;
    background: transparent;
    transition: opacity 0.3s ease;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.header-logo {
    width: 45px;
    height: 45px;
    transition: transform 0.3s ease;
    opacity: 0.9;
}

.header-logo:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* Hero Section */
/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: var(--bg-white);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease, background-color 1.5s ease, border-color 1.5s ease, color 1.5s ease;
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.accessibility-toggle-button {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.8rem 1.2rem;
    min-height: 44px;
    border-radius: 999px;
    border: 2px solid var(--primary-color);
    background: var(--bg-white);
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease, background-color 1.5s ease, border-color 1.5s ease, color 1.5s ease;
    z-index: 996;
}

.accessibility-toggle-button.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(1rem);
}

.accessibility-toggle-button:hover,
.accessibility-toggle-button:focus-visible {
    transform: translateX(-50%) scale(1.05);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: var(--bg-white);
    outline: none;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: var(--bg-white);
}

.sun-icon,
.moon-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: rotate(-180deg);
}

body.dark-mode .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

body.dark-mode .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Dark Mode Styles */
body.dark-mode {
    --bg-light: #1a1a1a;
    --bg-white: #0f0f0f;
    --text-dark: #ffffff;
    --text-muted: #a0a0a0;
    --border-light: #2a2a2a;
}

body.dark-mode .header {
    background: linear-gradient(to bottom, rgba(15, 15, 15, 0.95), rgba(15, 15, 15, 0));
}

body.dark-mode .hero-section {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
}

body.dark-mode .footer {
    background: #0f0f0f;
    border-top-color: #2a2a2a;
}

body.dark-mode .footer-bottom {
    border-top-color: #2a2a2a;
}

body.dark-mode .hero-section::before,
body.dark-mode .hero-section::after {
    display: none;
}

/* Accessibility Panel */
.accessibility-panel {
    position: fixed;
    right: -360px;
    top: 0;
    width: 360px;
    max-width: 100%;
    height: 100vh;
    background: var(--bg-white);
    border-left: 2px solid var(--border-light);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.25s ease, opacity 0.25s ease;
    padding: 2rem 1.5rem;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: none;
}

.accessibility-panel.open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    right: 0;
}

body.dark-mode .accessibility-panel {
    background: var(--bg-white);
    border-left-color: var(--border-light);
}

.accessibility-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.accessibility-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.accessibility-close {
    background: transparent;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001 !important;
    position: relative;
    pointer-events: auto;
    margin: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.accessibility-close:hover {
    opacity: 0.7;
}

.accessibility-close:active {
    opacity: 0.5;
}

.accessibility-section {
    margin-bottom: 2rem;
}

.accessibility-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.accessibility-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.accessibility-option:hover {
    background: rgba(139, 115, 85, 0.1);
}

.accessibility-option-label {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
    flex: 1;
}

.accessibility-help {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex: 0 0 auto;
}

.accessibility-help::before {
    content: 'i';
    font-weight: 700;
}

.accessibility-help:hover,
.accessibility-help:focus-visible {
    border-color: var(--primary-color);
    color: var(--primary-color);
    outline: none;
}

.accessibility-help::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-100%, -50%);
    background: var(--text-dark);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: normal;
    max-width: 250px;
    word-wrap: break-word;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10002;
}

.accessibility-help:hover::after,
.accessibility-help:focus-visible::after {
    opacity: 1;
}

.accessibility-shortcuts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.accessibility-shortcuts li {
    background: var(--bg-light);
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.accessibility-toggle {
    width: 72px;
    height: 44px;
    background: var(--border-light);
    border: none;
    border-radius: 22px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease;
}

.accessibility-toggle:disabled,
.accessibility-toggle.is-disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.accessibility-toggle:disabled::after,
.accessibility-toggle.is-disabled::after {
    background: #f0f0f0;
}

.accessibility-toggle.active {
    background: var(--primary-color);
}

.accessibility-toggle::after {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    top: 4px;
    left: 4px;
    transition: left 0.3s ease;
}

.accessibility-toggle.active::after {
    left: 32px;
}

.accessibility-select {
    padding: 0.5rem 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.accessibility-select:hover {
    border-color: var(--primary-color);
}

.accessibility-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

a.keyboard-hover,
button.keyboard-hover,
.cta-button.keyboard-hover,
.accessibility-toggle.keyboard-hover,
.accessibility-select.keyboard-hover {
    outline: 3px dashed var(--primary-color);
    outline-offset: 3px;
}

.accessibility-keyboard-hint {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.accessibility-keyboard-hint.show {
    opacity: 1;
}

.tts-controls {
    display: none;
    margin-top: 0.75rem;
}

.tts-controls.active {
    display: block;
}

.tts-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tts-action-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    min-height: 44px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.tts-action-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.tts-action-btn:active {
    transform: translateY(0);
}

.voice-controls {
    display: none;
    margin-top: 0.75rem;
}

.voice-controls.active {
    display: block;
}

.voice-status {
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 6px;
    text-align: center;
    margin-bottom: 0.75rem;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.voice-status.listening {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent-gold);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.voice-status-text {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.voice-status.listening .voice-status-text {
    color: var(--accent-gold);
}

.voice-commands-info {
    padding: 0.75rem;
    background: rgba(139, 115, 85, 0.05);
    border-radius: 6px;
    margin-top: 0.75rem;
}

.voice-commands-info p {
    line-height: 1.5;
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin-top: 0;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    transition: background 1.5s ease;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatGentle 20s ease-in-out infinite;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 115, 85, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatGentle 15s ease-in-out infinite reverse;
    z-index: 1;
}

@keyframes floatGentle {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, 30px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

main {
    transition: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

body.accessibility-panel-open main {
    padding-right: 0;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
    box-shadow: var(--shadow-md);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-dark);
    animation: titleReveal 1s ease-out 0.2s both;
}

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

.hero-description {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.4s both;
}

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

/* CTA Buttons */
.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.25rem;
    min-height: 44px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
    color: white;
    box-shadow: var(--shadow-md);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.trust-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trust-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}



/* Footer */
.footer {
    position: relative;
    z-index: 2;
    background: var(--bg-white);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--border-light);
    transition: background-color 1.5s ease, border-color 1.5s ease;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
    opacity: 0.9;
}

.footer-logo:hover {
    transform: scale(1.05);
    opacity: 1;
}

.footer-brand-name {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.footer-nav-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 0.875rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
    font-size: 0.9375rem;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 1.5rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1.2rem;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .cta-group {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 3rem;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
    }
    
    .trust-indicators {
        gap: 2rem;
    }
    
    .trust-number {
        font-size: 1.5rem;
    }
    
    .trust-label {
        font-size: 0.75rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .footer-brand {
        justify-content: center;
        flex-direction: column;
    }
    
    .footer-links {
        text-align: center;
    }
}

/* Page Load Animation */
body {
    animation: pageLoad 0.5s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
