
/* =========================================================
   ROOT VARIABLES
   ========================================================= */

:root {
  --bg: #f6f8fb;
  --bg-soft: #eef2f8;
  --text: #101828;
  --muted: #596780;
  --primary: #0f766e;
  --primary-2: #155eef;
  --accent: #f59e0b;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #d8e0ec;
  --ring: rgba(21, 94, 239, 0.22);
  --shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --container: min(1240px, 96vw);
  --danger: #dd4697;
  --success: #10b0a6;
}


/* =========================================================
   GLOBAL RESET
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100%;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  overscroll-behavior: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
  display: none;
}


/* =========================================================
   TAILWIND / MAIN LAYOUT SAFETY
   ========================================================= */

main > :first-child {
  margin-top: 0 !important;
}

main > :last-child {
  margin-bottom: 0 !important;
}


/* =========================================================
   HERO HEADER
   ========================================================= */

/*
   IMPORTANT:

   The background is attached only to .hero-header.

   The dashboard and the metric cards are OUTSIDE .hero-header,
   therefore the hero image cannot extend behind them.
*/

.hero-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-header-bg {
  position: absolute;
  inset: 0;
  z-index: -2;

  background-image: url("assets/img/bg/herobg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-header-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;

  background:
    linear-gradient(
      90deg,
      rgba(3, 12, 35, 0.92) 0%,
      rgba(5, 18, 48, 0.82) 45%,
      rgba(9, 28, 65, 0.72) 100%
    );
}

.hero-header-overlay::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      180deg,
      rgba(0, 40, 142, 0.10) 0%,
      rgba(0, 40, 142, 0.04) 65%,
      rgba(0, 0, 0, 0.18) 100%
    );
}

.hero-text {
  color: #ffffff;
}

.hero-muted {
  color: rgba(255, 255, 255, 0.82);
}

.hero-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-secondary-button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.hero-secondary-button:hover {
  background: rgba(255, 255, 255, 0.18);
}


/* =========================================================
   RANKING BODIES CAROUSEL
   ========================================================= */

.ranking-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.ranking-track {
  display: flex;
  align-items: center;

  width: max-content;

  /*
    Smaller gap than before.
    The logos themselves have a fixed compact footprint.
  */
  gap: 0.75rem;

  animation: ranking-scroll 28s linear infinite;

  will-change: transform;
}

.ranking-carousel:hover .ranking-track {
  animation-play-state: paused;
}

.ranking-logo {
  flex: 0 0 auto;

  width: 150px;
  min-width: 150px;
  height: 100px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.ranking-logo img {
  width: auto;
  height: 82px;
  max-width: 170px;

  object-fit: contain;
  display: block;

  opacity: 0.9;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.ranking-logo:hover img {
  opacity: 1;
  transform: scale(1.05);
}


/* =========================================================
   CAROUSEL ANIMATION
   ========================================================= */

@keyframes ranking-scroll {

  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .ranking-track {
    animation: none;
  }

  .hero-secondary-button,
  .ranking-logo img {
    transition: none;
  }

}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1024px) {

  .ranking-track {
    gap: 0.6rem;
    animation-duration: 26s;
  }

  .ranking-logo {
    width: 135px;
    min-width: 135px;
    height: 92px;
  }

  .ranking-logo img {
    height: 76px;
    max-width: 155px;
  }

}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 768px) {

  .hero-header {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }

  .ranking-track {
    gap: 0.5rem;
    animation-duration: 24s;
  }

  .ranking-logo {
    width: 120px;
    min-width: 120px;
    height: 82px;
  }

  .ranking-logo img {
    height: 68px;
    max-width: 140px;
  }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

  .ranking-track {
    gap: 0.35rem;
  }

  .ranking-logo {
    width: 105px;
    min-width: 105px;
    height: 76px;
  }

  .ranking-logo img {
    height: 60px;
    max-width: 125px;
  }

}
