body {
  opacity: 0;
  animation: pageFadeIn 0.8s ease forwards;
  /* no scrollbar during preloader */
  overflow: hidden;
}

body.preloader-done {
  overflow-x: hidden;
  overflow-y: auto;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

body {
  background: #F8F8F6;
  color: #2e2e2e;
}

/* =========================
   PRELOADER
========================= */
#preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1.5s ease, visibility 1.5s ease;
}

#loading-video {
  max-width: 400px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =========================
   AUDIO TOGGLE
========================= */
#audio-toggle {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 10000;
  height: 40px;
  min-width: 54px;
  padding: 0 14px;
  border: 1px solid rgba(140, 210, 255, 0.55);
  background: rgba(248,248,246,0.10);
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #2e2e2e;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.15s ease;
}

#audio-toggle .audio-icon {
  font-size: 22px;
  line-height: 1;
}

#audio-toggle[disabled] { cursor: default; }

/* show after preloader */
body.preloader-done #audio-toggle {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* pulse glow only while NOT playing (aria-pressed=false) */
body.preloader-done #audio-toggle:not([aria-pressed="true"]) {
  animation: audioGlowPulse 1.3s ease-in-out infinite;
}

/* once playing, no glow */
body.preloader-done #audio-toggle[aria-pressed="true"] {
  animation: none;
  box-shadow: none;
  border-color: rgba(140, 210, 255, 0.55);
}

#audio-toggle:hover {
  transform: translateY(-1px);
  background: rgba(248,248,246,0.22);
  border-color: rgba(140, 210, 255, 0.75);
}

@keyframes audioGlowPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(140,210,255,0.0), 0 4px 16px rgba(0,0,0,0.15);
    border-color: rgba(140, 210, 255, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(140,210,255,0.3), 0 0 40px 16px rgba(140,210,255,0.5), 0 4px 16px rgba(0,0,0,0.15);
    border-color: rgba(140, 210, 255, 1);
  }
}

/* =========================
   LAYOUT
========================= */
.container {
  width: 68vw;
  max-width: 1032px;
  margin: 0 auto;
  padding: 0;
}

:root {
  --space-xl: 200px;
  --space-lg: 120px;
}

/* =========================
   HERO
========================= */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 78vh;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.hero-title {
  position: absolute;
  top: 19%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Italianno', cursive;
  font-size: 14vw;
  font-weight: 400;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 2px 32px rgba(0,0,0,0.12);
  line-height: 1;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1px solid rgba(46,46,46,0.5);
  background: rgba(248,248,246,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
  animation: scrollBounce 1.8s ease-in-out infinite;
}

.scroll-indicator.hidden { opacity: 0; }

.scroll-indicator .scroll-arrow {
  display: block;
  width: 22px; height: 22px;
  border-bottom: 2px solid #444;
  border-right: 2px solid #444;
  transform: rotate(45deg) translate(-3px, -3px);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}

/* =========================
   GLOW ARROWS
========================= */
.glow-arrow { animation: arrowGlow 1.8s ease-in-out infinite; }

@keyframes arrowGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(110, 180, 220, 0.0); }
  50%       { box-shadow: 0 0 18px 6px rgba(110, 180, 220, 0.65); }
}

.glow-arrow.glow-off {
  animation: none;
  box-shadow: none;
}

/* =========================
   WELCOME
========================= */
.welcome {
  padding-top: 30px;
  padding-bottom: 50px;
  border-bottom: 1px solid #d8d8d8;
  text-align: center;
}

.welcome-description {
  display: block;
  width: 100%;
  max-width: 700px;
  margin: 0 auto 4px;
  font-family: 'Halant', serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.7;
  color: #2e2e2e;
  text-align: center;
}

.welcome-img {
  width: 55vw;
  max-width: 820px;
  min-width: 320px;
  display: block;
  margin: 4px auto 4px;
}

.welcome h2 {
  font-family: 'Italianno', cursive;
  font-weight: 400;
  font-size: 96px;
  line-height: 1;
  color: #2e2e2e;
  margin-top: 0;
}

/* =========================
   GALLERY
========================= */
.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding-top: 60px;
}

