/* RECORDIA distributed by FPF AGENCY — Landing PSI 2027
 * Restyle 24/10/2026 (skill design-taste): caratteri e colori del sito
 * Recordia (Playfair Display + Montserrat, crema, inchiostro, oro), ma con
 * titoli grandi, un fondo pieno per capitolo e niente filetti, etichette,
 * numerazioni o ombre. Le foto restano quelle del prodotto.
 *
 * I font sono ospitati in locale (fonts/, licenza SIL OFL) e NON caricati da
 * Google Fonts: in Germania l'embedding dinamico trasmette l'IP a Google senza
 * consenso (LG München I, 20.01.2022, 3 O 17493/20).
 * Le proprietà logiche (inline-start/end) servono all'arabo, che è RTL. */

@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* Il 500 copre anche i semibold: non abbiamo il file 600, meglio di un grassetto finto. */
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-500.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("fonts/playfair-500.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  /* fondi del marchio Recordia: un colore pieno per capitolo */
  --paper: #F1EEE7; /* taste-skill-ignore: crema del marchio Recordia */
  --surface: #FAF9F6;
  --linen: #E9E5DC;
  --stone: #DDD5C6;
  --sand: #D9CAAE;
  --deep: #1C1917;
  --night: #14110F;
  --night-soft: #292524;

  --ink: #1C1917;
  --muted: #3F3B37;
  --on-dark: #FAFAF9;
  --on-dark-soft: rgba(250, 250, 249, .74);
  --gold: #A16207;
  --gold-soft: #CA8A04;
  /* l'azione principale: inchiostro, oro al passaggio */
  --accent: #1C1917;
  --accent-ink: #FAF9F6;
  --danger: #B3261E;
  --field-line: #C9C2B5;

  --font-display: "Playfair Display", Georgia, serif;
  --font: "Montserrat", system-ui, -apple-system, sans-serif;

  /* le cinque misure della pagina */
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1rem, .96rem + .2vw, 1.125rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.5rem, 1.2rem + 3.6vw, 4.75rem);

  --radius: 0;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1760px;
  --gutter: clamp(20px, 4.5vw, 88px);
  --header-h: 88px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .07em; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; text-wrap: balance; hyphens: none; overflow-wrap: break-word; }
h1 { font-size: var(--step-display); line-height: 1.04; letter-spacing: -.02em; }
h2 { font-size: var(--step-head); line-height: 1.06; letter-spacing: -.015em; }
h3 { font-size: var(--step-lead); line-height: 1.2; letter-spacing: 0; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(104px, 11vw, 192px); }
/* i capitoli: un campo di colore ciascuno */
#vantaggi { background: var(--linen); }
#target { background: var(--paper); }
#applicazioni { background: var(--deep); color: var(--on-dark); }
#prodotto { background: var(--paper); }
#psi { background: var(--sand); }
#appuntamento { background: var(--stone); }
#faq { background: var(--paper); }
#chi-siamo { background: var(--linen); }

.lead { font-size: var(--step-lead); line-height: 1.35; color: var(--muted); max-width: 40ch; }
#applicazioni .lead { color: var(--on-dark-soft); }
.section-head { max-width: 1100px; margin-bottom: clamp(48px, 6vw, 96px); }
.section-head h2 { max-width: 28ch; }
.section-head h2 + .lead { margin-top: 28px; }

