/* 3Dunion Lab - Custom Styles */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Exo+2:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    /* Colors from logo - more vibrant */
    --primary-blue: #3B82F6;
    --primary-orange: #F97316;
    --primary-red: #DC2626;
    --accent-cyan: #06B6D4;
    --accent-purple: #A855F7;
    --accent-green: #10B981;
    --accent-yellow: #FBBF24;
    
    /* Background colors */
    --bg-dark: #0A0E1A;
    --bg-darker: #060912;
    --bg-card: #1a2332;
    --bg-card-hover: #242f42;
    
    /* Text colors */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-orange) 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-red) 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2.5rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Exo 2', sans-serif;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Animated tech background — ampi gradienti colorati */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 10% 20%,  rgba(59, 130, 246, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 80%,  rgba(249, 115, 22, 0.16) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%,  rgba(168, 85, 247, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 10%,  rgba(6, 182, 212, 0.12)  0%, transparent 40%),
        radial-gradient(ellipse at 20% 90%,  rgba(16, 185, 129, 0.10) 0%, transparent 40%);
    animation: bgPulse 10s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.04); }
}

/* Tech grid overlay — doppia griglia più visibile */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.07) 1px, transparent 1px),
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
    background-position: 0 0, 0 0, 0 0, 0 0;
    animation: gridScroll 25s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes gridScroll {
    0%   { background-position: 0 0, 0 0, 0 0, 0 0; }
    100% { background-position: 80px 80px, 80px 80px, 16px 16px, 16px 16px; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 99999 !important;
    background: linear-gradient(180deg, rgba(10,14,26,0.82), rgba(10,14,26,0.75));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    margin: 0 auto;
    width: calc(100% - 48px);
    max-width: 1400px;
    box-shadow: 0 8px 30px rgba(2,6,23,0.6);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(59,130,246,0.06);
    pointer-events: auto !important;
    /* Garantisce visibilità anche su sezioni con overflow */
    will-change: background, box-shadow;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
}

/* Ensure navbar content is on top and interactive */
.nav-container,
.nav-menu,
.nav-actions {
    position: relative;
    z-index: 1100;
    pointer-events: auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1100;
}

.nav-logo {
    height: 30px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.35rem;
    align-items: center;
}

/* ── Tactile keycap nav buttons ── */
.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.45rem 1rem;
    border-radius: 7px;
    /* Raised surface */
    background: linear-gradient(160deg,
        rgba(255,255,255,0.055) 0%,
        rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.09);
    /* 3-layer shadow: bottom ledge (depth) + soft outer glow + inset top highlight */
    box-shadow:
        0 3px 0 rgba(0,0,0,0.55),
        0 4px 14px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.10);
    transition:
        color       0.18s ease,
        background  0.18s ease,
        border-color 0.18s ease,
        box-shadow  0.18s ease,
        transform   0.10s ease;
    cursor: pointer;
    overflow: hidden;
    user-select: none;
}

/* Shine sweep on hover */
.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        transparent 30%,
        rgba(255,255,255,0.07) 50%,
        transparent 70%);
    background-size: 200% 100%;
    background-position: -100% 0;
    transition: background-position 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}

/* Dot accent — sits left of label */
.nav-link::after {
    content: '';
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-blue);
    box-shadow: 0 0 6px var(--primary-blue);
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), background 0.2s ease;
}

/* ── Hover state ── */
.nav-link:hover {
    color: var(--text-primary);
    background: linear-gradient(160deg,
        rgba(59,130,246,0.14) 0%,
        rgba(59,130,246,0.06) 100%);
    border-color: rgba(59,130,246,0.45);
    box-shadow:
        0 3px 0 rgba(0,0,0,0.55),
        0 4px 20px rgba(59,130,246,0.18),
        0 0 0 1px rgba(59,130,246,0.15),
        inset 0 1px 0 rgba(255,255,255,0.13);
    transform: translateY(-2px);
}
.nav-link:hover::before {
    background-position: 200% 0;
}
.nav-link:hover::after {
    transform: translateY(-50%) scale(1);
}

/* ── Press state ── */
.nav-link:active {
    transform: translateY(2px);            /* key physically pressed down */
    box-shadow:
        0 0px 0 rgba(0,0,0,0.55),         /* ledge collapses = pressed */
        0 2px 6px rgba(0,0,0,0.25),
        inset 0 2px 4px rgba(0,0,0,0.3);  /* inner shadow = depth */
    background: linear-gradient(160deg,
        rgba(59,130,246,0.08) 0%,
        rgba(59,130,246,0.03) 100%);
    border-color: rgba(59,130,246,0.35);
    transition-duration: 0.06s;
}

/* ── Active / current section ── */
.nav-link.active {
    color: #fff;
    background: linear-gradient(160deg,
        rgba(249,115,22,0.22) 0%,
        rgba(59,130,246,0.14) 100%);
    border-color: rgba(249,115,22,0.55);
    box-shadow:
        0 3px 0 rgba(0,0,0,0.55),
        0 4px 22px rgba(249,115,22,0.20),
        0 0 0 1px rgba(249,115,22,0.18),
        inset 0 1px 0 rgba(255,255,255,0.14);
}
.nav-link.active::after {
    transform: translateY(-50%) scale(1);
    background: var(--primary-orange);
    box-shadow: 0 0 8px var(--primary-orange);
}
.nav-link.active:hover {
    border-color: rgba(249,115,22,0.75);
    box-shadow:
        0 3px 0 rgba(0,0,0,0.55),
        0 4px 28px rgba(249,115,22,0.28),
        0 0 0 1px rgba(249,115,22,0.25),
        inset 0 1px 0 rgba(255,255,255,0.16);
}

/* Focus ring for accessibility */
.nav-link:focus-visible {
    outline: 2px solid rgba(59,130,246,0.7);
    outline-offset: 3px;
}

/* Secondary nav links — hidden on small screens */
@media (max-width: 900px) {
    .nav-link--secondary {
        display: none;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 999px;
}

.btn-cta {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange));
    color: var(--text-primary);
    box-shadow: 0 8px 30px rgba(59,130,246,0.12);
    border: 1px solid rgba(255,255,255,0.04);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    display: block;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Microinteractions */
.nav-link:focus-visible {
    outline: 2px solid rgba(59,130,246,0.7);
    outline-offset: 3px;
}

.btn {
    overflow: hidden;
    position: relative;
    transition: transform 160ms var(--transition-fast), box-shadow 200ms var(--transition-fast);
}
.btn:active {
    transform: translateY(1px) scale(0.995);
}

.btn-cta {
    animation: pulseBtn 6s ease-in-out infinite;
}
@keyframes pulseBtn {
    0%, 100% { box-shadow: 0 8px 30px rgba(59,130,246,0.12); }
    50% { box-shadow: 0 14px 40px rgba(59,130,246,0.16); transform: translateY(-2px); }
}

/* Hamburger animation when open */
.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translateY(6px);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px);
}

/* Posizionamento per gli effetti interni ai pulsanti */
.nav-link, .btn, .lightbox-close, .back-to-top, .menu-toggle {
    position: relative;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 25px;
    margin-top: -80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.grid-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.geometric-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.shape {
    position: absolute;
    border: 2px solid;
    opacity: 0.15;
}

.shape-1 {
    top: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    border-color: var(--primary-blue);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: float 15s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

.shape-2 {
    top: 50%;
    right: 10%;
    width: 200px;
    height: 200px;
    border-color: var(--primary-orange);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite reverse;
    box-shadow: 0 0 40px rgba(249, 115, 22, 0.3);
}

.shape-3 {
    bottom: 10%;
    left: 15%;
    width: 250px;
    height: 250px;
    border-color: var(--primary-red);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation: float 18s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.3);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero-text {
    padding-right: 0;
    max-width: 100%;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    margin-left: 0.5cm;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease forwards;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
}

.title-line:nth-child(3) {
    animation-delay: 0.6s;
}

.title-line.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    margin-left: 0.5cm;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.8s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    margin-left: 0.5cm;
    opacity: 0;
    animation: fadeIn 0.8s ease 1s forwards;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
    border: 2px solid transparent;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
    z-index: 0;
}

.btn:hover::before {
    left: 100%;
}

.btn > * {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.5), 0 5px 20px rgba(249, 115, 22, 0.3);
    background: linear-gradient(135deg, var(--accent-cyan), var(--primary-orange));
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--primary-blue);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* Print Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.print-animation {
    position: relative;
    width: 780px;
    height: 780px;
}

.print-bed {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 760px;
    height: 8px;
    background: linear-gradient(180deg, #444, #222);
    border-radius: 4px;
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 0.3),
        inset 0 -2px 4px rgba(0,0,0,0.5);
}

.print-bed::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange));
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

/* Logo Print Animation */
.logo-print-wrapper {
    position: absolute;
    bottom: 58px;
    left: 50%;
    transform: translateX(-50%);
    width: 740px;
    height: 640px;
    z-index: 2;
}

.logo-printing {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    /* Hidden until animation starts */
    clip-path: inset(100% 0 0 0);
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.5))
            drop-shadow(0 0 6px rgba(249, 115, 22, 0.35));
}

/* logo-printing animation is now driven by JS (startPrintAnimation) */

/* Hot scanline glow at the current print boundary */
.logo-print-scanline {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 3px;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.9), rgba(59, 130, 246, 0.9), transparent);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.8), 0 0 6px rgba(59, 130, 246, 0.6);
}

/* scanline is now moved by JS */

/* logoReveal and scanlineMove keyframes removed — animation is JS-driven */

.nozzle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 60px;
    height: 80px;
    /* Resting position before animation starts: bottom-left of logo */
    transform: translateX(-310px) translateY(618px);
    opacity: 1;
    filter: drop-shadow(0 5px 20px rgba(249, 115, 22, 0.6));
    z-index: 30;
}

/* nozzle transform is now driven by JS */

/* Heater block */
.nozzle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 35px;
    background: linear-gradient(135deg, #333, #555);
    border-radius: 4px;
    box-shadow: inset 0 -2px 5px rgba(0,0,0,0.5);
}

/* Heat sink */
.nozzle::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 15px;
    background: repeating-linear-gradient(
        90deg,
        #888 0px,
        #888 3px,
        #666 3px,
        #666 6px
    );
    border-radius: 2px;
}

/* nozzlePrintScan keyframes removed — driven by JS */

