/* Font ospitati in locale: nessuna richiesta a Google */
@font-face { font-family: 'Tenor Sans'; src: url('/assets/fonts/tenor-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/assets/fonts/manrope-latin.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
/* =========================================================
   GALENE - Direzione B "Mare di notte"
   Blu d'abisso, perla, argento lunare. Tutto sans, come il
   logotipo. Segno distintivo: il cerchio del logo si apre
   come un oblò e rivela il video a tutto schermo.
   ========================================================= */
:root {
  --abisso: #0C171B;      /* fondo principale */
  --fondale: #132429;     /* fondo alternato */
  --perla: #E6E3DC;       /* testo principale */
  --argento: #A7B5B3;     /* testo secondario (AA su abisso) */
  --riflesso: #CFD8D6;    /* hover e dettagli */
  --filetto: rgba(230, 227, 220, .18);

  --display: 'Tenor Sans', 'Gill Sans', 'Optima', sans-serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --col: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4.75rem;

  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; background: var(--abisso); }
body { background: var(--abisso); color: var(--perla); font-family: var(--sans); font-weight: 300; font-size: 1rem; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--perla); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--perla); color: var(--abisso); padding: .6rem 1rem; text-decoration: none; }
.skip:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

.wrap { width: min(100% - 2 * var(--gutter), var(--col)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.1; letter-spacing: .01em; }

/* ---------- Header: nav a sinistra, logo al centro, contatto a destra ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); }
.header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(12, 23, 27, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transition: opacity .4s ease; border-bottom: 1px solid var(--filetto); }
.header.is-solid::before { opacity: 1; }
.header__bar { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.brand { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-decoration: none; }
.brand svg { width: 1.9rem; height: 1.9rem; }
.brand span { font-family: var(--display); font-size: .72rem; letter-spacing: .5em; margin-right: -.5em; }
.header .brand { grid-column: 2; }
.nav { grid-column: 1; grid-row: 1; }
.nav ul { list-style: none; display: flex; gap: 1.75rem; }
.nav a, .header__side a { text-decoration: none; font-size: .9rem; font-weight: 400; color: var(--riflesso); transition: color .2s ease; }
.nav a:hover, .header__side a:hover { color: #fff; }
.header__side { grid-column: 3; display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; }
.header__side .lang { font-size: .8rem; letter-spacing: .12em; }
.menu-btn { display: none; background: none; border: 0; color: var(--perla); width: 2.75rem; height: 2.75rem; cursor: pointer; }
.menu-btn span { display: block; width: 1.4rem; height: 1px; background: currentColor; margin: .38rem auto; transition: transform .3s ease; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(.21rem) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-.21rem) rotate(-45deg); }

/* ---------- Media ---------- */
.media { position: absolute; inset: 0; overflow: hidden; }
.media__fallback { position: absolute; inset: 0; }
.media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.media.has-video video { opacity: 1; }

.media-toggle {
  position: absolute; z-index: 5; right: var(--gutter); bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: 0 1rem;
  background: rgba(12, 23, 27, .45); color: var(--perla); border: 1px solid rgba(230,227,220,.45); border-radius: 999px;
  font: 400 .85rem/1 var(--sans); cursor: pointer; transition: background-color .2s ease;
}
.media-toggle:hover { background: rgba(12, 23, 27, .75); }
.media-toggle svg { width: .7rem; height: .8rem; }
.media-toggle .i-play { display: none; }
.media.is-paused .media-toggle .i-play { display: block; }
.media.is-paused .media-toggle .i-pause { display: none; }

/* ---------- Hero: l'oblò ---------- */
.hero { position: relative; height: 100svh; min-height: 34rem; overflow: hidden; isolation: isolate; display: grid; place-items: end center; }
.hero .media { z-index: -2; clip-path: circle(min(22vmin, 11rem) at 50% 46%); animation: apri 2.4s cubic-bezier(.76,0,.24,1) .5s forwards; }
@keyframes apri { to { clip-path: circle(150% at 50% 46%); } }
.hero .media__fallback { background: url('/assets/img/b-apertura.webp') 50% 54% / cover no-repeat, radial-gradient(ellipse 30% 22% at 50% 30%, rgba(230,227,220,.35), transparent 70%), linear-gradient(180deg, #0E1E26 0%, #1F3845 42%, #2C4A55 51%, #0F2128 53%, #081216 100%); }
.hero .media::before { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(12,23,27,.45) 0%, rgba(12,23,27,0) 28%, rgba(12,23,27,0) 50%, rgba(12,23,27,.78) 100%); }
.hero__ring { position: absolute; left: 50%; top: 46%; width: calc(min(22vmin, 11rem) * 2 + 2.4rem); height: auto; transform: translate(-50%, -50%); color: var(--perla); z-index: -1; animation: svanisci 1.1s ease .9s forwards; }
@keyframes svanisci { to { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } }
.hero__content { text-align: center; padding-bottom: clamp(5.5rem, 13vh, 8rem); opacity: 0; animation: emergi 1.2s ease 2.4s forwards; }
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 5rem); line-height: 1.04; letter-spacing: .015em; max-width: 16ch; margin-inline: auto; }
.hero p { margin: 1.5rem auto 0; max-width: 32rem; color: var(--riflesso); font-size: clamp(1rem, 1.3vw, 1.1rem); }
@keyframes emergi { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Bottoni ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .85rem 1.8rem; border-radius: 999px; font: 500 .95rem/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid var(--perla); transition: background-color .25s ease, color .25s ease; }
.btn--light { background: var(--perla); color: var(--abisso); }
.btn--light:hover { background: transparent; color: var(--perla); }
.btn--ghost { background: transparent; color: var(--perla); }
.btn--ghost:hover { background: var(--perla); color: var(--abisso); }
.hero .btn { margin-top: 2.25rem; }

