:root {
    --bg: #0a1628;
    --bg-light: #0f2744;
    --fg: #f8fafc;
    --muted: #94a3b8;
    --accent: #4fd1c5;
    --accent-hover: #38bdf8;
    --card: rgba(15, 39, 68, 0.8);
    --border: rgba(79, 209, 197, 0.2);
    --glass-shine: rgba(255, 255, 255, 0.05);
}

body.day-mode {
    --bg: #e0f7fa;
    --bg-light: #b2ebf2;
    --fg: #0a1628;
    --muted: #37474f;
    --accent: #00acc1;
    --accent-hover: #015e91;
    --card: rgba(255, 255, 255, 0.65);
    --border: rgba(0, 172, 193, 0.3);
    --glass-shine: rgba(255, 255, 255, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
    transition: background 1.5s ease, color 0.5s ease;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

.ocean-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
    background: linear-gradient(180deg, #E0F7FA 0%, #B2EBF2 40%, #80DEEA 70%, #4DD0E1 100%);
}

body.day-mode .ocean-bg {
    opacity: 1;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    opacity: 0.7;
    animation: rise 12s infinite ease-in;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body:not(.day-mode) .bubble {
    display: none;
}

@keyframes rise {
    0% { bottom: -100px; transform: translateX(0) scale(1); opacity: 0; }
    20% { opacity: 0.7; }
    50% { transform: translateX(25px) scale(1.1); }
    80% { opacity: 0.5; }
    100% { bottom: 110%; transform: translateX(-25px) scale(0.9); opacity: 0; }
}

body:not(.day-mode) {
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

body.day-mode .stars {
    display: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle 5s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.8; box-shadow: 0 0 5px rgba(255,255,255,0.5); }
}

.wave-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, transparent, rgba(79, 209, 197, 0.05));
    pointer-events: none;
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
    color: var(--muted);
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--fg);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--border);
    color: var(--fg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent);
    color: var(--bg);
    transform: scale(1.1);
}

.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }

body.day-mode .theme-icon-sun { display: block; }
body.day-mode .theme-icon-moon { display: none; }

.hero-gradient {
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 209, 197, 0.15), transparent), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(56, 189, 248, 0.1), transparent), linear-gradient(180deg, var(--bg) 0%, var(--bg-light) 100%);
}

.glass-card {
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    overflow: hidden; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.glass-zoom {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s cubic-bezier(0.25, 0. 46, 0.45, 0.94);
    will-change: transform, box-shadow;
}

.glass-zoom:hover {
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 20;
    border-color: var(--accent);
}

.glass-zoom img {
    transition: transform 0.6s ease;
}

.glass-zoom:hover img {
    transform: scale(1.08);
}

.glass-zoom:hover h2, 
.glass-zoom:hover h3, 
.glass-zoom:hover h4,
.glass-zoom:hover p {
    transform: scale(1.02); 
    transition: transform 0.4s ease, color 0.3s ease;
}

.glass-zoom:hover .text-aqua,
.glass-zoom:hover .stat-number {
    text-shadow: 0 0 15px rgba(79, 209, 197, 0.6);
}

.section-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item {
    opacity: 0;
    transform: translateY(30px);
}

.stagger-item.visible {
    animation: stagger-in 0.6s ease forwards;
}

@keyframes stagger-in {
    to { opacity: 1; transform: translateY(0); }
}

.btn-primary {
    position: relative;
    background: linear-gradient(135deg, var(--accent), #0d9488);
    color: #fff;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 209, 197, 0.3);
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(79, 209, 197, 0.5);
}

.btn-secondary {
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(79, 209, 197, 0.1);
    transform: translateY(-2px);
}

.img-placeholder {
    background: linear-gradient(135deg, rgba(79, 209, 197, 0.1), rgba(56, 189, 248, 0.05));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
    position: relative;
}

.img-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(79, 209, 197, 0.1) 50%, transparent 60%);
    animation: shimmer 2s infinite;
    z-index: 2; 
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.img-placeholder img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-fallback {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--muted);
    opacity: 0.5;
    padding: 2rem;
    position: absolute;
    inset: 0;
    z-index: 5;
}

.img-placeholder.has-error img { display: none; }
.img-placeholder.has-error .img-fallback { display: flex; }

.floating-btn {
    position: fixed;
    z-index: 100;
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    color: var(--fg);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-btn:hover {
    background: var(--accent);
    color: var(--bg);
    transform: scale(1.1) rotate(-10deg);
}

.scroll-top {
    bottom: 100px;
    right: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.email-btn {
    bottom: 40px;
    right: 24px;
}

.social-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 10px;
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 16px 16px 0;
}

.social-sidebar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(79, 209, 197, 0.1);
    color: var(--accent);
    transition: all 0.3s ease;
}

.social-sidebar a:hover {
    background: var(--accent);
    color: white;
    transform: translateX(5px) scale(1.1);
    box-shadow: 0 0 15px var(--accent);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(79, 209, 197, 0.1);
    border: 1px solid var(--border);
    color: var(--accent);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -8px rgba(79, 209, 197, 0.4);
}

/* ============================================================
   NUCLEAR FIX FOR MOBILE MENU
   ============================================================ */