/* Filament coming out */
.print-animation::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 35px;
    background: linear-gradient(180deg, 
        transparent, 
        rgba(249, 115, 22, 0.9), 
        rgba(249, 115, 22, 0.5));
    border-radius: 2px;
    top: 698px;
    left: calc(50% - 310px);
    transform: translateX(-50%);
    opacity: 0;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.8);
    pointer-events: none;
    z-index: 31;
}

/* filamentExtrude animation removed — nozzle driven by JS */

/* Gantry system */
.print-animation::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 10%;
    right: 10%;
    height: 6px;
    background: linear-gradient(180deg, #444, #666);
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeIn 0.8s ease 1.5s forwards;
}

.scroll-arrow {
    width: 2px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: scrollBounce 2s ease infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

/* Section Title */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.title-number {
    font-size: 1.5rem;
    color: var(--primary-blue);
    opacity: 0.5;
}

/* Services Section */
.services {
    padding: var(--spacing-xl) 0;
    position: relative;
    background: transparent;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), rgba(249, 115, 22, 0.5), transparent);
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.3;
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.4), transparent);
    border-radius: 0 var(--radius-lg) 0 0;
    opacity: 0;
    transition: var(--transition-base);
}

.service-card:hover::after {
    opacity: 1;
    width: 40px;
    height: 40px;
}

.service-card[data-service="1"]::before {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
}

.service-card[data-service="2"]::before {
    background: linear-gradient(135deg, var(--primary-orange), var(--accent-yellow));
}

.service-card[data-service="3"]::before {
    background: linear-gradient(135deg, var(--accent-purple), var(--primary-red));
}

.service-card[data-service="4"]::before {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: var(--spacing-md);
    transition: var(--transition-base);
}

.service-card[data-service="1"] .service-icon {
    color: var(--primary-blue);
}

.service-card[data-service="2"] .service-icon {
    color: var(--primary-orange);
}

.service-card[data-service="3"] .service-icon {
    color: var(--accent-purple);
}

.service-card[data-service="4"] .service-icon {
    color: var(--accent-green);
}

.service-card[data-service="1"]:hover .service-icon {
    color: var(--accent-cyan);
    transform: scale(1.1) rotate(5deg);
}

.service-card[data-service="2"]:hover .service-icon {
    color: var(--accent-yellow);
    transform: scale(1.1) rotate(5deg);
}

.service-card[data-service="3"]:hover .service-icon {
    color: var(--primary-red);
    transform: scale(1.1) rotate(5deg);
}

.service-card[data-service="4"]:hover .service-icon {
    color: var(--accent-cyan);
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.service-features li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
}

/* Process Section */
.process {
    padding: var(--spacing-xl) 0;
    background: rgba(6, 9, 18, 0.45);
    position: relative;
}

.process::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.5), rgba(16, 185, 129, 0.5), transparent);
    animation: borderGlow 3s ease-in-out infinite;
    animation-delay: 1s;
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: center;
    margin-top: var(--spacing-lg);
}

.process-step {
    grid-column: span 1;
    text-align: center;
}

.process-connector {
    grid-column: span 1;
    height: 2px;
    position: relative;
}

.process-step:nth-child(1) ~ .process-connector {
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
}

.process-step:nth-child(3) ~ .process-connector {
    background: linear-gradient(90deg, var(--primary-orange), var(--accent-yellow));
}

.process-step:nth-child(5) ~ .process-connector {
    background: linear-gradient(90deg, var(--accent-purple), var(--primary-red));
}

.process-connector::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--primary-orange);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-sm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.process-step:nth-child(1) .step-number {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
}

.process-step:nth-child(3) .step-number {
    background: linear-gradient(135deg, var(--primary-orange), var(--accent-yellow));
}

.process-step:nth-child(5) .step-number {
    background: linear-gradient(135deg, var(--accent-purple), var(--primary-red));
}

