/* intro.css — CSS-only infinite scrolling logo marquee with stable spacing */

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

.visually-hidden{
  position:absolute!important;
  height:1px;width:1px;overflow:hidden;
  clip:rect(1px,1px,1px,1px);
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; min-height: 60vh; }

/* REPLACED image rule with video rule */
.hero-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(0.75);
  z-index: 0;
}

.hero-overlay {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 16px;
  text-align: center; color: #fff;
  padding: 0 20px;
  z-index: 1;
}
.hero-overlay h1 { margin: 0; font-size: 2.4rem; font-weight: 900; letter-spacing: .5px; }
.hero-overlay h1 span { color: #aee9ff; }
.hero-overlay p { margin: 0 auto; max-width: 700px; font-size: 1.1rem; }

/* Respect reduced motion users */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero { background: url("res/homepage/h_intro.png") center/cover no-repeat; }
}

/* =======================================================================
   UNIVERSITIES — CSS-only infinite marquee
======================================================================= */

.universities { padding: 28px 0; }

/* Full-bleed across viewport; hide overflow */
.logos{
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  padding: 24px 0;
  background: #fff;
  white-space: nowrap;
  position: relative;

  /* prevent tiny inline whitespace between slides */
  font-size: 0;
  line-height: 0;
}

/* Edge fades (optional) */
.logos::before,
.logos::after{
  position: absolute;
  top: 0; width: 200px; height: 100%;
  content: "";
  z-index: 2; pointer-events: none;
}
.logos::before{
  left: 0;
  background: linear-gradient(to left, rgba(255,255,255,0), #fff);
}
.logos::after{
  right: 0;
  background: linear-gradient(to right, rgba(255,255,255,0), #fff);
}

/* Slide animation */
@keyframes slide {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-100%,0,0); }
}

/* Each slide sits side-by-side and never wraps */
.logos-slide{
  display: inline-flex;          /* inline so two slides sit next to each other */
  align-items: center;
  gap: var(--logo-gap, 40px);    /* <<< spacing lives here */
  animation: slide 35s linear infinite;
  will-change: transform;
  vertical-align: middle;
}

/* Logo images: do not shrink, keep spacing stable */
.logos-slide img{
  display: block;
  height: 80px;
  width: auto;
  flex: 0 0 auto;                /* <<< prevents shrinking/collapsing on mobile */
  filter: grayscale(1);
  opacity: 0.9;
  transition: filter .2s ease, opacity .2s ease, transform .2s ease;
}
.logos-slide img:hover{
  filter: none;
  opacity: 1;
  transform: scale(1.03);
}

/* Responsive tweaks for logo size/spacing */
@media (max-width: 960px){
  :root{ --logo-gap: 32px; }
  .logos-slide img{ height: 64px; }
  .logos::before, .logos::after{ width: 140px; }
}
@media (max-width: 600px){
  :root{ --logo-gap: 24px; }
  .logos-slide img{ height: 52px; }
  .logos::before, .logos::after{ width: 100px; }
}

/* =======================================================================
   Impact band
======================================================================= */
.impact { background: #0fa6d7; color: #fff; padding: 32px 0; }
.impact-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 22px;
  align-items: start;
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 20px;
}
.impact-title h3 { margin: 0; font-size: 1.6rem; line-height: 1.2; }
.impact-stat{
  background: rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
}
.impact-stat .num{ font-size: 1.8rem; font-weight: 900; }
.impact-stat .label{ opacity: .95; margin-bottom: .35rem; font-weight: 600; }

/* =======================================================================
   Partners
======================================================================= */
#partners{ padding: 56px 20px; }
#partners h3{ text-align: center; margin-bottom: 32px; font-size: 1.8rem; }
.card-grid{
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 22px;
  max-width: 1150px;
  margin: 0 auto;
}
.card{
  background: #fff;
  border: 1px solid #eef2f5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
  transition: transform .2s ease;
}
.card:hover{ transform: translateY(-4px); }
.card img{ width: 100%; display: block; aspect-ratio: 16/10; object-fit: cover; }
.card-body{ padding: 14px 16px; }
.card-body h4{ margin: 0 0 8px; font-size: 1.2rem; }
.card-body p{ font-size: .95rem; line-height: 1.4; color: #444; }

/* ---------- Responsive for impact/partners ---------- */
@media (max-width: 960px) {
  .impact-grid{ grid-template-columns: 1fr 1fr; }
  .impact-title{ grid-column: 1 / -1; margin-bottom: 12px; text-align: center; }
  .card-grid{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .impact-grid{ grid-template-columns: 1fr; }
  .card-grid{ grid-template-columns: 1fr; }
}
