/* ==========================================================================
   Luxury Design System - Woody Allestimenti
   ========================================================================== */
:root {
    /* Palette - Darker, richer tones for a premium feel (Dark Brown Theme) */
    --primary: #ff6600;
    --primary-hover: #e65c00;
    --bg-dark: #1A0F0C;
    /* Very dark brown, almost black */
    --bg-darker: #0A0604;
    /* Deepest brown */
    --bg-card: #20130F;
    /* Slightly lighter brown for cards */
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.08);

    /* Variables */
    --border-radius: 16px;
    --transition: cubic-bezier(0.19, 1, 0.22, 1);
    /* Ultra smooth ease-out */

    /* Typography */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ==========================================================================
   Reset & Base Styles (Dark Theme Default for Luxury Lighting)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-muted);
    background-color: var(--bg-dark);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s var(--transition);
}

.preloader-logo {
    width: 150px;
    height: auto;
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}

body.loaded #preloader {
    opacity: 0;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-accent {
    color: var(--primary);
}

.section-kicker {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 15px;
    font-weight: 600;
}

.section-heading {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
}

.section-heading span {
    display: block;
}

/* ==========================================================================
   Layouts
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: 120px 0;
}

.pb-0 {
    padding-bottom: 0;
}

.pt-0 {
    padding-top: 0;
}

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

/* ==========================================================================
   Buttons & Links
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 4px;
    /* Sharper corners for modern tech look */
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.5s var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--transition);
    z-index: -1;
}

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

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(255, 102, 0, 0.3);
}

.btn-outline-white {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline-white:hover {
    border-color: white;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: white;
}

.link-arrow .arrow {
    margin-left: 10px;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.link-arrow:hover .arrow {
    transform: translateX(10px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 0;
    z-index: 1000;
    transition: all 0.5s var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
    height: 60px;
    width: auto;
    display: block;
    transition: all 0.5s var(--transition);
}

.navbar.scrolled .nav-logo {
    height: 45px;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: white;
    display: block;
    line-height: 1;
}

.brand-subtitle {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 5px;
    color: var(--primary);
    text-transform: uppercase;
}

.hamburger {
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    /* larger click area */
    margin-left: -10px;
}

.hamburger-box {
    width: 36px;
    height: 18px;
    position: relative;
}

.hamburger .line {
    position: absolute;
    height: 2px;
    background: white;
    border-radius: 2px;
    right: 0;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1),
        width 0.5s cubic-bezier(0.19, 1, 0.22, 1),
        opacity 0.4s ease,
        background-color 0.4s ease;
}

/* Base Configuration */
.hamburger .line-1 {
    top: 0;
    width: 100%;
    transform-origin: left;
}

.hamburger .line-2 {
    top: 8px;
    width: 60%;
}

.hamburger .line-3 {
    top: 16px;
    width: 80%;
    transform-origin: left;
}

/* Drastic Hover State (Abstract geometric collapse) */
.hamburger:hover .line-1 {
    width: 40%;
    transform: translateY(4px);
    opacity: 0.6;
}

.hamburger:hover .line-2 {
    width: 100%;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.hamburger:hover .line-3 {
    width: 40%;
    transform: translateY(-4px);
    opacity: 0.6;
}

/* Open/X State */
.hamburger.open .line-1 {
    width: 24px;
    transform-origin: center;
    transform: translate(-6px, 8px) rotate(45deg);
    background: var(--primary);
    opacity: 1;
}

.hamburger.open .line-2 {
    opacity: 0;
    transform: translateX(15px);
}

.hamburger.open .line-3 {
    width: 24px;
    transform-origin: center;
    transform: translate(-6px, -8px) rotate(-45deg);
    background: var(--primary);
    opacity: 1;
}

/* Hide desktop CTA on very small screens */
@media (max-width: 500px) {
    .hide-mobile {
        display: none;
    }
}

.btn-outline-nav {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 24px;
    color: white;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-outline-nav:hover {
    background: white;
    color: black;
}

/* ==========================================================================
   Off-Canvas Sidebar Menu
   ========================================================================== */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(26, 15, 12, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s var(--transition);
    display: flex;
    align-items: center;
    padding-left: 10vw;
}

.sidebar-menu.active {
    visibility: visible;
    opacity: 1;
}

.sidebar-content {
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.7s var(--transition) 0.2s;
}

.sidebar-menu.active .sidebar-content {
    transform: translateY(0);
    opacity: 1;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
}

.sidebar-link {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    position: relative;
    overflow: hidden;
    display: inline-block;
    letter-spacing: 2px;
    line-height: 1.1;
    padding-right: 5px;
    /* Compensa il letter-spacing */
    padding-bottom: 5px;
    /* Evita il taglio delle lettere verso il basso */
}

.sidebar-link::after {
    content: attr(data-text);
    position: absolute;
    top: 100%;
    left: 0;
    color: var(--primary);
    transition: transform 0.4s var(--transition);
}

.sidebar-link:hover {
    color: transparent;
}

.sidebar-link:hover::after {
    transform: translateY(-100%);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    scale: 1.1;
    /* Prepara per animazione zoom out */
    animation: heroZoomIn 20s infinite alternate linear;
}

@keyframes heroZoomIn {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 15, 12, 0.95) 0%, rgba(26, 15, 12, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: white;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.05;
    margin-bottom: 30px;
}

.hero-desc {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin-bottom: 50px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 5%;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: white;
    transform: rotate(-90deg);
    transform-origin: left bottom;
    margin-bottom: 30px;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 2px;
    height: 6px;
    background: var(--primary);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scrollWheel 2s infinite cubic-bezier(0.15, 0.41, 0.69, 0.94);
}

@keyframes scrollWheel {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

/* ==========================================================================
   Expertise
   ========================================================================== */
.expertise {
    padding-top: 150px;
}

.section-title-wrap {
    margin-bottom: 80px;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.expertise-card {
    background: var(--bg-card);
    padding: 50px 40px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--transition);
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--transition);
}

.expertise-card:hover {
    transform: translateY(-10px);
    background: var(--bg-card);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.expertise-card:hover::before {
    transform: scaleX(1);
}

.card-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 20px;
    right: 30px;
    transition: color 0.5s ease;
}

.expertise-card:hover .card-number {
    color: rgba(255, 102, 0, 0.2);
}

.card-title {
    font-size: 1.5rem;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Processo (Steps)
   ========================================================================== */
.process {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.process-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 80px;
}

.process-step {
    flex: 1;
    position: relative;
}

.process-connector {
    width: 100px;
    height: 1px;
    background: var(--border-color);
    margin-top: 30px;
    position: relative;
}

.process-connector::after {
    content: '';
    position: absolute;
    top: -2px;
    right: 0;
    width: 5px;
    height: 5px;
    background: var(--border-color);
    border-radius: 50%;
}

.step-icon {
    width: 60px;
    height: 60px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    color: white;
    transition: all 0.5s ease;
}

.step-accent {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.4);
}

.process-step:hover .step-icon:not(.step-accent) {
    border-color: white;
    transform: scale(1.1);
}

.step-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.step-desc {
    color: rgba(255, 255, 255, 0.6);
    padding-right: 20px;
}

/* ==========================================================================
   Collezione (Masonry Vibe)
   ========================================================================== */
.gallery-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin-top: 60px;
}

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

.gallery-item.large {
    height: 600px;
}

.gallery-col {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.gallery-item.small {
    height: 280px;
}

.item-img-wrap {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    overflow: hidden;
}

.item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.1);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-transform: uppercase;
    transition: transform 1s var(--transition);
}

.gallery-item:hover .item-placeholder {
    transform: scale(1.05);
    /* Zoom incipepte */
}

.item-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(10, 6, 4, 0.9), transparent);
    transform: translateY(20px);
    transition: transform 0.5s var(--transition);
}

