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

@font-face {
  font-family: 'Avenir Next';
  src: url('/fonts/AvenirNext-Regular.woff2') format('woff2'),
       url('/fonts/AvenirNext-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Avenir Next';
  src: url('/fonts/AvenirNext-DemiBold.woff2') format('woff2'),
       url('/fonts/AvenirNext-DemiBold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Avenir Next", sans-serif;
  background: #000000;
  position: relative;
}

#top-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: #FFFFFF;
  border-bottom: 2px solid #FFD700;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

#cursor-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid #FFD700;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 3000;
  transition: transform 0.2s ease, background 0.2s ease;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  animation: pulse 1.2s infinite ease-in-out;
}

@media (max-width: 768px) {
  #cursor-follower {
    display: none;
  }
}

#cursor-follower.hover {
  transform: translate(-50%, -50%) scale(1.5);
  background: radial-gradient(circle, rgba(30, 144, 255, 0.4) 0%, transparent 70%);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 20px #FFD700, 0 0 40px rgba(255, 255, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.5);
  }
}

#splash {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.word-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.splash-word {
  color: #FFFFFF;
  font-size: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s ease forwards;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
  .splash-word {
    font-size: 1.5rem;
  }
}

#word2 {
  font-weight: bold;
  color: #FFD700;
}

#word1 {
  animation-delay: 0.6s;
}

#word2 {
  animation-delay: 1.4s;
}

#word3 {
  animation-delay: 2.2s;
}

#logo-container {
  position: relative;
  margin-top: 2rem;
  opacity: 0;
}

#gold-rect {
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, #FFD700, #D4A017);
  transform-origin: left;
  animation: revealRect 2s ease forwards;
  animation-delay: 3.5s;
  z-index: 2;
}

#logo-img {
  position: relative;
  max-width: 200px;
  height: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 1s ease forwards;
  animation-delay: 5.5s;
  z-index: 1;
}

#fade-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 2000;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes revealRect {
  to {
    transform: scaleX(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

#scrollContainer {
  position: fixed;
  top: 150px;
  left: 0;
  display: flex;
  height: calc(100vh - 150px);
  width: max-content;
  background: transparent !important;
  z-index: 0;
}

@media (max-width: 768px) {
  #scrollContainer {
    flex-direction: column;
    position: static;
    width: 100%;
    height: auto;
    overflow-y: visible;
  }
}

.section {
  width: 100vw;
  height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  position: relative;
  border-radius: 0 calc(25vh - 37.5px) calc(25vh - 37.5px) 0;
  z-index: 1;
  padding-top: 20px;
}

@media (max-width: 768px) {
  .section {
    width: 100%;
    height: auto;
    min-height: auto;
    border-radius: 0;
    margin: 0 !important;
    padding: 1rem;
    display: block;
  }
}

.section.first-lights {
  padding-top: 20px;
}

@media (max-width: 768px) {
  .section.first-lights {
    padding-top: 175px;
  }
}

.section.second-lights {
  padding-top: 75px;
}

@media (max-width: 768px) {
  .section.second-lights {
    padding-top: 175px;
  }
}

.section:not(:last-child) {
  margin-right: calc(-25vh + 37.5px);
}

@media (max-width: 768px) {
  .section:not(:last-child) {
    margin-right: 0;
  }
}

.section:nth-child(odd) {
  background: #000000 !important;
}

.section:nth-child(even) {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('pics/background.webp') center/cover no-repeat !important;
}

@media (max-width: 768px) {
  .section:nth-child(even) {
    background: #000000 !important;
  }
}

.section:nth-child(1) {
  z-index: 5;
}

.section:nth-child(2) {
  z-index: 4;
}

.section:nth-child(3) {
  z-index: 3;
}

.section:nth-child(4) {
  z-index: 2;
}

.section:nth-child(5) {
  z-index: 1;
}

.section:nth-child(6) {
  z-index: 0;
}

.section h1, .section h2, .section h3, .section p, .section img, .section .section-arrow,
#media-section .media-container, #media-section .media-info, #media-section .media-controls, #media-section .section-arrow {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease, text-shadow 0.8s ease, box-shadow 0.8s ease;
}

@media (max-width: 768px) {
  .section h1, .section h2, .section h3, .section p, .section img, .section .section-arrow,
  #media-section .media-container, #media-section .media-info, #media-section .media-controls, #media-section .section-arrow {
    opacity: 1;
    transform: translateY(0);
    transition-duration: 0s;
  }
}

.section.revealed h1, .section.revealed h2, .section.revealed h3, .section.revealed p, .section.revealed img, .section.revealed .section-arrow,
#media-section.revealed .media-container, #media-section.revealed .media-info, #media-section.revealed .media-controls, #media-section.revealed .section-arrow {
  opacity: 1;
  transform: translateY(0);
}

