/* Stile allineato a sport.cusunimib.it: Archivo variabile, header chiaro, hero «stadio serale» nel rosso del club. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0c1114;
  --paper: #fff;
  --deep: #6b120f;
  --glow: #c2201b;
  --fill: #c2201b;
  --fill-hover: #af1d18;
  --fill-press: #9b1a16;
  --stage-0: #2a0f0d;
  --stage-1: #5a1310;
  --stage-ink: #fff;
  --stage-ink-2: #d8cfce;
  --stage-line: #f2d6d5;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gut: 16px;
  color-scheme: light;
}

@supports (color: color-mix(in oklab, red, blue)) {
  :root {
    --stage-0: color-mix(in oklab, var(--deep) 38%, #05080a);
    --stage-1: color-mix(in oklab, var(--deep) 82%, #05080a);
    --stage-ink-2: color-mix(in oklab, #fff 82%, var(--stage-0));
    --stage-line: color-mix(in oklab, #fff 82%, var(--glow));
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* Niente rimbalzo verticale: sopra l'header bianco comparirebbe lo sfondo scuro. */
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--stage-0);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */

.head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 68px;
  padding: 10px max(var(--gut), env(safe-area-inset-left));
  background: var(--paper);
  box-shadow: 0 1px 0 rgb(12 17 20 / 12%), 0 18px 36px -26px rgb(12 17 20 / 55%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 44px;
}

.brand span {
  font-size: 1.5rem;
  font-weight: 900;
  font-stretch: 70%;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  flex: 1;
  display: grid;
  align-content: center;
  color: var(--stage-ink);
  background: var(--stage-0);
}

.stage-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.stage-bg > * {
  position: absolute;
}

.stage-mesh {
  inset: -24%;
  background:
    radial-gradient(22% 26% at 18% 30%, rgb(255 255 255 / 16%), transparent 70%),
    radial-gradient(54% 60% at 18% 32%, rgb(194 32 27 / 88%), transparent 74%),
    radial-gradient(44% 50% at 96% 90%, rgb(194 32 27 / 38%), transparent 74%),
    radial-gradient(60% 50% at 46% 108%, rgb(107 18 15 / 90%), transparent 78%),
    linear-gradient(162deg, var(--stage-1), var(--stage-0) 72%);
  animation: mesh-drift 26s ease-in-out infinite alternate;
}

@keyframes mesh-drift {
  from { transform: translate3d(-2%, 1%, 0) rotate(-1.5deg) scale(1); }
  to { transform: translate3d(3%, -2%, 0) rotate(2deg) scale(1.08); }
}

