@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

/* ==========================================================================
   By Tiziano — Shared Theme (dark glass)
   Ogni pagina può ridefinire --primary / --secondary in uno style inline.
   ========================================================================== */

:root {
    --primary: #6366f1;
    --secondary: #a855f7;
    --accent: #f43f5e;
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --muted: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --container: 1100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
}

a {
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   Background blobs
   -------------------------------------------------------------------------- */
.blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    animation: blob-float 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

@keyframes blob-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 100px) scale(1.2); }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.main {
    flex: 1 0 auto;
    padding-top: 40px;
    padding-bottom: 60px;
}

.section {
    margin-bottom: 64px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 36px;
}

.section-subtitle {
    text-align: center;
    color: var(--muted);
    max-width: 700px;
    margin: -20px auto 36px;
}

/* --------------------------------------------------------------------------
   Header / Nav
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--card-border);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    flex-wrap: wrap;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.3px;
}

.nav-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
}

.nav-brand .nav-sub {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-menu a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s, background 0.2s;
}

.nav-menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.nav-menu a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 -2px 0 var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-light);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 760px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0 14px;
        gap: 2px;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 14px;
    }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    text-align: center;
    padding: 48px 0 24px;
}

.hero .app-icon,
.hero-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    object-fit: contain;
    margin: 0 auto 24px;
    display: block;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}

.hero-emoji {
    font-size: 72px;
    display: inline-block;
    margin-bottom: 16px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

h1,
.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.tagline,
.hero-subtitle {
    color: var(--muted);
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.btn-ghost {
    background: var(--card-bg);
    border-color: var(--card-border);
    color: var(--text-light);
    box-shadow: none;
}

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

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 28px;
    transition: border-color 0.3s, transform 0.3s, background 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
}

.card .icon,
.card-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 14px;
    line-height: 1;
}

.card img.card-img,
.card .card-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 14px;
    margin-bottom: 14px;
}

.card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

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

.badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Support box
   -------------------------------------------------------------------------- */
.support {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    margin: 50px 0;
}

.support p {
    color: var(--muted);
    margin-bottom: 20px;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 12px 22px;
    border-radius: 12px;
    transition: border-color 0.3s, background 0.3s;
}

.links a:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--card-border);
    background: rgba(2, 6, 23, 0.5);
    padding: 28px 0 36px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-content p {
    color: #475569;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   Prose / contenuti documentali (privacy, docs, manuali, FAQ)
   -------------------------------------------------------------------------- */
.prose {
    max-width: 860px;
    margin: 0 auto;
}

.prose.card,
.card.prose {
    padding: 40px;
}

.prose h2 {
    color: var(--primary);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--card-border);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    color: #cbd5e1;
    font-size: 1.25rem;
    margin: 2rem 0 0.8rem;
    font-weight: 600;
}

.prose p {
    color: var(--muted);
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.prose ul,
.prose ol {
    margin: 0 0 1.5rem 0;
    padding-left: 1.5rem;
    color: var(--muted);
}

.prose li {
    margin-bottom: 0.7rem;
    font-size: 1.02rem;
}

.prose li::marker {
    color: var(--primary);
}

.prose strong {
    color: #e2e8f0;
}

.prose a {
    color: var(--primary);
    font-weight: 600;
}

.prose blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 16px;
    color: var(--muted);
    margin: 1.5rem 0;
}

.prose code {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    padding: 2px 7px;
    border-radius: 6px;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.9em;
    color: #fda4af;
}

.prose pre {
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background: none;
    border: 0;
    padding: 0;
    color: #cbd5e1;
}

.prose .table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.prose th {
    background: color-mix(in srgb, var(--primary) 25%, transparent);
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 0.95rem;
}

.prose td {
    padding: 12px 14px;
    border-top: 1px solid var(--card-border);
    color: var(--muted);
}

.prose tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

/* Callout boxes */
.box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 16px 18px;
    margin: 1.5rem 0;
    color: var(--muted);
}

.box strong {
    color: #e2e8f0;
}

.box-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.box-success {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}

.box-info {
    border-left-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
}

/* Steps */
.step {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 16px 18px;
    margin: 1rem 0;
}

.step strong {
    color: #e2e8f0;
    display: block;
    margin-bottom: 4px;
}

.step p,
.step li {
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.step-num {
    min-width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
    .step-row {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* FAQ */
.faq-group {
    margin-bottom: 36px;
}

.faq-group > h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: #e2e8f0;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 14px;
    transition: border-color 0.3s;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item h4 {
    font-size: 1.02rem;
    margin-bottom: 8px;
    color: #fff;
}

.faq-item p {
    color: var(--muted);
    font-size: 0.97rem;
}

/* Chips / highlight tags */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.chip {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--card-border);
    color: #e2e8f0;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
}

/* Tabs (docs) */
.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
}

.tab-nav button,
.tab-nav a {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--muted);
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.2s;
}

.tab-nav button:hover,
.tab-nav a:hover {
    color: #fff;
    border-color: var(--primary);
}

.tab-nav button.active,
.tab-nav a.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-color: transparent;
}

/* Apps list (privacy) */
.apps-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin: 2rem 0;
}

.app-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 14px 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.3s, transform 0.3s, background 0.3s;
}

.app-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.app-item .app-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    margin: 0;
    flex-shrink: 0;
}

.app-item .app-icon-fallback {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.app-item .app-name {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

/* Contact / highlight card */
.contact-card {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, transparent), color-mix(in srgb, var(--secondary) 14%, transparent));
    border: 1px solid var(--card-border);
    padding: 40px;
    border-radius: 24px;
    margin-top: 4rem;
    text-align: center;
}

.contact-card h2 {
    border: 0;
    margin-top: 0;
    color: #fff;
}

.contact-card p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.highlight {
    color: var(--secondary);
    font-weight: 600;
}

/* Utilities */
.muted {
    color: var(--muted);
}

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

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.hide-mobile {
    display: inline;
}

@media (max-width: 520px) {
    .hide-mobile {
        display: none;
    }

    .container {
        padding: 0 16px;
    }

    .support {
        padding: 28px 20px;
    }

    .card.prose,
    .prose.card {
        padding: 24px 18px;
    }

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

    .footer-links {
        justify-content: center;
    }
}