/* ── Bottoni: pieni, interamente tondi ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 30px;
  border: 1.5px solid transparent; border-radius: 999px;
  font: 500 var(--step-small)/1 var(--font); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--gold); }
.btn--ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 var(--step-small)/1.3 var(--font); color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .3em;
  border: 0; background: none; padding: 0; cursor: pointer;
}
.link-arrow::after { content: "→"; text-decoration: none; display: inline-block; transition: transform .3s var(--ease); }
.link-arrow:hover::after { transform: translateX(5px); }
[dir="rtl"] .link-arrow::after { content: "←"; }
[dir="rtl"] .link-arrow:hover::after { transform: translateX(-5px); }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

/* ── Header: fondo pieno, niente vetro ── */
.header { position: sticky; top: 0; z-index: 50; background: var(--paper); transition: background .3s var(--ease); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav > a:not(.btn) {
  font-size: var(--step-small); font-weight: 500; color: var(--muted);
  text-decoration: underline 2px transparent; text-underline-offset: .45em;
  transition: color .25s, text-decoration-color .25s;
}
.nav > a:not(.btn):hover { color: var(--ink); text-decoration-color: currentColor; }
.nav .btn { min-height: 44px; padding: 0 22px; }
@media (max-width: 1200px) { .nav > a:not(.btn) { display: none; } }
@media (max-width: 520px) { .nav .btn { padding: 0 16px; } }

/* ── Hero ──
 * Desktop: foto a tutto schermo, album a destra, testo a sinistra sul fondo
 * notte in cui la foto sfuma. La foto non si specchia in arabo (sulla
 * copertina c'è del testo): in RTL spostiamo invece la colonna del testo.
 * Sotto i 1200px: foto sopra, testo sotto su fondo chiaro. */
.hero { position: relative; display: flex; flex-direction: column; }
.hero__bg { position: relative; }
.hero__bg img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
.hero__grid { display: grid; padding-block: clamp(40px, 7vw, 64px) clamp(72px, 10vw, 104px); }
.hero__copy h1 { margin-bottom: 28px; max-width: 16ch; }
.hero__copy .lead { margin-bottom: 40px; max-width: 36ch; }

/* ── Biglietto della fiera: lo stand è il numero da ricordare ── */
.fair-ticket { display: inline-grid; grid-template-columns: auto auto; max-width: 100%; margin-top: 48px; }
.fair-ticket__stand {
  display: flex; flex-direction: column-reverse; justify-content: center; gap: 10px;
  padding: 22px 30px; background: var(--stone); color: var(--ink);
}
/* > span: solo l'etichetta, non le lettere del numero (app.js le divide in span) */
.fair-ticket__stand > span { font-size: var(--step-small); font-weight: 500; color: var(--muted); white-space: nowrap; }
.fair-ticket__stand b { font-weight: 500; font-size: var(--step-head); line-height: .9; letter-spacing: -.01em; color: var(--gold); font-variant-numeric: lining-nums; }
.fair-ticket__info { display: grid; gap: 10px; align-content: center; padding: 20px 28px; background: var(--surface); }
.fair-ticket__info p { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--step-small); font-weight: 500; }
.fair-ticket__info svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fair-ticket .link-arrow { margin-top: 6px; }
@media (max-width: 560px) {
  .fair-ticket { display: grid; grid-template-columns: 1fr; }
  .fair-ticket__stand { flex-direction: row; align-items: baseline; justify-content: space-between; padding: 18px 20px; }
  .fair-ticket__info { padding: 18px 20px; }
}

@media (min-width: 641px) and (max-width: 1199px) {
  .hero__bg img { aspect-ratio: 16 / 9; }
}

