/* ============================================================
   Brain:Storm 2026 — Landing Page
   Font, variabili, reset e animazioni
   ============================================================ */

@font-face {
    font-family: "Alaska";
    src: url("./alaska_light.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Alaska";
    src: url("./alaska_medium.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Alaska Expanded";
    src: url("./alaska_expanded.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #242858;
    --navy-overlay: rgba(36, 40, 88, 0.76);
    --yellow: #fbd104;
    --green: #00a682;
    --white: #ffffff;
    --black: #000000;
}

/* ============================================================
   Keyframes animazioni
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   Classi di animazione (stato nascosto)
   ============================================================ */

.anim-fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim-fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.anim-scale-in {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Stato visibile */
.anim-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Ritardi progressivi */
.anim-delay-1 {
    transition-delay: 0.1s;
}

.anim-delay-2 {
    transition-delay: 0.2s;
}

.anim-delay-3 {
    transition-delay: 0.35s;
}

/* Hero: animazione all'ingresso */
.hero__logo,
.hero__title,
.event-info {
    animation: fadeInUp 0.8s ease both;
}

.hero__logo {
    animation-delay: 0.15s;
}

.hero__title {
    animation-delay: 0.3s;
}

.event-info {
    animation-delay: 0.45s;
}


/* ============================================================
   Reset globale
   ============================================================ */

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

html {
    background: #151f27;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100dvh;
    overflow-x: hidden;
}

body {
    touch-action: pan-y;
    font-family: "Alaska", sans-serif;
    font-weight: 400;
    color: var(--black);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================================
   Contenitore principale
   ============================================================ */

.page-shell {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    overflow: clip;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
    position: relative;
    width: 100%;
    height: clamp(420px, 72vw, 530px);
    background: url("./ceramica.jpg") repeat;
    background-size: clamp(230px, 55vw, 420px);
    overflow: hidden;
}

/* Hero: overlay blu nella metà superiore */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 62%;
    background: var(--navy-overlay);
    z-index: 1;
    pointer-events: none;
}

/* Hero: overlay scuro globale */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    z-index: 1;
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    margin: 0 auto;
}

.hero__logo {
    display: block;
    width: clamp(115px, 22vw, 165px);
    height: auto;
    margin: 0;
    padding-top: clamp(90px, 15vw, 110px);
    padding-left: clamp(16px, 4.8vw, 35px);
}

.hero__title {
    margin: 0;
    padding: clamp(24px, 4.2vw, 32px) 0 0 clamp(16px, 4.8vw, 35px);
    font-family: "Alaska Expanded", "Alaska", sans-serif;
    font-weight: 400;
    font-size: clamp(2.4rem, 8.2vw, 4rem);
    line-height: 1;
    color: var(--white);
    letter-spacing: -0.01em;
}

/* ============================================================
   Pannello informazioni (giallo)
   ============================================================ */

.event-info {
    position: absolute;
    right: 0;
    top: 56%;
    z-index: 3;
    width: clamp(52%, 10vw, 58%);
    background: var(--yellow);
    padding: clamp(16px, 3.2vw, 28px) clamp(14px, 3vw, 28px);
}

.event-info__label {
    margin: 0 0 clamp(12px, 2vw, 18px) 0;
    font-family: "Alaska", sans-serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 3.8vw, 2rem);
    color: var(--navy);
    line-height: 1.1;
}

.event-info__row {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.1vw, 10px);
    margin: 0 0 clamp(6px, 1.1vw, 9px) 0;
    font-weight: 600;
    font-size: clamp(0.85rem, 2.2vw, 1.05rem);
    color: var(--navy);
    line-height: 1.3;
}

.event-info__row:last-child {
    margin-bottom: 0;
}

.event-info__icon {
    flex-shrink: 0;
    width: clamp(14px, 2.1vw, 16px);
    height: clamp(14px, 2.1vw, 16px);
}

/* ============================================================
   Sezione introduttiva
   ============================================================ */

.intro {
    text-align: center;
    padding: clamp(38px, 6vw, 50px) clamp(16px, 4vw, 30px) clamp(8px, 1.5vw, 14px);
}

.intro__title {
    margin: 0 auto clamp(10px, 1.8vw, 14px);
    font-family: "Alaska", sans-serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 4.2vw, 1.85rem);
    line-height: 1.2;
    color: var(--navy);
    max-width: 570px;
}

.intro__text {
    max-width: 570px;
    margin: 0 auto;
    font-size: clamp(0.95rem, 2.6vw, 1.1rem);
    line-height: 1.35;
    color: var(--black);
}

.intro__text p {
    margin: 0 0 clamp(10px, 1.5vw, 14px) 0;
}

.intro__text p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   Immagine Sicilia
   ============================================================ */

.sicily-visual {
    text-align: center;
    padding: clamp(16px, 3vw, 28px) clamp(16px, 4vw, 30px) clamp(14px, 2.5vw, 22px);
}

.sicily-visual__img {
    display: inline-block;
    width: clamp(220px, 45vw, 335px);
    height: auto;
    border: none;
}

/* ============================================================
   Testo descrittivo e payoff
   ============================================================ */

