/* ==========================================================================
   TROGLOTARY CLUB — AB ILLO TEMPORE
   Foglio di Stile Ufficiale dell'Istituzione
   ========================================================================== */

:root {
  /* Palette Istituzionale Solenne */
  --color-bg: #0d131a;
  --color-surface: #141c26;
  --color-surface-elevated: #1b2633;
  --color-surface-hover: #233142;
  
  --color-stone-dark: #1e2530;
  --color-stone-mid: #3a4756;
  --color-stone-light: #6a7b8e;
  
  --color-parchment: #f4efe4;
  --color-parchment-muted: #c8c0b0;
  --color-parchment-faded: #8d8778;
  
  /* Accenti Oro Lichene (ispirati al Rotary ma invecchiati/archeologici) */
  --color-gold: #cba343;
  --color-gold-light: #e4c570;
  --color-gold-dark: #9e7a25;
  --color-gold-glow: rgba(203, 163, 67, 0.25);

  --color-danger: #c94b4b;
  --color-success: #4ba377;
  
  /* Font Stately & Monolitici */
  --font-serif: 'Cinzel', 'Trajan Pro', 'Cinzel Decorative', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --border-subtle: 1px solid rgba(203, 163, 67, 0.18);
  --border-stone: 1px solid rgba(255, 255, 255, 0.08);
  --shadow-deep: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 30px -5px rgba(203, 163, 67, 0.2);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-bg);
}

body {
  font-family: var(--font-body);
  color: var(--color-parchment);
  background-color: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sottile texture pietra/sabbia di sfondo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(203, 163, 67, 0.07) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(30, 45, 65, 0.4) 0%, transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.005) 0px, rgba(255, 255, 255, 0.005) 2px, transparent 2px, transparent 6px);
  pointer-events: none;
  z-index: 0;
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-gold-light);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--color-gold);
}

/* Tipografia Solenne */
h1, h2, h3, h4, .stately-title {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-parchment);
  line-height: 1.25;
}

.text-gold {
  color: var(--color-gold);
}

.text-muted {
  color: var(--color-parchment-faded);
}

.latin-motto {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 860px;
}

/* ==========================================================================
   HEADER & NAVBAR ISTITUZIONALE
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(13, 19, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: var(--border-subtle);
  transition: var(--transition-smooth);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  max-width: 1240px;
  margin: 0 auto;
}

/* Brand e Ruota Scolpita */
.brand-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-parchment);
  text-decoration: none;
}

.brand-wheel-wrapper {
  width: 48px;
  height: 48px;
  position: relative;
  flex-shrink: 0;
}

.brand-wheel {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 52% 48%; /* Centro leggermente sfalsato per rendere il traballio manuale */
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brand-link:hover .brand-wheel {
  transform: rotate(360deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-parchment);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-subtitle {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--color-gold);
  text-transform: uppercase;
}

/* Menu di Navigazione */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.75rem;
}

.nav-item a {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-parchment-muted);
  position: relative;
  padding: 0.4rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
  transition: width 0.3s ease;
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--color-parchment);
}

.nav-item a:hover::after,
.nav-item a.active::after {
  width: 100%;
}

.nav-lock-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  background-color: rgba(203, 163, 67, 0.15);
  border: 1px solid var(--color-gold);
  border-radius: 4px;
  color: var(--color-gold-light);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-stone-mid);
  color: var(--color-parchment);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.25rem;
}

/* ==========================================================================
   ANIMAZIONE RUOTA CHE ROTOLA & TRABALLA
   "entra rotolando da sinistra e si ferma al centro... Traballa.
   Essendo scolpita a mano non è perfettamente tonda"
   ========================================================================== */
