:root {
  --bg: #08050A;
  --bg-card: rgba(18, 11, 16, 0.65);
  --fg: #F7F2F3;
  --muted: #B5A5AA;
  --dim: #807076;
  --red: #E5243B;
  --red-d: #8E1426;
  --red-light: #FF3850;
  --red-glow: rgba(229, 36, 59, 0.4);
  --red-soft: rgba(229, 36, 59, 0.12);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --line-red: rgba(229, 36, 59, 0.35);
  --display: 'Syne', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --out: cubic-bezier(.23, 1, .32, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --pad: max(1.25rem, calc((100% - 1140px) / 2));
  --header-h: 46px;
  --header-top: calc(.8rem + env(safe-area-inset-top, 0px));
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  font: 400 1.0625rem/1.6 var(--body);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.035em;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

input, textarea, button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page-view {
  animation: pageFadeIn 220ms var(--out) both;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Luci di sfondo */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
}

.bg i {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.bg i:nth-child(1) {
  width: 65vmax;
  height: 65vmax;
  left: -20vmax;
  top: -28vmax;
  background: radial-gradient(circle, rgba(229, 36, 59, 0.45), transparent 65%);
  animation: drift 24s ease-in-out infinite alternate;
}

.bg i:nth-child(2) {
  width: 50vmax;
  height: 50vmax;
  right: -18vmax;
  top: 40vh;
  background: radial-gradient(circle, rgba(142, 20, 38, 0.5), transparent 65%);
  animation: drift 30s ease-in-out -9s infinite alternate-reverse;
}

.bg i:nth-child(3) {
  width: 34vmax;
  height: 34vmax;
  left: 30%;
  bottom: -22vmax;
  background: radial-gradient(circle, rgba(255, 120, 90, 0.16), transparent 65%);
  animation: drift 27s ease-in-out -15s infinite alternate;
}

@keyframes drift {
  to { transform: translate3d(7vmax, 5vmax, 0) scale(1.15); }
}

/* Base vetro */
.glass, .tiles, .person, .items, .bento-card, .proposte-cta, .evento-card, .seg-card, .admin-box, .form, #admin-controls, #admin-segnalazioni {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  border-radius: 24px;
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
}

/* SITE HEADER UNIFICATO */
.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  padding: var(--header-top) var(--pad) 0;
  pointer-events: none;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav, .ig-btn {
  pointer-events: auto;
}

.nav {
  position: relative;
  height: var(--header-h);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: 4px;
  border-radius: 999px;
  background: rgba(14, 8, 11, 0.72);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.9);
  overflow: visible;
  touch-action: pan-y;
}

.nav a {
  height: calc(var(--header-h) - 8px);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  padding: 0 .95rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: .92rem;
  line-height: 1;
  color: var(--muted);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  transition: background-color 140ms, color 140ms, transform 140ms var(--out), box-shadow 140ms;
}

.nav a:active {
  transform: scale(.95);
}

.nav a[aria-current] {
  background: rgba(229, 36, 59, 0.28);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(229, 36, 59, 0.55), 0 0 14px rgba(229, 36, 59, 0.35);
}

.ig-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--header-h);
  height: var(--header-h);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--fg);
  background: rgba(14, 8, 11, 0.72);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.9);
  transition: transform 140ms var(--out), color 140ms, border-color 140ms, box-shadow 140ms;
  flex-shrink: 0;
}

.ig-btn:active {
  transform: translateY(-50%) scale(.92);
}

/* Bottoni */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: 0 1.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  color: #fff;
  background: linear-gradient(180deg, #F2384E, var(--red));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 36px -8px rgba(229, 36, 59, 0.85);
  transition: transform 140ms var(--out), box-shadow 200ms;
}

.btn:active {
  transform: scale(.97);
}

