/* /assets/css/public.css */
/* Hallmark · shape: Workbench · genre: playful · theme: brand (Festa in corso, palette e caratteri di app.css)
 * paper: oklch(97.7% 0.017 70) · accent: oklch(60% 0.2 2) · display: Jakarta 800 · body: Inter · hero: Stage · nav: slab · footer: index columns · signature: il telefono dell'invitato sopra il Live Wall che alimenta
 * axes: light/geometric-sans/chromatic-pink · posture: palette del marchio, fasce blu notte per le frasi forti · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, la home parla a tre pubblici; una promessa in apertura, le tre porte subito sotto */
/* Hallmark · waive 26b · nessun controllo delle pagine pubbliche viene mai disabilitato · pagine di vendita con link, schede e un campo di prova */
/* Hallmark · waive 47b · the phone frame holds the real guest-page animation (home-anim), it is the product shown on its device · the frame is the brand's own mockup from the old home */
/* Hallmark · answered F4: la scheda selezionata è uno stato, non un secondo pulsante principale; F7: le pillole sono i controlli del marchio; 42: colonne nel piede perché è l'indice delle pagine per occasione */

/* Pagine pubbliche di vendita (home, professionisti, locali, pagine per occasione, pagine legali) nel layout layouts/marketing.
   Si carica dopo app.css e tocca solo elementi dentro body.pub e classi che iniziano con p-: gestione, pagine
   degli invitati, admin e demo restano come sono. Nessuno stile in linea (CSP style-src 'self').
   Larghezze progettate: telefono (fino a 47,99rem), tablet (48–71,99rem), computer (da 72rem), con il contenuto
   limitato a 1312px: oltre crescono solo i margini. */

