/* ─── Custom Properties ─── */
:root {
    --color-teal-50: #f0fdfa;
    --color-teal-100: #ccfbf1;
    --color-teal-400: #2dd4bf;
    --color-teal-500: #14b8a6;
    --color-teal-600: #0d9488;
    --color-teal-700: #0f766e;
    --color-teal-800: #115e59;
    --color-teal-900: #134e4a;
    --color-teal-950: #042f2e;
    --color-slate-900: #0f172a;
    --color-slate-950: #020617;
    
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
}

/* ─── Base Reset & Typography ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    overflow-x: hidden;
}

/* ─── Navbar ─── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-text {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: rgba(255, 255, 255, 0.85);
}

/* ─── Mobile Menu ─── */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ─── Hero Animations ─── */
.hero-orb {
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 { animation-delay: 0s; }
.orb-2 { animation-delay: -7s; }
.orb-3 { animation-delay: -14s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 30px) scale(1.02); }
}

.hero-eyebrow {
    opacity: 0;
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-headline {
    opacity: 0;
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-subtitle {
    opacity: 0;
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-ctas {
    opacity: 0;
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-scroll {
    opacity: 0;
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 1.2s;
}

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

/* ─── Section Labels & Titles ─── */
.section-label {
    display: block;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-serif);
}

.section-desc {
    line-height: 1.7;
}

/* ─── Service Cards ─── */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    border: 1px solid transparent;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before {
    border-color: rgba(20, 184, 166, 0.3);
}

/* ─── Gallery ─── */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4, 47, 46, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 0.5rem;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ─── Reveal Animations (progressive enhancement) ─── */
.reveal-section {
    /* Default state: fully visible — JS adds animation class */
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-section {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal-section.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Form Styles ─── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-slate-950);
}

::-webkit-scrollbar-thumb {
    background: var(--color-teal-800);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal-700);
}

/* ─── Selection ─── */
::selection {
    background: rgba(13, 148, 136, 0.3);
    color: var(--color-teal-50);
}

/* ─── Responsive ─── */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.75rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .hero-headline {
        font-size: 5.5rem;
    }
}
