/* GLOBAL & VARIABLES */
:root {
    --bg-color: #020205;
    --panel-bg: rgba(20, 25, 40, 0.7);
    --border-color: rgba(0, 242, 254, 0.2);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent: #00f2fe;
    --accent-hover: #4facfe;
    --highlight: #ff3366;
}

/* VIEW TRANSITIONS API */
@view-transition {
    navigation: auto;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    scroll-behavior: smooth;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Hide scrollbar for a cleaner look */
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}
body::-webkit-scrollbar { 
    display: none; 
}

/* FILM GRAIN TEXTURE */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* SCROLL REVEAL ANIMATIONS */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* STICKY HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(2, 2, 5, 0.85);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    height: 70px;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo .icon {
    font-size: 1.8rem;
}
.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.logo .subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.main-nav {
    display: flex;
    gap: 25px;
}
.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.main-nav a:hover {
    color: var(--accent);
}
.main-nav a.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
}

/* MAIN CONTENT */
.site-content {
    flex: 1;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* TYPOGRAPHY & PANELS */
h2 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
}
.glow-title {
    background: linear-gradient(135deg, #ffffff 0%, #a0a5b5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.7;
    margin-bottom: 50px;
    max-width: 800px;
    font-weight: 400;
}

.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 40px;
}

/* GRIDS */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.icon-large {
    font-size: 3rem;
    margin-bottom: 20px;
}
.highlight-panel {
    border-color: var(--highlight);
    box-shadow: inset 0 0 20px rgba(255, 51, 102, 0.1);
}

/* STATS (Tecnologia) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}
.mouse-glow-card {
    position: relative;
    background: rgba(15, 20, 30, 0.8);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mouse-glow-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(0, 242, 254, 0.4),
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.mouse-glow-card:hover {
    transform: translateY(-5px);
}
.stat-value {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: -0.05em;
}
.stat-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* DOWNLOADS (Tecnologia) */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.download-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
}
.download-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-5px);
}
.btn-download {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(0, 242, 254, 0.2);
    border-radius: 8px;
    color: var(--accent);
    font-weight: 700;
    margin-top: 20px;
}

/* CALCULATOR (Preventivo) */
.calc-container {
    max-width: 800px;
    margin: 0 auto;
}
.input-group {
    background: rgba(0, 242, 254, 0.05);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 254, 0.3);
    margin-bottom: 30px;
    text-align: center;
}
input[type="range"] {
    width: 100%;
    margin: 20px 0;
    cursor: pointer;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.result-box {
    background: rgba(20,25,40,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.result-box.highlight {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}
.result-value {
    font-size: 2rem;
    font-weight: 900;
    display: block;
    margin-top: 10px;
}

/* EFFECTS & BUTTONS */
.glow-text {
    background: linear-gradient(90deg, #fff 0%, #00f2fe 50%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.highlight-stat .glow-text, .result-box.highlight .glow-text {
    background: linear-gradient(90deg, #ff9933 0%, #ff3366 100%);
    -webkit-background-clip: text;
}
.text-center { text-align: center; }

.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    margin: 10px;
}
.btn-primary {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}
.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
}
.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
.btn-secondary:hover {
    background: rgba(0, 242, 254, 0.1);
}

/* FOOTER */
.site-footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}