:root {
  /* Colori: dal marchio (app.css) più le tinte che servono solo qui */
  --p-paper: var(--panna, #FFF6EC);
  --p-paper-2: #FDEBDD;
  --p-paper-3: #F6DCC8;
  --p-card: #FFFDF9;
  --p-ink: var(--notte, #14345F);
  --p-ink-2: #2A4A75;
  --p-muted: #52657F;
  --p-rule: #E6D3BF;
  --p-rule-ink: rgb(20 52 95 / 0.14);
  --p-accent: var(--lampone, #E2366F);
  --p-accent-strong: #C92A5E;
  --p-accent-deep: #A91F4D;
  --p-on-accent: #FFFDF9;
  --p-apricot: var(--albicocca, #FFB547);
  --p-blue: var(--blu, #1877F2);
  --p-night: var(--notte, #14345F);
  --p-night-2: #1C4275;
  --p-on-night: #FFF6EC;
  --p-on-night-muted: #B9C6DA;
  --p-ok: #1F7A4D;
  --p-ok-bg: #E3F3EA;
  --p-wait: #8A5A00;
  --p-wait-bg: #FFF0D2;
  --p-wall: #0D1420;
  --p-wall-ink: #F5F3FF;
  --p-scrim: rgb(10 22 40 / 0.62);
  --p-wall-shadow: rgb(0 0 0 / 0.35);
  --p-shadow: rgb(20 52 95 / 0.18);
  --p-focus: var(--blu, #1877F2);
  --p-tint-2: #A8442A;
  --p-tint-3: #0B7479;
  --p-tint-4: #10241C;

  /* Caratteri (definiti in app.css) */
  --p-display: var(--display, "Jakarta", "Inter", system-ui, sans-serif);
  --p-body: var(--font, "Inter", system-ui, sans-serif);

  /* Scala dei testi */
  --p-t-sm: 0.875rem;
  --p-t-md: 1rem;
  --p-t-lg: 1.125rem;
  --p-t-xl: 1.5rem;
  --p-t-2xl: 1.875rem;
  --p-t-3xl: 2.375rem;
  --p-t-lead: clamp(1.0625rem, 0.4vw + 0.95rem, 1.3125rem);
  --p-t-section: clamp(1.875rem, 2.4vw + 1rem, 3.25rem);
  --p-t-hero: clamp(2.375rem, 3.6vw + 1rem, 4.375rem);
  --p-t-statement: clamp(1.75rem, 2.6vw + 0.9rem, 3.25rem);

  /* Spazi (multipli di 4) */
  --p-s-2xs: 4px;
  --p-s-xs: 8px;
  --p-s-sm: 12px;
  --p-s-md: 16px;
  --p-s-lg: 24px;
  --p-s-xl: 40px;
  --p-s-2xl: 64px;
  --p-s-3xl: 96px;
  --p-section: 120px;
  --p-section-l: 144px;
  --p-gutter: 64px;
  --p-gap: 32px;
  --p-max: 1440px;

  --p-r-card: 20px;
  --p-r-inner: 12px;
  --p-r-pill: 999px;
  --p-shadow-card: 0 20px 44px -18px var(--p-shadow), 0 2px 6px var(--p-shadow);
  --p-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --p-fast: 120ms;
  --p-mid: 220ms;
  --p-slow: 420ms;
  --p-nav-h: 72px;
}
@media (max-width: 71.99rem) { :root { --p-gutter: 40px; --p-section: 96px; --p-section-l: 112px; --p-gap: 24px; --p-nav-h: 64px; } }
@media (max-width: 47.99rem) { :root { --p-gutter: 20px; --p-section: 64px; --p-section-l: 80px; --p-gap: 16px; } }

/* ---------- Base dentro le pagine pubbliche ---------- */
html:has(body.pub) { overflow-x: clip; scroll-padding-top: calc(var(--p-nav-h) + var(--p-s-md)); }
body.pub { overflow-x: clip; background: var(--p-paper); color: var(--p-ink); font-family: var(--p-body); font-size: var(--p-t-md); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.pub h1, .pub h2, .pub h3 { font-family: var(--p-display); color: var(--p-ink); font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
.pub h3 { font-weight: 700; letter-spacing: -0.015em; }
.pub p { text-wrap: pretty; }
.pub img { max-width: 100%; height: auto; }
.pub :focus-visible { outline: 3px solid var(--p-focus); outline-offset: 2px; }
.pub ::selection { background: var(--p-paper-3); color: var(--p-ink); }
.p-wrap {
  width: 100%;
  max-width: var(--p-max);
  margin-inline: auto;
  padding-left: max(var(--p-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--p-gutter), env(safe-area-inset-right, 0px));
}
.p-sample { font-size: var(--p-t-sm); color: var(--p-muted); }

/* ---------- Testata: una fascia piena ---------- */
.p-nav {
  position: sticky; top: 0; z-index: 30;
  background: var(--p-paper-2);
  border-bottom: 3px solid var(--p-ink);
}
.p-nav-in { display: flex; align-items: center; justify-content: space-between; gap: var(--p-s-md); min-height: var(--p-nav-h); }
.p-nav .logo { flex: none; }
.p-links { display: flex; align-items: center; gap: var(--p-s-2xs); }
.p-links > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--p-s-md); border-radius: var(--p-r-pill); color: var(--p-ink); font-weight: 500; text-decoration: none; transition: background-color var(--p-fast) var(--p-ease); }
.p-links > a:hover { background: var(--p-paper-3); color: var(--p-ink); }
.p-links > a[aria-current="page"] { background: var(--p-card); box-shadow: inset 0 0 0 1px var(--p-rule-ink); }
.p-nav-end { display: flex; align-items: center; gap: var(--p-s-sm); }
.p-nav-end .lang-switch { margin: 0 var(--p-s-2xs); }
.p-login { color: var(--p-ink); font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 var(--p-s-xs); border-radius: var(--p-r-inner); }
.p-login:hover { color: var(--p-accent-deep); text-decoration: underline; text-underline-offset: 0.2em; }
.p-only-wide { display: inline-flex; }
.p-only-narrow { display: none; }

.p-burger { position: relative; }
.p-burger > summary { list-style: none; display: inline-flex; align-items: center; gap: var(--p-s-xs); min-height: 44px; padding: 0 var(--p-s-md); border-radius: var(--p-r-pill); box-shadow: inset 0 0 0 2px var(--p-ink); font-weight: 600; cursor: pointer; transition: background-color var(--p-fast) var(--p-ease); }
.p-burger > summary::-webkit-details-marker { display: none; }
.p-burger > summary:hover { background: var(--p-card); }
.p-burger-ico { width: 18px; height: 12px; display: grid; align-content: space-between; }
.p-burger-ico i { display: block; height: 2px; border-radius: 2px; background: var(--p-ink); transition: transform var(--p-mid) var(--p-ease), opacity var(--p-mid) var(--p-ease); }
.p-burger[open] .p-burger-ico i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.p-burger[open] .p-burger-ico i:nth-child(2) { opacity: 0; }
.p-burger[open] .p-burger-ico i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.p-burger-panel {
  position: fixed; left: max(var(--p-s-md), env(safe-area-inset-left, 0px)); right: max(var(--p-s-md), env(safe-area-inset-right, 0px)); top: calc(var(--p-nav-h) + var(--p-s-xs));
  max-width: 360px; margin-left: auto;
  max-height: calc(100dvh - var(--p-nav-h) - var(--p-s-lg)); overflow-y: auto;
  background: var(--p-card); border-radius: var(--p-r-card); box-shadow: var(--p-shadow-card);
  padding: var(--p-s-sm); display: grid; gap: var(--p-s-2xs);
}
.p-burger-panel > a { display: flex; align-items: center; min-height: 48px; padding: 0 var(--p-s-md); border-radius: var(--p-r-inner); color: var(--p-ink); font-weight: 600; text-decoration: none; }
.p-burger-panel > a:hover { background: var(--p-paper-2); color: var(--p-ink); }
.p-burger-panel > a[aria-current="page"] { background: var(--p-paper-2); }
.p-burger-sub { padding: var(--p-s-sm) var(--p-s-md) var(--p-s-2xs); font-size: var(--p-t-sm); color: var(--p-muted); }
.p-burger-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--p-s-2xs); }
.p-burger-types a { display: flex; align-items: center; min-height: 44px; padding: var(--p-s-xs) var(--p-s-md); border-radius: var(--p-r-inner); color: var(--p-ink-2); text-decoration: none; font-size: var(--p-t-sm); line-height: 1.3; }
.p-burger-types a:hover { background: var(--p-paper-2); color: var(--p-ink); }
.p-burger-foot { display: grid; gap: var(--p-s-xs); padding: var(--p-s-sm) var(--p-s-2xs) var(--p-s-2xs); border-top: 1px solid var(--p-rule); margin-top: var(--p-s-xs); }
.p-burger-foot .lang-switch { justify-self: start; padding: var(--p-s-2xs) var(--p-s-sm); }

@media (max-width: 71.99rem) {
  .p-links, .p-only-wide { display: none; }
  .p-only-narrow { display: inline-flex; }
}
@media (max-width: 26rem) {
  .p-nav .logo-word { font-size: 19px; }
  .p-nav .logo svg { width: 30px; height: 30px; }
  .p-nav-end { gap: var(--p-s-xs); }
  .p-nav-end .p-btn-sm { padding: 0 var(--p-s-sm); }
  .p-burger > summary { padding: 0 var(--p-s-sm); }
  .p-burger-label { display: none; }
}

/* ---------- Pulsanti e link ---------- */
.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--p-s-xs);
  min-height: 52px; padding: 0 var(--p-s-lg); border: 0; border-radius: var(--p-r-pill);
  font-family: var(--p-body); font-weight: 600; font-size: 1.0625rem; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--p-fast) var(--p-ease), transform var(--p-fast) var(--p-ease), box-shadow var(--p-fast) var(--p-ease);
}
.p-btn:active { transform: translateY(1px); }
.p-btn svg { width: 18px; height: 18px; flex: none; }
.p-btn-primary { background: var(--p-accent-strong); color: var(--p-on-accent); }
.p-btn-primary:hover { background: var(--p-accent-deep); color: var(--p-on-accent); }
.p-btn-line { background: transparent; color: var(--p-ink); box-shadow: inset 0 0 0 2px var(--p-ink); }
.p-btn-line:hover { background: var(--p-card); color: var(--p-ink); }
.p-btn-night { background: var(--p-ink); color: var(--p-on-night); }
.p-btn-night:hover { background: var(--p-night-2); color: var(--p-on-night); }
.p-btn-sm { min-height: 44px; padding: 0 var(--p-s-md); font-size: 1rem; }
.p-btn-block { width: 100%; }
.p-link {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--p-ink); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--p-accent); text-decoration-thickness: 2px; text-underline-offset: 0.22em;
  border-radius: 4px; transition: color var(--p-fast) var(--p-ease);
}
.p-link:hover { color: var(--p-accent-deep); }
.p-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--p-s-sm) var(--p-s-lg); }
.p-inline a { color: var(--p-ink); font-weight: 600; text-decoration-color: var(--p-accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.p-inline a:hover { color: var(--p-accent-deep); }

/* ---------- Apertura (Stage) ---------- */
.p-hero { padding-block: var(--p-s-3xl) var(--p-section); }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--p-s-3xl); align-items: center; }
.p-hero h1 { font-size: var(--p-t-hero); line-height: 1.02; max-width: 13ch; }
.p-hero-long h1 { font-size: clamp(2rem, 2.6vw + 0.9rem, 3.5rem); max-width: 18ch; }
.p-hero-lead { margin-top: var(--p-s-lg); font-size: var(--p-t-lead); line-height: 1.45; color: var(--p-ink-2); max-width: 34ch; }
.p-hero .p-actions { margin-top: var(--p-s-xl); }
.p-hero-note { margin-top: var(--p-s-lg); font-size: var(--p-t-sm); color: var(--p-muted); max-width: 44ch; }

