/* ============================================
   ARM'S ITALIANO COFFEE — Global Stylesheet
   Updated: Responsive, Footer, Animations
   ============================================ */

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

:root {
    --rosso: #c41e3a; --rosso-dark: #8b0000; --rosso-light: #e63950;
    --oro: #c9a227; --oro-light: #e8c547; --oro-pale: #f0d78c;
    --nero: #0c0a09; --nero-warm: #12100e; --nero-soft: #181412;
    --nero-card: #1e1a16; --nero-elevated: #242018;
    --crema: #f5e6d3; --crema-soft: #e8d5c0; --crema-muted: #b8a89a;
    --grigio: #8a7e72; --grigio-dark: #5a5048;
    --font-bodoni: 'Bodoni Moda', 'Playfair Display', serif;
    --font-cormorant: 'Cormorant Garamond', 'Georgia', serif;
    --font-montserrat: 'Montserrat', 'Helvetica Neue', sans-serif;
    --font-lora: 'Lora', 'Georgia', serif;
    --font-italianno: 'Italianno', 'Great Vibes', cursive;
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-lora);
    background: var(--nero);
    color: var(--crema);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;1,6..96,400;1,6..96,500&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Montserrat:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;1,400;1,500&family=Italianno&display=swap');

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--nero);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 0.8s var(--ease-smooth), visibility 0.8s;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo { width: 80px; height: 80px; margin-bottom: 40px; opacity: 0; transform: scale(0.5); animation: preloaderLogoIn 0.8s var(--ease-smooth) 0.2s forwards; }
.preloader-logo img { width: 100%; height: 100%; object-fit: contain; }
.preloader-text { font-family: var(--font-bodoni); font-size: clamp(32px, 5vw, 52px); font-weight: 400; color: var(--crema); letter-spacing: 2px; opacity: 0; transform: translateY(20px); animation: preloaderTextIn 0.8s var(--ease-smooth) 0.5s forwards; }
.preloader-text em { font-style: italic; color: var(--oro); font-weight: 300; }
.preloader-sub { font-family: var(--font-montserrat); font-size: 10px; color: var(--grigio); letter-spacing: 6px; text-transform: uppercase; margin-top: 16px; opacity: 0; animation: preloaderTextIn 0.8s var(--ease-smooth) 0.7s forwards; }
.preloader-line { width: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--oro), transparent); margin-top: 40px; animation: preloaderLine 1.5s var(--ease-smooth) 0.9s forwards; }
.preloader-coffee-bean { width: 24px; height: 36px; margin-top: 30px; opacity: 0; animation: beanFloat 2s ease-in-out 1.2s infinite; }
.preloader-coffee-bean svg { width: 100%; height: 100%; fill: none; stroke: var(--oro); stroke-width: 1.5; }

@keyframes preloaderLogoIn { to { opacity: 1; transform: scale(1); } }
@keyframes preloaderTextIn { to { opacity: 1; transform: translateY(0); } }
@keyframes preloaderLine { to { width: 200px; } }
@keyframes beanFloat { 0%, 100% { opacity: 0.6; transform: translateY(0) rotate(0deg); } 50% { opacity: 1; transform: translateY(-10px) rotate(5deg); } }

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 60px; z-index: 1000;
    transition: all 0.5s var(--ease-smooth);
    background: transparent;
}
.navbar.scrolled { background: rgba(12, 10, 9, 0.95); backdrop-filter: blur(20px); box-shadow: 0 4px 40px rgba(0,0,0,0.4); padding: 14px 60px; }

.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; transition: transform 0.4s var(--ease-smooth); }
.logo:hover img { transform: scale(1.05); }
.logo-text { display: flex; flex-direction: column; }
.logo-text .brand-name { font-family: var(--font-italianno); font-size: 38px; color: var(--crema); line-height: 0.9; }
.logo-text .brand-sub { font-family: var(--font-montserrat); font-size: 9px; color: var(--oro); font-weight: 600; letter-spacing: 4px; text-transform: uppercase; margin-top: 2px; }