/* 1. TOGGLE BUTTON (Hamburger) */
#menuToggle {
    background: var(--card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--fg);
    transition: all 0.3s ease;
    z-index: 10000; 
}
#menuToggle:hover, #menuToggle:focus {
    border-color: var(--accent);
    color: var(--accent);
}

/* 2. MENU CONTAINER */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 9999 !important; 
    
    /* FORCED BACKGROUND COLORS */
    background-color: #0a1628 !important; /* Night Mode */
    backdrop-filter: blur(20px);
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Day Mode Background */
body.day-mode .mobile-menu {
    background-color: #e0f7fa !important;
}

.mobile-menu.open {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 3. LINKS WRAPPER */
.mobile-menu-content {
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
    width: 100%;
    max-width: 100%;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem; 
}

.mobile-menu.open .mobile-menu-content {
    transform: translateY(0);
}

/* 4. THE LINKS (TEXT) - SPECIFICITY OVERLOAD */
/* We use a+ to override any inherited classes like hover:text-aqua */
div.mobile-menu-content > a.mobile-nav-link {
    text-decoration: none !important;
    font-size: 2rem !important; /* Large font to be sure it's there */
    line-height: 1.5 !important;
    font-family: 'Playfair Display', serif !important;
    font-weight: 700 !important;
    display: block !important;
    padding: 15px !important;
    
    /* Text Shadow */
    text-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;
    transition: color 0.3s ease, transform 0.2s ease !important;
}

/* Default (Night Mode) - White Text */
div.mobile-menu-content > a.mobile-nav-link {
    color: #ffffff !important; 
}

/* Day Mode - Dark Text */
body.day-mode div.mobile-menu-content > a.mobile-nav-link {
    color: #0a1628 !important;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8) !important;
}

/* Hover State - Always Aqua */
div.mobile-menu-content > a.mobile-nav-link:hover {
    color: #4fd1c5 !important;
    transform: scale(1.1) !important;
    text-decoration: none !important; /* Force underline removal */
}

/* Small Screen Adjustment */
@media (max-width: 480px) {
    div.mobile-menu-content > a.mobile-nav-link {
        font-size: 1.5rem !important; 
    }
}

/* 5. CLOSE BUTTON */
#closeMenu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Default (Night Mode) - Light X */
    color: #ffffff !important;
    
    transition: all 0.3s ease;
    z-index: 10001;
}

/* Day Mode - Dark X */
body.day-mode #closeMenu {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
    color: #0a1628 !important;
}

#closeMenu:hover {
    background: var(--accent);
    color: #ffffff !important;
    border-color: var(--accent);
    transform: rotate(90deg);
}

/* 6. CONTACT BUTTON INSIDE MENU */
.mobile-menu .btn-primary {
    background: linear-gradient(135deg, var(--accent), #0d9488) !important;
    color: #ffffff !important;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(79, 209, 197, 0.4);
    padding: 0.75rem 2rem !important;
}

/* END NUCLEAR FIX */
/* ============================================================ */

.stat-number {
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), transparent);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent);
}

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    background: linear-gradient(135deg, var(--fg), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.hero-content-wrapper {
    position: relative;
    z-index: 10;
}

.hero-section-inner {
    padding-bottom: 280px;
}

.scrolled-header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #e0f2fe !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

body:not(.day-mode) .scrolled-header {
    background: rgba(10, 22, 40, 0.95) !important;
    border-bottom: 1px solid rgba(79, 209, 197, 0.1) !important;
}

.scrolled-header .logo-text {
    color: #0a1628;
    background: linear-gradient(135deg, #0a1628, #0ca5eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scrolled-header .nav-link {
    color: #334155;
}

.scrolled-header .nav-link:hover, .scrolled-header .nav-link.active {
    color: #0ca5eb;
}

.header-wave {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23ffffff'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    opacity: 0;
    transition: opacity 0.3s;
}

.scrolled-header .header-wave { opacity: 1; }

body:not(.day-mode) .header-wave {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%230a1628'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
}

.form-input {
    background-color: var(--card);
    color: var(--fg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 209, 197, 0.2);
}

.form-input::placeholder {
    color: var(--muted);
    opacity: 0.8;
}

.form-input.input-error {
    border-color: #f87171;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}

select.form-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234fd1c5' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

#neuralPondCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.cookie-banner {
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--card);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    transition: bottom 0.5s ease;
    padding: 1rem;
}

.cookie-banner.show { bottom: 0; }

.cookie-banner-inner {
    max-width: 768px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-text {
    font-size: 0.875rem;
    color: var(--muted);
    flex: 1;
    min-width: 200px;
}

.cookie-text a { color: var(--accent); text-decoration: underline; }

.cookie-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.cookie-accept {
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.cookie-accept:hover { opacity: 0.9; }

.cookie-decline {
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.cookie-decline:hover {
    border-color: var(--accent);
    color: var(--fg);
}

.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.legal-modal.open {
    opacity: 1;
    visibility: visible;
}

.legal-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.legal-modal-content {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 640px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.legal-modal.open .legal-modal-content { transform: translateY(0); }

.legal-modal-body h3 {
    color: var(--fg);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-modal-body p { margin-bottom: 0.75rem; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (max-width: 768px) {
    .social-sidebar { display: none; }
    .hero-section-inner { padding-bottom: 320px; }
    .cookie-banner-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}