.p-screen { border-radius: var(--p-r-card); overflow: hidden; box-shadow: var(--p-shadow-card); background: var(--p-night); aspect-ratio: 16 / 9; }
.p-screen video, .p-screen > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-screen .wa { width: 100%; height: 100%; }
.p-phone { position: absolute; left: 0; bottom: 0; width: 28%; border-radius: 24px; overflow: hidden; box-shadow: var(--p-shadow-card); outline: 6px solid var(--p-card); background: var(--p-card); }
.p-phone img { width: 100%; height: auto; aspect-ratio: 484 / 760; object-fit: cover; object-position: top; }
.p-phone-tall img { aspect-ratio: 1 / 2; }

/* Animazioni dell'apertura (pro-anim, venue-anim: riquadro 1000 x 900 che si adatta alla larghezza) */
.p-anim { width: 100%; max-width: 640px; justify-self: center; }
.p-anim .pa, .p-anim .la { border-radius: var(--p-r-card); }

/* Home: il telefono dell'invitato animato (home-anim, schermo 390 x 822), con due stampe dietro */
.p-phone-hero { position: relative; justify-self: center; width: 100%; max-width: 560px; height: 600px; }
.p-phone-frame { position: absolute; left: calc(50% - 142px); top: 0; width: 284px; aspect-ratio: 390 / 822; padding: var(--p-s-sm); border-radius: 44px; background: var(--p-night); box-shadow: var(--p-shadow-card); z-index: 2; }
.p-phone-frame .ha { border-radius: 34px; }
.p-phone-card { position: absolute; top: 96px; width: 230px; padding: var(--p-s-sm) var(--p-s-sm) var(--p-s-xl); background: var(--p-card); border-radius: var(--p-r-card); box-shadow: var(--p-shadow-card); }
.p-phone-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--p-r-inner); }
.p-phone-card-1 { left: 0; transform: rotate(-9deg); }
.p-phone-card-2 { right: 0; top: 150px; transform: rotate(8deg); }

/* Home: il Live Wall animato. Orizzontale; sotto i 640px home-anim disegna la versione verticale (1080 x 1920) */
.p-wall-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--p-r-card); overflow: hidden; background: var(--p-wall); box-shadow: 0 24px 60px var(--p-wall-shadow); }
.p-wall-points { list-style: none; margin: var(--p-s-xl) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--p-gap); }
.p-wall-points li { padding-top: var(--p-s-md); border-top: 1px solid var(--p-night-2); color: var(--p-on-night-muted); }
.p-wall-points strong { color: var(--p-on-night); font-weight: 600; }
@media (max-width: 640px) {
  .p-wall-frame { aspect-ratio: 9 / 16; width: min(100%, calc((100dvh - var(--p-nav-h) - 48px) * 9 / 16)); margin-inline: auto; }
}

