@import url('https://fonts.googleapis.com/css2?family=Anton&family=Permanent+Marker&display=swap');

:root {
  --bg: #090909;
  --paper: #101010;
  --surface: #171717;
  --surface-2: #202020;
  --text: #f7f3ea;
  --muted: #b9b2a5;
  --yellow: #f6b817;
  --yellow-2: #ffc522;
  --line: rgba(247,243,234,.18);
  --radius: 18px;
  --max: 1120px;
  --font-display: "Anton", Impact, sans-serif;
  --font-hand: "Permanent Marker", "Comic Sans MS", cursive;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-hand);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(9,9,9,.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  text-transform: uppercase;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.13);
}
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-size: .92rem; letter-spacing: .045em; white-space: nowrap; }
.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-hand);
  font-size: .64rem;
  letter-spacing: .025em;
}
.nav { display: none; align-items: center; gap: 18px; color: var(--muted); }
.nav a:hover { color: var(--yellow); }

.home-page {
  background:
    radial-gradient(circle at 95% 5%, rgba(246,184,23,.09), transparent 21rem),
    #090909;
}
.home-header {
  position: sticky;
  top: 0;
  background: rgba(9,9,9,.96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}
.poster-home {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 70px - 100px);
  padding: 12px 0 42px;
}
.poster-home::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background:
    linear-gradient(14deg, transparent 0 49.5%, rgba(255,255,255,.05) 50%, transparent 50.5%),
    linear-gradient(168deg, transparent 0 49.5%, rgba(255,255,255,.04) 50%, transparent 50.5%);
  background-size: 68px 68px, 83px 83px;
}
.poster-shell {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 70svh;
  flex-direction: column;
  justify-content: center;
  padding-top: 12px;
}
.poster-intro { max-width: 520px; }
.poster-kicker {
  margin: 0 0 15px;
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.poster-kicker span { color: var(--yellow); }
.find-your-shot {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--yellow);
  font-family: var(--font-hand);
  font-size: clamp(1.35rem, 6.8vw, 2.15rem);
  line-height: 1;
  transform: rotate(-2deg);
  text-transform: lowercase;
}
.find-your-shot::after {
  content: "";
  display: block;
  width: 92%;
  height: 4px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--text);
  transform: rotate(-1deg);
}
.poster-intro h1 {
  margin: 0;
  max-width: 8.5ch;
  font-family: var(--font-display);
  font-size: clamp(3.15rem, 16vw, 6.5rem);
  line-height: .84;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 rgba(0,0,0,.7);
}

.poster-intro h1.hero-find span {
  color: var(--yellow);
  font-family: var(--font-hand);
  display: inline-block;
  transform: rotate(-2deg);
  text-shadow: 3px 3px 0 rgba(0,0,0,.7);
}
.poster-intro h1::after {
  content: "";
  display: block;
  width: min(48vw, 190px);
  height: 8px;
  margin-top: 15px;
  border-radius: 50%;
  background: var(--yellow);
  transform: rotate(-2deg);
}
.poster-subtitle {
  max-width: 360px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}
.poster-feature {
  position: relative;
  width: min(100%, 430px);
  margin-top: 34px;
  padding: 22px 20px 20px;
  border: 2px solid rgba(247,243,234,.76);
  border-radius: 4px 18px 5px 16px;
  background: rgba(16,16,16,.76);
  transform: rotate(-.4deg);
  box-shadow: 8px 8px 0 rgba(246,184,23,.10);
}
.feature-stamp {
  position: absolute;
  top: -13px;
  left: 15px;
  padding: 3px 10px 4px;
  background: var(--yellow);
  color: #090909;
  font-family: var(--font-display);
  font-size: .76rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.feature-date {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 8.5vw, 2.7rem);
  text-transform: uppercase;
  line-height: 1;
}
.feature-date span { color: var(--yellow); font-size: 1.28em; }
.feature-year { margin-top: 6px; color: var(--muted); font-size: .82rem; }
.feature-rule {
  width: 62%;
  height: 5px;
  margin: 12px 0 9px;
  border-radius: 50%;
  background: var(--text);
  transform: rotate(-1deg);
}
.feature-note { margin: 0; color: var(--yellow); font-size: .92rem; }

