/* DEFERRED ANIMATIONS & TRANSITIONS
   Non-critical CSS loaded with media="print" trick
   Includes: @keyframes, transitions, story-*, gather-*, archive-*, field-* animations
   Size target: < 60KB (currently minified)
*/

/* ===== KEYFRAME ANIMATIONS ===== */

@keyframes heroReveal {
  0% { opacity: 0; transform: translateY(28px); filter: blur(12px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes heroFadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes heroZoom {
  0% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes heroOnLoadImage {
  0% { transform: scale(1.16); filter: brightness(.72) saturate(.9) blur(8px); }
  100% { transform: scale(1); filter: brightness(1) saturate(1) blur(0); }
}

@keyframes introGrid {
  to { transform: scale(1); opacity: .1; }
}

@keyframes introOrbit {
  to { transform: translate(-50%, -50%) scale(1); opacity: .38; }
}

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

@keyframes introBrand {
  to { transform: translateY(0); opacity: 1; filter: blur(0); }
}

@keyframes introLine {
  to { transform: translateX(100%); }
}

@keyframes fieldMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== HERO ANIMATIONS ===== */

.hero-anim {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(.16,1,.3,1);
}

.hero-reveal-text {
  animation-name: heroReveal;
  animation-duration: 1.1s;
}

.hero-fade {
  animation-name: heroFadeUp;
  animation-duration: 1s;
}

.hero-zoom {
  animation: heroZoom 1.8s cubic-bezier(.16,1,.3,1) forwards;
}

.hero-anim {
  animation-play-state: paused;
}

body.page-ready .hero-anim {
  animation-play-state: running;
}

body.page-ready .hero-base {
  animation: heroOnLoadImage 2.2s cubic-bezier(.16,1,.3,1) forwards;
}

.hero-scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--hero-light-x, 58%) var(--hero-light-y, 46%), rgba(191,238,255,.18), transparent 20%);
  mix-blend-mode: screen;
  opacity: .55;
  transition: opacity .3s ease;
}

/* ===== ELEMENT REVEAL & SCROLL TRANSITIONS ===== */

.image-mask {
  clip-path: inset(12% 0 0 0 round 28px);
  transform: scale(1.08);
  opacity: 0;
  transition: clip-path 1.25s cubic-bezier(.16,1,.3,1), transform 1.25s cubic-bezier(.16,1,.3,1), opacity .8s ease;
}

.image-mask.in {
  clip-path: inset(0 0 0 0 round 28px);
  transform: scale(1);
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  filter: blur(10px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1), filter .9s cubic-bezier(.16,1,.3,1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.text-mask {
  display: block;
  overflow: hidden;
}

.text-mask > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(.16,1,.3,1);
}

.text-mask.in > span {
  transform: translateY(0);
}

/* ===== INTERACTIVE CARD TRANSITIONS ===== */

.magnetic-card {
  transition: transform .55s cubic-bezier(.16,1,.3,1), border-color .55s ease, background .55s ease, box-shadow .55s ease;
}

.magnetic-card:hover {
  transform: translateY(-8px);
  border-color: rgba(191,238,255,.42);
  box-shadow: 0 38px 110px rgba(0,0,0,.55), 0 0 60px rgba(191,238,255,.08);
}

.journal-row .journal-arrow {
  transform: translateX(0);
  transition: transform .35s cubic-bezier(.16,1,.3,1), color .35s ease;
}

.journal-row:hover .journal-arrow {
  transform: translateX(8px);
  color: #bfeeff;
}

/* ===== FAQ ACCORDION ===== */

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .55s cubic-bezier(.16,1,.3,1);
}

.faq-icon {
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* ===== STORY SECTION (CAROUSEL) ===== */

.story-scroll {
  min-height: 560vh;
}

.story-sticky {
  background: radial-gradient(circle at var(--story-light-x, 56%) 50%, rgba(191,238,255,.1), transparent 30%), #030303;
}

.story-orbit {
  position: absolute;
  right: clamp(24px, 7vw, 110px);
  top: clamp(110px, 17vh, 180px);
  z-index: 4;
  width: clamp(150px, 18vw, 270px);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(191,238,255,.22);
  box-shadow: inset 0 0 60px rgba(191,238,255,.06), 0 0 80px rgba(191,238,255,.06);
  opacity: .66;
  transform: rotate(calc(var(--story-progress, 0) * 90deg)) scale(calc(.86 + var(--story-progress, 0) * .28));
  pointer-events: none;
}

.story-orbit::before,
.story-orbit::after {
  content: "";
  position: absolute;
  inset: 22%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  transform: rotate(34deg);
}

.story-orbit::after {
  inset: 42%;
  background: rgba(191,238,255,.75);
  box-shadow: 0 0 34px rgba(191,238,255,.72);
}

.story-title {
  mix-blend-mode: normal;
  transform: translate3d(calc(var(--story-progress, 0) * -34px), calc(var(--story-progress, 0) * -20px), 0);
}

.story-title .story-word {
  display: inline-block;
  transform: translateY(var(--word-y, 0px));
  opacity: var(--word-o, 1);
}

.story-chapter {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.38);
  transition: color .35s ease, transform .35s cubic-bezier(.16,1,.3,1), border-color .35s ease;
}

.story-chapter.is-active {
  color: #fff;
  border-color: rgba(191,238,255,.55);
  transform: translateX(10px);
}

.story-card {
  transition: box-shadow .45s ease, border-color .45s ease;
}

.story-card.is-focus {
  border-color: rgba(191,238,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 50px 140px rgba(0,0,0,.72), 0 0 90px rgba(191,238,255,.14);
}

.story-card-content {
  transform: translateY(calc((1 - var(--story-progress, 0)) * 10px));
}

.story-card-img {
  transition: transform .7s cubic-bezier(.16,1,.3,1), filter .7s ease;
}

.story-card:hover .story-card-img {
  transform: scale(1.2);
  filter: saturate(1.2) contrast(1.12) brightness(1);
}

/* ===== GATHER SECTION (TITLE ANIMATION) ===== */

.gather-ghost {
  position: absolute;
  inset: 14vh 5vw auto;
  z-index: 0;
  max-width: 980px;
  font-size: clamp(42px, 8vw, 118px);
  line-height: .82;
  font-weight: 900;
  letter-spacing: -.08em;
  color: rgba(255,255,255,.045);
  text-transform: uppercase;
  transform: translateY(var(--gather-ghost-y, 0px));
  opacity: var(--gather-ghost-opacity, .8);
}

.gather-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: min(58vw, 720px);
  height: min(58vw, 720px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(191,238,255,.16), rgba(216,194,255,.06) 38%, transparent 72%);
  transform: translate(-50%, -50%) scale(var(--gather-glow-scale, .72));
  filter: blur(22px);
  opacity: var(--gather-glow-opacity, .28);
}

.gather-line span {
  display: inline-block;
  will-change: transform, opacity, filter;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  opacity: var(--word-opacity, 1);
  filter: blur(var(--word-blur, 0px));
  text-shadow: 0 24px 70px rgba(0,0,0,.72);
}

.gather-support {
  max-width: 600px;
  margin: 30px auto 0;
  color: rgba(255,255,255,.62);
  font-size: 15px;
  line-height: 1.7;
  opacity: var(--gather-support-opacity, .2);
  transform: translateY(var(--gather-support-y, 18px));
}

/* ===== ARCHIVE SECTION (GRID ANIMATION) ===== */

.archive-word {
  position: absolute;
  left: 4vw;
  top: 23vh;
  z-index: 0;
  font-size: clamp(72px, 19vw, 270px);
  line-height: .75;
  font-weight: 900;
  letter-spacing: -.12em;
  color: rgba(255,255,255,.07);
  text-transform: uppercase;
  transform: translateX(var(--archive-word-x, 0vw));
  opacity: var(--archive-word-opacity, .75);
}

.archive-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 170px));
  grid-auto-rows: minmax(96px, 150px);
  gap: clamp(7px, 1vw, 14px);
  width: min(82vw, 920px);
  transform: scale(var(--archive-scale, .62));
  will-change: transform;
}

