/* Polisportiva Amatori Monte Cremasco – #wearemucc
   Identità ripresa dalle grafiche social: rosso/nero, carta strappata, titoli condensati. */

:root {
  --red: #d0112b;
  --red-dark: #9e0b20;
  --ink: #0e0e10;
  --ink-2: #1b1b20;
  --paper: #f4efe7;
  --white: #ffffff;
  --muted: #8a8a93;
  --line: rgba(255,255,255,.12);
  --radius: 18px;
  --wrap: 1240px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Anton", "Bebas Neue", Impact, "Haettenschweiler", "Arial Narrow Bold", "Arial Narrow", sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--red); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.center { text-align: center; }
.small { font-size: .88rem; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.2em; }
.text-red { color: var(--red); }

/* ---------- Tipografia display ---------- */
h1, h2, h3, .display, .display-xl, .display-l, .display-m, .display-s, .kicker {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: .95; margin: 0 0 .4em;
}
.display-xl { font-size: clamp(3rem, 8vw, 6.5rem); }
.display-l { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
.display-m { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.display-s { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.display-s small { font-family: var(--font); font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--muted); margin-left: .5em; }
.kicker { font-size: 1.05rem; letter-spacing: .14em; color: var(--red); margin-bottom: .8em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.5; max-width: 38em; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em; padding: 15px 26px;
  font-family: var(--display); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em;
  text-decoration: none; border: 2px solid transparent; border-radius: 4px; cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 94% 100%, 0 100%);
  transition: transform .25s var(--ease), background .25s, color .25s;
}
.btn:hover { transform: translateY(-3px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #fff; color: var(--red); }
.btn-ghost-light { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }
.link-arrow { display: inline-flex; gap: .4em; align-items: center; color: inherit; font-weight: 700; text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-arrow .icon { transition: transform .2s; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; color: #fff;
  transition: background .35s, box-shadow .35s, padding .35s;
}
.site-header.is-solid { background: rgba(14,14,16,.92); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; transition: min-height .35s; }
.is-solid .header-inner { min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { width: 48px; height: 48px; background: #fff; border-radius: 50%; padding: 3px; transition: transform .4s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand-text { font-family: var(--display); text-transform: uppercase; font-size: 1.55rem; line-height: .9; letter-spacing: .02em; display: flex; flex-direction: column; }
.brand-text small { font-family: var(--font); font-size: .66rem; letter-spacing: .22em; font-weight: 700; opacity: .8; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.site-nav a { position: relative; display: block; padding: 10px 14px; color: #fff; text-decoration: none; font-family: var(--display); text-transform: uppercase; font-size: 1.2rem; letter-spacing: .06em; }
.site-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-social { display: flex; gap: 8px; }
.social-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; width: 42px; height: 42px; padding: 0; line-height: 0; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); color: #fff; text-decoration: none; transition: background .2s, border-color .2s; }
.social-btn .icon, .site-footer .social-btn .icon { width: 20px; height: 20px; margin: 0; vertical-align: 0; color: inherit; }
.social-btn:hover { background: var(--red); border-color: var(--red); }
.nav-toggle { display: none; width: 48px; height: 48px; border: 0; background: var(--red); border-radius: 4px; cursor: pointer; }
.burger { display: grid; gap: 5px; width: 22px; margin: auto; }
.burger i { display: block; height: 2px; background: #fff; transition: transform .3s, opacity .3s; }
.nav-open .burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .burger i:nth-child(2) { opacity: 0; }
.nav-open .burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 30px;
    background: var(--ink); clip-path: circle(0 at calc(100% - 44px) 42px); transition: clip-path .6s var(--ease); }
  .nav-open .site-nav { clip-path: circle(150% at calc(100% - 44px) 42px); }
  .site-nav ul { flex-direction: column; align-items: center; gap: 4px; }
  .site-nav a { font-size: 2.6rem; }
  .brand-text { font-size: 1.3rem; }
}

/* ---------- Bordi strappati ---------- */
.edge { position: absolute; left: 0; right: 0; top: -1px; height: 42px; transform: translateY(-100%); background-repeat: repeat-x; background-size: 1200px 42px; pointer-events: none; z-index: 2; }
.edge-flip { top: auto; bottom: -1px; transform: translateY(100%) scaleY(-1); }
.edge-ink { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 42' preserveAspectRatio='none'%3E%3Cpath fill='%230e0e10' d='M0 42V22l38 8 31-14 44 10 29-18 41 15 36-9 47 17 25-12 43 6 34-19 40 16 38-8 33 13 45-17 29 11 42-7 36 15 31-20 44 12 38-6 27 14 46-16 33 9 41-11 35 17 30-13 44 8 39-15 26 12 43-6 35 14 47-18 22 9 37-4V42z'/%3E%3C/svg%3E"); }
.edge-paper { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 42' preserveAspectRatio='none'%3E%3Cpath fill='%23f4efe7' d='M0 42V20l42 10 27-16 46 12 31-19 38 16 39-10 44 15 28-11 40 8 37-20 38 15 36-7 35 13 43-16 31 12 40-9 38 16 29-19 46 11 35-5 29 13 44-15 36 9 38-12 37 16 28-12 46 9 37-16 28 13 41-7 37 15 44-17 25 10 34-6V42z'/%3E%3C/svg%3E"); }
.edge-red { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 42' preserveAspectRatio='none'%3E%3Cpath fill='%23d0112b' d='M0 42V24l35 6 34-15 41 11 32-17 39 14 37-11 45 18 27-13 41 7 36-18 39 14 37-9 34 15 44-18 30 12 41-8 37 17 30-21 45 13 36-7 28 15 45-17 34 10 39-12 36 18 29-14 45 10 38-17 27 14 42-8 36 16 45-19 24 11 35-5V42z'/%3E%3C/svg%3E"); }

/* ---------- Sezioni ---------- */
.section { position: relative; padding: 110px 0; }
.section-ink { background: var(--ink); color: #fff; }
.section-paper { background: var(--paper); color: var(--ink); }
.section-red { background: var(--red); color: #fff; }
.section-red .kicker { color: #fff; opacity: .85; }
.section-ink .lead, .section-ink p { color: #d8d8de; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: 1.1rem; opacity: .7; }
.section-intro { max-width: 40em; margin: -20px 0 32px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media { grid-template-columns: .9fr 1.1fr; }
@media (max-width: 900px) { .split, .split-media { grid-template-columns: 1fr; gap: 40px; } .section { padding: 80px 0; } }

/* ---------- Hero home ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; color: #fff; overflow: hidden; background: var(--ink); }
.hero-slides, .hero-slides .slide { position: absolute; inset: 0; }
.hero-slides .slide { opacity: 0; transition: opacity 1.6s ease; }
.hero-slides .slide.is-active { opacity: 1; }
.hero-slides picture { display: block; width: 100%; height: 100%; }
.hero-slides img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.hero-slides .is-active img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06) translate(.6%, .6%); } to { transform: scale(1) translate(0, 0); } }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(14,14,16,.55) 0%, rgba(14,14,16,.15) 30%, rgba(14,14,16,.75) 60%, rgba(14,14,16,.95) 100%),
  linear-gradient(90deg, rgba(208,17,43,.6) 0%, rgba(208,17,43,0) 60%); }
.hero-inner { position: relative; z-index: 1; width: 100%; padding-top: 140px; padding-bottom: 110px; }
.hero-title { font-size: clamp(4.2rem, 15vw, 13rem); line-height: .82; margin: 0 0 .15em; display: flex; flex-direction: column; }
.hero-title span:last-child { -webkit-text-stroke: 2px #fff; color: transparent; }
.hero-sub { font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: clamp(1.05rem, 2vw, 1.5rem); margin-bottom: 30px; }
.hero .kicker { color: #fff; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.scroll-hint { position: absolute; z-index: 1; left: 50%; bottom: 26px; transform: translateX(-50%); color: #fff; animation: bob 2s ease-in-out infinite; }
.scroll-hint .icon { width: 34px; height: 34px; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- Page hero ---------- */
.page-hero { position: relative; min-height: 68svh; display: grid; align-items: end; color: #fff; background: var(--ink); overflow: hidden; }
.page-hero-media { position: absolute; inset: 0; }
.page-hero-media picture { display: block; width: 100%; height: 100%; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 12s ease-out forwards; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(14,14,16,.5), rgba(14,14,16,.2) 40%, rgba(14,14,16,.88)), linear-gradient(90deg, rgba(208,17,43,.5), transparent 60%); }
.page-hero-inner { position: relative; z-index: 2; width: 100%; padding-top: 140px; padding-bottom: 90px; }
.page-hero h1 { font-size: clamp(3.4rem, 10vw, 8rem); margin: 0 0 .2em; }
.page-hero .kicker { color: #fff; }
.page-hero .lead { color: #eee; }
.page-hero .edge { top: auto; bottom: -1px; transform: none; z-index: 3; }

/* ---------- Ticker ---------- */
.ticker { background: var(--red); color: #fff; overflow: hidden; padding: 14px 0; transform: rotate(-1.5deg) scale(1.03); margin: -10px 0; position: relative; z-index: 5; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.ticker-track { display: inline-flex; gap: 28px; white-space: nowrap; animation: ticker 40s linear infinite; font-family: var(--display); text-transform: uppercase; font-size: clamp(1.4rem, 3vw, 2.2rem); letter-spacing: .04em; }
.ticker-track b { font-weight: 400; opacity: .6; }
@keyframes ticker { to { transform: translateX(-33.333%); } }

/* ---------- Campioni ---------- */
.poster { margin: 0; position: relative; transform: rotate(-3deg); }
.poster::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; background: var(--red); z-index: 0; transform: rotate(5deg); }
.poster img { position: relative; z-index: 1; width: 100%; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.stats { list-style: none; padding: 0; margin: 34px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stats li { border-top: 3px solid var(--red); padding-top: 12px; }
.stats strong { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; color: #fff; }
.stats span { font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Team tiles (home) ---------- */
.team-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.team-tile:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.team-tile:nth-child(2) { grid-column: span 3; }
.team-tile:nth-child(n+3) { grid-column: span 1; }
.team-tile:nth-child(3) { grid-column: span 1; }
.team-tile a { position: relative; display: block; height: 100%; min-height: 240px; overflow: hidden; border-radius: 4px; color: #fff; text-decoration: none; background: var(--ink); }
.team-tile:nth-child(n+3) a { min-height: 240px; }
.team-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .5s; filter: saturate(.85); }
.team-tile a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(14,14,16,.9)); transition: background .4s; }
.team-tile a:hover img { transform: scale(1.08); filter: saturate(1.1); }
.team-tile a:hover::after { background: linear-gradient(180deg, rgba(208,17,43,.15) 0%, rgba(208,17,43,.85)); }
.team-tile-text { position: absolute; z-index: 1; left: 22px; bottom: 20px; right: 70px; }
.team-tile-text small { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; font-weight: 700; }
.team-tile-text strong { display: block; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1; }
.team-tile:nth-child(1) .team-tile-text strong { font-size: clamp(2.2rem, 5vw, 4rem); }
@media (min-width: 1001px) {
  .team-tile:nth-child(n+3) .team-tile-text { left: 16px; right: 16px; bottom: 64px; }
  .team-tile:nth-child(n+3) .team-tile-text strong { font-size: clamp(1.3rem, 1.9vw, 1.8rem); }
  .team-tile:nth-child(n+3) .team-tile-go { left: 16px; right: auto; width: 38px; height: 38px; }
}
.team-tile-go { position: absolute; z-index: 1; right: 18px; bottom: 18px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--red); transition: transform .3s var(--ease); }
.team-tile a:hover .team-tile-go { transform: rotate(-45deg); background: #fff; color: var(--red); }
@media (min-width: 1001px) {
  .team-tiles { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 250px; }
  .team-tile:nth-child(1) { grid-column: 1 / span 3; grid-row: 1 / span 2; }
  .team-tile:nth-child(2) { grid-column: 4 / span 3; grid-row: 1; }
  .team-tile:nth-child(3) { grid-column: 4 / span 1; grid-row: 2; }
  .team-tile:nth-child(4) { grid-column: 5 / span 1; grid-row: 2; }
  .team-tile:nth-child(5) { grid-column: 6 / span 1; grid-row: 2; }
}
@media (max-width: 1000px) {
  .team-tiles { grid-template-columns: 1fr 1fr; }
  .team-tile:nth-child(n) { grid-column: span 1; grid-row: auto; }
  .team-tile:nth-child(1) { grid-column: span 2; }
  .team-tile:nth-child(1) a { min-height: 340px; }
}
@media (max-width: 520px) { .team-tiles { grid-template-columns: 1fr; } .team-tile:nth-child(n) { grid-column: span 1; } }

/* ---------- Instagram ---------- */
/* Banner "Seguici sui campi" (home): foto del club come post impilati */
.follow-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.follow-text .btn { margin-top: 8px; }
.follow-handle { margin: 14px 0 0; font-weight: 700; letter-spacing: .02em; opacity: .9; overflow-wrap: anywhere; }
/* il contenitore taglia ciò che esce dai bordi: le card ruotate non allargano la pagina (iPhone) */
.follow-media { overflow: hidden; padding: 16px; }
.follow-stack { position: relative; display: block; width: 100%; max-width: 490px; aspect-ratio: 1 / 1; margin: 0 auto; }
.follow-card { position: absolute; width: 44%; padding: 6px 6px 24px; background: #fff; border-radius: 4px;
  box-shadow: 0 16px 36px rgba(0,0,0,.28); transition: transform .5s var(--ease); }
.follow-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 2px; }
.follow-card small { position: absolute; left: 10px; bottom: 4px; font-family: var(--display); font-size: .9rem; color: var(--red); letter-spacing: .03em; }
/* tre card in alto, due davanti in basso */
.follow-card-1 { left: 1%; top: 7%; transform: rotate(-8deg); }
.follow-card-2 { left: 28%; top: 1%; transform: rotate(2deg); z-index: 1; }
.follow-card-3 { right: 1%; top: 8%; transform: rotate(8deg); }
.follow-card-4 { left: 9%; top: 47%; transform: rotate(5deg); z-index: 2; }
.follow-card-5 { right: 9%; top: 44%; transform: rotate(-4deg); z-index: 3; }
.follow-card-1 img, .follow-card-5 img { object-position: 50% 20%; }
.follow-stack:hover .follow-card-1 { transform: rotate(-11deg) translateX(-3%); }
.follow-stack:hover .follow-card-3 { transform: rotate(11deg) translateX(3%); }
.follow-stack:hover .follow-card-4 { transform: rotate(7deg) translateY(3%); }
.follow-stack:hover .follow-card-5 { transform: rotate(0) translateY(-3%); }
@media (max-width: 900px) {
  .follow-inner { grid-template-columns: 1fr; gap: 36px; }
  .follow-stack { max-width: 360px; }
}

/* ---------- Sponsor ---------- */
.sponsors .section-head { margin-bottom: 30px; }
/* Sponsor: 3 per riga, l'ultima riga incompleta resta centrata */
.sponsor-grid { --cols: 3; --gap: 26px; list-style: none; margin: 0 auto; padding: 0 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.sponsor-grid li { position: relative; flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); aspect-ratio: 16 / 9; min-width: 0; overflow: hidden; background: #fff; border-radius: 8px; box-shadow: 0 18px 44px rgba(0,0,0,.4); transition: transform .3s var(--ease), box-shadow .3s; }
.sponsor-grid li:hover { transform: translateY(-8px); box-shadow: 0 26px 56px rgba(0,0,0,.5); }
.sponsor-grid a { display: contents; }
.sponsor-grid img { position: absolute; inset: 9% 8%; width: 84%; height: 82%; object-fit: contain; }
@media (max-width: 800px) { .sponsor-grid { --cols: 2; --gap: 16px; } }
@media (max-width: 480px) { .sponsor-grid { --cols: 1; } }

.support { display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: center; margin-top: 50px; }
.mascot { width: 190px; height: auto; filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(1.5deg); } }
@media (max-width: 600px) { .support { grid-template-columns: 1fr; } .mascot { width: 150px; } }

/* ---------- Sub-nav ---------- */
.subnav { position: sticky; top: 68px; z-index: 50; background: var(--paper); border-bottom: 1px solid rgba(0,0,0,.08); }
.subnav ul { list-style: none; display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.subnav a { display: block; white-space: nowrap; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; color: var(--ink); border: 1px solid rgba(0,0,0,.15); transition: background .2s, color .2s; }
.subnav a:hover, .subnav a.is-active { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Pagina squadre ---------- */
.team-section { padding: 120px 0 100px; }
.team-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.team-section:nth-of-type(even) .team-head { grid-template-columns: .9fr 1.1fr; }
.team-section:nth-of-type(even) .team-photo { order: 2; }
.team-photo { margin: 0; position: relative; }
.team-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.team-photo::after { content: ""; position: absolute; left: -14px; bottom: -14px; width: 40%; height: 40%; border-left: 6px solid var(--red); border-bottom: 6px solid var(--red); z-index: -1; }
.section-ink .team-photo::after { z-index: 0; pointer-events: none; }
.team-info .display-xl { margin-bottom: .25em; }
.team-block { margin-top: 64px; }
@media (max-width: 900px) {
  .team-head, .team-section:nth-of-type(even) .team-head { grid-template-columns: 1fr; gap: 30px; }
  .team-section:nth-of-type(even) .team-photo { order: 0; }
}

/* scroller card (rosa/staff) */
.scroller { position: relative; }
.cards-row { list-style: none; margin: 0; padding: 6px 4px 24px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--red) transparent; }
.cards-row li { scroll-snap-align: start; transition: transform .35s var(--ease); }
.cards-row li:hover { transform: translateY(-8px); }
.cards-row img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.cards-staff { grid-auto-columns: minmax(200px, 260px); }
.scroller-btn { position: absolute; top: 42%; z-index: 3; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,.35); transition: transform .2s, opacity .2s; }
.scroller-btn:hover { transform: scale(1.08); }
.scroller-btn[disabled] { opacity: 0; pointer-events: none; }
.scroller-btn.prev { left: -18px; }
.scroller-btn.next { right: -18px; }
.scroller-btn .icon { width: 24px; height: 24px; }
@media (hover: none), (max-width: 700px) { .scroller-btn { display: none; } .cards-row { grid-auto-columns: 62%; } }

/* ---------- Storia ---------- */
.timeline { list-style: none; margin: 0; padding: 20px 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: repeating-linear-gradient(180deg, var(--red) 0 22px, transparent 22px 34px); }
.tl-item { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; margin-bottom: 70px; }
.tl-item::before { content: ""; position: absolute; left: 50%; top: 18px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 6px var(--paper), 0 0 0 9px var(--red); }
.tl-year { font-family: var(--display); font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; color: var(--red); text-align: right; text-transform: uppercase; }
.tl-right .tl-year { order: 2; text-align: left; }
.tl-card { background: #fff; padding: 30px; border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.08); }
.tl-card h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.tl-card p { margin: 0; }
.tl-media { margin: 20px 0 0; }
.tl-media img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 4px; }
@media (max-width: 800px) {
  .timeline::before { left: 11px; }
  .tl-item { grid-template-columns: 1fr; gap: 10px; padding-left: 44px; margin-bottom: 50px; }
  .tl-item::before { left: 11px; }
  .tl-year, .tl-right .tl-year { order: 0; text-align: left; }
}

/* ---------- Documenti ---------- */
.dl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.dl-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 30px 26px 26px; background: #fff; border-radius: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.08); border-top: 6px solid var(--red); transition: transform .35s var(--ease), box-shadow .35s; }
.dl-card:hover { transform: translateY(-6px) rotate(-.5deg); box-shadow: 0 24px 50px rgba(0,0,0,.14); }
.dl-icon .icon { width: 46px; height: 46px; color: var(--red); margin-bottom: 8px; }
.dl-card h2 { font-size: 1.9rem; margin: 0; }
.dl-card p { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.dl-card .btn { margin-top: auto; align-self: flex-start; }
.sg-strip { display: flex; gap: 18px; align-items: flex-start; margin-top: 56px; padding: 24px 26px; background: var(--ink); color: #ddd; border-radius: 6px; }
.sg-strip > .icon { width: 40px; height: 40px; color: var(--red); }
.sg-strip strong { display: block; color: #fff; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.4rem; letter-spacing: .02em; margin-bottom: 4px; }
.sg-strip a { color: #fff; font-weight: 700; word-break: break-all; }

.prose { max-width: 46em; }
.prose h2 { font-size: 2rem; margin-top: 1.4em; }
.prose a { color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--ink); color: #c9c9cf; padding: 70px 0 0; border-top: 1px solid var(--ink); }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.6rem; }
.footer-top { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 50px; }
.footer-brand img { width: 88px; height: 88px; background: #fff; border-radius: 50%; padding: 5px; margin-bottom: 16px; }
.footer-brand .display { font-size: 3rem; color: #fff; margin: 0; }
.hashtag { font-family: var(--display); font-size: 1.4rem; letter-spacing: .06em; color: var(--red); margin: 0; }
.site-footer p { display: block; }
.site-footer .icon { color: var(--red); margin-right: 4px; }
.social { display: flex; gap: 8px; margin-top: 14px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 50px; padding-top: 20px; padding-bottom: 26px; font-size: .85rem; color: #8d8d95; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr; gap: 34px; } }

/* ---------- Animazioni di comparsa ---------- */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .hero .reveal, .js .page-hero .reveal { opacity: 1; transform: none; transition: none; animation: fadeUp 1s var(--ease) both; }
.js .hero .reveal:nth-child(2), .js .page-hero .reveal:nth-child(2) { animation-delay: .12s; }
.js .hero .reveal:nth-child(3), .js .page-hero .reveal:nth-child(3) { animation-delay: .24s; }
.js .hero .reveal:nth-child(4) { animation-delay: .36s; }
.js .hero .reveal:nth-child(5) { animation-delay: .48s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.js .poster.reveal { transform: translateY(40px) rotate(-6deg); }
.js .poster.reveal.is-in { transform: rotate(-3deg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-slides .slide { opacity: 0; } .hero-slides .slide:first-child { opacity: 1; }
}
.team-photo figcaption { position: absolute; right: 10px; bottom: 10px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: .72rem; letter-spacing: .02em; }

/* ---------- Galleria attività di base ---------- */
.gallery { --cols: 4; --gap: 18px; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.gallery li { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); overflow: hidden; border-radius: 6px; box-shadow: 0 18px 44px rgba(0,0,0,.18); }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .8s var(--ease); }
.gallery li:hover img { transform: scale(1.06); }
@media (max-width: 700px) { .gallery { --cols: 2; --gap: 12px; } }

/* I bottoni social nel menu non devono ereditare lo stile delle voci di menu */
.site-nav a.social-btn { display: inline-flex; padding: 0; font-size: inherit; letter-spacing: 0; }
.site-nav a.social-btn::after { display: none; }

/* ---------- Slide "contenuta" (foto a bassa risoluzione) ---------- */
.slide-contained .slide-bg { position: absolute; inset: 0; overflow: hidden; }
.slide-contained .slide-bg picture { display: block; width: 100%; height: 100%; }
.slide-contained .slide-bg img { filter: blur(30px) brightness(.5) saturate(1.15); transform: scale(1.18); animation: none !important; }
.slide-contained .slide-fg { position: absolute; z-index: 0; right: 4vw; top: 50%; width: min(56vw, 980px); aspect-ratio: 1280 / 896; transform: translateY(-50%); }
.slide-contained .slide-fg img { width: 100%; height: 100%; object-fit: cover; transform: none; animation: none !important;
  /* sfumatura su tutti e quattro i lati: trasparenza totale esattamente sul bordo */
  --fade-x: 16%; --fade-y: 16%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-x), #000 calc(100% - var(--fade-x)), transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 var(--fade-y), #000 calc(100% - var(--fade-y)), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-x), #000 calc(100% - var(--fade-x)), transparent 100%),
              linear-gradient(to bottom, transparent 0, #000 var(--fade-y), #000 calc(100% - var(--fade-y)), transparent 100%);
  mask-composite: intersect; }
.slide-contained.is-active .slide-fg img { animation: fgIn 1.6s var(--ease) both !important; }
@keyframes fgIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (max-aspect-ratio: 1/1) {
  .slide-contained .slide-fg { right: 0; left: 0; top: 12%; width: 100%; transform: none; }
  .slide-contained .slide-fg img { --fade-x: 10%; --fade-y: 14%; }
}

/* Indirizzi nel footer */
.site-footer .addr { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.site-footer .addr .icon { margin: 3px 0 0; }
.site-footer .addr strong { color: #fff; }
.site-footer .addr .link-arrow { display: inline-flex; margin-top: 4px; color: #fff; font-weight: 600; }
.site-footer .addr .link-arrow .icon { margin: 0; width: 1em; height: 1em; }
.page-hero-media img[src*="hero/schieramento"] { object-position: 50% 62%; }
@media (max-aspect-ratio: 1/1) { .page-hero-media img[src*="hero/schieramento"] { object-position: 50% 0%; } }

/* Chiusura pagina Storia */
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover { background: var(--ink); color: #fff; }
.story-cta .support { margin-top: 0; }
.story-cta .lead { color: #fff; max-width: 34em; }
.tl-card p { line-height: 1.65; }

/* Tessera Juniores in home: inquadratura alta per non tagliare le teste */
.tile-juniores-u19 img { object-position: 50% 24%; }

/* Staff e rosa in griglia (niente carosello) */
.card-grid { --cols: 5; --gap: 16px; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.card-grid li { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); transition: transform .35s var(--ease); }
.card-grid li:hover { transform: translateY(-6px); }
.card-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
@media (max-width: 1000px) { .card-grid { --cols: 4; } }
@media (max-width: 700px) { .card-grid { --cols: 3; --gap: 10px; } }
@media (max-width: 420px) { .card-grid { --cols: 2; } }

/* Pulsanti verso Tuttocampo nella sezione squadra */
.tc-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn-ghost-dark { border-color: var(--ink); color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: #fff; }
.tc-note { margin: 10px 0 0; font-size: .82rem; opacity: .6; }
.btn .icon:last-child { width: 1em; height: 1em; opacity: .8; }

/* ---------- Correzioni mobile (iPhone) ----------
   1. backdrop-filter crea un "containing block": il menu fixed restava chiuso dentro l'header.
   2. altezza header costante su mobile: niente sobbalzi con il rimbalzo dello scroll di iOS. */
@media (max-width: 900px) {
  .site-header.is-solid { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(14,14,16,.97); }
  .header-inner, .is-solid .header-inner { min-height: 68px; }
  .site-header { transition: background .3s, box-shadow .3s; }
  .nav-open .site-header { background: var(--ink); }
}
body.nav-locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }

/* Fascia scorrevole inclinata: contenuta, così non allarga la pagina (pagina che "balla" su iPhone) */
.ticker-wrap { position: relative; z-index: 5; overflow: hidden; padding: 26px 0; margin: -26px 0; }
.ticker-wrap .ticker { margin: 0; }

/* Poster "Campioni" su telefono: inclinazioni ridotte e margini laterali,
   così il poster e il riquadro rosso restano dentro lo schermo (pagina che "balla" su iPhone) */
@media (max-width: 900px) {
  .poster { width: calc(100% - 40px); max-width: 420px; margin: 0 auto; transform: rotate(-2deg); }
  .poster::before { inset: 10px -10px -10px 10px; transform: rotate(2.5deg); }
  .js .poster.reveal { transform: translateY(40px) rotate(-3deg); }
  .js .poster.reveal.is-in { transform: rotate(-2deg); }
}
