/* ============================================
   CSS — 2KCIF Monopagina
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    --bg-primary: #0a0c10;
    --bg-secondary: #121620;
    --bg-card: rgba(20, 26, 38, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --primary: #06b6d4;
    --primary-glow: rgba(6, 182, 212, 0.15);
    --secondary: #6366f1;
    --secondary-glow: rgba(99, 102, 241, 0.15);
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.15);
    --warning: #eab308;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    --nav-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    position: relative;
    min-height: 100vh;
}

img, svg {
    display: block;
    max-width: 100%;
}

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

ul, ol {
    list-style: none;
}

/* ---- Background Glows ---- */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.bg-glow--1 {
    width: 600px;
    height: 600px;
    top: -150px;
    right: -150px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}

.bg-glow--2 {
    width: 800px;
    height: 800px;
    top: 40%;
    left: -300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
}

.bg-glow--3 {
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 12, 16, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    height: var(--nav-height);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    z-index: 1001;
}

.logo__icon {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

.logo__text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Desktop Nav */
.nav-links {
    display: flex;
    gap: 2rem;
    padding: 0 1rem;
}

.nav-links__item {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-links__item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav-links__item:hover {
    color: var(--text-primary);
}

.nav-links__item:hover::after {
    width: 100%;
}

/* CTA Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(6, 182, 212, 0.45);
}

.btn--secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn--ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.btn--large {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

.nav-cta {
    z-index: 1001;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
}

.hamburger__line {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
    transform-origin: center;
}

.hamburger.is-active .hamburger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.is-active .hamburger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 16, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.mobile-menu.is-open {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.mobile-menu__link {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    padding: 0.5rem 1rem;
}

.mobile-menu__link:hover,
.mobile-menu__link:focus {
    color: var(--text-primary);
}

.mobile-menu__cta {
    margin-top: 1rem;
}

/* ============================================
   SECTIONS — General
   ============================================ */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.5rem auto;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-label__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.section-header__title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-header__subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: calc(85vh - var(--nav-height));
}

.hero__content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.hero__content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 520px;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__badges {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.badge {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.badge__value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.badge__label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Hero Visual — Telemetry Card */
.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.telemetry-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.75rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.telemetry-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    opacity: 0.6;
}

.telemetry-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.telemetry-card__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge--online {
    background: var(--accent-glow);
    color: var(--accent);
}

.telemetry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.telemetry-node {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.15rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.telemetry-node:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.telemetry-node__label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.telemetry-node__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.telemetry-node__dot--solar { background: var(--warning); }
.telemetry-node__dot--battery { background: var(--accent); }
.telemetry-node__dot--load { background: var(--secondary); }
.telemetry-node__dot--grid { background: var(--primary); }

.telemetry-node__value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.telemetry-card__footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.telemetry-card__footer-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.telemetry-card__footer-live {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* ============================================
   SERVIZI
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.25rem 1.75rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.04) 0%, rgba(99, 102, 241, 0.04) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.08);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    position: relative;
}

.service-card:nth-child(2) .service-card__icon { color: var(--accent); }
.service-card:nth-child(3) .service-card__icon { color: var(--secondary); }

.service-card__title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
}

.service-card__text {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.92rem;
    position: relative;
}

.service-card__list {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: relative;
}

.service-card__list-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.service-card__list-item svg {
    flex-shrink: 0;
    color: var(--accent);
}

/* ============================================
   COME FUNZIONA (Processo)
   ============================================ */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    position: relative;
}

/* Connection line */
.process-grid::before {
    content: '';
    position: absolute;
    top: 52px;
    left: 12.5%;
    right: 12.5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color) 15%, var(--border-color) 85%, transparent);
}

.process-step {
    text-align: center;
    position: relative;
}

.process-step__number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem auto;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    position: relative;
    z-index: 1;
    transition: var(--transition-smooth);
}

