
/* ========================================
   GENERAL DESIGN
======================================== */

:root {
  --background: #171e27;
  --text: #f4f0e8;
  --muted: #b5b0a6;
  --accent: #c6a77b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: Georgia, serif;
  font-weight: normal;
  line-height: 1.15;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

section {
  position: relative;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 20px;
}


/* ========================================
   SCROLL PROGRESS
======================================== */

.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  height: 7px;
  width: 100%;
  background: transparent;
  z-index: 100;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
}


/* ========================================
   INTRODUCTION / HERO
======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 20px;

  background:
    linear-gradient(
      rgba(0,0,0,.35),
      rgba(0,0,0,.65)
    ),
    url("img/objall.jpg") center/cover;
}

.hero-content {
  max-width: 750px;
}

.hero h1 {
  font-size: clamp(48px, 9vw, 75px);
  margin-bottom: 13px;
}

.hero p {
  font-size: 13px;
  color: #e1ddd5;
}

.scroll-note {
  margin-top: 65px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
}


/* ========================================
   AUDIO
======================================== */

.intro-audio {
  width: 100%;
  max-width: 400px;
  margin: 35px auto 0;
}

audio {
  width: 100%;
  height: 35px;
  accent-color: var(--accent);
}


/* ========================================
   COLLECTION INTRODUCTION
======================================== */

.collection-intro {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 25px;

  background:
    linear-gradient(
      rgba(0,0,0,.35),
      rgba(0,0,0,.65)
    ),
    url("img/vid.gif");
  background-size:cover;
}
  

.collection-intro h2 {
  font-size: clamp(35px, 6vw, 35px);
  max-width: 750px;
}

.collection-intro p {
  max-width: 550px;
  margin-top: 25px;
  color: var(--muted);
}

.collection-intro .intro-audio {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 35px auto;
  flex: 0 0 auto;
}

.collection-intro audio {
  display: block;
  width: 100%;
  height: 42px;
}

/* ========================================
   STORY SCROLL CONTROLLER
======================================== */

.story-scroll {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
}

.story-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: visible;
  background: var(--background);
}


/* ========================================
   OBJECT CONTAINER
======================================== */

#object-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ========================================
   OBJECT SECTIONS
======================================== */

.object-section {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  padding: 5px 7%;
  border: none;

  overflow: visible;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.8s ease,
    visibility 0s linear 0.8s;
}

.object-section.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition:
    opacity 0.8s ease,
    visibility 0s;
}


/* ========================================
   OBJECT CONTENT LAYOUT
======================================== */

.object-layout {
  width: 100%;
  max-width: 1200px;
  margin: 10px;
  padding-top: 55px;
  display: flex;
  flex-direction: column;
  

  gap: 3px;

  will-change: transform;
}

/* TITLE AND MAIN PHOTOGRAPH */

.object-layout > .reveal:first-child {
  width: 100%;
}

.object-number {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.object-title {
  font-size: clamp(35px, 3vw, 25px);
  margin-bottom: 15px;
}

.object-image {
  height: auto;
  width: 100%;
  max-height: 600px;
  object-fit:cover;
  padding-left: 50px;
  padding-right: 50px;
}

.image-caption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  letter-spacing: 1px;
}


/* ========================================
   LOWER TWO-COLUMN LAYOUT
======================================== */

.memory-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;

  padding-left: 50px;
  padding-right: 50px;
  gap: 75px;
  align-items: center;

  margin-top: 5px;
}

.memory-text {
  width: 100%;
}

.memory-text h3 {
  font-size: clamp(23px, 2.5vw, 25px);
  margin-bottom: 10px;
}

.memory-text p {
  color: var(--muted);
  font-size: 13px;
}

.holding-image {
  height: 100%;
  width: auto;
  max-height: 450px;
  object-fit:contain;
}


/* ========================================
   OBJECT AUDIO BOX
======================================== */

.audio-box {
  margin-top: 7px;
  padding: 18px;
  border: 1px solid #48443c;
}