@media (min-width: 1200px) {
  .hero { min-height: calc(100svh - var(--header-h)); justify-content: center; background: var(--night); color: var(--on-dark); overflow: hidden; }
  .hero__bg { position: absolute; inset: 0; }
  /* foto 4:3 ancorata a destra a tutta altezza: sfuma a sinistra nel fondo notte */
  .hero__bg img {
    /* al massimo il 60% della larghezza: se serve si taglia a sinistra (il pouf), mai l'album */
    position: absolute; top: 0; right: 0; height: 100%; width: min(60%, calc((100svh - var(--header-h)) * 4 / 3)); max-width: none;
    aspect-ratio: auto; object-fit: cover; object-position: right center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%); /* taste-skill-ignore: sfumatura della foto */
            mask-image: linear-gradient(90deg, transparent 0%, #000 42%); /* taste-skill-ignore: sfumatura della foto */
  }
  /* scrim neutro solo dietro il testo (anche in arabo resta a sinistra) */
  .hero__bg::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(20, 17, 15, .88) 0%, rgba(20, 17, 15, .6) 32%, rgba(20, 17, 15, 0) 54%); /* taste-skill-ignore: scrim neutro sulla foto */
  }
  .hero__grid { position: relative; z-index: 1; grid-template-columns: minmax(0, min(760px, 52vw)); padding-block: clamp(56px, 8vh, 96px); }
  [dir="rtl"] .hero__grid { justify-content: end; }
  .hero__copy h1 { max-width: none; }
  .hero .lead { color: var(--on-dark-soft); }
  .hero .btn--primary { background: var(--gold-soft); color: var(--ink); }
  .hero .btn--primary:hover { background: var(--paper); }
  .hero .btn--ghost { color: var(--on-dark); }
  .hero .btn--ghost:hover { background: var(--on-dark); border-color: var(--on-dark); color: var(--ink); }
  .hero .fair-ticket__info { background: var(--night-soft); color: var(--on-dark); }
  .hero .fair-ticket .link-arrow { color: var(--on-dark); }
}

/* ── Vantaggi: tre colonne sul campo cipria, separate solo dallo spazio ── */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(40px, 5vw, 96px); }
.benefit { padding-top: 0; }
.benefit h3 { margin-bottom: 16px; }
.benefit p { color: var(--muted); max-width: 38ch; }
@media (max-width: 820px) { .benefits { grid-template-columns: 1fr; gap: 48px; } }

/* ── Gruppi target: pannelli pieni, nessun bordo ── */
.targets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.target {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); padding: clamp(32px, 3.6vw, 56px);
  min-height: clamp(260px, 22vw, 340px);
  transition: background .4s var(--ease);
}
.target:hover { background: var(--stone); }
.target__tag { font-size: var(--step-small); font-weight: 500; color: var(--muted); }
.target p { color: var(--muted); flex: 1; max-width: 46ch; }
/* i clienti diretti sono un gruppo a parte: lo dice il colore, non un tratteggio */
.target--secondary { background: var(--linen); }
.target--secondary:hover { background: var(--sand); }
@media (max-width: 760px) { .targets { grid-template-columns: 1fr; } .target { min-height: 0; } }

/* ── Applicazioni: elenco grande su campo oliva ── */
.apps-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 6vw, 112px); align-items: start; }
.apps-grid .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 40px); }
.apps { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: clamp(32px, 4vw, 64px); }
.apps li {
  break-inside: avoid; padding-block: 0 26px;
  font-family: var(--font-display); font-size: var(--step-lead); line-height: 1.2;
}
@media (max-width: 860px) { .apps-grid { grid-template-columns: 1fr; } .apps-grid .section-head { position: static; } }

/* ── Galleria prodotto ── */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.gallery figure { margin: 0; position: relative; overflow: clip; /* clip e non hidden: hidden crea un contenitore di scroll e blocca animation-timeline: view() */ background: var(--surface); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 56px 22px 18px;
  background: linear-gradient(to top, rgba(28, 25, 23, .7), transparent); /* taste-skill-ignore: scrim neutro sulla foto */
  color: #FFFFFF; font-size: var(--step-small); font-weight: 500;
}
.g-a { grid-column: span 7; aspect-ratio: 4 / 3; }
.g-b { grid-column: span 5; aspect-ratio: auto; }
.g-c, .g-d, .g-e { grid-column: span 4; aspect-ratio: 1; }
.g-f, .g-g { grid-column: span 6; aspect-ratio: 16 / 11; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .g-a, .g-f, .g-g { grid-column: span 2; aspect-ratio: 4 / 3; }
  .g-b, .g-c, .g-d, .g-e { grid-column: span 1; aspect-ratio: 1; }
  .gallery figcaption { padding: 40px 12px 12px; }
}