.process-step:nth-child(7) .step-number {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Portfolio Section */
.portfolio {
    padding: var(--spacing-xl) 0;
    background: transparent;
}

/* ═══════════════════════════════════════════════════
   INSTAGRAM FEED — 6 post su due righe
═══════════════════════════════════════════════════ */
.instagram-lead {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: -0.5rem auto 2rem;
}

.instagram-lead a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.instagram-lead a:hover {
    color: var(--primary-orange);
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.instagram-card {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.instagram-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.instagram-card:hover,
.instagram-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    outline: none;
}

.instagram-card:hover img,
.instagram-card:focus-visible img {
    transform: scale(1.06);
}

.instagram-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem;
    text-align: center;
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(249, 115, 22, 0.9));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.instagram-card:hover .instagram-card-overlay,
.instagram-card:focus-visible .instagram-card-overlay {
    opacity: 1;
}

.instagram-card-overlay svg {
    width: 30px;
    height: 30px;
}

.instagram-actions {
    text-align: center;
    margin-top: 2rem;
}

.instagram-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.instagram-actions .btn svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .instagram-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .instagram-lead {
        font-size: 0.88rem;
        margin-bottom: 1.5rem;
    }

    .instagram-card-overlay {
        font-size: 0.62rem;
        gap: 0.4rem;
    }

    .instagram-card-overlay svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .instagram-grid {
        gap: 0.45rem;
    }

    .instagram-card {
        border-radius: 10px;
    }

    .instagram-card-overlay span {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════
   CONTACT — immersive redesign
═══════════════════════════════════════════════════ */
.contact {
    padding: var(--spacing-xl) 0;
    background: rgba(6, 9, 18, 0.50);
    position: relative;
    overflow: hidden;
}

/* Animated background orbs */
.contact-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.contact-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .18;
    animation: orbDrift 14s ease-in-out infinite alternate;
}
.contact-orb--blue   { width: 500px; height: 500px; background: #3B82F6; top: -100px; left: -150px; animation-delay: 0s; }
.contact-orb--orange { width: 400px; height: 400px; background: #F97316; bottom: -80px; right: -100px; animation-delay: -5s; }
.contact-orb--purple { width: 300px; height: 300px; background: #A855F7; top: 40%; left: 40%; animation-delay: -9s; }
@keyframes orbDrift {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}

.contact-inner { position: relative; z-index: 1; }

/* Headline */
.contact-headline {
    text-align: center;
    margin-bottom: 3.5rem;
}
.contact-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.25rem;
}
.contact-typewriter {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-right: 3px solid var(--primary-blue);
    padding-right: 4px;
    animation: cursorBlink .8s step-end infinite;
    white-space: nowrap;
    display: inline-block;
}
@keyframes cursorBlink {
    0%, 100% { border-color: var(--primary-blue); }
    50%       { border-color: transparent; }
}
.contact-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Channel cards */
.contact-channels {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    align-items: stretch;
}

.channel-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 20px;
    padding: 2rem 1.75rem 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    overflow: hidden;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), border-color .3s, box-shadow .3s;
    cursor: pointer;
}
.channel-card:hover {
    transform: translateY(-6px);
}

/* Per-card accent colours */
.channel-card--primary  { --cc: #3B82F6; border-color: rgba(59,130,246,.2); }
.channel-card--whatsapp { --cc: #25D366; border-color: rgba(37,211,102,.15); }
.channel-card--email    { --cc: #F97316; border-color: rgba(249,115,22,.15); }

.channel-card:hover {
    border-color: rgba(var(--cc-rgb, 59,130,246), .45);
    box-shadow: 0 20px 60px -10px rgba(0,0,0,.5), 0 0 0 1px var(--cc);
}
.channel-card--primary:hover  { box-shadow: 0 20px 60px -10px rgba(59,130,246,.25),  0 0 0 1px #3B82F6; }
.channel-card--whatsapp:hover { box-shadow: 0 20px 60px -10px rgba(37,211,102,.2),   0 0 0 1px #25D366; }
.channel-card--email:hover    { box-shadow: 0 20px 60px -10px rgba(249,115,22,.2),   0 0 0 1px #F97316; }

/* Glow layer */
.channel-card-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .4s;
    pointer-events: none;
    border-radius: inherit;
}
.channel-card--primary  .channel-card-glow { background: radial-gradient(ellipse at 20% 0%, rgba(59,130,246,.12) 0%, transparent 70%); }
.channel-card--whatsapp .channel-card-glow { background: radial-gradient(ellipse at 20% 0%, rgba(37,211,102,.1)  0%, transparent 70%); }
.channel-card--email    .channel-card-glow { background: radial-gradient(ellipse at 20% 0%, rgba(249,115,22,.1)  0%, transparent 70%); }
.channel-card:hover .channel-card-glow { opacity: 1; }

/* Badge */
.channel-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    background: linear-gradient(135deg, #3B82F6, #06B6D4);
    color: #fff;
    font-family: var(--font-display);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .25rem .65rem;
    border-radius: 20px;
}

/* Icon */
.channel-icon-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.channel-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid var(--cc, #3B82F6);
    opacity: .25;
    transition: opacity .3s, transform .3s;
}
.channel-card:hover .channel-icon-ring {
    opacity: .6;
    transform: scale(1.15);
}
.channel-icon {
    width: 36px;
    height: 36px;
    color: var(--cc, #3B82F6);
    transition: transform .3s;
    position: relative;
    z-index: 1;
}
.channel-card--primary  .channel-icon { color: #3B82F6; }
.channel-card--whatsapp .channel-icon { color: #25D366; }
.channel-card--email    .channel-icon { color: #F97316; }
.channel-card:hover .channel-icon { transform: scale(1.12); }

/* Body */
.channel-body { flex: 1; }
.channel-body h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: .5rem;
    font-weight: 600;
}
.channel-body p {
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.6;
}

/* Footer row */
.channel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .75rem;
    border-top: 1px solid rgba(255,255,255,.05);
    gap: .5rem;
}
.channel-cta {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-family: var(--font-display);
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: gap .25s;
}
.channel-card:hover .channel-cta { gap: .6rem; }
.channel-card--primary  .channel-cta { color: #3B82F6; }
.channel-card--whatsapp .channel-cta { color: #25D366; }
.channel-card--email    .channel-cta { color: #F97316; }

.channel-time {
    font-size: .72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Promise strip */
.contact-promises-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem 0;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px;
    padding: 1rem 2rem;
}
.promise-strip-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    color: var(--text-secondary);
    padding: 0 1.5rem;
    white-space: nowrap;
}
.psi-icon { font-size: 1rem; }
.psi-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,.1);
}

/* Responsive */
@media (max-width: 900px) {
    .contact-channels { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
    .contact-title { font-size: 1.7rem; }
    .contact-typewriter { white-space: normal; }
    .promise-strip-item { padding: 0 .75rem; font-size: .8rem; }
    .psi-divider { display: none; }
    .contact-promises-strip { gap: .6rem; }
}

/* Footer */
.footer {
    background: rgba(6, 9, 18, 0.80);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.footer-content .footer-column:last-child {
    text-align: right;
}

.footer-content .footer-column:last-child ul {
    align-items: flex-end;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo img {
    width: 220px;
    height: auto;
    margin-bottom: var(--spacing-xs);
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4)) drop-shadow(0 0 8px rgba(249, 115, 22, 0.3));
}

.footer-logo p {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-column a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Dati dell'attività nel footer (NAP): nome, territorio, telefono, email.
   Devono restare leggibili anche perché Google li usa per la SEO locale. */
.footer-nap {
    margin-top: .5rem;
    font-size: .8rem;
    line-height: 1.7;
    color: var(--text-muted);
    opacity: .8;
}

.footer-nap a {
    color: var(--text-secondary, var(--text-muted));
    text-decoration: none;
    border-bottom: 1px solid rgba(59, 130, 246, .25);
}

.footer-nap a:hover {
    color: var(--accent-color, #3b82f6);
    border-bottom-color: var(--accent-color, #3b82f6);
}

/* ── Scroll offset per navbar fissa ──────────────────
   Navbar: top 16px + altezza ~65px ≈ 81px totali.
   scroll-margin-top fa sì che la sezione arrivi
   visivamente centrata sotto la navbar.
─────────────────────────────────────────────────── */
html {
    scroll-padding-top: 96px;
}

#home, #servizi, #materiali, #portfolio,
#recensioni, #preventivo, #contatti,
.stats-band, .materials-section, .befaft-section,
.process, .calculator-section, .social-section {
    scroll-margin-top: 96px;
}

@media (max-width: 768px) {
    html { scroll-padding-top: 82px; }
    #home, #servizi, #materiali, #portfolio,
    #recensioni, #preventivo, #contatti,
    .stats-band, .materials-section, .befaft-section,
    .process, .calculator-section, .social-section {
        scroll-margin-top: 82px;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .hero-visual {
        order: -1;
    }
    
    .print-animation {
        width: 360px;
        height: 360px;
        transform: scale(1);
    }

    .logo-print-wrapper {
        width: 320px;
        height: 275px;
    }

    .print-bed {
        width: 340px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-content .footer-column:last-child {
        text-align: center;
    }
    .footer-content .footer-column:last-child ul {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 120px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(20px);
        padding: var(--spacing-md);
        gap: 0.5rem;
        transition: var(--transition-base);
        border-top: 1px solid rgba(59, 130, 246, 0.1);
    }

    .nav-link {
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.65rem 1rem;
    }
    
    .logo {
        width: 250px;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .process-timeline {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .process-step,
    .process-connector {
        grid-column: span 1;
    }
    
    .process-connector {
        width: 2px;
        height: 40px;
        margin: 0 auto;
    }
    
    .process-connector::after {
        bottom: 0;
        top: auto;
        left: 50%;
        transform: translateX(-50%) rotate(90deg);
    }
    
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Reviews Section */
.reviews {
    padding: var(--spacing-xl) 0;
    background: rgba(6, 9, 18, 0.45);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.review-card {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-blue);
    position: relative;
    transition: var(--transition-base);
}

.review-card:nth-child(2) {
    border-left-color: var(--primary-orange);
}

.review-card:nth-child(3) {
    border-left-color: var(--accent-purple);
}

.review-card:nth-child(4) {
    border-left-color: var(--accent-green);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.review-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: var(--spacing-sm);
}

.star {
    width: 20px;
    height: 20px;
    color: var(--accent-yellow);
}

.review-text {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.review-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
}

.author-info h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.author-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Social Links */
.social-section {
    padding: var(--spacing-lg) 0;
    background: rgba(6, 9, 18, 0.40);
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.social-content {
    text-align: center;
}

.social-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-content p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.social-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid;
    transition: var(--transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: var(--transition-base);
}

.social-link.instagram {
    border-color: #E4405F;
    color: #E4405F;
}

.social-link.instagram::before {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}

/* TikTok: i due colori del marchio (ciano + rosso), non solo il rosso */
.social-link.tiktok {
    border-color: transparent;
    color: #25F4EE;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(135deg, #25F4EE 0%, #FE2C55 100%) border-box;
}

.social-link.tiktok::before {
    background: linear-gradient(135deg, #25F4EE, #FE2C55);
}

/* L'icona è già sfumata: al passaggio del mouse il cerchio si accende
   appena, senza coprirla con un riempimento pieno. */
.social-link.tiktok:hover::before {
    opacity: .2;
}

.social-link.tiktok:hover {
    box-shadow: 0 10px 30px rgba(37, 244, 238, .22), 0 4px 24px rgba(254, 44, 85, .22);
}

.social-link.whatsapp {
    border-color: #25D366;
    color: #25D366;
}

.social-link.whatsapp::before {
    background: #25D366;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:hover svg {
    color: white;
}

.social-link svg {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 1;
    transition: var(--transition-base);
}

/* Tech Background Elements */
.tech-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Ensure decorative children do not intercept pointer events */
.tech-background > * {
    pointer-events: none;
}

/* Circuit Lines */
.circuit-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(90deg, transparent 0%, transparent 47%, rgba(59, 130, 246, 0.18) 49%, rgba(59, 130, 246, 0.18) 51%, transparent 53%, transparent 100%),
        linear-gradient(0deg,  transparent 0%, transparent 47%, rgba(249, 115, 22, 0.14) 49%, rgba(249, 115, 22, 0.14) 51%, transparent 53%, transparent 100%),
        linear-gradient(90deg, transparent 0%, transparent 23%, rgba(6, 182, 212, 0.08) 24%, rgba(6, 182, 212, 0.08) 25%, transparent 26%, transparent 100%),
        linear-gradient(0deg,  transparent 0%, transparent 73%, rgba(168, 85, 247, 0.08) 74%, rgba(168, 85, 247, 0.08) 75%, transparent 76%, transparent 100%);
    background-size: 300px 300px, 300px 300px, 150px 150px, 200px 200px;
    animation: circuitMove 18s linear infinite;
}

@keyframes circuitMove {
    0%   { background-position: 0 0, 0 0, 0 0, 0 0; opacity: 0.5; }
    50%  { opacity: 1; }
    100% { background-position: 300px 300px, -300px -300px, 150px 150px, -200px 200px; opacity: 0.5; }
}

/* Animated Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 50%;
    box-shadow:
        0 0 6px rgba(59, 130, 246, 1),
        80px 60px 0 1px rgba(249, 115, 22, 0.9),
        160px 140px 0 1px rgba(6, 182, 212, 0.9),
        240px 30px 0 1px rgba(168, 85, 247, 0.9),
        320px 100px 0 1px rgba(16, 185, 129, 0.9),
        400px 180px 0 1px rgba(251, 191, 36, 0.9),
        480px 80px 0 1px rgba(59, 130, 246, 0.9),
        560px 160px 0 1px rgba(249, 115, 22, 0.8),
        640px 50px 0 1px rgba(6, 182, 212, 0.8),
        720px 130px 0 1px rgba(168, 85, 247, 0.8),
        800px 200px 0 1px rgba(16, 185, 129, 0.8),
        880px 70px 0 1px rgba(251, 191, 36, 0.8),
        960px 150px 0 1px rgba(59, 130, 246, 0.8),
        1040px 30px 0 1px rgba(249, 115, 22, 0.8),
        1120px 110px 0 1px rgba(6, 182, 212, 0.8),
        1200px 190px 0 1px rgba(168, 85, 247, 0.8),
        120px 200px 0 1px rgba(16, 185, 129, 0.7),
        280px 90px 0 1px rgba(251, 191, 36, 0.7),
        440px 170px 0 1px rgba(59, 130, 246, 0.7),
        600px 40px 0 1px rgba(249, 115, 22, 0.7),
        760px 120px 0 1px rgba(6, 182, 212, 0.7),
        920px 200px 0 1px rgba(168, 85, 247, 0.7),
        1080px 60px 0 1px rgba(16, 185, 129, 0.7),
        1240px 140px 0 1px rgba(251, 191, 36, 0.7);
    animation: particlesFloat 22s linear infinite;
}

.particles::after {
    animation-delay: -11s;
    animation-duration: 28s;
    box-shadow:
        40px 100px 0 1px rgba(59, 130, 246, 0.8),
        200px 20px 0 1px rgba(249, 115, 22, 0.8),
        360px 160px 0 1px rgba(6, 182, 212, 0.8),
        520px 60px 0 1px rgba(168, 85, 247, 0.8),
        680px 140px 0 1px rgba(16, 185, 129, 0.8),
        840px 30px 0 1px rgba(251, 191, 36, 0.8),
        1000px 170px 0 1px rgba(59, 130, 246, 0.7),
        1160px 90px 0 1px rgba(249, 115, 22, 0.7);
}

@keyframes particlesFloat {
    0%   { transform: translateY(0)      translateX(0);   opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translateY(-1200px) translateX(80px); opacity: 0; }
}

/* Hexagonal Grid */
.hex-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(30deg,  rgba(59, 130, 246, 0.06) 12%, transparent 12.5%, transparent 87%, rgba(59, 130, 246, 0.06) 87.5%),
        linear-gradient(150deg, rgba(59, 130, 246, 0.06) 12%, transparent 12.5%, transparent 87%, rgba(59, 130, 246, 0.06) 87.5%),
        linear-gradient(30deg,  rgba(6, 182, 212, 0.04)  12%, transparent 12.5%, transparent 87%, rgba(6, 182, 212, 0.04)  87.5%),
        linear-gradient(150deg, rgba(6, 182, 212, 0.04)  12%, transparent 12.5%, transparent 87%, rgba(6, 182, 212, 0.04)  87.5%),
        linear-gradient(60deg,  rgba(249, 115, 22, 0.04) 25%, transparent 25.5%, transparent 75%, rgba(249, 115, 22, 0.04) 75%),
        linear-gradient(60deg,  rgba(168, 85, 247, 0.03) 25%, transparent 25.5%, transparent 75%, rgba(168, 85, 247, 0.03) 75%);
    background-size: 60px 104px;
    background-position: 0 0, 0 0, 30px 52px, 30px 52px, 0 0, 30px 52px;
    animation: hexFloat 35s linear infinite;
}

@keyframes hexFloat {
    0%   { background-position: 0 0, 0 0, 30px 52px, 30px 52px, 0 0, 30px 52px; opacity: 0.5; }
    50%  { opacity: 0.9; }
    100% { background-position: 60px 104px, 60px 104px, 90px 156px, 90px 156px, 60px 104px, 90px 156px; opacity: 0.5; }
}

/* Scanning lines effect — più visibile */
.tech-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.0) 20%,
        rgba(59, 130, 246, 0.7) 40%,
        rgba(6, 182, 212, 1.0) 50%,
        rgba(59, 130, 246, 0.7) 60%,
        rgba(59, 130, 246, 0.0) 80%,
        transparent 100%);
    filter: blur(1px);
    animation: scanLine 6s linear infinite;
}

@keyframes scanLine {
    0%   { top: -4px; opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

/* Data streams */
.tech-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(59, 130, 246, 0.025) 3px,
            rgba(59, 130, 246, 0.025) 4px
        );
    animation: dataStream 15s linear infinite;
    pointer-events: none;
}

@keyframes dataStream {
    0%   { transform: translateY(0); }
    100% { transform: translateY(32px); }
}

/* Ensure content is above background */
section,
footer {
    position: relative;
    z-index: 1;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--accent-cyan), var(--primary-orange));
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.6), 0 5px 20px rgba(249, 115, 22, 0.4);
    border-color: rgba(249, 115, 22, 0.7);
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: var(--transition-base);
}

.back-to-top:hover svg {
    transform: translateY(-3px);
    animation: arrowBounce 0.6s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Glow effect on scroll */
.back-to-top::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
    border-radius: 50%;
    opacity: 0;
    filter: blur(10px);
    transition: var(--transition-base);
    z-index: -1;
}

.back-to-top:hover::before {
    opacity: 0.8;
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.4;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .back-to-top svg {
        width: 24px;
        height: 24px;
    }
}

/* Gallery Lightbox */
/* ═══════════════════════════════════════════════════════
   LIGHTBOX — reimpostata centrata
═══════════════════════════════════════════════════════ */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 18, 0.96);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    z-index: 100000;
    display: none;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
.gallery-lightbox.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* ── X chiudi — angolo in alto a destra ── */
.lightbox-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.18);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease, transform 0.25s ease, border-color 0.2s ease;
}
.lightbox-close:hover {
    background: rgba(239,68,68,0.25);
    border-color: rgba(239,68,68,0.6);
    transform: rotate(90deg) scale(1.08);
}
.lightbox-close svg { width: 20px; height: 20px; }

/* ── Titolo + contatore in alto a sinistra ── */
.lightbox-title-bar {
    position: absolute;
    top: 1.2rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    pointer-events: none;
}
.lightbox-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.lightbox-counter {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.1em;
}
.lightbox-counter span { color: var(--primary-blue); font-weight: 700; }

/* ── Stage: area centrale con immagine e frecce ── */
.lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 5rem 0;  /* top: spazio per barra titolo */
    position: relative;
    min-height: 0;
}

/* ── Immagine ── */
.lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    height: 100%;
}
.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    display: block;
    animation: lbZoomIn 0.3s cubic-bezier(0.34,1.3,0.64,1);
}
@keyframes lbZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Loader ── */
.image-loader {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 48px; height: 48px;
    border: 3px solid rgba(59,130,246,0.2);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    display: none;
}
.image-loader.loading { display: block; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ── Frecce di navigazione ── */
.lightbox-nav {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    z-index: 5;
    margin: 0 0.8rem;
}
.lightbox-nav:hover {
    background: rgba(59,130,246,0.25);
    border-color: rgba(59,130,246,0.6);
    transform: scale(1.1);
}
.lightbox-nav svg { width: 24px; height: 24px; }

/* ── Thumbnail strip in basso ── */
.lightbox-thumbs {
    padding: 0.9rem 1.5rem 1rem;
    display: flex;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.thumbnail-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 3px;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(59,130,246,0.4) transparent;
}
.thumbnail-strip::-webkit-scrollbar { height: 3px; }
.thumbnail-strip::-webkit-scrollbar-track { background: transparent; }
.thumbnail-strip::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.4); border-radius: 3px; }

.thumbnail-item {
    width: 80px;
    height: 60px;
    border-radius: 7px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    opacity: 0.6;
}
.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}
.thumbnail-item:hover {
    border-color: rgba(59,130,246,0.6);
    opacity: 0.85;
    transform: translateY(-2px);
}
.thumbnail-item:hover img { transform: scale(1.08); }
.thumbnail-item.active {
    border-color: var(--primary-orange);
    box-shadow: 0 0 14px rgba(249,115,22,0.45);
    opacity: 1;
    transform: translateY(-3px);
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .lightbox-stage { padding: 4rem 0.5rem 0; }
    .lightbox-nav { width: 40px; height: 40px; margin: 0 0.3rem; }
    .lightbox-nav svg { width: 18px; height: 18px; }
    .thumbnail-item { width: 60px; height: 45px; }
    .lightbox-title { font-size: 0.82rem; }
    .lightbox-thumbs { padding: 0.7rem 0.8rem 0.8rem; }
}
@media (max-width: 480px) {
    .lightbox-nav { width: 34px; height: 34px; margin: 0 0.2rem; }
    .thumbnail-item { width: 52px; height: 40px; border-radius: 5px; }
    .lightbox-close { top: 0.7rem; right: 0.7rem; width: 38px; height: 38px; }
}

/* ═══════════════════════════════════════════════════════
   WIDGET 1 — STATS BAND
═══════════════════════════════════════════════════════ */
.stats-band {
    padding: 2.5rem 0;
    background: rgba(6, 9, 18, 0.50);
    border-top: 1px solid rgba(59,130,246,0.18);
    border-bottom: 1px solid rgba(59,130,246,0.18);
    position: relative;
    overflow: hidden;
}
.stats-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg,
        transparent 0px, transparent 99px,
        rgba(59,130,246,0.04) 100px);
    pointer-events: none;
}
.stats-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 3rem;
    position: relative;
}
.stat-icon {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
    filter: grayscale(0.2);
}
.stat-item .stat-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    transition: none;
}
.stat-item .stat-unit {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-orange), var(--accent-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
/* number + unit sit on same line */
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    text-align: center;
}
.stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg,
        transparent, rgba(59,130,246,0.3), transparent);
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .stats-grid { flex-wrap: wrap; }
    .stat-divider { display: none; }
    .stat-item { padding: 1rem 1.5rem; flex: 1 1 40%; }
}

