:root {
    --bg: #0a0608;
    --bg-soft: #170e11;
    --accent: #ff1f3d;
    --accent-2: #8b0000;
    --gold: #d4a017;
    --text: #f5eeee;
    --text-dim: #bfaaaa;
    --nav-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Crimson Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(160deg, #120a0c 0%, #0a0608 55%, #150a0a 100%);
    color: var(--text);
    overflow-x: hidden;
}

/* ---------- Particelle di sfondo ---------- */

.background-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-particles { position: absolute; width: 100%; height: 100%; }

.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    bottom: -10px;
    background: rgba(255, 31, 61, 0.55);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* ---------- Navbar ---------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(10, 6, 8, 0.92), transparent);
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 6, 8, 0.94);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Pirata One', cursive;
    font-size: 1.9rem;
    color: var(--accent);
    text-decoration: none;
    text-shadow: 0 0 18px rgba(255, 31, 61, 0.45);
}

.brand i { animation: pulse 2.4s ease-in-out infinite; }

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

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: linear-gradient(120deg, var(--accent), var(--gold));
    transition: width 0.25s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links > li > a:hover::after { width: 100%; }

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-sm {
    padding: 0.55rem 1.4rem;
    font-size: 0.9rem;
}

.nav-username {
    font-size: 0.9rem;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 26px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1.5rem;
    background:
        radial-gradient(ellipse at 30% 15%, rgba(139, 0, 0, 0.35), transparent 55%),
        radial-gradient(ellipse at 75% 80%, rgba(255, 31, 61, 0.2), transparent 55%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--hero-image, none);
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    z-index: 0;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(5, 3, 4, 0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    animation: rise 1s ease both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-family: 'Pirata One', cursive;
    font-size: clamp(3.5rem, 10vw, 6.5rem);
    letter-spacing: 0.05em;
    color: var(--accent);
    text-shadow: 0 0 40px rgba(255, 31, 61, 0.5), 0 0 90px rgba(139, 0, 0, 0.4);
}

.hero-subtitle {
    font-family: 'Pirata One', cursive;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: var(--text);
    margin-top: 0.25rem;
    letter-spacing: 0.03em;
}

.hero-hook {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--gold);
    opacity: 0.9;
}

.hero-desc {
    margin: 1.75rem auto 2.5rem;
    max-width: 620px;
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--text-dim);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 2.1rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(45deg, var(--accent), var(--accent-2));
    border: 2px solid var(--accent);
    box-shadow: 0 10px 28px rgba(255, 31, 61, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #fff, #ffd6d6);
    color: var(--accent-2);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 38px rgba(255, 31, 61, 0.4);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
    background: #fff;
    color: #222;
    transform: translateY(-3px) scale(1.03);
}

/* ---------- Feature cards ---------- */

.features {
    position: relative;
    z-index: 1;
    padding: 5rem 1.5rem 6rem;
}

.features-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 2.25rem 2rem;
    background: rgba(23, 14, 17, 0.85);
    border: 1px solid rgba(255, 31, 61, 0.2);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 20px 45px rgba(139, 0, 0, 0.35);
}

.feature-icon { font-size: 2rem; color: var(--accent); }

.feature-title { font-family: 'Pirata One', cursive; font-size: 1.5rem; letter-spacing: 0.02em; }

.feature-text { font-size: 0.98rem; color: var(--text-dim); line-height: 1.5; }

.feature-link {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold);
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    z-index: 1;
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 31, 61, 0.15);
}

.site-footer-domain { margin-top: 0.35rem; letter-spacing: 0.05em; }
.site-footer-domain a { color: var(--accent); text-decoration: none; }
.site-footer-domain a:hover { text-decoration: underline; }

.footer-legal {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1rem;
}

.footer-legal a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
}

.footer-legal a:hover { color: var(--text); text-decoration: underline; }

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.footer-social a {
    color: var(--text-dim);
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.footer-social a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .navbar { padding: 0 1.25rem; }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: rgba(10, 6, 8, 0.97);
        backdrop-filter: blur(10px);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.open { max-height: 480px; }

    .nav-links > li > a {
        display: block;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 31, 61, 0.12);
    }

    .nav-auth {
        flex-wrap: wrap;
        justify-content: center;
        padding: 1.25rem 1.5rem;
    }

    .nav-username {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .nav-auth a {
        flex: 1;
        justify-content: center;
        border-bottom: none;
    }

    .nav-toggle { display: flex; }
}
