/* ============================================
   K. Perkins Contracting — Custom Styles
   Bold Editorial | Navy + Gold
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #d4a853;
    color: #0a1628;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #d4a853;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f0c64d;
}

/* ---- Hero Animations (above fold — always visible) ---- */
.hero-anim {
    opacity: 1;
    animation: heroFadeUp 0.8s ease-out forwards;
}

.hero-anim:nth-child(2) { animation-delay: 0.15s; }
.hero-anim:nth-child(3) { animation-delay: 0.3s; }
.hero-anim:nth-child(4) { animation-delay: 0.45s; }
.hero-anim:nth-child(5) { animation-delay: 0.6s; }
.hero-anim:nth-child(6) { animation-delay: 0.75s; }

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

/* ---- Scroll Reveal (below fold only) ---- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Reduced motion — content always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    .hero-anim {
        animation: none;
        opacity: 1;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ---- Navbar Transition ---- */
#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(212, 168, 83, 0.15);
}

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

/* ---- Mobile Menu ---- */
#mobile-menu.open {
    transform: translateX(0);
}

.mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ---- Form Select Arrow ---- */
select {
    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='%23d4a853' 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;
}

/* ---- Button Focus States ---- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d4a853;
    outline-offset: 2px;
}

/* ---- Service Card Hover Enhancement ---- */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* ---- Image Aspect Ratio Utilities ---- */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}
.aspect-\[4\/5\] {
    aspect-ratio: 4 / 5;
}

/* ---- Gold Gradient Accent ---- */
.gold-gradient {
    background: linear-gradient(135deg, #d4a853 0%, #f0c64d 50%, #c49a3f 100%);
}

/* ---- Subtle Card Hover ---- */
.bg-navy-50 {
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

/* ---- Gallery Item ---- */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* ---- Loading State for Form ---- */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