/* ---------- Sezioni ---------- */
.p-sec { padding-block: var(--p-section); }
.p-sec-l { padding-block: var(--p-section-l); }
.p-band { background: var(--p-paper-2); }
.p-night { background: var(--p-night); color: var(--p-on-night); }
.p-night h2, .p-night h3 { color: var(--p-on-night); }
.p-night .p-head p { color: var(--p-on-night-muted); }
.p-head { display: grid; gap: var(--p-s-md); margin-bottom: var(--p-s-2xl); max-width: 46rem; }
.p-head h2 { font-size: var(--p-t-section); line-height: 1.06; }
.p-head p { font-size: var(--p-t-lead); line-height: 1.45; color: var(--p-ink-2); }
.p-head p a { color: var(--p-ink); font-weight: 600; text-decoration-color: var(--p-accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

/* Tre porte */
.p-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--p-gap); }
.p-door { display: grid; grid-template-rows: auto auto 1fr auto auto; gap: var(--p-s-sm); align-content: start; color: inherit; text-decoration: none; border-radius: var(--p-r-card); }
.p-door:hover { color: inherit; }
.p-door-img { margin: 0 0 var(--p-s-xs); border-radius: var(--p-r-card); overflow: hidden; aspect-ratio: 4 / 5; outline: 1px solid var(--p-rule-ink); outline-offset: -1px; }
.p-door-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--p-slow) var(--p-ease); }
.p-door:hover .p-door-img img { transform: scale(1.03); }
.p-door h3 { font-size: var(--p-t-xl); }
.p-door p { color: var(--p-ink-2); }
.p-door-price { font-family: var(--p-display); font-weight: 800; font-size: var(--p-t-lg); color: var(--p-accent-deep); }
/* «Vedi le offerte» / «Scopri l'offerta»: aspetto da bottone (bordo come .p-btn-line); la scheda intera resta il link */
.p-door-go {
  display: inline-flex; align-items: center; justify-content: center; justify-self: start;
  min-height: 48px; padding: 0 var(--p-s-lg); border-radius: var(--p-r-pill);
  box-shadow: inset 0 0 0 2px var(--p-ink); color: var(--p-ink);
  font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color var(--p-fast) var(--p-ease), color var(--p-fast) var(--p-ease);
}
.p-door:hover .p-door-go { background: var(--p-ink); color: var(--p-on-night); }
.p-pos-40 { object-position: 40% 50%; }
.p-pos-30 { object-position: 30% 50%; }
.p-pos-top { object-position: 50% 25%; }

/* Schede (switcher) */
.p-tabs { display: flex; gap: var(--p-s-2xs); margin-bottom: var(--p-s-xl); padding: var(--p-s-2xs); background: var(--p-paper-2); border-radius: var(--p-r-pill); width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.p-tabs::-webkit-scrollbar { display: none; }
.p-band .p-tabs { background: var(--p-paper-3); }
.p-tabs button { flex: none; min-height: 48px; padding: 0 var(--p-s-lg); border: 0; border-radius: var(--p-r-pill); background: transparent; color: var(--p-ink); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color var(--p-fast) var(--p-ease); }
.p-tabs button:hover { background: var(--p-paper-3); }
.p-tabs button[aria-selected="true"] { background: var(--p-ink); color: var(--p-on-night); }
.p-tabs button:active { transform: translateY(1px); }
.p-nojs .p-tabs { display: none; }
.p-nojs .p-panel + .p-panel { margin-top: var(--p-s-3xl); }
.p-panel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--p-s-3xl); align-items: center; }
.p-panel-copy h3 { font-size: var(--p-t-2xl); }
.p-panel-copy p { margin-top: var(--p-s-md); font-size: var(--p-t-lead); line-height: 1.45; color: var(--p-ink-2); }
.p-panel-copy .p-sample { margin-top: var(--p-s-md); font-size: var(--p-t-sm); }
.p-visual { min-height: 460px; display: grid; place-items: center; background: var(--p-paper-2); border-radius: var(--p-r-card); padding: var(--p-s-xl); }
.p-band .p-visual { background: var(--p-paper-3); }

/* Prodotto ricostruito (esempi) */
.p-ui { width: 100%; max-width: 440px; background: var(--p-card); border-radius: var(--p-r-card); box-shadow: var(--p-shadow-card); padding: var(--p-s-lg); display: grid; gap: var(--p-s-md); color: var(--p-ink); }
.p-ui-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--p-s-md); }
.p-ui-head strong { font-family: var(--p-display); font-size: var(--p-t-lg); }
.p-ui-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--p-s-md); align-items: center; padding-top: var(--p-s-md); border-top: 1px solid var(--p-rule); }
.p-ui-row img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--p-r-inner); }
.p-ui-row.p-ui-row-text { grid-template-columns: minmax(0, 1fr) auto; }
.p-ui-who { display: block; font-weight: 600; }
.p-ui-when { display: block; font-size: var(--p-t-sm); color: var(--p-muted); }
.p-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--p-s-sm); border-radius: var(--p-r-pill); font-size: var(--p-t-sm); font-weight: 600; white-space: nowrap; }
.p-chip-ok { background: var(--p-ok-bg); color: var(--p-ok); }
.p-chip-wait { background: var(--p-wait-bg); color: var(--p-wait); }
.p-chip-off { background: var(--p-paper-2); color: var(--p-muted); }
.p-ui-msg { font-size: 1.0625rem; line-height: 1.5; }
.p-voice { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--p-s-md); align-items: center; background: var(--p-paper); border-radius: var(--p-r-inner); padding: var(--p-s-sm); }
.p-voice-play { width: 48px; height: 48px; border-radius: var(--p-r-pill); background: var(--p-accent-strong); display: grid; place-items: center; }
.p-voice-play svg { width: 18px; height: 18px; fill: var(--p-on-accent); }
.p-wave { display: flex; align-items: center; gap: var(--p-s-2xs); height: 36px; }
.p-wave i { flex: 1; height: 50%; background: var(--p-ink-2); border-radius: 2px; opacity: 0.55; }
.p-wave i:nth-child(3n+1) { height: 30%; }
.p-wave i:nth-child(4n+2) { height: 80%; }
.p-wave i:nth-child(5n+3) { height: 95%; }
.p-wave i:nth-child(7n) { height: 40%; }
.p-file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--p-s-md); padding-top: var(--p-s-sm); border-top: 1px solid var(--p-rule); }
.p-file span:last-child { color: var(--p-muted); font-size: var(--p-t-sm); text-align: right; }


