.rubik-maze-regular {
  font-family: "Rubik Maze", system-ui;
  font-weight: 400;
  font-style: normal;
}

.jersey-10-charted-regular {
  font-family: "Jersey 10 Charted", sans-serif;
  font-weight: 400;
  font-style: normal;
}

h1 { 
  color: #00908a; 
  font-size: 64px;
  margin-bottom: 36px;
  /* Forces the text to absolutely stay on a single line */
  white-space: nowrap; 
  
  /* Prevents potential clipping on super narrow mobile screens */
  max-width: 100%;
  box-sizing: border-box;
}

h2 {
  margin-bottom: 24px;
}

body {
  text-align: center; 
  background-color: #fbe6a0;
  font-family: "Inter", sans-serif;
}

.collage {
  display: flex;       /* Lines all 5 images up side-by-side horizontally */
  width: 100vw;        /* Uses 100% of the viewport width */
  margin-left: calc(-50vw + 50%); /* Centers it perfectly if inside a restricted body element */
  margin-right: calc(-50vw + 50%);
  padding: 0;          /* Removes any internal padding restrictions */
  overflow: hidden;    /* Keeps everything tightly inside bounds */
}

.collage > img {
  width: 100%;
  /* Set a defined aspect ratio (e.g., 4:3, 16:9, or 1:1 square) */
  aspect-ratio: 4 / 5; 
  
  /* Crucial: prevents the image from squishing or stretching */
  object-fit: cover;
}

/* Controls the container and top/bottom desktop margin layout */
.flex {
  display: flex;
  gap: 20px; 
  flex-wrap: wrap; /* Keeps it responsive if the screen gets too small */
  justify-content: center;
  max-width: 1000px; 
  margin: 48px auto 40px auto; /* 64px top margin default for desktop layout */
  padding: 0 20px; /* Prevents cards from hitting the absolute edge of mobile screens */
}

.card-link {
  text-decoration: none;
  display: flex;
  flex: 1 1 280px;
  max-width: 220px;
  min-width: 200px;
  cursor: pointer;
}

.card-link > div {
  width: 100%;
  border: 2px dotted #00908a;
  border-radius: 8px;
  padding: 0px 0px 4px 0px; 
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center; 
  text-align: center;
  background-color: transparent;
  
  /* Smooth transition effect when hovering */
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.card-link:hover > div {
  background-color: rgba(0, 144, 138, 0.05); 
  transform: translateY(-4px); /* Subtle lift effect */
}

.card-link div img {
  width: 100%;       /* Forces a specific width */
  height: 150px;      /* Forces a specific height */
  object-fit: cover;  /* Prevents squishing by cropping the image to fit the box */
  margin-bottom: 15px;/* Creates space between the image and the name below it */
}

.flex > .card-link h3 {
  margin: 0;
  margin-top: 5px;
  color: #333;
}

.site-label {
  display: inline-block;
  margin-top: 8px;
  color: #f48067;
  font-size: 0.9rem;
}

.ticker-wrapper {
  width: 100%;
  overflow: hidden;
  background-color: transparent;
  padding: 10px 0; /* Default vertical padding around scrolling text */
  display: flex;
}

.ticker-text {
  display: flex;
  white-space: nowrap;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1.2rem;
  color: #000000;
}

.ticker-text span {
  padding-right: 2rem;
}

/* --- THE DIRECTION & FLIP CONTROL --- */

/* Top ticker stays completely normal and moves right */
.ticker-top .ticker-text {
  animation: marqueeRight 15s linear infinite !important;
}

/* Flip the wrapper itself upside down */
.ticker-bottom {
  transform: rotate(180deg);
}

/* Run a clean, standard left animation on the text inside it */
.ticker-bottom .ticker-text {
  animation: marqueeRight 15s linear infinite !important;
}

/* --- THE ANIMATION LOGIC --- */

@keyframes marqueeRight {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0); 
  }
}

@keyframes marqueeLeft {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

p {
  text-align: right;
  font-size: small;
  margin-bottom: 0px;
}

/* --- MOBILE OPTIMIZATIONS (Max 600px width) --- */
@media (max-width: 600px) {
    h1 {
        font-size: 12vw; 
        margin-bottom: 24px;
    }

    /* 1. Tighten inner spacing inside the tickers */
    .ticker-wrapper {
        padding: 4px 0; 
    }

    /* 2. Snaps the flex-wrap profile cards upward significantly closer to the bottom ticker */
    .flex {
        margin-top: 24px; 
    }
    
    /* Safely forces override if an inline style rule still exists on HTML element */
    .flex[style] {
        margin-top: 24px !important;
    }
}

.audio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px auto;
}



#audio-button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;   /* no iOS long-press "save image" popup */
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;    /* removes the ~300ms tap delay / double-tap zoom */
    cursor: pointer;
    will-change: transform;
    transition: transform 0.1s ease, filter 0.1s ease;
}

/* The "press down" look. .pressed is toggled from JS via pointer events because
   iOS Safari often won't fire :active on a plain <img>; :active is kept as a
   fallback for mouse/desktop. */
#audio-button.pressed,
#audio-button:active {
    transform: scale(0.9);      /* shrinks into the screen */
    filter: brightness(0.9);    /* and darkens a touch, like a real button */
}