/* ── PSI / stand: campo ardesia e scheda piena color inchiostro ── */
.fair { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 112px); align-items: center; }
.fair h2 { max-width: 16ch; }
.fair .lead { margin-top: 28px; }
.fair__card { background: var(--ink); color: var(--on-dark); padding: clamp(32px, 4vw, 64px); }
.fair__card dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
.fair__card dl > div:first-child { grid-column: 1 / -1; display: flex; flex-direction: column-reverse; }
.fair__card dt { font-size: var(--step-small); font-weight: 500; color: var(--on-dark-soft); }
.fair__card dd { margin: 6px 0 0; font-weight: 500; font-size: var(--step-body); }
.fair__card .stand { font-size: clamp(4.5rem, 2rem + 8vw, 10rem); line-height: .85; letter-spacing: -.03em; color: var(--gold-soft); margin: 0 0 14px; }
.fair__card .link-arrow { color: var(--on-dark); margin-top: 40px; }
.modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 40px; padding: 0; list-style: none; }
.modes li { background: var(--surface); border-radius: 999px; padding: 9px 18px; font-size: var(--step-small); font-weight: 500; }
@media (max-width: 860px) { .fair { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .fair__card dl { grid-template-columns: 1fr; } }

/* ── Modulo: pannello pieno sul campo salvia ── */
.form-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 6vw, 112px); align-items: start; }
.form-aside { position: sticky; top: calc(var(--header-h) + 40px); }
.form-aside .lead { margin-top: 28px; }
.form-aside ul { margin: 36px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.form-aside li { display: flex; gap: 14px; align-items: baseline; }
.form-aside li::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--gold); translate: 0 -2px; }
form.lead-form { background: var(--surface); padding: clamp(28px, 4vw, 56px); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: var(--step-small); font-weight: 500; color: var(--ink); padding: 0; }
.field .req { color: var(--gold); }
.field .hint { font-size: var(--step-small); color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; min-height: 52px;
  font: 400 var(--step-body)/1.4 var(--font); color: var(--ink);
  background: var(--paper); border: 1.5px solid transparent; border-radius: 0;
  padding: 12px 16px;
  transition: border-color .2s, background .2s;
}
input:hover, select:hover, textarea:hover { border-color: var(--field-line); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%231C1C1C' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
[dir="rtl"] select { background-position: left 16px center; padding-right: 16px; padding-left: 40px; }
textarea { min-height: 128px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); background: var(--surface); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--danger); }
.field__error { display: none; font-size: var(--step-small); color: var(--danger); }
.field.is-invalid .field__error { display: block; }
.counter { font-size: var(--step-small); color: var(--muted); text-align: end; }

fieldset.field { border: 0; margin: 0; padding: 0; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 8px 12px; border-radius: 999px;
  font-size: var(--step-small); font-weight: 500; line-height: 1.2; cursor: pointer; background: var(--paper);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.chip span:hover { background: var(--stone); }
.chip input:checked + span { background: var(--deep); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 620px) { .fields { grid-template-columns: 1fr; } .chips { grid-template-columns: 1fr 1fr; } }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--step-small); color: var(--muted); line-height: 1.5; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--deep); }
.consent a { color: var(--ink); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; }
.form-foot small { color: var(--muted); font-size: var(--step-small); }
.form-status { margin-top: 16px; font-size: var(--step-small); color: var(--danger); }
.form-status:empty { display: none; }
/* Campo trappola per i bot: nascosto senza offset (un left negativo in RTL crea scroll orizzontale) */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
@media (max-width: 860px) { .form-grid { grid-template-columns: 1fr; } .form-aside { position: static; } }

