/* ========================================
   TECH SERVIZI v3 — Main Stylesheet
   Modern · Dark-ready · Award-worthy
   ======================================== */

:root {
    /* Colors */
    --accent: #F68712;
    --accent-light: #F9B165;
    --accent-dark: #D97210;
    --accent-glow: rgba(246,135,18,0.15);
    --gradient: linear-gradient(135deg, #F68712, #F9B165);
    --gradient-subtle: linear-gradient(135deg, rgba(246,135,18,0.06), rgba(249,177,101,0.06));

    --dark: #0a0a0a;
    --dark-soft: #141414;
    --dark-card: #1a1a1a;
    --text: #1a1a1a;
    --text-mid: #555;
    --text-light: #888;
    --border: #e8e8e8;
    --bg: #ffffff;
    --bg-off: #f8f8f8;
    --bg-warm: #fffbf5;

    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 8px 30px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
    --transition: .35s cubic-bezier(.4,0,.2,1);

    /* Cursor */
    --cursor-size: 40px;
}

/* ── Reset ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font); color: var(--text); background: var(--bg);
    line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased;
    overflow-x: hidden; transition: background 0.4s ease, color 0.4s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }
ul { list-style: none; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Gradient text ─────────────────── */
.gradient-text {
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Section tag ───────────────────── */
.section-tag {
    display: inline-block; font-size: .75rem; font-weight: 700;
    color: var(--accent); text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 16px;
    &::before { content: '— '; }
    &::after { content: ' —'; }
}

/* ── Buttons ───────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; border-radius: 50px; font-weight: 600;
    font-size: .95rem; transition: all var(--transition);
    cursor: pointer; border: none; letter-spacing: .3px;
    position: relative; overflow: hidden;
}
.btn-primary {
    background: var(--gradient); color: #fff;
    box-shadow: 0 4px 20px rgba(246,135,18,0.35);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(246,135,18,0.45);
    color: #fff;
}
.btn-ghost {
    background: transparent; color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--accent); color: var(--accent);
    transform: translateY(-3px);
}
.btn-lg { padding: 18px 40px; font-size: 1.05rem; }

/* ── Header ────────────────────────── */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,.85); backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
    height: 72px;
}
.header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}
.header .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.logo img { height: 40px; width: auto; transition: opacity 0.3s; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    padding: 8px 18px; border-radius: 50px; font-weight: 500;
    font-size: .88rem; color: var(--text-mid); transition: all var(--transition);
}
.nav a:hover, .nav a.active {
    color: var(--accent); background: var(--accent-glow);
}

.menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 40px; height: 40px; position: relative; z-index: 200;
}
.menu-toggle span {
    display: block; width: 22px; height: 2px; background: var(--text);
    border-radius: 2px; position: absolute; left: 9px;
    transition: all .3s ease;
}
.menu-toggle span:nth-child(1) { top: 12px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.menu-toggle.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ── Hero ──────────────────────────── */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
}
.hero-bg canvas {
    width: 100%; height: 100%;
}
.hero-grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(246,135,18,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(246,135,18,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
.hero-content {
    position: relative; z-index: 1; text-align: center;
    max-width: 800px; padding: 120px 24px 80px;
}
.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900;
    line-height: 1.1; color: var(--dark); margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.hero-sub {
    font-size: 1.15rem; color: var(--text-mid);
    margin-bottom: 40px; line-height: 1.8;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }

/* Hero stats */
.hero-stats {
    display: flex; align-items: center; justify-content: center; gap: 32px;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
    font-size: 2.2rem; font-weight: 900; color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.stat-label {
    display: block; font-size: .8rem; color: var(--text-light);
    margin-top: 4px; font-weight: 500;
}
.stat-divider {
    width: 1px; height: 40px; background: var(--border);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: var(--text-light); font-size: .75rem; font-weight: 500;
    letter-spacing: 1px; text-transform: uppercase;
}
.scroll-arrow {
    width: 20px; height: 20px; border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent); transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}
@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
    40% { transform: rotate(45deg) translateY(8px); }
    60% { transform: rotate(45deg) translateY(4px); }
}

/* ── Sections ──────────────────────── */
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-off); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800;
    color: var(--dark); margin-bottom: 12px; letter-spacing: -0.01em;
}
.section-header p { color: var(--text-mid); max-width: 520px; margin: 0 auto; font-size: 1.05rem; }

/* ── Service Cards ─────────────────── */
.services-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.service-card {
    padding: 36px; border-radius: var(--radius-lg);
    background: var(--bg); border: 1px solid var(--border);
    transition: all var(--transition); position: relative;
    overflow: hidden;
}
.card-glow {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(246,135,18,0.06), transparent 50%);
    opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.service-card:hover .card-glow { opacity: 1; }
.service-card:hover {
    box-shadow: var(--shadow-lg); transform: translateY(-6px);
    border-color: rgba(246,135,18,0.2);
}
.service-card .icon {
    width: 60px; height: 60px; border-radius: var(--radius);
    background: var(--accent-glow); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px; transition: all var(--transition);
}
.service-card:hover .icon {
    background: var(--gradient); color: #fff;
    transform: scale(1.1);
}
.service-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; color: var(--dark); }
.service-card p { color: var(--text-mid); font-size: .95rem; margin-bottom: 20px; line-height: 1.7; }
.card-link {
    font-size: .85rem; font-weight: 600; color: var(--accent);
    display: inline-flex; align-items: center; gap: 4px;
}
.card-link span { transition: transform var(--transition); }
.service-card:hover .card-link span { transform: translateX(6px); }