/* ═══════════════════════════════════════════════════════
   WIDGET 2 — MATERIAL SELECTOR
═══════════════════════════════════════════════════════ */
.materials-section {
    padding: var(--spacing-xl) 0;
    position: relative;
    background: transparent;
}
.materials-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.5), rgba(249,115,22,0.5), transparent);
}
.materials-widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(59,130,246,0.12);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.material-tabs {
    display: flex;
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(59,130,246,0.12);
    overflow-x: auto;
    scrollbar-width: none;
}
.material-tabs::-webkit-scrollbar { display: none; }
.material-tab {
    flex: 1;
    min-width: 80px;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.material-tab::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 50%; right: 50%;
    height: 3px;
    background: var(--mat-color, var(--primary-blue));
    transition: all 0.25s ease;
    border-radius: 2px 2px 0 0;
}
.material-tab:hover { color: var(--text-secondary); }
.material-tab.active {
    color: #fff;
    background: rgba(59,130,246,0.06);
}
.material-tab.active::after { left: 0; right: 0; }

.material-body {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    min-height: 300px;
}
.material-left, .material-center, .material-right {
    padding: 2rem;
}
.material-left {
    border-right: 1px solid rgba(59,130,246,0.1);
}
.material-center {
    border-right: 1px solid rgba(59,130,246,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}
.material-right {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.mat-name {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    background: var(--mat-gradient, linear-gradient(135deg, var(--primary-blue), var(--accent-cyan)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
    transition: all 0.3s ease;
}
.mat-fullname {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}
.mat-description {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}
.mat-usecases {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.usecase-tag {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mat-colors-label, .mat-props-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    align-self: flex-start;
}
.mat-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.mat-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    position: relative;
}
.mat-color-swatch:hover {
    transform: scale(1.2);
    border-color: rgba(255,255,255,0.5);
}
.mat-color-swatch.selected {
    border-color: #fff;
    transform: scale(1.25);
    box-shadow: 0 0 12px rgba(255,255,255,0.4);
}

/* CSS isometric cube preview */
.mat-preview {
    perspective: 600px;
    width: 100px;
    height: 90px;
    margin: 0.5rem auto;
}
.mat-cube {
    width: 60px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-20deg) rotateY(30deg);
    animation: cubeFloat 4s ease-in-out infinite;
    margin: 0 auto;
}
@keyframes cubeFloat {
    0%, 100% { transform: rotateX(-20deg) rotateY(30deg) translateY(0); }
    50%       { transform: rotateX(-20deg) rotateY(30deg) translateY(-6px); }
}
.cube-face {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1.5px solid rgba(255,255,255,0.25);
    transition: background 0.5s ease, box-shadow 0.5s ease;
}
.cube-top {
    background: var(--mat-cube-top, rgba(59,130,246,0.55));
    transform: rotateX(90deg) translateZ(30px);
    box-shadow: inset 0 0 20px rgba(255,255,255,0.1);
}
.cube-front {
    background: var(--mat-cube-front, rgba(59,130,246,0.35));
    transform: translateZ(30px);
}
.cube-right {
    background: var(--mat-cube-right, rgba(59,130,246,0.45));
    transform: rotateY(90deg) translateZ(30px);
}

/* Properties bars */
.mat-props {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    width: 100%;
}
.mat-prop-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.mat-prop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mat-prop-name {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.mat-prop-pct {
    font-family: var(--font-display);
    font-size: 0.72rem;
    color: var(--text-muted);
}
.mat-prop-track {
    height: 5px;
    background: rgba(255,255,255,0.07);
    border-radius: 3px;
    overflow: hidden;
}
.mat-prop-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--mat-gradient, linear-gradient(90deg, var(--primary-blue), var(--accent-cyan)));
    transition: width 0.7s cubic-bezier(0.34,1.2,0.64,1);
    width: 0%;
}

@media (max-width: 900px) {
    .material-body {
        grid-template-columns: 1fr;
    }
    .material-left, .material-center {
        border-right: none;
        border-bottom: 1px solid rgba(59,130,246,0.1);
    }
}

/* ═══════════════════════════════════════════════════════
   WIDGET 3 — BEFORE / AFTER SLIDER
═══════════════════════════════════════════════════════ */
.befaft-section {
    padding: var(--spacing-xl) 0;
    position: relative;
    background: transparent;
}
.befaft-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(249,115,22,0.4), rgba(59,130,246,0.4), transparent);
}
.befaft-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: -2rem;
    margin-bottom: 2.5rem;
    letter-spacing: 0.02em;
}
.befaft-outer {
    display: flex;
    justify-content: center;
}
.befaft-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5),
                0 0 0 1px rgba(59,130,246,0.15);
    background: #07101e;
}

