:root {
  --white: #ffffff;
  --gray: #5f5f5f;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
  --shadow-hover: 0 24px 60px rgba(0, 0, 0, 0.22);
  --radius: 24px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  font-family: "Roboto Condensed", Arial, Helvetica, sans-serif;
  color: var(--gray);
  background: var(--white);
}

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

.site-shell {
  min-height: 100svh;
  display: grid;
  grid-template-rows: clamp(152px, 23svh, 238px) 1fr clamp(58px, 8svh, 88px);
  background: var(--white);
  overflow-x: hidden;
}

.brand-header,
.tagline-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: clamp(18px, 4vw, 64px);
  padding-block: clamp(28px, 3.6svh, 46px);
  background: var(--white);
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeDown .8s var(--ease) .08s forwards;
}

.brand-script {
  width: clamp(190px, 21vw, 315px);
  height: auto;
  object-fit: contain;
}

.brand-project {
  margin: 0;
  color: #4f4f4f;
  font-size: clamp(18px, 1.55vw, 28px);
  font-weight: 300;
  letter-spacing: .25em;
  line-height: 1.3;
  text-align: left;
}

.hero-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 324px;
  padding: clamp(18px, 2.6vw, 35px) clamp(22px, 4vw, 66px);
  background-image: url("assets/franja-grilli.png");
  background-size: cover;
  background-position: center;
  isolation: isolate;
  opacity: 0;
  animation: fadeIn .9s ease .18s forwards;
}

.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(17, 25, 65, .16), rgba(0, 150, 190, .04), rgba(17, 25, 65, .18));
}

.hero-overlay {
  width: min(1900px, 100%);
  display: grid;
  gap: clamp(24px, 3.4vw, 50px);
}

.hero-kicker {
  margin: 0;
  text-align: center;
  color: var(--white);
  font-size: clamp(18px, 1.85vw, 32px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: .28em;
  line-height: 1.18;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .85s var(--ease) .4s forwards;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: clamp(20px, 3.5vw, 70px);
  align-items: center;
}

.institution-card {
  min-width: 0;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 1.25vw, 24px);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  text-decoration: none;
  outline: none;
  opacity: 0;
  transform: translateY(26px) scale(.98);
  animation: cardEnter .72s var(--ease) forwards;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.institution-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.institution-card:not(.is-disabled):hover,
.institution-card:not(.is-disabled):focus-visible {
  transform: translateY(-7px) scale(1.015);
  box-shadow: var(--shadow-hover);
}

.institution-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .85);
  outline-offset: 5px;
}

.institution-card.is-disabled { cursor: default; }
.institution-card.is-disabled:hover { filter: none; }

.card-1 { animation-delay: .58s; }
.card-2 { animation-delay: .68s; }
.card-3 { animation-delay: .78s; }
.card-4 { animation-delay: .88s; }
.card-5 { animation-delay: .98s; }

.tagline-footer p {
  margin: 0;
  text-align: center;
  color: #5d5d5d;
  font-size: clamp(12px, 1.1vw, 20px);
  font-weight: 300;
  letter-spacing: .31em;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .8s var(--ease) 1.05s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeDown { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes cardEnter { to { opacity: 1; transform: translateY(0) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1280px) {
  .site-shell {
    grid-template-rows: clamp(140px, 21svh, 220px) 1fr clamp(54px, 7svh, 78px);
  }

  .hero-band { min-height: 304px; }

  .cards-grid { gap: clamp(18px, 2.4vw, 34px); }
}

@media (max-width: 1024px) {
  .site-shell {
    min-height: 100svh;
    grid-template-rows: auto 1fr auto;
  }

  .brand-header { padding-block: 34px; }
  .tagline-footer { padding-block: 24px; }

  .hero-band {
    min-height: 0;
    padding-block: 38px;
  }

  .cards-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    width: min(820px, 100%);
    justify-self: center;
  }
}

@media (max-width: 720px) {
  .brand-lockup {
    flex-direction: column;
    gap: 4px;
  }

  .brand-script { width: min(285px, 68vw); }

  .brand-project {
    font-size: 16px;
    letter-spacing: .26em;
    line-height: 1.25;
    text-align: center;
  }

  .hero-kicker,
  .tagline-footer p { letter-spacing: .18em; }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(145px, 1fr));
    gap: 20px;
  }

  .institution-card { border-radius: 20px; }
}

@media (max-width: 480px) {
  .brand-header { padding-block: 30px; }

  .hero-band { padding: 32px 22px; }

  .hero-overlay { gap: 26px; }

  .hero-kicker {
    font-size: 13px;
    letter-spacing: .14em;
  }

  .cards-grid {
    grid-template-columns: minmax(185px, 270px);
    justify-content: center;
  }

  .tagline-footer { padding-block: 22px; }

  .tagline-footer p {
    font-size: 11px;
    letter-spacing: .16em;
  }
}
