/* =============================================
   RAIMONDO FERLITO — Portfolio Artistico
   Dark Theme · Elegante · Moderno
   ============================================= */

/* --- Font: Inter (self-hosted, licenza OFL) --- */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Font: Space Grotesk (self-hosted, licenza OFL) — usato per i titoli --- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0d0d;
  --bg-alt:    #111111;
  --surface:   #1a1a1a;
  --border:    #2a2a2a;
  --text:      #e8e4dc;
  --text-muted:#8a8580;
  --accent:    #c9a96e;
  --accent-dim:#7a5f35;
  --white:     #ffffff;

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  --radius:  4px;
  --gap:     2rem;
  --max-w:   1200px;
  --nav-h:   70px;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* --- Container --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s;
}

.nav.scrolled {
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--text-muted);
  transition: color 0.25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =============================================
   SPLASH INIZIALE
   ============================================= */
.no-splash #splash {
  display: none;
}

.no-splash body.has-splash {
  overflow: visible;
}

body.has-splash {
  overflow: hidden;
}

#page {
  opacity: 0;
}

.no-splash #page {
  opacity: 1;
  transition: none;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 clamp(2rem, 8vw, 7rem);
  cursor: pointer;
  transition: opacity 1.2s ease-out, visibility 1.2s;
}

.splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background:
    linear-gradient(to right, transparent 70%, var(--bg) 100%),
    url('../img/splash_foto.jpg') right center/cover no-repeat;
  animation: splash-focus 1.4s ease-out forwards;
  pointer-events: none;
}

@media (max-width: 600px) {
  .splash::before { display: none; }
}

.splash-inner {
  text-align: right;
  position: relative;
  z-index: 1;
}

.splash-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1.05;
  color: var(--white);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.7);
}

.splash-hint {
  position: absolute;
  bottom: 2.5rem;
  right: clamp(2rem, 8vw, 7rem);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: splash-pulse 2.2s ease-in-out infinite;
}

@keyframes splash-focus {
  from { filter: blur(12px); opacity: 0; }
  to   { filter: blur(0);    opacity: 0.85; }
}

@keyframes splash-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  gap: clamp(60px, 8vw, 120px);
  align-items: stretch;
  padding: 0 clamp(40px, 6vw, 100px);
  pointer-events: none;
}

.hero-line {
  flex: 0 0 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 20%, var(--border) 80%, transparent);
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--nav-h) 1rem 0;
}

.hero-subtitle {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 3rem;
}

.btn-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  transition: color 0.25s, border-color 0.25s;
}

.btn-scroll:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent-dim);
  font-family: var(--font-sans);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--white);
}

/* =============================================
   GALLERY — OPERE
   ============================================= */
