/* Perché a te? – percheate.it */
@font-face { font-family: "Almendra"; src: url("fonts/almendra-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Almendra"; src: url("fonts/almendra-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cinzel Decorative"; src: url("fonts/cinzel-decorative-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cinzel Decorative"; src: url("fonts/cinzel-decorative-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --notte: #1c130b;
  --juta-notte: #332214;
  --juta-scura: #533c29;
  --juta: #7e5a3c;
  --terra: #d08a41;
  --terra-hover: #e09a50;
  --ocra: #c89968;
  --sabbia: #d9bea1;
  --bianco: #ffffff;
  --testo: #efe3d4;
  --testo-2: #cdb89f;
  --linea: rgba(217, 190, 161, .18);
  --f-titoli: "Almendra", Georgia, serif;
  --f-etichette: "Cinzel Decorative", Georgia, serif;
  --f-testo: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--notte);
  color: var(--testo);
  font: 400 1.125rem/1.65 var(--f-testo);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocra); }
a:hover { color: var(--sabbia); }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-titoli); font-weight: 700; color: var(--bianco); line-height: 1.1; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.5rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--terra); color: var(--notte); padding: 8px 14px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.small { font-size: .95rem; color: var(--testo-2); }
.muted { color: var(--testo-2); }

/* Buttons */
.btn {
  display: inline-block; padding: .8em 1.5em; border-radius: 999px;
  font: 600 1rem/1.2 var(--f-testo); letter-spacing: .02em; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--terra); color: var(--notte); }
.btn-primary:hover { background: var(--terra-hover); color: var(--notte); }
.btn-ghost { border: 1.5px solid var(--sabbia); color: var(--bianco); }
.btn-ghost:hover { background: var(--sabbia); color: var(--notte); }