.archive-tile {
  position: relative;
  min-height: 110px;
  overflow: hidden;
  border-radius: var(--archive-radius, 8px);
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.06);
  box-shadow: 0 28px 90px rgba(0,0,0,.46);
  will-change: transform, opacity;
  transform: translate3d(var(--tile-x, 0px), var(--tile-y, 0px), 0) scale(var(--tile-scale, 1));
  opacity: var(--tile-opacity, 1);
}

.archive-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(var(--tile-img-scale, 1.2));
  filter: grayscale(var(--tile-gray, 1)) contrast(1.12) brightness(.82);
}

/* ===== FIELD NOTES SECTION ===== */

.field-feature-media {
  transition: transform .9s cubic-bezier(.16,1,.3,1), filter .9s ease;
}

.field-feature-card:hover .field-feature-media {
  transform: scale(1.1);
  filter: saturate(1.16) contrast(1.08) brightness(.92);
}

.field-read-link span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}

.field-feature-card:hover .field-read-link span,
.field-note-card:hover .field-read-link span {
  transform: translateX(4px) rotate(-10deg);
}

.field-note-card {
  min-height: 195px;
  border-radius: 30px;
  padding: 26px;
  transition: transform .55s cubic-bezier(.16,1,.3,1), border-color .55s ease, background .55s ease;
}

