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

:root {
    --accent: #c8a96e;
    --dark:   #0d0d0d;
    --light:  #f5f0eb;
    --fade:   1.8s;
}

html, body {
    height: 100%;
    font-family: 'Georgia', serif;
    background: var(--dark);
    color: var(--light);
    overflow-x: hidden;
}

/* ── Slideshow sfondo ─────────────────────────────────── */
#slideshow-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: var(--dark);
}

#slideshow-bg .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity var(--fade) ease-in-out;
}

#slideshow-bg .slide.active {
    opacity: 1;
}

#overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.45) 0%,
        rgba(0,0,0,.30) 60%,
        rgba(0,0,0,.70) 100%
    );
}

/* ── Hero ─────────────────────────────────────────────── */
#hero {
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-pre {
    font-size: clamp(.75rem, 2vw, .9rem);
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--accent);
    font-family: 'Arial Narrow', Arial, sans-serif;
}

h1 {
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 400;
    letter-spacing: .06em;
    line-height: 1;
    text-shadow: 0 2px 20px rgba(0,0,0,.6);
}

.hero-story {
    max-width: 580px;
    font-size: clamp(.9rem, 2.2vw, 1.1rem);
    line-height: 1.8;
    font-style: italic;
    color: rgba(245,240,235,.88);
    text-shadow: 0 1px 8px rgba(0,0,0,.7);
    border: none;
    quotes: none;
}

.hero-thanks {
    max-width: 520px;
    font-size: clamp(.8rem, 1.8vw, .95rem);
    line-height: 1.7;
    font-family: 'Arial Narrow', Arial, sans-serif;
    color: rgba(245,240,235,.65);
    text-shadow: 0 1px 6px rgba(0,0,0,.6);
    margin-top: .5rem;
}

/* ── Footer ───────────────────────────────────────────── */
#footer {
    position: relative;
    z-index: 2;
    padding: 1.5rem 2rem;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255,255,255,.08);
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-size: .8rem;
    color: rgba(245,240,235,.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ── Area test server ─────────────────────────────────── */
#server-test {
    width: 100%;
    max-width: 640px;
}

#server-test details {
    border: 1px solid rgba(200,169,110,.25);
    border-radius: 4px;
    overflow: hidden;
}

#server-test summary {
    cursor: pointer;
    padding: .5rem 1rem;
    background: rgba(200,169,110,.08);
    color: var(--accent);
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: .5rem;
}

#server-test summary::-webkit-details-marker { display: none; }

.test-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
}

.test-table th,
.test-table td {
    padding: .35rem .8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.05);
    color: rgba(245,240,235,.7);
}

.test-table th {
    width: 40%;
    color: var(--accent);
    font-weight: normal;
}

.test-table tr:last-child th,
.test-table tr:last-child td {
    border-bottom: none;
}

/* ── No foto: sfondo di fallback ─────────────────────── */
body.no-foto #slideshow-bg {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d0d 100%);
}
