/* Base and Variables */
:root {
    /* Colors */
    --color-bg: #0F1012;
    --color-surface: #1A1C1F;
    --color-surface-light: #25282D;
    --color-text: #FFFFFF;
    --color-text-muted: #A0A5B0;
    --color-accent: #D4AF37; /* Soft gold/bronze for luxury */
    --color-accent-hover: #C5A028;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --nav-height: 80px;
    --container-width: 1400px;
    --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 300;
    letter-spacing: -0.02em;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

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

/* Typography Utilities */
.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 2rem;
    line-height: 1.1;
}

.section-subtitle {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 1rem;
    display: block;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background-color: var(--color-accent);
    color: var(--color-bg);
    font-weight: 500;
    font-size: 1.1rem;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255,255,255,0.1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.btn-primary:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 2px;
}

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    padding: 0 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 16, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a:not(.btn-outline) {
    font-size: 0.9rem;
    font-weight: 400;
    position: relative;
}

.nav-links a:not(.btn-outline)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:not(.btn-outline):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 1px;
    background-color: var(--color-text);
    margin: 6px 0;
    transition: 0.3s ease;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--color-bg);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

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

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-links a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 300;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
}

.bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: slowZoom 20s infinite alternate linear;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(15, 16, 18, 0.8) 0%, rgba(15, 16, 18, 0.2) 100%);
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    max-width: 500px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 5%;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: rotate(-90deg);
    transform-origin: left center;
}

.scroll-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
}

.scroll-indicator .line {
    width: 60px;
    height: 1px;
    background-color: var(--color-text-muted);
    position: relative;
    overflow: hidden;
}

.scroll-indicator .line::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-accent);
    animation: scrollLine 2s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes scrollLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

.container-sm {
    max-width: 800px;
}

.text-center {
    text-align: center;
}

.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.section {
    padding: 8rem 5%;
}

/* O Edifício Section */
.edificio-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.text-content .desc {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.3); /* Accent color touch */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.feature-card h3 {
    color: var(--color-accent);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Tipologias Section */
.typology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.type-card {
    display: block;
    background: var(--color-surface);
    border-radius: 4px;
    overflow: hidden;
}

.card-img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.type-card:hover .card-img img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 16, 18, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.type-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay span {
    color: var(--color-text);
    border: 1px solid var(--color-accent);
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.type-card:hover .card-overlay span {
    transform: translateY(0);
}

.card-info {
    padding: 1.5rem;
    text-align: center;
    border-top: 2px solid transparent;
    transition: var(--transition-smooth);
}

.type-card:hover .card-info {
    border-top-color: var(--color-accent);
}

.card-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.card-info p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Gallery Section */
.galeria {
    background-color: var(--color-surface-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Gallery Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(15, 16, 18, 0.95);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--color-text);
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

.modal-close:hover {
    color: var(--color-accent);
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 16, 18, 0.5);
    color: var(--color-text);
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    z-index: 1001;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev:hover,
.modal-next:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Amenities Section */
.amenities {
    padding: 0;
}

.amenity-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 70vh;
}

.amenity-split.reverse {
    direction: rtl; /* simple way to reverse on desktop, we override inner elements to ltr */
}

.amenity-split.reverse > * {
    direction: ltr;
}

.amenity-img {
    height: 100%;
    width: 100%;
}

.amenity-img img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.amenity-text {
    padding: 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-surface);
}

.amenity-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

.amenity-text p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 500px;
}

/* Localização Section */
.localizacao {
    background-color: var(--color-surface-light);
}

.location-address {
    font-size: 1.25rem;
    margin-top: 1rem;
    color: var(--color-accent);
}

.services-list {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-item {
    background: var(--color-surface);
    padding: 1.5rem 2rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.02);
}

.service-item span:first-child {
    font-weight: 500;
}

.service-item span:last-child {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Contact Form Section */
.contacto {
    background: linear-gradient(to right, rgba(212, 175, 55, 0.05), transparent);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.contact-form {
    background: var(--color-surface);
    padding: 3rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 1rem 1.25rem;
    background-color: var(--color-bg);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--color-text);
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.w-100 {
    width: 100%;
}

/* Footer */
.footer {
    padding: 4rem 5%;
    background-color: #000;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-col h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.footer-col p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-col a:hover {
    color: var(--color-accent);
}

/* Media Queries */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .edificio-content,
    .amenity-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .amenity-split.reverse {
        direction: ltr; /* disable reversal on mobile */
    }
    
    .amenity-img {
        height: 400px; /* fixed height for images on mobile */
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .modal-close {
        top: 15px;
        right: 25px;
        font-size: 2.5rem;
    }

    .modal-prev,
    .modal-next {
        font-size: 1.5rem;
        padding: 0.5rem;
        width: 45px;
        height: 45px;
    }

    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }

    .section {
        padding: 5rem 5%;
    }
}