.field-note-card:hover {
  transform: translateY(-6px);
  border-color: rgba(191,238,255,.42);
  background: linear-gradient(155deg, rgba(191,238,255,.085), rgba(255,255,255,.026));
}

.field-marquee-track {
  display: flex;
  width: max-content;
  animation: fieldMarquee 28s linear infinite;
}

/* ===== LOADING INTRO ===== */

.load-intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, rgba(191,238,255,.13), transparent 28%),
              linear-gradient(180deg, #050505 0%, #000 100%);
  pointer-events: none;
  overflow: hidden;
  transition: opacity .9s cubic-bezier(.16,1,.3,1), visibility .9s ease;
}

.load-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 84px 84px;
  transform: scale(1.08);
  animation: introGrid 1.9s cubic-bezier(.16,1,.3,1) forwards;
  mask-image: radial-gradient(ellipse at center, #000 0%, #000 48%, transparent 78%);
}

.load-intro::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72vw, 780px);
  height: min(72vw, 780px);
  border-radius: 999px;
  border: 1px solid rgba(191,238,255,.18);
  transform: translate(-50%, -50%) scale(.46);
  box-shadow: 0 0 120px rgba(191,238,255,.16), inset 0 0 90px rgba(191,238,255,.06);
  animation: introOrbit 1.85s cubic-bezier(.16,1,.3,1) forwards;
}

.load-intro.hide {
  opacity: 0;
  visibility: hidden;
}

.load-intro-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.load-kicker {
  margin-bottom: 18px;
  color: #bfeeff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .32em;
  text-transform: uppercase;
  opacity: 0;
  animation: introFade .7s cubic-bezier(.16,1,.3,1) .14s forwards;
}

.load-brand {
  font-family: "Playfair Display", serif;
  font-size: clamp(44px, 8vw, 128px);
  font-style: italic;
  line-height: .82;
  letter-spacing: -.06em;
  transform: translateY(22px);
  opacity: 0;
  filter: blur(12px);
  animation: introBrand 1.08s cubic-bezier(.16,1,.3,1) .24s forwards;
}

.load-line {
  position: relative;
  width: min(440px, 72vw);
  height: 1px;
  margin: 30px auto 0;
  background: rgba(255,255,255,.14);
  overflow: hidden;
}

.load-line span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, #fff, #bfeeff, transparent);
  transform: translateX(-100%);
  animation: introLine 1.2s cubic-bezier(.16,1,.3,1) .42s forwards;
}

/* ===== CINEMA SECTION ===== */

.cinema-step {
  padding: 16px 12px 0;
  color: rgba(255,255,255,.4);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: color .35s ease;
}

.cinema-step.is-active {
  color: #bfeeff;
}

.cinema-step::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin: -17px 0 16px;
  background: rgba(191,238,255,.75);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}

.cinema-step.is-active::before {
  transform: scaleX(1);
}

/* ===== FLOATING NAV TRANSITIONS ===== */

