:root {
  --scale: 1.4;             /* ← scales home page stars + can */
  --about-star-size: 480px; /* ← change this to resize all about page stars */
}

/* Remove this class to re-enable sponsors */
.sponsors-hidden {
  display: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background-image: url('../images/Background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

/* Stars stacked on top of each other, centered on screen */
.stars-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--scale));
  width: 800px;
  height: 800px;
}

.star {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

.star:active {
  cursor: grabbing;
}

/* Page transitions */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body {
  animation: fadeIn 0.3s ease;
}

body.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* rotation handled by spin.js */

.ktp-title {
  position: fixed;
  top: 50px;
  left: 48px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 80px;
  font-weight: bold;
  color: white;
  line-height: 1;
  pointer-events: none;
  z-index: 10;
}

.hackathon-subtitle {
  position: fixed;
  top: 120px;
  left: 52px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 30px;
  font-weight: bold;
  color: white;
  line-height: 1;
  pointer-events: none;
  z-index: 10;
}

.partnership-text {
  position: fixed;
  bottom: 164px;
  left: 57px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: white;
  pointer-events: none;
}

.pi-hacks-title {
  position: fixed;
  bottom: 40px;
  left: 48px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 120px;
  font-weight: bold;
  color: white;
  line-height: 1;
  pointer-events: none;
}

.side-nav {
  position: fixed;
  top: 40px;
  right: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  z-index: 100;
}

.nav-link {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.4;
}

.nav-link.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.event-details {
  position: fixed;
  bottom: 40px;
  right: 48px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 22px;
  font-weight: normal;
  color: white;
  text-align: right;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-body {
  position: fixed;
  top: 250px;
  left: 50px;
  right: 800px; /* leaves space for the nav */
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: normal;
  color: white;
  line-height: 1.7;
}

.sponsors-title {
  position: fixed;
  bottom: 40px;
  right: 48px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 80px;
  font-weight: bold;
  color: white;
  line-height: 1;
  pointer-events: none;
}

.about-body p {
  margin-bottom: 24px; /* ← gap between paragraphs, increase for more space */
}

/* Mobile-only element — hidden on desktop */
.mobile-event-details {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --scale: 1.0;
  }

  /* Home page */
  .ktp-title {
    font-size: 48px;
    top: 24px;
    left: 20px;
  }

  .hackathon-subtitle {
    font-size: 20px;
    top: 72px;
    left: 24px;
  }

  .pi-hacks-title {
    font-size: 64px;
    bottom: 24px;
    left: 20px;
  }

  .partnership-text {
    font-size: 16px;
    bottom: 100px;
    left: 20px;
  }

  /* Hide event details on home — moved to about page on mobile */
  .event-details {
    display: none;
  }

  .side-nav {
    top: 24px;
    right: 20px;
    gap: 10px;
  }

  .nav-link {
    font-size: 16px;
  }

  /* Hide Red Bull section on about page */
  .rb-section {
    display: none;
  }

  /* About page — hide stars, full width text */
  .about-star,
  .about-star-lb,
  .about-star-lp,
  .about-star-lu,
  .about-can,
  .about-figma,
  .about-esg,
  .sponsors-title {
    display: none;
  }

  /* About page title — top left */
  .about-page .ktp-title {
    top: 24px;
    line-height: 1.1;
  }

  .about-body {
    top: 150px;
    left: 20px;
    right: 20px;
    font-size: 17px;
  }

  /* Event details at bottom of about page on mobile */
  .mobile-event-details {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: 20px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: white;
    gap: 6px;
    pointer-events: none;
  }

}

/* About page stars */
.about-star {
  position: fixed;
  width: var(--about-star-size);
  height: var(--about-star-size);
  object-fit: contain;
  transform-origin: center center;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

.about-star:active {
  cursor: grabbing;
}

/* Base star positions — move these to reposition */
.about-star-b {
  top: calc(0% - 35px);
  right: 22%;
}

.about-star-p {
  top: calc(23% - 35px);
  right: 0%;
}

.about-star-u {
  top: calc(43% - 35px);
  right: 22%;
}

/* L stars — hidden */
.about-star-lb,
.about-star-lp,
.about-star-lu {
  display: none;
}

.redbull-can {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 450px; /* ← change size here */
  height: auto;
  transform-origin: center center;
  transform: translate(-50%, -50%) rotate(-15deg);
  cursor: pointer;
}

/* About page can — position set by JS relative to blue star */
.about-can {
  position: fixed;
  width: 250px; /* ← change size here */
  height: auto;
  transform-origin: center center;
  transform: translate(-50%, -50%) rotate(-15deg);
  cursor: pointer;
}

/* Figma logo — position set by JS relative to purple star */
.about-figma {
  position: fixed;
  width: 130px; /* ← change size here */
  height: auto;
  transform-origin: center center;
  transform: translate(-50%, -50%) rotate(-15deg);
  cursor: pointer;
}

/* ESG logo — position set by JS relative to purple star */
.about-esg {
  position: fixed;
  width: 210px; /* ← change size here (130 * 1.75) */
  height: auto;
  transform-origin: center center;
  transform: translate(-50%, -50%) rotate(-15deg);
  cursor: pointer;
}

/* FAQ page */
.faq-container {
  position: fixed;
  top: 220px;
  left: 48px;
  right: 48px;
  bottom: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px 32px;
  overflow: hidden;
}

.faq-item {
  display: flex;
  flex-direction: column;
}

.faq-question {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 30px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 25px;
}

.faq-answer {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  max-width: 600px;
}

/* FAQ mobile — must come after desktop FAQ styles to override grid */
@media (max-width: 768px) {
  html:has(.faq-page),
  .faq-page {
    overflow: auto;
  }

  .faq-page .ktp-title {
    position: relative;
    top: auto;
    left: auto;
    padding: 24px 20px 0;
    font-size: 48px;
  }

  .faq-page .side-nav {
    position: relative;
    top: auto;
    right: auto;
    flex-direction: row;
    align-items: flex-end;
    padding: 16px 20px 0;
    gap: 16px;
  }

  .faq-page .faq-container {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    display: flex;
    flex-direction: column;
    padding: 40px 20px 40px;
    overflow: visible;
  }

  .faq-page .faq-item {
    margin-bottom: 40px;
    flex-shrink: 0;
    width: 100%;
  }

  .faq-page .faq-question {
    font-size: 22px;
  }

  .faq-page .faq-answer {
    font-size: 17px;
    max-width: 100%;
  }
}
