/* ══════════════════════════════════════════
   TOKENS + RESET
══════════════════════════════════════════ */
:root {
  --cream:       #FBF7F0;
  --cream-dim:   rgba(251, 247, 240, 0.7);
  --warm-brown:  #2C1810;
  --amber:       #C4793A;
  --gold:        #D4A853;
  --gold-light:  #E8C87A;
  --dark:        #120A04;
  --dark-mid:    #1A0F08;
  --polaroid:    #FFFEF9;

  --serif:  'Playfair Display', Georgia, serif;
  --hand:   'Dancing Script', cursive;
  --body:   'Inter', system-ui, sans-serif;

  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: auto; } /* Lenis owns this */

body {
  background: var(--dark);
  color: var(--cream);
  font-family: var(--body);
  overflow-x: hidden;
}

/* ══════════════════════════════════════════
   PARTICLE CANVAS (global fixed overlay)
══════════════════════════════════════════ */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ══════════════════════════════════════════
   SECTION 1 — HERO
══════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background photo: Ken Burns + GSAP parallax */
.hero__bg {
  position: absolute;
  inset: -20%;
  background-image: url('photos/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-color: #3D1F0C;
  will-change: transform;
  animation: kenBurns 22s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.1) translate(-1.5%, 1%); }
}

/* Mid-layer: floating warm light bloom */
.hero__mid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 35% 55%, rgba(212,168,83,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 70% 30%, rgba(196,121,58,0.10) 0%, transparent 60%);
  will-change: transform;
}

/* Dark vignette + bottom fade */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(18,10,4,0.25) 0%,
    rgba(18,10,4,0.45) 40%,
    rgba(18,10,4,0.88) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 900px;
}

.hero__eyebrow {
  font-family: var(--body);
  font-size: clamp(0.65rem, 1.2vw, 0.85rem);
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-spring) forwards 0.6s;
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(5.5rem, 18vw, 15rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 2rem;
  display: flex;
  gap: 0.25em;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__word {
  display: inline-block;
  opacity: 0;
  transform: translateY(70px) skewY(3deg);
}
.hero__word:nth-child(1) { animation: wordLand 1s var(--ease-spring) forwards 0.9s; }
.hero__word:nth-child(2) { animation: wordLand 1s var(--ease-spring) forwards 1.15s; }

.hero__word--gold {
  color: var(--gold);
  font-style: italic;
}

.hero__sub {
  font-family: var(--body);
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  font-weight: 300;
  color: var(--cream-dim);
  max-width: 400px;
  margin: 0 auto 3rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-spring) forwards 1.6s;
}

.hero__scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-spring) forwards 2.1s;
}

.hero__scroll-text {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(251,247,240,0.35);
}

.hero__chevron {
  font-size: 1.1rem;
  color: rgba(251,247,240,0.35);
  animation: chevronBounce 1.8s ease-in-out infinite;
}

@keyframes wordLand {
  to { opacity: 1; transform: translateY(0) skewY(0deg); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes chevronBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(9px); }
}

/* ══════════════════════════════════════════
   SECTION 2 — MEMORY ORACLE
══════════════════════════════════════════ */
.oracle-section {
  position: relative;
  min-height: 100vh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  padding: 7rem 1.5rem;
  overflow: hidden;
}

/* Giant background text for texture */
.oracle__bg-text {
  position: absolute;
  font-family: var(--serif);
  font-size: clamp(12rem, 35vw, 28rem);
  font-weight: 900;
  color: rgba(44, 24, 16, 0.04);
  letter-spacing: -0.05em;
  user-select: none;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.oracle__intro {
  text-align: center;
  position: relative;
  z-index: 1;
}

.oracle__label {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--warm-brown);
  font-style: italic;
  margin-bottom: 0.6rem;
  opacity: 0;
  transform: translateY(24px);
}

.oracle__desc {
  font-family: var(--body);
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  color: rgba(44,24,16,0.5);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(16px);
}

/* The photo + quote stage */
.oracle__stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  max-width: 500px;
}

/* Polaroid frame */
.oracle__photo-frame {
  width: clamp(220px, 38vw, 320px);
  padding: 14px 14px 56px;
  background: var(--polaroid);
  box-shadow:
    0 2px 4px rgba(44,24,16,0.06),
    0 8px 24px rgba(44,24,16,0.12),
    0 24px 64px rgba(44,24,16,0.1);
  opacity: 0;
  transform: scale(0.75) rotate(-6deg) translateY(20px);
}

