/* ============================================================
   ArtDepa.it — Presepi Artigianali di Stefano De Pascale
   Struttura basata sul reverse engineering Ferrari Luce:
   navbar con logo centrale, hero full-screen, tema scuro.
   ============================================================ */

:root {
    /* Colori — estratti dalle foto dei presepi */
    --blu: #2196f3;
    --blu-chiaro: #64b5f6;
    --oro: #d4a843;
    --oro-chiaro: #e8c876;

    /* Fondali scuri */
    --bg: #0d0d12;
    --bg-2: #14141c;
    --bg-3: #1b1b26;
    --bordo: rgba(33, 150, 243, 0.18);
    --bordo-hover: rgba(33, 150, 243, 0.45);

    /* Testo */
    --testo: #eceef2;
    --testo-2: #a8adbd;
    --testo-3: #6f7484;

    /* Tipografia */
    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Lora', Georgia, serif;

    /* Spaziatura (base 8px) */
    --s-1: 8px;  --s-2: 16px; --s-3: 24px; --s-4: 32px;
    --s-5: 40px; --s-6: 48px; --s-8: 64px; --s-10: 80px; --s-12: 96px;

    /* Transizioni */
    --t-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --t-med: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --t-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    --radius: 12px;
    --navbar-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

/* Gli anchor atterrano sotto la navbar fissa */
[id] { scroll-margin-top: calc(var(--navbar-h) + 16px); }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--testo);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
    font-family: var(--font-serif);
    line-height: 1.2;
    color: var(--testo);
}

a { color: var(--blu-chiaro); text-decoration: none; transition: color var(--t-med); }
a:hover { color: var(--oro-chiaro); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--s-3); }

/* ============================================================
   NAVBAR — stile Ferrari: hamburger a sinistra, logo centrale,
   contatto a destra. Trasparente sull'hero, nera allo scroll.
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--navbar-h);
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
}

.navbar.scrolled, .navbar.menu-open, .navbar.solid {
    background: rgba(10, 10, 14, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}

.navbar-inner {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 var(--s-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hamburger + etichetta "Menu" (come Ferrari) */
.nav-burger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--testo);
    padding: 10px 0;
}

.burger-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}
.burger-lines i {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--t-med), width var(--t-med);
}

.nav-burger:hover .burger-lines i:nth-child(2) { width: 70%; }

.nav-burger.open .burger-lines i:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-burger.open .burger-lines i:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.burger-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Logo perfettamente centrato nella barra */
.nav-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--testo);
}
.nav-logo:hover { color: var(--oro-chiaro); }

.nav-logo-mark { height: 34px; width: auto; }

.nav-logo-text {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Icona contatti a destra */
.nav-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    color: var(--testo);
    border-radius: 50%;
    transition: color var(--t-med), background var(--t-med);
}
.nav-contact:hover { color: var(--oro-chiaro); background: rgba(255, 255, 255, 0.06); }

