/* ============================================================
   lalospace — stylesheet (edizione cinematica)
   Tema dark/space premium, animazioni curate, zero dipendenze.
   ============================================================ */

:root {
    --bg:        #05070e;
    --bg-2:      #080b15;
    --surface:   #0e1424;
    --surface-2: #131c30;
    --border:    #1e2840;
    --border-2:  #2a3a5c;
    --text:      #eef2fb;
    --muted:     #8a96b4;
    --accent:    #34e0ee;
    --accent-2:  #7c6cff;
    --accent-3:  #c061ff;
    --grad:      linear-gradient(110deg, #34e0ee 0%, #6b8bff 45%, #c061ff 100%);
    --radius:    18px;
    --maxw:      1160px;
    --shadow:    0 30px 80px -30px rgba(0,0,0,.75);
    --font:      'Inter', 'Noto Sans Arabic', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --display:   'Space Grotesk', var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
/* grana sottile per profondità */
body::before {
    content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
    color: var(--accent); font-weight: 600; margin-bottom: 18px;
}

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(5,7,14,.6);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(5,7,14,.85); }
.nav-wrap { display: flex; align-items: center; gap: 16px; height: 74px; }
.logo { display: flex; align-items: center; gap: 11px; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); box-shadow: 0 0 22px rgba(124,108,255,.7); display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1; }
.logo-text { font-family: var(--display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.01em; }
.logo-dot { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 30px; margin-inline-start: auto; }
.nav a { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav-cta { color: var(--text) !important; border: 1px solid var(--border); padding: 9px 18px; border-radius: 999px; background: rgba(255,255,255,.03); }
.nav-cta:hover { border-color: var(--accent); }
/* selettore lingua */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.03); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; letter-spacing: .04em; padding: 9px 13px; border-radius: 999px; cursor: pointer; transition: border-color .2s; }
.lang-btn::after { content: "\25BE"; font-size: .7em; opacity: .7; }
.lang-btn:hover { border-color: var(--accent); }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 158px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 6px; list-style: none; margin: 0; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s; z-index: 60; }
.lang.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--muted); font-size: .92rem; }
.lang-menu a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.lang-menu a.active { color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; z-index: 60; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .25s; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; font-weight: 600; cursor: pointer;
    padding: 15px 30px; border-radius: 999px; border: 1px solid transparent;
    transition: transform .15s, box-shadow .25s, border-color .2s, background .2s; font-size: 1rem;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #050a16; box-shadow: 0 14px 40px -12px rgba(124,108,255,.8); }
.btn-primary:hover { box-shadow: 0 18px 50px -10px rgba(192,97,255,.85); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(52,224,238,.06); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in-view { opacity: 1; transform: none; }
/* ritardi di stagger (al posto degli style inline, per CSP rigorosa) */
.reveal.d1 { transition-delay: .05s; }
.reveal.d2 { transition-delay: .12s; }
.reveal.d3 { transition-delay: .20s; }
.reveal.d4 { transition-delay: .28s; }
.models .model:nth-child(2) { transition-delay: .08s; }
.models .model:nth-child(3) { transition-delay: .16s; }

/* ============ HERO ============ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-spot {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 35%), rgba(124,108,255,.18), transparent 60%);
    transition: background .2s;
}
.hero-veil {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(900px 500px at 70% -10%, rgba(52,224,238,.12), transparent 60%),
        linear-gradient(90deg, rgba(5,7,14,.6) 0%, rgba(5,7,14,.15) 45%, transparent 70%),
        linear-gradient(180deg, rgba(5,7,14,0) 0%, rgba(5,7,14,.12) 55%, rgba(5,7,14,.7) 88%, var(--bg) 100%);
}
.hero-inner { z-index: 3; max-width: 880px; padding-top: 40px; }
.hero-title { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -.03em; margin: 0 0 26px; font-size: clamp(2.6rem, 7.2vw, 5.4rem); }
.hero-title span { display: block; }
.lead { font-size: clamp(1.08rem, 2.1vw, 1.4rem); color: #b9c3dc; max-width: 660px; margin: 0 0 38px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-cue { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 3; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.25); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 0%,100% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 70% { opacity: 0; transform: translateY(12px); } }

/* ============ Sections base ============ */
.section { padding: 120px 0; position: relative; }
.section-head { max-width: 680px; margin: 0 auto 64px; text-align: center; }
.section-head h2 { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.025em; line-height: 1.08; margin: 0 0 16px; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

/* ---------- Manifesto + Processo ---------- */
.manifesto {
    font-family: var(--display); font-weight: 500; letter-spacing: -.02em;
    font-size: clamp(1.5rem, 3.6vw, 2.8rem); line-height: 1.25; max-width: 960px; margin: 0 auto 80px; text-align: center;
}
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 30px; overflow: hidden; }
.step-n { position: absolute; top: 12px; right: 18px; font-family: var(--display); font-weight: 700; font-size: 4.5rem; line-height: 1; color: rgba(255,255,255,.04); }
.step-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: rgba(124,108,255,.12); border: 1px solid var(--border); color: var(--accent); margin-bottom: 20px; }
.step-icon svg { width: 28px; height: 28px; }
.step h3 { font-family: var(--display); font-size: 1.35rem; margin: 0 0 10px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Competenze ---------- */
.grid { display: grid; gap: 22px; }
.cards { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; transition: transform .25s, border-color .25s, background .25s; }
.card:hover { transform: translateY(-6px); border-color: rgba(52,224,238,.5); background: var(--surface-2); }
.card-icon { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; background: rgba(124,108,255,.1); color: var(--accent); border: 1px solid var(--border); }
.card-icon svg { width: 27px; height: 27px; }
.card h3 { font-family: var(--display); font-size: 1.18rem; margin: 0 0 9px; line-height: 1.25; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---------- Competenze: showcase interattivo ---------- */
.cap-showcase { display: grid; grid-template-columns: 1fr 1.05fr; gap: 52px; align-items: start; }
.cap-list { display: flex; flex-direction: column; }
.cap-item {
    display: flex; align-items: center; gap: 18px; width: 100%; text-align: left;
    background: none; border: 0; border-bottom: 1px solid var(--border); cursor: pointer;
    padding: 22px 6px; color: var(--muted); font: inherit; position: relative;
    transition: padding-left .3s ease, color .25s;
}
.cap-item::before { content: ""; position: absolute; left: 0; top: 22%; height: 56%; width: 0; border-radius: 3px; background: var(--grad); transition: width .3s ease; }
.cap-item:hover, .cap-item.active { color: var(--text); padding-left: 16px; }
.cap-item.active::before { width: 3px; }
.cap-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); color: var(--muted); background: rgba(255,255,255,.02); transition: color .25s, border-color .25s, background .25s; }
.cap-ico svg { width: 24px; height: 24px; }
.cap-item:hover .cap-ico, .cap-item.active .cap-ico { color: var(--accent); border-color: rgba(52,224,238,.5); background: rgba(52,224,238,.08); }
.cap-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cap-title { font-family: var(--display); font-weight: 500; font-size: 1.14rem; letter-spacing: -.01em; }
.cap-item-desc { display: none; color: var(--muted); font-size: .95rem; margin-top: 6px; }
.cap-arrow { color: var(--accent); opacity: 0; transform: translateX(-8px); transition: opacity .25s, transform .25s; font-size: 1.1rem; }
.cap-item:hover .cap-arrow, .cap-item.active .cap-arrow { opacity: 1; transform: none; }

.cap-panel { position: sticky; top: 100px; overflow: hidden; min-height: 340px; padding: 46px; border-radius: 24px; border: 1px solid var(--border); background: linear-gradient(160deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow); }
.cap-panel-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at 85% 10%, rgba(124,108,255,.18), transparent 60%); }
.cap-panel-ico { position: relative; width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; color: var(--accent); background: rgba(52,224,238,.1); border: 1px solid var(--border); margin-bottom: 28px; box-shadow: 0 0 40px rgba(124,108,255,.35); }
.cap-panel-ico svg { width: 40px; height: 40px; }
.cap-panel-title { position: relative; font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.02em; margin: 0 0 16px; line-height: 1.12; }
.cap-panel-desc { position: relative; color: var(--muted); font-size: 1.12rem; max-width: 460px; margin: 0; }
.cap-panel-desc a, .cap-item-desc a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(52,224,238,.45); transition: border-color .2s, color .2s; }
.cap-panel-desc a:hover, .cap-item-desc a:hover { border-bottom-color: var(--accent); }
@keyframes capIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cap-panel.anim .cap-panel-ico   { animation: capIn .4s ease both; }
.cap-panel.anim .cap-panel-title { animation: capIn .4s ease .05s both; }
.cap-panel.anim .cap-panel-desc  { animation: capIn .4s ease .1s both; }