.oracle__photo {
  width: 100%;
  /* Fixed-height window so portrait + landscape photos all fit fully.
     'contain' guarantees no face/head gets cropped. */
  height: clamp(240px, 42vh, 360px);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #EDE2D2;
  position: relative;
  overflow: hidden;
}

.oracle__photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 900;
  color: rgba(44,24,16,0.18);
  font-family: var(--serif);
  background:
    repeating-linear-gradient(45deg,
      rgba(44,24,16,0.02) 0px,
      rgba(44,24,16,0.02) 12px,
      rgba(44,24,16,0.05) 12px,
      rgba(44,24,16,0.05) 24px);
  animation: placeholderPulse 2s ease-in-out infinite;
}

@keyframes placeholderPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* Shine sweep over photos on reveal */
.oracle__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255,255,255,0.45) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  pointer-events: none;
}
.oracle__shine.sweep {
  animation: shineSweep 0.9s ease-out;
}
@keyframes shineSweep {
  to { transform: translateX(120%); }
}

.oracle__photo-meta {
  padding: 10px 4px 0;
  text-align: center;
  min-height: 2rem;
}

.oracle__photo-caption {
  font-family: var(--hand);
  font-size: 1.05rem;
  color: var(--warm-brown);
  opacity: 0.75;
}

/* Quote */
.oracle__quote-wrap {
  max-width: 440px;
  text-align: center;
  position: relative;
  min-height: 80px;
}

.oracle__quote-mark {
  font-family: var(--serif);
  font-size: 5rem;
  line-height: 0.5;
  color: var(--amber);
  opacity: 0.25;
  margin-bottom: 0.5rem;
}

.oracle__quote {
  font-family: var(--serif);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--warm-brown);
  font-style: italic;
  line-height: 1.65;
  opacity: 0;
}

/* Controls */
.oracle__controls {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.oracle__btn {
  position: relative;
  background: var(--warm-brown);
  color: var(--cream);
  font-family: var(--body);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  border: none;
  padding: 1.1rem 2.8rem;
  cursor: pointer;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
  outline: none;
}

.oracle__btn:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 12px 40px rgba(44,24,16,0.25);
}

.oracle__btn:active {
  transform: scale(0.96);
}

.oracle__btn-ring {
  position: absolute;
  inset: -6px;
  border-radius: 100px;
  border: 1.5px solid var(--amber);
  opacity: 0;
  animation: ringPulse 2.8s ease-in-out infinite;
}

.oracle__btn-ring--1 { animation-delay: 0s; }
.oracle__btn-ring--2 { animation-delay: 1.4s; }

@keyframes ringPulse {
  0%   { opacity: 0;   transform: scale(1); }
  30%  { opacity: 0.5; transform: scale(1.04); }
  60%  { opacity: 0.2; transform: scale(1.08); }
  100% { opacity: 0;   transform: scale(1.12); }
}

.oracle__btn-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.oracle__btn-icon {
  font-size: 1rem;
  animation: starSpin 4s linear infinite;
}

@keyframes starSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.oracle__counter {
  font-family: var(--body);
  font-size: 0.78rem;
  color: rgba(44,24,16,0.38);
  letter-spacing: 0.12em;
}

/* ══════════════════════════════════════════
   SECTION 3 — PARALLAX STRIP
══════════════════════════════════════════ */
.strip-section {
  position: relative;
}

.strip {
  position: relative;
  height: 70vh;
  min-height: 380px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 3rem clamp(2rem, 6vw, 6rem);
}

/* Photo layer — GSAP moves this */
.strip__inner {
  position: absolute;
  inset: -30% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.strip--1 .strip__inner { background-image: url('photos/memory-5.jpg');  background-color: #4A2010; }
.strip--2 .strip__inner { background-image: url('photos/memory-10.jpg'); background-color: #2C1508; }
.strip--3 .strip__inner { background-image: url('photos/memory-15.jpg'); background-color: #3D200C; }

.strip__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18,10,4,0.92) 0%,
    rgba(18,10,4,0.40) 45%,
    rgba(18,10,4,0.10) 100%
  );
}

.strip__caption {
  position: relative;
  z-index: 2;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.5vw, 2.4rem);
  font-weight: 400;
  color: var(--cream);
  font-style: italic;
  opacity: 0;
  transform: translateY(28px);
  max-width: 600px;
}

