/* =========================================================
   La Finestra sulle Stelle — B&B
   ========================================================= */

:root {
    --night: #05070f;
    --night-2: #090e1c;
    --night-3: #101828;
    --panel: rgba(12, 18, 34, 0.55);
    --border: rgba(216, 178, 106, 0.22);
    --border-soft: rgba(238, 242, 251, 0.12);

    --text: #eef2fb;
    --text-soft: rgba(238, 242, 251, 0.72);
    --text-dim: rgba(238, 242, 251, 0.46);

    --gold: #d8b26a;
    --gold-soft: #f0dcb0;
    --star: #f6e7c1;

    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Manrope", system-ui, sans-serif;

    --shadow: 0 40px 110px rgba(0, 0, 0, 0.55);
    --edge: 5vw;
}

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

html {
    scroll-behavior: auto;
}

body {
    background: var(--night);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.is-loading {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

::selection {
    background: rgba(216, 178, 106, 0.3);
    color: #fff;
}

/* ---------- tipografia condivisa ---------- */

.display {
    font-family: var(--serif);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 0.94;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
}

.eyebrow::before {
    content: "";
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
}

.lead {
    font-size: clamp(1.02rem, 1.5vw, 1.22rem);
    line-height: 1.85;
    color: var(--text-soft);
    font-weight: 300;
}

/* =========================================================
   Preloader
   ========================================================= */

.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--night);
}

.preloader__inner {
    text-align: center;
}

.preloader__mark {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--text);
}

.preloader__bar {
    margin: 26px auto 0;
    width: min(220px, 46vw);
    height: 1px;
    background: rgba(238, 242, 251, 0.14);
    overflow: hidden;
}

.preloader__bar i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--star));
}

.preloader__pct {
    margin-top: 14px;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    color: var(--text-dim);
}

/* =========================================================
   Topbar
   ========================================================= */

.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px var(--edge);
    transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

.topbar.is-stuck {
    padding-top: 14px;
    padding-bottom: 14px;
    background: rgba(5, 7, 15, 0.78);
    backdrop-filter: blur(16px);
    border-bottom-color: var(--border-soft);
}

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

.brand__star {
    width: 26px;
    height: 26px;
    flex: none;
    color: var(--gold);
}

.brand__name {
    font-family: var(--serif);
    font-size: 1.42rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.05;
}