/* Coni di luce dei riflettori. */
.stage-beams {
  inset: -10% -10% 30%;
  background: conic-gradient(from 196deg at 88% -12%, transparent 0 9deg, rgb(255 255 255 / 15%) 15deg, transparent 23deg, transparent 30deg, rgb(194 32 27 / 22%) 36deg, transparent 46deg);
  -webkit-mask: linear-gradient(180deg, #000, transparent 88%);
  mask: linear-gradient(180deg, #000, transparent 88%);
  mix-blend-mode: screen;
  opacity: 0.7;
  transform: scaleX(-1);
  animation: beam-breathe 9s ease-in-out infinite alternate;
}

@keyframes beam-breathe {
  from { opacity: 0.42; }
  to { opacity: 0.86; }
}

.stage-vignette {
  inset: 0;
  background:
    radial-gradient(120% 100% at 56% 40%, transparent 58%, rgb(0 0 0 / 38%) 100%),
    linear-gradient(0deg, rgb(0 0 0 / 28%), transparent 34%);
}

/* Altezze e spaziature in svh: il contenuto deve stare in uno schermo anche sui telefoni bassi con le barre del browser visibili. */
.hero-body {
  display: grid;
  gap: clamp(12px, 2.4svh, 26px);
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding:
    clamp(20px, 5svh, 88px)
    max(var(--gut), env(safe-area-inset-right))
    calc(clamp(20px, 5svh, 96px) + env(safe-area-inset-bottom))
    max(var(--gut), env(safe-area-inset-left));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--stage-ink-2);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 44px;
  height: 2px;
  background: var(--stage-line);
  transform-origin: left;
  animation: rv-line 0.9s var(--ease-out) 0.1s both;
}

@keyframes rv-line {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* «CUS UNIMIB» su una riga: in Archivo 900 al 62% il testo e' largo 4,245 em, il divisore 4,4 lascia un margine. */
.t-hero {
  margin: 0;
  font-size: clamp(2.4rem, min((100vw - 2 * var(--gut)) / 4.4, 15svh), 9.6rem);
  white-space: nowrap;
  font-weight: 900;
  font-stretch: 62%;
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* Ogni riga sale da una maschera, con il bianco che sfuma nel colore del club. */
.t-hero .ln {
  display: block;
  overflow: hidden;
  padding-block: 0.04em 0.02em;
  margin-block: -0.04em -0.02em;
}

.t-hero .ln > span {
  display: block;
  color: #fff;
  background: linear-gradient(180deg, #fff 30%, #f0c9c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: line-up 0.9s var(--ease-out) both;
}

@keyframes line-up {
  from { transform: translateY(108%); }
  to { transform: none; }
}

.t-lead {
  max-width: 50ch;
  margin: 0;
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.45rem);
  line-height: 1.45;
  color: var(--stage-ink-2);
}

/* ---------- Pulsanti ---------- */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 560px;
  margin-top: clamp(0px, 1svh, 10px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 2px solid currentcolor;
  border-radius: 2px;
  font-size: 0.98rem;
  font-weight: 800;
  font-stretch: 84%;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
}

.btn svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn svg .dot {
  fill: currentcolor;
  stroke: none;
}

.btn-fill {
  background: var(--fill);
  border-color: var(--fill);
  color: #fff;
}

.btn-fill:active {
  background: var(--fill-press);
  border-color: var(--fill-press);
}

.btn-glass {
  border-color: rgb(255 255 255 / 40%);
  background: rgb(255 255 255 / 9%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #f1f5f6;
}

.btn-glass:active {
  background: rgb(255 255 255 / 20%);
}

@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn-fill:hover { background: var(--fill-hover); border-color: var(--fill-hover); }
  .btn-glass:hover { background: rgb(255 255 255 / 16%); }
}

.btn .handle {
  text-transform: none;
  letter-spacing: 0.02em;
}

.btn:focus-visible,
.brand:focus-visible {
  outline: 2px solid currentcolor;
  outline-offset: 3px;
}

/* ---------- Orari sportello ---------- */

.hours {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  padding: 12px 16px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 2px;
  background: rgb(255 255 255 / 7%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hours svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--stage-line);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hours h2 {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--stage-ink-2);
}

.hours p {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 850;
  font-stretch: 74%;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--stage-ink);
  font-variant-numeric: tabular-nums;
}

.hours .sep {
  color: var(--stage-line);
}

.hours .range {
  white-space: nowrap;
}

/* Android da 360px: l'orario resta su una riga. */
@media (max-width: 374px) {
  .hours p {
    font-size: 1.05rem;
  }
}

/* Su telefono i pulsanti occupano tutta la larghezza, come nel sito. */
@media (max-width: 560px) {
  .btn {
    flex: 1 1 100%;
  }
}

/* Telefoni bassi (iPhone SE, Android compatti con le barre visibili): via la frase descrittiva, così pulsanti e orari restano nel primo schermo. */
@media (orientation: portrait) and (max-height: 620px) {
  .t-lead {
    display: none;
  }
}

/* Telefono in orizzontale: titolo su una riga, pulsanti affiancati. */
@media (orientation: landscape) and (max-height: 500px) {
  .head {
    min-height: 56px;
  }

  .brand img {
    height: 36px;
  }

  .t-hero {
    font-size: clamp(2.4rem, 16svh, 4rem);
  }

  .t-lead {
    display: none;
  }

  .btn {
    flex: 1 1 0;
    min-height: 48px;
  }
}

@media (max-width: 359px) {
  .brand span {
    font-size: 1.25rem;
  }

  .eyebrow {
    gap: 10px;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  .eyebrow::before {
    width: 24px;
  }

  .hours {
    gap: 12px;
    padding: 12px 14px;
  }

  .hours p {
    font-size: 1rem;
    letter-spacing: 0.04em;
  }

  .btn {
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-mesh,
  .stage-beams,
  .eyebrow::before,
  .t-hero .ln > span {
    animation: none;
  }

  .btn {
    transition: none;
  }
}
