/* Bee in Sport Management — coming soon
   Layout ricostruito dal PDF "2026 BEEINSPORT COMINGSOON" (pagina 1200 × 1082). */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-900-normal.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #E30613;
  --red-dark: #B8040F;
  --ink: #000;
  --text: #121212;
  --muted: #4a4a4a;
  --bg: #fff;

  /* diametro del disco bianco del marchio: 236px su 1200px di pagina */
  --mark: clamp(150px, 19.7vw, 236px);
  --word: clamp(232px, 29.8vw, 358px);
  --ball: clamp(130px, 14vw, 180px);

  --font: "Source Sans 3", "Myriad Pro", Myriad, "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
}
.skip:focus { top: 16px; }

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

.hero {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: clamp(28px, 5vh, 64px);
  padding: clamp(18px, 2.6vw, 32px) 0 clamp(36px, 6vh, 72px);
  /* taglia solo in orizzontale (pallone fuori schermo): la card può scendere sul footer */
  overflow: hidden;
  overflow: clip visible;
}

.brand {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* fascia rossa: 50% del disco in altezza, a partire dal 21% */
.brand__band {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--mark) * .21);
  height: calc(var(--mark) * .5);
  background: var(--red);
  transform-origin: center;
  animation: band-in .9s var(--ease) both;
}

.brand__mark {
  position: relative;
  width: var(--mark);
  height: var(--mark);
  animation: mark-in .9s .15s var(--ease) both;
}

.brand__word {
  width: var(--word);
  margin-top: calc(var(--mark) * .06);
  animation: rise .8s .35s var(--ease) both;
}

/* ---------- Teaser ---------- */

.teaser {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
}

.ball {
  position: relative;
  width: var(--ball);
  aspect-ratio: 1;
  /* distanza dal bordo sinistro e giri: calcolati in index.html, questi sono i fallback */
  --roll-x: calc(-50vw - var(--ball));
  --roll-deg: -420deg;
  --over-x: calc(var(--ball) * .28);
  --over-deg: 38deg;
  animation: roll-x 3.4s .45s linear both;
}

/* sfera: 83% del riquadro, appoggiata sull'ombra */
.ball__body {
  position: absolute;
  z-index: 1;
  left: 8.5%;
  top: 11.8%;
  width: 83%;
  aspect-ratio: 1;
}

/* picture è inline di default e lì i transform vengono ignorati: serve block */
.ball picture,
.ball img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ruota solo la texture (luce tolta dalla foto), stessa durata e curva della traslazione */
.ball picture { animation: roll-spin 3.4s .45s linear both; }

/* luce fissa sopra la texture: è questo che fa leggere il rotolamento */
.ball__shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 38% 32%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .14) 68%, rgba(0, 0, 0, .42) 100%);
  pointer-events: none;
}

.ball__shadow {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 2%;
  height: 7%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .22), transparent);
}

.headline {
  margin: clamp(14px, 2vh, 22px) 0 0;
  font-weight: 900;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: .98;
  letter-spacing: -.015em;
  color: var(--ink);
  animation: rise .8s .7s var(--ease) both;
}

.headline span { display: block; }
.headline__accent { color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 172px;
  min-height: 44px;
  margin-top: clamp(28px, 4.5vh, 44px);
  padding: 10px 28px;
  border: 2px solid var(--red);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
  animation: rise .8s .85s var(--ease) both;
}

.btn:hover { color: var(--red); }
.btn:active { transform: scale(.97); }

/* Contatti: il bottone resta quello del PDF, il click apre una card sovrapposta */
.contact {
  position: relative;
  z-index: 5;
  margin-top: clamp(28px, 4.5vh, 44px);
  animation: rise .8s .85s var(--ease) both;
}