.section.revealed h1, .section.revealed h2, .section.revealed h3 {
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.section.revealed img, .section.revealed .section-arrow, #media-section.revealed .media-container,
#media-section.revealed .media-controls .media-arrow, #media-section.revealed .media-info .media-button {
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.section h1, .section h2 {
  font-size: 2rem;
  margin: 0 auto 1rem;
  max-width: 800px;
  color: #FFD700;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
  text-align: center;
}

@media (max-width: 768px) {
  .section h1, .section h2 {
    font-size: 1.5rem;
  }
}

.section h3 {
  font-size: 1.5rem;
  margin: 1rem auto 0.5rem;
  max-width: 800px;
  color: #FFD700;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
  text-align: center;
}

@media (max-width: 768px) {
  .section h3 {
    font-size: 1.2rem;
  }
}

.section p {
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .section p {
    font-size: 0.9rem;
  }
}

.section a {
  color: #FFD700;
  text-decoration: underline;
}

.section img {
  max-width: 500px;
  max-height: 60vh;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  border: 2px solid #FFD700;
  margin-bottom: 50px;
}

@media (max-width: 768px) {
  .section img {
    max-width: 100%;
    max-height: 40vh;
    margin-bottom: 20px;
  }
}

.section-arrow {
  position: absolute;
  background: #FFD700;
  color: #000000;
  border: none;
  border-radius: 4px;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
  right: 2rem;
}

@media (max-width: 768px) {
  .section-arrow {
    display: none;
  }
}

.section-arrow.left-arrow {
  top: calc(50% - 25px);
}

.section-arrow.right-arrow {
  top: calc(50% + 25px);
}

.section-arrow.only-left {
  top: 50%;
}

.section-arrow:hover {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.down-arrow {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #FFD700;
  color: #000000;
  border: none;
  border-radius: 4px;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

@media (max-width: 768px) {
  .down-arrow {
    display: none;
  }
}

.down-arrow:hover {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.up-arrow {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #FFD700;
  color: #000000;
  border: none;
  border-radius: 4px;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

@media (max-width: 768px) {
  .up-arrow {
    display: none;
  }
}

.up-arrow:hover {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#media-section {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

@media (max-width: 768px) {
  #media-section {
    flex-direction: column;
  }
}

.media-container {
  position: relative;
  width: 300px;
  height: 200px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .media-container {
    width: 100%;
    height: auto;
  }
}

.media-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #FFD700;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: block;
  z-index: 1;
}

.media.active {
  opacity: 1;
  z-index: 10;
}

.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-left: 1rem;
}

@media (max-width: 768px) {
  .media-controls {
    flex-direction: row;
    justify-content: center;
    margin-left: 0;
  }
}

.media-arrow {
  background: #FFD700;
  color: #000000;
  border: none;
  border-radius: 4px;
  padding: 0.5rem;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.media-arrow:hover {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.media-info {
  display: flex;
  flex-direction: column;
  max-width: 300px;
}

@media (max-width: 768px) {
  .media-info {
    text-align: center;
    max-width: 100%;
  }
}

.media-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #FFD700;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
  .media-title {
    font-size: 1.5rem;
  }
}

.media-description {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .media-description {
    font-size: 0.9rem;
  }
}

.media-button {
  position: relative;
  padding: 0.5rem 1rem;
  background: #FFD700;
  color: #000000;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.media-button:hover::before {
  transform: perspective(500px) rotateX(0deg);
}

.media-button:hover {
  color: #000000;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.media-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  transform: perspective(500px) rotateX(-90deg);
  transform-origin: top;
  transition: transform 0.3s ease;
  z-index: -1;
}

#progressBar {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, #FFD700, #D4A017);
  width: 0;
  transition: width 0.2s ease;
  z-index: 500;
}

#nav {
  position: static;
  z-index: 1000;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.3s;
  display: flex;
  align-items: center;
}

#nav-logo {
  position: static;
  z-index: 1000;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0s;
}

#nav-logo img {
  max-width: 200px;
  height: auto;
  cursor: pointer;
}

#nav-toggle {
  background: #FFD700;
  color: #000000;
  padding: 0.5rem 1rem;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
  width: 120px;
  text-align: center;
  position: absolute;
  bottom: 2px;
  right: 1rem;
  display: none;
}

@media (max-width: 768px) {
  #nav-toggle {
    display: block;
  }
}

#nav-toggle:hover {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#nav-menu {
  display: flex;
  gap: 2rem;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  width: auto;
}

@media (max-width: 768px) {
  #nav-menu {
    max-height: 0;
    overflow: hidden;
    background: #000000;
    border-radius: 4px;
    margin-top: 150px;
    transition: max-height 0.3s ease;
    border: 2px solid #FFD700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    width: 120px;
    position: absolute;
    right: 1rem;
    top: 0;
    display: block;
  }

  #nav-menu.open {
    max-height: 200px;
  }
}

#nav-menu a {
  display: block;
  color: #000000;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

