:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-light: #f6f6f6;
    --text: #111111;
    --muted: #555555;
    --accent: #d40000;
    --accent-dark: #9f0000;
    --black: #000000;
    --border: rgba(0,0,0,.13);
    --shadow: 0 22px 55px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'League Spartan', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 115px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 clamp(18px, 4vw, 56px);
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

.main-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.main-nav a {
    padding: 10px 14px;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
    font-size: .9rem;
    color: var(--black);
}

.main-nav a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.logo {
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 135px;
    width: auto;
    object-fit: contain;
}

.header-spacer { justify-self: end; }

.menu-toggle {
    display: none;
    background: none;
    color: var(--black);
    border: 1px solid var(--border);
    padding: 8px 12px;
    font-size: 1.3rem;
}

.hero {
    width: min(1280px, calc(100% - 32px));
    margin: 22px auto 70px;
    display: grid;
    gap: 16px;
}

.hero-banner {
    position: relative;
    height: clamp(230px, 24vw, 330px);
    min-height: unset;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--black);
}

.hero-banner img {
    width: 100%;
    height: 100%;
    min-height: unset;
    object-fit: cover;
    filter: contrast(1.04);
    transition: transform .5s ease, filter .5s ease;
}

.hero-banner:hover img {
    transform: scale(1.04);
    filter: contrast(1.12);
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.64), rgba(0,0,0,.08));
}

.hero-banner span {
    position: absolute;
    left: clamp(20px, 4vw, 52px);
    bottom: clamp(18px, 4vw, 44px);
    z-index: 2;
    color: white;
    font-size: clamp(2.2rem, 7vw, 6.8rem);
    line-height: .84;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -.05em;
    text-shadow: 0 8px 30px rgba(0,0,0,.45);
}

.hero-banner.right-text span {
    left: auto;
    right: clamp(20px, 4vw, 52px);
    text-align: right;
}

.hero-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.1s ease, transform .5s ease, filter .5s ease;
}

.hero-slider img.active {
    opacity: 1;
}

.hero-banner:hover img.active {
    transform: scale(1.04);
    filter: contrast(1.12);
}

@media (hover: hover) and (pointer: fine) {
    .merch-arrow {
        display: none;
    }
}

@media (hover: none) and (pointer: coarse) {
    .merch-arrow {
        display: block;
    }
}

.section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 96px;
}

.section-heading {
    margin-bottom: 28px;
    max-width: 760px;
}

.preorders-table {
    width: 100%;
    margin-top: 30px;
    border-collapse: collapse;
}

.preorders-table th,
.preorders-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.preorders-table th {
    background: var(--black);
    color: #ffffff;
    text-transform: uppercase;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-weight: 800;
}

.about-box h1 {
    margin: 0;
    font-size: clamp(2.6rem, 8vw, 7rem);
    line-height: .86;
    text-transform: uppercase;
    letter-spacing: -.06em;
    color: var(--black);
    font-family: EB Garamond;
}

.section-heading h1,
.event-detail-content h1 {
    margin: 0;
    font-size: clamp(2.6rem, 8vw, 7rem);
    line-height: .86;
    text-transform: uppercase;
    letter-spacing: -.06em;
    color: var(--black);
}

.section-heading p,
.about-box p,
.event-detail-content p {
    color: var(--muted);
    font-size: 1.16rem;
}

.events-grid,
.merch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.preorder-form {
    margin-top: auto;
    display: grid;
    
    gap: 10px;
}

.preorder-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    /* freccia custom */
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='10' viewBox='0 0 20 20' width='10' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.preorder-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
}

.preorder-form button {
    padding: 13px 16px;
    border: none;
    background: black;
    color: #ffffff;
    font-family: inherit;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.preorder-form button:hover {
    background: grey;
}

.preorder-message {
    width: min(1280px, calc(100% - 32px));
    margin: 30px auto;
    padding: 18px 22px;
    font-weight: 800;
    text-transform: uppercase;
}

.preorder-message.success {
    background: #e8ffe8;
    color: #087a08;
    border-left: 5px solid #087a08;
}

.preorder-message.error {
    background: #ffe8e8;
    color: #b00000;
    border-left: 5px solid #b00000;
}

.merch-card {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.merch-card > div:not(.merch-gallery) {
    flex: 1;
}

.event-card,
.about-box {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.merch-gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--panel-light);
}

.merch-gallery img {
    position: absolute;
    filter: blur(10px);
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .35s ease, transform .45s ease;
}

.merch-card.no-blur .merch-gallery img {
    filter: none;
}

.merch-gallery img.active {
    opacity: 1;
}

.merch-gallery:hover img.active {
    transform: scale(1.04);
}

.merch-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    transform: translateY(-50%);
    width: 38px;
    height: 46px;
    border: none;
    background: rgba(255,255,255,.85);
    color: var(--black);
    font-size: 2rem;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
}

