/* =========================================================
   Pubby — sito pubblico
   Palette: marrone #301c1b · crema #ffecab · rosso insegna #ff3b5c
   Contrasti verificati (WCAG AA):
     crema su marrone      13,8:1   crema-soft su marrone 7,7:1
     marrone su crema      13,8:1   rosso su marrone       4,7:1
     marrone su rosso       4,7:1   rosso-cupo su crema    6,1:1
   Regola: il rosso pieno non ospita mai testo crema (2,9:1).
   ========================================================= */

/* ---------- font ---------- */
@font-face {
  font-family: 'Anton';
  src: url('../fonts/anton-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Anton';
  src: url('../fonts/anton-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- token ---------- */
:root {
  --brown: #301c1b;
  --brown-deep: #241312;
  --brown-soft: #3d2624;
  --cream: #ffecab;
  --cream-soft: rgba(255, 236, 171, 0.72);
  --cream-faint: rgba(255, 236, 171, 0.14);
  --red: #ff3b5c;
  --red-deep: #b01030;

  --wrap: 1120px;
  --gutter: 20px;
  --radius: 18px;
  --radius-lg: 26px;
  --pad-y: clamp(72px, 12vw, 136px);

  --display: 'Anton', 'Arial Narrow', 'Haettenschweiler', sans-serif;
  --text: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* l'intestazione e' appiccicata in alto ed e' alta 77px: senza questo
     margine il salto a un'ancora finisce proprio sotto di lei e il
     bersaglio resta coperto */
  scroll-padding-top: 100px;
}
body {
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--cream);
  background: var(--brown);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--cream); color: var(--brown);
  padding: 12px 18px; font-weight: 800; border-radius: 0 0 12px 0;
}
.skip:focus { left: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- impianto ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 760px) { :root { --gutter: 32px; } }

.section { padding-block: var(--pad-y); position: relative; }
.section--light { background: var(--cream); color: var(--brown); }
.section--deep { background: var(--brown-deep); }

/* grana */
.grain::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.28'/></svg>");
  mix-blend-mode: overlay;
}

/* ---------- tipografia ---------- */
.d1, .d2, .d3, .d4 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  /* ATTENZIONE: Anton disegna gli accenti maiuscoli molto sopra la cap-height.
     Con questa interlinea un È, un À o un Ù toccano la riga precedente, quindi
     i titoli display sono scritti senza accenti maiuscoli. Se in un titolo ti
     serve una parola accentata, aggiungi la classe .d--acc a quel titolo. */
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.d1 { font-size: clamp(3.4rem, 15.5vw, 8.5rem); }
/* il titolo della sezione finale sta piu' basso dell'hero: cosi' il titolo
   e i due badge entrano insieme anche in una finestra da 700px di altezza,
   che e' dove atterra chi clicca "Scarica l'app" nella barra */
.d1--cta { font-size: clamp(2.8rem, 11vw, 5rem); }
.d2 { font-size: clamp(2.6rem, 10vw, 5.2rem); }
.d3 { font-size: clamp(2rem, 6.6vw, 3.2rem); }
.d4 { font-size: clamp(1.4rem, 4.4vw, 1.9rem); line-height: 1; }
.d--acc { line-height: 1.14; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}
.section--light .eyebrow { color: var(--red-deep); }

.lead { font-size: clamp(1.0625rem, 2.6vw, 1.25rem); color: var(--cream-soft); max-width: 46ch; }
.section--light .lead { color: rgba(48, 28, 27, 0.78); }

.muted { color: var(--cream-soft); }
.section--light .muted { color: rgba(48, 28, 27, 0.72); }

.acc { color: var(--red); }
.section--light .acc { color: var(--red-deep); }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { flex: none; }