.floating-nav {
  transform: translateY(-22px) scale(.96);
  opacity: 0;
  transition: transform 1.05s cubic-bezier(.16,1,.3,1),
              opacity .8s cubic-bezier(.16,1,.3,1),
              background .45s ease,
              border-color .45s ease;
}

body.page-ready .floating-nav {
  transform: translateY(0) scale(1);
  opacity: 1;
}

body.has-scrolled .floating-nav {
  background: rgba(0,0,0,.52);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 24px 100px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.16);
}

/* ===== REDUCED MOTION OVERRIDES ===== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-anim,
  .hero-zoom {
    animation: none;
    opacity: 1;
  }

  .reveal,
  .text-mask > span,
  .image-mask,
  .magnetic-card,
  .faq-body,
  .faq-icon {
    transition: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    clip-path: none !important;
  }

  .field-marquee-track {
    animation: none;
  }

  .field-feature-media,
  .field-note-card,
  .field-read-link span {
    transition: none !important;
  }

  .load-intro {
    display: none;
  }

  .floating-nav {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
  }

  .load-intro {
    display: none;
  }

  .scroll-cinema {
    min-height: auto;
  }

  .cinema-sticky {
    position: relative;
  }

  .cinema-frame {
    transform: none !important;
  }
}

/* ===== RESPONSIVE ANIMATIONS ===== */

@media (max-width: 900px) {
  .field-editorial-grid {
    grid-template-columns: 1fr;
  }

  .field-feature-card {
    min-height: 560px;
  }

  .field-feature-content {
    inset: auto 24px 24px;
  }

  .field-mini-grid {
    grid-template-columns: 1fr;
  }

  .gather-scroll,
  .archive-expand-scroll {
    min-height: auto;
  }

  .gather-sticky,
  .archive-sticky {
    position: relative;
    min-height: auto;
    padding: 110px 20px 78px;
  }

  .gather-line span {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }

  .gather-support {
    opacity: 1;
    transform: none;
  }

  .gather-ghost {
    position: absolute;
    inset: 9vh 20px auto;
  }

  .archive-word {
    position: absolute;
    top: 70px;
    left: 20px;
    font-size: clamp(72px, 23vw, 130px);
  }

  .archive-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 180px;
    transform: none !important;
    margin-top: 90px;
  }

  .archive-tile {
    transform: none !important;
    opacity: 1 !important;
  }

  .archive-meta {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: 28px;
  }

  .archive-progress {
    display: none;
  }

  .story-scroll {
    min-height: auto;
  }

  .story-sticky {
    position: relative;
    min-height: auto;
    padding: 110px 0 70px;
  }

  .story-title,
  .story-kicker,
  .story-count,
  .story-chapters,
  .story-progress {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
  }

  .story-shell {
    display: grid;
    gap: 28px;
  }

  .story-title {
    font-size: clamp(54px, 18vw, 92px);
    max-width: 100%;
  }

  .story-stage {
    margin-left: 0;
    height: auto;
    overflow-x: auto;
    padding: 18px 0 48px;
  }

  .story-track {
    transform: none !important;
  }

  .story-card {
    width: 76vw;
    max-width: 330px;
    height: 470px;
  }

  .story-chapters {
    width: 100%;
  }

  .story-progress {
    margin-top: 0;
  }

  .scroll-rail {
    display: none;
  }

  .load-brand {
    font-size: clamp(46px, 15vw, 84px);
  }

  .story-orbit {
    display: none;
  }

  .scroll-cinema {
    min-height: auto;
  }

  .cinema-sticky {
    position: relative;
    min-height: auto;
    padding: 100px 20px 80px;
  }

  .cinema-shell {
    grid-template-columns: 1fr;
  }

  .cinema-stage {
    height: 560px;
  }

  .cinema-frame.one {
    left: 0;
    width: 62%;
  }

  .cinema-frame.two {
    right: 0;
    width: 62%;
  }

  .cinema-frame.three {
    left: 12%;
    width: 66%;
  }

  .cinema-steps {
    position: relative;
    margin-top: 28px;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-bg::before {
    background-size: 56px 56px;
  }
}