.btn svg {
  flex-shrink: 0;
  transition: transform 180ms var(--out);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.btn-out {
  background: #3a3a3f;
  box-shadow: none;
}

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

@media (hover: hover) and (pointer: fine) {
  .nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
  }
  .btn:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 16px 50px -6px rgba(229, 36, 59, 1);
    transform: translateY(-2px);
  }
  .btn-glass:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
  }
  .ig-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(229, 36, 59, 0.6);
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(229, 36, 59, 0.35);
  }
}

/* Pagine generiche */
main {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--header-h) + var(--header-top) + 1.25rem) var(--pad) 4.5rem;
  min-height: calc(100svh - 60px);
}

.ph {
  max-width: 48rem;
  margin: 0 auto 2.2rem;
  text-align: center;
}

.ph h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -.03em;
  line-height: 1.1;
}

.ph p {
  margin-top: .6rem;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ============================================================
   HERO A TEMA RESET (RELOAD ORBITALS + REBOOT PULSE)
   ============================================================ */
.hero {
  min-height: calc(100svh - var(--header-h) - var(--header-top) - 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: .5rem 0 2rem;
  position: relative;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 840px;
  width: 100%;
  margin: 0 auto;
}

/* Chip superiore */
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .95rem;
  margin-bottom: 1.5rem;
  background: rgba(229, 36, 59, 0.1);
  border: 1px solid rgba(229, 36, 59, 0.35);
  border-radius: 999px;
  font: 600 .75rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #FFAAB5;
  box-shadow: 0 0 20px -4px rgba(229, 36, 59, 0.3);
}

.chip-dot, .led-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 10px #4ADE80;
  flex-shrink: 0;
  animation: ledPulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

.hero-chip .chip-dot {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: ledPulseRed 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes ledPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.85); }
}

@keyframes ledPulseRed {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px var(--red); }
  50% { opacity: .4; transform: scale(.85); box-shadow: 0 0 4px var(--red); }
}

/* Centro Logo: Anelli orbitali di reboot */
.mark-reboot {
  position: relative;
  width: clamp(140px, 18vw, 190px);
  aspect-ratio: 1;
  margin: 0 auto 1.4rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.orbit-rings {
  position: absolute;
  inset: -12px;
  pointer-events: none;
}

.orbit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orbit-circle-dash {
  fill: none;
  stroke: rgba(229, 36, 59, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 8 16 32 16;
  transform-origin: center;
  animation: spin 20s linear infinite;
}

.orbit-circle-arcs {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1.2;
  stroke-dasharray: 40 80;
  transform-origin: center;
  animation: spin-reverse 14s linear infinite;
}

.orbit-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(229, 36, 59, 0.22);
}

.orbit-ring-mid {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  animation: spin 32s linear infinite;
}

/* Glow di base attorno al logo */
.mark-reboot::before {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: conic-gradient(transparent 0 35%, var(--red), #FF7A5A, transparent 85%);
  filter: blur(34px);
  opacity: .75;
  animation: spin 10s linear infinite;
}

.mark-core {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 30px 90px -10px rgba(229, 36, 59, 0.8), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
  transition: transform 300ms var(--spring);
}

.mark-core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mark-reboot:hover .mark-core {
  transform: scale(1.04);
}

/* Badge di stato sotto il logo */
.reboot-status-badge {
  position: absolute;
  bottom: -14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: rgba(14, 8, 11, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font: 600 .68rem/1 var(--mono);
  letter-spacing: .08em;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.8);
  transition: border-color 200ms, background-color 200ms;
}

/* Animazione di Reboot al Click */
.mark-reboot.is-rebooting .mark-core {
  animation: rebootPulse 700ms var(--spring);
}

.mark-reboot.is-rebooting .orbit-circle-dash {
  stroke: #fff;
  filter: drop-shadow(0 0 10px var(--red));
  animation-duration: 2s;
}

.mark-reboot.is-rebooting .reboot-status-badge {
  border-color: var(--red);
  background: rgba(229, 36, 59, 0.25);
}

@keyframes rebootPulse {
  0% { transform: scale(1); }
  35% { transform: scale(0.92); filter: brightness(1.4); }
  65% { transform: scale(1.08); filter: brightness(1.7) drop-shadow(0 0 25px var(--red)); }
  100% { transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  to { transform: rotate(-360deg); }
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 0 auto .6rem;
  max-width: 15ch;
  text-shadow: 0 0 90px rgba(229, 36, 59, 0.45);
}

.hero h1 span {
  display: inline-block;
}

.hero p {
  max-width: 32rem;
  margin: .6rem auto 1.6rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.5;
}

/* ============================================================
   TILES RAPIDE HOME (REBOOT MODULES)
   ============================================================ */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 var(--pad) 4.5rem;
  overflow: hidden;
  gap: 1px;
  background: var(--line);
  padding: 0;
}

.tile-card {
  padding: 2.2rem 2rem;
  background: rgba(14, 8, 11, 0.65);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: background-color 200ms, transform 200ms var(--out);
}

.tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.tile-tag {
  font: 600 .72rem/1 var(--mono);
  letter-spacing: .08em;
  color: var(--red-light);
  background: rgba(229, 36, 59, 0.12);
  padding: .3rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(229, 36, 59, 0.3);
}

.tile-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--fg);
  transition: transform 200ms var(--spring), background-color 200ms, border-color 200ms;
}

