*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F2EEE8;
  --ink: #1C1917;
  --muted: rgba(28,25,23,.45);
  --white: #F2EEE8;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--ink);
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  cursor: none;
  user-select: none;
}

/* ── CURSOR ── */
#cur {
  position: fixed; z-index: 9999; pointer-events: none;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  mix-blend-mode: difference;
  transition: width .2s, height .2s;
}
#cur.big { width: 56px; height: 56px; }

/* ── SLIDES CONTAINER ── */
#stage {
  position: fixed; inset: 0;
  overflow: hidden;
}

/* Each slide */
.slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .75s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.slide.active {
  opacity: 1;
  pointer-events: all;
  z-index: 1;
}
.slide.prev-out {
  opacity: 0;
  z-index: 0;
}

/* Photo */
.slide-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform .75s cubic-bezier(.4,0,.2,1);
}
.slide.active .slide-bg {
  transform: scale(1);
}

/* ── MOBILE: vertical slide transitions ── */
@media (max-width: 700px) {
  #stage { touch-action: none; }
  .slide { opacity: 1; }
  .slide:not(.active) { transform: translateY(100%); }
  .slide.active { transform: translateY(0); z-index: 2; }
  .slide-bg { transform: scale(1) !important; transition: none !important; }
}

/* Dark gradient overlay */
.slide-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top,  rgba(10,9,8,.72) 0%, rgba(10,9,8,.18) 45%, transparent 100%),
    linear-gradient(to bottom, rgba(10,9,8,.45) 0%, transparent 30%);
}

/* ── NAV BAR ── */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  padding: 28px 36px 0;
  pointer-events: none;
}

.tb-logo {
  flex: 0 0 auto;
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: #fff;
  line-height: 1.15;
  pointer-events: all;
  cursor: none;
}
.tb-logo span {
  display: block; font-size: .58rem; font-style: normal;
  font-family: 'DM Sans', sans-serif; font-weight: 300;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.5); margin-top: 3px;
}

.tb-nav {
  flex: 1;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-left: 60px;
  pointer-events: all;
}
.tb-col { display: flex; flex-direction: column; gap: 3px; }
.tb-col a, .tb-col span {
  font-size: .72rem; letter-spacing: .06em;
  color: rgba(255,255,255,.75); text-decoration: none;
  cursor: none; transition: color .15s; white-space: nowrap;
}
.tb-col a:hover { color: #fff; }
.tb-col a.nav-main { font-size: .75rem; font-weight: 400; color: rgba(255,255,255,.9); }

.tb-clock {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px; pointer-events: none;
}
.tb-clock-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .6;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:.6} 50%{opacity:.2} }
.tb-clock-time {
  font-size: .72rem; color: rgba(255,255,255,.6);
  font-variant-numeric: tabular-nums; letter-spacing: .06em;
}

/* ── BOTTOM UI ── */
#bottom {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100; padding: 0 36px 32px;
  display: flex; align-items: flex-end; justify-content: space-between;
  pointer-events: none;
}
.bottom-left { pointer-events: all; }
.slide-number { font-size: .72rem; letter-spacing: .06em; color: rgba(255,255,255,.55); margin-bottom: 6px; }
.slide-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(3.8rem, 8.5vw, 7.5rem);
  line-height: .92; color: #fff; letter-spacing: -.01em;
  overflow: hidden; height: calc(clamp(3.8rem, 8.5vw, 7.5rem) * .98);
}
.slide-title-inner { display: block; }
.slide-caption {
  font-size: .72rem; color: rgba(255,255,255,.5);
  letter-spacing: .04em; margin-top: 10px;
  font-style: italic; font-family: 'DM Serif Display', serif;
  overflow: hidden; height: 1.1em;
}
.slide-caption-inner { display: block; }