.btn--cream { background: var(--cream); color: var(--brown); }
.btn--cream:hover { background: #fff; }
.btn--red { background: var(--red); color: var(--brown); }
.btn--red:hover { background: #ff5872; }
.btn--dark { background: var(--brown); color: var(--cream); }
.btn--dark:hover { background: #422826; }
.btn--ghost { border: 1.5px solid var(--cream-faint); color: var(--cream); }
.btn--ghost:hover { border-color: var(--cream-soft); }
.section--light .btn--ghost { border-color: rgba(48, 28, 27, 0.25); color: var(--brown); }

/* badge ufficiali degli store: file originali, mai ricolorati o ritagliati */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.badge { display: inline-block; border-radius: 9px; transition: opacity 0.2s ease, transform 0.15s ease; }
.badge:hover { opacity: 0.86; transform: translateY(-2px); }
.badge img { display: block; width: auto; }
.badge--apple img { height: 46px; }
/* il PNG di Google ha 29/250 di margine trasparente sopra e sotto: lo tolgo
   dal box senza modificare il file, così i due badge risultano alti uguali */
.badge--google img { height: 60px; margin-block: -7px; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 90;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(36, 19, 18, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--cream-faint);
}
.header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }

.logo { display: block; flex: none; }
.logo img { width: 104px; height: auto; transition: opacity 0.2s ease; }
.logo:hover img { opacity: 0.8; }
.footer .logo img { width: 128px; }

.nav { display: none; gap: 30px; align-items: center; }
.nav a { font-size: 0.875rem; font-weight: 700; text-decoration: none; color: var(--cream-soft); }
.nav a:hover { color: var(--cream); }
.header__cta { display: none; }

.burger { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--cream-faint); }
.burger span { display: block; width: 18px; height: 2px; background: var(--cream); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.burger span + span { margin-top: 4px; }
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu {
  display: none;
  background: var(--brown-deep);
  border-bottom: 1px solid var(--cream-faint);
  padding: 8px var(--gutter) 28px;
}
.menu.is-open { display: block; }

@media (min-width: 900px) {
  .nav, .header__cta { display: flex; }
  .burger, .menu, .menu.is-open { display: none; }
}
.menu a { display: block; padding: 14px 0; font-family: var(--display); font-size: 1.75rem; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--cream-faint); }
.menu .btn { margin-top: 20px; width: 100%; }

/* ---------- hero ---------- */
/* niente bagliore colorato dietro all'hero: solo i due colori principali,
   con un alone di marrone appena piu' chiaro per dare profondita' */
body::before {
  content: '';
  /* resta dentro la larghezza della pagina: con left/right a -20% su
     telefono la pagina si allargava a ~470px e il browser la mostrava
     rimpicciolita. Centro e raggio sono ricalcolati sul riquadro piu'
     stretto (22% = 30% di 140% - 20%, 81% = 58% di 140%), l'alone e' lo stesso */
  position: absolute; top: 0; left: 0; right: 0; height: 720px;
  background: radial-gradient(81% 62% at 22% 20%, rgba(90, 58, 54, 0.55), transparent 72%);
  pointer-events: none; z-index: 0;
}
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 8vw, 88px) var(--pad-y); }
.hero__ghost {
  position: absolute; right: -6vw; bottom: -3vw; z-index: 0;
  font-family: var(--display); font-size: 26vw; line-height: 0.9;
  text-transform: uppercase; color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 236, 171, 0.07);
  pointer-events: none; user-select: none; white-space: nowrap;
}
@media (max-width: 759px) { .hero__ghost { display: none; } }
.hero__inner { position: relative; z-index: 1; }
.hero .d1 { margin-block: 18px 22px; }
.hero .lead { margin-bottom: 30px; }
.hero__note { margin-top: 16px; font-size: 0.875rem; color: var(--cream-soft); }

/* invito a un evento in collab, sopra al titolo dell'hero.
   Il gallo del Forli' Fest ha il contorno nero: sta su una piastrella crema */
.promo {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 26px; padding: 8px 18px 8px 8px;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 59, 92, 0.55);
  background: rgba(255, 59, 92, 0.1);
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.promo:hover { transform: translateY(-2px); background: rgba(255, 59, 92, 0.18); border-color: var(--red); }
.promo__tile { flex: none; display: grid; place-items: center; width: 46px; height: 46px; padding: 7px; border-radius: 12px; background: var(--cream); }
.promo__tile img { width: 100%; height: auto; }
.promo__txt { display: grid; gap: 2px; }
.promo__k { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); }
.promo__v { font-weight: 800; font-size: 1.0625rem; line-height: 1.2; }
/* senza logo: il pulsante porta a piu' eventi */
.promo--solo { padding: 11px 20px; }