/* ══════════════════════════════════════════
   SECTION 4 — SCROLL QUOTE
══════════════════════════════════════════ */
.quote-section {
  position: relative;
  background: var(--dark-mid);
  /* tall so scroll has room for word-by-word reveal */
  min-height: 250vh;
}

.quote-section__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem clamp(1.5rem, 6vw, 8rem);
  overflow: hidden;
}

.quote-section__deco {
  font-family: var(--serif);
  font-size: clamp(6rem, 15vw, 12rem);
  line-height: 0.6;
  color: var(--amber);
  opacity: 0.15;
  align-self: flex-start;
  margin-bottom: 1rem;
  pointer-events: none;
}

.quote-words {
  max-width: 820px;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.3;
}

.qword {
  display: inline;
  opacity: 0.1;
  transition: opacity 0.25s ease;
  color: var(--cream);
}

.qword.lit { opacity: 1; }

/* ══════════════════════════════════════════
   SECTION 5 — LETTER / ENVELOPE
══════════════════════════════════════════ */
.letter-section {
  position: relative;
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 7rem 1.5rem;
  overflow: hidden;
}

/* Soft warm background radials */
.letter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 80% 20%, rgba(196,121,58,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(212,168,83,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.letter-intro {
  text-align: center;
  position: relative;
  z-index: 1;
}

.letter-intro__text {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--warm-brown);
  font-style: italic;
  font-weight: 400;
  opacity: 0;
  transform: translateY(24px);
}

/* Envelope + letter container */
.envelope-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 440px;
}

/* ——— Envelope ——— */
.envelope {
  position: relative;
  width: 100%;
  cursor: pointer;
  filter: drop-shadow(0 16px 48px rgba(44,24,16,0.15));
  transition: transform 0.3s var(--ease-spring);
  user-select: none;
}

.envelope:hover { transform: translateY(-5px) rotate(0.5deg); }
.envelope:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }

/* Body (the main rectangle) */
.envelope__body {
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #F0E4D0;
  border: 1px solid rgba(44,24,16,0.12);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Side folds (decorative triangles) */
.envelope__left-fold,
.envelope__right-fold {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: #E8D5BE;
}
.envelope__left-fold  { left: 0;  clip-path: polygon(0 0, 0 100%, 100% 50%); }
.envelope__right-fold { right: 0; clip-path: polygon(100% 0, 100% 100%, 0 50%); }

/* Bottom fold */
.envelope__bottom-fold {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52%;
  background: #DFCAAe;
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
}

/* Wax seal */
.envelope__seal {
  position: relative;
  z-index: 3;
  width: 50px;
  height: 50px;
  background: var(--amber);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 1.4rem;
  box-shadow:
    0 0 0 3px rgba(196,121,58,0.2),
    0 4px 16px rgba(196,121,58,0.4);
  transition: transform 0.4s var(--ease-spring), opacity 0.4s;
}

.envelope.open .envelope__seal {
  transform: scale(0) rotate(45deg);
  opacity: 0;
}

/* Flap — folds open on .open */
.envelope__flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: 50%;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.envelope__flap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.envelope.open .envelope__flap {
  transform: rotateX(-185deg);
}

.envelope__hint {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(44,24,16,0.38);
  transition: opacity 0.3s;
}

/* ——— Letter paper ——— */
.letter {
  width: 100%;
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: opacity 0.7s ease 0.45s, transform 0.7s var(--ease-spring) 0.45s;
  pointer-events: none;
}

.letter.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.letter__paper {
  background: #FFFCF6;
  padding: clamp(1.8rem, 5vw, 2.8rem);
  border-radius: 2px;
  box-shadow:
    0 1px 3px rgba(44,24,16,0.06),
    0 8px 32px rgba(44,24,16,0.1);
  /* lined paper texture */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 31px,
    rgba(44,24,16,0.07) 31px,
    rgba(44,24,16,0.07) 32px
  );
  background-size: 100% 32px;
  background-position: 0 16px;
}

.letter__content {
  font-family: var(--hand);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: #2C1C12;
  line-height: 2; /* aligns to the lined paper */
}