/* ---------- Cloud sovrano ---------- */
.cloud-sec { overflow: hidden; }
.cloud-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.cloud-veil { position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(5,7,14,.66) 0%, rgba(5,7,14,.2) 42%, transparent 70%); }
.cloud-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(700px 400px at 15% 50%, rgba(52,224,238,.10), transparent 60%); }
.cloud-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.cloud-text h2 { font-family: var(--display); font-size: clamp(1.9rem, 3.8vw, 2.9rem); letter-spacing: -.025em; line-height: 1.1; margin: 0 0 18px; }
.cloud-text p { color: var(--muted); font-size: 1.06rem; margin: 0 0 24px; }
.cloud-text strong { color: var(--text); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.check-list li { position: relative; padding-left: 34px; color: #cdd6ea; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 23px; height: 23px; border-radius: 7px; display: grid; place-items: center; background: rgba(52,224,238,.14); color: var(--accent); font-size: .8rem; font-weight: 700; }
.cloud-card { position: relative; background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); }
.cloud-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; letter-spacing: .1em; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; margin-bottom: 26px; }
.cloud-badge svg { width: 18px; height: 18px; }
.cloud-rack { display: grid; gap: 10px; }
.cloud-rack .slot { display: flex; align-items: center; height: 40px; padding: 0 38px 0 16px; border-radius: 9px; background: linear-gradient(90deg, var(--bg-2), var(--surface)); border: 1px solid var(--border); position: relative; overflow: hidden; }
.cloud-rack .slot::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); opacity: .7; }
.cloud-rack .slot-name { font-size: .94rem; font-weight: 500; color: #d3dcef; letter-spacing: .01em; }
.cloud-rack .slot::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 2.4s ease-in-out infinite; }
.cloud-rack .slot:nth-child(2)::after { animation-delay: .3s; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.cloud-rack .slot:nth-child(3)::after { animation-delay: .6s; }
.cloud-rack .slot:nth-child(4)::after { animation-delay: .9s; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); }
.cloud-rack .slot:nth-child(5)::after { animation-delay: 1.2s; }
.cloud-rack .slot:nth-child(6)::after { animation-delay: 1.5s; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
@keyframes blink { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.cloud-note { color: var(--muted); font-size: .9rem; margin: 22px 0 0; text-align: center; }

/* ---------- Modelli di servizio ---------- */
.models { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.model { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 30px; transition: transform .25s, border-color .25s; display: flex; flex-direction: column; }
.model:hover { transform: translateY(-6px); border-color: rgba(124,108,255,.5); }
.model.is-best { border-color: transparent; background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    var(--grad) border-box; box-shadow: 0 24px 60px -28px rgba(124,108,255,.7); transform: translateY(-8px); }
.model.is-best:hover { transform: translateY(-12px); }
.model-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #050a16; font-size: .75rem; font-weight: 700; letter-spacing: .05em; padding: 5px 14px; border-radius: 999px; }
.model-tag { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.model h3 { font-family: var(--display); font-size: 1.5rem; margin: 10px 0 12px; }
.model > p { color: var(--muted); margin: 0 0 22px; }
.model ul { list-style: none; padding: 18px 0 0; margin: auto 0 0; border-top: 1px solid var(--border); display: grid; gap: 11px; }
.model li { position: relative; padding-left: 26px; font-size: .95rem; color: #cdd6ea; }
.model li::before { content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 12px; border-radius: 4px; background: var(--grad); }

/* ---------- AI on-premise ---------- */
.ai-sec { overflow: hidden; }
.ai-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.ai-veil { position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(270deg, rgba(5,7,14,.62) 0%, rgba(5,7,14,.15) 45%, transparent 70%); }
.ai-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(600px 420px at 80% 40%, rgba(192,97,255,.12), transparent 60%); }
.ai-grid { display: grid; grid-template-columns: 1fr; min-height: 360px; align-items: center; }
.ai-text { max-width: 520px; margin-left: auto; }
.lab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); animation: blink 1.8s infinite; }
.ai-text h2 { font-family: var(--display); font-size: clamp(1.9rem, 3.8vw, 2.9rem); letter-spacing: -.025em; line-height: 1.1; margin: 0 0 18px; }
.ai-text p { color: var(--muted); font-size: 1.06rem; margin: 0 0 26px; }
.ai-models { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-models span { font-size: .9rem; font-weight: 500; color: #d6deef; border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; background: rgba(255,255,255,.02); }
.ai-models .more { color: var(--muted); border-style: dashed; }
.ai-visual { position: relative; height: 320px; display: grid; place-items: center; }
.ai-core { position: relative; z-index: 3; width: 110px; height: 110px; border-radius: 26px; display: grid; place-items: center; color: var(--accent); background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); box-shadow: 0 0 50px rgba(124,108,255,.4); }
.ai-core svg { width: 56px; height: 56px; }
.ai-ring { position: absolute; width: 200px; height: 200px; border-radius: 50%; border: 1px solid rgba(124,108,255,.4); animation: spin 14s linear infinite; }
.ai-ring::after { content: ""; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.ai-ring-2 { width: 290px; height: 290px; border-color: rgba(192,97,255,.3); animation-duration: 22s; animation-direction: reverse; }
.ai-ring-2::after { background: var(--accent-3); box-shadow: 0 0 12px var(--accent-3); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Contatti ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-intro h2 { font-family: var(--display); font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 0 0 14px; letter-spacing: -.025em; line-height: 1.1; }
.contact-intro p { color: var(--muted); font-size: 1.05rem; }
.contact-info { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 11px; }
.contact-info a { color: var(--accent); }
.no-sales { margin: 22px 0 0; padding: 15px 20px; border-left: 3px solid var(--accent); background: rgba(52,224,238,.07); border-radius: 0 12px 12px 0; color: #cdd6ea; font-size: 1rem; line-height: 1.55; }
.no-sales strong { color: var(--text); font-family: var(--display); }
.field textarea::placeholder, .field input::placeholder { color: #5c6884; opacity: 1; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 7px; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 14px 15px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-family: inherit; font-size: .98rem; transition: border-color .2s, box-shadow .2s; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,224,238,.16); }
.contact-form .btn { width: 100%; }
.form-note { text-align: center; color: var(--muted); font-size: .85rem; margin: 14px 0 0; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-flash { border-radius: 11px; padding: 13px 16px; margin: 0 0 18px; font-size: .92rem; }
.form-flash.ok { background: rgba(52,224,238,.12); border: 1px solid rgba(52,224,238,.4); color: #b6f3f8; }
.form-flash.err { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.4); color: #fecaca; }

/* ---------- Contatti (CTA verso overlay) ---------- */
.contact-cta { max-width: 720px; margin: 0 auto; text-align: center; }
.contact-cta h2 { font-family: var(--display); font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 0 0 14px; letter-spacing: -.025em; line-height: 1.1; }
.contact-cta > p { color: var(--muted); font-size: 1.06rem; }
.contact-cta .no-sales { display: inline-block; text-align: left; margin: 22px auto; }
.contact-cta .btn { margin-top: 8px; }

/* ---------- Overlay "Richiedi un incontro" ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3,5,11,.72); backdrop-filter: blur(6px); animation: fade .25s ease; }
.modal-dialog { position: relative; z-index: 2; width: min(720px, 94vw); max-height: 92vh; margin: 4vh auto; background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); animation: pop .3s cubic-bezier(.2,.7,.2,1); overflow: hidden; }
.modal-scroll { max-height: 92vh; overflow-y: auto; padding: 38px; }
.modal-close { position: absolute; top: 14px; right: 16px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: border-color .2s, background .2s; }
.modal-close:hover { border-color: var(--accent); background: rgba(52,224,238,.08); }
.modal-scroll h2 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.02em; margin: 0 0 8px; }
.modal-sub { color: var(--muted); margin: 0 0 26px; }
.modal-narrow { width: min(560px, 94vw); }
.modal-narrow .modal-scroll p { color: var(--muted); font-size: 1.05rem; margin: 0 0 16px; }
.sede-note { color: #cdd6ea !important; font-style: italic; border-left: 3px solid var(--accent); padding: 12px 16px; background: rgba(52,224,238,.07); border-radius: 0 12px 12px 0; margin: 4px 0 24px !important; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

.meeting-form .mf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.meeting-form .field { margin: 0; }
.meeting-form label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.meeting-form input, .meeting-form textarea { width: 100%; padding: 13px 14px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-family: inherit; font-size: .98rem; transition: border-color .2s, box-shadow .2s; resize: vertical; }
.meeting-form input:focus, .meeting-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,224,238,.16); }

.mf-topics { border: 0; padding: 0; margin: 0 0 22px; }
.mf-topics legend { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; padding: 0; }
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topic { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-2); cursor: pointer; transition: border-color .2s, background .2s; font-size: .94rem; }
.topic:hover { border-color: rgba(52,224,238,.45); }
.topic input { width: 18px; height: 18px; flex: none; accent-color: #34e0ee; cursor: pointer; }
.topic span { color: #d3dcef; }
.topic:has(input:checked) { border-color: var(--accent); background: rgba(52,224,238,.08); }
.topic.urgent { border-color: rgba(248,113,113,.5); }
.topic.urgent span { color: #ff8585; font-weight: 600; }
.topic.urgent input { accent-color: #f87171; }
.topic.urgent:has(input:checked) { border-color: #f87171; background: rgba(248,113,113,.12); }
.altro-text { margin-top: 10px; }

.mf-captcha { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: end; margin: 6px 0 18px; }
.cap-img { display: flex; align-items: center; gap: 8px; }
.cap-img img { border-radius: 10px; border: 1px solid var(--border); display: block; }
.cap-refresh { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--accent); font-size: 1.1rem; cursor: pointer; transition: border-color .2s; }
.cap-refresh:hover { border-color: var(--accent); }

.mf-submit { width: 100%; margin-top: 4px; }
.mf-flash { border-radius: 11px; padding: 12px 16px; margin: 0 0 16px; font-size: .92rem; }
.mf-flash.err { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.4); color: #fecaca; }
.mf-submit[disabled] { opacity: .6; cursor: default; }

.meeting-success { text-align: center; padding: 24px 8px; }
.ms-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; color: #06101f; background: var(--grad); box-shadow: 0 0 40px rgba(52,224,238,.5); }
.meeting-success h3 { font-family: var(--display); font-size: 1.5rem; margin: 0 0 10px; }
.meeting-success p { color: var(--muted); max-width: 420px; margin: 0 auto 22px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 64px 0 26px; position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--muted); margin: 10px 0 0; max-width: 300px; }
.footer-arealink { color: var(--accent); font-size: .9rem; }
.footer-arealink:hover { text-decoration: underline; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--muted); padding: 4px 0; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); margin-top: 42px; padding-top: 22px; color: var(--muted); font-size: .88rem; }
.to-top:hover { color: var(--accent); }

/* ---------- Pagine locali (area) ---------- */
.area-hero { padding-top: 116px; }
.area-h1 { font-family: var(--display); font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.025em; line-height: 1.08; margin: 0 0 18px; max-width: 900px; }
.area-lead { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 760px; margin: 0 0 26px; }
.area-hero .no-sales { margin-top: 24px; max-width: 720px; }
.area-two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.area-two h2 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; margin: 0 0 18px; }
.towns { display: flex; flex-wrap: wrap; gap: 10px; }
.towns span { font-size: .92rem; color: #d3dcef; border: 1px solid var(--border); border-radius: 999px; padding: 8px 15px; background: rgba(255,255,255,.02); }
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.faq-item h3 { font-family: var(--display); font-size: 1.1rem; margin: 0 0 8px; }
.faq-item p { color: var(--muted); margin: 0; }
.area-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 920px; margin: 0 auto; }
.area-links a { font-size: .92rem; color: #cdd6ea; border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px; transition: border-color .2s, color .2s; }
.area-links a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 900px) { .area-two { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- RTL (arabo) ---------- */
[dir="rtl"] .eyebrow, [dir="rtl"] .model-tag, [dir="rtl"] .footer-col h4,
[dir="rtl"] .lang-btn, [dir="rtl"] .cloud-badge, [dir="rtl"] .product-tag {
    letter-spacing: normal; text-transform: none;
}
[dir="rtl"] .cap-item { text-align: right; }
[dir="rtl"] .cap-item::before { left: auto; right: 0; }
[dir="rtl"] .cap-item:hover, [dir="rtl"] .cap-item.active { padding-left: 6px; padding-right: 16px; }
[dir="rtl"] .cap-arrow { transform: translateX(8px) scaleX(-1); }
[dir="rtl"] .cap-item:hover .cap-arrow, [dir="rtl"] .cap-item.active .cap-arrow { transform: scaleX(-1); }
[dir="rtl"] .check-list li { padding-left: 0; padding-right: 34px; }
[dir="rtl"] .check-list li::before { left: auto; right: 0; }
[dir="rtl"] .model li { padding-left: 0; padding-right: 26px; }
[dir="rtl"] .model li::before { left: auto; right: 0; }
[dir="rtl"] .no-sales, [dir="rtl"] .sede-note { border-left: 0; border-right: 3px solid var(--accent); border-radius: 12px 0 0 12px; }
[dir="rtl"] .cloud-rack .slot { padding: 0 16px 0 38px; }
[dir="rtl"] .cloud-rack .slot::before { left: auto; right: 0; }
[dir="rtl"] .cloud-rack .slot::after { right: auto; left: 14px; }
[dir="rtl"] .modal-close { right: auto; left: 16px; }
[dir="rtl"] .step-n { right: auto; left: 18px; }
[dir="rtl"] .hero-veil { background:
    radial-gradient(900px 500px at 30% -10%, rgba(52,224,238,.12), transparent 60%),
    linear-gradient(270deg, rgba(5,7,14,.6) 0%, rgba(5,7,14,.15) 45%, transparent 70%),
    linear-gradient(180deg, rgba(5,7,14,0) 0%, rgba(5,7,14,.12) 55%, rgba(5,7,14,.7) 88%, var(--bg) 100%); }
[dir="rtl"] .cloud-veil { background: linear-gradient(270deg, rgba(5,7,14,.66) 0%, rgba(5,7,14,.2) 42%, transparent 70%); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .cards, .models, .process { grid-template-columns: 1fr; }
    .cloud-grid, .ai-grid, .contact { grid-template-columns: 1fr; gap: 40px; }
    .ai-text { max-width: 100%; margin: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .model.is-best { transform: none; }
    /* showcase competenze -> lista con descrizioni inline */
    .cap-showcase { grid-template-columns: 1fr; gap: 0; }
    .cap-panel { display: none; }
    .cap-item { align-items: flex-start; padding: 20px 6px; color: var(--text); }
    .cap-item::before { display: none; }
    .cap-item:hover, .cap-item.active { padding-left: 6px; }
    .cap-ico { margin-top: 2px; }
    .cap-item-desc { display: block; }
    .cap-arrow { display: none; }
}
/* navbar -> hamburger gia' dai tablet (6 voci) */
@media (max-width: 880px) {
    .nav { display: none; }
    .nav-toggle { display: block; }
    .lang { margin-inline-start: auto; }
    .site-header.open .nav { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; position: absolute; top: 74px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 16px 28px; }
    .site-header.open .nav a { width: 100%; padding: 12px 0; }
}
@media (max-width: 640px) {
    .container { padding: 0 20px; }
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 80px 0; }
    .cards, .models, .process { gap: 16px; }
    .cap-panel { padding: 32px; }
    .contact-form, .step, .cloud-card { padding: 26px; }
    .meeting-form .mf-grid, .topic-grid, .mf-captcha { grid-template-columns: 1fr; }
    .modal-scroll { padding: 26px 22px; }
    .mf-captcha { align-items: stretch; }
    .ai-visual { height: 260px; }
    .ai-ring { width: 170px; height: 170px; }
    .ai-ring-2 { width: 240px; height: 240px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-cue span, .cloud-rack span::after, .ai-ring, .lab-dot { animation: none; }
}