@media (max-width: 768px) {
  #nav-menu a {
    color: #FFD700;
    padding: 0.5rem 0.75rem;
    font-weight: normal;
  }
}

#nav-menu a:hover, #nav-menu a:focus {
  color: #FFD700;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

@media (max-width: 768px) {
  #nav-menu a:hover, #nav-menu a:focus {
    background: #FFFFFF;
    color: #FFFFFF;
    outline: 2px solid #FFD700;
    text-shadow: none;
  }
}

@media (max-width: 768px) {
  .scroll-content {
    display: flex;           /* keep the flex layout */
    flex-direction: column;
    align-items: stretch;    /* ← stretch children to full width */
    height: auto;
    overflow-y: visible;
    padding: 5px;
  }

  /* force the inner container to fill its parent on mobile */
  .scroll-content .container {
    width: 100%;
    max-width: 100%;
  }
}


.space {
  height: 100px;
}

@media (max-width: 768px) {
  .space {
    height: 50px;
  }
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
}

.intro-section {
  line-height: 1.2;
  color: #FFFFFF;
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background: #111111;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 20px;
}

@media (max-width: 768px) {
  .intro-section {
    padding: 10px;
  }
}

.equation-block {
  background: #222222;
  border: 1px solid #ffd700;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 20px auto;
  color: #FFFFFF;
  max-width: 600px;
}

@media (max-width: 768px) {
  .equation-block {
    padding: 10px;
    max-width: 100%;
  }
}

.variable-list {
  padding-left: 20px;
}

.image-container {
  text-align: center;
  margin-bottom: 20px;
}

.image-container img {
  max-width: 100%;
  height: auto;
}

.table-section {
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background: #111111;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 5px;
}

@media (max-width: 768px) {
  .table-section {
    padding: 10px;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid #444444;
  padding: 8px;
  text-align: left;
  color: #FFFFFF;
}

@media (max-width: 768px) {
  th, td {
    padding: 4px;
  }
}

th {
  background: #333333;
}

.section ol,
.section ul {
  text-align: left;
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .section ol,
  .section ul {
    max-width: 100%;
  }
}

.section li {
  margin-bottom: 0.5rem;
  color: #FFFFFF;
}

.section li p {
  margin-bottom: 0.5rem;
}

.section code {
  color: #FFD700;
}

.section em {
  color: #FFFFFF;
}

.equation {
  text-align: center;
}

@media (max-width: 768px) {
  /* full-width, fixed-ratio box */
  #media-section .media-container {
    width: 100%;
    overflow: hidden;
    position: relative;       /* keep the absolute children contained */
    margin-bottom: 1.5rem;  /* adjust as needed */

  }

  /* wrapper fills the container */
  #media-section .media-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
  }

  /* slides absolutely fill the wrapper */
  #media-section .media {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;        /* or “contain” if you don’t want cropping */
  }
}

/* hide old arrows on mobile, show new ones */
@media (max-width: 768px) {
  .media-controls { display: none; }

  .media-info {
    padding-bottom: 2rem;    /* space before next section */
  }
  .mobile-media-controls {
    display: flex !important; /* override any accidental hiding */
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    z-index: 1;               /* make sure it’s above the next section */
  }
  .mobile-media-arrow {
    background: #FFD700;
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
  }

  .mobile-media-arrow:hover {
    background: #fff;
  }
}

/* hide mobile controls on desktop */
.mobile-media-controls { display: none; }

/* hide on desktop, show on phone */
.section-cta {
  display: none;
}
@media (max-width: 768px) {
  .section .section-cta {
    display: block;
    width: calc(100% - 2rem);   /* full width minus your page padding */
    max-width: 600px;           /* optional: cap the width */
    margin: 1rem auto;          /* center horizontally with some vertical space */
    padding: 1rem 0;            /* tall, tappable button */
    background: #FFD700;
    color: #000;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(255,215,0,0.5);
    transition: background 0.2s ease;
  }

  .section-cta:hover {
    background: #FFF;
    color: #000;
  }
}

/* slide-down animation on body */
body {
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}
/* ↓ homepage navigation */
body.slide-down {
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

/* ↑ app-page “back to home” */
body.slide-up {
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

@media (max-width: 768px) {
  /* scale the carousel to desktop proportions */
  #media-section .media-container {
    width: 90vw;          /* nearly full‐width, but not too big */
    max-width: 300px;     /* exactly your desktop 300px width */
    margin: 0 auto 1rem;  /* center + some space below */
    aspect-ratio: 3 / 2;  /* same 300×200 desktop ratio */
    overflow: hidden;
    position: relative;       /* keep the absolute children contained */
    margin-bottom: 1.5rem;  /* adjust as needed */
  }
}

/* only desktop smooth‐scroll for JS jumps */
@media (min-width: 769px) {
  html { scroll-behavior: smooth; }
}

/* mobile gets native inertia automatically */
@media (max-width: 768px) {
  html { scroll-behavior: auto; }
}






