/* ================================================
   ROCCO67 — Dark Luxe Design System
   ================================================ */

:root {
    /* Backgrounds */
    --r67-bg: #121318;
    --r67-bg-light: #16181F;
    --r67-surface: #1A1D2B;
    --r67-surface-light: #222536;
    --r67-surface-hover: #282B3D;

    /* Gold palette */
    --r67-gold: #D4A843;
    --r67-gold-light: #E8C468;
    --r67-gold-dark: #B8942E;
    --r67-gold-muted: rgba(212, 168, 67, 0.15);
    --r67-gold-glow: rgba(212, 168, 67, 0.08);

    /* Text */
    --r67-text: #F5F0E8;
    --r67-text-secondary: #C2C4CC; /* WCAG AA: 9.1:1 on r67-bg (was #A8AAB4 6.3:1, ok lifted) */
    --r67-text-muted: #9FA1AC; /* WCAG AA: 5.7:1 on r67-bg (was #6B6D78 2.4:1, fail) */
    --r67-text-gold: #D4A843;

    /* Borders */
    --r67-border: rgba(255, 255, 255, 0.06);
    --r67-border-gold: rgba(212, 168, 67, 0.25);
    --r67-border-gold-strong: rgba(212, 168, 67, 0.5);

    /* Shadows */
    --r67-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --r67-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --r67-shadow-gold: 0 4px 20px rgba(212, 168, 67, 0.1);

    /* Transitions */
    --r67-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --r67-transition-fast: all 0.2s ease;

    /* Radius */
    --r67-radius-sm: 6px;
    --r67-radius: 10px;
    --r67-radius-lg: 16px;
    --r67-radius-xl: 20px;

    /* Typography */
    --r67-heading: 'Cormorant Garamond', Georgia, serif;
    --r67-body: 'Space Grotesk', system-ui, sans-serif;
    --r67-accent-font: 'Space Mono', 'Courier New', monospace;
}

/* ---- Base ---- */

body {
    background: var(--r67-bg);
    color: var(--r67-text);
    font-family: var(--r67-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(212, 168, 67, 0.3);
    color: var(--r67-text);
}

/* ---- Typography ---- */

.r67-display {
    font-family: var(--r67-heading);
    font-weight: 300;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--r67-text);
}

.r67-headline {
    font-family: var(--r67-heading);
    font-weight: 400;
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--r67-text);
}

.r67-title {
    font-family: var(--r67-heading);
    font-weight: 500;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.3;
    color: var(--r67-text);
}

.r67-body-lg {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--r67-text-secondary);
}

.r67-body {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--r67-text-secondary);
}

.r67-caption {
    font-family: var(--r67-accent-font);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--r67-text-muted);
}

.r67-overline {
    font-family: var(--r67-accent-font);
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--r67-gold);
}

/* ---- Panels & Cards ---- */

.r67-panel {
    background: var(--r67-surface);
    border: 1px solid var(--r67-border);
    border-radius: var(--r67-radius);
    box-shadow: var(--r67-shadow);
}

.r67-panel-gold {
    background: var(--r67-surface);
    border: 1px solid var(--r67-border-gold);
    border-radius: var(--r67-radius);
    box-shadow: var(--r67-shadow-gold);
}

.r67-card {
    background: var(--r67-surface);
    border: 1px solid var(--r67-border);
    border-radius: var(--r67-radius);
    box-shadow: var(--r67-shadow);
    transition: var(--r67-transition);
    overflow: hidden;
}

.r67-card:hover {
    border-color: var(--r67-border-gold);
    box-shadow: var(--r67-shadow-gold);
    transform: translateY(-3px);
}

/* ---- Navbar ---- */

/* Default state: subtle dark veil so the navbar items stay legible
   over ANY hero photo (bright pizza, white plate, etc.) — was fully
   transparent before, which broke contrast on light hero backgrounds. */
.r67-nav {
    background: linear-gradient(
        to bottom,
        rgba(11, 12, 16, 0.78) 0%,
        rgba(18, 19, 24, 0.55) 70%,
        rgba(18, 19, 24, 0)   100%
    );
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: var(--r67-transition);
}

/* Scrolled: solid charcoal — already had this, keeps the polish */
.r67-nav.scrolled {
    background: rgba(18, 19, 24, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--r67-border);
}

.r67-nav-always {
    background: rgba(18, 19, 24, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--r67-border);
}

/* ---- Buttons ---- */