.story {
    text-align: center;
    padding: 0 clamp(16px, 4vw, 30px);
}

.story__text {
    max-width: 570px;
    margin: 0 auto clamp(12px, 2vw, 18px);
    font-size: clamp(0.9rem, 2.4vw, 1.05rem);
    line-height: 1.4;
    color: var(--black);
}

.story__highlight {
    font-weight: 600;
    color: var(--navy);
}

.story__payoff {
    margin: clamp(22px, 3.8vw, 32px) auto 0;
    max-width: 570px;
}

.story__payoff p {
    margin: 0 0 clamp(4px, 0.8vw, 6px) 0;
    font-family: "Alaska Expanded", "Alaska", sans-serif;
    font-size: clamp(1.05rem, 2.8vw, 1.25rem);
    line-height: 1.5;
    color: var(--navy);
    font-weight: 400;
}

.story__closing {
    margin: clamp(14px, 2.5vw, 22px) auto clamp(28px, 5vw, 42px);
    font-family: "Alaska Expanded", "Alaska", sans-serif;
    font-size: clamp(1.05rem, 2.8vw, 1.25rem);
    line-height: 1.3;
    color: var(--green);
    font-weight: 400;
}

/* ============================================================
   Agenda
   ============================================================ */

.agenda-section {
    padding: clamp(24px, 4vw, 36px) clamp(8px, 2vw, 16px) clamp(40px, 8vw, 65px);
    text-align: center;
}

/* Etichetta data sulla card */
.agenda-card__tab {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(4px, 1vw, 8px) clamp(18px, 3.5vw, 30px);
    background: var(--navy);
    color: var(--yellow);
    font-family: "Alaska Expanded", "Alaska", sans-serif;
    font-weight: 400;
    font-size: clamp(0.75rem, 2vw, 1.1rem);
    line-height: 1;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.agenda-card__tab--today {
    background: var(--yellow);
    color: var(--navy);
}


.agenda-carousel {
    position: relative;
    margin: 0 auto;
    padding: 0 clamp(36px, 6vw, 52px);
}

.agenda-carousel__clip {
    overflow: hidden;
    padding: 20px 1px 1px 1px;
    margin: -20px -1px -1px -1px;
    touch-action: pan-y;
}

.agenda-carousel__track {
    display: flex;
    gap: clamp(16px, 3vw, 28px);
    transition: transform 0.35s ease;
    will-change: transform;
}

/* Card agenda */
.agenda-card {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    border: 2px solid var(--navy);
    padding: clamp(28px, 5vw, 42px) clamp(18px, 3.5vw, 30px) clamp(24px, 4.5vw, 38px);
    background: url("./ceramica.jpg") center / cover no-repeat;
}

/* Overlay bianco sulle card */
.agenda-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.93);
    z-index: 0;
    pointer-events: none;
}

.agenda-card__day {
    position: relative;
    z-index: 1;
    margin: 0 0 clamp(18px, 3.5vw, 28px) 0;
    font-family: "Alaska", sans-serif;
    font-weight: 600;
    font-size: clamp(1.05rem, 3vw, 1.4rem);
    line-height: 1.2;
    color: var(--navy);
    text-align: center;
    text-transform: uppercase;
}

.agenda-card__items {
    position: relative;
    z-index: 1;
}

/* Evento singolo */
.agenda-item {
    margin-bottom: clamp(12px, 2.5vw, 20px);
    text-align: center;
}

.agenda-item:last-child {
    margin-bottom: 0;
}

.agenda-item__time {
    margin: 0 0 clamp(1px, 0.3vw, 3px) 0;
    font-family: "Alaska", sans-serif;
    font-weight: 600;
    font-size: clamp(1.05rem, 2.9vw, 1.3rem);
    line-height: 1.3;
    color: var(--green);
}

.agenda-item__time--next {
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 14px);
    background: var(--yellow);
    color: var(--navy);
    padding: 2px clamp(8px, 1.5vw, 14px);
}

.agenda-item__next-badge {
    font-family: "Alaska Expanded", "Alaska", sans-serif;
    font-weight: 400;
    font-size: 0.58em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.agenda-item__time--now {
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 14px);
    background: var(--navy);
    color: var(--yellow);
    padding: 2px clamp(8px, 1.5vw, 14px);
}

.agenda-item__now-badge {
    font-family: "Alaska Expanded", "Alaska", sans-serif;
    font-weight: 400;
    font-size: 0.58em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.agenda-item__desc {
    margin: 0;
    font-family: "Alaska", sans-serif;
    font-weight: 600;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    line-height: 1.35;
    color: var(--navy);
}

.agenda-item__sub {
    margin: 0;
    font-family: "Alaska", sans-serif;
    font-weight: 400;
    font-size: clamp(0.8rem, 2.1vw, 0.95rem);
    line-height: 1.35;
    color: var(--navy);
}

/* Frecce laterali */
.agenda-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease;
}

.agenda-carousel__arrow--prev {
    left: clamp(8px, 1.5vw, 14px);
}

.agenda-carousel__arrow--next {
    right: clamp(8px, 1.5vw, 14px);
}