.tile-card h3 {
  font-size: 1.55rem;
  margin-bottom: .6rem;
}

.tile-card p {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.tile-action {
  font: 600 .85rem/1 var(--mono);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: color 160ms, transform 160ms var(--out);
}

@media (hover: hover) and (pointer: fine) {
  .tile-card:hover {
    background: rgba(229, 36, 59, 0.1);
  }
  .tile-card:hover .tile-ico {
    background: var(--red);
    border-color: var(--red);
    transform: scale(1.1) rotate(-6deg);
    color: #fff;
    box-shadow: 0 0 18px var(--red-glow);
  }
  .tile-card:hover .tile-action {
    color: var(--red-light);
    transform: translateX(4px);
  }
}

/* ============================================================
   SEZIONE MEMBRI ("STUDENT ID / ROSTER" CARDS)
   ============================================================ */
.membri-section {
  padding: 5rem var(--pad) 6.5rem;
  width: 100%;
  overflow-x: clip;
}

.membri-section .ph {
  margin: 0 auto 3rem;
  text-align: center;
  max-width: 48rem;
}

.membri-section h2 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  text-align: center;
}

.membri-section .ph p {
  text-align: center;
  color: var(--muted);
  margin-top: .75rem;
  font-size: 1.1rem;
}

.team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.15rem;
  width: 100%;
}

.card-candidate {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  transition: transform 260ms var(--out), border-color 220ms, box-shadow 220ms;
}

/* Header tecnico della card ID */
.card-id-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem .95rem;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 8, 11, 0.45);
}

.candidate-tag {
  font: 700 .7rem/1 var(--mono);
  letter-spacing: .08em;
  color: var(--muted);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font: 700 .64rem/1 var(--mono);
  letter-spacing: .06em;
  color: #4ADE80;
}

/* Foto dello studente */
.foto {
  position: relative;
  display: block;
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, var(--red-d), #1c050b);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  margin: .65rem .65rem 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.foto::after {
  content: attr(data-i);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 800 4.5rem var(--display);
  color: rgba(255, 255, 255, 0.15);
}

.foto img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 260ms var(--out);
}