.home-actions {
  display: grid;
  width: min(100%, 430px);
  gap: 12px;
  margin-top: 30px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 18px;
  border: 2px solid var(--yellow);
  border-radius: 14px;
  background: var(--yellow);
  color: #090909;
  font-family: var(--font-display);
  font-size: 1.03rem;
  letter-spacing: .025em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, background .16s ease;
}
.btn:active { transform: scale(.985); }
.btn:hover { filter: brightness(1.05); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--yellow); color: var(--yellow); }
.btn.small { min-height: 44px; padding: 0 15px; font-size: .92rem; }
.poster-primary, .poster-secondary {
  justify-content: flex-start;
  min-height: 68px;
  border-radius: 8px 17px 7px 15px;
  box-shadow: 4px 5px 0 rgba(255,255,255,.04);
}
.poster-primary { background: var(--yellow); border-color: var(--yellow); color: #090909; }
.poster-secondary { background: rgba(11,11,11,.82); border-color: rgba(247,243,234,.82); color: var(--text); }
.button-icon { min-width: 28px; font-family: sans-serif; font-size: 1.25rem; }
.button-arrow { margin-left: auto; font-size: 1.55rem; }
.poster-tagline {
  margin: 30px 0 0;
  color: var(--text);
  font-family: sans-serif;
  font-size: .64rem;
  letter-spacing: .42em;
  text-transform: uppercase;
}
.poster-tagline::after {
  content: "";
  display: block;
  width: 130px;
  height: 4px;
  margin-top: 10px;
  background: var(--yellow);
  border-radius: 50%;
  transform: rotate(-2deg);
}
.poster-doodle { position: absolute; z-index: 1; pointer-events: none; user-select: none; }
.doodle-ring {
  top: 52px;
  right: -76px;
  width: 190px;
  height: 190px;
  border: 12px solid var(--yellow);
  border-radius: 50%;
  opacity: .9;
  transform: rotate(11deg);
}
.doodle-ring::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 8px solid var(--yellow);
  border-radius: 50%;
}
.doodle-ring::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  top: 43px;
  left: 39px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 58px -7px 0 var(--yellow);
}
.doodle-star { color: var(--text); font-family: sans-serif; }
.star-a { top: 245px; right: 29px; font-size: 2.8rem; transform: rotate(8deg); }
.star-b { top: 335px; left: -2px; font-size: 2.2rem; color: var(--yellow); }
.doodle-rbp {
  right: -8px;
  bottom: 190px;
  color: var(--yellow);
  font-family: var(--font-hand);
  font-size: 2.9rem;
  transform: rotate(-12deg);
  opacity: .5;
}
.doodle-line {
  width: 76px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  opacity: .7;
}
.line-a { right: 14px; top: 430px; transform: rotate(-13deg); }
.line-b { left: -24px; bottom: 150px; width: 112px; background: var(--yellow); transform: rotate(19deg); }

.page { padding: 28px 0 48px; }
.page-head { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.eyebrow { margin: 0 0 8px; color: var(--yellow); font-size: .9rem; line-height: 1.2; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .archive-date { font-family: var(--font-display); font-weight: 400; }
.page-head h1 {
  margin-bottom: 8px;
  font-size: clamp(2.6rem, 13vw, 4.8rem);
  line-height: .9;
  text-transform: uppercase;
}
.page-head h1::after {
  content: "";
  display: block;
  width: 105px;
  height: 6px;
  margin-top: 11px;
  border-radius: 50%;
  background: var(--yellow);
  transform: rotate(-2deg);
}
.page-head p { margin-bottom: 0; color: var(--muted); line-height: 1.45; }

.archive-list { display: grid; gap: 12px; }
.archive-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 17px 16px;
  background: rgba(23,23,23,.92);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px 17px 8px 15px;
  box-shadow: 4px 5px 0 rgba(246,184,23,.05);
}
.archive-date { margin: 0 0 6px; color: var(--text); font-size: 1.18rem; line-height: 1; text-transform: uppercase; }
.archive-item p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.3; }
.archive-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.gallery-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 16px; color: var(--muted); font-size: .82rem; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.photo-card { position: relative; overflow: hidden; background: var(--surface); border-radius: 9px; border: 1px solid rgba(255,255,255,.08); }
.photo-button { appearance: none; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.photo-button img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.photo-actions { position: absolute; inset: auto 7px 7px auto; display: flex; align-items: center; }
.photo-name { display: none; }
.download-link {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(9,9,9,.9); border: 1px solid rgba(255,255,255,.2); color: var(--yellow);
  font-family: var(--font-display); font-size: 0; backdrop-filter: blur(8px);
}
.download-link::before { content: "↓"; font-size: 1.15rem; }
.empty-placeholder {
  aspect-ratio: 4 / 3; min-height: 0; display: grid; place-items: center; padding: 12px; text-align: center;
  color: #d2ccc0; background: linear-gradient(145deg, #1c1c1c, #111), var(--surface-2); font-size: .78rem;
}

.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.97); padding: 58px 8px 86px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100svh - 150px); object-fit: contain; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(22,22,22,.9);
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}
.lightbox-close { top: 10px; right: 10px; font-size: 1.35rem; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); font-size: 0; }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-prev::before, .lightbox-next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform-origin: center;
}
.lightbox-prev::before { transform: translate(-50%, -50%) rotate(-135deg); }
.lightbox-next::before { transform: translate(-50%, -50%) rotate(45deg); }
.lightbox-download { position: absolute; left: 20px; right: 20px; bottom: 14px; min-height: 50px; }