/* Frase forte */
.p-statement-big { font-family: var(--p-display); font-weight: 800; font-size: var(--p-t-statement); line-height: 1.08; letter-spacing: -0.03em; max-width: 24ch; text-wrap: balance; }
.p-statement-small { margin-top: var(--p-s-lg); font-size: var(--p-t-lead); line-height: 1.45; color: var(--p-on-night-muted); max-width: 52ch; }

/* Offerte */
.p-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--p-gap); align-items: stretch; }
.p-plan { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: var(--p-s-md); background: var(--p-card); border-radius: var(--p-r-card); padding: var(--p-s-xl); outline: 1px solid var(--p-rule-ink); outline-offset: -1px; }
.p-plan-lead { outline: 3px solid var(--p-accent); outline-offset: -3px; }
.p-plan h3 { font-size: var(--p-t-xl); }
.p-plan-price { font-family: var(--p-display); font-weight: 800; font-size: var(--p-t-3xl); letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.p-plan-price small { font-family: var(--p-body); font-weight: 500; font-size: var(--p-t-sm); letter-spacing: 0; color: var(--p-muted); }
.p-plan-for { color: var(--p-ink-2); }
.p-plan-for strong { color: var(--p-accent-deep); }
.p-plan-actions { display: grid; gap: var(--p-s-xs); }
.p-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--p-s-sm); align-content: start; }
.p-ticks li { position: relative; padding-left: var(--p-s-lg); }
.p-ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 10px; height: 6px; border-left: 2px solid var(--p-accent); border-bottom: 2px solid var(--p-accent); transform: rotate(-45deg); }
.p-note { margin-top: var(--p-s-xl); color: var(--p-muted); max-width: 72ch; }
.p-note a { color: var(--p-ink); font-weight: 600; text-decoration-color: var(--p-accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.p-note + .p-note { margin-top: var(--p-s-md); }

/* Tabelle */
.p-table-wrap { overflow-x: auto; }
.p-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.p-table th { text-align: left; font-size: var(--p-t-sm); font-weight: 600; color: var(--p-muted); padding: 0 var(--p-s-md) var(--p-s-sm); white-space: nowrap; }
.p-table td { padding: var(--p-s-lg) var(--p-s-md); border-top: 1px solid var(--p-rule); font-size: var(--p-t-lg); vertical-align: middle; }
.p-table td:first-child, .p-table th:first-child { padding-left: 0; }
.p-table td:last-child, .p-table th:last-child { padding-right: 0; }
.p-table .p-td-name, .p-table .p-td-big, .p-table th.p-th-col { font-variant-numeric: tabular-nums; }
.p-table .p-td-name { font-family: var(--p-display); font-weight: 800; font-size: var(--p-t-xl); }
.p-table .p-td-big { font-family: var(--p-display); font-weight: 800; font-size: var(--p-t-2xl); }
.p-table .p-td-tag { font-size: var(--p-t-sm); font-weight: 600; color: var(--p-accent-deep); }
.p-table .p-td-act { text-align: right; }
.p-table tr.p-row-lead .p-td-big { color: var(--p-accent-deep); }
.p-table th.p-th-col { font-family: var(--p-display); font-weight: 800; font-size: var(--p-t-xl); color: var(--p-ink); }
.p-compare td { font-size: var(--p-t-md); }
.p-compare td.p-td-big { font-size: var(--p-t-2xl); }

/* Righe (domande, elenchi) */
.p-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--p-s-3xl); align-items: start; }
.p-split .p-head { margin-bottom: 0; }
.p-rows { display: grid; margin: 0; }
.p-rows > div, .p-rows > details { border-top: 1px solid var(--p-rule); padding-block: var(--p-s-lg); }
.p-rows > div:last-child, .p-rows > details:last-child { border-bottom: 1px solid var(--p-rule); }
.p-rows dt, .p-rows summary { font-family: var(--p-display); font-weight: 700; font-size: var(--p-t-xl); line-height: 1.25; letter-spacing: -0.015em; color: var(--p-ink); }
.p-rows dd { margin: var(--p-s-xs) 0 0; color: var(--p-ink-2); max-width: 62ch; }
.p-rows summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--p-s-lg); min-height: 44px; border-radius: var(--p-r-inner); }
.p-rows summary::-webkit-details-marker { display: none; }
.p-rows summary::after { content: ""; width: 12px; height: 12px; flex: none; margin-right: var(--p-s-2xs); border-right: 2.5px solid var(--p-accent); border-bottom: 2.5px solid var(--p-accent); transform: rotate(45deg); transition: transform var(--p-mid) var(--p-ease); }
.p-rows details[open] summary::after { transform: rotate(-135deg); }
.p-rows details p { margin-top: var(--p-s-sm); color: var(--p-ink-2); max-width: 62ch; }
.p-rows details p a, .p-rows dd a { color: var(--p-ink); font-weight: 600; text-decoration-color: var(--p-accent); text-decoration-thickness: 2px; }
.p-night .p-rows > div { border-color: var(--p-night-2); }
.p-night .p-rows dt { color: var(--p-on-night); }
.p-night .p-rows dd { color: var(--p-on-night-muted); }
.p-rows-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--p-gap); }
.p-rows-2 > div:nth-last-child(2) { border-bottom: 1px solid var(--p-rule); }