.opere-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.year-filter-wrap {
  position: sticky;
  top: 5rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.year-arrow {
  font-size: 0.55rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.25s;
  cursor: pointer;
  line-height: 1;
  padding: 0.3rem 0.5rem;
  user-select: none;
}

.year-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.year-filter::-webkit-scrollbar { display: none; }

.year-filter .filter-btn {
  text-align: left;
  width: 100%;
}

.gallery-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.25s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item.hidden { display: none; }

.gallery-year-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 -0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.gallery-year-divider:first-child { margin-top: 0; }

.gallery-year-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.gallery-img-wrap {
  position: absolute;
  inset: 0;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery-item:hover .gallery-img-wrap img {
  transform: scale(1.04);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom {
  font-size: 2rem;
  color: var(--white);
  line-height: 1;
}

.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.85rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  pointer-events: none;
}

.gallery-caption-title {
  font-size: 0.78rem;
  color: var(--white);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-caption-year {
  font-size: 0.72rem;
  color: var(--accent);
  flex-shrink: 0;
}

.gallery-placeholder {
  margin-top: 2rem;
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.gallery-placeholder a {
  color: var(--accent);
  text-decoration: underline;
}

.gallery-placeholder code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  font-size: 0.85em;
}

/* =============================================
   EVENTI
   ============================================= */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.event-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
}

.event-card--gallery {
  cursor: pointer;
}

.event-card--gallery:hover {
  border-color: var(--accent);
}

.event-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}

.event-gallery-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(13,13,13,0.75);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.event-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.event-card:hover .event-img img {
  transform: scale(1.04);
}

.event-info {
  padding: 1.25rem;
}

.event-year {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}

.event-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.event-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =============================================
   BIOGRAFIA
   ============================================= */
.bio-intro-wrap {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.bio-intro {
  flex: 3;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
  text-align: justify;
}

.bio-intro-wrap .bio-photo {
  flex: 1;
  margin: 0;
  max-width: none;
  cursor: zoom-in;
}

.bio-intro p + p { margin-top: 1rem; }
.bio-intro em { color: var(--accent); font-style: italic; }

.bio-critics {
  margin-bottom: 3.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.bio-subtitle {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
}

.critics-list {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.bio-timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child { border-bottom: none; }

.tl-year {
  flex: 0 0 3rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 0.15rem;
}

.tl-content strong {
  display: block;
  font-size: 0.9rem;
  color: var(--white);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.tl-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.timeline-more {
  margin-top: 1rem;
}

.link-expand {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.link-expand:hover { opacity: 0.7; }

.link-expand.is-hidden { display: none; }

.accordion-collettive { display: flex; flex-direction: column; }

.accordion-year { border-bottom: 1px solid var(--border); }

.accordion-year:last-child { border-bottom: none; }

.accordion-year-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.accordion-year-header::-webkit-details-marker { display: none; }

.accordion-year-header .tl-year {
  flex: 0 0 3rem;
  padding-top: 0;
}

.accordion-count {
  flex: 1;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.accordion-chevron {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.2s;
}

.accordion-year[open] .accordion-chevron { transform: rotate(45deg); }

.accordion-year-body {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.5rem;
}

.accordion-year-body .timeline-item {
  border-bottom: none;
  padding: 0.4rem 0;
}

.bio-photo {
  margin-top: 3rem;
  max-width: 360px;
}

.bio-photo-slides {
  position: relative;
  aspect-ratio: 2439 / 3865;
  width: 100%;
}

.bio-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  filter: grayscale(15%);
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.bio-slide.active {
  opacity: 1;
}

.bio-photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  filter: grayscale(15%);
}

.bio-photo figcaption {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* =============================================
   NÒSTOS
   ============================================= */
.nostos-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.nostos-lead {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.nostos-text p {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.nostos-text em { color: var(--text); font-style: italic; }

.nostos-credit {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  color: var(--text-muted) !important;
  margin-top: 1.5rem !important;
}

.nostos-img {
  position: relative;
}

.nostos-img img {
  width: 100%;
  border-radius: var(--radius);
  filter: grayscale(20%);
}

.nostos-img::before {
  content: '';
  position: absolute;
  inset: -1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  pointer-events: none;
}

/* =============================================
   TESTI CRITICI
   ============================================= */
.critics-intro {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.critics-list {
  border-top: 1px solid var(--border);
}

.critic-item {
  border-bottom: 1px solid var(--border);
}

.critic-trigger {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  background: none;
  border: none;
  padding: 1.1rem 0.25rem;
  cursor: pointer;
  text-align: left;
  transition: padding-left 0.25s;
}

.critic-trigger:hover {
  padding-left: 0.75rem;
}

.critic-trigger-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  transition: color 0.25s;
}

.critic-trigger:hover .critic-trigger-name {
  color: var(--accent);
}

.critic-trigger-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  flex: 1;
}

.critic-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.25s, color 0.25s;
}

.critic-trigger:hover .critic-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.critics-decor-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 3.5rem;
}

.critics-decor {
  display: flex;
  gap: 1rem;
  max-width: 360px;
}

.critics-decor-right {
  width: calc((360px - 1rem) / 2);
  flex-shrink: 0;
}

.critics-decor-right img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius);
  filter: grayscale(35%) brightness(0.85);
  opacity: 0.85;
  transition: opacity 0.3s, filter 0.3s;
}

.critics-decor-right img:hover {
  opacity: 1;
  filter: grayscale(10%) brightness(1);
}

.critics-decor img {
  width: 50%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius);
  filter: grayscale(35%) brightness(0.85);
  opacity: 0.85;
  transition: opacity 0.3s, filter 0.3s;
}

.critics-decor img:hover {
  opacity: 1;
  filter: grayscale(10%) brightness(1);
}

/* Pannello di lettura */
.critic-reader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  overflow-y: auto;
}

.critic-reader.open {
  opacity: 1;
  pointer-events: all;
}

.critic-reader-inner {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  padding: 2.5rem clamp(1.5rem, 5vw, 3.5rem);
  transform: translateY(12px);
  transition: transform 0.3s var(--ease);
}

.critic-reader.open .critic-reader-inner {
  transform: translateY(0);
}

.critic-reader-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}

.critic-reader-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.critic-reader-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  padding-right: 2.5rem;
}