.footer { padding: 28px 0 110px; color: #77736c; font-size: .76rem; text-align: center; }
.footer-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; }
.instagram-link { color: var(--yellow); font-weight: 800; text-decoration: none; letter-spacing: .02em; }
.instagram-link:hover { text-decoration: underline; text-underline-offset: 4px; }


@media (min-width: 700px) {
  body { padding-bottom: 0; }
  .container { width: min(calc(100% - 56px), var(--max)); }
  .nav { display: flex; }
  .poster-home { min-height: calc(100vh - 70px); padding: 30px 0 70px; }
  .poster-shell { min-height: 74vh; }
  .poster-intro h1 { max-width: 9.5ch; }
  .home-actions { grid-template-columns: 1fr 1fr; width: min(100%, 740px); }
  .poster-primary, .poster-secondary { min-height: 76px; }
  .page { padding: 48px 0 78px; }
  .page-head { flex-direction: row; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .photo-card { border-radius: 12px; }
  .archive-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lightbox { padding: 30px 70px 90px; }
  .lightbox-download { left: 50%; right: auto; width: 230px; transform: translateX(-50%); }
}
@media (min-width: 1020px) {
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .doodle-ring { width: 300px; height: 300px; right: 5%; top: 30px; }
}

.feature-empty { margin: 1.1rem 0 0; opacity: .72; }
.archive-empty { padding: 24px 0; opacity: .76; }
.is-disabled { pointer-events: none; opacity: .38 !important; }

.photo-card.photo-load-error .photo-button {
  min-height: 150px;
  background: rgba(255,255,255,.06);
  border: 1px dashed rgba(255,255,255,.28);
}
.photo-card.photo-load-error .photo-button::after {
  content: "Foto non disponibile sul server";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .75;
}

html {
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior-y: none;
}
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  padding-bottom: 0;
  background-color: var(--bg);
}
.site-header { flex: 0 0 auto; }
.page, .poster-home, .not-found-main { flex: 1 0 auto; }
.footer {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 24px 0 calc(96px + env(safe-area-inset-bottom));
}
.poster-home {
  min-height: 0;
  padding-bottom: 30px;
}
.poster-shell { min-height: max(570px, calc(100dvh - 230px)); }
.page { padding-bottom: 28px; }

.photo-button img { background: var(--surface-2); }
.gallery-empty-state { grid-template-columns: 1fr; }

.lightbox {
  height: 100dvh;
  min-height: 100dvh;
  overscroll-behavior: contain;
  padding: max(58px, env(safe-area-inset-top)) 54px calc(84px + env(safe-area-inset-bottom));
}
.lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 165px - env(safe-area-inset-bottom));
}
.lightbox-prev, .lightbox-next {
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
}
.lightbox-prev { left: 6px; }
.lightbox-next { right: 6px; }
.lightbox-prev::before, .lightbox-next::before {
  width: 11px;
  height: 11px;
  top: 50%;
  left: 50%;
  margin: 0;
}
.lightbox-lock, .lightbox-lock body { overflow: hidden; overscroll-behavior: none; }

