/* ============================================================
   White Rabbit Red Rabbit — Digital Program
   Custom Styles
   ============================================================ */

/* ----- Base ----- */

body {
  /* Subtle red ambient glow — same hue as the bio-modal backdrop, but low opacity.
     background-attachment: fixed keeps the glow locked to the viewport so it
     reads as ambient light rather than a stripe that scrolls past. */
  background:
    radial-gradient(
      ellipse 90% 70% at 50% 40%,
      rgba(230, 20, 20, 0.16) 0%,
      rgba(160, 10, 10, 0.09) 35%,
      rgba(60, 0, 0, 0.04) 65%,
      rgba(0, 0, 0, 0) 85%
    ),
    #000;
  background-attachment: fixed;
  color: #fff;
  font-family: 'Courier Prime', 'Courier New', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}


/* ----- Typography ----- */

.role-title {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d4d4d4;
}

.person-name {
  font-family: 'Courier Prime', 'Courier New', monospace;
}


/* ----- Cover / Header ----- */

.cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 2rem;
}

.poster-wrapper {
  width: 100%;
}

.poster-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.rabbits {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4rem;
  margin-top: 1.5rem;
}

.rabbit {
  width: 5rem;
}

.rabbit--red {
  animation: float-left 5s ease-in-out infinite;
  transform: rotate(-15deg);
}

.rabbit--white {
  animation: float-right 5s ease-in-out infinite;
  transform: rotate(15deg);
}

.scroll-arrow {
  width: 5rem;
  animation: bounce-down 2s ease-in-out infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(0.5rem); }
}

@media (min-width: 640px) {
  .cover { padding: 1rem 1rem 2rem; }
  .poster-wrapper { max-width: 36rem; margin: 0 auto; }
  .poster-wrapper img { border-radius: 0.5rem; }
  .rabbit { width: 6.5rem; }
  .scroll-arrow { width: 6.5rem; }
  .rabbits { gap: 5rem; }
}


/* ----- Section Layout ----- */

.program {
  max-width: 52rem;
  margin: 0 auto;
  position: relative;
}

.section {
  padding: 2rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-header img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.375rem;
}

.section-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.25rem;
  letter-spacing: 0.15em;
}

.section-divider {
  border: none;
  height: 1px;
  margin: 0 1.5rem;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.3), transparent);
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: 3rem;
  }
  .section-header img {
    width: 3rem;
    height: 3rem;
  }
}


/* ----- Entries (team member rows) ----- */

.entry {
  padding: 0 1.25rem;
  margin-bottom: 0.25rem;
}

.entry-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Left/right alignment works on all viewports */
.entry--left .entry-inner {
  align-items: flex-start;
}

.entry--right .entry-inner {
  align-items: flex-end;
}

.entry--left .entry-text {
  text-align: left;
}

.entry--right .entry-text {
  text-align: right;
}

.entry-text .role-title {
  font-size: 1.4rem;
  margin-bottom: 0.15rem;
}

.entry-text .person-name {
  font-size: 1.15rem;
}

@media (min-width: 768px) {
  .entry {
    padding: 0 3rem;
    margin-bottom: 0.5rem;
  }

  .entry-inner {
    flex-direction: row;
    gap: 2.5rem;
  }

  /* "portrait on right" — reverse the row */
  .entry--right .entry-inner {
    flex-direction: row-reverse;
  }

  .entry-text .role-title {
    font-size: 1.7rem;
  }

  .entry-text .person-name {
    font-size: 1.25rem;
  }
}


/* ----- Portraits ----- */

.portrait {
  width: 11rem;
  height: 14rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portrait:hover {
  transform: scale(1.04);
  box-shadow: 0 0 24px rgba(255, 0, 0, 0.2);
}

@media (min-width: 768px) {
  .portrait {
    width: 13rem;
    height: 16rem;
  }
}


/* ----- Portrait Row (portrait + poke hint side by side) ----- */

.portrait-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.poke-hint {
  width: 12rem;
  height: 12rem;
  animation: poke-pulse 2s ease-in-out infinite;
}

@keyframes poke-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.15); }
}


/* ----- Side Footprint (beside right-aligned portraits) ----- */

