/* =====================================================================
   Alìa Events — Design System
   Un unico foglio di stile, zero dipendenze runtime.
   Indice:
     1. Font self-hosted
     2. Design token (:root)
     3. Reset & base
     4. Tipografia
     5. Layout (container, section, grid)
     6. Utility minime
     7. Componenti
     8. Motion & animazioni
     9. Accessibilità & reduced-motion
   ===================================================================== */

/* 1. ---------------------------------------------------------------- FONT */
@font-face {
  font-family: 'TheSeasons';
  src: url('../fonts/The-Seasons.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/playfair-display-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/playfair-display-500.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/playfair-display-600.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/playfair-display-700.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/poppins-300.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/poppins-600.woff2') format('woff2'); }

/* 2. --------------------------------------------------------------- TOKEN */
:root {
  /* Palette brand (preservata) + derivati per contrasto/UI */
  --brand-aqua: #27e5cf;
  --brand-aqua-deep: #12b6a3;   /* versione satura: testo/azioni su chiaro */
  --brand-teal: #2d7b72;        /* accent */
  --brand-slate: #1e3a43;       /* secondary */
  --brand-ink: #0b1a23;         /* dark */
  --brand-mist: #f5f0f6;        /* light tint del brand */

  /* Compat: variabili usate dal markup legacy */
  --primary: var(--brand-aqua);
  --secondary: var(--brand-slate);
  --accent: var(--brand-teal);
  --light: var(--brand-mist);
  --dark: var(--brand-ink);
  --primary_tr: rgba(39, 229, 207, 0.14);

  /* Superfici & testo */
  --bg: #ffffff;
  --bg-soft: #f6f9f9;
  --bg-tint: #eef6f5;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --ink: #102a30;               /* testo principale (AA su bianco) */
  --ink-soft: #45595f;          /* testo secondario (AA su bianco) */
  --ink-faint: #6c7d82;         /* terziario */
  --line: #e5ecec;              /* hairline */
  --line-strong: #d3dedd;
  --on-dark: #eef6f4;
  --on-dark-soft: #a7c2bd;
  --on-dark-faint: rgba(238, 246, 244, 0.6);

  /* Gradienti */
  --grad-brand: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-aqua-deep) 100%);
  --grad-deep: linear-gradient(160deg, #0e2730 0%, var(--brand-ink) 100%);
  --grad-sheen: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,0) 60%);

  /* Ombre soffici stratificate (tinta teal) */
  --shadow-xs: 0 1px 2px rgba(16, 42, 48, .06);
  --shadow-sm: 0 2px 8px rgba(16, 42, 48, .07);
  --shadow-md: 0 10px 30px rgba(16, 42, 48, .10);
  --shadow-lg: 0 24px 60px rgba(16, 42, 48, .16);
  --shadow-xl: 0 40px 90px rgba(11, 26, 35, .26);
  --shadow-brand: 0 16px 40px rgba(18, 182, 163, .35);

  /* Raggi */
  --r-xs: .375rem;
  --r-sm: .625rem;
  --r-md: .9rem;
  --r-lg: 1.25rem;
  --r-xl: 1.75rem;
  --r-2xl: 2.25rem;
  --r-pill: 999px;

  /* Tipografia */
  --font-display: 'TheSeasons', 'Playfair Display', Georgia, serif;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --fs-hero: clamp(2.75rem, 7vw, 6rem);
  --fs-h1: clamp(2.1rem, 4.8vw, 3.6rem);
  --fs-h2: clamp(1.8rem, 3.6vw, 2.85rem);
  --fs-h3: clamp(1.3rem, 2.2vw, 1.75rem);
  --fs-lead: clamp(1.05rem, 1.55vw, 1.27rem);
  --fs-body: 1rem;
  --fs-sm: .875rem;
  --fs-xs: .78rem;

  /* Spazi */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --container: 1200px;
  --container-wide: 1440px;
  --container-narrow: 820px;
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --header-h: 84px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.2, .9, .25, 1);
  --dur: .38s;
  --dur-slow: .7s;

  /* Z-index */
  --z-header: 1000;
  --z-overlay: 1100;
  --z-modal: 1200;
  --z-toast: 1300;
}