.letter__content p { margin-bottom: 0.5em; }
.letter__greeting  { font-size: 1.4em; margin-bottom: 1em; }
.letter__sign      { margin-top: 1.2em; }
.letter__from      { font-size: 1.25em; margin-top: 0.3em; color: var(--amber); }

/* ══════════════════════════════════════════
   SECTION 6 — CLOSING
══════════════════════════════════════════ */
.closing-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.closing__bg {
  position: absolute;
  inset: -25% 0;
  background-image: url('photos/closing.jpg');
  background-size: cover;
  background-position: center;
  background-color: #160800;
  will-change: transform;
}

.closing__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(18,10,4,0.72) 0%,
    rgba(18,10,4,0.55) 50%,
    rgba(18,10,4,0.72) 100%
  );
}

.closing__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}

.closing__line {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 900;
  color: var(--cream);
  line-height: 0.92;
  opacity: 0;
  transform: translateY(36px);
}

.closing__line--gold  { color: var(--gold); font-style: italic; }

.closing__line--small {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 400;
  font-style: italic;
  margin-top: 0.2em;
  color: var(--cream-dim);
}

.closing__sig {
  font-family: var(--hand);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: var(--gold-light);
  margin-top: 2.5rem;
  opacity: 0;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 900px)
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .oracle-section { padding: 5rem 1.25rem; gap: 2.5rem; }
  .collection__grid { grid-template-columns: repeat(8, 1fr); }
  .hero__floater { opacity: 0.4; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — PHONE (≤ 600px)
══════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Disable desktop-only flourishes on touch */
  .cursor-glow { display: none; }

  /* Hero */
  .hero { min-height: 100svh; height: 100svh; }
  .hero__title { gap: 0.15em; }
  .hero__sub { font-size: 0.9rem; padding: 0 0.5rem; }
  .hero__floater { width: clamp(46px, 16vw, 70px); opacity: 0.32; }

  /* Oracle / game */
  .oracle-section { padding: 4rem 1rem; gap: 1.6rem; min-height: auto; }
  .oracle__stage { gap: 1.4rem; max-width: 100%; }
  .oracle__photo-frame { width: min(78vw, 280px); padding: 11px 11px 44px; }
  .oracle__photo { height: clamp(220px, 46vh, 320px); }
  .oracle__quote-wrap { min-height: 70px; }
  .oracle__quote-mark { font-size: 3.5rem; }
  .oracle__bg-text { font-size: 40vw; }

  /* HUD reflows: counters on one row, bar full-width below */
  .hud {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    padding: 0.75rem 1.1rem;
    width: 100%;
    max-width: 340px;
    border-radius: 20px;
  }
  .hud__bar-wrap { order: 3; flex-basis: 100%; min-width: 0; }
  .hud__value { font-size: 1.15rem; }

  /* Button comfortable tap target */
  .oracle__btn { padding: 1.05rem 2.2rem; }

  /* Collection grid: fewer columns so thumbs are tappable-size */
  .collection { max-width: 100%; }
  .collection__grid { grid-template-columns: repeat(5, 1fr); gap: 7px; }

  /* Parallax strips: background-attachment:fixed is janky on mobile —
     handled by scroll override below. Shorter bands. */
  .strip { height: 48vh; min-height: 300px; padding: 2rem 1.25rem; }
  .strip__caption { font-size: clamp(1.15rem, 5.5vw, 1.8rem); }

  /* Quote section: less scroll distance on small screens */
  .quote-section { min-height: 200vh; }
  .quote-section__sticky { height: 100svh; padding: 1.5rem 1.25rem; }
  .quote-words { font-size: clamp(1.5rem, 7vw, 2.4rem); }
  .quote-section__deco { font-size: 5rem; }

  /* Letter */
  .letter-section { padding: 5rem 1.1rem; gap: 2.5rem; }
  .envelope-wrap { max-width: 340px; }
  .letter__content { font-size: 1.02rem; line-height: 1.9; }
  .letter__paper { line-height: 1.9; background-image: none; } /* drop lined texture so it doesn't misalign */

  /* Closing */
  .closing { min-height: 100svh; }
  .closing__line { font-size: clamp(2.6rem, 15vw, 4.5rem); }
  .closing__sig { font-size: 1.05rem; margin-top: 1.8rem; }

  /* Toast sits above thumb reach */
  .toast { bottom: 1.5rem; font-size: 0.85rem; padding: 0.85rem 1.4rem; width: max-content; max-width: 90vw; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — SMALL PHONE (≤ 380px)
══════════════════════════════════════════ */
@media (max-width: 380px) {
  .oracle__photo-frame { width: min(82vw, 250px); }
  .collection__grid { grid-template-columns: repeat(4, 1fr); }
  .hud__label { font-size: 0.55rem; }
  .oracle__btn { padding: 0.95rem 1.8rem; font-size: 0.82rem; }
}

/* ══════════════════════════════════════════
   LANDSCAPE PHONE — keep sections usable
══════════════════════════════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero, .closing-section { height: auto; min-height: 100svh; padding: 4rem 1rem; }
  .quote-section__sticky { height: 100svh; }
}

/* ══════════════════════════════════════════
   TOUCH DEVICES — disable hover-only effects
══════════════════════════════════════════ */
@media (hover: none) {
  .cursor-glow { display: none; }
  .oracle__btn:hover { transform: none; }
  .envelope:hover { transform: none; }
}

/* ══════════════════════════════════════════
   CURSOR GLOW (desktop)
══════════════════════════════════════════ */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,168,83,0.12) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: screen;
  transition: opacity 0.4s;
  will-change: transform;
}