.audio-box p {
  font-size: 7px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.audio-box audio {
  display: block;
  width: 100%;
}


/* ========================================
   OBJECT DIVIDER
======================================== */

.object-divider {
  display: none;
}


/* ========================================
   FLOATING MEMORY PHOTOGRAPHS
======================================== */

.memory-photos {
  position:fixed;
  inset: 0;

  width: 100%;
  height: 100%;

  pointer-events: none;
  z-index: 5;

  overflow: visible;
}

.memory-photo {
  position:absolute;

  width: clamp(100px, 13vw, 167px);
  height: auto;

  padding: 8px 8px 25px;

  background: #fbfafa;

  box-shadow: 0 5px 20px rgba(0,0,0,0.3);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.8s ease,
    transform 0.8s ease,
    visibility 0.8s ease;
}

/* Floating photograph positions */

.photo-1,
.photo-3,
.photo-5,
.photo-7,
.photo-9,
.photo-11 {
  left: -55px;
}

.photo-2,
.photo-4,
.photo-6,
.photo-8,
.photo-10,
.photo-12 {
  right: -55px;
}

.memory-photo.photo-active {
  opacity: 0.86;
  visibility: visible;
}


/* ========================================
   REVEAL ANIMATIONS
======================================== */

.reveal {
  opacity: 0;
  transform: translateY(25px);

  transition:
    opacity 1s ease 0.25s,
    transform 1s ease 0.25s;
}

.object-section.active .reveal,
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ========================================
   ENDING
======================================== */

.ending {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 25px;

  background:
    linear-gradient(
      rgba(0,0,0,.45),
      rgba(0,0,0,.7)
    ),
    url("img/pic2.jpg") center/cover;
}

.ending h2 {
  font-size: clamp(45px, 8vw, 85px);
  max-width: 800px;
}

.ending p {
  max-width: 800px;
  color: #ded8ce;
  margin-top: 30px;
}


/* ========================================
   INTRO AUDIO EXPERIENCE
======================================== */

.story-button {
  display: block;
  margin: 25px auto 12px;
  padding: 15px 35px;

  background: var(--accent);
  color: #171e27;

  border: none;
  border-radius: 2px;

  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;

  cursor: pointer;
  transition: background 0.3s ease;
}

.story-button:hover {
  background: #e0c49c;
}

.skip-button {
  display: block;
  margin: 15px auto;
  background: transparent;
  border: none;
  color: var(--text);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 1px;
}

#intro-status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 15px;
}


/* ========================================
   INTRO SCROLL LOCK
======================================== */

html.story-locked,
html.story-locked body {
  overflow: hidden;
  height: 100%;
}


/* ========================================
   COLLECTION INTRO TRANSITION
======================================== */

#collection-intro {
  position: relative;
  z-index: 2;
  min-height: 100svh;

  opacity: 1;
  transform: translateY(0);

  transition:
    opacity 1s ease,
    transform 1s ease;
}

#collection-intro.intro-exit {
  opacity: 0;
  transform: translateY(-40px);
  pointer-events: none;
}


/* ========================================
   MOBILE LAYOUT
======================================== */

@media (max-width: 700px) {

  .hero {
    background-position: center;
  }

  .collection-intro {
    padding: 80px 22px;
  }

  .story-stage {
    height: 100svh;
  }

.object-section {
  padding: 25px 22px;

  align-items: flex-start;

  overflow: visible;
}

  .object-layout {
    display: block;
    padding: 15px 0 30px;
  }

  .object-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .object-image {
    height: 25vh;
    max-height: 220px;
  }

  /* Lower two-column section */

  .memory-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: start;
    margin-top: 20px;
  }

  .memory-text {
    order: 1;
  }

  .memory-layout > .reveal {
    order: 2;
  }

  .holding-image {
    height: 22vh;
    max-height: 200px;
  }

  .memory-text h3 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .memory-text p {
    font-size: 13px;
  }

  .audio-box {
    padding: 10px;
    margin-top: 12px;
  }

  .audio-box p {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .audio-box audio {
    height: 35px;
  }

  /* Floating photos */

  .memory-photo {
    width: 75px;
    padding: 5px 5px 15px;
  }

  .photo-1,
  .photo-3,
  .photo-5,
  .photo-7,
  .photo-9,
  .photo-11 {
    left: -25px;
  }

  .photo-2,
  .photo-4,
  .photo-6,
  .photo-8,
  .photo-10,
  .photo-12 {
    right: -25px;
  }

}


/* ========================================
   SMALL MOBILE SCREENS
======================================== */

@media (max-width: 400px) {

  .object-section {
    padding: 20px 16px;
  }

  .object-title {
    font-size: 28px;
  }

  .memory-layout {
    gap: 10px;
  }

  .memory-text h3 {
    font-size: 18px;
  }

  .memory-text p {
    font-size: 12px;
  }

  .holding-image {
    height: 18vh;
  }

}