.brand__name small {
    display: block;
    font-family: var(--sans);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 3px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.nav a {
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav a:hover {
    color: var(--text);
}

.nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Nel menu la voce non e una pillola ma solo la scritta in oro, allineata alle
   altre voci. Il bottone pieno resta quello grande in fondo, nei contatti. */
.nav .btn {
    padding: 4px 0;
    border: none;
    border-radius: 0;
    background: none;
    color: var(--gold);
    font-size: inherit;
}

.nav .btn:hover {
    background: none;
    transform: none;
    color: var(--gold-soft);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 30px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(216, 178, 106, 0.08);
    color: var(--gold-soft);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    /* dentro un contenitore flex stretto verrebbe compresso sotto la larghezza
       della scritta che, essendo centrata, sborderebbe dai due lati */
    flex: none;
    white-space: nowrap;
    transition: background 0.35s ease, transform 0.35s ease, color 0.35s ease;
}

.btn:hover {
    background: rgba(216, 178, 106, 0.18);
    color: #fff;
    transform: translateY(-2px);
}

.btn--solid {
    background: linear-gradient(180deg, var(--gold), #c39c52);
    border-color: transparent;
    color: #10131f;
}

.btn--solid:hover {
    background: linear-gradient(180deg, var(--gold-soft), var(--gold));
    color: #10131f;
}

.btn--lg {
    padding: 18px 40px;
    font-size: 0.95rem;
}

.nav__toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    position: relative;
}

.nav__toggle span {
    position: absolute;
    left: 50%;
    width: 16px;
    height: 1px;
    background: currentColor;
    transform: translateX(-50%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle span:nth-child(1) { top: 18px; }
.nav__toggle span:nth-child(2) { top: 25px; }

body.menu-open .nav__toggle span:nth-child(1) { transform: translate(-50%, 3.5px) rotate(45deg); }
body.menu-open .nav__toggle span:nth-child(2) { transform: translate(-50%, -3.5px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-content: end;
    padding: 18vh var(--edge) 8vh;
    overflow: hidden;
}

/* piu alto del viewport: il margine extra serve al parallax */
.hero__media {
    position: absolute;
    inset: -12% 0;
    height: 124%;
    z-index: 0;
}

.hero__media img {
    width: 100%;
    height: 100%;
    /* a tutto schermo, senza bande */
    object-fit: cover;
    object-position: center 42%;
    /* alza questo valore per una hero piu luminosa, abbassalo per piu contrasto sul testo */
    filter: brightness(0.6) saturate(0.82) contrast(1.04);
}

.hero__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* leggero in alto per non spegnere la foto, denso in basso sotto al testo */
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(24, 40, 82, 0.4), transparent 60%),
        linear-gradient(180deg,
            rgba(5, 7, 15, 0.46) 0%,
            rgba(5, 7, 15, 0.12) 36%,
            rgba(5, 7, 15, 0.76) 72%,
            rgba(5, 7, 15, 0.97) 100%);
    pointer-events: none;
}

#stars {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.55;
}

.hero__content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.hero__title {
    margin-top: 22px;
    font-family: var(--serif);
    font-weight: 300;
    letter-spacing: -0.035em;
    line-height: 0.9;
    font-size: clamp(3.4rem, 10.5vw, 11rem);
}

.hero__title em {
    font-style: italic;
    color: var(--gold-soft);
}

.hero__title .line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
}

.hero__title .line > span {
    display: block;
    transform: translateY(110%);
}

.hero__bottom {
    margin-top: clamp(34px, 6vh, 70px);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-top: 28px;
}

.hero__lead {
    max-width: 34rem;
}

.hero__facts {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.fact__num {
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--gold-soft);
    line-height: 1;
}

.fact__label {
    margin-top: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.scroll-hint {
    position: absolute;
    right: var(--edge);
    /* 8vh e la base del contenuto della hero, dove finiscono anche i numeri:
       si sale sopra la riga divisoria per non passarci attraverso */
    bottom: calc(8vh + 118px);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 0.66rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--text-dim);
    writing-mode: vertical-rl;
}

.scroll-hint::after {
    content: "";
    width: 1px;
    height: 56px;
    background: linear-gradient(180deg, var(--gold), transparent);
}

/* =========================================================
   Manifesto
   ========================================================= */

.manifesto {
    position: relative;
    padding: clamp(90px, 16vh, 180px) var(--edge);
    background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}

.manifesto__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
    max-width: 1360px;
    margin: 0 auto;
}

.manifesto h2 {
    margin-top: 26px;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.manifesto__copy {
    margin-top: 30px;
    display: grid;
    gap: 20px;
}

.manifesto__sign {
    margin-top: 34px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--gold-soft);
}

.manifesto__media {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
}

.manifesto__media img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    filter: brightness(0.82) saturate(0.9);
}

.manifesto__media figcaption {
    position: absolute;
    left: 20px;
    bottom: 18px;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* =========================================================
   Stage — scroll transition
   ========================================================= */

.stage {
    height: 760vh;
    position: relative;
    background: var(--night-2);
}

.layers {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100svh;
    overflow: hidden;
}

.layers__base {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(45, 70, 130, 0.28), transparent 40%),
        linear-gradient(180deg, #060a15 0%, #0a1122 100%);
}

.layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* stesso principio delle scene: fondale sfocato + foto intera sopra */
.layer .layer__fill {
    filter: url(#scene-blur);
}

.layer .layer__whole {
    filter: brightness(0.88) saturate(0.94) contrast(1.02);
}

/* ---------- Scene versione smartphone ----------
   Stesso effetto tapparella, motore diverso: niente maschere SVG e niente
   sfocatura gaussiana (non accelerate da GPU sui telefoni). Ogni stecca e un
   div che ritaglia la propria fetta di foto e si apre con clip-path. */

.mstage {
    display: none;
    position: absolute;
    inset: 0;
}

.mscene {
    position: absolute;
    inset: 0;
}

.mslat {
    position: absolute;
    left: 0;
    right: 0;
    overflow: hidden;
    /* chiusa: si apre dal centro della stecca verso i due bordi */
    clip-path: inset(50% 0% 50% 0%);
}

/* alta quanto tutte le stecche insieme e risalita: le fette ricompongono la foto */
.mslat img {
    position: absolute;
    left: 0;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.88) saturate(0.94) contrast(1.02);
}

.stage__veil {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(5, 7, 15, 0.88) 0%, rgba(5, 7, 15, 0.42) 42%, rgba(5, 7, 15, 0.06) 100%),
        linear-gradient(180deg, rgba(5, 7, 15, 0.55) 0%, transparent 26%, rgba(5, 7, 15, 0.72) 100%);
}