/* 3. ---------------------------------------------------------------- RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video, svg, picture { display: block; max-width: 100%; height: auto; }
img { font-style: italic; color: var(--ink-faint); } /* alt text leggibile se l'immagine non carica */

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul[role='list'] { list-style: none; }

::selection { background: var(--brand-aqua); color: var(--brand-ink); }

/* 4. ----------------------------------------------------------- TIPOGRAFIA */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { max-width: 68ch; }
strong, b { font-weight: 600; }
.display { font-family: var(--font-display); font-weight: 400; }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); line-height: 1.6; }
.text-muted { color: var(--ink-soft); }
.text-brand { color: var(--brand-aqua-deep); }
.italic { font-style: italic; }

/* Link animato con underline-reveal (riuso del pattern legacy) */
.link-anim {
  background-image: linear-gradient(var(--brand-aqua-deep), var(--brand-aqua-deep));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0 100%;
  transition: background-size .35s var(--ease);
  padding-bottom: 1px;
}
.link-anim:hover, .link-anim:focus-visible { background-size: 100% 2px; }

/* 5. -------------------------------------------------------------- LAYOUT */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }
.section--dark { background: var(--grad-deep); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .lead { color: var(--on-dark-soft); }

.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* 6. ------------------------------------------------------------- UTILITY */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.full { width: 100%; }
.relative { position: relative; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hide-mobile { } .hide-desktop { display: none; }
@media (max-width: 860px) { .hide-mobile { display: none !important; } .hide-desktop { display: revert; } }

/* 7. ---------------------------------------------------------- COMPONENTI */

/* — Eyebrow / etichetta di sezione — */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--brand-aqua-deep);
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--grad-brand); border-radius: 2px; }
.eyebrow--center { justify-content: center; }
.section--dark .eyebrow { color: var(--brand-aqua); }

/* — Section header — */
.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-top: 1rem; }

/* — Bottoni — */
.btn {
  --btn-bg: var(--brand-ink); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.9rem; border-radius: var(--r-pill);
  font-weight: 600; font-size: .95rem; letter-spacing: .01em; line-height: 1;
  background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
  will-change: transform;
}
.btn svg { width: 1.1em; height: 1.1em; transition: transform var(--dur) var(--ease); }
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(-1px); }
.btn--brand { --btn-bg: var(--grad-brand); --btn-fg: #06231f; box-shadow: var(--shadow-brand); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--brand-ink); }
.btn--ghost {
  --btn-fg: var(--ink); background: transparent; box-shadow: none;
  border: 1.5px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--brand-aqua-deep); color: var(--brand-aqua-deep); box-shadow: none; }
.section--dark .btn--ghost { --btn-fg: #fff; border-color: rgba(255,255,255,.3); }
.section--dark .btn--ghost:hover { border-color: var(--brand-aqua); color: var(--brand-aqua); }
.btn--lg { padding: 1.1rem 2.4rem; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }

/* — Card generica — */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card--pad { padding: clamp(1.5rem, 3vw, 2.25rem); }
.card--hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }

/* — Service / media card (immagine + overlay) — */
.media-card {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-lg); aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-md); isolation: isolate;
  transition: transform var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease);
}
.media-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.media-card::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11,26,35,0) 35%, rgba(11,26,35,.45) 65%, rgba(11,26,35,.85) 100%);
  transition: opacity var(--dur) var(--ease);
}
.media-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.media-card:hover img { transform: scale(1.07); }
.media-card__body { position: absolute; inset: auto 0 0 0; z-index: 2; padding: clamp(1.25rem, 2.5vw, 1.9rem); color: #fff; }
.media-card__index { position: absolute; top: 1.1rem; right: 1.3rem; z-index: 2; font-family: var(--font-display); font-size: 3.4rem; line-height: 1; color: rgba(255,255,255,.22); }
.media-card__title { font-size: 1.45rem; color: #fff; margin-bottom: .35rem; }
.media-card__text { font-size: .95rem; color: rgba(255,255,255,.85); max-width: 42ch; max-height: 0; opacity: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease), opacity var(--dur) var(--ease), margin var(--dur) var(--ease); }
.media-card:hover .media-card__text, .media-card:focus-within .media-card__text { max-height: 9rem; opacity: 1; margin-top: .4rem; }
.media-card__icon {
  width: 46px; height: 46px; border-radius: var(--r-pill); margin-bottom: .9rem;
  display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.media-card__icon svg { width: 22px; height: 22px; }

/* — Pill / badge — */
.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .85rem; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em;
  background: var(--bg-tint); color: var(--brand-teal);
}
.pill--glass { background: var(--surface-glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* — Feature / valore — */
.feature { display: flex; gap: 1rem; }
.feature__icon { flex: 0 0 auto; width: 52px; height: 52px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--grad-brand); color: #06231f; box-shadow: var(--shadow-brand); }
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.2rem; margin-bottom: .25rem; }
.feature p { color: var(--ink-soft); font-size: .96rem; }

/* — Statistiche / contatori — */
.stat { text-align: center; }
.stat__num { font-family: var(--font-head); font-weight: 600; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; background: linear-gradient(135deg, #fff, var(--brand-aqua)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { margin-top: .5rem; font-size: var(--fs-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-soft); }

/* — Form — */
.field { margin-bottom: 1.15rem; }
.field > label { display: block; margin-bottom: .45rem; font-size: .9rem; font-weight: 500; color: var(--ink-soft); }
.input, .textarea, .select {
  width: 100%; padding: .85rem 1.1rem; background: #fff;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  color: var(--ink); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand-aqua-deep); box-shadow: 0 0 0 4px var(--primary_tr); }
.textarea { border-radius: var(--r-md); resize: vertical; min-height: 130px; }
.field__help { margin-top: .35rem; font-size: var(--fs-xs); color: var(--ink-faint); }
.field--pill .input, .field--pill .select { border-radius: var(--r-pill); }

/* — Breadcrumb — */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: var(--fs-sm); color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--brand-aqua-deep); }
.breadcrumb li { display: flex; align-items: center; gap: .5rem; }
.breadcrumb li + li::before { content: '/'; color: var(--line-strong); }

/* — Divider decorativo — */
.divider-line { width: 64px; height: 3px; border-radius: 3px; background: var(--grad-brand); }
.divider-line--center { margin-inline: auto; }

/* — Modale — */
.modal-backdrop { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 1.25rem; background: rgba(11,26,35,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-backdrop[hidden] { display: none; }
.modal {
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-xl);
  max-width: 560px; width: 100%; max-height: 88vh; overflow: auto;
  animation: modalIn .35s var(--ease-out);
}
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.modal__head h2, .modal__head h3 { font-size: 1.15rem; }
.modal__body { padding: 1.4rem; color: var(--ink-soft); }
.modal__body h4 { color: var(--ink); margin-top: 1rem; }
.modal__body ul { padding-left: 1.2rem; margin: .5rem 0; }
.modal__close { width: 38px; height: 38px; border-radius: var(--r-pill); display: grid; place-items: center; color: var(--ink-faint); transition: background var(--dur) var(--ease); }
.modal__close:hover { background: var(--bg-soft); color: var(--ink); }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* — Lightbox galleria — */
.lightbox { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 1.5rem; background: rgba(7,18,23,.92); }
.lightbox[hidden] { display: none; }
.lightbox img, .lightbox video { max-width: min(92vw, 1200px); max-height: 88vh; border-radius: var(--r-md); box-shadow: var(--shadow-xl); }
.lightbox__close, .lightbox__nav { position: absolute; top: 1.2rem; right: 1.2rem; width: 48px; height: 48px; border-radius: var(--r-pill); display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); transition: background var(--dur) var(--ease); }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 1.2rem; right: auto; }
.lightbox__nav--next { right: 1.2rem; }

/* 8. --------------------------------------------------------------- MOTION */
.reveal { opacity: 0; transform: translateY(38px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-reveal='left'] { transform: translateX(-40px); }
.reveal[data-reveal='right'] { transform: translateX(40px); }
.reveal[data-reveal='scale'] { transform: scale(.94); }
.reveal.is-visible[data-reveal] { transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
[data-stagger].is-visible > * { opacity: 1; transform: none; }
[data-stagger].is-visible > *:nth-child(1) { transition-delay: .05s; }
[data-stagger].is-visible > *:nth-child(2) { transition-delay: .13s; }
[data-stagger].is-visible > *:nth-child(3) { transition-delay: .21s; }
[data-stagger].is-visible > *:nth-child(4) { transition-delay: .29s; }
[data-stagger].is-visible > *:nth-child(5) { transition-delay: .37s; }
[data-stagger].is-visible > *:nth-child(6) { transition-delay: .45s; }

.floating { animation: floating 6s ease-in-out infinite; }
@keyframes floating { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* 9. ----------------------------------------------------- A11Y & MOTION OFF */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--brand-aqua-deep);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.skip-link {
  position: fixed; top: -100%; left: 1rem; z-index: var(--z-toast);
  padding: .75rem 1.25rem; background: var(--brand-ink); color: #fff; border-radius: 0 0 var(--r-md) var(--r-md);
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal, [data-stagger] > * { opacity: 1 !important; transform: none !important; }
}

/* =====================================================================
   CHROME: header, menu fullscreen, selettore lingua, footer
   ===================================================================== */

/* — Header — */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(229, 236, 236, .8);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-header.is-scrolled { background: rgba(255, 255, 255, .93); box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; transition: transform var(--dur-slow) var(--ease-spring); }
.brand img { height: 56px; width: auto; }
.brand:hover { transform: rotate(-3deg) scale(.99); }
.header-actions { display: flex; align-items: center; gap: .75rem; }

/* — Hamburger — */
.nav-toggle { width: 46px; height: 46px; border-radius: var(--r-pill); display: grid; place-items: center; color: var(--ink); transition: background var(--dur) var(--ease); }
.nav-toggle:hover { background: var(--bg-tint); }
.nav-toggle__bars { display: block; width: 22px; height: 14px; position: relative; }
.nav-toggle__bars span { position: absolute; left: 0; height: 2px; width: 100%; background: currentColor; border-radius: 2px; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6px; }
.nav-toggle__bars span:nth-child(3) { top: 12px; }
body.nav-open .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* — Menu fullscreen — */
#site-menu {
  /* width/height espliciti: il genitore .site-header ha backdrop-filter, che lo
     rende containing block per i fixed → senza questo il menu eredita l'altezza
     dell'header (~84px) e il clip-path rivela solo una piccola area. */
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh;
  z-index: var(--z-overlay);
  display: grid; place-items: center; padding: 2rem;
  background: radial-gradient(1200px 700px at 15% 10%, rgba(39, 229, 207, .12), transparent 60%), var(--grad-deep);
  clip-path: circle(0% at var(--reveal-x, 100%) var(--reveal-y, 0));
  visibility: hidden; opacity: 0;
  transition: clip-path .6s var(--ease-spring), opacity .35s var(--ease), visibility 0s linear .6s;
  padding: 0;
}
#site-menu.is-open { clip-path: circle(150vmax at var(--reveal-x) var(--reveal-y)); visibility: visible; opacity: 1; transition: clip-path .6s var(--ease-spring), opacity .35s var(--ease); }
body.nav-open { overflow: hidden; }
.menu-nav {
  width: 100%;
  height: calc(100dvh - 50px);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: #102a30;
}
.menu-nav a {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: var(--font-head); font-size: clamp(1.6rem, 4.5vw, 2.6rem); color: #fff;
  opacity: 0; transform: translateY(20px); transition: color var(--dur) var(--ease);
}
.menu-nav a .menu-ico { color: var(--brand-aqua); width: 1em; height: 1em; opacity: .8; transition: transform var(--dur) var(--ease-spring); }
.menu-nav a:hover { color: var(--brand-aqua); }
.menu-nav a:hover .menu-ico { transform: rotate(-8deg) scale(1.1); }
#site-menu.is-open .menu-nav a { animation: menuItemIn .55s var(--ease-spring) forwards; }
#site-menu.is-open .menu-nav a:nth-child(1) { animation-delay: .12s; }
#site-menu.is-open .menu-nav a:nth-child(2) { animation-delay: .18s; }
#site-menu.is-open .menu-nav a:nth-child(3) { animation-delay: .24s; }
#site-menu.is-open .menu-nav a:nth-child(4) { animation-delay: .30s; }
#site-menu.is-open .menu-nav a:nth-child(5) { animation-delay: .36s; }
#site-menu.is-open .menu-nav a:nth-child(6) { animation-delay: .42s; }
@keyframes menuItemIn { to { opacity: 1; transform: none; } }
.menu-foot { position: absolute; inset: auto 0 clamp(1.5rem, 4vh, 2.5rem) 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; color: var(--on-dark-soft); }
.menu-foot a { color: var(--on-dark-soft); }
.menu-foot a:hover { color: #fff; }

/* — Selettore lingua — */
.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .8rem; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); font-size: .85rem; font-weight: 500; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.lang__btn:hover { border-color: var(--brand-aqua-deep); }
.lang__btn svg { width: 14px; height: 14px; opacity: .7; }
.lang__menu { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 180px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: .35rem; list-style: none; }
.lang__menu[hidden] { display: none; }
.lang__menu button { display: flex; width: 100%; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: var(--r-sm); font-size: .9rem; text-align: left; transition: background var(--dur) var(--ease); }
.lang__menu button:hover { background: var(--bg-tint); }
.lang__menu button[aria-current] { color: var(--brand-aqua-deep); font-weight: 600; }
.menu-foot .lang__btn { color: #fff; border-color: rgba(255, 255, 255, .3); }
/* Nel menu mobile il selettore è in fondo allo schermo: la tendina si apre
   verso l'alto, altrimenti finirebbe sotto il bordo inferiore del viewport. */
.menu-foot .lang__menu { top: auto; bottom: calc(100% + .5rem); }

/* — Footer — */
.site-footer { position: relative; overflow: hidden; background: var(--grad-deep); color: var(--on-dark); padding: clamp(3.5rem, 7vw, 5.5rem) 0 2.5rem; }
.site-footer a { color: var(--on-dark-soft); transition: color var(--dur) var(--ease); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); position: relative; z-index: 2; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 2.25rem; text-align: center; } }
.footer-brand .display { font-size: 1.9rem; color: #fff; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-social { display: flex; gap: .75rem; margin-top: 1.25rem; }
@media (max-width: 820px) { .footer-social { justify-content: center; } }
.footer-social a { width: 42px; height: 42px; border-radius: var(--r-pill); display: grid; place-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
.footer-social a:hover { transform: translateY(-3px); background: var(--brand-aqua-deep); color: #06231f; }
.footer-social svg { width: 20px; height: 20px; }
.footer-bottom { position: relative; z-index: 2; margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; font-size: var(--fs-sm); color: var(--on-dark-soft); }
.footer-legal { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.footer-waves { position: absolute; inset: auto 0 0 0; height: 130px; pointer-events: none; opacity: .9; }
.footer-waves svg { position: absolute; bottom: 0; width: 100%; height: 100%; }
.footer-waves .w1 { animation: waveDrift 14s ease-in-out infinite; }
.footer-waves .w2 { animation: waveDrift 18s ease-in-out infinite reverse; }
.footer-waves .w3 { animation: waveDrift 22s ease-in-out infinite; }
@keyframes waveDrift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-24px); } }

/* — Selettore prefisso telefonico (contact form) — */
.prefix { position: relative; flex: 0 0 38%; }
.prefix__display { display: flex; align-items: center; gap: .4rem; width: 100%; padding: .85rem 1rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: #fff; cursor: pointer; user-select: none; }
.prefix__display [data-prefix-value] { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prefix__dropdown { position: absolute; top: calc(100% + .35rem); left: 0; width: max(280px, 100%); z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: .5rem; }
.prefix__dropdown[hidden] { display: none; }
.prefix__dropdown input { width: 100%; padding: .5rem .7rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); margin-bottom: .4rem; }
.prefix__list { list-style: none; max-height: 240px; overflow-y: auto; }
.prefix-option { display: flex; width: 100%; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: var(--r-sm); text-align: left; transition: background var(--dur) var(--ease); }
.prefix-option:hover { background: var(--bg-tint); }
.prefix-option .prefix-name { flex: 1; font-size: .9rem; }
.prefix-option .prefix-dial { color: var(--ink-faint); font-size: .85rem; }
.phone-row { display: flex; gap: .6rem; }
.form-status { margin-top: .5rem; font-size: .9rem; font-weight: 500; min-height: 1.2em; }
.form-status.is-ok { color: var(--brand-teal); }
.form-status.is-err { color: #c0392b; }

/* =====================================================================
   COMPONENTI DI PAGINA (hero interno, gallery, pricing, steps, faq)
   ===================================================================== */

/* — Hero interno — */
.page-hero { position: relative; overflow: hidden; background: var(--grad-deep); color: #fff; padding: calc(var(--header-h) + clamp(3rem, 7vw, 5.5rem)) 0 clamp(3rem, 6vw, 5rem); }
.page-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(900px 500px at 80% 0%, rgba(39,229,207,.16), transparent 55%); }
.page-hero__inner { position: relative; z-index: 2; max-width: 760px; }
.page-hero h1 { color: #fff; margin-top: 1rem; }
.page-hero .lead { color: var(--on-dark-soft); margin-top: 1rem; }
.page-hero .breadcrumb { color: var(--on-dark-soft); margin-bottom: 1rem; }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero .breadcrumb li + li::before { color: rgba(255,255,255,.35); }

/* — Gallery (masonry-ish a colonne) — */
.gallery { columns: 3 260px; column-gap: 1rem; }
.gallery__item { break-inside: avoid; margin-bottom: 1rem; border-radius: var(--r-md); overflow: hidden; position: relative; display: block; box-shadow: var(--shadow-sm); cursor: zoom-in; }
.gallery__item img { width: 100%; height: auto; transition: transform var(--dur-slow) var(--ease); }
.gallery__item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(11,26,35,.5)); opacity: 0; transition: opacity var(--dur) var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item:hover::after { opacity: 1; }

/* — Filtri — */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2.5rem; }
.filter-btn { padding: .5rem 1.1rem; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); font-size: .88rem; font-weight: 500; color: var(--ink-soft); transition: all var(--dur) var(--ease); }
.filter-btn:hover { border-color: var(--brand-aqua-deep); color: var(--brand-aqua-deep); }
.filter-btn.is-active { background: var(--brand-ink); color: #fff; border-color: var(--brand-ink); }

/* — Pricing — */
.price-card { display: flex; flex-direction: column; height: 100%; position: relative; overflow: hidden; }
.price-card--featured { border-color: transparent; box-shadow: var(--shadow-lg); outline: 2px solid var(--brand-aqua-deep); }
.price-card__tag { position: absolute; top: 1rem; right: 1rem; background: var(--grad-brand); color: #06231f; padding: .25rem .7rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; }
.price-card h3 { font-size: 1.4rem; }
.price-card__price { font-family: var(--font-head); font-size: 2.4rem; font-weight: 600; color: var(--ink); margin: .5rem 0; }
.price-card__price span { font-family: var(--font-body); font-size: .9rem; font-weight: 400; color: var(--ink-faint); }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: .7rem; margin: 1.25rem 0; }
.price-card li { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink-soft); font-size: .95rem; }
.price-card li svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--brand-aqua-deep); margin-top: 1px; }
.price-card .btn { margin-top: auto; }

/* — Process steps — */
.steps { counter-reset: step; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(230px,100%), 1fr)); }
.step { position: relative; padding-top: 1rem; }
.step__num { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-pill); background: var(--bg-tint); color: var(--brand-aqua-deep); font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; margin-bottom: 1rem; }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--ink-soft); font-size: .95rem; }

/* — FAQ / accordion — */
.faq { max-width: 800px; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 0; text-align: left; font-family: var(--font-head); font-size: 1.12rem; font-weight: 600; color: var(--ink); }
.faq__q svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--brand-aqua-deep); transition: transform var(--dur) var(--ease); }
.faq__item[open] .faq__q svg { transform: rotate(45deg); }
.faq__a { padding-bottom: 1.25rem; color: var(--ink-soft); }
.faq__q::-webkit-details-marker { display: none; }

/* — Loader badge (LCP-friendly, opzionale) — */
#loader { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: var(--z-toast); display: flex; align-items: center; gap: .6rem; padding: .7rem 1.05rem; border-radius: var(--r-md); background: rgba(11, 26, 35, .82); color: #fff; font-size: .85rem; box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
#loader.is-hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }
#loader .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin .7s linear infinite; }
html.is-loading body { opacity: 0; }
body { transition: opacity .5s var(--ease); }
