/* ═══════════════════════════════════════
   LexCrypto Italia — Landing Page
   Dark theme · WCAG 2.1 AA · Mobile-first
   ═══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand:          #0f172a;
    --brand-mid:      #1e293b;
    --brand-light:    #334155;
    --accent:         #2563eb;
    --accent-hover:   #1d4ed8;
    --accent-glow:    rgba(37,99,235,.25);
    --text:           #f8fafc;
    --text-secondary: #cbd5e1;   /* 7.2:1 on #0f172a ✓ */
    --text-muted:     #94a3b8;   /* 5.9:1 on #0f172a ✓ */
    --border:         rgba(255,255,255,.08);
    --radius:         12px;
    --nav-h:          68px;
}

html { scroll-behavior: smooth; }
body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--brand);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Accessibility ── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}
.skip-link {
    position: absolute; left: -10000px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
    position: fixed; top: 1rem; left: 1rem;
    width: auto; height: auto; overflow: visible;
    background: var(--brand); color: var(--text);
    padding: .5rem 1.25rem; border-radius: 6px;
    font-size: .875rem; font-weight: 600;
    z-index: 9999; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

/* ══════════════════
   NAVBAR
══════════════════ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 200;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    transition: background .3s, backdrop-filter .3s, border-bottom-color .3s;
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    background: rgba(15,23,42,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--border);
}
.navbar-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.navbar-brand {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}
.navbar-brand-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}
.navbar-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .875rem;
    padding: .45rem .875rem;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.navbar-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.navbar-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.btn-nav-login {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .875rem;
    padding: .45rem .875rem;
    border-radius: 6px;
    transition: color .15s;
}
.btn-nav-login:hover { color: var(--text); }
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: .875rem;
    font-weight: 600;
    padding: .5rem 1.25rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    min-height: 40px;
    white-space: nowrap;
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    padding: .5rem 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.25);
    cursor: pointer;
    transition: border-color .15s, background .15s;
    min-height: 40px;
    white-space: nowrap;
}
.btn-outline:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.05); }
.hamburger-nav {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 40px; height: 40px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text);
}
.hamburger-nav span {
    display: block; width: 18px; height: 2px;
    background: var(--text-secondary); border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

/* ══════════════════
   HERO
══════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-h) + 4rem) 2rem 6rem;
    overflow: hidden;
}

/* Video background */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    will-change: opacity;
}
/* Gradient fallback (before video loads) */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 30%, rgba(37,99,235,.18) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 70%, rgba(14,165,233,.1) 0%, transparent 60%);
    z-index: 1;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15,23,42,.55) 0%, rgba(15,23,42,.88) 100%);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 860px;
    width: 100%;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37,99,235,.15);
    border: 1px solid rgba(37,99,235,.35);
    color: #93c5fd;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: .35rem 1rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}
.hero-badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 1.5rem;
}
.hero-title-accent {
    color: #60a5fa;
    display: block;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-actions .btn-primary { font-size: 1rem; padding: .75rem 2rem; min-height: 48px; }
.hero-actions .btn-outline  { font-size: 1rem; padding: .75rem 2rem; min-height: 48px; }
.hero-trust {
    margin-top: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: .8rem;
}
.hero-trust-item {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.hero-trust-icon { color: #4ade80; font-size: 1rem; }

/* ══════════════════
   SEZIONI
══════════════════ */
.section { padding: 5rem 2rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #60a5fa;
    margin-bottom: .75rem;
}
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.2;
}
.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

/* ── Features ── */
.features { background: var(--brand); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
}
.feature-card {
    background: var(--brand-mid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.feature-card:hover {
    border-color: rgba(37,99,235,.4);
    box-shadow: 0 0 30px rgba(37,99,235,.1);
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #38bdf8);
    opacity: 0;
    transition: opacity .2s;
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: rgba(37,99,235,.15);
    border: 1px solid rgba(37,99,235,.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}
.feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .5rem;
}
.feature-desc {
    font-size: .875rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ── Steps ── */
.steps-section { background: var(--brand-mid); }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3.5rem;
    position: relative;
}
.steps-grid::before {
    content: '';
    position: absolute;
    top: 24px; left: 80px; right: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
}
.step {
    text-align: center;
    position: relative;
}
.step-num {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: .875rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    position: relative;
    z-index: 1;
}
.step-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.step-desc  { font-size: .875rem; color: var(--text-secondary); line-height: 1.65; }

/* ── Compliance ── */
.compliance-section { background: var(--brand); }
.compliance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}
.compliance-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.25rem;
    background: var(--brand-mid);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.compliance-check { color: #4ade80; font-size: 1rem; flex-shrink: 0; margin-top: .1rem; }

/* ── CTA section ── */
.cta-section {
    background: linear-gradient(135deg, var(--brand-mid) 0%, #0c1629 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
    padding: 6rem 2rem;
}
.cta-section .section-title { margin-bottom: 1rem; }
.cta-section .section-subtitle { margin: 0 auto 2.5rem; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.cta-actions .btn-primary { font-size: 1rem; padding: .875rem 2.5rem; min-height: 52px; }

/* ── Footer ── */
.site-footer {
    background: #080f1d;
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 2rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}
.footer-brand-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.footer-brand-desc {
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 280px;
    margin-bottom: 1rem;
}
.footer-ateco {
    display: inline-block;
    background: rgba(37,99,235,.1);
    border: 1px solid rgba(37,99,235,.2);
    color: #93c5fd;
    font-size: .7rem;
    font-weight: 600;
    padding: .25rem .75rem;
    border-radius: 20px;
}
.footer-col-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .875rem;
    transition: color .15s;
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
    max-width: 1200px;
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .75rem;
    color: var(--text-muted);
}
.footer-disclaimer {
    font-size: .7rem;
    color: var(--text-muted);
    opacity: .7;
    max-width: 600px;
    line-height: 1.5;
}

/* ══════════════════
   RESPONSIVE
══════════════════ */
@media (max-width: 900px) {
    .features-grid, .steps-grid { grid-template-columns: 1fr; }
    .steps-grid::before { display: none; }
    .compliance-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
    .navbar-links { display: none; }
    .hamburger-nav { display: flex; }
}
@media (max-width: 640px) {
    .navbar { padding: 0 1rem; }
    .section { padding: 3.5rem 1.25rem; }
    .hero { padding: calc(var(--nav-h) + 2rem) 1.25rem 4rem; }
    .hero-trust { gap: 1rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .btn-nav-login { display: none; }
}

/* ── Mobile nav drawer ── */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(15,23,42,.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    z-index: 199;
    flex-direction: column;
    gap: 0.5rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    padding: .75rem 1rem;
    border-radius: 8px;
    display: block;
    transition: background .15s, color .15s;
}
.mobile-nav a:hover { background: rgba(255,255,255,.06); color: var(--text); }
.mobile-nav .btn-primary { text-align: center; margin-top: .5rem; justify-content: center; }
