/* ============================================
   INNER SAGE — Custom Styles
   Bold Editorial | Midnight Blue + Mint
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(52, 184, 154, 0.3);
    color: #f0f4f8;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #102a43;
}
::-webkit-scrollbar-thumb {
    background: #243b53;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334e68;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #34b89a 0%, #1e9c80 100%);
    color: #0a1628;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(52, 184, 154, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(52, 184, 154, 0.35);
    background: linear-gradient(135deg, #5ecfb2 0%, #34b89a 100%);
}

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

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: #d9e2ec;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    border: 1.5px solid rgba(161, 179, 200, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
    border-color: rgba(52, 184, 154, 0.6);
    color: #5ecfb2;
    background: rgba(52, 184, 154, 0.08);
    transform: translateY(-2px);
}

/* ---------- Navbar ---------- */
#navbar {
    background: rgba(10, 22, 40, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(36, 59, 83, 0.5);
}

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #34b89a;
    transition: width 0.3s ease;
}

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

/* ---------- Mobile Menu ---------- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-nav-link {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 1;
}

#mobile-menu .mobile-nav-link {
    opacity: 0;
}

#mobile-menu .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }

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

/* Mobile menu button states */
.menu-btn-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-btn-active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn-active .menu-line:nth-child(3) {
    width: 100%;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero Animations ---------- */
.hero-eyebrow {
    animation: heroFadeIn 0.8s ease 0.2s both;
}

.hero-title {
    animation: heroFadeIn 0.8s ease 0.4s both;
}

.hero-subtitle {
    animation: heroFadeIn 0.8s ease 0.6s both;
}

.hero-cta {
    animation: heroFadeIn 0.8s ease 0.8s both;
}

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

/* Scroll indicator */
.scroll-indicator {
    animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* ---------- Service Cards ---------- */
.service-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ---------- Gallery Items ---------- */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

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

/* ---------- Scroll Reveal ---------- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default visible state for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal:not(.revealed) {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Form Styles ---------- */
select option {
    background: #102a43;
    color: #d9e2ec;
}

input:focus, textarea:focus, select:focus {
    outline: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
    
    #hero h1 {
        font-size: 3.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.75rem;
    }
}

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