:root {
    --bg-dark: #0a0a0c;
    --bg-card: #141419;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --primary: #6366f1;
    /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #ec4899;
    /* Pink */
    --accent: #10b981;
    /* Emerald */
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-color: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Utilities */
.section-padding {
    padding: 6rem 0;
}

.center {
    text-align: center;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fff;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo + testo brand sulla stessa riga */
.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    text-decoration: none;
}

.nav-brand-icon {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    color: var(--text-main);
}

.nav-brand-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.logo .accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn) {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-links a:not(.btn):hover {
    color: #fff;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
}

/* Pagine interne (Features, Sicurezza) */
.page-hero {
    padding-top: 140px;
    padding-bottom: 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.page-hero-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
}

.page-main {
    min-height: 50vh;
}

.section-alt {
    background: rgba(20, 20, 25, 0.5);
}

.page-list {
    max-width: 720px;
    margin: 0 auto;
}

.page-list li {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.security-note {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    text-align: center;
}

.about-intro {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.75;
    text-align: center;
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: 180px;
    padding-bottom: 100px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(20, 20, 30, 1) 0%, var(--bg-dark) 80%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15), transparent 60%);
    animation: pulseGlow 10s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.5;
        transform: translateX(-50%) scale(0.8);
    }

    100% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.1);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* UI Card Mockup */
.ui-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.ui-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.green {
    background: #10b981;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.stat-item .value {
    font-size: 1.2rem;
    font-weight: 700;
}

.value.success {
    color: var(--accent);
}

.graph-area {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 100px;
}

.bar {
    flex: 1;
    background: var(--primary);
    border-radius: 4px;
    opacity: 0.7;
    animation: pulseBar 2s infinite ease-in-out;
}

.bar:nth-child(2) {
    animation-delay: 0.2s;
}

.bar:nth-child(3) {
    animation-delay: 0.4s;
}

.bar:nth-child(4) {
    animation-delay: 0.1s;
}

.bar:nth-child(5) {
    animation-delay: 0.3s;
}

@keyframes pulseBar {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* .hero-bg-glow removed in favor of .hero::before */

/* Features */
.features {
    background: #0d0d10;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 4rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tech Section */
.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.tech-list li {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.check {
    color: var(--accent);
    font-weight: bold;
}

.tech-list strong {
    display: block;
    color: #fff;
    margin-bottom: 0.2rem;
}

.tech-list span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.code-block {
    background: #1e1e24;
    padding: 2rem;
    border-radius: 12px;
    border-left: 3px solid var(--secondary);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #a6accd;
    overflow-x: auto;
}

.kwd {
    color: #c792ea;
}

.var {
    color: #82aaff;
}

.str {
    color: #c3e88d;
}

.func {
    color: #82aaff;
}

.bool {
    color: #f78c6c;
}

.prop {
    color: #ffcb6b;
}

.cls {
    color: #ffcb6b;
    text-decoration: underline;
}

/* Solutions */
.solutions h2 {
    margin-bottom: 4rem;
}

.solution-card {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(20, 20, 25, 0) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.solution-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.solution-card p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    background: #050507;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    text-align: left;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

/* Footer mobile */
@media (max-width: 768px) {
    .page-hero {
        padding-top: 120px;
        padding-bottom: 2rem;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

    .page-hero-sub {
        font-size: 1rem;
    }

    .footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 2rem 1.5rem;
        margin-bottom: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-brand h3 {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }

    .footer-brand p {
        font-size: 0.95rem;
    }

    .footer-links {
        text-align: center;
    }

    .footer-links:first-of-type {
        justify-self: end;
    }

    .footer-links:last-of-type {
        justify-self: start;
    }

    .footer-links h4 {
        margin-bottom: 1rem;
        font-size: 1rem;
    }

    .footer-links a {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.8rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

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

.delay-1 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
    transition-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .tech-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .tech-content {
        order: 1;
        text-align: center;
    }

    .tech-visual {
        order: 2;
        min-width: 0;
    }

    .tech-content h2 {
        font-size: 1.5rem;
    }

    .tech-content > p {
        font-size: 0.95rem;
    }

    .tech-list {
        text-align: left;
        display: inline-block;
        margin: 0 auto;
    }

    .tech-list li {
        margin-top: 1rem;
        margin-bottom: 1rem;
        gap: 0.75rem;
    }

    .tech-list strong {
        font-size: 0.95rem;
    }

    .tech-list span {
        font-size: 0.85rem;
    }

    .code-block {
        padding: 1.25rem;
        font-size: 0.8rem;
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .code-block pre {
        margin: 0;
        white-space: pre;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* Tech section: ottimizzazioni per schermi molto piccoli */
@media (max-width: 480px) {
    .tech-section .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .tech-grid {
        gap: 2rem;
    }

    .tech-content h2 {
        font-size: 1.35rem;
    }

    .tech-list li {
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .code-block {
        padding: 1rem;
        font-size: 0.75rem;
    }
}