/* ============================================================
   style.css — Bortolutti Digital Ltd
   Variabili brand, reset, layout base
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;1,400&display=swap');

/* --- CSS Variables --- */
:root {
    /* Colori brand */
    --gold:        #c9a961;
    --gold-light:  #e8c97a;
    --gold-dim:    rgba(201, 169, 97, 0.15);
    --gold-border: rgba(201, 169, 97, 0.30);

    /* Backgrounds — NERO PURO, zero tinta blu */
    --bg:     #0a0a0a;
    --bg-1:   #0f0f0f;
    --bg-2:   #141414;
    --bg-3:   #1a1a1a;
    --bg-4:   #1f1f1f;
    --bg-alt: #efefed;

    /* Testo */
    --text:    #f0f0f0;
    --text-2:  #c0c0c0;
    --subtle:  #888888;
    --muted:   #555555;

    /* Linee */
    --line:    rgba(255, 255, 255, 0.07);
    --line-2:  rgba(255, 255, 255, 0.04);

    /* Accenti funzionali */
    --green: #5ee59b;
    --red:   #e74c3c;

    /* Tipografia */
    --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-mono:  'JetBrains Mono', 'Fira Mono', monospace;

    /* Layout */
    --max-w:    1200px;
    --nav-h:    70px;

    /* Transizioni */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur:  0.25s;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* --- Loading Screen --- */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

#loader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    width: 64px;
    height: 64px;
    animation: loader-pulse 1.4s ease-in-out infinite;
}

.loader-bar-wrap {
    width: 120px;
    height: 1px;
    background: var(--line);
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    animation: loader-progress 1.8s var(--ease) forwards;
}

@keyframes loader-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.95); }
}

@keyframes loader-progress {
    0%   { width: 0%; }
    60%  { width: 80%; }
    100% { width: 100%; }
}

/* --- Layout contenitore --- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Navigazione --- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: #000000;
    border-bottom: 0.5px solid rgba(255,255,255,0.08);
}

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

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Logo PNG nella nav */
.nav-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Logo PNG nel footer: leggermente più piccolo */
.footer-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #aaaaaa;
    transition: color var(--dur) var(--ease);
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c9a961;
    transition: width var(--dur) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
    color: #f0f0f0;
}

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

.nav-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-lang {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.nav-lang a {
    color: #666;
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.nav-lang a:hover,
.nav-lang a.active {
    color: var(--gold);
}

.nav-lang-sep {
    color: #444;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

/* Hamburger open state */
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-1);
    border-bottom: 0.5px solid var(--line);
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 99;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
    pointer-events: none;
}

.nav-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.nav-drawer a {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--subtle);
    padding: 0.75rem 0;
    border-bottom: 0.5px solid var(--line-2);
    transition: color var(--dur) var(--ease);
}

.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a:hover, .nav-drawer a.active { color: var(--gold); }

/* --- Helpers sezione --- */
.section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

/* --- Animazioni reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Cookie wall --- */
#cookie-wall {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 540px;
    background: var(--bg-3);
    border: 0.5px solid var(--gold-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

#cookie-wall p {
    font-size: 13px;
    color: var(--subtle);
    line-height: 1.5;
}

#cookie-wall p a {
    color: var(--gold);
    text-decoration: underline;
}

#cookie-wall.hidden { display: none; }

/* --- Footer --- */
.site-footer {
    background: #0f0f0f;
    border-top: 0.5px solid rgba(255,255,255,0.07);
    padding: 3rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
}

.footer-brand img {
    height: 36px;
    width: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.footer-brand p {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    max-width: 240px;
}

.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}

.footer-col p, .footer-col a {
    font-size: 13px;
    color: var(--subtle);
    line-height: 1.8;
    display: block;
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 0.5px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-bottom p {
    font-size: 12px;
    color: var(--muted);
}

.footer-bottom a {
    font-size: 12px;
    color: var(--muted);
    transition: color var(--dur) var(--ease);
}

.footer-bottom a:hover { color: var(--gold); }

/* ===== DROPDOWN ACCEDI ===== */
.nav-accedi-wrap {
    position: relative;
}

.nav-accedi-btn {
    cursor: pointer;
    font-family: var(--font-sans);
}

.nav-accedi-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 220px;
    background: #111111;
    border: 0.5px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 200;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.nav-accedi-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-accedi-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    border-bottom: 0.5px solid rgba(255,255,255,0.06);
    transition: background 0.15s ease;
}

.nav-accedi-item:last-child {
    border-bottom: none;
}

.nav-accedi-item:hover {
    background: rgba(255,255,255,0.04);
}

.nav-accedi-icon {
    font-size: 16px;
    color: var(--gold);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.nav-accedi-item strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #f0f0f0;
    margin-bottom: 1px;
}

.nav-accedi-item span {
    font-size: 11px;
    color: #666;
    letter-spacing: 0.02em;
}
