/* ==================== FONTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alumni+Sans+Pinstripe:wght@400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ==================== CSS VARIABLES ==================== */
:root {
  --white-bg: #ffffff;
  --dark-bg: #000000;
  --light-shadow: rgba(255, 255, 255, 0.5);
  --dark-shadow: rgba(0, 0, 0, 0.5);
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: 'Lato', sans-serif;
  background: #000;
}

.hidden {
  display: none !important;
}

/* ==================== LOADING SCREEN ==================== */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

#loading-logo {
  max-width: 400px;
  max-height: 400px;
  width: 50%;
}

/* ==================== MAIN APP ==================== */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--dark-bg);
}

/* Max width for desktop (27" monitor - 2560px) */
@media (min-width: 2561px) {
  #app {
    max-width: 2560px;
    margin: 0 auto;
    height: 100vh;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ==================== HEADER ==================== */
header {
  background: var(--dark-bg);
  flex-shrink: 0;
}

/* Scrolling Text Banner - Edge to Edge */
.scroll-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  background: #ff6633;
  border-bottom: 2px solid #000;
  padding: 12px 0;
}

.scrolling-text {
  display: inline-block;
  animation: scroll-left 24s linear infinite;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 28.5px;
  color: #ff9966;
  padding-left: 0;
}

@keyframes scroll-left {
  0% {
    transform: translateX(100vw);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* Header Controls - 3 column grid for consistent centering */
.header-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 7px 20px;
  position: relative;
}

/* Page Title - Inter Font */
.page-title {
  justify-self: start;
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  font-size: 24px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Hamburger Menu - Centered */
.hamburger-menu {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px;
  z-index: 1001;
  margin: 0;
}

.hamburger-menu span {
  display: block;
  width: 30px;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Header Logo - Right Side */
.header-logo {
  justify-self: end;
  height: 104px;
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* ==================== DASHBOARD MENU ==================== */
#dashboard-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
  padding: 20px;
}

#dashboard-menu.menu-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Menu Panel */
.menu-panel {
  background: #000;
  border-radius: 24px;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 350px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Menu Buttons */
.menu-button {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50px;
  background: #ff6633;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 200;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.15s ease;
}



.menu-button:hover span {
  transform: translateY(2px);
}

/* menu layout reverted to original */

.menu-button span {
  transition: transform 0.15s ease;
}

/* ==================== GALLERY CONTAINER ==================== */
#page-rail {
  flex: 1;
  position: relative;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

#page-rail::-webkit-scrollbar {
  display: none;
}

.page {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  /* black background behind images */
  box-sizing: border-box;
  padding: 15px;
}

.page .swipe-gallery {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}

.page .gallery-slide {
  height: 100%;
  background: #000;
}

.gallery-slide {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

/* Enforce consistent full-viewport-with-padding sizing across pages */
.page,
.page .swipe-gallery,
.gallery-slide {
  box-sizing: border-box;
}

@media (min-width: 769px) {

  /* desktop/tablet: keep 15px page padding (set above) so content fits inside viewport with padding */
  .page {
    padding: 15px;
  }

  .page .swipe-gallery {
    width: 100%;
    height: 100%;
  }

  .gallery-slide {
    width: 100%;
    height: 100%;
  }
}

@media (max-width: 768px) {

  /* mobile: slightly smaller padding matching original behavior */
  .page {
    padding: 8px;
  }

  .page .swipe-gallery {
    width: 100%;
    height: 100%;
  }

  .gallery-slide {
    width: 100%;
    height: calc(100% / 3);
  }
}

.prev-page-slide,
.next-page-slide {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid #000;
  box-sizing: border-box;
}

/* Next Page Slide */
.next-page-slide {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--purple-bg);
  cursor: pointer;
  transition: background 0.3s ease;
}

.next-page-slide:hover {
  background: #7B6BA5;
}

.next-page-content {
  text-align: center;
  color: #fff;
}

.next-page-content h3 {
  font-family: "Inter", sans-serif;
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 20px;
}

.next-page-content p {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 1.5rem;
  opacity: 0.8;
}

.next-page-arrow {
  width: 60px;
  height: 60px;
  margin-top: 30px;
  opacity: 0.8;
  display: none !important;
  animation: none !important;
}

@keyframes bounce-down {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(10px);
  }

  60% {
    transform: translateY(5px);
  }
}

/* Swipe Indicator */
.swipe-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.swipe-arrow {
  width: 30px;
  height: 30px;
  color: #333;
  opacity: 0.7;
}

/* Hide blinking arrows/indicators site-wide */
.swipe-indicator .swipe-arrow,
.next-page-arrow {
  display: none !important;
  animation: none !important;
}

#dashboard-menu .swipe-indicator {
  position: relative;
  bottom: auto;
  margin-top: 30px;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Image placeholder */
.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #9B8BC5 0%, #7B6BA5 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-family: 'Lato', sans-serif;
  font-size: 1.2rem;
  text-align: center;
}

/* Force any purple backgrounds inside the gallery container to be white */
#gallery-container .next-page-slide,
#gallery-container .image-placeholder,
#gallery-container .gallery-slide,
#gallery-container .swipe-gallery {
  background: #fff !important;
  color: #000 !important;
}