/* Shared image style */
.befaft-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    display: block;
}

/* AFTER layer (base, full width) */
.befaft-after {
    position: absolute;
    inset: 0;
}

/* BEFORE layer (clipped by JS) */
.befaft-before {
    position: absolute;
    inset: 0;
    clip-path: inset(0 50% 0 0);
}

/* Labels */
.befaft-label {
    position: absolute;
    bottom: 18px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    padding: .3rem .75rem;
    border-radius: 4px;
    backdrop-filter: blur(6px);
}
.befaft-label--left {
    left: 24px;
    color: rgba(59,130,246,1);
    background: rgba(5,11,20,0.65);
    border: 1px solid rgba(59,130,246,0.3);
}
.befaft-label--right {
    right: 24px;
    color: rgba(249,115,22,1);
    background: rgba(5,11,20,0.65);
    border: 1px solid rgba(249,115,22,0.3);
}

/* Drag handle */
.befaft-handle {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}
.handle-bar {
    position: absolute;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255,255,255,0.7) 15%,
        rgba(255,255,255,0.7) 85%,
        transparent 100%);
    box-shadow: 0 0 8px rgba(255,255,255,0.4);
}
.handle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(59,130,246,0.5),
                0 0 0 3px rgba(255,255,255,0.15);
    position: relative;
    z-index: 11;
    transition: transform 0.15s ease;
}
.befaft-container:active .handle-btn {
    transform: scale(0.92);
}

/* ═══════════════════════════════════════════════════════
   WIDGET 4 — PRICE CALCULATOR
═══════════════════════════════════════════════════════ */
.calculator-section {
    padding: var(--spacing-xl) 0;
    position: relative;
    background: transparent;
}
.calculator-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.5), rgba(249,115,22,0.5), transparent);
}
.calc-intro {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -2rem;
    margin-bottom: 2.5rem;
}
.calc-note {
    margin-top: 0.85rem;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-muted);
}
.calc-note a {
    color: var(--primary-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.calc-note a:hover { color: #fff; }
.calc-wrapper {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
}
.calc-controls {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.calc-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.calc-label {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.calc-label-icon { font-size: 1rem; }

/* Material buttons */
.calc-material-btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.calc-mat-btn {
    padding: 0.5rem 1.1rem;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 0 rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
}
.calc-mat-btn:hover {
    color: var(--text-primary);
    border-color: rgba(59,130,246,0.4);
    background: rgba(59,130,246,0.08);
    transform: translateY(-1px);
}
.calc-mat-btn.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(6,182,212,0.1));
    border-color: var(--primary-blue);
    color: #fff;
    box-shadow: 0 2px 0 rgba(0,0,0,0.4), 0 0 14px rgba(59,130,246,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Sliders */
.calc-sliders {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.calc-slider-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.slider-axis {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    width: 14px;
    flex-shrink: 0;
}
.calc-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-blue) var(--pct, 50%), rgba(255,255,255,0.1) var(--pct, 50%));
    outline: none;
    cursor: pointer;
}
.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    box-shadow: 0 0 8px rgba(59,130,246,0.6), 0 2px 4px rgba(0,0,0,0.4);
    cursor: ew-resize;
    transition: transform 0.15s ease;
}
.calc-slider::-webkit-slider-thumb:hover { transform: scale(1.25); }
.calc-slider::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    border: none;
    box-shadow: 0 0 8px rgba(59,130,246,0.6);
    cursor: ew-resize;
}
.slider-val {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

/* Finish buttons */
.calc-finish-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}
.calc-finish-btn {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    box-shadow: 0 2px 0 rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}
.calc-finish-btn strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
    transition: color 0.2s;
}
.calc-finish-btn small {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.calc-finish-btn:hover {
    border-color: rgba(59,130,246,0.3);
    background: rgba(59,130,246,0.05);
}
.calc-finish-btn.active {
    border-color: var(--primary-orange);
    background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(220,38,38,0.06));
    box-shadow: 0 2px 0 rgba(0,0,0,0.4), 0 0 18px rgba(249,115,22,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}
.calc-finish-btn.active strong { color: #fff; }

/* Result panel */
.calc-result {
    position: sticky;
    top: 120px;
}
.calc-result-inner {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(59,130,246,0.15);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35),
                inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}
.calc-result-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange));
}
.calc-result-header {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}
.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.calc-val {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
}
.calc-cta-btn {
    width: 100%;
    text-align: center;
    padding: 0.9rem;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .calc-wrapper {
        grid-template-columns: 1fr;
    }
    .calc-result {
        position: static;
    }
}

/* ── Material sub-tabs (variant row) ── */
.material-subtabs {
    display: flex;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(59,130,246,0.08);
    overflow-x: auto;
    scrollbar-width: none;
    min-height: 0;
    transition: min-height 0.25s ease;
}
.material-subtabs::-webkit-scrollbar { display: none; }
.material-subtabs:empty {
    display: none;
}
.material-subtab {
    flex-shrink: 0;
    padding: 0.55rem 1.2rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}
.material-subtab .subtab-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    margin-left: 0.3rem;
    vertical-align: middle;
    opacity: 0.8;
}
.material-subtab:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
}
.material-subtab.active {
    color: #fff;
    border-bottom-color: var(--mat-accent, var(--primary-blue));
    background: rgba(255,255,255,0.04);
}
/* ── Calc variant row ── */
.calc-variant-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: -0.3rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    min-height: 0;
}
.calc-variant-btns:empty { display: none; }
.calc-var-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 1px 0 rgba(0,0,0,0.35);
    white-space: nowrap;
}
.calc-var-btn:hover {
    color: var(--text-secondary);
    border-color: rgba(59,130,246,0.3);
    background: rgba(59,130,246,0.06);
    transform: translateY(-1px);
}
.calc-var-btn.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(6,182,212,0.1));
    border-color: rgba(59,130,246,0.55);
    color: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,0.35), 0 0 10px rgba(59,130,246,0.2);
}
.calc-var-badge {
    display: inline-block;
    font-size: 0.58rem;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    margin-left: 0.25rem;
    vertical-align: middle;
    opacity: 0.8;
}

/* ── Calculator color picker ── */
.calc-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.calc-color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.45);
    position: relative;
    flex-shrink: 0;
}
.calc-color-dot:hover {
    transform: scale(1.18);
    border-color: rgba(255,255,255,0.45);
}
.calc-color-dot.selected {
    border-color: #fff;
    transform: scale(1.25);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.25), 0 0 12px rgba(255,255,255,0.2), 0 3px 8px rgba(0,0,0,0.5);
}
.calc-color-dot.selected::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 900;
    color: rgba(0,0,0,0.55);
    text-shadow: 0 0 3px rgba(255,255,255,0.5);
}
/* white dot needs dark border so it's visible */
.calc-color-dot.light-dot {
    border-color: rgba(255,255,255,0.18);
}
.calc-color-dot.light-dot.selected {
    border-color: rgba(59,130,246,0.8);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2), 0 3px 8px rgba(0,0,0,0.4);
}
.calc-color-selected-name {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: auto;
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Material Tester Preview ── */
.calc-tester {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(59,130,246,0.12);
    margin-bottom: 0.4rem;
}
.calc-tester-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}
.calc-tester-scene {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.calc-tester-stage {
    position: relative;
    width: 110px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Full 6-face 3D CSS cube for tester */
.calc-tester-cube {
    width: 56px;
    height: 56px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-22deg) rotateY(38deg);
    animation: testerCubeFloat 4s ease-in-out infinite;
}
@keyframes testerCubeFloat {
    0%, 100% { transform: rotateX(-22deg) rotateY(38deg) translateY(0); }
    50%       { transform: rotateX(-22deg) rotateY(52deg) translateY(-7px); }
}
.ct-face {
    position: absolute;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255,255,255,0.18);
    transition: background 0.4s ease, box-shadow 0.4s ease;
    backface-visibility: visible;
}
.ct-top    { transform: rotateX(90deg)  translateZ(28px); }
.ct-bottom { transform: rotateX(-90deg) translateZ(28px); }
.ct-front  { transform: translateZ(28px); }
.ct-back   { transform: rotateY(180deg) translateZ(28px); }
.ct-right  { transform: rotateY(90deg)  translateZ(28px); }
.ct-left   { transform: rotateY(-90deg) translateZ(28px); }

.calc-tester-shadow {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    filter: blur(6px);
    transition: background 0.4s ease;
    animation: testerShadow 4s ease-in-out infinite;
}
@keyframes testerShadow {
    0%, 100% { transform: translateX(-50%) scale(1);    opacity: 0.6; }
    50%       { transform: translateX(-50%) scale(0.85); opacity: 0.35; }
}

.calc-tester-swatch-col {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: flex-start;
}
.calc-tester-swatch {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
/* subtle shine overlay on swatch */
.calc-tester-swatch::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 55%);
    pointer-events: none;
}
.calc-tester-hex {
    font-family: monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    transition: color 0.3s ease;
}
.calc-tester-mat {
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    max-width: 120px;
    line-height: 1.3;
}

