/* ========================================
   ERNESTO BORUNDA JR. — REAL ESTATE
   Classic & Elegant Design System
======================================== */

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

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

body {
    overflow-x: hidden;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f3;
}
::-webkit-scrollbar-thumb {
    background: #d4a0a0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a11d3d;
}

/* ---------- Selection ---------- */
::selection {
    background: #fce7eb;
    color: #3d0c17;
}

/* ---------- Clip Paths ---------- */
.clip-diagonal {
    clip-path: polygon(30% 0%, 100% 0, 100% 100%, 0% 100%);
}

/* ---------- Navigation ---------- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(132, 29, 58, 0.08);
}

.nav-logo-color {
    color: #3d0c17;
}

.nav-sub-logo {
    color: rgba(161, 29, 58, 0.7);
}

/* Mobile menu states */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(6) { animation-delay: 0.3s; }

/* Menu button animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn.active .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(4px, -4px);
}

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

.hero-tag {
    animation: slideUp 0.8s ease 0.2s forwards;
}

.hero-line {
    animation: slideUp 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.hero-line:nth-child(1) { animation-delay: 0.3s; }
.hero-line:nth-child(2) { animation-delay: 0.45s; }
.hero-line:nth-child(3) { animation-delay: 0.6s; }

.hero-desc {
    animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-cta {
    animation: fadeUp 0.8s ease 1s forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ---------- About Section ---------- */
.about-tag {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
.about-tag.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease 0.1s;
}
.about-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.2s;
}
.about-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-stats {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.3s;
}
.about-stats.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Services ---------- */
.services-tag {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
.services-tag.visible {
    opacity: 1;
    transform: translateY(0);
}

.services-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease 0.1s;
}
.services-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}
.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ---------- Areas ---------- */
.areas-tag {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
.areas-tag.visible {
    opacity: 1;
    transform: translateY(0);
}

.areas-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease 0.1s;
}
.areas-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.areas-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.2s;
}
.areas-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.areas-list {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.3s;
}
.areas-list.visible {
    opacity: 1;
    transform: translateY(0);
}

.areas-image-grid {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease 0.2s;
}
.areas-image-grid.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---------- Testimonials ---------- */
.testimonials-tag {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
.testimonials-tag.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonials-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease 0.1s;
}
.testimonials-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}
.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }

/* ---------- CTA ---------- */
.cta-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}
.cta-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.1s;
}
.cta-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-buttons {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.2s;
}
.cta-buttons.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Contact ---------- */
.contact-tag {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
.contact-tag.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease 0.1s;
}
.contact-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-desc {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.2s;
}
.contact-desc.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-info {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.3s;
}
.contact-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-form-wrap {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease 0.2s;
}
.contact-form-wrap.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Form Focus States ---------- */
input:focus,
textarea:focus,
select:focus {
    border-color: #a11d3d !important;
}

input:focus + label,
textarea:focus + label,
select:focus + label {
    color: #a11d3d;
}

/* ---------- Select styling ---------- */
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='%23a11d3d' 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 0 center;
}

/* ---------- Image hover effects ---------- */
img {
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------- Divider animation ---------- */
.divider-line {
    opacity: 0;
    transition: opacity 0.6s ease;
}
.divider-line.visible {
    opacity: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
    .clip-diagonal {
        clip-path: none;
        display: none;
    }
    
    #hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 80px;
    }
    
    .hero-line {
        animation: none;
        transform: none;
        opacity: 1;
    }
    
    .hero-tag,
    .hero-desc,
    .hero-cta {
        animation: none;
        transform: none;
        opacity: 1;
    }
}

/* ---------- Print styles ---------- */
@media print {
    nav, #mobile-menu, .cta-buttons {
        display: none !important;
    }
    
    body {
        color: #1c1917;
        background: white;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* ---------- 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;
    }
    
    .service-card,
    .testimonial-card {
        opacity: 1;
        transform: none;
    }
}