.agenda-carousel__arrow:hover {
    opacity: 0.6;
}

.agenda-carousel__arrow:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
    border-radius: 2px;
}

.agenda-carousel__arrow svg {
    display: block;
    width: clamp(14px, 2.4vw, 18px);
    height: auto;
}

/* Navigazione a pallini */
.agenda-carousel__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: clamp(16px, 3vw, 24px);
}


.agenda-carousel__dots {
    display: flex;
    gap: clamp(6px, 1.2vw, 10px);
}

.agenda-carousel__dot {
    width: clamp(8px, 1.5vw, 11px);
    height: clamp(8px, 1.5vw, 11px);
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.25s ease;
}

.agenda-carousel__dot--active {
    background: var(--navy);
}

/* Tablet: due card affiancate */
@media (min-width: 744px) {
    .agenda-card {
        flex: 0 0 calc(50% - clamp(8px, 1.5vw, 14px));
    }
}

/* Desktop: tre card affiancate, frecce e dots nascosti */
@media (min-width: 1100px) {
    .agenda-card {
        flex: 0 0 calc(33.333% - clamp(11px, 2vw, 19px));
    }

    .agenda-carousel {
        overflow: visible;
    }

    .agenda-carousel__track {
        justify-content: center;
    }

    .agenda-carousel__arrow {
        display: none;
    }

    .agenda-carousel__nav {
        display: none;
    }
}

/* ============================================================
   Footer hashtag
   ============================================================ */

.footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: clamp(40px, 6.5vw, 50px) 0;
    background: url("./ceramica.jpg") repeat center;
    background-size: clamp(230px, 55vw, 420px);
    overflow: hidden;
}

.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--navy-overlay);
    z-index: 1;
}

.footer__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.footer__tagline {
    margin: 0;
    font-family: "Alaska Expanded", "Alaska", sans-serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 5.1vw, 2.4rem);
    line-height: 1.2;
    color: var(--yellow);
}

/* ============================================================
   Footer legale
   ============================================================ */

.site-footer {
    width: 100%;
    background: #151f27;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: clamp(20px, 3.5vw, 30px) clamp(16px, 4vw, 30px) clamp(14px, 2.5vw, 22px);
}

.site-footer__logo {
    display: block;
    width: clamp(115px, 22vw, 165px);
    height: auto;
    margin-bottom: clamp(18px, 3vw, 28px);
}

.site-footer__link {
    font-family: "Alaska", sans-serif;
    font-weight: 400;
    font-size: clamp(0.55rem, 1.4vw, 0.7rem);
    color: var(--white);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
    opacity: 1;
}

.site-footer__link:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ============================================================
   Responsive: schermi molto piccoli (< 420px)
   ============================================================ */

@media (max-width: 420px) {
    .event-info {
        width: 62%;
    }
}

/* ============================================================
   Responsive: schermi sotto 360px
   ============================================================ */

@media (max-width: 360px) {
    .hero__title {
        font-size: 2rem;
    }

    .event-info {
        width: 68%;
        padding: 12px 10px;
    }
}

/* ============================================================
   Banner installazione PWA
   ============================================================ */

.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #00a68b;
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.35s ease, visibility 0s 0.35s;
    will-change: transform;
    padding: clamp(16px, 3vw, 24px) clamp(16px, 4vw, 28px);
    padding-bottom: calc(clamp(16px, 3vw, 24px) + env(safe-area-inset-bottom, 0px));
    visibility: hidden;
    pointer-events: none;
}

.install-banner--visible {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.35s ease, visibility 0s 0s;
}

.install-banner__inner {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.5vw, 18px);
    max-width: 500px;
    margin: 0 auto;
}

.install-banner__icon {
    flex-shrink: 0;
    width: clamp(44px, 8vw, 56px);
    height: clamp(44px, 8vw, 56px);
    border-radius: 12px;
    object-fit: cover;
}

.install-banner__body {
    flex: 1;
    min-width: 0;
}

.install-banner__title {
    margin: 0 0 clamp(2px, 0.4vw, 4px) 0;
    font-family: "Alaska", sans-serif;
    font-weight: 600;
    font-size: clamp(0.85rem, 2.1vw, 0.95rem);
    line-height: 1.3;
    color: var(--white);
}

.install-banner__text {
    margin: 0;
    font-family: "Alaska", sans-serif;
    font-weight: 400;
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    line-height: 1.4;
    color: var(--white);
}

.install-banner__text strong {
    font-weight: 600;
}

.install-banner__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 1.5vw, 12px) clamp(16px, 3.5vw, 26px);
    background: var(--white);
    color: #00a68b;
    border: none;
    border-radius: 4px;
    font-family: "Alaska Expanded", "Alaska", sans-serif;
    font-weight: 400;
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    letter-spacing: 0.04em;
    line-height: 1.2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.install-banner__btn:hover {
    opacity: 0.85;
}

.install-banner__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease;
    align-self: center;
}

.install-banner__close:hover {
    opacity: 0.7;
}

/* iOS: nasconde il pulsante INSTALLA */
.install-banner--ios .install-banner__btn {
    display: none;
}