@import url("https://fonts.googleapis.com/css2?family=Mohave:wght@300;700&display=swap");

/* Root Variables */
:root {
  --color-text: #181818;
  --color-bg: #ed7c31;
  --color-bg-accent: #ff5c00;
  --size: clamp(4rem, 1rem + 12vmin, 10rem);
  --gap: calc(var(--size) / 14);
  --duration: 60s;
  --scroll-start: 0;
  --scroll-end: calc(-100% - var(--gap));
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #ed7c31;
    --color-bg: #181818;
    --color-bg-accent: #333333;
  }
}

h1 {
  margin-block-start: 0em;
  margin-block-end: 0em;
}

/* Global Styles */
 {
  box-sizing: border-box;
}

body {
  font-family: "Mohave", sans-serif;
  font-optical-sizing: auto;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: linear-gradient(
    0deg,
    rgba(24, 24, 24, 1) 34%,
    rgba(40, 40, 40, 1) 47%,
    rgba(72, 72, 72, 1) 90%
  );
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  overflow-y: scroll;
}

/* Hide Scrollbar */
::-webkit-scrollbar {
  display: none;
}
html {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Layout Styles */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.main-content {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.main-content.show {
  opacity: 1;
}

header {
  text-align: center;
  margin: 0;
}

/* Typography */
vig {
  font-family: "Mohave", sans-serif;
  text-transform: uppercase;
  font-style: italic;
  font-size: 8vw;
  text-align: center;
  line-height: 1;
  margin: 0;
  color: #ff5c00;
  -webkit-text-fill-color: white;
  text-shadow: 1px 0px 0px #ff5c00, 0px 1px 0px #ff5c00, 2px 1px 0px #ff5c00,
    1px 2px 0px #ff5c00, 3px 2px 0px #ff5c00, 2px 3px 0px #ff5c00,
    4px 3px 0px #ff5c00, 3px 4px 0px #ff5c00, 5px 4px 0px #ff5c00,
    4px 5px 0px #ff5c00, 6px 5px 0px #ff5c00, 5px 6px 0px #ff5c00,
    7px 6px 0px #ff5c00, 6px 7px 0px #ff5c00, 8px 7px 0px #ff5c00,
    7px 8px 0px #ff5c00, 9px 8px 0px #ff5c00, 8px 9px 0px #ff5c00,
    10px 9px 0px #ff5c00, 9px 10px 0px #ff5c00, 11px 10px 0px #ff5c00,
    10px 11px 0px #ff5c00;
}

vig h1 {
  margin-bottom: 5px;
}

h1 strong {
  font-family: "Mohave", sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: #fafafa;
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
  margin-bottom: 0.2rem;
  position: relative;
  display: inline-block;
  text-shadow: 1px 0px 0px #181818, 0px 1px 0px #181818, 2px 1px 0px #181818,
    1px 2px 0px #181818, 3px 2px 0px #181818, 2px 3px 0px #181818,
    4px 3px 0px #181818, 3px 4px 0px #181818, 5px 4px 0px #181818,
    4px 5px 0px #181818, 6px 5px 0px #181818, 5px 6px 0px #181818,
    7px 6px 0px #181818, 6px 7px 0px #181818, 8px 7px 0px #181818,
    7px 8px 0px #181818;
}

vig h2 {
  margin-bottom: 5px;
}

h2 strong {
  font-family: "Mohave", sans-serif;
  font-size: clamp(1rem, 2vw, 2.5rem);
  font-weight: 700;
  color: #fafafa;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 0.2rem;
  position: relative;
  display: inline-block;
  text-shadow: 1px 0px 0px #181818, 0px 1px 0px #181818, 2px 1px 0px #181818,
    1px 2px 0px #181818, 3px 2px 0px #181818, 2px 3px 0px #181818,
    4px 3px 0px #181818, 3px 4px 0px #181818, 5px 4px 0px #181818,
    4px 5px 0px #181818, 6px 5px 0px #181818, 5px 6px 0px #181818,
    7px 6px 0px #181818, 6px 7px 0px #181818, 8px 7px 0px #181818,
    7px 8px 0px #181818;
}

/* Buttons */
.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fafafa;
  background: #ed7c31;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 2px solid #ed7c31;
  position: relative;
  overflow: hidden;
  box-shadow: 4px 4px 0px #333333, 8px 8px 0px rgba(0, 0, 0, 0.1);
  text-shadow: 1px 0px 0px #181818, 0px 1px 0px #181818, 2px 1px 0px #181818,
    1px 2px 0px #181818, 3px 2px 0px #181818, 2px 3px 0px #181818,
    4px 3px 0px #181818, 3px 4px 0px #181818;
  text-align: center;
  line-height: 1.2;
}

.btn:hover {
  transform: translate(-4px, -4px);
  box-shadow: 2px 2px 0px #333333, 4px 4px 0px rgba(0, 0, 0, 0.15);
  background: #ff8c3f;
  border-color: #ff8c3f;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 1px 1px 0px #333333;
}

/* Hover Effect */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Media Queries */
@media (max-width: 768px) {
  vig {
    font-size: 8vw;
    text-shadow: 2px 0px 0px #ff5c00, 0px 2px 0px #ff5c00, 3px 2px 0px #ff5c00,
      2px 3px 0px #ff5c00, 4px 3px 0px #ff5c00, 3px 4px 0px #ff5c00,
      5px 4px 0px #ff5c00, 4px 5px 0px #ff5c00;
  }

  .marquee img {
    width: calc(var(--size) / 2);
    max-height: calc(var(--size) / 2);
  }
}

/* Marquee Styles */
.wrapper {
  display: flex;
  flex-direction: column;
  gap: calc(var(--gap) / 2);
  margin: 0.5rem auto;
  max-width: 100vw;
}

.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: var(--gap);
  mask-image: linear-gradient(
    var(--mask-direction, to right),
    hsl(0 0% 0% / 0),
    hsl(0 0% 0% / 1) 20%,
    hsl(0 0% 0% / 1) 80%,
    hsl(0 0% 0% / 0)
  );
}