/* Effetto scanline/riflesso sottile */
.foto-scanline {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

/* Info dello studente */
.candidate-body {
  padding: 1rem .95rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1;
}

.candidate-body h3 {
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: #fff;
}

.candidate-role {
  font: 500 .8rem/1.3 var(--mono);
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .45rem;
}

/* Pillola Instagram */
.handle-pill {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  padding: .5rem .75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font: 500 .82rem/1 var(--mono);
  color: var(--muted);
  text-decoration: none;
  transition: background-color 160ms, color 160ms, border-color 160ms, transform 160ms var(--out);
}

.handle-ig-icon {
  flex-shrink: 0;
  color: var(--dim);
  transition: color 160ms;
}

.handle-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handle-arrow {
  flex-shrink: 0;
  opacity: .5;
  transition: transform 160ms var(--out), opacity 160ms;
}

@media (hover: hover) and (pointer: fine) {
  .card-candidate:hover {
    transform: translateY(-8px);
    border-color: rgba(229, 36, 59, 0.55);
    box-shadow: 0 24px 60px -15px rgba(229, 36, 59, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
  .card-candidate:hover .foto img {
    transform: scale(1.07);
  }
  .handle-pill:hover {
    background: rgba(229, 36, 59, 0.18);
    border-color: rgba(229, 36, 59, 0.5);
    color: #fff;
    transform: translateY(-1px);
  }
  .handle-pill:hover .handle-ig-icon {
    color: var(--red-light);
  }
  .handle-pill:hover .handle-arrow {
    transform: translate(2px, -2px);
    opacity: 1;
    color: #fff;
  }
}

.team-dots {
  display: none;
}

/* ============================================================
   BENTO GRID PROPOSTE CON CATEGORIE E NUMERI 01-12
   ============================================================ */
.bento-proposte {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1.15rem;
  width: 100%;
}

.bento-card {
  position: relative;
  overflow: hidden;
  padding: 1.8rem 1.65rem;
  display: flex;
  flex-direction: column;
  transition: transform 220ms var(--out), border-color 200ms, box-shadow 200ms;
}

.bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: 1.15rem;
}

.bento-num {
  font: 800 1.25rem/1 var(--mono);
  letter-spacing: -.03em;
  color: var(--red-light);
  background: rgba(229, 36, 59, 0.14);
  padding: .35rem .65rem;
  border-radius: 8px;
  border: 1px solid rgba(229, 36, 59, 0.35);
  box-shadow: 0 0 14px -3px rgba(229, 36, 59, 0.25);
}

.bento-cat {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font: 600 .68rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: .4rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.bento-cat svg {
  flex-shrink: 0;
  stroke: var(--red-light);
}

.bento-card h3 {
  font-size: 1.38rem;
  margin-bottom: .6rem;
  letter-spacing: -.02em;
  color: #fff;
}

.bento-card p {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.55;
  margin-bottom: 1.35rem;
  flex: 1;
}

.bento-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font: 600 .72rem/1 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #FFAAB5;
  background: rgba(229, 36, 59, 0.08);
  padding: .35rem .7rem;
  border-radius: 6px;
  border: 1px solid rgba(229, 36, 59, 0.2);
}

@media (hover: hover) and (pointer: fine) {
  .bento-card:hover {
    transform: translateY(-5px);
    border-color: rgba(229, 36, 59, 0.5);
    box-shadow: 0 20px 50px -15px rgba(229, 36, 59, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
}

/* Callout CTA in fondo a Proposte */
.proposte-cta {
  margin-top: 3.5rem;
  padding: 2.8rem 2.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-color: rgba(229, 36, 59, 0.35);
  box-shadow: 0 30px 80px -25px rgba(229, 36, 59, 0.3);
}

.proposte-cta::before {
  content: "";
  position: absolute;
  top: -50px;
  width: 200px;
  height: 100px;
  background: radial-gradient(ellipse, rgba(229, 36, 59, 0.45), transparent 70%);
  pointer-events: none;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: rgba(229, 36, 59, 0.14);
  border: 1px solid rgba(229, 36, 59, 0.4);
  font: 700 .7rem/1 var(--mono);
  letter-spacing: .08em;
  color: #FFAAB5;
  margin-bottom: 1.1rem;
}

.proposte-cta h3 {
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  margin-bottom: .75rem;
}

.proposte-cta p {
  color: var(--muted);
  max-width: 32em;
  font-size: 1.05rem;
  margin-bottom: 1.8rem;
}

/* ============================================================
   FORM, CALENDARIO, ADMIN
   ============================================================ */
.form, .admin-box {
  max-width: 520px;
  width: 100%;
  margin: 0 auto 2rem;
  padding: 2.2rem;
}

.form h3, .admin-box h3, #admin-controls h3, #admin-segnalazioni h3 {
  font-size: 1.5rem;
  margin-bottom: .5rem;
}

.form p, .admin-box p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

input, textarea {
  width: 100%;
  padding: .85rem 1rem;
  margin-bottom: .9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font-size: 16px;
  transition: border-color 160ms, background-color 160ms, box-shadow 160ms;
}

input::placeholder, textarea::placeholder {
  color: #8d7d82;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 16px rgba(229, 36, 59, 0.25);
}

#conta-parole {
  display: block;
  margin: -.3rem 0 1rem;
  font: 500 .85rem var(--mono);
  color: #8d7d82;
}

.error-msg {
  color: #FF6B7D;
  margin-top: .8rem;
  font-size: .95rem;
}

.success-msg {
  color: #5BE3A0;
  margin-top: .8rem;
  font-weight: 600;
}

/* ============================================================
   PAGE BADGECOVER
   ============================================================ */
.badgecover-hero-card {
  position: relative;
  overflow: hidden;
  padding: 2.6rem 2.2rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border-color: rgba(229, 36, 59, 0.35);
  box-shadow: 0 30px 80px -25px rgba(229, 36, 59, 0.25);
}

.badgecover-hero-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(229, 36, 59, 0.25), transparent 70%);
  pointer-events: none;
}