@media (max-width: 900px) {
    .calc-tester-scene { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Comprehensive widget fixes
   (≤768px and ≤480px)
═══════════════════════════════════════════════════════ */

/* ── Hero animation: scale down aggressively on small screens ── */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-cta {
        justify-content: center;
    }
    .print-animation {
        width: 280px;
        height: 280px;
    }
    .logo-print-wrapper {
        width: 240px;
        height: 200px;
    }
    .print-bed {
        width: 260px;
    }

    /* ── Stats band: 2×2 grid ── */
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .stat-item {
        padding: 1.2rem 1rem;
    }
    .stat-divider { display: none; }
    .stat-item:nth-child(1),
    .stat-item:nth-child(3) {
        border-right: 1px solid rgba(59,130,246,0.15);
    }
    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid rgba(59,130,246,0.15);
    }

    /* ── Material selector ── */
    .material-tabs {
        gap: 0;
    }
    .material-tab {
        padding: 0.75rem 0.9rem;
        font-size: 0.72rem;
        letter-spacing: 0.06em;
    }
    .material-subtab {
        padding: 0.5rem 0.85rem;
        font-size: 0.74rem;
    }
    .material-body {
        grid-template-columns: 1fr;
    }
    .material-left, .material-center {
        border-right: none;
        border-bottom: 1px solid rgba(59,130,246,0.1);
    }
    .material-center {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem;
    }
    .mat-colors-label { width: 100%; }
    .mat-colors { justify-content: flex-start; }
    .mat-preview {
        margin: 0;
    }

    /* ── Before/After slider ── */
    .befaft-container {
        height: 260px;
    }
    .befaft-subtitle {
        font-size: 0.82rem;
    }

    /* ── Calculator ── */
    .calc-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .calc-result { position: static; }

    .calc-finish-btns {
        grid-template-columns: 1fr;
        grid-auto-rows: 1fr;
        gap: 0.5rem;
    }
    .calc-finish-btn {
        padding: 0.75rem 1rem;
    }

    .calc-color-picker {
        gap: 0.5rem;
    }
    .calc-color-dot {
        width: 28px;
        height: 28px;
    }

    .calc-tester-scene {
        flex-direction: row;
        align-items: center;
        gap: 1.2rem;
    }

    /* ── Footer ── */
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Extra small: ≤480px ── */
@media (max-width: 480px) {
    /* Hero */
    .print-animation {
        width: 220px;
        height: 220px;
    }
    .logo-print-wrapper {
        width: 190px;
        height: 160px;
    }
    .print-bed { width: 210px; }
    .hero-title { font-size: clamp(1.8rem, 8vw, 2.5rem); }

    /* Stats — stack everything */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stat-item .stat-number { font-size: 1.8rem; }

    /* Material selector */
    .material-tab {
        font-size: 0.65rem;
        padding: 0.65rem 0.6rem;
        letter-spacing: 0.04em;
    }
    .material-body { min-height: auto; }
    .mat-name { font-size: 1.6rem; }
    .material-left, .material-center, .material-right {
        padding: 1.2rem;
    }

    /* Before/After */
    .befaft-container { max-width: 340px; }
    .handle-btn { width: 36px; height: 36px; }
    .handle-btn svg { width: 16px; height: 16px; }
    .befaft-label { font-size: 0.6rem; bottom: 10px; }

    /* Calculator */
    .calc-material-btns { gap: 0.35rem; }
    .calc-mat-btn {
        padding: 0.45rem 0.7rem;
        font-size: 0.68rem;
    }
    .calc-var-btn { font-size: 0.68rem; padding: 0.3rem 0.65rem; }
    .calc-label { font-size: 0.72rem; }

    /* Tester: side-by-side stays but tighter */
    .calc-tester-stage { width: 80px; height: 80px; }
    .calc-tester-cube { width: 44px; height: 44px; }
    .ct-face { width: 44px; height: 44px; }
    .ct-top    { transform: rotateX(90deg)  translateZ(22px); }
    .ct-bottom { transform: rotateX(-90deg) translateZ(22px); }
    .ct-front  { transform: translateZ(22px); }
    .ct-back   { transform: rotateY(180deg) translateZ(22px); }
    .ct-right  { transform: rotateY(90deg)  translateZ(22px); }
    .ct-left   { transform: rotateY(-90deg) translateZ(22px); }
    .calc-tester-swatch { width: 42px; height: 42px; }

    .calc-result-inner { padding: 1.4rem; }

    /* Buttons full width */
    .calc-cta-btn { font-size: 0.85rem; padding: 0.8rem; }

    /* Nav */
    .nav-container { padding: 0.5rem 1rem; }
}

/* ── Landscape phone (short + wide) ── */
@media (max-width: 768px) and (orientation: landscape) {
    .hero { min-height: auto; padding: 5rem 0 2rem; }
    .print-animation { width: 200px; height: 200px; }
    .logo-print-wrapper { width: 175px; height: 145px; }
    .befaft-container { max-width: 280px; }
}

/* ── Calculator: summary panel (no prices) ── */
.calc-summary {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.5rem;
}
.calc-note {
    font-size: 0.73rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    margin-top: 0.5rem;
}

/* ── Preventivo Modal ── */
.prev-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,8,18,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.prev-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.prev-modal {
    background: var(--bg-card);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.2rem;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6),
                inset 0 1px 0 rgba(255,255,255,0.05);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34,1.4,0.64,1), opacity 0.25s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(59,130,246,0.3) transparent;
}
.prev-modal-overlay.open .prev-modal {
    transform: translateY(0) scale(1);
}
/* top accent bar */
.prev-modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.prev-modal-close {
    position: absolute;
    top: 1.1rem; right: 1.1rem;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.18s ease;
}
.prev-modal-close:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.4);
    color: #fff;
}
.prev-modal-close svg { width: 16px; height: 16px; }

.prev-modal-header { margin-bottom: 1.4rem; }
.prev-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.prev-modal-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Config recap pill strip */
.prev-modal-recap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    padding: 0.9rem 1rem;
    background: rgba(59,130,246,0.05);
    border: 1px solid rgba(59,130,246,0.12);
    border-radius: var(--radius-md);
}
.recap-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.recap-pill span { color: var(--text-muted); font-weight: 400; margin-right: 0.15rem; }

/* Form grid */
.prev-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.prev-form-full { grid-column: 1 / -1; }
.prev-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.prev-form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}
.prev-form-group input,
.prev-form-group textarea {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    padding: 0.65rem 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    resize: vertical;
}
.prev-form-group input:focus,
.prev-form-group textarea:focus {
    border-color: rgba(59,130,246,0.5);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    background: rgba(59,130,246,0.04);
}
.prev-form-group input::placeholder,
.prev-form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Privacy checkbox */
.prev-form-privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 1.3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.prev-form-privacy input[type="checkbox"] {
    width: 16px; height: 16px;
    margin-top: 1px;
    accent-color: var(--primary-blue);
    flex-shrink: 0;
    cursor: pointer;
}

.prev-submit-btn {
    width: 100%;
    padding: 0.95rem;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

/* Success state */
.prev-modal-success {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem 0;
}
.prev-modal-success.show { display: flex; }
.success-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(59,130,246,0.15));
    border: 2px solid rgba(16,185,129,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
}
.prev-modal-success h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
}
.prev-modal-success p {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .prev-modal { padding: 1.6rem 1.2rem; }
    .prev-form-grid { grid-template-columns: 1fr; }
    .prev-modal-header h3 { font-size: 1.1rem; }
}


/* ═══════════════════════════════════════════════════════════════
   REVIEW SYSTEM
═══════════════════════════════════════════════════════════════ */

/* Submit button bar */
.review-submit-bar {
    text-align: center;
    margin-top: var(--spacing-xl);
}

/* Review photos inside cards */
.review-photos {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .75rem 0 1rem;
}
.review-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(59,130,246,.25);
    cursor: zoom-in;
    transition: transform .2s, box-shadow .2s;
}
.review-photo:hover {
    transform: scale(1.06);
    box-shadow: 0 0 14px rgba(59,130,246,.4);
}

/* No reviews message */
.no-reviews-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: var(--spacing-xl) 0;
}

/* ── Modal overlay ─────────────────────────────────────────── */
.rmodal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(6px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
.rmodal-overlay.active {
    display: flex;
}

.rmodal {
    background: var(--bg-card);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: 16px;
    padding: 2rem 2rem 2.5rem;
    width: 100%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
    max-height: 90vh;
    overflow-y: auto;
}
.rmodal--admin {
    max-width: 720px;
}

.rmodal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.rmodal-close:hover { background: rgba(239,68,68,.2); color: #ef4444; }
.rmodal-close svg { width: 16px; height: 16px; }

.rmodal-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: .4rem;
    padding-right: 2.5rem;
}
.rmodal-sub {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 1.5rem;
}

/* Success state */
.rmodal-success {
    text-align: center;
    padding: 2rem 1rem;
}
.rmodal-success-icon { font-size: 3rem; margin-bottom: .75rem; }
.rmodal-success h4   { font-size: 1.25rem; color: var(--text-primary); margin-bottom: .5rem; }
.rmodal-success p    { color: var(--text-muted); }

/* Form grid */
.rmodal-form { margin-top: .5rem; }
.rmodal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.rmodal-group { display: flex; flex-direction: column; gap: .4rem; }
.rmodal-group label { font-size: .85rem; color: var(--text-secondary); font-weight: 500; }
.rmodal-group input,
.rmodal-group textarea {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: 8px;
    color: var(--text-primary);
    padding: .65rem .85rem;
    font-size: .9rem;
    font-family: var(--font-body);
    transition: border-color .2s, box-shadow .2s;
    resize: vertical;
}
.rmodal-group input:focus,
.rmodal-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.rmodal-group small { font-size: .78rem; color: var(--text-muted); }
.rmodal-full { grid-column: 1 / -1; }
.rmodal-optional { font-size: .78rem; color: var(--text-muted); font-weight: 400; }

/* Star rating input */
.rstar-input {
    display: flex;
    gap: .35rem;
    margin-top: .15rem;
}
.rstar {
    font-size: 2rem;
    color: rgba(255,255,255,.15);
    cursor: pointer;
    transition: color .15s, transform .15s;
    user-select: none;
    line-height: 1;
}
.rstar.active,
.rstar:hover { color: #f59e0b; }
.rstar:hover { transform: scale(1.15); }

/* Photo upload button */
.rphoto-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(59,130,246,.1);
    border: 1px dashed rgba(59,130,246,.4);
    border-radius: 8px;
    padding: .55rem 1rem;
    color: var(--primary-blue);
    font-size: .875rem;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    width: fit-content;
}
.rphoto-upload-btn:hover { background: rgba(59,130,246,.18); border-color: var(--primary-blue); }

/* Photo preview */
.rphoto-preview {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: .6rem;
}
.rphoto-thumb-wrap {
    position: relative;
    width: 80px;
    height: 80px;
}
.rphoto-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(59,130,246,.3);
}
.rphoto-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: .85rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.rphoto-remove:hover { background: #dc2626; }

/* ── Admin Panel ───────────────────────────────────────────── */
.admin-section-label {
    font-family: var(--font-display);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 1.5rem 0 .75rem;
    border-bottom: 1px solid rgba(59,130,246,.1);
    padding-bottom: .5rem;
}
.admin-empty {
    color: var(--text-muted);
    font-size: .875rem;
    padding: .75rem 0;
}
.admin-error {
    background: rgba(220,38,38,.08);
    border: 1px solid rgba(220,38,38,.35);
    border-left: 3px solid #dc2626;
    border-radius: 10px;
    padding: .9rem 1.1rem;
    margin: .25rem 0 .75rem;
    font-size: .875rem;
    color: var(--text-secondary);
}
.admin-error strong { color: #f87171; display: block; margin-bottom: .35rem; }
.admin-error p { margin: 0; line-height: 1.55; }
.admin-error code {
    background: rgba(0,0,0,.35);
    border-radius: 4px;
    padding: .05rem .35rem;
    font-size: .8rem;
}
.admin-rcard {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(59,130,246,.12);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
}
.admin-rcard-header {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .75rem;
    align-items: center;
    font-size: .875rem;
    color: var(--text-secondary);
    margin-bottom: .6rem;
}
.admin-rcard-header strong { color: var(--text-primary); }
.admin-order-badge {
    background: rgba(249,115,22,.1);
    border: 1px solid rgba(249,115,22,.25);
    border-radius: 5px;
    padding: .1rem .5rem;
    font-size: .78rem;
    color: #f97316;
}
.admin-order-badge code { font-family: monospace; }
.admin-date { font-size: .78rem; color: var(--text-muted); margin-left: auto; }
.admin-rtext {
    color: var(--text-secondary);
    font-size: .9rem;
    font-style: italic;
    margin: .5rem 0 .75rem;
    line-height: 1.5;
}
.admin-photos { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.admin-photo { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; cursor: zoom-in; border: 1px solid rgba(59,130,246,.2); }
.admin-ractions { display: flex; gap: .5rem; }
.admin-btn-approve,
.admin-btn-reject {
    border: none;
    border-radius: 7px;
    padding: .4rem .9rem;
    font-size: .825rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: opacity .2s;
}
.admin-btn-approve { background: rgba(16,185,129,.18); color: #10b981; border: 1px solid rgba(16,185,129,.3); }
.admin-btn-reject  { background: rgba(239,68,68,.15);  color: #ef4444;  border: 1px solid rgba(239,68,68,.25); }
.admin-btn-approve:hover, .admin-btn-reject:hover { opacity: .8; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .rmodal { padding: 1.5rem 1.25rem 2rem; }
    .rmodal-grid { grid-template-columns: 1fr; }
    .rmodal-full { grid-column: 1; }
}


/* ═══════════════════════════════════════════════════════════════
   CHI SIAMO
═══════════════════════════════════════════════════════════════ */

.chisiamo {
    padding: var(--spacing-xl) 0;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.chisiamo::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,.4), rgba(249,115,22,.3), transparent);
}

/* ── Header ─────────────────────────────────────────────────── */
.cs-header {
    text-align: center;
    margin-bottom: 3rem;
}
.cs-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    color: var(--text-primary);
    margin: .4rem 0 1rem;
}
.cs-intro {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Origin quote ───────────────────────────────────────────── */
.cs-origin {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem;
    padding: 2rem 2.5rem;
    background: rgba(59,130,246,.05);
    border: 1px solid rgba(59,130,246,.15);
    border-radius: 16px;
    position: relative;
}
.cs-origin::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(59,130,246,.2), rgba(249,115,22,.1));
    z-index: -1;
}
.cs-origin-icon {
    font-size: 2.2rem;
    margin-bottom: .75rem;
    display: block;
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}
.cs-origin-quote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.65;
    margin: 0 0 .75rem;
    border: none;
    padding: 0;
}
.cs-origin-author {
    color: var(--primary-blue);
    font-size: .875rem;
    font-family: var(--font-display);
    letter-spacing: .05em;
    margin: 0;
}

