/* ===== Custom Styles for Metz & McCaw CPA ===== */

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

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

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

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

.nav-text {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: #1B4332;
}

#navbar.scrolled .nav-link {
    color: #1B4332;
}

#navbar.scrolled .nav-link:hover {
    color: #D4A843;
}

/* ===== Hero Animations ===== */
.hero-badge {
    animation: fadeInDown 0.8s ease forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

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

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

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

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

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

/* ===== Geometric Shapes ===== */
.geo-shape {
    position: absolute;
    opacity: 0.1;
}

.shape-circle-1 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: #D4A843;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-circle-2 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #FEF9C3;
    bottom: 10%;
    left: 5%;
    animation: float 6s ease-in-out infinite reverse;
}

.shape-square-1 {
    width: 150px;
    height: 150px;
    background: #D4A843;
    top: 30%;
    left: 10%;
    transform: rotate(45deg);
    animation: spin 20s linear infinite;
}

.shape-square-2 {
    width: 80px;
    height: 80px;
    background: #FEF9C3;
    bottom: 20%;
    right: 15%;
    transform: rotate(30deg);
    animation: spin 15s linear infinite reverse;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid #D4A843;
    top: 60%;
    right: 8%;
    animation: float 7s ease-in-out infinite;
}

.shape-diamond-1 {
    width: 60px;
    height: 60px;
    background: #FEF9C3;
    top: 20%;
    left: 20%;
    transform: rotate(45deg);
    animation: spin 12s linear infinite;
}

.shape-ring-1 {
    width: 120px;
    height: 120px;
    border: 3px solid #D4A843;
    border-radius: 50%;
    bottom: 30%;
    left: 25%;
    animation: float 9s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

/* ===== Section Styles ===== */
.section-label {
    letter-spacing: 0.15em;
}

.section-title {
    line-height: 1.2;
}

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

/* ===== Service Cards ===== */
.service-card {
    perspective: 1000px;
}

.service-card .service-icon {
    transition: all 0.3s ease;
}

/* ===== 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(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

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

.cta-secondary {
    backdrop-filter: blur(10px);
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

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

/* ===== Back to Top ===== */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: auto;
}

#backToTop:not(.visible) {
    transform: translateY(20px);
}

/* ===== Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .shape-circle-1 {
        width: 250px;
        height: 250px;
    }

    .shape-circle-2 {
        width: 120px;
        height: 120px;
    }

    .shape-square-1 {
        width: 80px;
        height: 80px;
    }

    .shape-square-2 {
        width: 50px;
        height: 50px;
    }

    .shape-triangle-1 {
        border-left: 40px solid transparent;
        border-right: 40px solid transparent;
        border-bottom: 69px solid #D4A843;
    }

    .shape-diamond-1 {
        width: 40px;
        height: 40px;
    }

    .shape-ring-1 {
        width: 80px;
        height: 80px;
    }
}

/* ===== Print Styles ===== */
@media print {
    #navbar,
    #backToTop,
    .geo-shape,
    .scroll-indicator {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .bg-forest-500 {
        background: #1B4332 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

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

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