.not-found-page { background: var(--bg); }
.not-found-main {
  display: grid;
  align-items: center;
  padding: 28px 0 36px;
}
.not-found-card { max-width: 720px; }
.not-found-code {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 27vw, 9rem);
  line-height: .8;
  transform: rotate(-3deg);
}
.not-found-card h1, .not-found-inline h2 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: .95;
}
.not-found-card h1 { font-size: clamp(2.5rem, 13vw, 5rem); }
.not-found-card > p, .not-found-inline p { color: var(--muted); line-height: 1.45; }
.not-found-actions { margin-top: 24px; }
.not-found-inline {
  width: 100%;
  padding: 34px 0 12px;
  text-align: left;
}
.not-found-inline .not-found-code { font-size: 5rem; }
.not-found-inline .btn { margin-top: 16px; width: min(100%, 360px); }

@media (min-width: 700px) {
  .footer { padding-bottom: 28px; }
  .poster-shell { min-height: 70vh; }
  .lightbox { padding: 30px 80px 90px; }
}


html,
body {
  overscroll-behavior: none;
  touch-action: manipulation;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: var(--grain);
  background-size: 180px 180px;
  background-blend-mode: soft-light;
}

.home-page {
  background-color: #090909;
  background-image:
    radial-gradient(circle at 95% 5%, rgba(246,184,23,.09), transparent 21rem),
    var(--grain);
  background-size: auto, 180px 180px;
  background-blend-mode: normal, soft-light;
}

.footer {
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
}

.feature-title {
  margin: 3px 0 12px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 7.5vw, 2.35rem);
  font-weight: 400;
  line-height: .95;
  text-transform: uppercase;
}

.archive-title {
  margin: 0 0 7px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.archive-item .archive-date {
  margin: 0 0 4px;
  color: var(--yellow);
  font-family: var(--font-hand);
  font-size: .83rem;
  text-transform: none;
}

.archive-count {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
}

.event-date-display {
  margin: 12px 0 0 !important;
  color: var(--yellow) !important;
  font-size: .96rem;
  line-height: 1.25 !important;
}

.photo-actions {
  gap: 6px;
}

.share-link,
.download-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(9,9,9,.92);
  color: var(--yellow);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.share-link {
  appearance: none;
}

.send-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-link.is-sharing,
.lightbox-share.is-sharing {
  opacity: .55;
  pointer-events: none;
}

.lightbox {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.lightbox img {
  max-height: calc(100dvh - 190px - env(safe-area-inset-bottom));
  border: 2px solid var(--yellow);
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(246,184,23,.22), 0 18px 50px rgba(0,0,0,.5);
  touch-action: pan-y;
}

.lightbox-actions {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr);
  gap: 9px;
}

.lightbox-actions .btn {
  position: static;
  width: 100%;
  min-height: 54px;
  padding: 0 13px;
  transform: none;
  font-size: .9rem;
  white-space: nowrap;
}

.lightbox-share {
  background: rgba(18,18,18,.96);
  color: var(--yellow);
}

.lightbox-share .send-icon {
  width: 19px;
  height: 19px;
}

.lightbox-download {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  transform: none;
}

.share-toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  max-width: calc(100% - 36px);
  padding: 10px 14px;
  border: 1px solid rgba(246,184,23,.5);
  border-radius: 999px;
  background: rgba(20,20,20,.96);
  color: var(--text);
  font-size: .78rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .18s ease, transform .18s ease;
}

.share-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 700px) {
  .footer { padding-bottom: 28px; }
  .lightbox-actions {
    left: 50%;
    right: auto;
    width: min(460px, calc(100% - 40px));
    transform: translateX(-50%);
  }
  .lightbox-actions .btn,
  .lightbox-download {
    transform: none;
  }
}


.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.045);
  color: var(--muted);
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}
.nav-link:active { transform: scale(.96); }
.nav-link span { display: none; }
.nav-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-page .nav-home,
.archive-page .nav-archive,
.event-page .nav-archive {
  color: #090909;
  border-color: var(--yellow);
  background: var(--yellow);
}