/* ── About Section ─────────────────── */
.about-section { position: relative; overflow: hidden; }
.parallax-bg {
    position: absolute; inset: -100px; background-size: cover;
    background-position: center; opacity: 0.04;
    transform: translateZ(0); will-change: transform;
}
.about-section .container {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 80px; align-items: center; position: relative; z-index: 1;
}
.about-text h2 {
    font-size: 2.2rem; font-weight: 800; color: var(--dark); margin-bottom: 24px;
}
.about-text p { color: var(--text-mid); margin-bottom: 16px; line-height: 1.8; }
.img-frame {
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg); position: relative;
    background: var(--bg-off);
}
.img-frame::before {
    content: ''; position: absolute; inset: -2px;
    background: var(--gradient); border-radius: var(--radius-lg);
    z-index: -1; opacity: 0.5;
}

/* ── CTA Section ───────────────────── */
.cta-section {
    padding: 120px 0; text-align: center;
    background: var(--dark); color: #fff;
    position: relative; overflow: hidden;
}
.cta-glow {
    position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(246,135,18,0.12), transparent 70%);
    pointer-events: none;
}
.cta-section h2 {
    font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800;
    margin-bottom: 16px; position: relative;
}
.cta-section p {
    color: rgba(255,255,255,.6); margin-bottom: 32px;
    max-width: 480px; margin-left: auto; margin-right: auto;
    font-size: 1.1rem; position: relative;
}
.cta-contacts {
    margin-top: 32px; display: flex; gap: 32px;
    justify-content: center; flex-wrap: wrap;
}
.cta-contacts a {
    color: rgba(255,255,255,.5); font-weight: 500;
    transition: color var(--transition);
}
.cta-contacts a:hover { color: var(--accent); }

/* ── Footer ────────────────────────── */
.footer {
    background: var(--dark-soft); color: rgba(255,255,255,.4);
    padding: 60px 0 0; border-top: 2px solid var(--accent);
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px; padding-bottom: 40px;
}
.footer-brand img { height: 36px; margin-bottom: 16px; filter: brightness(0) invert(1) opacity(0.6); }
.footer-brand p { font-size: .9rem; line-height: 1.6; }
.footer h4 { color: rgba(255,255,255,.8); font-size: .85rem; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: rgba(255,255,255,.4); font-size: .9rem; transition: color var(--transition); }
.footer ul a:hover { color: var(--accent); }
.footer .contact-info p { font-size: .9rem; margin-bottom: 4px; }
.footer .contact-info a { font-weight: 600; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 0; border-top: 1px solid rgba(255,255,255,.08);
    font-size: .85rem;
}

/* ── Theme Toggle ──────────────────── */
.theme-toggle {
    position: fixed; bottom: 24px; right: 24px; z-index: 90;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--border);
    box-shadow: var(--shadow); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); color: var(--text);
}
.theme-toggle:hover {
    transform: scale(1.1); box-shadow: var(--shadow-lg);
}
.icon-moon { display: none; }

/* ── Responsive ────────────────────── */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .about-section .container { gap: 40px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav {
        display: none; position: fixed; top: 72px; left: 0; right: 0;
        background: var(--bg); flex-direction: column; z-index: 150;
        border-bottom: 2px solid var(--accent);
        box-shadow: 0 8px 30px rgba(0,0,0,.12);
    }
    .nav.open { display: flex; }
    .nav a {
        font-size: 1.1rem; padding: 20px 24px; width: 100%;
        text-align: left; color: var(--dark); font-weight: 600;
        border-bottom: 1px solid var(--border);
    }
    .hero-content { padding: 100px 24px 60px; }
    .hero h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); }
    .hero-stats { gap: 20px; }
    .stat-number { font-size: 1.6rem; }
    .services-grid { grid-template-columns: 1fr; }
    .about-section .container {
        grid-template-columns: 1fr; text-align: center;
    }
    .about-visual { order: -1; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
    .footer-brand img { margin: 0 auto 12px; }
    .footer-bottom { flex-direction: column; gap: 8px; }
    .section { padding: 70px 0; }
    /* Hide custom cursor on mobile */
    .cursor-dot, .cursor-ring { display: none !important; }
    .scroll-indicator { display: none; }
}

/* ── Page Hero v3 ───────────────────── */
.page-hero-v3 {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
}
.page-hero-v3 h1 {
    font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800;
    color: var(--dark); margin-bottom: 12px;
}
.page-hero-v3 p {
    color: var(--text-mid); max-width: 520px; margin: 0 auto;
    font-size: 1.05rem;
}

/* ── About Grid ────────────────────── */
.about-grid {
    display: grid; grid-template-columns: 1.2fr 1fr;
    gap: 60px; align-items: center;
}
.about-text h2 {
    font-size: 2rem; font-weight: 800; color: var(--dark); margin-bottom: 24px;
}
.about-text p {
    color: var(--text-mid); margin-bottom: 16px; line-height: 1.8;
}

/* ── Quality Cards ─────────────────── */
.quality-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.quality-card {
    padding: 32px 24px; border-radius: var(--radius-lg);
    background: var(--bg); border: 1px solid var(--border);
    text-align: center; transition: all var(--transition);
}
.quality-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(246,135,18,0.2);
}
.quality-icon {
    width: 64px; height: 64px; border-radius: var(--radius);
    background: var(--accent-glow); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; transition: all var(--transition);
}
.quality-card:hover .quality-icon {
    background: var(--gradient); color: #fff; transform: scale(1.1);
}
.quality-card h3 {
    font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: 8px;
}
.quality-card p {
    font-size: .9rem; color: var(--text-mid); line-height: 1.6;
}

@media (max-width: 1024px) {
    .quality-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-visual { order: -1; }
    .quality-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}