.portrait-with-side-footprint {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.side-footprint {
  width: 4rem;
  opacity: 1;
  pointer-events: none;
  transform: rotate(-20deg);
}


/* ----- Footprint Path ----- */

.footprint-connector {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 0.25rem;
  pointer-events: none;
  user-select: none;
}

/* Specifically nudge the trail between Caitlin and Xuanting a bit lower —
   it read as too close to Caitlin and too far from Xuanting otherwise.
   nth-child(3) = the footprint-connector that sits between the 1st and 2nd
   entries in the Creative Team section. */
#creative-team > .footprint-connector:nth-child(3) {
  padding-top: 3rem;
}

.footprint-connector img {
  width: 4rem;
  opacity: 1;
}

/* Alternate rotation for visual path feel */
.footprint-connector:nth-child(odd) img {
  transform: rotate(15deg);
}

.footprint-connector:nth-child(even) img {
  transform: rotate(-15deg);
}

@media (min-width: 768px) {
  .footprint-connector img {
    width: 6.5rem;
  }
}


/* ----- Footer ----- */

.thanks {
  text-align: center;
  padding: 3rem 1rem;
}

.thanks h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.thanks p {
  color: #ccc;
  font-size: 1.1rem;
}

.event-info {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  color: #888;
  font-size: 0.875rem;
}

.event-info .date {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.15em;
  color: #aaa;
  margin-bottom: 0.25rem;
}


/* ----- Carousel ----- */

.carousel-wrap {
  padding: 2.5rem 0;
}

.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0 1rem 1rem;
  /* No snap at all — the scroll position tracks the finger exactly, and
     releasing stops wherever you are instead of animating to a snap point.
     scroll-behavior: auto overrides the page-wide `html { scroll-behavior: smooth }`
     that would otherwise re-animate momentum into a fling.
     overscroll-behavior-x: contain prevents swipes from leaking out to the page. */
  scroll-snap-type: none;
  scroll-behavior: auto;
  overscroll-behavior-x: contain;
}

/* Hide scrollbar */
.carousel::-webkit-scrollbar { display: none; }
.carousel { -ms-overflow-style: none; scrollbar-width: none; }

.carousel-card {
  display: flex;
  gap: 0.5rem;
  height: 14rem;
  flex-shrink: 0;
  width: 85vw;
  max-width: 28rem;
  scroll-snap-align: start;
}

.carousel-card img {
  object-fit: cover;
  border-radius: 2px;
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-card .col-small {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 35%;
}

.carousel-card .col-small img {
  height: calc(50% - 0.25rem);
}

.carousel-card .col-large {
  width: 65%;
}

@media (min-width: 768px) {
  .carousel-card {
    height: 18rem;
  }
  .carousel {
    padding: 0 2rem 1rem;
    gap: 1.25rem;
  }
}


/* ----- Modal ----- */

/*
  We use opacity + visibility instead of display:none/block.
  These properties are GPU-composited — no layout reflow,
  no paint — so the transition is instantaneous in feel.
*/
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, visibility 140ms ease;
  will-change: opacity;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  /* Bright red radial glow that fades to near-black at edges */
  background: radial-gradient(
    ellipse at center,
    rgba(230, 20, 20, 0.85) 0%,
    rgba(160, 10, 10, 0.88) 35%,
    rgba(60, 0, 0, 0.92) 70%,
    rgba(0, 0, 0, 0.95) 100%
  );
}

.modal-card {
  position: relative;
  z-index: 10;
  max-width: 26rem;
  width: 92%;
  margin: 8vh auto 0;
  max-height: 82vh;
  overflow-y: auto;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.modal-portraits {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.modal-portraits img {
  width: 5rem;
  height: 6rem;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.modal-role {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.15em;
  text-align: center;
  color: #888;
  margin-bottom: 0.25rem;
}

.modal-name {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.modal-bio {
  font-size: 0.875rem;
  color: #bbb;
  line-height: 1.7;
}

.modal-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 1.25rem 0;
}

@media (min-width: 768px) {
  .modal-portraits img {
    width: 6rem;
    height: 7rem;
  }
}


/* ----- Animations ----- */

@keyframes float-left {
  0%, 100% { transform: rotate(-15deg) translateY(0); }
  50%      { transform: rotate(-11deg) translateY(-6px); }
}

@keyframes float-right {
  0%, 100% { transform: rotate(15deg) translateY(0); }
  50%      { transform: rotate(11deg) translateY(-6px); }
}

/* fade-in removed — modal uses css opacity transition directly */