.texts {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
}

.txt {
    position: absolute;
    left: var(--edge);
    top: 50%;
    transform: translateY(-50%);
    width: min(46vw, 640px);
}

.txt__inner {
    clip-path: inset(100% 0 0 0);
}

.txt h2 {
    margin-top: 18px;
    font-family: var(--serif);
    font-weight: 300;
    letter-spacing: -0.035em;
    line-height: 0.94;
    font-size: clamp(2.8rem, 6.4vw, 6rem);
}

.txt .lead {
    margin-top: 22px;
    max-width: 30rem;
}

.txt__meta {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.txt__meta li {
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel);
    backdrop-filter: blur(8px);
    color: var(--gold-soft);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.stage__hud {
    position: absolute;
    left: var(--edge);
    right: var(--edge);
    bottom: 38px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 22px;
}

.progress {
    flex: 1;
    display: flex;
    gap: 10px;
}

.segment {
    flex: 1;
    height: 2px;
    background: rgba(238, 242, 251, 0.14);
    overflow: hidden;
}

.segment .fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--star));
}

.counter {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.counter b {
    font-weight: 600;
    color: var(--gold-soft);
}

.counter i {
    width: 26px;
    height: 1px;
    background: rgba(238, 242, 251, 0.3);
}

/* =========================================================
   Sezioni generiche
   ========================================================= */

.section {
    position: relative;
    padding: clamp(90px, 15vh, 170px) var(--edge);
}

.section__head {
    max-width: 1360px;
    margin: 0 auto clamp(46px, 7vh, 80px);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.section__head h2 {
    margin-top: 22px;
    font-size: clamp(2.3rem, 5vw, 4.2rem);
}

.section__head .lead {
    max-width: 30rem;
}

/* ---------- Camere ---------- */

.rooms {
    background: var(--night-2);
}

.rooms__grid {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.room {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.45s ease, transform 0.45s ease;
}

.room:hover {
    border-color: var(--border);
    transform: translateY(-6px);
}

/* ---------- Carosello ---------- */

.carousel {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--night-3);
    /* lo scorrimento verticale resta al browser, l'orizzontale e nostro */
    touch-action: pan-y;
}

.carousel__track {
    display: flex;
    height: 100%;
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

/* mentre il dito trascina la foto deve seguirlo, senza inseguimento morbido */
.carousel__track.is-dragging {
    transition: none;
}

.carousel__track img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.86) saturate(0.94);
    transition: filter 0.6s ease;
}

.room:hover .carousel__track img {
    filter: brightness(1) saturate(1);
}

.carousel__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(5, 7, 15, 0.6);
    backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.35s ease, background 0.3s ease, transform 0.3s ease;
}

.carousel__arrow--prev { left: 12px; }
.carousel__arrow--next { right: 12px; }

.carousel:hover .carousel__arrow,
.carousel__arrow:focus-visible {
    opacity: 1;
}

.carousel__arrow:hover {
    background: rgba(216, 178, 106, 0.85);
    color: #10131f;
}

.carousel__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.carousel__dot {
    width: 22px;
    height: 3px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.3s ease, width 0.3s ease;
}

.carousel__dot.is-active {
    width: 32px;
    background: var(--gold);
}

.carousel__dot:focus-visible,
.carousel__arrow:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.room__tag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(5, 7, 15, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-soft);
}

.room__body {
    padding: 28px 26px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.room__body h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.9rem;
    letter-spacing: -0.01em;
}

.room__body p {
    margin-top: 12px;
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--text-soft);
    font-weight: 300;
}