/* ── Team cards ─────────────────────────────────────────────── */
.cs-team {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.cs-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 20px;
    padding: 2rem;
    overflow: hidden;
    display: flex;
    gap: 1.5rem;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), border-color .3s, box-shadow .3s;
}
.cs-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59,130,246,.35);
    box-shadow: 0 20px 50px -10px rgba(59,130,246,.15);
}
.cs-card:last-child:hover {
    border-color: rgba(249,115,22,.35);
    box-shadow: 0 20px 50px -10px rgba(249,115,22,.15);
}

.cs-card-glow {
    position: absolute;
    top: -60px; left: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.12) 0%, transparent 70%);
    pointer-events: none;
    transition: opacity .4s;
    opacity: 0;
}
.cs-card-glow--orange {
    background: radial-gradient(circle, rgba(249,115,22,.1) 0%, transparent 70%);
}
.cs-card:hover .cs-card-glow { opacity: 1; }

/* Avatar */
.cs-avatar {
    position: relative;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
}
.cs-avatar-inner {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59,130,246,.25), rgba(6,182,212,.15));
    border: 2px solid rgba(59,130,246,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #3B82F6;
    letter-spacing: .05em;
}
.cs-avatar-inner--orange {
    background: linear-gradient(135deg, rgba(249,115,22,.2), rgba(220,38,38,.1));
    border-color: rgba(249,115,22,.4);
    color: #F97316;
}
.cs-avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    animation: ringRotate 8s linear infinite;
}
.cs-avatar-ring--blue {
    border-top-color: rgba(59,130,246,.6);
    border-right-color: rgba(6,182,212,.3);
}
.cs-avatar-ring--orange {
    border-top-color: rgba(249,115,22,.6);
    border-right-color: rgba(220,38,38,.3);
    animation-direction: reverse;
}
@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Card body */
.cs-card-body { flex: 1; min-width: 0; }
.cs-name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: .5rem;
    font-weight: 600;
}
.cs-role-badge {
    display: inline-block;
    font-size: .72rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .25rem .75rem;
    border-radius: 20px;
    margin-bottom: .85rem;
}
.cs-role-badge--blue {
    background: rgba(59,130,246,.12);
    border: 1px solid rgba(59,130,246,.3);
    color: #3B82F6;
}
.cs-role-badge--orange {
    background: rgba(249,115,22,.1);
    border: 1px solid rgba(249,115,22,.3);
    color: #F97316;
}
.cs-bio {
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}
.cs-skills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.cs-skill {
    font-size: .72rem;
    font-family: var(--font-display);
    padding: .2rem .6rem;
    border-radius: 5px;
    background: rgba(59,130,246,.08);
    border: 1px solid rgba(59,130,246,.2);
    color: rgba(59,130,246,.85);
}
.cs-skill--orange {
    background: rgba(249,115,22,.08);
    border-color: rgba(249,115,22,.2);
    color: rgba(249,115,22,.85);
}

/* ── Values strip ───────────────────────────────────────────── */
.cs-values {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem 0;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px;
    padding: 1.1rem 2rem;
}
.cs-value {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 0 1.5rem;
    font-size: .875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.cs-value-icon {
    color: var(--primary-orange);
    font-size: .65rem;
}
.cs-value-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,.1);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
    .cs-team { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
    .cs-card { flex-direction: column; align-items: flex-start; }
    .cs-origin { padding: 1.5rem; }
    .cs-value { padding: 0 .75rem; font-size: .8rem; }
    .cs-value-sep { display: none; }
    .cs-values { gap: .6rem; }
}

/* ── 3D Printer animation (Chi Siamo origin) ─────────────────── */
.cs-printer-svg {
    width: 80px;
    height: 80px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 10px rgba(59,130,246,.35));
}

/* Extruder slides left→right→left */
.cs-extruder,
.cs-nozzle,
.cs-nozzle-glow,
.cs-filament {
    animation: printerScan 2.4s ease-in-out infinite;
}
@keyframes printerScan {
    0%   { transform: translateX(-12px); }
    50%  { transform: translateX(12px); }
    100% { transform: translateX(-12px); }
}

/* Nozzle glow pulses */
.cs-nozzle-glow {
    animation: printerScan 2.4s ease-in-out infinite,
               nozzleGlow .6s ease-in-out infinite alternate;
}
@keyframes nozzleGlow {
    from { opacity: .7; }
    to   { opacity: 1;  }
}

/* Filament visible while moving */
.cs-filament {
    animation: printerScan 2.4s ease-in-out infinite,
               filamentShow 2.4s ease-in-out infinite;
}
@keyframes filamentShow {
    0%, 10%  { opacity: 0; }
    20%, 80% { opacity: 1; }
    90%, 100%{ opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — REVISIONE COMPLETA
   Breakpoints: 768px (tablet), 480px (smartphone), 360px (small)
═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* ── Navbar ──────────────────────────────────────────── */
    .navbar {
        top: 8px;
        width: calc(100% - 24px);
        border-radius: 10px;
    }
    .nav-container { padding: 0.5rem 1rem; }
    .nav-logo { height: 24px; }

    /* Menu a tendina full-width ben posizionato */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        flex-direction: column;
        align-items: stretch;
        background: rgba(6, 9, 18, 0.98);
        backdrop-filter: blur(24px);
        padding: 5rem 1.5rem 2rem;
        gap: 0.25rem;
        transition: left .3s cubic-bezier(.4,0,.2,1);
        border-right: 1px solid rgba(59,130,246,.15);
        box-shadow: 8px 0 40px rgba(0,0,0,.6);
        z-index: 9998;
        overflow-y: auto;
    }
    .nav-menu.active { left: 0; }

    /* Overlay scuro dietro il menu */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,.5);
        z-index: -1;
        pointer-events: none;
    }

    .nav-link {
        justify-content: flex-start;
        font-size: .85rem;
        padding: .75rem 1rem;
        border-radius: 8px;
    }
    .nav-link--secondary { display: flex; } /* mostra TUTTE le voci su mobile */

    .btn-sm.btn-cta {
        font-size: .75rem;
        padding: .45rem .9rem;
    }

    /* ── Hero ────────────────────────────────────────────── */
    .hero {
        padding-top: 100px;
        min-height: auto;
    }
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .hero-visual { order: -1; }
    .hero-title  { font-size: clamp(1.8rem, 6vw, 2.4rem); }
    .hero-subtitle { font-size: .95rem; }
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: .75rem;
    }
    .hero-cta .btn { width: 100%; max-width: 320px; justify-content: center; }

    /* Animazione logo — ridimensionata */
    .print-animation {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }
    .logo-print-wrapper {
        width: 240px;
        height: 210px;
    }
    .print-bed { width: 260px; }

    /* ── Stats band ──────────────────────────────────────── */
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .stat-item {
        padding: .75rem 1rem;
        border-bottom: 1px solid rgba(59,130,246,.08);
    }

    /* ── Servizi ─────────────────────────────────────────── */
    .services-grid { grid-template-columns: 1fr; }

    /* ── Materiali tabs ──────────────────────────────────── */
    .material-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        gap: .4rem;
        justify-content: flex-start;
    }
    .material-tabs::-webkit-scrollbar { display: none; }
    .material-tab { flex-shrink: 0; font-size: .78rem; padding: .5rem .9rem; }
    /* ── Dal digitale al reale ───────────────────────────── */
    .befaft-container {
        max-width: 100%;
        aspect-ratio: 1 / 1;
    }

    /* ── Chi siamo ───────────────────────────────────────── */
    .cs-team { grid-template-columns: 1fr; }
    .cs-card { flex-direction: column; gap: 1rem; padding: 1.5rem; }
    .cs-intro { font-size: .95rem; }
    .cs-origin { padding: 1.25rem 1.25rem; }
    .cs-origin-quote { font-size: 1.05rem; }
    .cs-values { gap: .6rem; padding: .9rem 1rem; }
    .cs-value { padding: 0 .75rem; font-size: .8rem; }
    .cs-value-sep { display: none; }

    /* ── Recensioni ──────────────────────────────────────── */
    .reviews-grid { grid-template-columns: 1fr; }
    .review-card  { padding: 1.25rem; }

    /* ── Preventivo / Calculator ─────────────────────────── */
    .calc-wrapper { grid-template-columns: 1fr; }
    .calc-result  { position: static; }
    .calc-material-btns { gap: .35rem; }
    .calc-mat-btn { font-size: .78rem; padding: .5rem .7rem; }

    /* ── Contatti ────────────────────────────────────────── */
    .contact-channels {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }
    .contact-title  { font-size: 1.6rem; }
    .contact-typewriter { white-space: normal; }
    .channel-card   { padding: 1.5rem; }
    .channel-time   { display: none; } /* troppo stretto su mobile */
    .contact-promises-strip {
        gap: .5rem;
        padding: .9rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .psi-divider { display: none; }
    .promise-strip-item { padding: 0; }

    /* ── Footer ──────────────────────────────────────────── */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    .footer-logo { order: -1; }
    .footer-column ul { align-items: center; }
    .footer-column li { text-align: center; }

    /* ── Modali recensioni ───────────────────────────────── */
    .rmodal {
        padding: 1.25rem 1rem 1.75rem;
        max-height: 92vh;
        border-radius: 14px 14px 0 0;
        margin-top: auto;
        margin-bottom: 0;
    }
    .rmodal-overlay.active {
        align-items: flex-end;
        padding: 0;
    }
    .rmodal-grid { grid-template-columns: 1fr; }
    .rmodal-full { grid-column: 1; }
    .rstar { font-size: 2.4rem; }
}