/* ---------- blocchi ---------- */
.stack > * + * { margin-top: 20px; }
/* il titolo puo' allargarsi, il paragrafo resta leggibile grazie a .lead */
.head { max-width: 920px; }
.head .d2 { margin-block: 14px 18px; }

.grid { display: grid; gap: 28px; }
@media (min-width: 860px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); gap: 56px; align-items: center; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* lista problema */
.beats { display: grid; gap: 0; margin-top: 40px; border-top: 1px solid var(--cream-faint); }
.section--light .beats { border-color: rgba(48, 28, 27, 0.14); }
.beat { padding-block: 26px; border-bottom: 1px solid var(--cream-faint); }
.section--light .beat { border-color: rgba(48, 28, 27, 0.14); }
.beat p { font-size: clamp(1.25rem, 4.6vw, 1.9rem); font-weight: 500; line-height: 1.25; text-wrap: balance; }

/* passi */
.steps { counter-reset: s; display: grid; gap: 34px; margin-top: 46px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.step__n { font-family: var(--display); font-size: 3rem; line-height: 1; color: var(--red); }
.section--light .step__n { color: var(--red-deep); }
.step h3 { font-family: var(--display); text-transform: uppercase; font-size: 1.5rem; font-weight: 400; line-height: 1.05; margin-block: 12px 10px; }
.step p { color: var(--cream-soft); }
.step .figure { margin-top: 22px; max-width: 300px; margin-inline: 0; }
.step .shot {
  /* dentro ai passi mostro solo la parte alta della schermata: la sezione
     resta corta su telefono e il dettaglio si legge meglio */
  aspect-ratio: 4 / 5; object-fit: cover; object-position: top center;
}
.section--light .step p { color: rgba(48, 28, 27, 0.75); }

/* chip categorie */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px;
  border: 1.5px solid var(--cream-faint);
  font-size: 0.9375rem; font-weight: 700;
}
.section--light .chip { border-color: rgba(48, 28, 27, 0.2); }
.chip--on { background: var(--red); border-color: var(--red); color: var(--brown); }

/* screenshot */
.shot {
  /* le sorgenti sono larghe 640px: il riquadro le tiene a 320 CSS px,
     cosi' restano nitide su schermi 2x */
  width: 100%; height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 236, 171, 0.16);
  box-shadow: 0 34px 70px -28px rgba(0, 0, 0, 0.75);
  background: #0c0908;
}
.shot--sm { max-width: 260px; }
.figure { margin: 0; max-width: 320px; margin-inline: auto; }
.shots .figure { max-width: none; }
/* nelle sezioni a due colonne la schermata si appoggia al margine esterno,
   in asse con il blocco di testo dall'altra parte */
@media (min-width: 860px) {
  .grid--2 > .figure { margin-inline: auto 0; }
  .grid--2 > .figure.to-left { margin-inline: 0 auto; }
}
.figure figcaption { margin-top: 14px; font-size: 0.8125rem; color: var(--cream-soft); }
.section--light .figure figcaption { color: rgba(48, 28, 27, 0.65); }
.shots { display: grid; gap: 20px; align-items: start; }
@media (min-width: 560px) { .shots { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 860px) { .shots, .to-left { order: -1; } }

/* voucher */
.voucher {
  position: relative;
  background: var(--red); color: var(--brown);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 6vw, 44px);
  max-width: 440px;
}
.voucher__amount { font-family: var(--display); font-size: clamp(4rem, 18vw, 7rem); line-height: 0.95; }
.voucher p { font-weight: 600; margin-top: 14px; }
.voucher small { display: block; margin-top: 14px; font-size: 0.8125rem; font-weight: 700; opacity: 0.72; }

