/* ================================================================
   VELARIO — Global CSS v3
   Design system completo. Equivale al CSS globale Astra +
   Kadence Global Settings. Ogni variabile qui è mappabile 1:1
   su Astra → Personalizza → CSS Aggiuntivo per la migrazione WP.
   ================================================================ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ================================================================
   1. DESIGN TOKENS
   In WP: questi vanno in Astra → Aspetto → Personalizza →
   CSS Aggiuntivo nel blocco :root { }
   ================================================================ */
:root {
    /* Colori principali */
    --v-black:          #0A0A0A;   /* bg dominante — sezioni scure, footer, hero */
    --v-black-soft:     #111111;   /* bg secondario — card, sezioni alternate scure */
    --v-gold:           #C9A84C;   /* accento primario — eyebrow, hover, bordi attivi */
    --v-gold-dark:      #B8960C;   /* gold su hover, stati attivi, btn su chiaro */

    /* Colori chiari — sezioni "respiro" */
    --v-stone:          #F5F0E8;   /* bg chiaro nobile — sezioni respiro principali */
    --v-stone-alt:      #EDE8DF;   /* bg chiaro alternato — sezioni chiare secondarie */

    /* Testo */
    --v-stone-text:     #F5F0E8;   /* testo su scuro */
    --v-slate:          #4A4A4A;   /* testo su chiaro — body text */
    --v-slate-light:    #7A7A7A;   /* testo secondario — caption, label, form note */

    /* Font */
    --font-display:     'Cormorant Garamond', Georgia, serif;
    --font-body:        'Inter', system-ui, -apple-system, sans-serif;

    /* Spaziatura */
    --section-pad-v:    100px;
    --section-pad-h:    80px;
    --container-max:    1280px;

    /* Transizioni */
    --transition:       0.3s ease;
    --transition-slow:  0.5s ease;
}

/* ================================================================
   2. RESET & BASE
   ================================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden; /* previene scroll orizzontale da drawer nav off-screen */
}

body {
    font-family: var(--font-body);
    background: var(--v-black);
    color: var(--v-stone-text);
    overflow-x: hidden;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* Scrollbar discreta */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--v-black); }
::-webkit-scrollbar-thumb { background: var(--v-gold); }

/* Selezione testo */
::selection { background: var(--v-gold); color: var(--v-black); }

/* ================================================================
   3. TIPOGRAFIA
   In WP: corrisponde a Kadence → Typography settings
   ================================================================ */
h1 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 68px;
    line-height: 1.08;
    letter-spacing: -0.01em;
}
h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 44px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 28px;
    line-height: 1.3;
    letter-spacing: 0.01em;
}
h4 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.35;
}

.eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--v-gold);
    margin-bottom: 20px;
}
/* Eyebrow su sfondo chiaro */
.eyebrow-dark {
    color: var(--v-gold-dark);
}

.body-text {
    font-size: 15px;
    line-height: 1.85;
    font-weight: 300;
}
.lead {
    font-size: 18px;
    line-height: 1.75;
    font-weight: 300;
}
.caption {
    font-size: 12px;
    font-weight: 300;
    color: var(--v-slate-light);
    line-height: 1.6;
}

/* ================================================================
   4. LAYOUT — Container e Sezioni
   In WP: corrisponde a Kadence Row padding + Astra container width
   ================================================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--section-pad-h);
}

/* Sezioni scure */
.section-dark {
    background: var(--v-black);
    color: var(--v-stone-text);
    padding: var(--section-pad-v) var(--section-pad-h);
}
.section-dark-soft {
    background: var(--v-black-soft);
    color: var(--v-stone-text);
    padding: var(--section-pad-v) var(--section-pad-h);
}

/* Sezioni chiare — le sezioni "respiro" */
.section-stone {
    background: var(--v-stone);
    color: var(--v-black);
    padding: var(--section-pad-v) var(--section-pad-h);
}
.section-stone-alt {
    background: var(--v-stone-alt);
    color: var(--v-black);
    padding: var(--section-pad-v) var(--section-pad-h);
}