/* Drawer: pannello che scende sotto la barra */
.drawer {
    position: absolute;
    top: var(--navbar-h);
    left: 0; right: 0;
    background: rgba(10, 10, 14, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.drawer.open { max-height: 420px; }

.drawer ul {
    list-style: none;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--s-4) var(--s-3) var(--s-5);
}

.drawer li + li { border-top: 1px solid rgba(255, 255, 255, 0.06); }

.drawer a {
    display: block;
    padding: 18px 0;
    font-family: var(--font-serif);
    font-size: clamp(22px, 3.5vw, 32px);
    color: var(--testo-2);
    transition: color var(--t-med), padding-left var(--t-med);
}
.drawer a:hover { color: var(--oro-chiaro); padding-left: 12px; }

.drawer-veil {
    position: fixed;
    inset: var(--navbar-h) 0 0 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: -1;
}

/* ============================================================
   HERO — schermo intero, logo centrale che svanisce allo scroll
   ============================================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(13, 13, 18, 0.45) 0%, rgba(13, 13, 18, 0.25) 45%, var(--bg) 98%),
        url("img/22_La_Grotta_Turchese_angolo1.jpg") center 40% / cover no-repeat;
    animation: hero-zoom 16s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes hero-zoom {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

/* ---- Splash "Luce": logo dorato in sovraimpressione che svanisce
       da solo dopo ~2,5s lasciando la foto del presepe ---- */
.hero-intro {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse 90% 65% at 50% 38%, #1d1812 0%, #12100c 55%, #0a0908 100%);
    opacity: 1;
    visibility: visible;
    transition: opacity 1.3s cubic-bezier(0.55, 0, 0.3, 1), visibility 0s linear 1.3s;
}

.hero-intro.svanita {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* alone caldo che respira dietro il marchio */
.hero-intro::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 68vmin; height: 68vmin;
    transform: translate(-50%, -58%);
    background: radial-gradient(circle,
        rgba(212, 175, 110, 0.14) 0%,
        rgba(212, 175, 110, 0.05) 45%,
        transparent 70%);
    animation: respiro 7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes respiro {
    0%, 100% { opacity: 0.75; transform: translate(-50%, -58%) scale(1); }
    50%      { opacity: 1;    transform: translate(-50%, -58%) scale(1.06); }
}

/* il marchio: mark.png come maschera, riempito d'oro con fascio di luce */
.intro-mark {
    width: min(340px, 58vmin);
    height: min(313.6px, 53.5vmin);
    -webkit-mask: url('img/mark.png') center / contain no-repeat;
            mask: url('img/mark.png') center / contain no-repeat;
    background-image:
        linear-gradient(110deg,
            rgba(255, 248, 225, 0) 40%,
            rgba(255, 248, 225, 0.85) 47%,
            #fffdf4 50%,
            rgba(255, 248, 225, 0.85) 53%,
            rgba(255, 248, 225, 0) 60%),
        linear-gradient(175deg, #f0e6cf 0%, #dcc9a2 55%, #c3a878 100%);
    background-size: 320% 100%, 100% 100%;
    background-position: 0% 0, 0 0;
    background-repeat: no-repeat;
    animation:
        luce 6s cubic-bezier(0.55, 0, 0.3, 1) 1.4s infinite,
        hero-in 1.6s ease-out both;
    filter: drop-shadow(0 0 18px rgba(220, 185, 120, 0.18));
}

.intro-wordmark {
    margin-top: 4.2vmin;
    font-family: 'Cormorant Garamond', var(--font-serif);
    font-size: min(76px, 11.5vmin);
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1;
    background-image:
        linear-gradient(110deg,
            rgba(255, 248, 225, 0) 40%,
            rgba(255, 248, 225, 0.9) 47%,
            #fffdf4 50%,
            rgba(255, 248, 225, 0.9) 53%,
            rgba(255, 248, 225, 0) 60%),
        linear-gradient(180deg, #f5ecd8 0%, #e2cfa6 45%, #b3945e 100%);
    background-size: 320% 100%, 100% 100%;
    background-position: 0% 0, 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    animation:
        luce 6s cubic-bezier(0.55, 0, 0.3, 1) 1.55s infinite,
        hero-in 1.6s ease-out 0.25s both;
}

/* il fascio di luce che attraversa (effetto "Luce" Ferrari) */
@keyframes luce {
    0%   { background-position: 100% 0, 0 0; }
    38%  { background-position: 0% 0, 0 0; }
    100% { background-position: 0% 0, 0 0; }
}

.intro-tagline {
    margin-top: 2.6vmin;
    display: flex;
    align-items: center;
    gap: 1.4em;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: min(13px, 2.1vmin);
    letter-spacing: 0.52em;
    text-indent: 0.52em;
    text-transform: uppercase;
    color: #a08a63;
    animation: hero-in 1.6s ease-out 0.5s both;
}

.intro-tagline::before,
.intro-tagline::after {
    content: '';
    width: min(70px, 10vmin);
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a7248);
}
.intro-tagline::after {
    background: linear-gradient(90deg, #8a7248, transparent);
}

.scroll-hint {
    position: absolute;
    bottom: var(--s-3);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(236, 238, 242, 0.7);
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    transition: opacity var(--t-med);
}
.scroll-hint::after {
    content: '↓';
    display: block;
    text-align: center;
    font-size: 18px;
    color: var(--oro-chiaro);
    animation: bounce 1.8s infinite;
}

@keyframes hero-in {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ---------- Sezioni ---------- */
section { padding: var(--s-12) 0; }

.intro { padding-top: var(--s-10); }
.intro .hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--s-8);
    margin-top: var(--s-6);
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat b {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 44px);
    color: var(--oro);
}
.stat small { color: var(--testo-3); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

.section-label {
    display: block;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--blu);
    margin-bottom: var(--s-2);
}

.section-title {
    font-size: clamp(30px, 4.5vw, 48px);
    text-align: center;
    margin-bottom: var(--s-3);
}

.section-desc {
    max-width: 720px;
    margin: 0 auto var(--s-8);
    text-align: center;
    color: var(--testo-2);
    font-size: 17px;
}

.alt-bg { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }

.btn {
    display: inline-block;
    padding: 15px 44px;
    border-radius: 999px;
    border: 1px solid var(--bordo-hover);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.05));
    color: var(--testo);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform var(--t-med), box-shadow var(--t-med), background var(--t-med);
}
.btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.35), rgba(33, 150, 243, 0.1));
    box-shadow: 0 0 40px rgba(33, 150, 243, 0.35);
    color: #fff;
}