.room__specs {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    list-style: none;
    font-size: 0.82rem;
    color: var(--text-dim);
    letter-spacing: 0.03em;
}

/* senza hover le frecce non comparirebbero mai */
@media (hover: none) {
    .carousel__arrow { opacity: 1; }
}

/* i bagni sono due: griglia piu larga, non tre colonne */
.rooms__grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 940px;
}

.section__head--sub {
    margin-top: clamp(70px, 11vh, 130px);
}

/* ---------- Esperienze ---------- */

.experiences {
    background: linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%);
}

.exp-list {
    max-width: 1360px;
    margin: 0 auto;
    border-top: 1px solid var(--border-soft);
}

.exp {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 30px;
    align-items: baseline;
    padding: 34px 0;
    border-bottom: 1px solid var(--border-soft);
    transition: padding-left 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.exp:hover {
    padding-left: 18px;
}

.exp__num {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--gold);
    letter-spacing: 0.1em;
}

.exp__title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    letter-spacing: -0.02em;
    transition: color 0.4s ease;
}

.exp:hover .exp__title {
    color: var(--gold-soft);
}

.exp__text {
    font-size: 0.98rem;
    line-height: 1.8;
    color: var(--text-soft);
    font-weight: 300;
}

/* ---------- Galleria ---------- */

.gallery {
    background: var(--night);
}

.gallery__grid {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.shot {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    background: var(--night-3);
}

.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.78) saturate(0.88);
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}

.shot:hover img {
    transform: scale(1.05);
    filter: brightness(1) saturate(1);
}

.shot figcaption {
    position: absolute;
    left: 16px;
    bottom: 14px;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

.shot:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

.shot--w2 { grid-column: span 2; aspect-ratio: 4 / 5; }
.shot--w3 { grid-column: span 3; aspect-ratio: 16 / 10; }
.shot--w4 { grid-column: span 4; aspect-ratio: 16 / 9; }
.shot--tall { grid-column: span 2; aspect-ratio: 3 / 5; }

/* ---------- Fascia citazione ---------- */

.quote {
    position: relative;
    min-height: 78vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: clamp(90px, 14vh, 160px) var(--edge);
    overflow: hidden;
}

.quote__media {
    position: absolute;
    inset: -12% 0;
    height: 124%;
    z-index: 0;
}

.quote__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.34) saturate(0.6);
}

.quote__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, var(--night) 0%, rgba(5, 7, 15, 0.35) 45%, var(--night) 100%);
}

.quote__body {
    position: relative;
    z-index: 2;
    max-width: 20ch;
}

.quote blockquote {
    font-family: var(--serif);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2rem, 5.2vw, 4.4rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.quote cite {
    display: block;
    margin-top: 28px;
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.74rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ---------- Contatti / outro ---------- */

.outro {
    position: relative;
    padding: clamp(100px, 16vh, 190px) var(--edge);
    overflow: hidden;
}

.outro__media {
    position: absolute;
    inset: -10% 0;
    height: 120%;
    z-index: 0;
}

.outro__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3) saturate(0.55);
}

.outro__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, var(--night) 0%, rgba(5, 7, 15, 0.72) 40%, var(--night) 100%);
}

.outro__panel {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 66px);
    border: 1px solid var(--border);
    border-radius: 6px;
    background: linear-gradient(150deg, rgba(9, 14, 28, 0.9), rgba(9, 14, 28, 0.66));
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.outro__panel h2 {
    margin-top: 22px;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.outro__panel .lead {
    margin-top: 24px;
    max-width: 46rem;
}

.contact-grid {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    background: var(--border-soft);
    border: 1px solid var(--border-soft);
}

.contact-grid > div {
    padding: 24px 26px;
    background: rgba(9, 14, 28, 0.86);
}

.contact-grid .label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.68rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}

.contact-grid p,
.contact-grid a {
    color: var(--text-soft);
    line-height: 1.65;
    font-weight: 300;
    transition: color 0.3s ease;
}

.contact-grid a:hover {
    color: var(--gold-soft);
}