.section-inner {
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Utility */
.text-center  { text-align: center; }
.max-700      { max-width: 700px; }
.max-600      { max-width: 600px; }
.max-480      { max-width: 480px; }
.mx-auto      { margin-left: auto; margin-right: auto; }

/* ================================================================
   5. GRIGLIA
   In WP: corrisponde a Kadence Row → Columns layout
   ================================================================ */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}
.grid-2-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.grid-5-pillars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

/* ================================================================
   6. COMPONENTI CONDIVISI
   In WP: corrisponde a Kadence Block styles globali
   ================================================================ */

/* ── Divisori ── */
.divider-gold {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--v-gold), transparent);
    opacity: 0.3;
    margin: 60px 0;
}
.divider-gold-sm {
    width: 48px;
    height: 1px;
    background: var(--v-gold);
    opacity: 0.6;
    margin: 24px 0;
}

/* ── Pulsante ── */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background: transparent;
    border: 1px solid var(--v-gold);
    color: var(--v-gold);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    border-radius: 0; /* sharp edge — identità luxury */
}
.btn:hover {
    background: var(--v-gold);
    color: var(--v-black);
}
/* Variante su sfondo chiaro */
.btn-dark {
    border-color: var(--v-black);
    color: var(--v-black);
}
.btn-dark:hover {
    background: var(--v-black);
    color: var(--v-stone);
}

/* ── Card — sfondo scuro ── */
.card {
    background: var(--v-black-soft);
    border: 1px solid rgba(201, 164, 76, 0.2);
    padding: 40px;
    border-radius: 0;
    transition: border-color var(--transition);
}
.card:hover {
    border-color: rgba(201, 164, 76, 0.5);
}
.card h3 {
    color: var(--v-gold);
    margin-bottom: 12px;
}
.card .card-sub {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 17px;
    color: var(--v-stone-text);
    opacity: 0.75;
    margin-bottom: 24px;
}
.card ul  { list-style: none; margin-top: 20px; }
.card li  {
    font-size: 14px;
    line-height: 1.8;
    color: var(--v-stone-text);
    opacity: 0.8;
    margin-bottom: 14px;
    padding-left: 20px;
    position: relative;
}
.card li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--v-gold);
}

/* ── Quote box — sfondo scuro ── */
.quote-box {
    border-left: 2px solid var(--v-gold);
    padding: 32px 40px;
    background: var(--v-black-soft);
}
.quote-box p {
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    font-size: 22px;
    line-height: 1.6;
    color: var(--v-stone-text);
}

/* ── Citazione di chiusura pagina ── */
.closing-quote {
    padding: 80px var(--section-pad-h);
    background: var(--v-black);
    text-align: center;
    border-top: 1px solid rgba(201, 164, 76, 0.12);
}
.closing-quote p {
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    font-size: 30px;
    line-height: 1.5;
    color: var(--v-stone-text);
    max-width: 680px;
    margin: 0 auto;
    opacity: 0.85;
}

/* ── Placeholder immagine ──
 * Da rimuovere e sostituire con <img> o background-image
 * quando le immagini AI saranno generate.
 * Ogni placeholder ha un commento <!-- IMG: nomefile --> nel markup.
 */
.img-placeholder {
    position: relative;
    overflow: hidden;
    background: var(--v-black-soft);
}
.img-placeholder::after {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(201, 164, 76, 0.35);
    white-space: nowrap;
    pointer-events: none;
}
.img-placeholder-border {
    border: 1px dashed rgba(201, 164, 76, 0.2);
}

/* ================================================================
   7. HEADER & NAVIGAZIONE
   ================================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--section-pad-h);
    background: rgba(10, 10, 10, 0.80);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition);
}
.site-header.scrolled {
    background: var(--v-black);
    border-bottom-color: rgba(201, 164, 76, 0.15);
}

.site-logo {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 20px;
    color: var(--v-gold);
    letter-spacing: 0.2em;
    text-decoration: none;
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    gap: 36px;
    align-items: center;
    list-style: none;
}
.site-nav a {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--v-stone-text);
    opacity: 0.65;
    transition: color var(--transition), opacity var(--transition);
}
.site-nav a:hover,
.site-nav a.active {
    color: var(--v-gold);
    opacity: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.lang-switch {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--v-stone-text);
    opacity: 0.4;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity var(--transition);
    text-transform: uppercase;
}
.lang-switch:hover { opacity: 1; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--v-stone-text);
    transition: all var(--transition);
}

/* ================================================================
   8. FOOTER
   ================================================================ */