.contact .btn {
  margin-top: 0;
  animation: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

/* finestra centrata nello schermo: visibile qualunque sia l'altezza della pagina */
.contact-card {
  width: min(340px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-top: 4px solid var(--red);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .08);
  text-align: left;
}
.contact-card[open] { animation: card-in .3s var(--ease) both; }
.contact-card::backdrop {
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.contact-card[open]::backdrop { animation: fade-in .3s ease both; }
.contact-card:focus { outline: none; }

/* il padding sta dentro: i click sul bordo del dialog non contano come "fuori" */
.contact-card__inner {
  position: relative;
  padding: 24px 22px 14px;
}

.contact-card__title {
  margin: 0 32px 10px 0;
  font-weight: 700;
  color: var(--ink);
}
.contact-card__title span { color: var(--red); }

.contact-card__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.contact-card__close svg { width: 18px; height: 18px; fill: var(--muted); }
.contact-card__close:hover { background: #f4f4f4; }

.contact-card__row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 -10px;
  padding: 10px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s var(--ease);
}
.contact-card__row + .contact-card__row { border-top: 1px solid #eee; border-radius: 0 0 10px 10px; }
.contact-card__row:hover { background: #fdf0f1; }

.contact-card__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
}
.contact-card__icon svg { width: 20px; height: 20px; fill: #fff; }

.contact-card__text { display: flex; flex-direction: column; line-height: 1.25; }
.contact-card__text small {
  font-weight: 400;
  font-size: .8125rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.footer {
  flex-shrink: 0;
  border-top: 2px solid var(--red);
  padding: clamp(28px, 4vw, 36px) 16px max(32px, env(safe-area-inset-bottom));
  font-size: .9375rem;
  line-height: 1.3;
  color: var(--text);
}

.footer:focus { outline: none; }

.footer__inner {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: center;
  align-items: start;
  column-gap: clamp(24px, 3vw, 36px);
  max-width: 900px;
  margin: 0 auto;
}

.footer__mark {
  width: 74px;
  height: 74px;
}

.footer__contact {
  font-style: normal;
}

.footer__contact p { margin: 0; }

.footer__name {
  font-weight: 700;
  color: var(--ink);
}
.footer__name span { color: var(--red); }

.footer a {
  text-decoration: none;
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .25s var(--ease), color .25s var(--ease);
}
.footer a:hover {
  color: var(--red);
  background-size: 100% 1px;
}

.sep { margin: 0 .25em; color: var(--muted); }

.footer__legal { padding-left: clamp(0px, 2vw, 24px); }

@media (max-width: 560px) {
  .footer__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 16px;
    text-align: center;
  }
  .footer__legal { padding-left: 0; }
}

/* su schermi bassi (laptop 13", landscape) si stringe la verticale */
@media (max-height: 760px) and (min-width: 561px) {
  :root {
    --mark: clamp(130px, 22vh, 200px);
    --word: clamp(210px, 33vh, 300px);
    --ball: clamp(110px, 17vh, 150px);
  }
  .headline { font-size: clamp(1.9rem, 5.4vh, 2.8rem); }
}

/* ---------- Motion ---------- */

@keyframes band-in {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes mark-in {
  from { opacity: 0; transform: scale(.6) rotate(-35deg); }
  to   { opacity: 1; transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* il pallone entra da sinistra, supera di poco il centro, si ferma e torna indietro.
   Stesse tappe e curve per traslazione e rotazione: rotola anche nel ritorno. */
@keyframes roll-x {
  0%   { transform: translateX(var(--roll-x));  animation-timing-function: cubic-bezier(.33, .55, .45, 1); }
  76%  { transform: translateX(var(--over-x)); animation-timing-function: cubic-bezier(.45, 0, .4, 1); }
  100% { transform: none; }
}

@keyframes roll-spin {
  0%   { transform: rotate(var(--roll-deg));  animation-timing-function: cubic-bezier(.33, .55, .45, 1); }
  76%  { transform: rotate(var(--over-deg)); animation-timing-function: cubic-bezier(.45, 0, .4, 1); }
  100% { transform: none; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}



@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