/* ---------- Collezione: griglia opere ---------- */
.opere-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--s-4);
}

.opera-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-3);
    border: 1px solid var(--bordo);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}

.opera-card:hover {
    transform: translateY(-8px);
    border-color: var(--bordo-hover);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(33, 150, 243, 0.15);
}

.opera-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
}

.opera-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.88);
    transition: transform var(--t-slow), filter var(--t-med);
}

/* La "luce" che colpisce solo la foto */
.opera-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at 50% 30%, rgba(255, 244, 214, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity var(--t-med);
    pointer-events: none;
}

.opera-card:hover .opera-media img { transform: scale(1.06); filter: brightness(1.05); }
.opera-card:hover .opera-media::after { opacity: 1; }

.opera-num {
    position: absolute;
    top: 12px; left: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(13, 13, 18, 0.75);
    border: 1px solid var(--bordo);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--oro);
    z-index: 2;
}

.opera-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--s-3);
}

.opera-body h3 { font-size: 21px; margin-bottom: var(--s-1); }
.opera-body p { color: var(--testo-2); font-size: 14px; flex: 1; margin-bottom: var(--s-2); }

.opera-link {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--blu-chiaro);
}
.opera-link::after { content: ' →'; transition: margin-left var(--t-fast); }
.opera-card:hover .opera-link { color: var(--oro-chiaro); }
.opera-card:hover .opera-link::after { margin-left: 4px; }

.opera-card > a.card-cover { position: absolute; inset: 0; z-index: 3; }

/* ---------- Caratteristiche ---------- */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--s-3);
}
.spec {
    text-align: center;
    padding: var(--s-4) var(--s-3);
    background: var(--bg-3);
    border: 1px solid var(--bordo);
    border-radius: var(--radius);
    transition: transform var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
}
.spec:hover {
    transform: translateY(-4px);
    border-color: var(--bordo-hover);
    box-shadow: 0 12px 40px rgba(33, 150, 243, 0.12);
}
.spec .icona { font-size: 36px; margin-bottom: var(--s-2); }
.spec h3 { font-size: 18px; margin-bottom: var(--s-1); }
.spec p { color: var(--testo-2); font-size: 14px; }

/* ---------- Contatti ---------- */
.form {
    max-width: 620px;
    margin: 0 auto;
    display: grid;
    gap: var(--s-3);
}
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-size: 14px; font-weight: 600; color: var(--testo-2); }
.campo input, .campo textarea {
    padding: 14px 16px;
    background: var(--bg-3);
    border: 1px solid var(--bordo);
    border-radius: 8px;
    color: var(--testo);
    font-family: var(--font-sans);
    font-size: 15px;
    transition: border-color var(--t-med), box-shadow var(--t-med);
}
.campo input::placeholder, .campo textarea::placeholder { color: var(--testo-3); }
.campo input:focus, .campo textarea:focus {
    outline: none;
    border-color: var(--blu);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}
