/* Pagina d'ingresso (pages/benvenuto.php): si appoggia alle variabili e ai componenti di ucp.css */

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

body.scene-landing {
    background: linear-gradient(180deg, #2a2f6e 0%, #c8603e 38%, #2a1424 62%, var(--bg) 100%);
}

/* la citta' 3D si vede bene in cima; piu' in basso il velo scurisce per far leggere i testi */
body.scene-landing .veil {
    background:
        linear-gradient(rgba(5, 7, 13, var(--lp-veil, 0)), rgba(5, 7, 13, var(--lp-veil, 0))),
        radial-gradient(120% 70% at 50% 0%, transparent 0%, rgba(5, 7, 13, 0.25) 70%),
        linear-gradient(180deg, rgba(5, 7, 13, 0.05) 0%, rgba(5, 7, 13, 0.35) 55%, rgba(5, 7, 13, 0.6) 100%);
}

.lp-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 30;
    pointer-events: none;
}
.lp-progress span {
    display: block;
    height: 100%;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, #ff8a3d, var(--accent), var(--accent-2));
    box-shadow: 0 0 12px rgba(46, 155, 255, 0.7);
}

.lp-nav .lp-links a { font-weight: 600; }
.lp-nav > .btn { text-decoration: none; }

.lp {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 40px;
}