@keyframes wheelRollInWobble {
  0% {
    transform: translateX(-150vw) rotate(-720deg) translateY(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
    transform: translateX(-100vw) rotate(-480deg) translateY(-14px);
  }
  40% {
    transform: translateX(-60vw) rotate(-300deg) translateY(12px);
  }
  60% {
    transform: translateX(-30vw) rotate(-160deg) translateY(-10px);
  }
  80% {
    transform: translateX(-10vw) rotate(-50deg) translateY(6px);
  }
  92% {
    transform: translateX(4vw) rotate(15deg) translateY(-4px);
  }
  100% {
    transform: translateX(0) rotate(0deg) translateY(0);
    opacity: 1;
  }
}

@keyframes wheelIdleTurn {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes gentleWobble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(1deg); }
  50% { transform: translateY(2px) rotate(-1.5deg); }
  75% { transform: translateY(-1px) rotate(0.5deg); }
}

/* ==========================================================================
   SPLASH SCREEN D'APERTURA (OVERLAY SOVRANO)
   ========================================================================== */
.splash-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #18222d 0%, #080c11 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
}

.splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-wheel-stage {
  width: 220px;
  height: 220px;
  margin-bottom: 2.2rem;
  position: relative;
  perspective: 1000px;
}

.splash-wheel-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8));
  transform-origin: 52% 48%; /* Eccentricità manuale della ruota */
}

/* Quando parte l'animazione */
.splash-wheel-img.rolling {
  animation: wheelRollInWobble 2.2s cubic-bezier(0.25, 0.85, 0.3, 1) forwards;
}

.splash-wheel-img:hover {
  cursor: grab;
  animation: wheelIdleTurn 8s linear infinite;
}

.splash-latin {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  letter-spacing: 0.35em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.8s ease 1.8s;
}

.splash-title {
  font-size: 2.6rem;
  font-family: var(--font-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--color-parchment);
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.8s ease 2.0s;
}