.process-step:hover .process-step__number {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.process-step__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.process-step__text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   PIATTAFORMA (Dashboard Preview)
   ============================================ */
.platform {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.platform .section {
    padding: 5rem 1.5rem;
}

.platform-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.platform-features {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.platform-feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.platform-feature__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.platform-feature:nth-child(2) .platform-feature__icon {
    background: var(--accent-glow);
    color: var(--accent);
}

.platform-feature:nth-child(3) .platform-feature__icon {
    background: var(--secondary-glow);
    color: var(--secondary);
}

.platform-feature:nth-child(4) .platform-feature__icon {
    background: rgba(234, 179, 8, 0.12);
    color: var(--warning);
}

.platform-feature__content h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.platform-feature__content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Dashboard Mockup */
.dashboard-mockup {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.dashboard-mockup__toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dot-red, .dot-yellow, .dot-green {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.dashboard-mockup__toolbar span {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.75rem;
}

.dashboard-mockup__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

.mini-card__label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.mini-card__value {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
}

.mini-card__bar {
    margin-top: 0.6rem;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.mini-card__bar-fill {
    height: 100%;
    border-radius: 2px;
}

.mini-card__bar-fill--cyan {
    width: 78%;
    background: linear-gradient(90deg, var(--primary), #22d3ee);
}

.mini-card__bar-fill--green {
    width: 62%;
    background: linear-gradient(90deg, var(--accent), #34d399);
}

.mini-card__bar-fill--indigo {
    width: 45%;
    background: linear-gradient(90deg, var(--secondary), #818cf8);
}

.mini-card__bar-fill--amber {
    width: 91%;
    background: linear-gradient(90deg, var(--warning), #facc15);
}

/* Chart Placeholder */
.dashboard-mockup__chart {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    flex: 1;
    padding-top: 0.5rem;
}

.chart-bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, var(--primary), rgba(6, 182, 212, 0.3));
    min-height: 8px;
    transition: var(--transition-smooth);
}

.chart-bar:hover {
    filter: brightness(1.3);
}

/* ============================================
   FAQ
   ============================================ */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.faq-item__question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
}

.faq-item__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.faq-item.is-open .faq-item__icon {
    transform: rotate(45deg);
    color: var(--primary);
}

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.is-open .faq-item__answer {
    max-height: 300px;
}

.faq-item__answer-inner {
    padding: 0 1.5rem 1.25rem 1.5rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================
   CTA FINALE
   ============================================ */
.cta-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 6rem 1.5rem;
}

.cta-box {
    background: linear-gradient(135deg, #111827 0%, #1e293b 100%);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 4.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-box::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    bottom: -200px;
    right: -100px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-box__title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
    position: relative;
}

.cta-box__text {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem auto;
    font-size: 1.1rem;
    line-height: 1.6;
    position: relative;
}

.cta-box .btn {
    position: relative;
}

.cta-box__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    border-top: 1px solid var(--border-color);
    background: #07090d;
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2rem 1.5rem;
}

.footer__top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.footer__brand p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-top: 1rem;
    max-width: 280px;
}

.footer__col-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer__link {
    font-size: 0.88rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.footer__link:hover {
    color: var(--text-primary);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer__copyright {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer__legal-links {
    display: flex;
    gap: 1.5rem;
}

.footer__legal-link {
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.footer__legal-link:hover {
    color: var(--text-secondary);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.35s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        min-height: auto;
        padding-top: 3rem;
    }

    .hero__content p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__badges {
        justify-content: center;
    }

    .hero__visual {
        order: -1;
    }

    .telemetry-card {
        max-width: 400px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    .process-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .process-grid::before {
        display: none;
    }

    .platform-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .hero__content h1 {
        font-size: 2.5rem;
    }

    .section-header__title {
        font-size: 2rem;
    }

    .cta-box__title {
        font-size: 2rem;
    }

    .hero__badges {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .badge {
        align-items: center;
    }

    .process-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }

    .footer__top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__brand p {
        max-width: 100%;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .hero__content h1 {
        font-size: 2rem;
        letter-spacing: -1px;
    }

    .hero__content p {
        font-size: 1rem;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .telemetry-card {
        max-width: 100%;
        padding: 1.25rem;
    }

    .telemetry-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .telemetry-node {
        padding: 0.85rem;
    }

    .telemetry-node__value {
        font-size: 1.3rem;
    }

    .section {
        padding: 3.5rem 1rem;
    }

    .section-header__title {
        font-size: 1.75rem;
    }

    .cta-box {
        padding: 3rem 1.25rem;
    }

    .cta-box__title {
        font-size: 1.6rem;
    }

    .cta-box__text {
        font-size: 0.95rem;
    }
}

/* ============================================
   SELETTORE LINGUA + SWITCH TEMA
   ============================================ */

/* ---- Gruppo azioni navbar ---- */
.navbar__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ---- Selettore lingua ---- */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--bg-card);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.lang-switch__item {
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.lang-switch__item:hover {
    color: var(--text-primary);
}

.lang-switch__item.is-active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    pointer-events: none;
}

/* ---- Switch tema ---- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.theme-toggle:hover {
    color: var(--text-primary);
    transform: rotate(15deg);
}

.theme-toggle:focus-visible,
.lang-switch__item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Tema scuro: mostra il sole · Tema chiaro: mostra la luna */
.theme-toggle__moon { display: none; }
html[data-theme="light"] .theme-toggle__sun  { display: none; }
html[data-theme="light"] .theme-toggle__moon { display: block; }

/* ---- Preferenze nel menu mobile ---- */
.mobile-menu__prefs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.mobile-menu__prefs .lang-switch {
    font-size: 0.95rem;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .nav-links { gap: 1.25rem; }
}

@media (max-width: 768px) {
    .navbar .lang-switch,
    .navbar .theme-toggle { display: none; }
}

/* ---- Transizione al cambio tema ---- */
html {
    color-scheme: dark;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   TEMA CHIARO
   ============================================ */
html[data-theme="light"] {
    color-scheme: light;

    --bg-primary: #f8fafc;
    --bg-secondary: #eef2f7;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(15, 23, 42, 0.09);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Colori brand leggermente più scuri per il contrasto su sfondo chiaro */
    --primary: #0891b2;
    --primary-glow: rgba(8, 145, 178, 0.12);
    --secondary: #4f46e5;
    --secondary-glow: rgba(79, 70, 229, 0.12);
    --accent: #059669;
    --accent-glow: rgba(5, 150, 105, 0.12);
    --warning: #ca8a04;
}

html[data-theme="light"] .bg-glow { opacity: 0.7; }

/* Colori scritti a mano in style2.css, da sovrascrivere */
html[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.8);
}

html[data-theme="light"] .mobile-menu {
    background: rgba(248, 250, 252, 0.97);
}

html[data-theme="light"] .btn--secondary:hover {
    background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .btn--ghost {
    background: rgba(15, 23, 42, 0.03);
}

html[data-theme="light"] .btn--ghost:hover {
    background: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .telemetry-card,
html[data-theme="light"] .dashboard-mockup {
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .service-card,
html[data-theme="light"] .faq-item {
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .service-card:hover {
    box-shadow: 0 16px 40px rgba(8, 145, 178, 0.12);
}

html[data-theme="light"] .telemetry-node,
html[data-theme="light"] .mini-card,
html[data-theme="light"] .dashboard-mockup__chart {
    background: rgba(15, 23, 42, 0.025);
}

html[data-theme="light"] .telemetry-node:hover {
    background: rgba(15, 23, 42, 0.045);
    border-color: rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] .mini-card__bar {
    background: rgba(15, 23, 42, 0.07);
}

html[data-theme="light"] .service-card__icon {
    background: rgba(15, 23, 42, 0.03);
}

html[data-theme="light"] .process-step__number {
    background: #ffffff;
}

html[data-theme="light"] .faq-item:hover {
    border-color: rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] .cta-box {
    background: linear-gradient(135deg, #ffffff 0%, #eef2f7 100%);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .footer {
    background: #ffffff;
}