/* Passi di un percorso vero */
.p-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--p-gap); counter-reset: p-step; }
.p-steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-steps li { counter-increment: p-step; display: grid; gap: var(--p-s-sm); align-content: start; padding-top: var(--p-s-lg); border-top: 3px solid var(--p-ink); }
.p-steps li::before { content: counter(p-step); font-family: var(--p-display); font-weight: 800; font-size: var(--p-t-3xl); line-height: 1; color: var(--p-accent); }
.p-steps h3 { font-size: var(--p-t-xl); }
.p-steps p { color: var(--p-ink-2); }

/* Chiusura */
.p-close { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--p-s-3xl); align-items: center; }
.p-close h2 { font-size: var(--p-t-section); line-height: 1.06; }
.p-close p { margin-top: var(--p-s-md); font-size: var(--p-t-lead); line-height: 1.45; color: var(--p-ink-2); max-width: 42ch; }
.p-close .p-actions { margin-top: var(--p-s-xl); }
.p-fan { position: relative; height: 380px; max-width: 100%; }
.p-fan figure { position: absolute; left: calc(50% - 110px); top: 0; width: 220px; margin: 0; padding: var(--p-s-sm) var(--p-s-sm) var(--p-s-xl); background: var(--p-card); border-radius: var(--p-r-card); box-shadow: var(--p-shadow-card); transform-origin: 50% 120%; }
.p-fan figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--p-r-inner); }
.p-fan .p-f1 { transform: rotate(-16deg); }
.p-fan .p-f2 { transform: rotate(14deg); }
.p-fan .p-f3 { transform: rotate(-2deg); z-index: 2; }

/* Indice delle occasioni */
.p-occasions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--p-gap); }
.p-occasions a { display: flex; align-items: center; justify-content: space-between; gap: var(--p-s-md); min-height: 72px; padding-block: var(--p-s-md); border-top: 1px solid var(--p-rule); color: var(--p-ink); text-decoration: none; font-family: var(--p-display); font-weight: 700; font-size: var(--p-t-xl); letter-spacing: -0.015em; transition: color var(--p-fast) var(--p-ease); }
.p-occasions a::after { content: ""; width: 10px; height: 10px; flex: none; margin-right: var(--p-s-2xs); border-top: 2.5px solid var(--p-accent); border-right: 2.5px solid var(--p-accent); transform: rotate(45deg); transition: transform var(--p-mid) var(--p-ease); }
.p-occasions a:hover { color: var(--p-accent-deep); }
.p-occasions a:hover::after { transform: translateX(3px) rotate(45deg); }

/* ---------- Professionisti: prova del marchio ---------- */
.p-tryout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 260px); gap: var(--p-s-xl); align-items: center; justify-content: center; }
.p-guest { --pro: var(--p-ink); width: 100%; background: var(--p-card); border-radius: 28px; box-shadow: var(--p-shadow-card); overflow: hidden; outline: 6px solid var(--p-card); }
.p-guest.c2 { --pro: var(--p-tint-2); }
.p-guest.c3 { --pro: var(--p-tint-3); }
.p-guest.c4 { --pro: var(--p-tint-4); }
.p-guest-top { display: flex; align-items: center; gap: var(--p-s-sm); padding: var(--p-s-md) var(--p-s-lg); background: var(--pro); color: var(--p-on-night); transition: background-color var(--p-mid) var(--p-ease); }
.p-guest-logo { width: 40px; height: 40px; border-radius: var(--p-r-pill); background: var(--p-on-night); color: var(--pro); display: grid; place-items: center; font-family: var(--p-display); font-weight: 800; flex: none; transition: color var(--p-mid) var(--p-ease); }
.p-guest-name { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.p-guest-cover { position: relative; aspect-ratio: 4 / 3; }
.p-guest-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.p-guest-cover p { position: absolute; inset: auto 0 0; padding: var(--p-s-xl) var(--p-s-lg) var(--p-s-md); background: linear-gradient(to top, var(--p-scrim), transparent); color: var(--p-on-night); font-family: var(--p-display); font-weight: 800; font-size: var(--p-t-xl); }
.p-guest-body { padding: var(--p-s-lg); display: grid; gap: var(--p-s-sm); }
.p-guest-btn { min-height: 48px; border-radius: var(--p-r-inner); display: grid; place-items: center; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--p-rule); }
.p-guest-btn-main { background: var(--pro); color: var(--p-on-night); box-shadow: none; transition: background-color var(--p-mid) var(--p-ease); }
.p-guest-foot { padding: 0 var(--p-s-lg) var(--p-s-lg); font-size: var(--p-t-sm); color: var(--p-muted); }
.p-try { display: grid; gap: var(--p-s-sm); }
.p-try label { font-weight: 600; }
.p-try input[type="text"] { min-height: 52px; padding: 0 var(--p-s-md); border-radius: var(--p-r-inner); border: 1.5px solid var(--p-ink-2); background: var(--p-card); color: var(--p-ink); font: inherit; font-size: 1rem; }
.p-try input[type="text"]:hover { border-color: var(--p-ink); }
.p-try input[type="text"]:focus-visible { outline: 3px solid var(--p-focus); outline-offset: -1px; }
.p-swatches { display: flex; gap: var(--p-s-sm); border: 0; padding: 0; margin: var(--p-s-xs) 0 0; }
.p-swatches legend { font-weight: 600; margin-bottom: var(--p-s-sm); padding: 0; }
.p-swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p-swatches label { width: 44px; height: 44px; border-radius: var(--p-r-pill); cursor: pointer; box-shadow: inset 0 0 0 3px var(--p-card); outline: 2px solid transparent; outline-offset: 1px; }
.p-swatches label:hover { outline-color: var(--p-rule-ink); }
.p-swatches input:checked + label { outline-color: var(--p-ink); }
.p-swatches input:focus-visible + label { outline: 3px solid var(--p-focus); }
.p-sw1 { background: var(--p-ink); }
.p-sw2 { background: var(--p-tint-2); }
.p-sw3 { background: var(--p-tint-3); }
.p-sw4 { background: var(--p-tint-4); }
.p-try-note { font-size: var(--p-t-sm); color: var(--p-muted); }
.p-dash { max-width: 520px; }