.lp-grad {
    background: linear-gradient(100deg, #ffd27a 0%, #ff8a3d 30%, #ff5fa2 60%, #8b5cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lp-btn-big { padding: 15px 26px; font-size: 1.02rem; text-decoration: none; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------------------------------------------------------------- hero */

.lp-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 110px 0 90px;
}

.lp-hero-inner { max-width: 720px; }

.lp-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.86rem;
    color: #e9edf6;
    background: rgba(5, 7, 13, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lp-title {
    margin: 22px 0 0;
    font-size: clamp(2.6rem, 8.5vw, 6rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.035em;
    text-shadow: 0 6px 40px rgba(0, 0, 0, 0.35);
}

.lp-title-small {
    display: block;
    margin-bottom: 14px;
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-weight: 800;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: #ffd9b8;
    text-shadow: none;
}

.lp-lead {
    margin: 22px 0 0;
    max-width: 620px;
    font-size: clamp(1.02rem, 2.2vw, 1.2rem);
    line-height: 1.65;
    color: #e3e7f0;
}

.lp-numbers {
    list-style: none;
    margin: 42px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, auto));
    justify-content: start;
    gap: 14px 34px;
}
.lp-numbers li { display: grid; gap: 2px; }
.lp-numbers strong { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.lp-numbers span { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: #d4d9e4; }

.lp-scroll {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: 28px;
    height: 46px;
    margin-left: -14px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
}
.lp-scroll span {
    position: absolute;
    left: 50%;
    top: 9px;
    width: 4px;
    height: 9px;
    margin-left: -2px;
    border-radius: 2px;
    background: #fff;
    animation: lpWheel 1.8s ease-in-out infinite;
}
@keyframes lpWheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------------------------------------------------------------- sezioni */

.lp-section { padding: 90px 0 30px; scroll-margin-top: 70px; }

.lp-h2 {
    margin: 10px 0 0;
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.lp-fade { animation: lpFade .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes lpFade { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- due strade */

.lp-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }

.lp-path {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 26px 26px 28px;
    text-align: left;
    color: var(--text);
    font: inherit;
    cursor: pointer;
    overflow: hidden;
}
.lp-path::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), rgba(46, 155, 255, 0.18), transparent 45%);
    opacity: 0;
    transition: opacity .3s;
}
.lp-path:hover::before, .lp-path.active::before { opacity: 1; }
.lp-path.active { border-color: rgba(46, 155, 255, 0.6); box-shadow: 0 0 0 1px rgba(46, 155, 255, 0.35), 0 24px 60px rgba(46, 155, 255, 0.2); }
.lp-path:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.lp-path-emoji { font-size: 2.2rem; line-height: 1; transform: translateZ(30px); }
.lp-path-title { font-size: 1.35rem; font-weight: 800; transform: translateZ(20px); }
.lp-path-text { color: var(--muted); font-size: 0.98rem; }

.lp-path-panel { margin-top: 18px; padding: 28px 30px; }
.lp-path-panel h3 { margin: 0 0 18px; font-size: clamp(1.25rem, 3vw, 1.6rem); line-height: 1.25; }

.lp-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.lp-compare-label { display: block; margin-bottom: 10px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.lp-compare-label.accent { color: var(--accent); }

.lp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lp-list li { position: relative; padding-left: 30px; }
.lp-list li::before {
    position: absolute;
    left: 0;
    top: 1px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 900;
}
.lp-list.minus li { color: var(--muted); }
.lp-list.minus li::before { content: "\2013"; background: rgba(255, 255, 255, 0.08); }
.lp-list.plus li::before { content: "\2713"; color: #06210f; background: var(--green); box-shadow: 0 0 10px rgba(76, 195, 138, 0.5); }

.lp-note { margin: 20px 0 0; color: #c9d0dd; line-height: 1.65; }
.lp-note a, .lp-step a:not(.btn), .lp-faq a { color: #7cc0ff; }

.lp-vet { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.lp-vet li { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.06); }
.lp-vet strong { color: #ffc58f; }

/* ---------------------------------------------------------------- roleplay e chat */

.lp-rp { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }

.lp-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 26px 0 0; }
.lp-keys div { padding: 12px 14px; border-radius: 12px; background: rgba(5, 7, 13, 0.5); border: 1px solid var(--panel-border); }
.lp-keys dt { font-family: Consolas, "Courier New", monospace; font-weight: 700; color: var(--accent); }
.lp-keys dd { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }

/* finestra in stile chat di SA-MP: testo con il contorno nero */
.lp-chat {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    transform: perspective(1200px) rotateY(-8deg) rotateX(3deg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.lp-chat-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(255, 255, 255, 0.06); }
.lp-chat-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.lp-chat-bar em { margin-left: 8px; font-style: normal; font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lp-chat-lines {
    list-style: none;
    margin: 0;
    padding: 16px 18px 20px;
    display: grid;
    gap: 6px;
    min-height: 290px;
    align-content: start;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.4;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}
.lp-chat-lines li { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
html:not(.js) .lp-chat-lines li, .lp-chat-lines li.on { opacity: 1; transform: none; }
.c-me { color: #c2a2da; }
.c-do { color: #c2a2da; font-style: italic; }
.c-say { color: #ffffff; }
.c-ooc { color: #a9a9a9; }

/* ---------------------------------------------------------------- anello 3D dei quartieri */

.lp-ring-stage {
    position: relative;
    margin: 30px auto 0;
    height: 320px;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
html:not(.js) .lp-ring-stage { display: none; }

.lp-ring-view {
    position: absolute;
    inset: 0;
    perspective: 1400px;
    perspective-origin: 50% 35%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.lp-ring {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 50%;
    top: 34px;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
}

.lp-ring-item {
    --c: var(--accent);
    position: absolute;
    left: -95px;
    top: 0;
    width: 190px;
    height: 215px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: opacity .3s;
}

.lp-ring-item button {
    width: 100%;
    height: 100%;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 10px;
    padding: 18px 12px;
    border-radius: 22px;
    color: var(--text);
    font: inherit;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(160deg, color-mix(in srgb, var(--c) 26%, transparent), rgba(10, 14, 24, 0.82) 60%);
    border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    transition: transform .3s, box-shadow .3s, border-color .3s;
}
.lp-ring-item svg { width: 46px; height: 46px; fill: none; stroke: var(--c); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 10px var(--c)); }
.lp-ring-item strong { font-size: 1.02rem; line-height: 1.2; }
.lp-ring-item span { font-size: 0.78rem; color: var(--muted); }
.lp-ring-item.active button { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 40px color-mix(in srgb, var(--c) 45%, transparent), 0 24px 60px rgba(0, 0, 0, 0.5); transform: translateY(-6px) scale(1.04); }
.lp-ring-item button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.lp-ring-floor {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: min(620px, 90%);
    height: 60px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(46, 155, 255, 0.35), transparent);
    filter: blur(8px);
    pointer-events: none;
}

.lp-ring-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    margin-top: -34px;
    border-radius: 50%;
    border: 1px solid var(--panel-border);
    background: rgba(10, 14, 24, 0.75);
    color: var(--text);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.lp-ring-arrow:hover { background: rgba(46, 155, 255, 0.3); }
.lp-ring-arrow.prev { left: 0; }
.lp-ring-arrow.next { right: 0; }

/* ---------------------------------------------------------------- sistemi del quartiere */

.lp-cats { display: grid; gap: 40px; margin-top: 10px; }
.lp-cat { --c: var(--accent); }
.lp-cat[hidden] { display: none; }

.lp-cat-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.lp-cat-head h3 { margin: 0; font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 900; letter-spacing: -0.01em; }
.lp-cat-head p { margin: 2px 0 0; color: var(--c); font-weight: 700; }
.lp-cat-icon {
    flex: none;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--c) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
    box-shadow: 0 0 30px color-mix(in srgb, var(--c) 30%, transparent);
}
.lp-cat-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.lp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.lp-card {
    position: relative;
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 22px 22px 20px;
    overflow: hidden;
}
.lp-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--c), transparent); }
.lp-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 16%, transparent), transparent 45%);
}
.lp-card h4 { margin: 0; font-size: 1.12rem; font-weight: 800; line-height: 1.25; padding-right: 60px; transform: translateZ(20px); }
.lp-card p { margin: 0; color: #cdd3de; font-size: 0.96rem; line-height: 1.55; }
.lp-new {
    position: absolute;
    top: 18px;
    right: 16px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

/* ---------------------------------------------------------------- guida */

.lp-mobile-note { margin-top: 24px; padding: 16px 20px; display: none; line-height: 1.55; }
.lp-mobile-note strong { display: block; margin-bottom: 4px; }
@media (pointer: coarse), (max-width: 760px) { .lp-mobile-note { display: block; } }

.lp-steps {
    list-style: none;
    margin: 34px 0 0;
    padding: 0;
    display: grid;
    gap: 18px;
    position: relative;
}
.lp-steps::before {
    content: "";
    position: absolute;
    left: 37px;
    top: 30px;
    bottom: 30px;
    width: 2px;
    background: linear-gradient(180deg, #ff8a3d, var(--accent), var(--accent-2));
    opacity: 0.5;
}

.lp-step { position: relative; display: grid; grid-template-columns: 50px 1fr; gap: 20px; padding: 24px 26px 24px 13px; }
.lp-step-n {
    position: relative;
    z-index: 1;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    font-weight: 900;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 0 6px rgba(5, 7, 13, 0.7), 0 10px 30px rgba(46, 155, 255, 0.4);
}
.lp-step-hot { border-color: rgba(76, 195, 138, 0.5); box-shadow: 0 0 0 1px rgba(76, 195, 138, 0.25), var(--shadow); }
.lp-step-hot .lp-step-n { background: linear-gradient(140deg, #1f9d61, #4cc38a); }
.lp-step-body { min-width: 0; }
.lp-step-body h3 { margin: 10px 0 8px; font-size: 1.25rem; line-height: 1.3; }
.lp-step-body p { margin: 0 0 12px; color: #cdd3de; line-height: 1.65; }
.lp-step-body .btn { text-decoration: none; margin-top: 4px; }
.lp-step code, .lp-faq code, .lp-copy code {
    font-family: Consolas, "Courier New", monospace;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffe0b8;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

.lp-substeps { margin: 4px 0 12px; padding-left: 22px; display: grid; gap: 10px; color: #cdd3de; line-height: 1.6; }
.lp-substeps li::marker { color: var(--accent); font-weight: 800; }

.lp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; }
.lp-tabs button {
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s, background .2s, border-color .2s;
}
.lp-tabs button:hover { color: var(--text); }
.lp-tabs button.active { color: #fff; border-color: transparent; background: linear-gradient(120deg, var(--accent), var(--accent-2)); }
.lp-tab { padding: 14px 16px; border-radius: 14px; background: rgba(46, 155, 255, 0.08); border: 1px solid rgba(46, 155, 255, 0.2); margin-bottom: 12px; }
.lp-tab p { margin: 0; }
.lp-tab[hidden] { display: none; }

.lp-warn, .lp-tip { padding: 12px 14px; border-radius: 12px; font-size: 0.94rem; }
.lp-warn { background: rgba(245, 197, 66, 0.1); border: 1px solid rgba(245, 197, 66, 0.35); color: #f6e3b0 !important; }
.lp-tip { background: rgba(255, 255, 255, 0.05); border: 1px dashed rgba(255, 255, 255, 0.15); }

.lp-copy { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: 4px; }
.lp-copy code { font-size: 1.02rem; padding: 6px 12px; }
.lp-copy .btn.ok { background: rgba(76, 195, 138, 0.3); }

/* ---------------------------------------------------------------- domande */

.lp-faq-list { display: grid; gap: 12px; margin-top: 30px; max-width: 860px; }
.lp-faq-list details { padding: 0; border-radius: 16px; }
.lp-faq-list summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 54px 18px 22px;
    font-weight: 700;
    font-size: 1.05rem;
    position: relative;
}
.lp-faq-list summary::-webkit-details-marker { display: none; }
.lp-faq-list summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--accent);
    transition: transform .25s;
}
.lp-faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.lp-faq-list details p { margin: 0; padding: 0 22px 20px; color: #cdd3de; line-height: 1.65; }

/* ---------------------------------------------------------------- chiusura */

.lp-final { padding: 120px 0 60px; text-align: center; }
.lp-final .lp-lead { margin-left: auto; margin-right: auto; }
.lp-final .lp-cta { justify-content: center; }
.lp-title-final { font-size: clamp(2.3rem, 7vw, 5rem); }

/* ---------------------------------------------------------------- tablet e telefono */

@media (max-width: 980px) {
    .lp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-rp { grid-template-columns: 1fr; gap: 30px; }
    .lp-chat { transform: none; }
}

@media (max-width: 760px) {
    .lp { width: calc(100% - 32px); }
    .lp-nav .lp-links { display: none; }
    .lp-nav { justify-content: space-between; }

    .lp-hero { padding: 96px 0 90px; align-items: flex-end; }
    .lp-hero-inner { text-align: left; }
    .lp-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
    .lp-cta .lp-btn-big { flex: 1 1 100%; text-align: center; }

    .lp-section { padding: 64px 0 20px; }
    .lp-paths, .lp-compare, .lp-vet, .lp-cards { grid-template-columns: 1fr; }
    .lp-path { padding: 20px; }
    .lp-path-panel { padding: 22px 20px; }

    .lp-chat-lines { font-size: 0.88rem; min-height: 0; }

    .lp-ring-stage { height: 250px; margin-top: 18px; }
    .lp-ring { top: 26px; }
    .lp-ring-item { left: -66px; width: 132px; height: 170px; }
    .lp-ring-item svg { width: 38px; height: 38px; }
    .lp-ring-item strong { font-size: 0.92rem; }
    .lp-ring-arrow { width: 42px; height: 42px; margin-top: -30px; }

    .lp-steps::before { left: 33px; }
    .lp-step { grid-template-columns: 42px 1fr; gap: 14px; padding: 20px 18px 20px 12px; }
    .lp-step-n { width: 42px; height: 42px; font-size: 1.1rem; }
    .lp-step-body h3 { margin-top: 6px; font-size: 1.1rem; }

    .lp-final { padding: 80px 0 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-scroll span, .lp-fade { animation: none; }
    .lp-chat-lines li { transition: none; }
}