.splash-desc {
  color: var(--color-parchment-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-style: italic;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.8s ease 2.2s;
}

.splash-revealed .splash-latin,
.splash-revealed .splash-title,
.splash-revealed .splash-desc,
.splash-revealed .splash-actions {
  opacity: 1;
  transform: translateY(0);
}

.splash-actions {
  display: flex;
  gap: 1rem;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.8s ease 2.4s;
}

/* Pulsanti Istituzionali */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: #0b1118;
  border: 1px solid var(--color-gold-light);
  box-shadow: 0 4px 15px rgba(203, 163, 67, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(203, 163, 67, 0.45);
  color: #000;
}

.btn-outline {
  background: transparent;
  color: var(--color-parchment);
  border: 1px solid var(--color-stone-mid);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* ==========================================================================
   HERO SECTION (HOMEPAGE)
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 5rem 0 4rem;
  text-align: center;
  overflow: hidden;
  border-bottom: var(--border-stone);
}

.hero-emblem-wrapper {
  width: 170px;
  height: 170px;
  margin: 0 auto 2rem;
  position: relative;
}

.hero-emblem {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
  transform-origin: 52% 48%;
  cursor: pointer;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-emblem:hover {
  transform: rotate(360deg);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-family: var(--font-serif);
  letter-spacing: 0.06em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--color-parchment-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   SEZIONE VALORI E MANIFESTO
   ========================================================================== */
.section-padding {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-eyebrow {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--color-gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.2rem;
  color: var(--color-parchment);
  margin-bottom: 0.8rem;
}

.section-subtitle {
  color: var(--color-parchment-faded);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1rem;
}

/* Griglia Istituzionale (Cards) */
.institution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.troglo-card {
  background-color: var(--color-surface);
  border: var(--border-stone);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  position: relative;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.troglo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(203, 163, 67, 0.4);
  box-shadow: var(--shadow-deep);
}

.card-num {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  color: rgba(203, 163, 67, 0.2);
  line-height: 1;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
  color: var(--color-parchment);
}

.card-text {
  color: var(--color-parchment-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* Call to action card (Area riservata) */
.card-featured {
  background: linear-gradient(145deg, #182433 0%, #111a24 100%);
  border: 1px solid rgba(203, 163, 67, 0.35);
  position: relative;
  overflow: hidden;
}

.card-featured::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(203, 163, 67, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ==========================================================================
   PAGINA "LA STORIA" (CAPITOLI & REPERTI)
   ========================================================================== */
.history-hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
  border-bottom: var(--border-stone);
  background: radial-gradient(circle at 50% 0%, rgba(203, 163, 67, 0.08) 0%, transparent 70%);
}

.history-article {
  padding: 4rem 0;
}

.chapter-block {
  margin-bottom: 4.5rem;
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid rgba(203, 163, 67, 0.3);
}

.chapter-number {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.chapter-title {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  margin-bottom: 1.5rem;
  color: var(--color-parchment);
}

.chapter-content p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--color-parchment-muted);
  margin-bottom: 1.3rem;
}

.chapter-content p strong {
  color: var(--color-parchment);
}

.chapter-content blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-gold-light);
  border-left: 3px solid var(--color-gold);
  padding: 0.8rem 1.5rem;
  margin: 1.8rem 0;
  background: rgba(203, 163, 67, 0.05);
}

/* Capitolo IV "La Rifondazione" (Pending) */
.chapter-pending {
  border-left-style: dashed;
  border-left-color: var(--color-stone-mid);
  opacity: 0.85;
}

.pending-stamp {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border: 1px dashed var(--color-gold);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-gold-light);
  border-radius: 4px;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

/* ==========================================================================
   REPERTI FOTOGRAFICI COMPLOTTISTI (INTERATTIVI)
   "immagini famose in cui, ingrandendo all'inverosimile un dettaglio,
    compare la ruota di pietra... zoom che parte al clic"
   ========================================================================== */
.reperti-section {
  background-color: var(--color-surface);
  border-top: var(--border-stone);
  border-bottom: var(--border-stone);
  padding: 4.5rem 0;
  margin: 3rem 0;
}

.reperti-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.reperti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.reperto-card {
  background-color: var(--color-bg);
  border: var(--border-stone);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.reperto-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-deep);
}

.reperto-viewport {
  position: relative;
  width: 100%;
  height: 240px;
  background-color: #06090d;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sfondo del reperto (disegno o composizione) */
.reperto-visual {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dettaglio ingrandito con la ruota */
.reperto-wheel-secret {
  position: absolute;
  width: 32px;
  height: 32px;
  opacity: 0.15;
  transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* Stato ZOOM attivo sul reperto */
.reperto-card.is-zoomed .reperto-visual {
  transform: scale(7.5);
  filter: contrast(1.4) brightness(1.1);
}

.reperto-card.is-zoomed .reperto-wheel-secret {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(203, 163, 67, 0.8));
}

.zoom-crosshair {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px dashed rgba(203, 163, 67, 0.4);
  margin: 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reperto-card:hover .zoom-crosshair {
  opacity: 1;
}

.zoom-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--color-gold);
  color: var(--color-gold-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
}

.reperto-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.reperto-id {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.reperto-title {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--color-parchment);
}

.reperto-caption {
  font-size: 0.9rem;
  color: var(--color-parchment-muted);
  font-style: italic;
  border-left: 2px solid var(--color-gold-dark);
  padding-left: 0.8rem;
  margin-top: auto;
}

.reperto-action-hint {
  font-size: 0.75rem;
  color: var(--color-parchment-faded);
  margin-top: 0.8rem;
  text-align: right;
  font-family: var(--font-mono);
}

/* ==========================================================================
   AREA RISERVATA SOCI (AUTENTICAZIONE & BIOGRAFIE)
   ========================================================================== */
.auth-gate {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-box {
  background-color: var(--color-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-deep);
  position: relative;
}

.auth-lock-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(203, 163, 67, 0.1);
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  font-size: 1.8rem;
}

.auth-title {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

.auth-subtitle {
  color: var(--color-parchment-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group {
  position: relative;
  text-align: left;
}

.input-label {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.4rem;
}

.input-field {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-stone-mid);
  border-radius: var(--radius-sm);
  color: var(--color-parchment);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-smooth);
}

.input-field:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(203, 163, 67, 0.2);
}

.auth-error {
  display: none;
  padding: 0.75rem 1rem;
  background-color: rgba(201, 75, 75, 0.15);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-sm);
  color: #ff9d9d;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-4px); }
}

/* Area Membri Sbloccata */
.members-view {
  display: none;
  padding: 4rem 0;
}

.members-view.is-unlocked {
  display: block;
}

.session-bar {
  background-color: var(--color-surface);
  border-bottom: var(--border-stone);
  padding: 0.75rem 1.5rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-sm);
}

.session-status {
  font-size: 0.85rem;
  color: var(--color-gold-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.session-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-success);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
}

/* Griglia dei Membri (Schede) */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.2rem;
  margin-bottom: 5rem;
}

.member-card {
  background-color: var(--color-surface);
  border: var(--border-stone);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.member-card:hover {
  transform: translateY(-5px);
  border-color: rgba(203, 163, 67, 0.45);
  box-shadow: var(--shadow-deep);
}

.member-photo-frame {
  width: 100%;
  height: 380px;
  background-color: #0b1118;
  position: relative;
  overflow: hidden;
}

.member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  filter: grayscale(15%) contrast(1.05);
}

.member-card:hover .member-photo {
  transform: scale(1.04);
  filter: grayscale(0%) contrast(1.05);
}

/* Avatar segnaposto se la foto non è ancora arrivata */
.member-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #16202c 0%, #0d131b 100%);
  color: var(--color-stone-mid);
  padding: 2rem;
  text-align: center;
}

.placeholder-wheel {
  width: 80px;
  height: 80px;
  opacity: 0.4;
  margin-bottom: 1rem;
}

.placeholder-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-gold);
  letter-spacing: 0.1em;
}