.gallery-item:hover .item-details {
    transform: translateY(0);
}

.item-category {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    display: block;
    margin-bottom: 10px;
}

.item-title {
    font-size: 2rem;
    margin-bottom: 0;
}

.gallery-item.small .item-title {
    font-size: 1.5rem;
}

.item-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    border-bottom: 1px solid var(--primary);
    padding-bottom: 5px;
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
}

.gallery-item:hover .item-link {
    opacity: 1;
}

/* ==========================================================================
   CTA Banner
   ========================================================================== */
.cta-banner {
    padding: 100px 0;
}

.cta-box {
    background: linear-gradient(45deg, var(--primary), #cc5200);
    padding: 80px 50px;
    text-align: center;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

/* Decorazione CTA */
.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.cta-headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: white;
    position: relative;
    z-index: 2;
}

.cta-sub {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 2;
}

.cta-action-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.cta-action-group .btn {
    padding: 18px 40px;
}

.btn-cta {
    background: var(--bg-dark);
    color: white;
}

.btn-cta:hover {
    background: black;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-modern {
    background: var(--bg-darker);
    padding: 100px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    text-decoration: none;
}

.footer-bio {
    color: rgba(255, 255, 255, 0.5);
    max-width: 400px;
}

.footer-title {
    font-size: 1rem;
    color: white;
    margin-bottom: 25px;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a,
.location-item {
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.legal a {
    color: rgba(255, 255, 255, 0.3);
    margin-left: 30px;
}

.legal a:hover {
    color: white;
}

/* ==========================================================================
   Animations Framework (GSAP-like pure CSS)
   ========================================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s var(--transition);
}

.reveal-right {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 1s var(--transition);
}

.reveal-down {
    opacity: 0;
    transform: translateY(-40px);
    transition: all 1s var(--transition);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 1s var(--transition);
}

.reveal-active {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Delays */
.delay-1 {
    transition-delay: 0.1s;
}

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

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

.delay-4 {
    transition-delay: 0.4s;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .process-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .process-connector {
        width: 1px;
        height: 40px;
        margin: 0 0 0 30px;
    }

    .process-connector::after {
        top: auto;
        bottom: -5px;
        right: -2px;
    }

    .process-step {
        display: flex;
        align-items: flex-start;
        gap: 30px;
        width: 100%;
    }

    .step-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }

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

    .gallery-item.large {
        height: 500px;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .brand-col {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .cta-action-group {
        flex-direction: column;
    }

    .nav-list {
        display: none;
        /* Add menu mobile logic in JS if needed */
    }

    .hamburger {
        display: block;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .brand-col {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

.footer-logo-icon {
    height: 50px;
    width: auto;
}

.footer-logo-text {
    height: 50px;
    width: auto;
}

/* Navigation Logo Mobile */
@media (max-width: 768px) {
    .nav-logo {
        height: 45px;
    }

    .footer-logo-icon,
    .footer-logo-text {
        height: 40px;
    }
}