/* ===== Core CSS Variables (Design System) ===== */
:root {
    /* Colors */
    --bg-dark: #121212;
    --bg-darker: #0d0d0d;
    --bg-surface: #1e1e1e;
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-muted: #666666;

    /* Premium Gold/Accent */
    --accent-gold: #C5A059;
    --accent-gold-hover: #d1b171;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --t-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast: all 0.3s ease;
}

/* ===== Resets and Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}


body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
}

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

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

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
}

/* ===== Typography ===== */
h1 {
    font-size: clamp(2rem, 4.5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

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

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    display: block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* ===== Buttons & Links ===== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--t-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

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

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.link-gold {
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
    padding-bottom: 4px;
}

.link-gold:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: var(--t-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.nav-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
}

.menu-toggle {
    display: none;
}

.menu-overlay {
    display: none;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
}

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

.hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13, 13, 13, 0.7), rgba(13, 13, 13, 0.9));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-image {
    position: relative;
}

.about-image img.portrait {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 3/4;
    object-fit: cover;
    margin: 0 auto;
    filter: grayscale(100%);
    transition: var(--t-smooth);
}

.about-image:hover img.portrait {
    filter: grayscale(20%);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: calc(50% - 240px + 20px);
    width: 100%;
    max-width: 480px;
    height: 100%;
    border: 1px solid var(--border-color);
    z-index: -1;
}

/* ===== Build Sequence Section ===== */
.build-sequence {
    position: relative;
    width: 100%;
    height: 100dvh;
    background-color: var(--bg-darker);
}

.build-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.build-video-container canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    filter: brightness(0.6) contrast(1.1) grayscale(20%);
    transform: translateZ(0) scale(1.05);
    will-change: transform;
    backface-visibility: hidden;
}

.process-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-gold);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 2;
    transition: opacity 0.5s ease;
}

.titulo-nosso-processo {
    margin-top: 20%;
    text-align: left;
    opacity: 0;
    visibility: hidden;
}

.build-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--bg-darker) 0%, rgba(18, 18, 18, 0.7) 50%, transparent 100%),
        linear-gradient(to top, var(--bg-darker) 0%, transparent 15%, transparent 85%, var(--bg-darker) 100%);
    z-index: 1;
    pointer-events: none;
}

.build-overlays {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.build-card {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    max-width: 450px;
    background: rgba(18, 18, 18, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 40px;
    opacity: 0;
    visibility: hidden;
}

.build-card h3 {
    margin-bottom: 16px;
}

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

.build-card.step-1 {
    left: 24px;
}

.build-card.step-2 {
    right: 24px;
    left: auto;
}

.build-card.step-3 {
    left: 24px;
}

.step-num {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 8px;
    display: block;
}

/* ===== Portfolio Section ===== */
.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item.featured img {
    aspect-ratio: 16/9;
}

.secondary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.secondary-grid .portfolio-item img {
    aspect-ratio: 3/4;
}

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

.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 32px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 1;
}

.item-info .location {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* ===== Contact Section ===== */
.contact {
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.margin-top {
    margin-top: 24px;
}

.contact-form {
    background: var(--bg-surface);
    padding: 40px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
    transition: var(--t-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--accent-gold);
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copyright {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Animations ===== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-1 {
    transition-delay: 0.1s;
}

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

.delay-3 {
    transition-delay: 0.3s;
}

/* ===== Media Queries ===== */
@media (max-width: 991px) {

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Build Sequence Mobile overrides */
    .build-card {
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100% - 48px);
        padding: 32px;
    }

    .nav-links {
        display: none;
        /* simple mobile nav for now */
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

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

@media (max-width: 767px) {
    .secondary-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    /* ===== Header Mobile Overrides ===== */
    .navbar {
        height: 64px;
        background-color: var(--bg-dark);
        padding: 0;
    }

    .navbar.scrolled {
        padding: 0;
        background-color: var(--bg-dark);
        border-bottom: none;
    }

    .nav-container {
        height: 100%;
        padding: 0 24px;
        flex-wrap: nowrap;
    }

    .logo {
        font-size: 15px;
        white-space: nowrap;
        margin: 0;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        gap: 6px;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle span {
        width: 24px;
        height: 2px;
        background-color: var(--text-primary);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-content {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background-color: var(--bg-dark);
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        z-index: 999;
        flex-direction: column;
        gap: 0;
        display: flex;
    }

    .nav-content.active {
        max-height: 400px;
        opacity: 1;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-links a {
        padding: 18px 24px;
        font-size: 14px;
        letter-spacing: 0.1em;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-content .btn-primary {
        width: calc(100% - 48px);
        margin: 20px 24px;
    }

    .menu-overlay {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        height: calc(100vh - 64px);
        background: transparent;
        z-index: 998;
        display: none;
    }

    .menu-overlay.active {
        display: block;
    }
}