@font-face { font-family: "Permanent Marker"; src: url("fonts/permanent-marker-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Reenie Beanie"; src: url("fonts/reenie-beanie-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Covered By Your Grace"; src: url("fonts/covered-by-your-grace-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Rock Salt"; src: url("fonts/rock-salt-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ground: #060606;
  --text: #dcdcdc;
  --bright: #fff;
  --muted: #9a9a9a;
  --rule: #262626;
  --head: "Archivo", "Arial", sans-serif;
  --body: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --col: 72rem;
}

* { box-sizing: border-box; }
html { background: var(--ground); color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--bright); outline-offset: 4px; }
p { margin: 0 0 1.25rem; }

/* titoli: caratteri larghi e maiuscoli, come nel template */
h1, h2, h3, .statement {
  font-family: var(--head);
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bright);
  margin: 0;
}

.inner { width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- testata ---------- */
.site-head { padding: 1.75rem 0 0; text-align: center; }
.site-head .logo-link { display: inline-block; line-height: 0; }
.site-head .logo { width: 19rem; height: auto; }
.nav { margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.9rem; padding: 0 1rem; }
.nav a {
  text-decoration: none; color: #cfcfcf;
  font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--bright); border-bottom-color: var(--bright); }

/* ---------- apertura: copertina incorniciata con bordi sfumati ---------- */
.frame { margin: 1.75rem auto 0; width: min(100%, 60rem); }
.frame img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 9%, #000 100%);
  mask-composite: intersect;
}
.statement {
  margin: 1.25rem auto 0; max-width: 34rem; text-align: center;
  font-size: clamp(1.2rem, 3.3vw, 1.75rem); line-height: 1.28;
  padding: 0 1.25rem;
}


/* ---------- apertura: due ante nere che scorrono e svelano l'infinito ---------- */
.frame { position: relative; overflow: hidden; }
.frame::before, .frame::after {
  content: ""; position: absolute; top: -2%; bottom: -2%; width: 78%;
  background: var(--ground); z-index: 2; pointer-events: none;
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  animation-duration: 4.2s; animation-delay: .7s; animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(.55, 0, .25, 1);
}
/* bordo interno sfumato come nebbia nera: opaco al centro, evapora verso l'apertura */
.frame::before { left: 0; animation-name: ante-sx;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 52%, rgba(0,0,0,.6) 70%, rgba(0,0,0,.2) 88%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 52%, rgba(0,0,0,.6) 70%, rgba(0,0,0,.2) 88%, transparent 100%); }
.frame::after { right: 0; animation-name: ante-dx;
  -webkit-mask-image: linear-gradient(to left, #000 0, #000 52%, rgba(0,0,0,.6) 70%, rgba(0,0,0,.2) 88%, transparent 100%);
  mask-image: linear-gradient(to left, #000 0, #000 52%, rgba(0,0,0,.6) 70%, rgba(0,0,0,.2) 88%, transparent 100%); }
@keyframes ante-sx { to { transform: translateX(-108%); } }
@keyframes ante-dx { to { transform: translateX(108%); } }
.frame img { animation: respiro 7s ease-out .7s both; }
@keyframes respiro { from { transform: scale(1.06); } to { transform: scale(1); } }
.statement { animation: appare 1.6s ease-out 3s both; }
@keyframes appare { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .frame::before, .frame::after { display: none; }
  .frame img, .statement { animation: none; }
}

/* ---------- fila di anteprime sfalsate ---------- */
.teasers {
  list-style: none; margin: 5rem auto 0; padding: 0 1.25rem;
  max-width: 58rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.teasers li:nth-child(even) { margin-top: 2rem; }
.teasers img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }

/* ---------- banda con la Pietà e il testo breve ---------- */
.band { position: relative; margin-top: 6rem; }
.band-media { position: relative; }
.band-media img { width: 100%; height: auto; }
.band-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(6,6,6,.55) 0%, rgba(6,6,6,0) 22%, rgba(6,6,6,0) 45%, var(--ground) 100%);
}
.band-text { position: relative; width: 100%; max-width: 41rem; margin: -7.5rem auto 0; padding: 0 1.25rem; font-size: 1rem; }
.band-text ul { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.band-text li { margin: 0; }
.band-text strong { color: var(--bright); font-weight: 700; }
.more {
  display: inline-block; margin-top: 0.75rem;
  font-family: var(--head); font-stretch: 125%; font-weight: 500;
  font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bright); text-decoration: none;
  border-bottom: 2px solid var(--bright); padding-bottom: 0.2rem;
}
.more:hover { opacity: .75; }

/* ---------- opere: righe che rispettano le proporzioni di ogni lavoro ---------- */
.works { margin-top: 8rem; }
.works-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2rem; }
.works-head h2 { font-size: 1.5rem; }
.gallery { --rowh: 220px; display: flex; flex-wrap: wrap; gap: 8px; }
.gallery figure { margin: 0; flex: var(--r) 1 calc(var(--r) * var(--rowh)); min-width: 0; }
.gallery img { width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; }