.art-block {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.art-block .info {
  margin-top: 12px;
  width: 100%;
  align-self: flex-start;
  text-align: left;
}

.art-block .info p { text-align: left; }

.zine-wrap { position: relative; width: 100%; }

/* Tap-to-flip hint: hidden by default everywhere. Only the mobile
   media query below gives it size/position and lets JS reveal it. */
.tap-hint {
  display: none;
}

/* =========================
   ARROWS
========================= */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 120px; height: 120px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #444;
  background: rgba(248,248,246,0.95);
  cursor: pointer;
  z-index: 1000;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 0 18px 4px rgba(110, 180, 220, 0.55);
  border-color: rgba(110, 180, 220, 0.8);
}

.arrow.left  { left: -195px; }
.arrow.right { right: -195px; }

.arrow::before {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  border-top: 1.5px solid #444;
  border-right: 1.5px solid #444;
  position: relative;
}

.arrow.left::before  {
  transform: rotate(-135deg);
  left: 4px;
}
.arrow.right::before {
  transform: rotate(45deg);
  right: 4px;
}

.arrow span { display: block; }

/* =========================
   ZINE
========================= */
.zine {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f8f8f6;
  perspective: 1800px;
}

.spread {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  font-size: 0;
  transform-origin: center center;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  transition: transform 0.8s ease-in-out;
  z-index: 1;
}

.spread.active    { transform: rotateY(0deg); z-index: 2; pointer-events: auto; }
.spread.flip-next { transform: rotateY(-180deg); }
.spread.flip-prev { transform: rotateY(180deg); }

.page {
  min-width: 0;
  line-height: 0;
  background: #ffffff;
  overflow: hidden;
}

.page img {
  width: 100%;
  height: auto;
  display: block;
  background: #ffffff;
}

/* =========================
   INFO TEXT
========================= */
.info h2 {
  font-family: 'Istok Web', sans-serif;
  font-weight: 400;
  font-size: 64px;
  line-height: 1;
}

.info p {
  font-family: 'Istok Web', sans-serif;
  font-weight: 400;
  font-size: 24px;
  margin-top: 6px;
}

/* =========================
   FOOTER / CREDITS
========================= */
.credits {
    margin-top: 180px;
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.credits-line {
    width: min(900px, 70vw);
    height: 2px;
    background: linear-gradient(
        90deg,
        #e694c0 0%,
        #dcb8a6 50%,
        #bfd88c 100%
    );
    margin-bottom: 40px;
}

.credits-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.credits-content p {
    font-family: "Istok Web", sans-serif;
    font-size: 18px;
    color: #555;
    letter-spacing: 0.04em;
}

.credits-content a {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: color .25s ease;
}

.credits-content a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #e694c0, #dcb8a6, #bfd88c);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
}

.credits-content a:hover { color: #222; }
.credits-content a:hover::after { transform: scaleX(1); }

@media (max-width: 600px) {
    .credits { margin-top: 100px; margin-bottom: 50px; }
    .credits-line { width: 85vw; margin-bottom: 30px; }
    .credits-content p { font-size: 16px; text-align: center; }
}

/* =========================
   FADE SCROLL
========================= */
.fade-section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1200px) {
  .container { width: 75vw; }
  .arrow { width: 100px; height: 100px; }
  .arrow.left  { left: -125px; }
  .arrow.right { right: -125px; }
  .arrow::before { width: 28px; height: 28px; }
  .info h2 { font-size: 52px; }
  .info p { font-size: 20px; }
  .footer { gap: 120px; }
}

@media (max-width: 900px) {
  .container { width: 76vw; }
  .arrow { width: 64px; height: 64px; }
  .arrow.left  { left: -78px; }
  .arrow.right { right: -78px; }
  .arrow::before { width: 18px; height: 18px; }
  .info h2 { font-size: 40px; }
  .info p { font-size: 17px; }
  .gallery { gap: 80px; }
  .footer { gap: 80px; }
}

@media (max-width: 700px) {
  .container { width: 70vw; }
  .arrow { width: 48px; height: 48px; }
  .arrow.left  { left: -58px; }
  .arrow.right { right: -58px; }
  .arrow::before { width: 14px; height: 14px; }
}