.site-footer {
    padding: 80px var(--section-pad-h) 40px;
    background: var(--v-black);
    border-top: 1px solid rgba(201, 164, 76, 0.12);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    margin-bottom: 60px;
}
.footer-logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 400;
    color: var(--v-gold);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 12px;
}
.footer-tagline {
    font-size: 11px;
    color: var(--v-stone-text);
    opacity: 0.35;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.footer-menu {
    list-style: none;
}
.footer-menu li {
    margin-bottom: 10px;
}
.footer-menu a {
    font-size: 11px;
    color: var(--v-stone-text);
    opacity: 0.45;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: opacity var(--transition), color var(--transition);
}
.footer-menu a:hover {
    opacity: 1;
    color: var(--v-gold);
}
.footer-contact p {
    font-size: 13px;
    color: var(--v-stone-text);
    opacity: 0.5;
    line-height: 1.9;
}
.footer-contact a { color: inherit; }
.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(245, 240, 232, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-bottom p,
.footer-bottom a {
    font-size: 10px;
    color: var(--v-stone-text);
    opacity: 0.28;
    letter-spacing: 0.1em;
}
.footer-bottom a:hover { opacity: 0.6; }

/* ── Back to top ── */
.back-to-top {
    position: fixed;
    bottom: 36px;
    right: 36px;
    width: 44px;
    height: 44px;
    background: var(--v-gold);
    color: var(--v-black);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), background var(--transition);
    z-index: 999;
    font-size: 16px;
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover   { background: var(--v-gold-dark); }

/* ================================================================
   9. RESPONSIVE — breakpoint condivisi
   ================================================================ */
@media (max-width: 1024px) {
    :root {
        --section-pad-h: 48px;
        --section-pad-v: 80px;
    }
    h1 { font-size: 52px; }
    h2 { font-size: 36px; }
    .grid-2          { grid-template-columns: 1fr; gap: 48px; }
    .grid-5-pillars  { grid-template-columns: repeat(3, 1fr); }
    .footer-grid     { grid-template-columns: 1fr 1fr; gap: 48px; }
}

@media (max-width: 768px) {
    :root {
        --section-pad-h: 24px;
        --section-pad-v: 60px;
    }
    h1 { font-size: 38px; }
    h2 { font-size: 28px; }
    h3 { font-size: 22px; }

    .site-header { padding: 0 24px; }

    /* Nav mobile — drawer laterale */
    .site-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        justify-content: center;
        padding: 80px 40px;
        gap: 28px;
        transition: right 0.4s ease;
        border-left: 1px solid rgba(201, 164, 76, 0.12);
        z-index: 1001;
        overflow-y: auto;  /* scroll interno se voci non entrano */
        visibility: hidden; /* nasconde il drawer fuori schermo da assistive tech */
    }
    .site-nav.open  { right: 0; visibility: visible; }
    .site-nav a     { font-size: 13px; letter-spacing: 0.2em; opacity: 1; }
    /* Hamburger: visibile su mobile */
    .hamburger      { display: flex; }

    .grid-3         { grid-template-columns: 1fr; gap: 32px; }
    .grid-2-cards   { grid-template-columns: 1fr; gap: 24px; }
    .grid-5-pillars { grid-template-columns: 1fr 1fr; }

    .footer-grid    { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom  { flex-direction: column; gap: 12px; text-align: center; }

    .closing-quote  { padding: 60px 24px; }
    .closing-quote p { font-size: 22px; }
}

@media (max-width: 480px) {
    .grid-5-pillars { grid-template-columns: 1fr; }
}