.r67-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--r67-radius-sm);
    font-family: var(--r67-accent-font);
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--r67-transition-fast);
    cursor: pointer;
    border: 1px solid var(--r67-border-gold);
    background: transparent;
    color: var(--r67-gold);
}

.r67-btn:hover {
    background: var(--r67-gold-muted);
    border-color: var(--r67-gold);
    color: var(--r67-gold-light);
}

.r67-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--r67-radius-sm);
    font-family: var(--r67-accent-font);
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--r67-transition-fast);
    cursor: pointer;
    border: none;
    background: var(--r67-gold);
    color: var(--r67-bg);
}

.r67-btn-primary:hover {
    background: var(--r67-gold-light);
    box-shadow: var(--r67-shadow-gold);
}

.r67-btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
}

.r67-btn-lg {
    padding: 1rem 2.25rem;
    font-size: 0.875rem;
}

/* ---- Inputs ---- */

.r67-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--r67-radius-sm);
    background: var(--r67-surface);
    border: 1px solid var(--r67-border);
    color: var(--r67-text);
    font-family: var(--r67-body);
    font-size: 0.9375rem;
    transition: var(--r67-transition-fast);
}

.r67-input::placeholder {
    color: var(--r67-text-muted);
}

.r67-input:focus {
    outline: none;
    border-color: var(--r67-border-gold);
    box-shadow: 0 0 0 3px var(--r67-gold-muted);
}

/* ---- Pills / Tags ---- */

.r67-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    background: var(--r67-gold-muted);
    border: 1px solid var(--r67-border-gold);
    color: var(--r67-gold);
    font-size: 0.75rem;
    transition: var(--r67-transition-fast);
}

.r67-pill:hover {
    background: rgba(212, 168, 67, 0.25);
    color: var(--r67-gold-light);
}

/* ---- Decorative Elements ---- */

.r67-gold-line {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, var(--r67-gold), transparent);
}

.r67-gold-line-center {
    width: 64px;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, var(--r67-gold), transparent);
}

.r67-divider {
    height: 1px;
    background: var(--r67-border);
}

.r67-glow-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--r67-gold-glow), transparent 70%);
    pointer-events: none;
    animation: r67OrbPulse 8s ease-in-out infinite;
}

/* ---- Image Containers ---- */

.r67-image-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--r67-radius);
}

.r67-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.r67-image-container:hover img {
    transform: scale(1.05);
}

.r67-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(18, 19, 24, 0.85) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.r67-image-container:hover .r67-image-overlay {
    opacity: 1;
}

/* ---- Section Spacing ---- */

.r67-section {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .r67-section {
        padding: 7rem 0;
    }
}

/* ---- Hours Panel ---- */

.r67-hours-panel {
    background: var(--r67-surface);
    border: 1px solid var(--r67-border-gold);
    border-radius: var(--r67-radius);
    padding: 2rem;
}

/* ---- Prose (CMS content) ---- */