/* ── Smartphone piccoli (≤480px) ─────────────────────────── */
@media (max-width: 480px) {
    :root {
        --spacing-md: 1.25rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 3.5rem;
    }

    .hero-title   { font-size: 1.75rem; }
    .section-title { font-size: 1.5rem; }

    .print-animation {
        width: 220px;
        height: 220px;
    }
    .logo-print-wrapper {
        width: 190px;
        height: 165px;
    }
    .print-bed { width: 200px; }

    .stats-grid { grid-template-columns: 1fr 1fr; }

    /* Bottoni full-width */
    .btn { width: 100%; text-align: center; justify-content: center; }
    .btn-sm { width: auto; } /* eccetto quelli piccoli in navbar */

    .cs-skills { gap: .3rem; }
    .cs-skill  { font-size: .68rem; }

    .channel-card { padding: 1.25rem; }
    .channel-body h3 { font-size: .95rem; }

    .rmodal-title { font-size: 1.15rem; }
}

/* ── Schermi molto piccoli (≤360px) ─────────────────────── */
@media (max-width: 360px) {
    .navbar { width: calc(100% - 16px); }
    .hero-title { font-size: 1.5rem; }
    .contact-title { font-size: 1.35rem; }
    .cs-name { font-size: .9rem; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* Touch feedback per card su mobile */
.touch-active {
    transform: scale(0.97) !important;
    transition: transform .1s ease !important;
}

/* Smooth scroll nativo */
html { scroll-behavior: smooth; }

/* Evita overflow orizzontale globale */
body { overflow-x: hidden; }

/* Tap highlight disabilitato su elementi interattivi */
a, button, [role="button"] {
    -webkit-tap-highlight-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   HERO ANIMATION — MOBILE SEMPLIFICATA
   Su smartphone: solo logo che appare, niente nozzle/gantry
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Nascondi elementi meccanici confusionari */
    .nozzle,
    .logo-print-scanline,
    .print-animation::before,  /* filamento */
    .print-animation::after {  /* gantry */
        display: none !important;
    }

    /* Il logo appare con una semplice fade-in progressiva */
    .logo-printing {
        clip-path: none !important;
        animation: mobileFadeIn 2.5s ease forwards;
        opacity: 0;
    }
    @keyframes mobileFadeIn {
        0%   { opacity: 0; transform: scale(.96); }
        100% { opacity: 1; transform: scale(1); }
    }

    /* Print bed meno invadente */
    .print-bed {
        opacity: .4;
        width: 240px;
    }
    .print-bed::before { display: none; }

    /* Box animazione più compatto */
    .print-animation {
        width: 260px;
        height: 200px;
        background: none;
        border: none;
        box-shadow: none;
    }
    .print-animation::before,
    .print-animation::after { display: none !important; }

    .logo-print-wrapper {
        width: 220px;
        height: 180px;
    }

    /* Spinge il contenuto hero sotto la navbar fissa e evita che
       l'indicatore "Scorri" collida con i pulsanti CTA */
    .hero {
        padding-top: 110px;
    }
    .scroll-indicator { display: none; }
}


/* ═══════════════════════════════════════════════════════════════
   OTTIMIZZAZIONE MOBILE — REVISIONE COMPLETA
═══════════════════════════════════════════════════════════════ */

/* ── Sticky CTA mobile — appare dopo 300px di scroll ─────── */
.mobile-sticky-cta {
    display: none;
}
@media (max-width: 768px) {
    .mobile-sticky-cta {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9990;
        background: rgba(6,9,18,.92);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(59,130,246,.2);
        padding: .75rem 1rem;
        gap: .75rem;
        transform: translateY(100%);
        transition: transform .35s cubic-bezier(.4,0,.2,1);
        visibility: hidden;
    }
    .mobile-sticky-cta.visible {
        transform: translateY(0);
        visibility: visible;
    }
    .mobile-sticky-cta a {
        flex: 1;
        text-align: center;
        padding: .75rem .5rem;
        border-radius: 10px;
        font-family: var(--font-display);
        font-size: .75rem;
        font-weight: 700;
        letter-spacing: .04em;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .4rem;
    }
    .mobile-sticky-cta .mcta-primary {
        background: linear-gradient(135deg, #3B82F6, #06B6D4);
        color: #fff;
    }
    .mobile-sticky-cta .mcta-wa {
        background: linear-gradient(135deg, #25D366, #128C7E);
        color: #fff;
    }
}

@media (max-width: 768px) {

    /* ── Materiali — layout mobile a colonna singola ─────── */
    .material-body {
        grid-template-columns: 1fr !important;
    }
    .material-left {
        border-right: none !important;
        border-bottom: 1px solid rgba(59,130,246,.1);
        padding: 1.25rem !important;
    }
    .material-center {
        border-right: none !important;
        border-bottom: 1px solid rgba(59,130,246,.1);
        padding: 1.25rem !important;
    }
    .material-right {
        padding: 1.25rem !important;
    }
    .mat-name { font-size: 1.6rem; }
    .mat-colors {
        display: flex;
        flex-wrap: wrap;
        gap: .4rem;
        justify-content: center;
    }
    .mat-color-swatch {
        width: 28px !important;
        height: 28px !important;
    }
    /* Cubo 3D centrato su mobile */
    .mat-preview {
        margin: 0 auto;
    }

    /* ── Processo — verticale su mobile ──────────────────── */
    .process-timeline {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    .process-step {
        grid-column: span 1 !important;
        text-align: center;
    }
    .process-connector {
        grid-column: span 1 !important;
        width: 2px !important;
        height: 32px !important;
        margin: 0 auto !important;
    }
    .process-connector::after {
        bottom: 0 !important;
        top: auto !important;
        left: 50% !important;
        transform: translateX(-50%) rotate(90deg) !important;
    }

    /* ── Preventivo calculator ───────────────────────────── */
    .calc-wrapper {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    .calc-result {
        position: static !important;
        top: auto !important;
    }
    .calc-mat-btn {
        font-size: .72rem !important;
        padding: .45rem .6rem !important;
    }
    .calc-material-btns {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr);
        gap: .35rem;
    }
    /* ── Before/After slider ─────────────────────────────── */
    .befaft-outer {
        padding: 0 !important;
    }
    .befaft-container {
        max-width: 100% !important;
        border-radius: 12px;
    }

    /* ── Sezione recensioni ──────────────────────────────── */
    .review-photos {
        flex-wrap: wrap;
    }
    .review-photo {
        width: 56px !important;
        height: 56px !important;
    }

    /* ── Social section ──────────────────────────────────── */
    .social-links {
        gap: 1rem;
    }

    /* ── Footer ──────────────────────────────────────────── */
    .footer-column ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .4rem;
    }
    .footer-bottom {
        font-size: .78rem;
        text-align: center;
    }

    /* ── Lightbox mobile ─────────────────────────────────── */
    .lightbox-close {
        top: .6rem;
        right: .6rem;
        width: 40px;
        height: 40px;
    }
    .lightbox-stage {
        padding: 3.5rem .5rem 0;
    }
    .lightbox-nav {
        width: 38px;
        height: 38px;
    }
    .thumbnail-item {
        width: 56px;
        height: 42px;
    }

    /* ── Sezione statistiche ─────────────────────────────── */
    .stat-number {
        font-size: 2.2rem !important;
    }
    .stat-label {
        font-size: .75rem;
    }

    /* ── Back to top — non sovrapporre sticky CTA ────────── */
    #backToTop {
        bottom: 80px;
    }

    /* ── Testo sezioni ───────────────────────────────────── */
    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.8rem) !important;
    }
    .title-number {
        font-size: .65rem;
    }
}

/* ── 480px ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    .material-tabs {
        gap: .3rem;
    }
    .material-tab {
        font-size: .72rem !important;
        padding: .4rem .7rem !important;
    }
    .calc-material-btns {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .cs-role-badge {
        font-size: .65rem;
    }
    .channel-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: .25rem;
    }
    .review-card {
        padding: 1rem !important;
    }
    .review-photos {
        display: none; /* foto troppo piccole su 480 */
    }
}