/* ---------- Locali: temi con le schermate vere ---------- */
.p-themes { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--p-s-2xl); align-items: center; }
.p-theme-shots { position: relative; padding: 0 0 12% 0; }
.p-theme-shots .p-screen { aspect-ratio: 16 / 9; }
.p-theme-shots .p-phone { left: auto; right: 4%; width: 26%; }
.p-theme-copy h3 { font-size: var(--p-t-2xl); }
.p-theme-copy p { margin-top: var(--p-s-sm); color: var(--p-ink-2); font-size: var(--p-t-lead); line-height: 1.45; }
.p-theme-card { display: block; margin-top: var(--p-s-lg); width: 160px; border-radius: var(--p-r-inner); overflow: hidden; box-shadow: var(--p-shadow-card); }
.p-theme-card img { width: 100%; height: auto; }
.p-theme-copy figcaption { margin-top: var(--p-s-xs); font-size: var(--p-t-sm); color: var(--p-muted); }
.p-theme-copy figure { margin: 0; }

/* Pagine per occasione: anteprima del sito d'esempio (markup da app.css e demo-sites.css, qui solo la scala) */
.p-example { display: flex; justify-content: center; }
.p-example .demo-prev-frame { --s: 0.95; }
.p-example .demo-prev-cap strong { font-size: var(--p-t-md); }
.p-tips { margin-top: var(--p-s-lg); }
.p-tips li { font-size: var(--p-t-lg); }
.p-plan-solo { grid-template-columns: minmax(0, 1fr) !important; }
.p-plan-solo > * { grid-column: 1 !important; grid-row: auto !important; }

/* Pagine legali dentro il nuovo layout */
.p-legal { padding-block: var(--p-s-2xl) var(--p-section); }

/* ---------- Piede ---------- */
.p-foot { background: var(--p-night); color: var(--p-on-night); padding-block: var(--p-s-3xl) var(--p-s-xl); }
.p-foot-grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.6fr)); gap: var(--p-gap); }
.p-foot .logo-word { font-size: 28px; }
.p-foot-blurb { margin-top: var(--p-s-md); color: var(--p-on-night-muted); max-width: 32ch; }
.p-foot h2 { font-family: var(--p-display); font-size: var(--p-t-md); font-weight: 700; letter-spacing: 0; color: var(--p-on-night); margin-bottom: var(--p-s-sm); }
.p-foot ul { list-style: none; margin: 0; padding: 0; display: grid; }
.p-foot a { color: var(--p-on-night-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; border-radius: 4px; transition: color var(--p-fast) var(--p-ease); }
.p-foot a:hover { color: var(--p-on-night); text-decoration: underline; }
.p-foot :focus-visible { outline-color: var(--p-apricot); }
.p-foot-share { margin-top: var(--p-s-2xl); }
.p-foot-share .share-site { padding: 0; }
.p-foot-share .share-site-in { max-width: none; margin: 0; }
.p-foot-legal { margin-top: var(--p-s-xl); padding-top: var(--p-s-lg); border-top: 1px solid var(--p-night-2); display: flex; flex-wrap: wrap; align-items: center; gap: var(--p-s-md); color: var(--p-on-night-muted); font-size: var(--p-t-sm); }

/* ---------- Tablet (48–71,99rem) ---------- */
@media (max-width: 71.99rem) {
  .p-hero { padding-block: var(--p-s-2xl) var(--p-section); }
  .p-hero-grid { gap: var(--p-s-xl); }
    .p-fan figure { width: 190px; left: calc(50% - 95px); }
  .p-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--p-s-xl); }
  .p-visual { min-height: 380px; padding: var(--p-s-lg); }
  .p-split { grid-template-columns: minmax(0, 1fr); gap: var(--p-s-xl); }
  .p-split .p-head { max-width: 40rem; }
  .p-close { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--p-s-xl); }
  .p-fan { height: 340px; }
  .p-themes { grid-template-columns: minmax(0, 1fr); gap: var(--p-s-xl); }
  .p-theme-copy { display: grid; grid-template-columns: minmax(0, 1fr) 160px; column-gap: var(--p-s-xl); align-items: start; }
  .p-theme-copy figure { grid-column: 2; grid-row: 1 / span 3; }
  .p-theme-card { margin-top: 0; }
  .p-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--p-s-xl); }
  .p-steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-example .demo-prev-frame { --s: 0.8; }
  .p-foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-foot-grid > :first-child { grid-column: 1 / -1; }

  /* Offerte e porte: una per riga, distese in larghezza */
  .p-plans { grid-template-columns: minmax(0, 1fr); }
  .p-plan { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto 1fr; column-gap: var(--p-s-xl); }
  .p-plan > h3, .p-plan > .p-plan-price, .p-plan > .p-plan-for { grid-column: 1; }
  .p-plan > .p-ticks { grid-column: 2; grid-row: 1 / span 3; }
  .p-plan > .p-plan-actions { grid-column: 1; grid-row: 4; justify-self: start; }
  .p-doors { grid-template-columns: minmax(0, 1fr); gap: var(--p-s-xl); }
  .p-door { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-rows: auto auto auto 1fr; column-gap: var(--p-s-xl); align-items: start; }
  .p-door-img { grid-row: 1 / span 5; aspect-ratio: 4 / 3; margin: 0; }
  .p-door > :not(.p-door-img) { grid-column: 2; }
}

