*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, sans-serif; color: #e2e8f0; background: #0f172a; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #1e3a5f;
    --accent: #f59e0b;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-lighter: #162033;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: #334155;
    --white: #ffffff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
    --container: 1140px;
}
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; transition: all 0.25s; cursor: pointer; border: none; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* Header */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; transition: all 0.3s; }
.header.scrolled { background: rgba(15,23,42,0.95); backdrop-filter: blur(12px); box-shadow: 0 1px 8px rgba(0,0,0,0.3); }
.header--solid { background: var(--bg); box-shadow: 0 1px 8px rgba(0,0,0,0.3); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; }
.logo-img { height: 28px; width: auto; }
.nav-menu { display: flex; gap: 32px; }
.nav-link { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); transition: color 0.2s; }
.nav-link:hover { color: var(--white); }
.nav-extras { display: flex; align-items: center; gap: 16px; }
.lang-switcher { display: flex; gap: 4px; }
.lang-btn { padding: 4px 10px; font-size: 0.75rem; font-weight: 600; border-radius: 6px; color: var(--text-dim); transition: all 0.2s; }
.lang-btn.active { background: var(--primary-light); color: var(--primary); }
.lang-btn:hover { color: var(--primary); }
.mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { position: relative; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, #1e3a5f 0%, #0f172a 70%); z-index: 0; }
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 700px; padding: 200px 0 150px; }
.hero-content h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 700; color: var(--white); line-height: 1.25; letter-spacing: -0.3px; margin-bottom: 18px; }
.hero-content p { font-size: 1rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 28px; max-width: 580px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badge { display: inline-block; padding: 7px 18px; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2); border-radius: 20px; font-size: 0.85rem; font-weight: 500; color: var(--primary); letter-spacing: 0.3px; }

/* Section headers */
.section-header { text-align: center; margin-bottom: 36px; }
.section-tag { display: inline-block; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--primary); margin-bottom: 10px; }
.section-header h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 700; color: var(--white); }