.nav-links { display: flex; gap: 40px; list-style: none; align-items: center; }
.nav-links a {
    font-family: var(--font-montserrat); color: var(--crema-muted); text-decoration: none;
    font-size: 11px; font-weight: 500; letter-spacing: 2.5px; text-transform: uppercase;
    transition: all 0.4s var(--ease-smooth); position: relative; padding: 8px 0;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
    background: var(--oro); transition: width 0.4s var(--ease-smooth);
}
.nav-links a:hover, .nav-links a.active { color: var(--oro); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ============================================
   MARBLE BACKGROUND (Animated)
   ============================================ */
.marble-bg {
    position: relative;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(65,45,25,0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(55,40,20,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(45,35,20,0.3) 0%, transparent 60%),
        linear-gradient(160deg, #0f0d0b 0%, #181410 30%, #14110d 60%, #0f0d0b 100%);
    overflow: hidden;
}
.marble-bg::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 120px, rgba(201,162,39,0.008) 120px, rgba(201,162,39,0.008) 121px),
                repeating-linear-gradient(-45deg, transparent, transparent 180px, rgba(201,162,39,0.005) 180px, rgba(201,162,39,0.005) 181px);
    pointer-events: none; animation: marbleShift 20s linear infinite;
}
@keyframes marbleShift { 0% { transform: translate(0,0); } 50% { transform: translate(10px,5px); } 100% { transform: translate(0,0); } }

.marble-vein { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.1; pointer-events: none; animation: veinFloat 15s ease-in-out infinite; }
.marble-vein.v1 { width: 700px; height: 250px; background: linear-gradient(90deg, transparent, var(--oro), transparent); top: 5%; left: -15%; transform: rotate(-12deg); animation-delay: 0s; }
.marble-vein.v2 { width: 500px; height: 180px; background: linear-gradient(90deg, transparent, var(--oro-light), transparent); top: 40%; right: -8%; transform: rotate(18deg); animation-delay: -5s; }
.marble-vein.v3 { width: 600px; height: 220px; background: linear-gradient(90deg, transparent, var(--rosso), transparent); bottom: 15%; left: 15%; transform: rotate(-6deg); animation-delay: -10s; }
.marble-vein.v4 { width: 350px; height: 120px; background: linear-gradient(90deg, transparent, var(--oro-pale), transparent); top: 60%; left: 45%; transform: rotate(30deg); animation-delay: -3s; }
@keyframes veinFloat { 0%,100% { transform: rotate(var(--r,0deg)) translate(0,0); opacity: 0.08; } 25% { transform: rotate(var(--r,0deg)) translate(15px,-10px); opacity: 0.12; } 50% { transform: rotate(var(--r,0deg)) translate(-5px,15px); opacity: 0.1; } 75% { transform: rotate(var(--r,0deg)) translate(10px,5px); opacity: 0.14; } }

/* Subtler variant for text-heavy sections (homepage) */
.marble-subtle .marble-vein { opacity: 0.05; filter: blur(70px); }

/* ============================================
   SECTION TRANSITIONS
   ============================================ */
section { position: relative; padding: 120px 60px; }
.section-header { position: relative; z-index: 2; text-align: center; margin-bottom: 80px; }
.section-header .watermark { font-family: var(--font-italianno); font-size: 32px; color: var(--oro); margin-bottom: 12px; opacity: 0.7; }
.section-header .label { font-family: var(--font-montserrat); font-size: 10px; color: var(--rosso); letter-spacing: 5px; text-transform: uppercase; font-weight: 600; margin-bottom: 16px; display: block; }
.section-header h2 { font-family: var(--font-bodoni); font-size: clamp(40px, 6vw, 64px); font-weight: 400; color: var(--crema); line-height: 1.1; letter-spacing: -1px; }
.section-header h2 em { font-style: italic; color: var(--rosso-light); font-weight: 300; }
.section-header p { font-family: var(--font-lora); color: var(--grigio); max-width: 520px; margin: 20px auto 0; font-size: 16px; line-height: 1.8; }

.skew-transition::before { content: ''; position: absolute; top: -80px; left: 0; right: 0; height: 160px; background: inherit; transform: skewY(-2.5deg); transform-origin: top left; z-index: 1; }
.skew-transition-alt::before { content: ''; position: absolute; top: -80px; left: 0; right: 0; height: 160px; background: inherit; transform: skewY(2.5deg); transform-origin: top right; z-index: 1; }

/* ============================================
   SOFT INTRO REVEAL — hero & page header text
   (calm fade-in + gentle upward drift, no scramble/jitter)
   ============================================ */
@keyframes softFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-watermark,
.hero-content h1,
.hero-subtitle,
.hero-desc,
.hero-cta,
.page-header-content .watermark,
.page-header-content h1 {
    opacity: 0;
    animation: softFadeUp 1.6s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.hero-watermark { animation-delay: 2.15s; }
.hero-content h1 { animation-delay: 2.4s; }
.hero-subtitle { animation-delay: 2.7s; }
.hero-desc { animation-delay: 2.9s; }
.hero-cta { animation-delay: 3.1s; }

.page-header-content .watermark { animation-delay: 2.15s; }
.page-header-content h1 { animation-delay: 2.4s; }

@media (prefers-reduced-motion: reduce) {
    .hero-watermark,
    .hero-content h1,
    .hero-subtitle,
    .hero-desc,
    .hero-cta,
    .page-header-content .watermark,
    .page-header-content h1 {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal { opacity: 0; transform: translateY(50px); transition: all 1s var(--ease-smooth); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

.reveal-left { opacity: 0; transform: translateX(-60px); transition: all 1s var(--ease-smooth); }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(60px); transition: all 1s var(--ease-smooth); }
.reveal-right.active { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.85); transition: all 1s var(--ease-smooth); }
.reveal-scale.active { opacity: 1; transform: scale(1); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, var(--rosso), var(--rosso-dark));
    color: #fff; padding: 16px 32px; border-radius: 30px;
    text-decoration: none; font-family: var(--font-montserrat);
    font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
    transition: all 0.5s var(--ease-smooth); border: none; cursor: pointer;
    position: relative; overflow: hidden;
}
.btn-primary::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent); transition: left 0.6s ease; }
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(196,30,58,0.3); }
.btn-primary svg { width: 16px; height: 16px; fill: #fff; }

/* ============================================
   FOOTER — FIXED & ENHANCED
   ============================================ */
.site-footer {
    background: var(--nero-soft);
    padding: 80px 60px 30px;
    text-align: center;
    position: relative;
    margin-top: 0;
    clear: both;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        #009246 0%, #009246 16.665%,
        #f1f2f1 16.665%, #f1f2f1 33.33%,
        #ce2b37 33.33%, #ce2b37 50%,
        #009246 50%, #009246 66.665%,
        #f1f2f1 66.665%, #f1f2f1 83.33%,
        #ce2b37 83.33%, #ce2b37 100%);
    background-size: 200% 100%;
    animation: flagScroll 7s linear infinite;
}

@keyframes flagScroll {
    from { background-position: 0% 0; }
    to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .site-footer::before { animation: none; }
}

.footer-content { position: relative; z-index: 2; }

.footer-logo { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 30px; }
.footer-logo img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; }
.footer-logo .text { font-family: var(--font-italianno); font-size: 42px; color: var(--crema); }

