:root {
    --bg-color: #080808;
    --text-primary: #f2f2f2;
    --text-secondary: #9c9c9c;
    --accent-gold: #D4AF37;
    --accent-gold-dark: #b5952f;
    --glass-bg: rgba(25, 25, 25, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(212, 175, 55, 0.1);
}

/* WebGL Canvas Container */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2.5rem 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(8,8,8,0.85) 10%, rgba(8,8,8,0) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    z-index: -1;
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-logo {
    max-height: 50px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
    transition: transform 0.3s;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.logo span {
    font-size: 1.1rem;
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--accent-gold);
}

.nav-links {
    display: flex;
    gap: 4rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -6px;
    left: 0;
    background-color: var(--accent-gold);
    transition: width 0.4s ease;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

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

/* Typography styles */
.gold-text {
    color: var(--accent-gold);
    font-style: italic;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

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

/* Sections */
section {
    position: relative;
    padding: 10rem 5rem;
    min-height: 100vh;
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding-top: 120px;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: 6vw;
    line-height: 1.1;
    margin-bottom: 2.5rem;
    font-weight: 400;
    letter-spacing: -1px;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    max-width: 550px;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.explore-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.explore-btn:hover {
    background-color: var(--accent-gold);
    color: var(--bg-color);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 4rem;
    left: 5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-secondary);
}

.mouse {
    width: 24px;
    height: 36px;
    border: 1px solid var(--text-secondary);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 2px;
    height: 8px;
    background-color: var(--accent-gold);
    border-radius: 1px;
    animation: scroll 1.5s infinite ease-out;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

/* About */
.about-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-text-wrapper p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.9;
}

.about-text-wrapper .accent-text {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-top: 4rem;
    border-left: 3px solid var(--accent-gold);
    padding-left: 2.5rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.feature-item {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.feature-number {
    display: block;
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-weight: 300;
    letter-spacing: 2px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

/* Projects */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    margin-top: 6rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
    background-color: #111;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), filter 1.2s;
    filter: grayscale(80%) brightness(0.6);
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: grayscale(0%) brightness(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.gallery-overlay p {
    color: var(--accent-gold);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Contact */
.contact-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    padding: 6rem;
    margin-top: 5rem;
}

.contact-box h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 5rem;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    text-align: center;
}

.contact-info h3 {
    color: var(--accent-gold);
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.contact-info p,
.contact-info a {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--text-primary);
}

.footer-copy {
    margin-top: 6rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 3rem;
    letter-spacing: 1px;
}

/* Architectural Areas */
.architectural-areas {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 5rem;
    padding: 0 5rem;
}

.area-card {
    position: relative;
    aspect-ratio: 9/16;
    overflow: hidden;
    border-radius: 4px;
}

.area-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1), filter 1.5s;
}

.area-card:hover img {
    transform: scale(1.08);
    filter: brightness(0.9);
}

.area-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(to top, #000 10%, transparent);
}

.area-content h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
    line-height: 1.1;
}

.area-content p {
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Arch Showcase */
.arch-showcase {
    background-color: #0b0b0b;
    padding: 10rem 5rem;
}

.arch-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    margin-bottom: 10rem;
}

.arch-row:last-child {
    margin-bottom: 0;
}

.arch-row.reverse {
    direction: rtl;
}

.arch-row.reverse > * {
    direction: ltr;
}

.arch-text h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin: 1rem 0;
}

.arch-text p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.arch-text .description {
    margin-top: 2rem;
    line-height: 1.8;
}

.arch-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 4px;
}

.arch-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) brightness(0.8);
    transition: transform 1.2s;
}

.arch-img:hover img {
    transform: scale(1.05);
    filter: grayscale(0%) brightness(1);
}

/* Press Section */
.press-section {
    text-align: center;
    padding: 8rem 5rem;
    border-top: 1px solid var(--glass-border);
}

.press-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.press-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.outline-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s;
    font-size: 0.85rem;
}

.outline-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
}

/* -------------------------------------
   GLOBAL PRELOADER (Awwwards Style)
---------------------------------------- */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #020202;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.loader-logo {
    width: 280px;
    filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(212,175,55,0.15));
    animation: pulseLogo 2s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulseLogo {
    0% { opacity: 0.5; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1.02); }
}

.loader-progress-bar {
    width: 300px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.loader-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--text-primary); /* Godly Gold */
    transition: width 0.3s ease-out;
}

.loader-text {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: -1.5rem;
}

/* Blueprint Section come Full Screen "Hero" senza bordi limiti */
.blueprint-section {
    position: relative;
    width: 100vw;
    height: 100vh; /* Ora è estesa come una hero! */
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: #030303;
}

#blueprint-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    cursor: grab;
}

#blueprint-canvas:active {
    cursor: grabbing;
}

.blueprint-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    margin-left: 10%;
    padding: 3rem;
    background: rgba(3,3,3,0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212,175,55,0.1);
    border-radius: 12px;
}

.blueprint-content h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin: 1rem 0 2rem;
}

.blueprint-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.15rem;
}



@media (max-width: 1024px) {
    .about-container {
        grid-template-columns: 1fr;
    }

    .gallery {
        gap: 2rem;
    }

    .areas-grid {
        grid-template-columns: 1fr;
        padding: 0 2rem;
    }
    
    .area-card {
        transform: translateY(0) !important;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        transform: translateY(0) !important;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .navbar {
        padding: 1.5rem 2rem;
    }

    section {
        padding: 5rem 2rem;
    }

    .contact-box {
        padding: 3rem 2rem;
    }
}