/* ══════════════════════════════════════════
   SCROLL PROGRESS BAR
══════════════════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--gold), var(--gold-light));
  z-index: 9997;
  box-shadow: 0 0 12px rgba(212,168,83,0.6);
}

/* ══════════════════════════════════════════
   HERO FLOATING PHOTOS
══════════════════════════════════════════ */
.hero__floaters {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero__floater {
  position: absolute;
  width: clamp(60px, 8vw, 110px);
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  border: 4px solid var(--polaroid);
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  opacity: 0.55;
  filter: saturate(0.9);
  will-change: transform;
}

/* ══════════════════════════════════════════
   GAME HUD
══════════════════════════════════════════ */
.hud {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255,254,249,0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(44,24,16,0.08);
  border-radius: 100px;
  padding: 0.9rem 1.8rem;
  box-shadow: 0 8px 30px rgba(44,24,16,0.08);
  margin-bottom: 0.5rem;
}

.hud__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  white-space: nowrap;
}
.hud__item--right { text-align: right; }

.hud__label {
  font-family: var(--body);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(44,24,16,0.45);
}

.hud__value {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--warm-brown);
  line-height: 1;
}

.hud__total {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(44,24,16,0.4);
}

.hud__value.pop { animation: hudPop 0.5s var(--ease-spring); }
@keyframes hudPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); color: var(--amber); }
  100% { transform: scale(1); }
}

.hud__bar-wrap {
  flex: 1;
  min-width: 120px;
  height: 8px;
  background: rgba(44,24,16,0.1);
  border-radius: 100px;
  overflow: hidden;
}

.hud__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--gold));
  border-radius: 100px;
  transition: width 0.7s var(--ease-spring);
  box-shadow: 0 0 10px rgba(212,168,83,0.5);
}

/* ══════════════════════════════════════════
   COLLECTION GRID
══════════════════════════════════════════ */
.collection {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  margin-top: 1rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}
.collection.show {
  opacity: 1;
  transform: translateY(0);
}

.collection__title {
  font-family: var(--body);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(44,24,16,0.4);
  margin-bottom: 1rem;
}

.collection__grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

.collection__slot {
  aspect-ratio: 1;
  border-radius: 5px;
  background: rgba(44,24,16,0.07);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  transform: scale(0.6);
  opacity: 0.4;
  transition: transform 0.5s var(--ease-spring), opacity 0.5s;
}

.collection__slot.filled {
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 3px 12px rgba(44,24,16,0.18);
}

.collection__slot.just-added {
  animation: slotPop 0.6s var(--ease-spring);
}
@keyframes slotPop {
  0%   { transform: scale(1.6) rotate(-8deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ══════════════════════════════════════════
   MILESTONE TOAST
══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  z-index: 9996;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--warm-brown);
  color: var(--cream);
  padding: 1rem 1.8rem;
  border-radius: 100px;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translate(-50%, 30px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.5s var(--ease-spring);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.toast__emoji { font-size: 1.3rem; }

/* All-collected celebration state for the button */
.oracle__btn.complete {
  background: linear-gradient(135deg, var(--amber), var(--gold));
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