.footer-address { font-family: var(--font-lora); color: var(--crema-muted); font-size: 15px; margin-bottom: 8px; }
.footer-hours { font-family: var(--font-montserrat); color: var(--grigio); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }

.footer-divider { width: 50px; height: 1px; background: linear-gradient(90deg, var(--rosso), var(--oro)); margin: 28px auto; }

/* Social Links */
.social-links { display: flex; justify-content: center; gap: 16px; margin-top: 28px; }
.social-links a {
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.4s var(--ease-smooth);
    text-decoration: none;
}
.social-links a:hover {
    background: var(--rosso); border-color: var(--rosso);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 30px rgba(196,30,58,0.2);
}
.social-links a svg { width: 18px; height: 18px; fill: var(--grigio); transition: fill 0.3s ease; }
.social-links a:hover svg { fill: #fff; }

/* TYR VISUAL Signature */
.footer-signature {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.footer-signature p {
    font-family: var(--font-montserrat);
    font-size: 9px;
    color: var(--grigio-dark);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0.6;
    transition: opacity 0.4s ease;
}
.footer-signature p:hover { opacity: 1; color: var(--oro); }
.footer-signature p span {
    font-family: var(--font-montserrat);
    font-size: 11px;
    font-weight: 700;
    color: var(--oro);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-left: 4px;
}

.footer-copyright {
    font-family: var(--font-montserrat);
    color: var(--grigio);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 20px;
    opacity: 0.5;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */
/* Link hover glow */
a { transition: color 0.3s ease; }

/* Card hover lift */
.hover-lift { transition: transform 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth); }
.hover-lift:hover { transform: translateY(-8px); }

/* Image hover zoom */
.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform 0.8s var(--ease-smooth); }
.img-zoom:hover img { transform: scale(1.08); }

/* Underline hover animation */
.hover-underline { position: relative; }
.hover-underline::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 0; height: 1px; background: var(--oro);
    transition: width 0.4s var(--ease-smooth);
}
.hover-underline:hover::after { width: 100%; }

