/* ===================================
   McMonigle Vesely & Perego
   Real Estate — Custom Styles
   =================================== */

/* ── Reset & Base ── */
*, *::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;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* ── Hero Gradient ── */
.hero-gradient {
    background: linear-gradient(
        135deg,
        #022c22 0%,
        #064e3b 20%,
        #047857 40%,
        #065f46 60%,
        #022c22 80%,
        #064e3b 100%
    );
}

/* ── Hero Pattern ── */
.hero-pattern {
    background-image: url('data:image/svg+xml,%3Csvg width=\'80\' height=\'80\' viewBox=\'0 0 80 80\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cg fill=\'none\' fill-rule=\'evenodd\'%3E%3Cg fill=\'%23ffffff\' fill-opacity=\'0.3\'%3E%3Cpath d=\'M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z\'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

/* ── Hero Animations ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Hero Decorative Elements ── */
.hero-deco {
    animation: float 8s ease-in-out infinite;
}

.hero-deco-1 {
    animation-delay: 0s;
}

.hero-deco-2 {
    animation-delay: 2s;
}

.hero-deco-3 {
    animation-delay: 4s;
    animation: pulse-dot 4s ease-in-out infinite;
}

.hero-deco-4 {
    animation-delay: 1s;
    animation: pulse-dot 5s ease-in-out infinite;
}

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

@keyframes pulse-dot {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.5); }
}

/* ── Scroll Indicator ── */
.scroll-line {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: scroll-down 2s ease-in-out infinite;
}

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

/* ── Navigation ── */
.nav-logo-text,
.nav-logo-sub {
    color: rgba(254, 253, 248, 0.9);
    transition: color 0.3s ease;
}

.nav-link {
    color: rgba(254, 253, 248, 0.7);
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link:hover {
    color: rgba(254, 253, 248, 1);
}

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

.nav-link-cta {
    color: rgba(254, 253, 248, 0.8) !important;
    border-color: rgba(254, 253, 248, 0.4) !important;
    transition: all 0.3s ease !important;
}

.nav-link-cta:hover {
    border-color: rgba(254, 253, 248, 0.8) !important;
    background: rgba(254, 253, 248, 0.1) !important;
}

/* Scrolled state */
.nav-scrolled .nav-logo-text,
.nav-scrolled .nav-logo-sub {
    color: #064e3b;
}

.nav-scrolled .nav-link {
    color: rgba(6, 78, 59, 0.7);
}

.nav-scrolled .nav-link:hover {
    color: #064e3b;
}

.nav-scrolled .nav-link-cta {
    color: #064e3b !important;
    border-color: rgba(6, 78, 59, 0.4) !important;
}

.nav-scrolled .nav-link-cta:hover {
    background: #064e3b !important;
    color: #fefdf8 !important;
    border-color: #064e3b !important;
}

/* ── Mobile Menu ── */
.menu-line {
    display: block;
    width: 20px;
    height: 1px;
    background: currentColor;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.menu-line:nth-child(1) { top: 8px; }
.menu-line:nth-child(2) { top: 50%; transform: translate(-50%, -50%); }
.menu-line:nth-child(3) { bottom: 8px; }

#menu-btn.active .menu-line:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    bottom: 50%;
    transform: translate(-50%, 50%) rotate(-45deg);
}

.mobile-nav-link {
    color: #064e3b;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: #047857;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fefdf8;
    color: #064e3b;
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(254, 253, 248, 0.2), transparent);
    transition: left 0.5s ease;
}

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

.btn-primary:hover {
    background: #d1fae5;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(254, 253, 248, 0.8);
    border: 1px solid rgba(254, 253, 248, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: rgba(254, 253, 248, 0.7);
    color: rgba(254, 253, 248, 1);
    background: rgba(254, 253, 248, 0.05);
}

/* Light buttons (for dark green backgrounds) */
.btn-light {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fefdf8;
    color: #064e3b;
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-light:hover {
    background: #d1fae5;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.btn-arrow-light {
    transition: transform 0.3s ease;
}

.btn-light:hover .btn-arrow-light {
    transform: translateX(4px);
}

.btn-outline-light {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(254, 253, 248, 0.8);
    border: 1px solid rgba(254, 253, 248, 0.3);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    border-color: rgba(254, 253, 248, 0.7);
    color: rgba(254, 253, 248, 1);
}

/* ── Section Labels ── */
.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.label-line {
    display: block;
    width: 32px;
    height: 1px;
    background: rgba(6, 78, 59, 0.3);
}

.label-text {
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-weight: 400;
    color: rgba(6, 78, 59, 0.6);
}

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

.service-card-inner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 2rem;
    height: 100%;
    transition: all 0.4s ease;
}

.service-card:hover .service-card-inner {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.service-icon {
    color: #6ee7b7;
    transition: color 0.3s ease;
}

.service-card:hover .service-icon {
    color: #34d399;
}

/* ── Neighborhood Cards ── */
.neighborhood-card {
    transition: transform 0.4s ease;
}

.neighborhood-card:hover {
    transform: translateY(-4px);
}

/* ── Testimonial Cards ── */
.testimonial-card {
    background: #fdf9f0;
    border: 1px solid rgba(6, 78, 59, 0.08);
    border-radius: 4px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    border-color: rgba(6, 78, 59, 0.15);
    box-shadow: 0 20px 60px rgba(6, 78, 59, 0.08);
}

/* ── Contact Icons ── */
.contact-icon {
    color: #047857;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Form Inputs ── */
.form-input,
.form-select,
.form-textarea {
    background: #fefdf8;
    border: 1px solid rgba(6, 78, 59, 0.15);
    border-radius: 2px;
    padding: 14px 16px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #064e3b;
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(6, 78, 59, 0.3);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #047857;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.08);
}

.form-select {
    appearance: none;
    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='%23064e3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ── Reveal on Scroll ── */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-label {
        justify-content: flex-start;
    }
    
    .label-line:first-child {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-headline {
        font-size: 2rem;
    }
    
    .hero-deco {
        display: none;
    }
}

/* ── Focus Visible ── */
*:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
}

/* ── Selection ── */
::selection {
    background: rgba(4, 120, 87, 0.15);
    color: #064e3b;
}