/* ---------- Capitolo a tutto schermo ---------- */
.chapter { position: relative; min-height: 100svh; display: flex; align-items: center; isolation: isolate; padding-block: 7rem; }
.chapter .media { z-index: -1; }
.chapter .media__fallback { background: url('/assets/img/b-chi-siamo.webp') center / cover no-repeat, radial-gradient(ellipse 40% 30% at 70% 25%, rgba(207,216,214,.22), transparent 70%), linear-gradient(180deg, #152A33 0%, #294550 45%, #3B5A63 50%, #12252C 58%, #0A1418 100%); }
.chapter .media::before { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(12,23,27,.85) 0%, rgba(12,23,27,.55) 55%, rgba(12,23,27,.2) 100%); }
.chapter__text { max-width: 34rem; }
.chapter__text p { margin-top: 1.5rem; color: var(--riflesso); }
.chapter__text p + p { margin-top: 1rem; }

/* ---------- Sezioni piene ---------- */
.section { padding-block: clamp(5rem, 11vw, 8.5rem); }
.section--deep { background: var(--fondale); }

/* Servizi: titolo fisso a sinistra, elenco a destra */
.services { display: grid; gap: 3rem; }
.services__head p { color: var(--argento); margin-top: 1.25rem; max-width: 24rem; }
.services dl { display: grid; gap: 0; }
.services dt { font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.2; padding-top: 2rem; border-top: 1px solid var(--filetto); }
.services dd { color: var(--argento); margin-top: .6rem; padding-bottom: 2rem; max-width: 36rem; }

/* Destinazioni: striscia di fotogrammi 9:16 */
.places__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.places__head p { color: var(--argento); max-width: 28rem; margin-top: 1rem; }
.strip-nav { display: flex; gap: .6rem; }
.strip-nav button { width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 1px solid rgba(230,227,220,.45); background: transparent; color: var(--perla); cursor: pointer; display: grid; place-items: center; transition: background-color .2s ease, color .2s ease; }
.strip-nav button:hover { background: var(--perla); color: var(--abisso); }
.strip-nav svg { width: 1rem; height: 1rem; }
.strip {
  list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: min(68vw, 17rem); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-top: 3rem; padding-inline: max(var(--gutter), calc((100vw - var(--col)) / 2)); scroll-padding-inline: max(var(--gutter), calc((100vw - var(--col)) / 2));
}
.strip::-webkit-scrollbar { display: none; }
.frame { position: relative; aspect-ratio: 9 / 16; scroll-snap-align: start; overflow: hidden; border-radius: 2px; }
.frame__img { position: absolute; inset: 0; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame:hover .frame__img { transform: scale(1.04); }
.frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(12,23,27,.85) 100%); }
.frame figcaption { position: absolute; left: 1.1rem; right: 1.1rem; bottom: 1.1rem; z-index: 1; }
.frame strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; line-height: 1.2; }
.frame span { font-size: .85rem; color: var(--riflesso); }
/* Fondi provvisori al posto delle foto */
.f1 { background: linear-gradient(180deg, #3D5560, #7F8F8C 40%, #2E4A4F 48%, #13262B); }
.f2 { background: linear-gradient(180deg, #7A9DA8, #B8C8C4 38%, #2F7383 46%, #0E3B45); }
.f3 { background: linear-gradient(180deg, #A89A86, #C9B89A 35%, #6E7552 55%, #2F3A27); }
.f4 { background: linear-gradient(180deg, #6D8AA3, #C7C3B7 42%, #3D6C86 50%, #12324A); }
.f5 { background: linear-gradient(180deg, #9FB0C0, #E4E6E6 30%, #7D8F97 52%, #26363F); }
.f6 { background: linear-gradient(180deg, #2B3240, #585E6B 40%, #8C7F6D 52%, #1B1E26); }
.f7 { background: linear-gradient(180deg, #D5B690, #E9D3B0 35%, #A4845E 55%, #3C2E22); }

/* Metodo: sequenza con linea di collegamento */
.steps { list-style: none; display: grid; gap: 2.25rem; margin-top: 3.5rem; counter-reset: passo; position: relative; }
.steps li { counter-increment: passo; position: relative; padding-left: 3.25rem; }
.steps li::before { content: counter(passo); position: absolute; left: 0; top: .1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid rgba(230,227,220,.5); display: grid; place-items: center; font-family: var(--display); font-size: .95rem; background: var(--abisso); }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 1.1rem; top: 2.5rem; bottom: -2rem; width: 1px; background: var(--filetto); }
.steps h3 { font-size: 1.4rem; line-height: 1.2; }
.steps p { color: var(--argento); margin-top: .4rem; max-width: 28rem; }

/* Contatti */
.contact { display: grid; gap: 3rem; }
.contact__info p { color: var(--argento); margin-top: 1.25rem; max-width: 26rem; }
.contact__mail { display: inline-block; margin-top: 1.75rem; font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.35rem); text-decoration: none; border-bottom: 1px solid rgba(230,227,220,.4); padding-bottom: .2rem; }
.contact__mail:hover { border-color: var(--perla); }
.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .88rem; font-weight: 500; color: var(--riflesso); }
.field input, .field select, .field textarea {
  font: 300 1rem/1.5 var(--sans); color: var(--perla);
  background: rgba(230,227,220,.04); border: 1px solid rgba(230,227,220,.28); border-radius: 4px;
  padding: .8rem 1rem; width: 100%;
}
.field select { appearance: none; background: rgba(230,227,220,.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23E6E3DC'/%3E%3C/svg%3E") right 1rem center / .75rem no-repeat; }
.field select option { background: var(--abisso); color: var(--perla); }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--perla); box-shadow: 0 0 0 3px rgba(230,227,220,.15); }
.check { display: flex; gap: .75rem; align-items: flex-start; font-size: .9rem; color: var(--argento); }
.check input { width: 1.1rem; height: 1.1rem; margin-top: .25rem; accent-color: var(--perla); flex: none; }
.form__status { font-size: .95rem; color: var(--riflesso); min-height: 1.5em; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--filetto); padding-block: 3rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); font-size: .88rem; color: var(--argento); }
.footer__grid { display: grid; gap: 1.5rem; justify-items: center; text-align: center; }
.footer .brand { color: var(--perla); }
.footer ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--perla); }

/* ---------- Mobile ---------- */
@media (max-width: 899px) {
  .header__bar { grid-template-columns: 2.75rem 1fr 2.75rem; }
  .menu-btn { display: block; grid-column: 3; grid-row: 1; }
  .header__side { display: none; }
  .nav { position: fixed; inset: 0; z-index: -1; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--header-h) + env(safe-area-inset-top, 0px)) var(--gutter) 3rem; background: var(--abisso); visibility: hidden; opacity: 0; transition: opacity .3s ease, visibility 0s .3s; }
  .nav.is-open { visibility: visible; opacity: 1; transition: opacity .3s ease; }
  .nav ul { flex-direction: column; gap: 1.1rem; }
  .nav ul a { font-family: var(--display); font-size: 1.9rem; color: var(--perla); }
  .nav .lang-mobile { display: inline-block; margin-top: 2.5rem; font-size: .9rem; letter-spacing: .12em; color: var(--riflesso); text-decoration: none; }
  /* Su mobile il testo del capitolo sta sul video a tutto schermo */
  .chapter { align-items: flex-end; padding-bottom: 6.5rem; }
  .chapter .media::before { background: linear-gradient(180deg, rgba(12,23,27,.15) 0%, rgba(12,23,27,.55) 45%, rgba(12,23,27,.9) 100%); }
}
@media (min-width: 900px) {
  .nav .lang-mobile { display: none; }
  .services { grid-template-columns: 4fr 7fr; gap: 5rem; align-items: start; }
  .services__head { position: sticky; top: calc(var(--header-h) + 3rem); }
  .strip { grid-auto-columns: 17.5rem; gap: 1.25rem; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .steps li { padding-left: 0; padding-top: 3.5rem; }
  .steps li::before { top: 0; }
  .steps li:not(:last-child)::after { left: 2.2rem; right: -2rem; top: 1.1rem; bottom: auto; width: auto; height: 1px; }
  .contact { grid-template-columns: 5fr 7fr; gap: 5rem; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .media-toggle { bottom: 2rem; }
}

/* Movimento ridotto: oblò già aperto, niente animazioni */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .media { animation: none; clip-path: none; }
  .hero__ring { display: none; }
  .hero__content { animation: none; opacity: 1; }
  .frame__img { transition: none; }
}

/* Tre soli fotogrammi: su desktop stanno affiancati, le frecce servono solo su telefono */
@media (min-width: 900px) {
  .strip-nav { display: none; }
  .strip { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; width: min(100% - 2 * var(--gutter), var(--col)); margin-inline: auto; padding-inline: 0; gap: 1.5rem; }
  .frame { aspect-ratio: 3 / 4; }
}
.frame span { display: block; margin-top: .2rem; }

/* ---------- Pulsante musica, fisso in basso a sinistra ---------- */
.musica { position: fixed; z-index: 45; left: var(--gutter); bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: 0 1.1rem; border-radius: 999px; font: 400 .85rem/1 var(--sans); cursor: pointer; background: rgba(12,23,27,.7); color: var(--perla); border: 1px solid rgba(230,227,220,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.musica__barre { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.musica__barre i { width: 2px; height: 3px; background: currentColor; }
.musica[aria-pressed="true"] .musica__barre i { animation: barra 1s ease-in-out infinite alternate; }
.musica[aria-pressed="true"] .musica__barre i:nth-child(2) { animation-delay: -.4s; }
.musica[aria-pressed="true"] .musica__barre i:nth-child(3) { animation-delay: -.7s; }
@keyframes barra { from { height: 3px; } to { height: 12px; } }
@media (min-width: 900px) { .musica { bottom: 2rem; } }
@media (prefers-reduced-motion: reduce) { .musica[aria-pressed="true"] .musica__barre i { animation: none; height: 9px; } }
.footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }

/* Fotogrammi "Dove": foto condivise, fondo sfumato finché mancano */
.frame__img.dove-capitali { background: url('/assets/img/dove-capitali.webp') center / cover no-repeat, linear-gradient(180deg, #2B3240, #585E6B 40%, #8C7F6D 52%, #1B1E26); }
.frame__img.dove-mare { background: url('/assets/img/dove-mare.webp') center / cover no-repeat, linear-gradient(180deg, #7A9DA8, #B8C8C4 38%, #2F7383 46%, #0E3B45); }
.frame__img.dove-montagna { background: url('/assets/img/dove-montagna.webp') center / cover no-repeat, linear-gradient(180deg, #9FB0C0, #E4E6E6 30%, #7D8F97 52%, #26363F); }