.badgecover-lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--fg);
  max-width: 46em;
}

.badgecover-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-bottom: 2.5rem;
}

.badgecover-card {
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  transition: transform 220ms var(--out), border-color 200ms, box-shadow 200ms;
}

@media (hover: hover) and (pointer: fine) {
  .badgecover-card:hover {
    transform: translateY(-5px);
    border-color: rgba(229, 36, 59, 0.5);
    box-shadow: 0 20px 50px -15px rgba(229, 36, 59, 0.28);
  }
}

.badgecover-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.badgecover-tag {
  font: 700 .68rem/1 var(--mono);
  letter-spacing: .08em;
  color: #FFAAB5;
  background: rgba(229, 36, 59, 0.12);
  padding: .35rem .65rem;
  border-radius: 6px;
  border: 1px solid rgba(229, 36, 59, 0.3);
}

.badgecover-card h3 {
  font-size: 1.35rem;
  margin-bottom: .6rem;
  color: #fff;
}

.badgecover-card p {
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
}

.badgecover-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font: 700 .72rem/1 var(--mono);
  color: #4ADE80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: .35rem .7rem;
  border-radius: 6px;
}

.badgecover-cta {
  padding: 3rem 2.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-color: rgba(229, 36, 59, 0.4);
  background: linear-gradient(150deg, rgba(229, 36, 59, 0.12), rgba(18, 11, 16, 0.85));
  box-shadow: 0 30px 90px -20px rgba(229, 36, 59, 0.4);
}

.badgecover-cta h3 {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  margin-bottom: .8rem;
}

.badgecover-cta p {
  color: var(--muted);
  max-width: 36em;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.btn-badgecover {
  padding: 0 2rem;
  min-height: 52px;
  font-size: 1.05rem;
  box-shadow: 0 14px 40px -6px rgba(229, 36, 59, 0.9);
}

/* ============================================================
   EVENTI & ADMIN CALENDARIO
   ============================================================ */
#eventi-lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1.25rem;
  width: 100%;
}

.evento-card {
  position: relative;
  overflow: hidden;
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(14, 8, 11, 0.65));
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 220ms var(--out), border-color 200ms, box-shadow 200ms;
}