.marquee__group {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--gap);
  min-width: 100%;
  animation: scroll-x var(--duration) linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .marquee__group {
    animation-play-state: paused;
  }
}

.marquee--reverse .marquee__group {
  animation-direction: reverse;
  animation-delay: -3s;
}

@keyframes scroll-x {
  from {
    transform: translateX(var(--scroll-start));
  }
  to {
    transform: translateX(var(--scroll-end));
  }
}

.marquee img {
  display: grid;
  place-items: center;
  width: var(--size);
  max-height: var(--size);
  fill: var(--color-text);
  background: #333333;
  aspect-ratio: 16/9;
  padding: calc(var(--size) / 10);
  border-radius: 0.5rem;
  object-fit: contain;
}

/* Stats Section Styles */
.stats-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 20px;
}

.stat-item {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards;
  flex: 1;
  min-width: 280px;
  max-width: 100%;
}

.stat-item:nth-child(1) {
  animation-delay: 1s;
}

.stat-item:nth-child(2) {
  animation-delay: 1.2s;
}

.stat-number {
  font-size: clamp(2em, 5vw, 3em);
  font-weight: bold;
  color: #e67e22;
  transition: transform 0.3s;
  word-break: break-word;
  font-style: italic;
  text-shadow: 1px 0px 0px #181818, 0px 1px 0px #181818, 2px 1px 0px #181818,
    1px 2px 0px #181818, 3px 2px 0px #181818, 2px 3px 0px #181818,
    4px 3px 0px #181818, 3px 4px 0px #181818, 5px 4px 0px #181818,
    4px 5px 0px #181818, 6px 5px 0px #181818, 5px 6px 0px #181818,
    7px 6px 0px #181818, 6px 7px 0px #181818, 8px 7px 0px #181818,
    7px 8px 0px #181818;
}

.stat-description {
  font-size: clamp(1em, 3vw, 1.2em);
  margin-top: 1px;
  color: #ececec;
  padding: 0 5px;
}

.stat-item:hover .stat-number {
  transform: scale(1.1);
}

/* Entrance Animation */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Background Slideshow */
.full-screen {
  height: 100vh;
  width: 100%;
}

.parallax-hero,
.zoom-hero {
  position: absolute;
  top: 0;
  left: 0;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
}

.bg-slideshow-wrapper {
  position: fixed;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease-in;
  z-index: 0;
}

.bg-slideshow-wrapper.visible {
  opacity: 1;
}

.bg-slideshow {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in, visibility 0.5s;
  animation: slideShow 32s linear infinite 0s; /* Adjusted total duration */
}

