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

/* =========================================================
   AltariaMC — global shell (2026)
   Palette originale: rosso AltariaMC + neri caldi.
   ========================================================= */
:root {
    --brand-red: #e60000;
    --brand-red-bright: #ff2e2e;
    --brand-red-deep: #800c0c;
    --brand-rose: #ffcccc;
    --brand-green: #2ed573;
    --brand-discord: #5865f2;
    --ink: #0d0202;
    --surface: #171010;
    --text: #ffffff;
    --muted: #9aa0a6;
    --line: rgba(255, 255, 255, 0.08);
    --font-sans: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0d0202; }
::-webkit-scrollbar-thumb { background: #800c0c; border-radius: 10px; border: 2px solid #0d0202; }
::-webkit-scrollbar-thumb:hover { background: #b30000; }

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

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, #1a0505 0%, #0d0202 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    display: block;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

::selection {
    background: var(--brand-red);
    color: #ffffff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ffcccc;
    outline-offset: 3px;
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px clamp(16px, 4vw, 40px);
    background: #800c0c;
    border-bottom: 4px solid #ff2e2e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.menu-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-mobile a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-he {
    height: 44px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.logo-he:hover {
    transform: scale(1.04);
}

.menu-mobile h1,
.menu-mobile .server-name {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin: 0;
    color: #ffffff;
    white-space: nowrap;
    line-height: 1;
}

.menu-mobile .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 7px;
    cursor: pointer;
    border-radius: 8px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.links a:hover {
    color: #ffcccc;
    background: rgba(0, 0, 0, 0.12);
}

.links a.active {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: inset 0 -2px 0 #ffffff;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-flex;
    flex-direction: column;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.dropdown-toggle::after {
    content: "▾";
    font-size: 0.62rem;
    opacity: 0.7;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    min-width: 190px;
    padding: 6px;
    border: 1px solid rgba(255, 46, 46, 0.2);
    border-radius: 12px;
    background: #1a0a0a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    z-index: 300;
    overflow: hidden;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #e0d0d0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    color: #ffffff;
    background: rgba(255, 46, 46, 0.08);
}

.dropdown:last-child .dropdown-menu {
    left: auto;
    right: 0;
}

@media (max-width: 900px) {
    header {
        flex-wrap: wrap;
        padding: 10px 16px;
    }

    .menu-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .hamburger {
        display: flex;
    }

    .links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin-top: 8px;
        padding: 10px 0 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .links.active {
        display: flex;
    }

    .links a {
        width: 100%;
        padding: 12px 12px;
        font-size: 0.82rem;
        letter-spacing: 0.08em;
        border-radius: 8px;
    }

    .links a.active {
        background: rgba(0, 0, 0, 0.18);
        box-shadow: inset 3px 0 0 #ffffff;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        margin: 2px 0 6px;
        padding: 4px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.24);
        box-shadow: none;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown.open .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .dropdown-menu a {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    header.active .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    header.active .hamburger span:nth-child(2) {
        opacity: 0;
    }

    header.active .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* =========================================================
   UTILITY CONDIVISE (altre pagine)
   ========================================================= */
.hand {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    color: #ff8a8a;
}

.eyebrow {
    display: inline-block;
    font-family: 'Caveat', cursive;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff8a8a;
    transform: rotate(-0.8deg);
}

.scribble {
    position: absolute;
    left: -6px;
    right: -6px;
    bottom: -12px;
    height: 16px;
    pointer-events: none;
    opacity: 0.9;
}

.scribble path {
    stroke: #e60000;
    stroke-width: 2.2;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 280;
    stroke-dashoffset: 0;
}

.title-section h2 {
    position: relative;
    display: inline-block;
    letter-spacing: -0.5px;
}

.title-section h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 52px;
    height: 3px;
    border-radius: 2px;
    background: #e74c3c;
}

.title-section p {
    position: relative;
}

.title-section .eyebrow {
    margin-bottom: 6px;
}

/* Card delle altre pagine: mantiene il contesto per elementi assoluti */
.group,
.card,
.container .group {
    position: relative;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    width: 100%;
    margin-top: 0;
    padding: 52px clamp(20px, 5vw, 48px) 22px;
    background: linear-gradient(180deg, #1a0505 0%, #0d0202 100%);
    border-top: 3px solid #800c0c;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 0.9fr 0.9fr 1fr;
    gap: 40px;
    align-items: start;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.footer-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-brand h3 {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ffffff;
}

.footer-brand-text p {
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.01em;
    color: #9aa0a6;
}

.footer-ip-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 46, 46, 0.28);
    border-radius: 999px;
    background: rgba(128, 12, 12, 0.18);
    color: #ffcccc;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-ip-pill:hover {
    background: rgba(255, 46, 46, 0.22);
    border-color: #ff2e2e;
    color: #ffffff;
    transform: translateY(-1px);
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 14px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ff2e2e;
}

.footer-links a,
.footer-social a {
    display: block;
    margin-bottom: 9px;
    color: #b0b8c0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover,
.footer-social a:hover {
    color: #ffcccc;
    transform: translateX(3px);
}

.footer-links a.active {
    color: #ffcccc;
}

.footer-social a.social-discord {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 7px 14px;
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 999px;
    background: rgba(88, 101, 242, 0.12);
    color: #c2c7ff;
    font-size: 0.8rem;
    font-weight: 700;
}

.footer-social a.social-discord:hover {
    background: #5865f2;
    border-color: #5865f2;
    color: #ffffff;
    transform: translateY(-1px);
}

.footer-social-note {
    margin-top: 8px;
    font-size: 0.74rem;
    line-height: 1.55;
    color: #7a828c;
}

.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(128, 12, 12, 0.3);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.74rem;
    line-height: 1.7;
    color: #8a8a8a;
}

.footer-bottom strong {
    color: #ff6b6b;
    font-weight: 700;
}

.footer-bottom a {
    color: #b0b0c0;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 46, 46, 0.35);
}

.footer-bottom a:hover {
    color: #ffcccc;
}

@media (max-width: 980px) {
    .footer-content {
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 30px;
    }

    .footer-social {
        grid-column: 1 / -1;
        padding-top: 4px;
    }
}

@media (max-width: 768px) {
    footer {
        padding-top: 42px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
        text-align: center;
    }

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

    .footer-brand-text {
        align-items: center;
    }

    .footer-ip-pill {
        align-self: center;
    }

    .footer-links a,
    .footer-social a {
        display: block;
        margin-bottom: 8px;
    }

    .footer-links a:hover,
    .footer-social a:hover {
        transform: none;
    }

    .footer-social {
        grid-column: 1 / -1;
        padding-top: 0;
    }

    .footer-social-note {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-bottom {
        margin-top: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