/* ---------- Tablet verticale (fino a 59,99rem) ---------- */
@media (max-width: 59.99rem) {
  .p-wall-points { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .p-wall-points li { padding-block: var(--p-s-md); }
  .p-hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--p-s-2xl); }
  .p-hero h1 { max-width: 16ch; }
  .p-hero-lead { max-width: 46ch; }
          .p-panel { grid-template-columns: minmax(0, 1fr); gap: var(--p-s-lg); }
  .p-visual { min-height: 0; }
  .p-occasions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Telefono (fino a 47,99rem) ---------- */
@media (max-width: 47.99rem) {
  .p-phone-hero { height: 500px; }
  .p-phone-frame { width: 236px; left: calc(50% - 118px); padding: var(--p-s-xs); border-radius: 38px; }
  .p-phone-frame .ha { border-radius: 30px; }
  .p-phone-card { width: 150px; top: 80px; }
  .p-phone-card-2 { top: 130px; }
  .p-hero { padding-block: var(--p-s-xl) var(--p-section); }
  .p-hero .p-actions { margin-top: var(--p-s-lg); }
      .p-rows dt, .p-rows summary { font-size: 1.1875rem; }
  .p-head { margin-bottom: var(--p-s-xl); }
  .p-tabs { border-radius: var(--p-r-pill); margin-bottom: var(--p-s-lg); width: 100%; }
  .p-tabs button { padding: 0 var(--p-s-md); }
  .p-panel { grid-template-columns: minmax(0, 1fr); gap: var(--p-s-lg); }
  .p-visual { min-height: 0; padding: var(--p-s-md); }
  .p-ui { padding: var(--p-s-md); }
  .p-ui-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--p-s-sm); }
  .p-ui-row img { width: 52px; height: 52px; }
  .p-door { grid-template-columns: minmax(0, 1fr); }
  .p-door-img { grid-row: auto; aspect-ratio: 16 / 10; margin-bottom: var(--p-s-xs); }
  .p-door > :not(.p-door-img) { grid-column: 1; }
  .p-plan { grid-template-columns: minmax(0, 1fr); padding: var(--p-s-lg); }
  .p-plan > .p-ticks, .p-plan > .p-plan-actions { grid-column: 1; grid-row: auto; }
  .p-plan > .p-plan-actions { justify-self: stretch; }
  .p-plan-actions .p-btn { width: 100%; }
  .p-rows-2 { grid-template-columns: minmax(0, 1fr); }
  .p-rows-2 > div:nth-last-child(2) { border-bottom: 0; }
  .p-steps, .p-steps-3 { grid-template-columns: minmax(0, 1fr); row-gap: var(--p-s-lg); }
  .p-close { grid-template-columns: minmax(0, 1fr); }
  .p-fan { height: 300px; }
  .p-fan figure { width: 170px; left: calc(50% - 85px); }
  .p-fan .p-f1 { transform: rotate(-12deg); }
  .p-fan .p-f2 { transform: rotate(10deg); }
  .p-occasions { grid-template-columns: minmax(0, 1fr); }
  .p-occasions a { min-height: 60px; font-size: var(--p-t-lg); }
  .p-tryout { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .p-example .demo-prev-frame { --s: 0.72; }
  .p-guest, .p-try { max-width: 340px; width: 100%; }
  .p-theme-copy { grid-template-columns: minmax(0, 1fr) 112px; column-gap: var(--p-s-md); }
  .p-theme-copy figure { width: 112px; }
  .p-theme-card { width: 112px; }
  .p-table td { padding: var(--p-s-md) var(--p-s-sm); }
  .p-table .p-td-name { font-size: var(--p-t-lg); }
  .p-table .p-td-big { font-size: var(--p-t-xl); }
  .p-compare td.p-td-big { font-size: var(--p-t-xl); }
  .p-table th.p-th-col { font-size: var(--p-t-lg); }
  .p-table .p-td-act { display: none; }
  .p-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-foot-legal { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 26rem) {
  .p-hero h1 { font-size: 2.125rem; }
  .p-foot-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .pub *, .pub *::before, .pub *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
