/* ========================================
   NuCO2 — Custom Styles
   Bold Editorial | Teal & Slate Grey
   ======================================== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #0f766e;
    color: #ffffff;
}

/* ========================================
   Navigation
   ======================================== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #2dd4bf;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #ffffff;
}

/* Navbar scroll state */
nav.scrolled {
    background-color: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: 12px;
    padding-bottom: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-text {
    color: #ffffff;
}

/* Mobile Menu */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

.mobile-link {
    position: relative;
    padding-left: 0;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background-color: #2dd4bf;
    transition: width 0.3s ease;
}

.mobile-link:hover::before {
    width: 8px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-eyebrow {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

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

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

.hero-cta {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.8s;
}

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

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

/* ========================================
   Scroll Reveal Animations
   Gated behind prefers-reduced-motion
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    .reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Ensure content is visible without JS */
.no-js .reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Service Cards
   ======================================== */
.group:hover .group-hover\:text-teal-400 {
    color: #5eead4;
}

/* ========================================
   Buttons & Interactive Elements
   ======================================== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* ========================================
   Form Styles
   ======================================== */
input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ========================================
   Accessibility: Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    nav,
    #contact,
    .hero-scroll,
    .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #0f766e;
    }
}