/* Servizi */
.servizi { padding: 60px 0; background: var(--bg); }
.servizi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.srv-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 28px; transition: all 0.3s; }
.srv-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.srv-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; margin-bottom: 20px; }
.srv-icon svg { width: 24px; height: 24px; }
.srv-icon--blue { background: rgba(59,130,246,0.15); color: #3b82f6; }
.srv-icon--purple { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.srv-icon--teal { background: rgba(20,184,166,0.15); color: #14b8a6; }
.srv-icon--orange { background: rgba(249,115,22,0.15); color: #f97316; }
.srv-icon--red { background: rgba(239,68,68,0.15); color: #ef4444; }
.srv-icon--green { background: rgba(34,197,94,0.15); color: #22c55e; }
.srv-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; color: var(--white); }
.srv-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* Tech */
.tech-section { padding: 60px 0; background: var(--bg-lighter); }
.tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tech-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; text-align: center; transition: border-color 0.2s; }
.tech-item:hover { border-color: var(--primary); }
.tech-item strong { display: block; color: var(--white); font-size: 0.95rem; margin-bottom: 4px; }
.tech-item span { font-size: 0.8rem; color: var(--text-dim); }

/* Prodotti */
.prodotti { padding: 60px 0; background: var(--bg); }
.prodotti-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.prod-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 32px; display: flex; flex-direction: column; transition: all 0.3s; }
.prod-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.prod-logo { margin-bottom: 20px; }
.prod-logo img { width: 48px; height: 48px; border-radius: 12px; }
.prod-card h3 { font-size: 1.3rem; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.prod-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 20px; flex-grow: 1; }
.prod-link { color: var(--primary); font-weight: 600; font-size: 0.9rem; transition: color 0.2s; }
.prod-link:hover { color: var(--accent); }

/* Contatti */
.contatti { padding: 60px 0; background: var(--bg-lighter); }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-form-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; }
.contact-form .form-row { display: flex; gap: 16px; }
.contact-form .form-group { margin-bottom: 16px; flex: 1; }
.contact-form input, .contact-form textarea { width: 100%; padding: 14px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 0.9rem; outline: none; transition: border-color 0.2s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-dim); }
.form-privacy-note { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 16px; }
.form-privacy-note a { color: var(--primary); text-decoration: underline; }
.form-submit { text-align: right; }

.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.contact-block h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); margin-bottom: 10px; }
.contact-block p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 4px; }
.contact-block strong { color: var(--white); }
.contact-block a { color: var(--primary); }
.contact-block a:hover { text-decoration: underline; }
.contact-block .contact-email { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.contact-block.highlight { border-color: var(--accent); background: rgba(245,158,11,0.05); }
.contact-block .big-number { font-size: 1.4rem; font-weight: 700; color: var(--accent); margin-bottom: 8px; }

/* Footer */
.footer { background: #0a0f1a; color: var(--text-dim); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--border); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand .logo-img { height: 24px; width: auto; }
.footer-desc { font-size: 0.85rem; line-height: 1.6; color: var(--text-dim); }
.footer-col h4 { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-col ul li { font-size: 0.85rem; margin-bottom: 8px; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px 0; font-size: 0.8rem; }
.footer-legal { color: var(--text-dim); }
.footer-legal-links { display: flex; gap: 20px; }
.footer-legal-links a { color: var(--text-dim); transition: color 0.2s; }
.footer-legal-links a:hover { color: var(--primary); }

/* Page hero (internal pages) */
.page-hero { padding: 120px 0 40px; background: var(--bg-lighter); }
.page-hero h1 { font-size: 2rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.page-hero p { color: var(--text-dim); font-size: 0.9rem; }

/* Legal content */
.page-section { padding: 48px 0; }
.legal-content .container { max-width: 780px; }
.legal-content h2 { font-size: 1.15rem; font-weight: 600; color: var(--white); margin: 28px 0 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.legal-content h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.legal-content h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 14px 0 6px; }
.legal-content p { color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; }
.legal-content ul { padding-left: 20px; margin-bottom: 14px; }
.legal-content ul li { color: var(--text-muted); line-height: 1.7; margin-bottom: 6px; list-style: disc; }
.legal-content a { color: var(--primary); }
.legal-content a:hover { text-decoration: underline; }
.cookie-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.9rem; }
.cookie-table th { background: var(--bg-lighter); color: var(--white); font-weight: 600; text-align: left; padding: 10px 14px; border: 1px solid var(--border); }
.cookie-table td { padding: 10px 14px; border: 1px solid var(--border); color: var(--text-muted); }
.cookie-table code { background: var(--bg-lighter); padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; color: var(--primary); }

/* Cookie banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; background: var(--bg-card); border-top: 1px solid var(--border); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 0.85rem; color: var(--text-muted); }
.cookie-banner a { color: var(--primary); text-decoration: underline; }
.btn-cookie-close { background: var(--primary); color: var(--white); border: none; padding: 8px 24px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem; white-space: nowrap; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.servizi-grid .srv-card:nth-child(2) { transition-delay: 0.1s; }
.servizi-grid .srv-card:nth-child(3) { transition-delay: 0.2s; }
.servizi-grid .srv-card:nth-child(4) { transition-delay: 0.3s; }
.servizi-grid .srv-card:nth-child(5) { transition-delay: 0.4s; }
.servizi-grid .srv-card:nth-child(6) { transition-delay: 0.5s; }

/* Responsive */
@media (max-width: 1024px) {
    .servizi-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
    .prodotti-grid { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    .nav-menu { position: fixed; top: 72px; left: 0; right: 0; background: var(--bg-card); flex-direction: column; gap: 0; padding: 16px 0; box-shadow: var(--shadow-lg); transform: translateY(-120%); opacity: 0; transition: all 0.3s; z-index: 999; }
    .nav-menu.open { transform: translateY(0); opacity: 1; }
    .nav-menu .nav-link { display: block; padding: 14px 24px; }
    .hero-content { padding: 100px 0 48px; }
    .hero-content h1 { font-size: 2rem; }
    .servizi-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-form .form-row { flex-direction: column; gap: 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
