/* ============================================
   Tax Preparation By Deborah — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Selection --- */
::selection {
    background: #c9a227;
    color: #0f1c3f;
}

/* --- Navbar --- */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 28, 63, 0.08);
}

.nav-logo-text,
.nav-logo-color {
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #0f1c3f;
}

#navbar.scrolled .nav-logo-color {
    stroke: #0f1c3f;
}

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

#navbar.scrolled .nav-subtitle-text {
    color: #0f1c3f;
}

.nav-link {
    position: relative;
}

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

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

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

/* --- Mobile Menu --- */
#mobile-menu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
    transform: translateX(4px);
}

/* --- Hero Animations --- */
.hero-tagline {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

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

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

.hero-ctas {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.8s;
}

.hero-trust {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 1s;
}

.hero-image-wrapper {
    animation: fadeScale 1s ease forwards;
    opacity: 0;
}

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

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Scroll Indicator --- */
.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* --- Section Headers --- */
.section-tag {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}

.section-line {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

/* --- Services Grid --- */
.services-grid {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.service-card {
    transition: background-color 0.5s ease;
}

/* --- About Section --- */
.about-tag,
.about-title,
.about-line,
.about-paragraph {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.about-paragraph:nth-child(1) { transition-delay: 0.1s; }
.about-paragraph:nth-child(2) { transition-delay: 0.2s; }
.about-paragraph:nth-child(3) { transition-delay: 0.3s; }

.about-value {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.about-value:nth-child(1) { transition-delay: 0.3s; }
.about-value:nth-child(2) { transition-delay: 0.4s; }

/* --- Why Section --- */
.why-tag,
.why-title,
.why-line,
.why-intro,
.why-stats-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.why-stats-card { transition-delay: 0.2s; }

.feature-item {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* --- Testimonial --- */
.testimonial-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* --- Contact --- */
.contact-tag,
.contact-title,
.contact-line,
.contact-intro,
.contact-details {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-item {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.contact-form-wrapper {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* --- Footer --- */
.footer-text,
.footer-heading,
.footer-link,
.footer-contact {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.footer-link:hover,
.footer-contact:hover {
    transform: translateX(4px);
}

/* --- Form Styles --- */
.form-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(15, 28, 63, 0.2);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: #0f1c3f;
    width: 100%;
    padding: 12px 0;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input::placeholder {
    color: rgba(15, 28, 63, 0.2);
}

.form-input:focus {
    border-bottom-color: #c9a227;
}

.form-submit {
    position: relative;
    overflow: hidden;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.form-submit:hover::before {
    left: 100%;
}

/* --- CTA Buttons --- */
.cta-primary {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 28, 63, 0.2);
}

.cta-secondary {
    transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.cta-secondary:hover {
    transform: translateY(-2px);
}

/* --- Intersection Observer Active State --- */
.animate-in .section-tag,
.animate-in .section-title,
.animate-in .section-line,
.animate-in .about-tag,
.animate-in .about-title,
.animate-in .about-line,
.animate-in .about-paragraph,
.animate-in .about-value,
.animate-in .why-tag,
.animate-in .why-title,
.animate-in .why-line,
.animate-in .why-intro,
.animate-in .why-stats-card,
.animate-in .contact-tag,
.animate-in .contact-title,
.animate-in .contact-line,
.animate-in .contact-intro,
.animate-in .contact-details,
.animate-in .contact-form-wrapper,
.animate-in .testimonial-content {
    opacity: 1;
    transform: translateY(0) translateX(0) scaleX(1);
}

.services-grid.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* --- Feature items stagger --- */
.feature-item:nth-child(1) { transition-delay: 0.1s; }
.feature-item:nth-child(2) { transition-delay: 0.2s; }
.feature-item:nth-child(3) { transition-delay: 0.3s; }
.feature-item:nth-child(4) { transition-delay: 0.4s; }

/* --- Contact items stagger --- */
.contact-item:nth-child(1) { transition-delay: 0.1s; }
.contact-item:nth-child(2) { transition-delay: 0.2s; }
.contact-item:nth-child(3) { transition-delay: 0.3s; }

/* --- Footer stagger --- */
.footer-text { transition-delay: 0.1s; }
.footer-heading:nth-of-type(1) { transition-delay: 0.15s; }
.footer-heading:nth-of-type(2) { transition-delay: 0.2s; }
.footer-heading:nth-of-type(3) { transition-delay: 0.25s; }

.footer-link:nth-child(1) { transition-delay: 0.2s; }
.footer-link:nth-child(2) { transition-delay: 0.25s; }
.footer-link:nth-child(3) { transition-delay: 0.3s; }
.footer-link:nth-child(4) { transition-delay: 0.35s; }

.footer-contact:nth-child(1) { transition-delay: 0.3s; }
.footer-contact:nth-child(2) { transition-delay: 0.35s; }
.footer-contact:nth-child(3) { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 767px) {
    .hero-image-wrapper {
        margin-top: 2rem;
    }
    
    .hero-image-main img {
        height: 400px;
    }
    
    .hero-accent-card {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 1rem;
        display: inline-block;
    }
    
    .section-title {
        font-size: 2.5rem !important;
    }
    
    .about-image-wrapper img {
        height: 350px !important;
    }
    
    .why-stats-card {
        margin-top: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-image-main img {
        height: 500px;
    }
}

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