@media (hover: hover) and (pointer: fine) {
  .evento-card:hover {
    transform: translateY(-4px);
    border-color: rgba(229, 36, 59, 0.5);
    box-shadow: 0 24px 60px -15px rgba(229, 36, 59, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

.evento-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.evento-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  font: 700 .66rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #FFAAB5;
  background: rgba(229, 36, 59, 0.12);
  border: 1px solid rgba(229, 36, 59, 0.3);
}

.evento-status-pill {
  font: 700 .64rem/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .6rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.evento-status-pill.is-today {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
  animation: ledPulseRed 1.8s infinite;
}

.evento-status-pill.is-upcoming {
  color: #4ADE80;
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.3);
}

.evento-status-pill.is-past {
  color: var(--dim);
}

.evento-body-wrap {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.evento-date-block {
  flex-shrink: 0;
  width: 62px;
  height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(229, 36, 59, 0.22), rgba(142, 20, 38, 0.35));
  border: 1px solid rgba(229, 36, 59, 0.45);
  box-shadow: 0 8px 20px -6px rgba(229, 36, 59, 0.4);
}

.evento-day-num {
  font: 800 1.6rem/1 var(--display);
  color: #fff;
}

.evento-month-txt {
  font: 700 .68rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #FFAAB5;
  margin-top: 2px;
}

.evento-details {
  flex: 1;
  min-width: 0;
}

.evento-weekday {
  font: 600 .75rem/1 var(--mono);
  text-transform: capitalize;
  color: var(--muted);
  margin-bottom: .35rem;
}

.evento-details h4 {
  font: 800 1.32rem/1.2 var(--display);
  letter-spacing: -.02em;
  color: #fff;
  margin-bottom: .45rem;
}

.evento-time-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font: 500 .8rem/1 var(--mono);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: .3rem .6rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-top: .2rem;
}

.evento-desc-p {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: .4rem;
}

.evento-admin-bar {
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.btn-del-event {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border-radius: 8px;
  background: rgba(229, 36, 59, 0.12);
  border: 1px solid rgba(229, 36, 59, 0.35);
  color: #FFAAB5;
  font: 600 .75rem/1 var(--mono);
  cursor: pointer;
  transition: background-color 160ms, color 160ms;
}

.btn-del-event:hover {
  background: var(--red);
  color: #fff;
}

.admin-panel {
  max-width: 680px;
  width: 100%;
  margin: 0 auto 2.5rem;
  padding: 2.2rem;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(14, 8, 11, 0.65));
  border: 1px solid rgba(229, 36, 59, 0.35);
  box-shadow: 0 30px 80px -25px rgba(229, 36, 59, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.admin-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font: 700 .72rem/1 var(--mono);
  letter-spacing: .08em;
  color: #4ADE80;
}

.admin-panel h3 {
  font-size: 1.55rem;
  margin-bottom: .4rem;
}

.admin-panel-sub {
  color: var(--muted);
  font-size: .98rem;
  margin-bottom: 1.4rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .9rem 1rem;
  margin-bottom: .9rem;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.admin-field label {
  font: 600 .76rem/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-select {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font-size: 15px;
  outline: none;
  cursor: pointer;
  transition: border-color 160ms;
}

.admin-select option {
  background: #140b10;
  color: #fff;
}

.btn-create-event {
  margin-top: .6rem;
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 0 1rem;
  font-size: .85rem;
}

#admin-segnalazioni {
  max-width: 700px;
  margin: 3rem auto 0;
  padding: 1.8rem;
}

.seg-card {
  padding: 1.3rem;
  margin-top: 1rem;
  border-radius: 18px;
}

.seg-card p+p {
  margin-top: .4rem;
  color: var(--muted);
}

footer {
  padding: 2.5rem var(--pad) calc(2.5rem + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font: 500 .88rem var(--mono);
  letter-spacing: .04em;
  border-top: 1px solid var(--line);
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color 180ms;
}

footer:hover {
  color: #fff;
}

/* ============================================================
   ANIMAZIONI E RESPONSIVE
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .hero h1 span { animation: word 900ms var(--out) calc(var(--i) * 90ms + 100ms) both; }
  .hero p, .hero .actions, .mark-reboot, .hero-chip { animation: rise 800ms var(--out) 500ms both; }
}

@keyframes word {
  from { opacity: 0; transform: translateY(.4em); filter: blur(14px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1060px) {
  .team {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 860px) {
  .tiles {
    grid-template-columns: 1fr;
    margin: 0 1.25rem 3.5rem;
  }
  .badgecover-features {
    grid-template-columns: 1fr;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --pad: .65rem;
    --header-h: 38px;
    --header-top: calc(.5rem + env(safe-area-inset-top, 0px));
  }

  .site-header {
    padding: var(--header-top) var(--pad) 0;
  }

  .header-inner {
    justify-content: space-between;
    gap: .35rem;
  }

  main {
    padding-top: calc(var(--header-h) + var(--header-top) + 1rem);
    padding-bottom: 3rem;
    padding-left: var(--pad);
    padding-right: var(--pad);
  }

  .nav {
    position: relative;
    height: var(--header-h);
    padding: 2px;
    gap: .12rem;
    flex: 1;
    max-width: calc(100% - var(--header-h) - .4rem);
    justify-content: space-between;
    overflow: visible;
    touch-action: pan-y;
  }

  .nav a {
    height: calc(var(--header-h) - 4px);
    padding: 0 .42rem;
    font-size: .74rem;
    line-height: 1;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
  }

  .ig-btn {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: var(--header-h);
    height: var(--header-h);
    flex-shrink: 0;
  }

  .ig-btn:active {
    transform: scale(.92);
  }

  .hero {
    padding: 1rem 0 2rem;
    min-height: auto;
  }

  .hero-chip {
    font-size: .68rem;
    margin-bottom: 1.25rem;
    padding: .3rem .75rem;
  }

  .mark-reboot {
    width: min(44vw, 150px);
    margin: 0 auto 1.4rem;
  }

  .orbit-rings {
    inset: -10px;
  }

  .reboot-status-badge {
    font-size: .62rem;
    padding: .25rem .65rem;
    bottom: -10px;
  }

  .hero h1 {
    font-size: clamp(2rem, 9.5vw, 3rem);
    letter-spacing: -.02em;
    margin-bottom: .5rem;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 .5rem;
    margin: .6rem auto 1.4rem;
  }

  .tiles {
    margin: 0 1rem 3rem;
  }

  .tile-card {
    padding: 1.6rem 1.4rem;
  }

  .membri-section {
    padding: 3.5rem 1rem 4.5rem;
    overflow: hidden;
  }

  .membri-section h2 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .team {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: .85rem;
    padding: .5rem .5rem 1rem;
    margin: 0 -.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .team::-webkit-scrollbar {
    display: none;
  }

  .card-candidate {
    flex: 0 0 min(78vw, 255px);
    scroll-snap-align: center;
  }

  .foto {
    margin: .55rem .55rem 0;
  }

  .team-dots {
    display: flex;
    justify-content: center;
    gap: .45rem;
    margin-top: .85rem;
  }

  .team-dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: width 200ms var(--out), background-color 200ms;
  }

  .team-dots span.active {
    width: 22px;
    background: var(--red);
  }

  .bento-proposte {
    grid-template-columns: 1fr;
  }

  .proposte-cta {
    padding: 2.2rem 1.4rem;
  }
}

@media (max-width: 360px) {
  :root {
    --header-h: 34px;
    --pad: .5rem;
  }
  .site-header {
    padding: var(--header-top) var(--pad) 0;
  }
  .header-inner {
    gap: .25rem;
  }
  .nav {
    max-width: calc(100% - 76px);
  }
  .nav a {
    font-size: .68rem;
    padding: 0 .32rem;
  }
  .card-candidate {
    flex: 0 0 230px;
  }
}