@media (max-width: 600px) {
  :root { --space-lg: 70px; }
  .container { width: 64vw; }
  .welcome { padding-top: 20px; padding-bottom: 25px; }
  .welcome-img { width: 85vw; }
  .welcome h2 { font-size: 52px; }
  .welcome-description { font-size: 15px; }
  .gallery { gap: 45px; padding-top: 20px; }
  .arrow { width: 40px; height: 40px; }
  .arrow::before { width: 12px; height: 12px; }
  .arrow.left  { left: -48px; }
  .arrow.right { right: -48px; }
  .info h2 { font-size: 28px; line-height: 1.1; }
  .info p { font-size: 14px; margin-top: 6px; }
  .footer {
    flex-direction: column;
    align-items: center;
    gap: 60px;
    margin-top: 90px;
    margin-bottom: 70px;
  }
}

@media (max-width: 450px) {
  .container { width: 58vw; }
  .arrow { width: 30px; height: 30px; }
  .arrow::before { width: 10px; height: 10px; }
  .arrow.left  { left: -36px; }
  .arrow.right { right: -36px; }
  .info h2 { font-size: 22px; }
  .info p { font-size: 12px; }
}

@media (max-width: 360px) {
  .container { width: 54vw; }
  .arrow { width: 24px; height: 24px; }
  .arrow::before { width: 8px; height: 8px; }
  .arrow.left  { left: -28px; }
  .arrow.right { right: -28px; }
}

/* =========================================================
   MOBILE OVERRIDE — appended only, nothing above was edited.
   This block comes last in the cascade, so on screens
   ≤768px it overrides the older breakpoints above. Anything
   above 768px (desktop/tablet-landscape) is completely
   unaffected and renders exactly as before.
========================================================= */
@media (max-width: 768px) {

  .container {
    width: 92vw;
    max-width: 92vw;
  }

  /* ---- Hero ---- */
  .hero-img { height: 27.5vh; }

  .hero-title {
    top: 20%;
    font-size: clamp(48px, 15vw, 90px);
  }

  .scroll-indicator {
    width: 60px;
    height: 60px;
    bottom: 20px;
  }
  .scroll-indicator .scroll-arrow { width: 16px; height: 16px; }

  /* ---- Welcome ---- */
  .welcome { padding-top: 32px; padding-bottom: 32px; }
  .welcome-description {
    font-size: 16px;
    padding: 0 4vw;
  }
  .welcome-img { width: 92vw; margin: 16px auto; }
  .welcome h2 { font-size: clamp(40px, 14vw, 72px); }

  /* ---- Gallery ---- */
  .gallery { gap: 56px; padding-top: 40px; }
  .art-block { padding: 0 2vw; }

  /* ---- Arrows: hidden on mobile. Tapping the page images
         still flips them (existing page click handlers) ---- */
  .zine-wrap { width: 100%; }

  .arrow { display: none; }

  /* ---- Tap-to-flip hint: shown by script.js only on mobile,
         removed permanently after the first flip ---- */
  .tap-hint {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 58px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .tap-hint.visible {
    opacity: 1;
    animation: tapHintNudge 1.4s ease-in-out infinite;
  }

  @keyframes tapHintNudge {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50%       { transform: translateY(-50%) translateX(6px); }
  }

  /* ---- Info text ---- */
  .info { margin-top: 14px; }
  .info h2 { font-size: clamp(24px, 7vw, 34px); }
  .info p  { font-size: clamp(14px, 4vw, 16px); margin-top: 8px; line-height: 1.5; }

  /* ---- Audio toggle: keep out of the way of notches ---- */
  #audio-toggle { top: 10px; right: 10px; height: 36px; min-width: 48px; }
}

@media (max-width: 400px) {
  .hero-title { font-size: clamp(40px, 16vw, 60px); }
  .welcome h2 { font-size: clamp(32px, 15vw, 48px); }
  .arrow { width: 36px; height: 36px; }
  .arrow::before { width: 10px; height: 10px; }
}