.bg-slide-1 {
  opacity: 1;
  background: url(https://www.vigliancohoops.com/wp-content/uploads/2023/11/230922_havenxgriesel_edit1-1-scaled.jpg)
    no-repeat center center;
  background-size: cover;
}

.bg-slide-2 {
  animation-delay: 8s;
  background: url(https://www.vigliancohoops.com/wp-content/uploads/2024/07/IMG_5946-1.png)
    no-repeat center center;
  background-size: cover;
}

.bg-slide-3 {
  animation-delay: 16s;
  background: url(https://www.vigliancohoops.com/wp-content/uploads/2021/08/roby-viglianco.png)
    no-repeat center center;
  background-size: cover;
}

.bg-slide-4 {
  animation-delay: 24s;
  background: url(https://www.vigliancohoops.com/wp-content/uploads/2024/07/66941701d0c1d.preview1.jpg)
    no-repeat center center;
  background-size: cover;
}

@keyframes slideShow {
  0% {
    opacity: 0;
    visibility: visible;
    transform: scale3d(1, 1, 1);
  }
  5% {
    opacity: 1;
  }
  33% {
    opacity: 1;
  }
  41% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    visibility: hidden;
    transform: scale3d(1, 1, 1);
  }
}

/* Overlay Styles */
.dark-overlay-light::before,
.dark-overlay-medium::before,
.dark-overlay-heavy::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.dark-overlay-light::before {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.2) 20%,
    rgba(0, 0, 0, 0.3) 60%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

.dark-overlay-medium::before {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.3) 20%,
    rgba(0, 0, 0, 0.5) 60%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.dark-overlay-heavy::before {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.4) 20%,
    rgba(0, 0, 0, 0.7) 60%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

/* Loader Styles */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgb(24, 24, 24);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loader-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

.ball {
  height: 10vmin;
  width: 10vmin;
  background: hsl(30 80% 30%);
  border-radius: 50%;
  animation: bounce 2s infinite;
}

.floor {
  position: relative;
}

.floor::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 80%;
  height: 10%;
  background: radial-gradient(hsl(0 0% 10% / 0.5), hsl(0 0% 10% / 0.1));
  border-radius: 50%;
  z-index: -1;
  left: 50%;
  transform: translateX(-50%) translateY(50%);
  animation: shadow 2s infinite;
}

svg {
  height: 100%;
  width: 100%;
  fill: hsl(30 100% 50%);
}

@keyframes bounce {
  0% {
    transform: translateY(-100%) rotate(0deg);
    animation-timing-function: ease-in;
  }
  40% {
    transform: translateY(0) rotate(360deg);
    animation-timing-function: ease-out;
  }
  55% {
    transform: translateY(-25%) rotate(450deg);
    animation-timing-function: ease-in;
  }
  70% {
    transform: translateY(0) rotate(540deg);
    animation-timing-function: ease-out;
  }
  80% {
    transform: translateY(-12.5%) rotate(585deg);
    animation-timing-function: ease-in;
  }
  90% {
    transform: translateY(0) rotate(630deg);
    animation-timing-function: ease-out;
  }
  95% {
    transform: translateY(-6.25%) rotate(652.5deg);
    animation-timing-function: ease-in;
  }
  100% {
    transform: translateY(0) rotate(675deg);
  }
}

@keyframes shadow {
  0% {
    transform: translateX(-50%) translateY(50%) scale(0.5);
    opacity: 0.2;
  }
  40% {
    transform: translateX(-50%) translateY(50%) scale(1);
    opacity: 0.5;
  }
  55% {
    transform: translateX(-50%) translateY(50%) scale(0.7);
    opacity: 0.3;
  }
  70% {
    transform: translateX(-50%) translateY(50%) scale(1);
    opacity: 0.5;
  }
  80% {
    transform: translateX(-50%) translateY(50%) scale(0.85);
    opacity: 0.4;
  }
  90% {
    transform: translateX(-50%) translateY(50%) scale(1);
    opacity: 0.5;
  }
  95% {
    transform: translateX(-50%) translateY(50%) scale(0.92);
    opacity: 0.45;
  }
  100% {
    transform: translateX(-50%) translateY(50%) scale(1);
    opacity: 0.5;
  }
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
  .btn {
    color: #fafafa;
    background: #ed7c31;
    border-color: #ed7c31;
    text-shadow: 1px 0px 0px #181818, 0px 1px 0px #181818, 2px 1px 0px #181818,
      1px 2px 0px #181818, 3px 2px 0px #181818, 2px 3px 0px #181818,
      4px 3px 0px #181818, 3px 4px 0px #181818;
  }

  .btn:hover {
    background: #ff8c3f;
    border-color: #ff8c3f;
  }
}

/* Responsive Adjustments for Mobile Devices */
@media (max-width: 768px) {
  /* Reduce margins and padding for the stats section */
  .stats-section {
    margin: 0; /* Reduce vertical margin */
    gap: 1rem; /* Reduce gap between items */
    padding: 0 10px; /* Reduce horizontal padding */
  }

  /* Adjust stat items */
  .stat-item {
    margin-bottom: 0; /* Add margin between stacked items */
  }

  /* Reduce font sizes for numbers and descriptions */

  .stat-description {
    font-size: clamp(0.9em, 2.5vw, 1.1em); /* Slightly smaller font size */
  }

  /* Adjust heading font size */
  h1 {
    /* Reduce font size for headings */
    margin-bottom: 0rem; /* Reduce bottom margin */
  }

  h2,
  h2 strong {
    margin-bottom: 0rem;
  }

  /* Adjust container padding */
  .container {
    padding: 1rem;
  }

  /* Adjust spacing for CTA buttons */
  .cta-buttons {
    margin-bottom: 1rem;
  }

  /* Reduce padding in buttons */
  .btn {
    font-size: clamp(0.9em, 2.5vw, 1.1em);
  }

  .cta-buttons {
    gap: 0.5rem; /* Reduce gap between buttons */
    padding: 0 10px; /* Adjust horizontal padding */
  }

  /* Adjust button styles for mobile */
  .btn {
    font-size: 0.95rem; /* Slightly smaller font size */
    flex: 1; /* Allow buttons to flex and fill available space */
    max-width: 100%; /* Prevent overflow */
    width: 100%;
    text-align: center;
    line-height: 1.2;
    padding: 0.6rem 1rem;
  }
}