.member-info {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.member-header {
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 1rem;
}

.member-name {
  font-size: 1.35rem;
  color: var(--color-parchment);
  margin-bottom: 0.35rem;
}

.member-nickname {
  color: var(--color-gold);
  font-style: italic;
}

.member-title {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--color-gold-light);
  text-transform: uppercase;
}

.member-bio {
  color: var(--color-parchment-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
}

.member-badge-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background-color: rgba(203, 163, 67, 0.1);
  border: 1px solid rgba(203, 163, 67, 0.3);
  color: var(--color-gold-light);
  border-radius: 3px;
  margin-top: 1rem;
  align-self: flex-start;
}

/* ==========================================================================
   GALLERIA FOTO DI GRUPPO
   ========================================================================== */
.gallery-section {
  padding: 4rem 0 2rem;
  border-top: var(--border-stone);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.gallery-card {
  background-color: var(--color-surface);
  border: var(--border-stone);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-gold);
}

.gallery-photo-wrapper {
  height: 280px;
  overflow: hidden;
  background-color: #000;
  cursor: pointer;
}

.gallery-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-photo-wrapper:hover .gallery-photo {
  transform: scale(1.05);
}

.gallery-caption-box {
  padding: 1.25rem 1.5rem;
}

.gallery-tag {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  color: var(--color-gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.gallery-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.gallery-desc {
  font-size: 0.85rem;
  color: var(--color-parchment-muted);
}

/* ==========================================================================
   FOOTER ISTITUZIONALE
   ========================================================================== */
.site-footer {
  background-color: #080c10;
  border-top: var(--border-subtle);
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 10;
  margin-top: auto;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 3rem;
}

.footer-wheel {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 1.2rem;
  transform-origin: 52% 48%;
  transition: transform 0.8s ease;
}

.footer-wheel:hover {
  transform: rotate(360deg);
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.footer-quote {
  max-width: 580px;
  color: var(--color-parchment-faded);
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-parchment-muted);
}

.footer-nav a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.footer-troglo-note {
  font-size: 0.82rem;
  color: var(--color-parchment-faded);
  max-width: 680px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   MODALE LIGHTBOX (PER FOTO)
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.lightbox-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-stone-mid);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ==========================================================================
   ACCESSIBILITÀ & RESPONSIVE
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .splash-wheel-img.rolling,
  .brand-wheel,
  .hero-emblem,
  .footer-wheel {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background-color: rgba(13, 19, 26, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: var(--border-stone);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateY(-150%);
    transition: transform 0.4s ease;
  }

  .nav-menu.is-active {
    transform: translateY(0);
  }

  .chapter-block {
    padding-left: 1rem;
  }

  .auth-box {
    padding: 2rem 1.5rem;
  }

  .member-photo-frame {
    height: 320px;
  }
}