/* Button hover shine */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}
.btn-shine:hover::before { left: 100%; }

/* ============================================
   RESPONSIVE — MOBILE OPTIMIZATION
   ============================================ */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .navbar { padding: 16px 30px; }
    .navbar.scrolled { padding: 14px 30px; }
    section { padding: 80px 30px; }
    .nav-links { gap: 28px; }
    .hero-badge { display: none; }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    /* Navbar */
    .navbar { padding: 14px 20px; }
    .navbar.scrolled { padding: 12px 20px; }
    .logo-text .brand-name { font-size: 30px; }
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 10px; letter-spacing: 1.5px; }

    /* Sections */
    section { padding: 60px 20px; }
    .section-header { margin-bottom: 50px; }
    .section-header h2 { font-size: 32px; }
    .section-header p { font-size: 14px; }

    /* Hero */
    .hero-content h1 { font-size: 36px; }
    .hero-subtitle { font-size: 16px; }
    .hero-desc { font-size: 13px; }
    .hero-cta { flex-direction: column; align-items: center; gap: 12px; }
    .hero-cta .btn-primary, .hero-cta .btn-secondary { width: 100%; max-width: 280px; justify-content: center; }

    /* About grid — STACK VERTICALLY */
    .about-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
    .about-visual { min-height: auto !important; order: -1; }
    .about-photo-frame { display: none; }
    .about-content h2 { font-size: 28px; }
    .about-content p { font-size: 14px; }
    .about-quote { font-size: 18px; padding-left: 16px; }
    .stats-row { flex-wrap: wrap; gap: 24px; justify-content: center; }
    .stat .number { font-size: 32px; }

    /* Menu grid */
    .menu-grid { grid-template-columns: 1fr !important; }
    .menu-card-img { height: 200px; }

    /* Location */
    .location-card { grid-template-columns: 1fr !important; }
    .location-map { min-height: 300px !important; }
    .location-map iframe { min-height: 300px !important; }
    .location-info { padding: 30px !important; }
    .location-info h2 { font-size: 28px; }
    .info-item { padding: 12px 14px; }

    /* Events */
    .events-grid { grid-template-columns: 1fr !important; }
    .event-card { padding: 30px; }
    .event-card h3 { font-size: 22px; }

    /* Features */
    .features-grid { grid-template-columns: 1fr !important; gap: 20px; }
    .feature-item { padding: 20px; }

    /* Preview */
    .preview-grid { grid-template-columns: 1fr !important; }
    .preview-card { min-height: 280px; }
    .preview-card-content { padding: 24px; }
    .preview-card-content h3 { font-size: 24px; }

    /* Footer */
    .site-footer { padding: 60px 20px 24px; }
    .footer-logo .text { font-size: 32px; }
    .social-links { gap: 12px; }
    .social-links a { width: 40px; height: 40px; }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .nav-links { gap: 10px; }
    .nav-links a { font-size: 9px; letter-spacing: 1px; padding: 6px 0; }
    .logo img { width: 36px; height: 36px; }
    .logo-text .brand-name { font-size: 26px; }
    .hero-content h1 { font-size: 30px; }
    .section-header h2 { font-size: 26px; }
    .btn-primary { padding: 14px 24px; font-size: 10px; }
    .stat .number { font-size: 28px; }
    .about-content h2 { font-size: 24px; }
    .menu-card-body h3 { font-size: 22px; }
    .event-card h3 { font-size: 20px; }
}

/* Fix for very small screens */
@media (max-width: 360px) {
    .nav-links { gap: 8px; }
    .nav-links a { font-size: 8px; letter-spacing: 0.5px; }
    .hero-content h1 { font-size: 26px; }
}