/* numeri */
.stats { display: grid; gap: 4px; margin-top: 46px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; } }
.stat { padding-block: 22px; border-top: 1px solid var(--cream-faint); }
.section--light .stat { border-color: rgba(48, 28, 27, 0.16); }
.stat__v { font-family: var(--display); font-size: clamp(2.6rem, 9vw, 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat__l { margin-top: 8px; font-size: 0.9375rem; color: var(--cream-soft); }
.section--light .stat__l { color: rgba(48, 28, 27, 0.72); }

/* card generiche */
.cards { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 860px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--brown-soft);
  border: 1px solid var(--cream-faint);
  border-radius: var(--radius);
  padding: 26px;
}
.section--light .card { background: rgba(48, 28, 27, 0.05); border-color: rgba(48, 28, 27, 0.12); }
.card h3 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 1.375rem; line-height: 1.05; margin-bottom: 10px; }
.card p { font-size: 0.9375rem; color: var(--cream-soft); }
.section--light .card p { color: rgba(48, 28, 27, 0.75); }

/* fascia di passaggio — porta anche .section--light nel markup,
   cosi' eredita i colori testo giusti sul fondo crema */
.band { background: var(--cream); color: var(--brown); }
.band__inner { display: grid; gap: 22px; padding-block: clamp(48px, 8vw, 80px); }
@media (min-width: 860px) { .band__inner { grid-template-columns: 1fr auto; align-items: center; gap: 40px; } }

/* contatti */
.contact { display: grid; gap: 14px; margin-top: 36px; }
@media (min-width: 700px) { .contact { grid-template-columns: repeat(3, 1fr); } }
.contact a {
  display: block; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--cream-faint); text-decoration: none;
}
.contact a:hover { border-color: var(--cream-soft); }
.section--light .contact a { border-color: rgba(48, 28, 27, 0.16); }
.contact .k { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.section--light .contact .k { color: var(--red-deep); }
.contact .v { display: block; margin-top: 8px; font-weight: 700; font-size: 1.0625rem; word-break: break-word; }

/* footer */
.footer { background: var(--brown-deep); padding-block: 64px 40px; border-top: 1px solid var(--cream-faint); }
.footer__top { display: grid; gap: 34px; }
@media (min-width: 860px) { .footer__top { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; } }
.footer h2 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 1.125rem; letter-spacing: 0.04em; margin-bottom: 14px; color: var(--cream-soft); }
.footer ul { display: grid; gap: 10px; }
.footer ul a { font-size: 0.9375rem; text-decoration: none; color: var(--cream-soft); }
.footer ul a:hover { color: var(--cream); text-decoration: underline; }
.footer__legal { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--cream-faint); font-size: 0.8125rem; color: var(--cream-soft); line-height: 1.7; }
.footer__legal a { color: inherit; }

/* comparsa */
.rv { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.rv.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .rv { opacity: 1; transform: none; }
}


/* ---------- pagine di testo (legale) ---------- */
.prose { max-width: 68ch; }
.prose h2 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1; letter-spacing: 0.01em;
  margin-top: 52px; margin-bottom: 16px;
}
.prose h2 { line-height: 1.1; }
.prose h3 { font-size: 1.0625rem; font-weight: 800; margin-top: 28px; margin-bottom: 8px; }
.prose p, .prose li { color: rgba(48, 28, 27, 0.82); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 14px; }
.prose ul { margin-top: 12px; padding-left: 1.1em; list-style: disc; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--red-deep); font-weight: 700; }
.prose dl { margin-top: 14px; }
.prose dt { font-weight: 800; margin-top: 14px; }
.prose dd { margin-left: 0; color: rgba(48, 28, 27, 0.82); }
.prose__date { font-size: 0.875rem; font-weight: 700; color: var(--red-deep); }
.notice {
  margin-top: 20px; padding: 22px 24px; border-radius: var(--radius);
  border-left: 3px solid var(--red-deep); background: rgba(176, 16, 48, 0.06);
}
.notice strong { display: block; margin-bottom: 6px; }