/* Prev / Next */
.nav-prev, .nav-next {
  position: fixed; top: 50%; z-index: 100;
  transform: translateY(-50%);
  background: none; border: none;
  font-family: 'DM Sans', sans-serif; font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.55); cursor: none;
  pointer-events: all; transition: color .2s; padding: 20px 0;
}
.nav-prev { left: 36px; }
.nav-next { right: 36px; }
.nav-prev:hover, .nav-next:hover { color: #fff; }

.bottom-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: all;
}
.bottom-right a {
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.5); text-decoration: none; cursor: none; transition: color .2s;
}
.bottom-right a:hover { color: #fff; }
.bottom-copyright { font-size: .65rem; color: rgba(255,255,255,.3); letter-spacing: .06em; margin-top: 4px; }

/* ── PROGRESS DOTS ── */
#dots {
  position: fixed; right: 36px; top: 50%;
  transform: translateY(-50%); z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; margin-right: -4px;
}
.dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.3); transition: background .3s, transform .3s; }
.dot.on { background: #fff; transform: scale(1.4); }

/* ── PANEL (Chi sono) ── */
#panel {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg); display: flex;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .45s ease;
}
#panel.open { opacity: 1; pointer-events: all; }
.panel-inner { max-width: 560px; padding: 48px; text-align: center; }
.panel-inner h2 {
  font-family: 'DM Serif Display', serif; font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  color: var(--ink); line-height: 1.1; margin-bottom: 28px;
}
.panel-inner h2 em { font-style: italic; color: #7A6A55; }
.panel-inner p { font-size: .88rem; line-height: 1.85; color: #6B6258; font-weight: 300; margin-bottom: 14px; }
.panel-inner .sports { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 32px; }
.panel-inner .sports span {
  font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
  color: #9A8F82; border: 1px solid #D4CEC5; padding: 6px 14px; border-radius: 99px;
}
.panel-close {
  position: absolute; top: 36px; right: 40px;
  background: none; border: none; font-size: .65rem; letter-spacing: .18em;
  text-transform: uppercase; color: #9A8F82; cursor: none; transition: color .2s;
}
.panel-close:hover { color: var(--ink); }

/* ── CONTACT PANEL ── */
#cpanel {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .45s ease;
}
#cpanel.open { opacity: 1; pointer-events: all; }
.cpanel-inner { text-align: center; }
.cpanel-inner h2 {
  font-family: 'DM Serif Display', serif; font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  color: var(--ink); margin-bottom: 40px;
}
.cpanel-inner h2 em { font-style: italic; color: #7A6A55; }
.clinks { display: flex; flex-direction: column; gap: 20px; }
.clinks .clbl { font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; color: #9A8F82; margin-bottom: 4px; }
.clinks a { font-family: 'DM Serif Display', serif; font-size: 1.6rem; color: var(--ink); text-decoration: none; cursor: none; transition: color .2s; }
.clinks a:hover { color: #7A6A55; }
.cpanel-close {
  position: absolute; top: 36px; right: 40px;
  background: none; border: none; font-size: .65rem; letter-spacing: .18em;
  text-transform: uppercase; color: #9A8F82; cursor: none; transition: color .2s;
}
.cpanel-close:hover { color: var(--ink); }

/* ── INDEX PANEL ── */
#ipanel {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .45s ease;
}
#ipanel.open { opacity: 1; pointer-events: all; }
.ipanel-close {
  position: absolute; top: 36px; right: 40px;
  background: none; border: none; font-size: .65rem; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(255,255,255,.4); cursor: none; transition: color .2s;
}
.ipanel-close:hover { color: #fff; }
.ilist { width: min(720px, 90vw); }
.ilist-title {
  font-size: .6rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.3); margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 12px;
}
.irow {
  display: flex; align-items: center; padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  cursor: none; transition: opacity .2s; gap: 24px;
}
.irow:hover { opacity: .6; }
.irow .inum { font-size: .62rem; color: rgba(255,255,255,.25); width: 28px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.irow img { width: 58px; height: 42px; object-fit: cover; opacity: .85; flex-shrink: 0; }
.irow .ititle { font-family: 'DM Serif Display', serif; font-size: 1.5rem; color: #fff; flex: 1; }
.irow .isport { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.3); flex-shrink: 0; }

/* ── HAMBURGER ── */
#burger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
  position: fixed; top: 24px; right: 20px; z-index: 300;
}
#burger span {
  display: block; width: 22px; height: 1.5px; background: #fff;
  border-radius: 2px; transform-origin: center;
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
}
#burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#burger.open span:nth-child(2) { opacity: 0; width: 0; }
#burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE MENU ── */
#mobile-menu {
  position: fixed; inset: 0; z-index: 250;
  background: var(--ink); display: flex;
  flex-direction: column; justify-content: space-between;
  padding: 100px 32px 48px;
  opacity: 0; pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .35s ease, transform .35s ease;
}
#mobile-menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.mmenu-links { display: flex; flex-direction: column; gap: 0; }
.mmenu-links a, .mmenu-links button {
  font-family: 'DM Serif Display', serif; font-size: clamp(2.2rem, 9vw, 3rem);
  color: rgba(255,255,255,.85); text-decoration: none;
  background: none; border: none; text-align: left;
  padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.08);
  cursor: pointer; transition: color .2s;
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; line-height: 1;
}
.mmenu-links a:hover, .mmenu-links button:hover { color: #fff; }
.mmenu-links a .mlabel, .mmenu-links button .mlabel {
  font-family: 'DM Sans', sans-serif; font-size: .58rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.3); font-weight: 300;
}
.mmenu-bottom { display: flex; flex-direction: column; gap: 6px; }
.mmenu-bottom a { font-size: .78rem; color: rgba(255,255,255,.4); text-decoration: none; letter-spacing: .04em; }
.mmenu-copy { font-size: .62rem; color: rgba(255,255,255,.2); letter-spacing: .08em; margin-top: 8px; }

/* ── SWIPE HINT ── */
#swipe-hint {
  display: none; position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%); z-index: 100;
  flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none; animation: hintFade 3.5s ease forwards;
}
@keyframes hintFade {
  0%   { opacity: 0; transform: translateX(-50%) translateY(6px); }
  20%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}
#swipe-hint .hint-arrow {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.6));
  animation: arrowBob 1.1s ease-in-out infinite;
}
@keyframes arrowBob {
  0%,100% { transform: scaleY(1) translateY(0); }
  50%     { transform: scaleY(1.15) translateY(4px); }
}
#swipe-hint .hint-text { font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.45); }

/* ── RESPONSIVE ── */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

@media (max-width: 700px) {
  #swipe-hint { display: flex; }
  #topbar { padding: 20px 20px 0; }
  .tb-nav { display: none; }
  .tb-clock { display: none; }
  #burger { display: flex; }
  #bottom { padding: 0 20px 32px; }
  .nav-prev { left: 12px; font-size: .6rem; }
  .nav-next { right: 12px; font-size: .6rem; }
  #dots { display: none; }
  .slide-title { height: calc(clamp(3.8rem, 8.5vw, 7.5rem) * 1.1); }
}