.merch-arrow:hover {
    background: var(--accent);
    color: #ffffff;
}

.merch-prev {
    left: 0;
}

.merch-next {
    right: 0;
}

.event-card {
    transition: transform .3s ease, border-color .3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.event-card a {
    display: block;
    position: relative;
    overflow: hidden;
    min-height: 420px;
}

.event-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    transition: transform .45s ease;
}

.event-card:hover img {
    transform: scale(1.05);
}

.event-info {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px;
    background: linear-gradient(transparent, rgba(0,0,0,.92));
    color: #ffffff;
}

.event-info h2 {
    margin: 8px 0 4px;
    font-size: 2rem;
    text-transform: uppercase;
}

.event-info p {
    margin: 0;
    color: rgba(255,255,255,.78);
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    background: var(--accent);
    color: #ffffff;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.event-card.past {
    opacity: .72;
}

.merch-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--panel-light);
}

.merch-card div {
    padding: 20px;
}

.merch-card h2 {
    margin: 0 0 8px;
    text-transform: uppercase;
    font-size: 1.7rem;
    color: var(--black);
}

.merch-card p {
    color: var(--muted);
}

.merch-card span {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.page-content,
.event-page {
    width: min(1180px, calc(100% - 32px));
    margin: 60px auto 90px;
}

.about-box {
    padding: clamp(28px, 6vw, 72px);
}

.contact-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.contact-list a,
.button {
    display: inline-flex;
    padding: 13px 18px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 800;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.contact-list a:hover,
.button:hover {
    background: var(--black);
    border-color: var(--black);
    color: #ffffff;
}

.event-detail {
    display: grid;
    grid-template-columns: minmax(280px, 460px) 1fr;
    gap: clamp(24px, 5vw, 64px);
    align-items: start;
}

.event-poster {
    width: 100%;
    height: 620px;
    object-fit: contain;
    object-position: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: #ffffff;
}

.event-detail-content {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: clamp(24px, 5vw, 54px);
    box-shadow: var(--shadow);
}

.event-date {
    color: var(--accent) !important;
    font-weight: 800;
}

.lineup-box,
.description-box,
.map-box {
    margin: 24px 0;
    padding: 20px;
    background: var(--panel-light);
    border-left: 4px solid var(--accent);
}

.lineup-box h2,
.description-box h2,
.map-box h2 {
    margin-top: 0;
    text-transform: uppercase;
    color: var(--black);
}

.map-frame {
    position: relative;
    width: 100%;
    height: clamp(280px, 45vh, 460px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.map-frame iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: auto;
}

.empty-state {
    color: var(--muted);
    font-size: 1.2rem;
}

.site-footer {
    padding: 32px;
    text-align: center;
    color: #ffffff;
    background: var(--black);
    border-top: 1px solid var(--black);
}

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

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

@media (max-width: 900px) {
    .site-header {
        height: 92px;
        grid-template-columns: 44px 1fr 44px;
        padding: 0 16px;
    }

    .menu-toggle {
        display: block;
        justify-self: start;
    }

    .logo {
        grid-column: 2;
        justify-self: center;
    }

    .logo img {
        height: 95px;
    }

    .header-spacer {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 92px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        background: rgba(255,255,255,.98);
        border-bottom: 1px solid var(--border);
    }

    .main-nav.active {
        display: flex;
    }

    .events-grid,
    .merch-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-detail {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 901px) {
    .hero-banner span {
        font-size: clamp(2rem, 5.2vw, 5rem);
    }
}

@media (max-width: 620px) {
    .site-header {
        height: 78px;
        grid-template-columns: 42px 1fr 42px;
        padding: 0 12px;
    }

    .main-nav {
        top: 78px;
    }

    .logo {
        grid-column: 2;
        justify-self: center;
        align-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo a {
        -webkit-tap-highlight-color: transparent;
    }

    .logo img {
        height: 100px;
        width: auto;
        object-fit: contain;
        transform: translateY(-6px);
    }

    .hero {
        width: 100%;
        height: calc(100vh - 78px); /* tutta la schermata meno navbar */
        margin: 0;
        display: grid;
        grid-template-rows: 1fr 1fr; /* 50% + 50% */
        gap: 0;
    }

    .hero-banner {
        height: 100%; /* ogni banner occupa metà */
        border: none;
        box-shadow: none;
    }

    .section {
        margin-top: 30px;
    }

    .event-poster {
        height: auto;
        max-height: none;
        object-fit: contain;
    }

    .events-grid, .merch-grid {
        grid-template-columns: 1fr;
    }

}