/* ============================================
   Tats by Fayte — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: color-mix(in srgb, #1B4332 80%, white);
    color: #F5F0E8;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background: rgba(13, 33, 25, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(245, 240, 232, 0.05);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #F5F0E8 !important;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-headline {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CTA Buttons
   ============================================ */
.cta-primary {
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(27, 67, 50, 0.05), transparent);
    transition: left 0.5s ease;
}

.cta-primary:hover::before {
    left: 100%;
}

.cta-secondary {
    position: relative;
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: #F5F0E8;
    transition: width 0.5s ease;
}

.service-card:hover::after {
    width: 100%;
}

/* ============================================
   Section Eyebrows & Titles
   ============================================ */
.section-eyebrow {
    will-change: opacity, transform;
}

.section-title {
    will-change: opacity, transform;
}

/* ============================================
   Scroll Reveal Animations
   (progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }

    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .reveal[data-reveal="left"] {
        transform: translateX(-40px);
    }

    .reveal[data-reveal="right"] {
        transform: translateX(40px);
    }

    .reveal.visible {
        opacity: 1;
        transform: translate(0, 0);
    }

    /* Staggered children */
    .stagger-children .reveal[data-reveal] {
        transition-delay: calc(var(--stagger-index, 0) * 0.1s);
    }
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13, 33, 25, 0);
    transition: background 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(13, 33, 25, 0.15);
}

/* ============================================
   Quote Section
   ============================================ */
.quote-text {
    position: relative;
}

/* ============================================
   Contact Form
   ============================================ */
.contact-form-wrapper {
    position: relative;
}

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

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

#mobileMenu.open .mobile-link {
    animation: mobileLinkIn 0.4s ease forwards;
    animation-delay: calc(var(--link-index, 0) * 0.08s);
    opacity: 0;
}

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

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

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(8px);
    }
}

/* ============================================
   Form Focus States
   ============================================ */
input::placeholder,
textarea::placeholder {
    color: #b7d0b7;
}

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

::-webkit-scrollbar-track {
    background: #F5F0E8;
}

::-webkit-scrollbar-thumb {
    background: #1B4332;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a5c2a;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.75rem;
    }

    .hero-headline br {
        display: none;
    }

    .hero-headline::after {
        content: '.';
    }

    .section-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 769px) {
    .hero-headline br {
        display: block;
    }
}

/* ============================================
   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;
    }
}