.outro__actions {
    margin-top: 38px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ---------- Footer ---------- */

/* ---------- Ripiego quando il mailto non apre nulla ---------- */

.mail-fallback {
    margin-top: 22px;
    padding: 16px 20px;
    max-width: 30rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(12, 18, 34, 0.7);
}

.mail-fallback[hidden] {
    display: none;
}

.mail-fallback p {
    font-size: 0.84rem;
    color: var(--text-dim);
}

.mail-fallback__row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.mail-fallback__row code {
    font-family: var(--sans);
    font-size: 0.92rem;
    color: var(--gold-soft);
    /* deve restare selezionabile a mano, se il pulsante non funzionasse */
    user-select: all;
}

.mail-fallback__copy {
    flex: none;
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--gold-soft);
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.mail-fallback__copy:hover {
    background: rgba(216, 178, 106, 0.16);
    color: #fff;
}

.footer {
    padding: 44px var(--edge);
    border-top: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.footer a:hover {
    color: var(--gold-soft);
}

.footer__links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

/* =========================================================
   Stati di reveal (gestiti da GSAP)
   ========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(34px);
}

.reveal-line {
    clip-path: inset(0 0 100% 0);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1080px) {
    .manifesto__grid {
        grid-template-columns: 1fr;
    }

    .manifesto__media {
        aspect-ratio: 16 / 11;
        order: -1;
    }

    .rooms__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exp {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .exp__text {
        grid-column: 2;
    }

    .txt {
        width: min(64vw, 620px);
    }
}

@media (max-width: 820px) {
    :root {
        --edge: 6vw;
    }

    .nav {
        position: fixed;
        inset: 0;
        z-index: -1;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 22px;
        padding: 0 8vw;
        background: rgba(5, 7, 15, 0.97);
        backdrop-filter: blur(20px);
        font-size: 1.6rem;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
    }

    .nav a {
        font-family: var(--serif);
        font-weight: 300;
    }

    /* niente piu font da bottone: e una voce come le altre, solo in oro */
    .nav .btn {
        margin-top: 10px;
    }

    body.menu-open .nav {
        z-index: 890;
        opacity: 1;
        pointer-events: auto;
    }

    /* Un backdrop-filter rende l'elemento blocco contenitore dei discendenti
       fixed: con la barra "stuck" il menu, che le e figlio, si ritaglierebbe
       dentro i suoi 48px invece di coprire lo schermo. Col menu aperto la
       sfocatura non si vedrebbe comunque, sta dietro al pannello. */
    body.menu-open .topbar.is-stuck {
        backdrop-filter: none;
        background: transparent;
        border-bottom-color: transparent;
    }

    .nav__toggle {
        display: block;
        z-index: 901;
    }

    .hero {
        align-content: end;
        padding-bottom: 14vh;
    }

    .hero__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 26px;
    }

    .hero__facts {
        gap: 26px;
    }

    .fact__num {
        font-size: 1.9rem;
    }

    .scroll-hint {
        display: none;
    }

    .stage {
        /* meno corsa da percorrere col pollice su uno schermo piccolo */
        height: 560vh;
    }

    /* i layer SVG portano maschere e sfocatura gaussiana: sul telefono
       costano troppo, al loro posto entra .mstage */
    .layer {
        display: none;
    }

    .mstage {
        display: block;
    }

    .txt {
        left: var(--edge);
        right: var(--edge);
        width: auto;
        top: auto;
        bottom: 15vh;
        transform: none;
    }

    .txt .lead {
        max-width: none;
        font-size: 1rem;
    }

    .txt__meta li {
        font-size: 0.76rem;
        padding: 7px 13px;
        /* sono 15 pastiglie sospese sopra le scene in movimento: un backdrop-filter
           qui obbliga il telefono a rileggere lo sfondo a ogni frame */
        backdrop-filter: none;
        background: rgba(12, 16, 28, 0.72);
    }

    .stage__hud {
        bottom: 26px;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 14px;
    }

    .rooms__grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .shot--w2,
    .shot--w3,
    .shot--w4,
    .shot--tall {
        grid-column: span 1;
        aspect-ratio: 3 / 4;
    }

    .shot--w4 {
        grid-column: span 2;
        aspect-ratio: 16 / 10;
    }

    .exp {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 14px 16px;
        padding: 26px 0;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