/* Header */
.top {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--gutter);
  background: linear-gradient(to bottom, rgba(20, 13, 7, .9), rgba(20, 13, 7, 0));
  transition: background .3s;
}
.top.scrolled { background: rgba(20, 13, 7, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--linea); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bianco); font: 700 1.35rem var(--f-titoli); }
.brand img { width: 30px; height: auto; }
nav { display: flex; gap: 22px; align-items: center; }
nav a { color: var(--testo); text-decoration: none; font-size: 1rem; }
nav a:hover { color: var(--terra); }
nav .nav-cta { background: var(--terra); color: var(--notte); padding: .45em 1.1em; border-radius: 999px; font-weight: 600; }
nav .nav-cta:hover { background: var(--terra-hover); color: var(--notte); }
.menu-btn { display: none; background: none; border: 1.5px solid var(--sabbia); color: var(--bianco); border-radius: 999px; padding: .4em 1em; font: 600 .95rem var(--f-testo); cursor: pointer; }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(20, 13, 7, .98); border-bottom: 1px solid var(--linea);
    padding: 8px var(--gutter) 18px; display: none;
  }
  nav.open { display: flex; }
  nav a { padding: 12px 0; border-bottom: 1px solid var(--linea); }
  nav .nav-cta { margin-top: 14px; text-align: center; border: 0; }
}

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; object-position: 50% 42%; filter: brightness(1.25) contrast(1.05); z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--notte) 0%, rgba(28, 19, 11, .75) 35%, rgba(28, 19, 11, .1) 70%, rgba(28, 19, 11, .5) 100%);
}
.hero-text { max-width: var(--max); width: 100%; margin: 0 auto; padding: 120px var(--gutter) clamp(48px, 9vh, 96px); }
.kicker { font: 400 .95rem var(--f-etichette); letter-spacing: .08em; color: var(--sabbia); margin-bottom: .8em; }
.hero h1 { font-size: clamp(3.4rem, 11vw, 7.5rem); margin: 0; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.subtitle { font: 700 clamp(1.5rem, 3.6vw, 2.4rem)/1.2 var(--f-titoli); color: var(--bianco); margin: .1em 0 .6em; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 36em; color: var(--testo); }
.next-date { display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--terra); padding-left: 16px; margin: 1.6em 0 1.8em; }
.next-date .label { font: 400 .85rem var(--f-etichette); letter-spacing: .08em; color: var(--terra); }
.next-date strong { font: 700 clamp(1.4rem, 3vw, 1.9rem) var(--f-titoli); color: var(--bianco); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.eyebrow { font: 400 1rem var(--f-etichette); letter-spacing: .12em; color: var(--terra); }
.quote-section { background: linear-gradient(rgba(28, 19, 11, .78), rgba(28, 19, 11, .86)), url("img/juta.webp") center / 420px repeat; }
blockquote { margin: 0 0 1.6em; }
blockquote p { font: 700 clamp(1.6rem, 3.4vw, 2.3rem)/1.3 var(--f-titoli); color: var(--bianco); margin-bottom: .4em; }
blockquote cite { font-style: normal; color: var(--ocra); }

.split-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .split-grid { grid-template-columns: 5fr 7fr; }
  .split-grid.reverse { grid-template-columns: 7fr 5fr; }
}
.split-img { margin: 0; }
.split-img img { border-radius: 6px; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.split-img figcaption { font-size: .85rem; color: var(--testo-2); margin-top: 8px; }
.motto { font-style: italic; color: var(--sabbia); border-left: 2px solid var(--juta); padding-left: 16px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 2em 0 0; }
.facts div { border-top: 1px solid var(--linea); padding-top: 10px; }
.facts dt { font-size: .85rem; color: var(--testo-2); }
.facts dd { margin: 0; font: 700 2.2rem/1 var(--f-titoli); color: var(--terra); }
@media (max-width: 520px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* Dates */
.dates { background: var(--juta-notte); }
.date-cards { display: grid; gap: 24px; margin-top: 1em; }
@media (min-width: 820px) { .date-cards { grid-template-columns: 1.15fr 1fr; } }
.date-card { position: relative; background: rgba(0, 0, 0, .25); border: 1px solid var(--linea); border-radius: 8px; padding: clamp(24px, 4vw, 40px); overflow: hidden; }
.date-card.upcoming { border-color: var(--terra); background: linear-gradient(160deg, rgba(208, 138, 65, .16), rgba(0, 0, 0, .25)); }
.badge { display: inline-block; font: 400 .8rem var(--f-etichette); letter-spacing: .1em; color: var(--notte); background: var(--terra); padding: .25em .8em; border-radius: 999px; }
.past .badge { background: var(--juta); color: var(--bianco); }
.day { display: flex; align-items: baseline; gap: 12px; margin: .4em 0 0; }
.day .d { font: 700 clamp(4rem, 9vw, 5.5rem)/1 var(--f-titoli); color: var(--bianco); }
.day .m { font: 700 1.6rem var(--f-titoli); color: var(--sabbia); }
.when { font-weight: 600; color: var(--terra); }
.where { color: var(--testo); }
.date-card .btn { margin: .4em 0 1em; }
.done { color: var(--testo-2); font-style: italic; }
.poster { position: absolute; right: -30px; bottom: -40px; width: 160px; transform: rotate(6deg); opacity: .85; border-radius: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
@media (max-width: 520px) { .poster { position: static; transform: none; width: 140px; margin-top: 12px; } }
.past .where, .past .done { max-width: 60%; }
@media (max-width: 520px) { .past .where, .past .done { max-width: none; } }
.map-link { margin-top: 1.5em; }

/* Story */
.credits { margin: 0; }
.credits div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.credits dt { font: 400 .85rem/1.9 var(--f-etichette); color: var(--terra); letter-spacing: .05em; }
.credits dd { margin: 0; color: var(--bianco); }
@media (max-width: 520px) { .credits div { grid-template-columns: 1fr; gap: 0; } }

/* Gallery */
.gallery { background: #120c07; }
.intro { color: var(--testo-2); }
.grid { list-style: none; padding: 0; margin: 1.5em 0 1em; display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; grid-auto-flow: dense; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; } }
.grid li { overflow: hidden; border-radius: 4px; background: #000; }
.grid .wide { grid-column: span 2; }
.grid .tall { grid-row: span 2; }
.grid a { display: block; height: 100%; }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, filter .5s; filter: brightness(.92); }
.grid a:hover img { transform: scale(1.04); filter: brightness(1.05); }
.credits-photo { margin-top: .5em; }

/* Support */
.support { background: linear-gradient(180deg, var(--juta-notte), var(--notte)); }
.tau-mark { margin: 0 auto 1em; width: 80px; }
.support-grid { display: grid; gap: 16px; margin: 2em 0; text-align: left; }
@media (min-width: 640px) { .support-grid { grid-template-columns: 1fr 1fr; } }
.support-box { border: 1px solid var(--linea); border-radius: 8px; padding: 22px; background: rgba(0, 0, 0, .2); }
.support-box h3 { margin-top: 0; color: var(--terra); }
.code { font: 600 1.2rem/1.4 ui-monospace, "SF Mono", Menlo, monospace; color: var(--bianco); letter-spacing: .04em; margin: 0; word-break: break-word; }
.iban { font-size: 1.05rem; }

/* Footer */
.foot { border-top: 1px solid var(--linea); padding: 48px 0 24px; font-size: 1rem; color: var(--testo-2); }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot-title { font: 700 1.5rem var(--f-titoli); color: var(--bianco); }
.foot-title span { display: block; font-size: 1.05rem; color: var(--sabbia); }
.foot-label { font: 400 .8rem var(--f-etichette); letter-spacing: .1em; color: var(--terra); margin-bottom: .4em; }
.legal { margin-top: 32px; font-size: .85rem; opacity: .7; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .92); }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
.lb-close { position: fixed; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media (min-width: 1000px) and (min-aspect-ratio: 4/3) {
  .hero-bg img { width: 165%; height: auto; max-width: none; top: 50%; left: -8%; transform: translateY(-48%); }
}