.lightbox {
  padding: calc(58px + env(safe-area-inset-top)) 8px calc(92px + env(safe-area-inset-bottom));
}
.polaroid {
  position: relative;
  z-index: 2;
  width: min(calc(100vw - 34px), 760px);
  max-height: calc(100dvh - 164px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  padding: 9px 9px 0;
  background: #f6f2e9;
  border-radius: 2px;
  box-shadow: 0 14px 44px rgba(0,0,0,.58), 0 2px 0 rgba(255,255,255,.5) inset;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.polaroid-photo {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #111;
}
.lightbox .polaroid img {
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 300px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  object-fit: contain;
  background: #111;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-user-drag: none;
}
.polaroid-caption {
  position: relative;
  min-height: 102px;
  padding: 13px 7px 14px;
  color: #111;
  background: #f6f2e9;
  text-align: left;
}
.polaroid-date {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-hand);
  font-size: .72rem;
  line-height: 1.15;
  color: #4b4842;
  text-transform: uppercase;
}
.polaroid-title {
  display: block;
  max-width: calc(100% - 6px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 5vw, 1.65rem);
  line-height: 1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.polaroid-handle {
  display: inline-block;
  margin-top: 8px;
  color: #151515;
  font-family: var(--font-hand);
  font-size: .75rem;
  line-height: 1;
  transform: rotate(-1deg);
}
.polaroid-handle::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--yellow);
  transform: rotate(-1deg);
}
.lightbox-prev,
.lightbox-next {
  z-index: 5;
  top: 48%;
  width: 42px;
  height: 42px;
  border-color: rgba(255,255,255,.28);
  background: rgba(10,10,10,.88);
  box-shadow: 0 5px 18px rgba(0,0,0,.28);
}
.lightbox-prev { left: 4px; }
.lightbox-next { right: 4px; }
.lightbox-close { z-index: 6; }

@media (min-width: 700px) {
  .header-nav { gap: 8px; }
  .nav-link {
    width: auto;
    height: 42px;
    padding: 0 14px;
    gap: 8px;
    border-radius: 999px;
    font-size: .8rem;
  }
  .nav-link span { display: inline; }
  .nav-icon { width: 17px; height: 17px; }
  .polaroid {
    width: min(72vw, 760px);
    padding: 12px 12px 0;
  }
  .lightbox .polaroid img {
    max-height: calc(100dvh - 275px);
  }
  .polaroid-caption {
    min-height: 112px;
    padding: 15px 10px 16px;
  }
  .polaroid-date { font-size: .8rem; }
  .polaroid-title { font-size: 1.65rem; }
  .polaroid-handle { font-size: .82rem; }
  .lightbox-prev { left: 18px; }
  .lightbox-next { right: 18px; }
}

@media (max-width: 699px) {
  .site-header .container { width: min(calc(100% - 24px), var(--max)); }
  .header-inner { gap: 9px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-mark { width: 40px; height: 40px; flex: 0 0 40px; }
  .brand-copy { min-width: 0; }
  .brand-copy strong { font-size: .82rem; }
  .brand-copy small { font-size: .59rem; }
  .header-nav { gap: 5px; }
  .nav-link { width: 42px; height: 42px; }
}

/* Lightbox Polaroid: la cornice segue davvero il rapporto della foto. */
.polaroid {
  width: auto;
  max-width: calc(100vw - 20px);
  flex: 0 0 auto;
}
.polaroid-photo {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
}
.lightbox .polaroid img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

/* Su telefono le frecce hanno una riga dedicata sotto la Polaroid. */
@media (max-width: 699px) {
  .lightbox.open {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 14px 44px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 44px auto;
    align-items: center;
    justify-items: center;
    row-gap: 8px;
    padding: calc(56px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
  }

  .polaroid {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    max-width: calc(100vw - 20px);
    max-height: 100%;
  }

  .lightbox-prev,
  .lightbox-next {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    grid-row: 2;
    width: 44px;
    height: 44px;
    transform: none;
    background: rgba(18,18,18,.96);
  }
  .lightbox-prev { grid-column: 2; }
  .lightbox-next { grid-column: 4; }

  .lightbox-actions {
    position: static;
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    margin: 0;
    transform: none;
  }
}

/* Display typography inspired by the ROOTS wordmark: bold, compact and poster-like. */
.poster-intro h1,
.page-title,
.archive-title,
.gallery-title,
.feature-date,
.feature-title,
.brand-copy strong {
  font-stretch: condensed;
}

.poster-intro h1,
.page-title,
.archive-title,
.gallery-title {
  letter-spacing: .015em;
}