#gallery-container .next-page-content h3,
#gallery-container .next-page-content p,
#gallery-container .image-placeholder {
  color: #000 !important;
}

/* ==================== ABOUT PAGE TEXT ==================== */
.text-content {
  padding: 300px;
  color: #000;
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
  line-height: 1.8;
  max-width: 50%;
  margin: 0 auto;
  height: 100%;
  overflow-y: auto;
  background: #000;
}

.text-content h2 {
  font-family: "Inter", sans-serif;
  font-weight: 100;
  font-size: 5rem;
  margin-bottom: 60px;
  color: #000;
}

.text-content h3 {
  font-family: "Inter", sans-serif;
  font-weight: 100;
  font-size: 3rem;
  margin-top: 80px;
  margin-bottom: 40px;
  color: #000;
}

.text-content p {
  font-family: "Inter", sans-serif;
  font-weight: 100;
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: rgba(0, 0, 0, 0.9);
}

/* About page 100px text box */
.about-text-box {
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  overflow: auto;
  background: #fff;
  color: #000;
  font-family: "Inter", sans-serif;
  font-weight: 100;
  font-size: 1.5rem;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 24px;
}

/* Large about page text box with 200px padding from container extent */
.about-text-large {
  background: #fff;
  color: #000;
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 200;
  font-variation-settings: 'wght' 200;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 24px;
  box-sizing: border-box;
  border-radius: 8px;
  max-width: 80%;
  width: 80%;
  margin: 0 auto 24px auto;
}

.about-text-large h3 {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-variation-settings: 'wght' 500;
  font-size: 1rem;
  margin-top: 24px;
  margin-bottom: 8px;
  color: #000;
}

.about-text-large h3::before {
  content: "| ";
}

.about-text-large h3:first-child {
  margin-top: 0;
}

.about-text-large p {
  font-size: 1.03125rem;
  /* Safari/Default: +0.5px (approx) */
  margin-bottom: 16px;
  line-height: 1.5;
}

body.is-chrome .about-text-large p {
  font-size: 1.0125rem;
  /* Chrome: +0.2px (approx) over base 16px */
}

.about-text-large p:last-child {
  margin-bottom: 0;
}

.about-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}


/* ==================== DESKTOP 3840x2160 ==================== */
@media (min-width: 1920px) {
  .scrolling-text {
    font-size: 36px;
  }

  .hamburger-menu span {
    width: 40px;
    height: 4px;
  }

  .page-title {
    font-size: 24px;
    left: 25px;
  }

  /* Matches gallery margin */
  .header-logo {
    right: 25px;
    height: 104px;
  }

  /* Matches gallery margin */
  /* ... rest of desktop styles ... */

  /* ... rest of desktop styles ... */
}

/* ==================== MOBILE 1290x2796 ==================== */
@media (max-width: 768px) {

  /* Compact white banner for mobile */
  .scroll-container {
    padding: 6px 0;
  }

  .scrolling-text {
    font-size: 25.5px;
  }

  .header-controls {
    padding: 4px 12px;
  }

  .hamburger-menu span {
    width: 20px;
    height: 2px;
  }

  .page-title {
    font-size: 14px;
    left: 10px;
  }

  /* Compact logo for mobile - extends beyond header */
  .header-logo {
    right: 10px;
    height: 80px;
    margin-top: -12px;
    margin-bottom: -12px;
  }

  /* Mobile: show three stacked slides (three images visible vertically) */
  .page {
    padding: 6px;
  }

  .page .swipe-gallery {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .page .gallery-slide,
  .page .next-page-slide {
    height: calc(100% / 3);
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
  }

  .page .gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
  }

  /* Compact about text for mobile */
  .about-text-large {
    font-size: 12px;
    padding: 10px 16px 16px 16px;
    max-width: 95%;
    width: 95%;
    height: 100%;
    overflow: hidden;
    line-height: 1.25;
  }

  /* Explicitly override desktop/global font sizes for mobile paragraphs */
  /* Specific Chrome Mobile tweak if needed smaller */
  body.is-chrome .about-text-large p {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }


  .page .about-slide {
    height: 100%;
    padding: 0 8px 8px 8px;
    align-items: flex-start;
  }

  /* Remove top padding for about page to make text box flush with header */
  .page.about-page {
    padding-top: 0;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 8px;
    align-items: flex-start;
    /* Force content to top */
  }

  .page.about-page .about-text-large {
    border-radius: 20px;
  }
}

/* Apply rounded black container for all gallery slides on desktop/tablet */
.gallery-slide,
.prev-page-slide,
.next-page-slide {
  border-radius: 25px;
  overflow: hidden;
  background: #000;
  position: relative;
  /* Ensure absolute children position correctly */
}

.image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  padding: 6px 0 6px 12px;
  /* Halved left padding (12px) */
  pointer-events: none;
  text-align: left;
  z-index: 10;
}