.critic-reader-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.critic-reader-meta {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.critic-reader-body p {
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.1rem;
}

.critic-reader-body p:last-child {
  margin-bottom: 0;
}

/* =============================================
   CONTATTI
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child { border-bottom: none; padding-bottom: 0; }

.contact-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-value {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
}

.contact-value a {
  transition: color 0.2s;
}

.contact-value a:hover { color: var(--accent); }

.contact-map {
  position: relative;
  display: block;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.map-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  transition: transform 0.4s var(--ease);
}

.contact-map:hover .map-grid {
  transform: scale(1.05);
}

.map-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(45%) brightness(0.55) contrast(1.15);
  transition: filter 0.3s;
}

.contact-map:hover .map-grid img {
  filter: grayscale(30%) brightness(0.65) contrast(1.15);
}

.map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
  pointer-events: none;
}

.map-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  pointer-events: none;
}

.map-overlay p {
  font-size: 0.88rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.map-cta {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.contact-decor {
  margin-top: 1.25rem;
}

.contact-decor img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  filter: grayscale(35%) brightness(0.85);
  opacity: 0.85;
  transition: opacity 0.3s, filter 0.3s;
}

.contact-decor img:hover {
  opacity: 1;
  filter: grayscale(10%) brightness(1);
}

.contact-decor figcaption {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* =============================================
   BACK TO TOP
   ============================================= */
#back-to-top {
  position: fixed;
  bottom: calc(var(--nav-h, 3.5rem) + 1.25rem);
  right: 2rem;
  z-index: 99;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(8px);
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:hover {
  transform: translateY(-3px);
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}

.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s;
  z-index: 10;
}

.lightbox.has-nav .lightbox-prev,
.lightbox.has-nav .lightbox-next {
  display: flex;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 600px) {
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

/* Galleria evento (Camelot / Pensieri Complementari) */
.event-gallery {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  overflow-y: auto;
}

.event-gallery.open {
  opacity: 1;
  pointer-events: all;
}

.event-gallery-inner {
  position: relative;
  max-width: 960px;
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
}

.event-gallery-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-alt);
  margin: 0 calc(-1 * clamp(1.25rem, 4vw, 2.5rem));
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.event-gallery-close {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}

.event-gallery-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.event-gallery-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
}

.event-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}

.event-gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s;
}

.event-gallery-grid img:hover {
  opacity: 0.75;
}

.lightbox-info {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
}

.lightbox-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.lightbox-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .bio-timeline { grid-template-columns: 1fr; gap: 2.5rem; }
  .nostos-content { grid-template-columns: 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(13,13,13,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    max-height: 400px;
    padding: 1.5rem 0;
  }

  .nav-links li { width: 100%; text-align: center; }

  .nav-links a {
    display: block;
    padding: 0.9rem 2rem;
    font-size: 0.9rem;
  }

  .nav-toggle { display: flex; }

  .section { padding: 4rem 0; }

  .events-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
  .bio-intro-wrap { flex-direction: column; }
  .bio-intro { max-width: 100%; }
  .bio-intro-wrap .bio-photo { max-width: 280px; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .critics-grid { grid-template-columns: 1fr; }
  .critics-decor-right { display: none; }
}

@media (max-width: 768px) {
  .opere-layout { flex-direction: column; gap: 1rem; align-items: stretch; }
  .year-filter-wrap { position: static; flex-direction: row; align-items: center; }
  .year-filter {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    width: 100%;
    padding-bottom: 0.25rem;
    gap: 0.4rem;
  }
  .year-filter .filter-btn { flex-shrink: 0; width: auto; }
  .year-arrow { transform: rotate(90deg); }
}

/* =============================================
   ANIMAZIONI — Scroll Reveal
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