/* ── FAQ: domande separate solo dallo spazio ── */
.faq-grid { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(40px, 6vw, 112px); align-items: start; }
.faq-grid .section-head { position: sticky; top: calc(var(--header-h) + 40px); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } .faq-grid .section-head { position: static; } }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--surface); transition: background .3s var(--ease); }
.faq details:hover, .faq details[open] { background: #FFFFFF; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px clamp(20px, 2.4vw, 36px); font-family: var(--font-display); font-size: var(--step-lead); line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
/* chevron da due tratti di 2px */
.faq summary::after {
  content: ""; flex: none; width: 11px; height: 11px;
  border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { padding: 0 clamp(20px, 2.4vw, 36px) 30px; color: var(--muted); max-width: 64ch; }

/* ── Chi siamo: due pannelli pieni con i loghi ── */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about article { background: var(--surface); padding: clamp(32px, 4vw, 64px); }
.about h3 { margin-bottom: 12px; }
/* loghi al posto dei nomi: stessa altezza visiva, allineati a inizio colonna */
.about__logo { height: 96px; margin-bottom: 32px !important; display: flex; align-items: center; }
.about__logo img, .about__logo svg { height: 100%; width: auto; max-width: 100%; }
.about__logo svg { height: 82%; }
.about p { color: var(--muted); max-width: 52ch; }
.joint { margin-top: 48px; text-align: center; font-size: var(--step-small); font-weight: 500; color: var(--muted); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* ── CTA finale ── */
.final { text-align: center; }
.final h2 { max-width: 18ch; margin-inline: auto; }
.final .lead { margin: 22px auto 36px; }
.final .btn-row { justify-content: center; }

/* ── Footer: chiusura sul campo oliva ── */
.footer { background: var(--deep); color: var(--on-dark-soft); font-size: var(--step-small); padding-block: 56px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 28px; }
.footer a { color: var(--on-dark); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── Barra CTA mobile ── */
.mobile-cta {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper);
  transform: translateY(110%); transition: transform .35s var(--ease);
  display: none;
}
.mobile-cta .btn { width: 100%; }
.mobile-cta.is-visible { transform: none; }
@media (max-width: 760px) { .mobile-cta { display: block; } }

/* Titoli divisi in parole e numeri divisi in lettere (app.js): ogni parola
   ha la sua maschera, il padding salva le discendenti del Playfair. */
.split .w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.split .w > span, .chars > span { display: inline-block; }
.chars { white-space: nowrap; }
.header.is-hidden { transform: translateY(-100%); }
.header { will-change: transform; }

/* ── Animazioni ──
 * Tutto dentro prefers-reduced-motion: no-preference, e la comparsa solo con
 * la classe .js sull'<html>: senza JavaScript o con "riduci movimento" la
 * pagina è statica e completamente visibile.
 * Si animano solo opacity, clip-path e le proprietà di trasformazione. */
@media (prefers-reduced-motion: no-preference) {
  /* comparsa una volta sola (IntersectionObserver in app.js), con ritardo a cascata */
  .js .reveal {
    opacity: 0; translate: 0 32px;
    transition: opacity .9s var(--ease), translate .9s var(--ease);
    transition-delay: calc(var(--i, 0) * var(--step, 110ms));
  }
  .js .reveal.is-in { opacity: 1; translate: none; }

  /* header che si ritira e torna */
  .header { transition: transform .5s var(--ease), background .3s var(--ease); }

  /* titoli: le parole salgono da dietro la riga, una dopo l'altra */
  .js .split .w > span {
    transform: translateY(112%);
    transition: transform 1s var(--ease), opacity .8s var(--ease), filter .8s var(--ease);
    transition-delay: calc(var(--w, 0) * 45ms + 120ms);
  }
  .js .is-in .split .w > span, .js .split.is-in .w > span { transform: none; opacity: 1; filter: none; }
  .js .hero h1.split .w > span { transform: none; transition: none; animation: word-up 1.1s var(--ease) both; animation-delay: calc(var(--w, 0) * 80ms + 150ms); }
  @keyframes word-up { from { transform: translateY(112%); } }

  /* 7NC85 lettera per lettera */
  .js .chars > span { opacity: 0; transform: translateY(.35em); transition: opacity .6s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--c, 0) * 70ms + 250ms); }
  .js .is-in .chars > span, .js .chars.is-in > span { opacity: 1; transform: none; }
  .js .fair-ticket .chars > span { opacity: 1; transform: none; transition: none; animation: char-in .9s var(--ease) both; animation-delay: calc(var(--c, 0) * 70ms + 700ms); }
  @keyframes char-in { from { opacity: 0; transform: translateY(.35em); } }

  /* hero: la foto si apre da destra, poi il resto in sequenza */
  .hero__copy > :not(h1) { animation: hero-in 1s var(--ease) backwards; }
  .hero__copy > :nth-child(2) { animation-delay: .35s; }
  .hero__copy > :nth-child(3) { animation-delay: .47s; }
  .hero__copy > :nth-child(4) { animation-delay: .59s; }
  .hero__bg { animation: shutter 1.5s var(--ease) both; }
  @keyframes shutter { from { clip-path: inset(0 0 0 100%); } }
  .hero__bg img { animation: hero-photo 1.8s var(--ease) backwards; }

  /* ── Ogni sezione entra a modo suo ──
   * :where() azzera il peso dei selettori di sezione: così lo stato finale
   * (.is-in) vince sempre su quello iniziale. */

  /* Vantaggi: titolo che sale dalla riga (il modo base), colonne da sinistra */
  .js :where(#vantaggi .benefits) > .reveal { translate: -56px 0; }
  .js :where([dir="rtl"] #vantaggi .benefits) > .reveal { translate: 56px 0; }

  /* Per chi: titolo che esce dalla sfocatura, pannelli che si aprono di lato */
  .js :where(#target) .split .w > span { transform: none; opacity: 0; filter: blur(12px); transition-delay: calc(var(--w, 0) * 70ms + 100ms); }
  .js :where(#target .targets) > .reveal {
    opacity: 1; translate: none; clip-path: inset(0 100% 0 0);
    transition: clip-path 1.1s var(--ease), background .4s var(--ease);
    transition-delay: calc(var(--i, 0) * var(--step, 110ms)), 0s;
  }
  .js :where([dir="rtl"] #target .targets) > .reveal { clip-path: inset(0 0 0 100%); }
  .js :where(#target .targets) > .reveal.is-in { clip-path: inset(-24px); }

  /* Applicazioni: parole che si raddrizzano salendo, voci che arrivano da destra a fuoco */
  .js :where(#applicazioni) .split .w > span { transform: translateY(112%) rotate(7deg); transform-origin: left bottom; }
  .js :where(#applicazioni .apps) > .reveal { translate: 48px 0; filter: blur(6px); }
  .js :where([dir="rtl"] #applicazioni .apps) > .reveal { translate: -48px 0; }
  .js :where(#applicazioni .apps) > .reveal.is-in { filter: none; }
  .js .apps li.reveal {
    transition: opacity .9s var(--ease), translate .9s var(--ease), filter .9s var(--ease), transform .45s var(--ease), color .3s;
    transition-delay: calc(var(--i, 0) * var(--step, 110ms)), calc(var(--i, 0) * var(--step, 110ms)), calc(var(--i, 0) * var(--step, 110ms)), 0s, 0s;
  }

  /* Prodotto: parole che scendono dall'alto, foto che si scoprono dal basso */
  .js :where(#prodotto) .split .w > span { transform: translateY(-112%); }

  /* PSI: parole che scorrono di lato, modalità che spuntano, scheda che si srotola */
  .js :where(#psi) .split .w > span { transform: translateX(-105%); transition-delay: calc(var(--w, 0) * 110ms + 120ms); }
  .js :where([dir="rtl"] #psi) .split .w > span { transform: translateX(105%); }
  .js :where(#psi .modes) > .reveal { translate: none; scale: .7; transition: opacity .5s var(--ease), scale .7s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 500ms); }
  .js :where(#psi .modes) > .reveal.is-in { scale: none; }
  .js :where(#psi .fair__card).reveal { opacity: 1; clip-path: inset(0 0 100% 0); transition: clip-path 1.3s var(--ease); }
  .js :where(#psi .fair__card).reveal.is-in { clip-path: inset(0); }

  /* Termin: titolo battuto parola per parola, campi del modulo uno dopo l'altro */
  .js :where(#appuntamento) .split .w > span { transform: none; opacity: 0; transition: opacity .25s linear; transition-delay: calc(var(--w, 0) * 160ms + 150ms); }
  .js :where(#appuntamento .lead-form).reveal { translate: 0 80px; }
  .js .lead-form .fields > * { opacity: 0; translate: 0 18px; transition: opacity .6s var(--ease), translate .7s var(--ease); transition-delay: calc(var(--f, 0) * 55ms + 350ms); }
  .js .lead-form.is-in .fields > * { opacity: 1; translate: none; }

  /* FAQ: parole e domande che arrivano da destra */
  .js :where(#faq) .split .w > span { transform: translateX(105%); }
  .js :where([dir="rtl"] #faq) .split .w > span { transform: translateX(-105%); }
  .js :where(#faq .faq) > .reveal { translate: 64px 0; }
  .js :where([dir="rtl"] #faq .faq) > .reveal { translate: -64px 0; }

  /* Chi siamo: parole che crescono, pannelli che si ribaltano in avanti */
  .js :where(#chi-siamo) .split .w > span { transform: scale(.5); transform-origin: 50% 100%; opacity: 0; }
  #chi-siamo .about { perspective: 1400px; }
  .js :where(#chi-siamo .about) > .reveal { translate: none; rotate: x 24deg; transform-origin: 50% 0; transition: opacity 1s var(--ease), rotate 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 160ms); }
  .js :where(#chi-siamo .about) > .reveal.is-in { rotate: none; }

  /* galleria: ogni foto si scopre dal basso */
  .js .gallery > .reveal {
    opacity: 1; translate: none; clip-path: inset(100% 0 0 0);
    transition: clip-path 1.2s var(--ease);
    transition-delay: calc(var(--i, 0) * var(--step, 110ms));
  }
  .js .gallery > .reveal.is-in { clip-path: inset(0); }

  /* applicazioni: la voce indicata si sposta e prende l'oro */
  @media (hover: hover) {
    .apps li:hover { color: var(--gold-soft); transform: translateX(10px); }
    [dir="rtl"] .apps li:hover { transform: translateX(-10px); }
    .target:hover .link-arrow::after { transform: translateX(5px); }
    [dir="rtl"] .target:hover .link-arrow::after { transform: translateX(-5px); }
  }

  /* FAQ: la risposta scende morbida all'apertura */
  .faq details[open] p { animation: faq-open .55s var(--ease) both; }
  @keyframes faq-open { from { opacity: 0; translate: 0 -10px; } }
  @keyframes hero-in { from { opacity: 0; translate: 0 26px; } }
  @keyframes hero-photo { from { opacity: 0; scale: 1.06; } }

  /* effetti legati allo scroll: solo decorativi, nessun ripiego dove mancano */
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    /* parallasse: la foto dell'hero scorre più lenta della pagina
       (solo nel layout a tutto schermo; sotto i 1200px la foto sta sopra il testo) */
    @media (min-width: 1200px) {
      .hero__bg img {
        animation: hero-photo 1.8s var(--ease) backwards, hero-parallax linear both;
        animation-timeline: auto, scroll(root);
        animation-range: normal, 0 100vh;
      }
    }
    @keyframes hero-parallax { to { translate: 0 14%; } }

    /* le foto della galleria si "assestano" mentre entrano */
    .gallery img {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    @keyframes settle { from { scale: 1.18; } }

    /* la scheda dello stand sale piano rispetto al testo */
    .fair__card {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    @keyframes drift { from { translate: 0 40px; } to { translate: 0 -40px; } }

    /* avanzamento della lettura: barra oro sotto l'header */
    .header::after {
      content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
      background: var(--gold-soft); transform-origin: left center;
      animation: progress linear both; animation-timeline: scroll(root);
    }
    [dir="rtl"] .header::after { transform-origin: right center; }
    @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}

/* ── Pagine semplici (grazie, note legali) ── */
.simple { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: 104px; }
.simple .lead { margin: 24px auto 34px; }
.legal { max-width: 820px; }
.legal h1 { font-size: var(--step-head); margin-bottom: 24px; }
.legal h2 { font-size: var(--step-lead); line-height: 1.2; margin: 48px 0 14px; }
.legal p { color: var(--muted); margin-bottom: 12px; }
.todo { background: var(--linen); padding: 2px 6px; font-size: .9em; }

/* ── Selettore lingua ── */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--surface);
  font-size: var(--step-small); font-weight: 500; color: var(--ink);
  transition: background .25s;
}
.lang summary:hover { background: var(--stone); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  margin: 0; padding: 8px; list-style: none; min-width: 190px;
  background: var(--ink); color: var(--on-dark);
}
.lang a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; text-decoration: none; font-size: var(--step-small); color: var(--on-dark); }
.lang a:hover { background: var(--night-soft); }
.lang a[aria-current] { color: var(--gold-soft); }
.lang a span { color: var(--on-dark-soft); font-size: var(--step-small); }
.lang a b { font-weight: 500; flex: 1; }
@media (max-width: 520px) { .lang summary { padding: 0 12px; } }
@media (max-width: 400px) { .header__inner { gap: 10px; } .nav { gap: 8px; } .nav .btn { padding: 0 14px; } }

/* ── Pagine legali ── */
.legal h3 { font-size: var(--step-body); font-weight: 500; margin: 28px 0 8px; }
.legal ul { color: var(--muted); padding-inline-start: 20px; margin: 0 0 12px; }
.legal li { margin-bottom: 6px; }
.legal .note { font-size: var(--step-small); color: var(--muted); background: var(--surface); padding: 16px 20px; margin: 20px 0; }
.legal address { font-style: normal; color: var(--muted); margin-bottom: 12px; }

/* ── Arabo: caratteri di sistema (i font del marchio non hanno l'arabo) ── */
:lang(ar) {
  --font-display: "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, serif;
  --font: "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(ar) .fair__card .stand { letter-spacing: 0; }
:lang(ar) h1, :lang(ar) h2 { line-height: 1.25; }

/* ── Parole lunghe (composti tedeschi: "Ausstellungsdokumentationen") ──
 * Sillabazione secondo la lingua della pagina (<html lang>) e colonne di
 * griglia che non si allargano oltre lo schermo per colpa di una parola.
 * Niente sillabazione nei titoli: "Fir-men-" spezzato in un H1 si nota troppo. */
.apps li, .faq summary, .target p, .benefit p, .chip span { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.hero__grid > *, .apps-grid > *, .fair > *, .form-grid > *, .faq-grid > *, .targets > *, .about > * { min-width: 0; }
@media (max-width: 640px) { .apps { columns: 1; } }
.nav .btn { white-space: nowrap; }

/* ── Bandierine del selettore lingua ──
 * SVG e non emoji: su Windows le emoji-bandiera non esistono (si vedono due lettere).
 * L'arabo ha un globo: è lingua di oltre venti paesi, nessuna bandiera lo rappresenta. */
.flag { width: 21px; height: 14px; flex: none; object-fit: cover; border-radius: 2px; }

/* ── Logo RECORDIA distributed by FPF AGENCY ──
 * Nell'header il logo ufficiale intero, verticale (logo-recordia-fpf.png).
 * L'altezza è legata a quella dell'header, così non può mai uscirne.
 * Il logo è pensato per fondi chiari: non usarlo sulle sezioni scure. */
.brand { flex: none; display: flex; align-items: center; height: 100%; text-decoration: none; }
.brand__logo { height: calc(var(--header-h) - 14px); max-height: 74px; width: auto; max-width: 30vw; object-fit: contain; }
@media (max-width: 640px) { :root { --header-h: 68px; } }

/* ── Header stretto ──
 * Sotto i 480px il CTA dell'header lascia spazio: ci sono quello dell'hero e
 * la barra fissa in basso. Il selettore lingua mostra solo la bandierina. */
@media (max-width: 480px) {
  .nav > .btn { display: none; }
  .lang summary { font-size: 0; gap: 6px; }
}