.r67-prose h1,
.r67-prose h2,
.r67-prose h3 {
    font-family: var(--r67-heading);
    color: var(--r67-text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.r67-prose h1 { font-size: 2rem; }
.r67-prose h2 { font-size: 1.5rem; border-bottom: 1px solid var(--r67-border); padding-bottom: 0.5rem; }
.r67-prose h3 { font-size: 1.25rem; }

.r67-prose p {
    color: var(--r67-text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.r67-prose a {
    color: var(--r67-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.r67-prose a:hover {
    color: var(--r67-gold-light);
}

.r67-prose ul, .r67-prose ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--r67-text-secondary);
}

.r67-prose li { margin-bottom: 0.5rem; }

.r67-prose img {
    border-radius: var(--r67-radius);
    margin: 1.5rem 0;
}

.r67-prose blockquote {
    border-left: 3px solid var(--r67-gold);
    padding-left: 1.5rem;
    font-style: italic;
    color: var(--r67-text-secondary);
    margin: 1.5rem 0;
}

/* ---- Cart Badge ---- */

.r67-cart-badge {
    position: relative;
}

.r67-cart-badge .badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9999px;
    background: var(--r67-gold);
    color: var(--r67-bg);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: var(--r67-transition-fast);
}

.r67-cart-badge.has-items .badge-count {
    opacity: 1;
    transform: scale(1);
}

/* ---- CodLab Badge (dark variant) ---- */

.r67-codlab-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    transition: var(--r67-transition);
    text-decoration: none;
}

.r67-codlab-badge:hover {
    transform: translateY(-1px);
}

/* ---- Print ---- */

@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .r67-panel, .r67-card {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* === UX-Audit Fix 2026-07-14 (Fable) === */
/* #2 — stop scroll orizzontale (~105px) su mobile: orbs decorativi (.r67-glow-orb)
   e .r67-hero-bg sforavano il viewport. Clip a livello root. */
html { overflow-x: clip; }
/* .sr-only mancava nella tailwind ridotta del tema → l'h1 testuale (SEO) restava
   VISIBILE. Ripristino l'utility (audit 2026-07-14). */
.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }


/* ==========================================================================
   animations.css — UNITO QUI il 2026-07-25.
   Perché: erano 5 fogli di stile bloccanti in <head> per soli ~31KB totali.
   Il costo non era il peso ma i round-trip: 2224ms di render-blocking
   misurati su piccoloamore. Differirli non era possibile (contengono stati
   iniziali `opacity:0`: si sarebbe visto un flash), quindi si concatena.
   L'ordine della cascata è preservato: animations.css veniva caricato
   subito DOPO questo file, quindi il suo contenuto va in coda.
   ========================================================================== */
/* ================================================
   ROCCO67 — Animations
   ================================================ */

/* ---- Keyframes ---- */

@keyframes r67FadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes r67FadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes r67SlideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes r67SlideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes r67ScaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes r67GoldReveal {
    from { width: 0; }
    to { width: 64px; }
}

@keyframes r67SlowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

@keyframes r67Float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes r67OrbPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes r67GoldShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ---- Hero ---- */

.r67-hero-bg {
    animation: r67SlowZoom 25s ease-in-out forwards;
}

.r67-hero-title {
    animation: r67FadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
}

.r67-hero-subtitle {
    animation: r67FadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s both;
}

.r67-hero-cta {
    animation: r67FadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.1s both;
}

.r67-hero-scroll {
    animation: r67Float 3s ease-in-out infinite, r67FadeIn 1s 2s both;
}

/* ---- Scroll Reveal Classes ---- */

.fade-in-up,
.fade-in,
.slide-in-left,
.slide-in-right,
.scale-in {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up { transform: translateY(30px); }
.slide-in-left { transform: translateX(-40px); }
.slide-in-right { transform: translateX(40px); }
.scale-in { transform: scale(0.92); }

.fade-in-up.visible,
.fade-in.visible,
.slide-in-left.visible,
.slide-in-right.visible,
.scale-in.visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* ---- Gold Line Reveal ---- */

.r67-line-reveal {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--r67-gold), transparent);
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 0 auto;
}

.r67-line-reveal.visible {
    width: 64px;
}

/* ---- Staggered Delays ---- */

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }
.delay-700 { transition-delay: 700ms; }

/* ---- Feature Strip ---- */

.r67-feature-strip {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.r67-feature-strip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Image Hover ---- */

.r67-hover-zoom img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.r67-hover-zoom:hover img {
    transform: scale(1.06);
}

/* ---- Lightbox ---- */

.r67-lightbox-enter {
    animation: r67FadeIn 0.3s ease both;
}

.r67-lightbox-image-enter {
    animation: r67ScaleIn 0.3s ease both;
}

/* ---- Mobile Menu ---- */

.r67-mobile-menu-enter {
    animation: r67FadeIn 0.25s ease both;
}

.r67-mobile-menu-link:nth-child(1) { animation: r67FadeInUp 0.5s ease 0.05s both; }
.r67-mobile-menu-link:nth-child(2) { animation: r67FadeInUp 0.5s ease 0.1s both; }
.r67-mobile-menu-link:nth-child(3) { animation: r67FadeInUp 0.5s ease 0.15s both; }
.r67-mobile-menu-link:nth-child(4) { animation: r67FadeInUp 0.5s ease 0.2s both; }
.r67-mobile-menu-link:nth-child(5) { animation: r67FadeInUp 0.5s ease 0.25s both; }
.r67-mobile-menu-link:nth-child(6) { animation: r67FadeInUp 0.5s ease 0.3s both; }
.r67-mobile-menu-link:nth-child(7) { animation: r67FadeInUp 0.5s ease 0.35s both; }

/* ---- Smooth scroll ---- */

html {
    scroll-behavior: smooth;
}

/* ---- Accessibility ---- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