/* ---------- obiettivi ---------- */
.goals { margin-top: 9rem; }
.goals > .inner > h2 { text-align: center; font-size: 1.75rem; margin-bottom: 3rem; }
.goals-grid {
  display: grid; grid-template-columns: 1fr minmax(0, 17rem) 1fr;
  gap: 3rem; align-items: center; max-width: 62rem; margin: 0 auto;
}
.goals-col { display: grid; gap: 3.25rem; }
.goal h3 { font-size: 1.0625rem; letter-spacing: 0.02em; margin-bottom: 0.75rem; text-transform: none; font-weight: 600; }
.goal p { font-size: 0.9375rem; line-height: 1.7; margin: 0; color: #c9c9c9; }
.goals-img { width: 100%; height: auto; aspect-ratio: 576 / 708; object-fit: cover; }

/* ---------- contatti ---------- */
.contact { position: relative; margin-top: 9rem; min-height: 24rem; display: grid; place-items: center; text-align: center; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0;
  background: url("img/cimitero-pano.jpg") right center / auto 100% no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 28%, #000 68%);
  mask-image: linear-gradient(to right, transparent 28%, #000 68%);
}
.contact-inner { position: relative; padding: 3rem 1.25rem; }
.contact h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
.contact .more { margin-top: 1.75rem; }
.todo { text-transform: none; letter-spacing: 0.04em; }

/* ---------- piè di pagina ---------- */
.site-foot { text-align: center; padding: 3.5rem 1.25rem 3rem; }
.site-foot .logo { width: 17rem; height: auto; margin: 0 auto; }
.site-foot p { margin: 1.5rem 0 0; font-size: 0.875rem; color: var(--muted); }

/* ---------- pagina dei testi completi ---------- */
.reading { max-width: 41rem; margin: 0 auto; padding: 3.5rem 1.25rem 0; font-size: 1.125rem; }
.reading h1 { font-size: clamp(1.6rem, 5vw, 2.25rem); margin-bottom: 2.5rem; }
.reading h2 { font-size: 1.25rem; margin: 5rem 0 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.reading .key { font-family: var(--head); font-stretch: 125%; font-weight: 500; text-transform: uppercase; color: var(--bright);
  font-size: clamp(1.6rem, 6vw, 2.5rem); line-height: 1.15; margin: 2.5rem 0 2.75rem; letter-spacing: 0.02em; }
.reading .line { margin-bottom: 0.35rem; }
.reading .closing p { margin-bottom: 1rem; }

/* ---------- schermi stretti ---------- */
@media (max-width: 52rem) {
  .teasers { grid-template-columns: repeat(2, 1fr); margin-top: 3.5rem; }
  .goals-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .goals-img { max-width: 17rem; margin: 0 auto; order: -1; }
  .goals-col { gap: 2.5rem; }
}
@media (max-width: 40rem) {
  .site-head .logo { width: 15rem; }
  .nav { gap: 0.2rem 1.25rem; }
  .band-media img { height: 82vw; object-fit: cover; object-position: 52% 38%; }
  .band-text { margin-top: -5rem; }
  .works { margin-top: 5.5rem; }
  .goals, .contact { margin-top: 6rem; }
  .contact::before { background-position: 70% center; -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.25), rgba(0,0,0,.5)); mask-image: linear-gradient(to right, rgba(0,0,0,.25), rgba(0,0,0,.5)); }
}

/* ---------- invito alla conversazione ---------- */
.contact .lead { margin: 1.25rem auto 0; max-width: 28rem; color: #cfcfcf; font-size: 1rem; }
.cta {
  display: inline-block; margin-top: 2rem; padding: 1rem 2.25rem;
  font-family: var(--head); font-stretch: 125%; font-weight: 500;
  font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ground); background: var(--bright); text-decoration: none;
  border: 1px solid var(--bright); transition: background .25s, color .25s;
}
.cta:hover { background: transparent; color: var(--bright); }
.contact-inner { text-shadow: 0 0 14px #000, 0 0 4px #000; } .contact .cta { text-shadow: none; }

/* ---------- il muro delle frasi ---------- */
.wall { margin-top: 9rem; }
.wall-surface { position: relative; min-height: 26rem; display: grid; align-items: center; overflow: hidden; }
.wall-surface > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) contrast(1.05); }
.wall-surface::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--ground) 0, transparent 14%, transparent 86%, var(--ground) 100%); }
.wall-writing { position: relative; z-index: 1; width: 100%; max-width: 62rem; margin: 0 auto; padding: 4.5rem 1.25rem; text-align: center; }
.wall-writing h2 {
  font-family: "Permanent Marker", "Caveat", cursive; font-stretch: normal; text-transform: none; font-weight: 400;
  font-size: clamp(1.9rem, 5.6vw, 3.9rem); line-height: 1.18; letter-spacing: .01em;
  color: #c4261d; transform: rotate(-1.6deg);
  text-shadow: 0 0 1px rgba(80,8,4,.9), 1px 2px 0 rgba(0,0,0,.35), 0 0 18px rgba(120,10,6,.35);
}
.frasi { list-style: none; margin: 2.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.1rem 2.25rem; justify-content: center; }
.frasi li { max-width: 19rem; line-height: 1.2; transform: rotate(var(--rot, 0deg)); text-shadow: 0 1px 5px rgba(0,0,0,.75); }
.frasi li.h0 { font-family: "Caveat", cursive; font-weight: 700; font-size: 1.9rem; color: #f3f1ea; }
.frasi li.h1 { font-family: "Reenie Beanie", cursive; font-size: 2.35rem; color: #e9c85a; }
.frasi li.h2 { font-family: "Covered By Your Grace", cursive; font-size: 1.75rem; color: #d8352b; }
.frasi li.h3 { font-family: "Rock Salt", cursive; font-size: 1.05rem; line-height: 1.5; color: #bfd6e6; }
.frasi li.h4 { font-family: "Permanent Marker", cursive; font-size: 1.35rem; color: #f6f4ee; }
.frasi li small { display: block; font-family: var(--body); font-style: normal; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; opacity: .6; margin-top: .25rem; }
.wall-form { max-width: 40rem; margin: 2.5rem auto 0; padding: 0 1.25rem; }
.wall-ask { display: block; font-family: var(--head); font-stretch: 125%; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--bright); font-size: 1.1rem; margin-bottom: 1rem; }
.wall-form textarea, .wall-form input[type=text] {
  width: 100%; background: rgba(255,255,255,.04); color: var(--bright); border: 1px solid #555; border-radius: 0;
  font: inherit; font-size: 1rem; padding: .9rem 1rem; resize: vertical;
}
.wall-form textarea:focus, .wall-form input:focus { outline: 2px solid var(--bright); outline-offset: 2px; background: rgba(255,255,255,.07); }
.wall-row { display: flex; gap: .9rem; margin-top: .9rem; align-items: stretch; flex-wrap: wrap; }
.wall-row input[type=text]:not(.hp) { flex: 1 1 14rem; width: auto; }
.wall-row .cta { margin: 0; cursor: pointer; font-family: var(--head); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wall-note { margin: 1rem 0 0; font-size: .875rem; color: var(--muted); }
.wall-note.ok { color: #cfe8cf; } .wall-note.err { color: #f0b3a8; }
@media (max-width: 40rem) { .wall { margin-top: 6rem; } .wall-writing { padding: 3.5rem 1.25rem; } .wall-row .cta { width: 100%; } }