.form .btn { justify-self: center; }
.form-esito { text-align: center; color: var(--oro); font-weight: 600; min-height: 24px; }

/* ---------- Footer ---------- */
.footer {
    background: #0a0a0e;
    border-top: 1px solid var(--bordo);
    padding: var(--s-8) 0 var(--s-4);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--s-5);
    padding-bottom: var(--s-5);
    margin-bottom: var(--s-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.footer h4 { font-family: var(--font-serif); font-size: 17px; margin-bottom: var(--s-2); }
.footer p, .footer li { color: var(--testo-3); font-size: 14px; line-height: 2; }
.footer ul { list-style: none; }
.footer a { color: var(--testo-3); }
.footer a:hover { color: var(--blu-chiaro); }
.footer-bottom { text-align: center; color: var(--testo-3); font-size: 13px; }

/* ---------- Pagina opera ---------- */
.opera-hero {
    padding: calc(var(--navbar-h) + var(--s-6)) var(--s-3) var(--s-6);
    background:
        radial-gradient(ellipse 60% 50% at 50% 20%, rgba(33, 150, 243, 0.12), transparent 70%),
        var(--bg);
}
.opera-hero .container { max-width: 960px; }

.breadcrumb {
    font-size: 13px;
    color: var(--testo-3);
    margin-bottom: var(--s-4);
}
.breadcrumb a { color: var(--testo-3); }
.breadcrumb a:hover { color: var(--blu-chiaro); }

.opera-foto {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--bordo);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(33, 150, 243, 0.12);
    margin-bottom: var(--s-4);
    background: #000;
}
.opera-foto img { width: 100%; }

.opera-titolo {
    font-size: clamp(30px, 5vw, 52px);
    text-align: center;
    margin-bottom: var(--s-4);
}
.opera-kicker {
    text-align: center;
    color: var(--oro);
    font-size: 13px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: var(--s-2);
}
.opera-testo {
    max-width: 760px;
    margin: 0 auto var(--s-6);
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.9;
    color: var(--testo-2);
}
.opera-testo::first-letter {
    font-size: 3.2em;
    float: left;
    line-height: 0.85;
    padding-right: 10px;
    color: var(--oro);
}

.altre-viste { max-width: 960px; margin: 0 auto var(--s-6); }
.altre-viste h2 { text-align: center; font-size: 24px; margin-bottom: var(--s-3); }
.viste-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-3); }
.viste-grid img {
    border-radius: var(--radius);
    border: 1px solid var(--bordo);
    width: 100%;
}

.opera-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-2);
    max-width: 760px;
    margin: 0 auto;
    padding: var(--s-4) 0;
    border-top: 1px solid var(--bordo);
    flex-wrap: wrap;
}
.opera-nav a {
    padding: 12px 22px;
    border: 1px solid var(--bordo);
    border-radius: 999px;
    background: var(--bg-3);
    font-size: 14px;
    color: var(--testo-2);
    transition: border-color var(--t-med), color var(--t-med), box-shadow var(--t-med);
}
.opera-nav a:hover {
    border-color: var(--bordo-hover);
    color: var(--testo);
    box-shadow: 0 0 30px rgba(33, 150, 243, 0.2);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .nav-logo-text { display: none; }
    .nav-logo-mark { height: 38px; }
    .burger-label { display: none; }
    .intro .hero-stats { gap: var(--s-4); }
    section { padding: var(--s-8) 0; }
}

@media (max-width: 480px) {
    .opere-grid { grid-template-columns: 1fr; }
    .opera-testo { font-size: 17px; }
}

/* ---------- Accessibilità ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .intro-mark, .intro-wordmark { background-position: 0% 0, 0 0; }
}

@media print {
    .navbar, .scroll-hint, .btn, .footer { display: none; }
    body { background: #fff; color: #000; }
}
