/* ==========================================================================
   Camille · Event Operations page (V8, from V7)
   Loaded after home-v7.css, which supplies the shared Galaxy Museum system:
   tokens, nav, buttons, museum frames, frosted panels, footer and reveals.
   This file only adds the layout for this page.
   ========================================================================== */

/* ---------- Section rhythm: ~80–96px desktop, ~48–64px mobile ---------- */
.esec { padding: clamp(48px, 7vw, 96px) 0 0; }
.esec--last { padding-bottom: clamp(56px, 7vw, 96px); }

.esec .open__head h2 { color: var(--moon); }
.esec .open__head h2 em { color: var(--aurora); }
.esec .open__head p { margin-top: 14px; color: var(--on-dark-muted); }

/* ==========================================================================
   1. HERO: headline, one large framed group photo, intro, CTA
   ========================================================================== */
.ehero { padding: 132px 0 0; text-align: center; }
.ehero__title { max-width: 18em; margin: 0 auto; font-size: clamp(32px, 4.2vw, 52px); color: var(--moon); letter-spacing: -.01em; }
.ehero__title em { color: var(--aurora); }
/* V8: smaller, and sized to the screen height so headline + photo fit on a 13–15" laptop without being cut off */
.ehero__photo { width: min(100%, 680px, max(440px, calc((100svh - 330px) * 1.5))); margin: clamp(26px, 3.4vw, 40px) auto 0; }
.r-wide { --ratio: 3 / 2; }
/* A real photo keeps its own proportions, so nobody at the edge of the group gets cropped out */
.ehero__photo .mframe__mat > img { aspect-ratio: auto; height: auto; }
.ehero__copy { max-width: 36em; margin: clamp(28px, 3.5vw, 40px) auto 0; }
.ehero__copy p { font-size: clamp(17px, 1.5vw, 19px); color: var(--on-dark-muted); }
.ehero__copy p + p { margin-top: 12px; }
.ehero__cta { justify-content: center; margin-top: 30px; }
/* V8: Deep Supernova button with a downward arrow that nudges down, not sideways */
.ehero__btn:hover svg { transform: translateY(3px); }

/* ==========================================================================
   2. STORY: four alternating chapters (55% text / 45% photo)
   ========================================================================== */
.chapters { display: grid; gap: clamp(56px, 8vw, 104px); }
.chap { display: grid; grid-template-columns: 55fr 45fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.chap--flip { grid-template-columns: 45fr 55fr; }
.chap--flip .chap__photo { order: -1; }
.chap__text { max-width: 34em; }
.chap__no { display: block; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--aurora); }
.chap__text h3 { margin: 6px 0 18px; font-size: clamp(24px, 2.5vw, 31px); color: var(--moon); }
.chap__text p { color: var(--on-dark); }
.chap__text p + p { margin-top: 1em; }
.chap__photo { width: 100%; }

@media (max-width: 820px) {
  .chap, .chap--flip { grid-template-columns: 1fr; gap: 28px; }
  .chap--flip .chap__photo { order: 0; }             /* number + heading, text, then photo */
  .chap__photo { max-width: 520px; }
}

/* ==========================================================================
   3. POSTERS: archival mini-prints drifting slowly sideways (assets/js/events-v7.js)
   ========================================================================== */
.posters { margin-top: clamp(48px, 6vw, 72px); position: relative; }
.posters__viewport {
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 10px 0 22px; outline: none;
  /* soft fade at both ends so prints drift in and out of the room */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.posters__viewport::-webkit-scrollbar { display: none; }
.posters__viewport.is-dragging { cursor: grabbing; }
.posters__viewport.is-dragging .poster { pointer-events: none; }
.posters__track { display: flex; gap: clamp(16px, 2vw, 26px); width: max-content; padding: 0 6%; }
.posters__track li { flex: none; }

.poster {
  display: block; padding: 3px; border: 0; cursor: zoom-in; border-radius: 2px;
  background: linear-gradient(135deg, #F3E7D3 0%, #C7A56F 35%, #F3E7D3 55%, #95754E 100%);   /* thin champagne border */
  box-shadow: 0 14px 26px -16px rgba(4, 2, 20, .85);
  transition: transform .35s var(--ease), box-shadow .35s ease;
}
.poster:hover, .poster:focus-visible { transform: translateY(-4px); box-shadow: 0 20px 32px -16px rgba(4, 2, 20, .9); }
.poster:focus-visible { outline: 2px solid var(--comet); outline-offset: 4px; }
/* Every print hangs in the same 3:4 frame (cropped to fit); the viewer shows the full original */
.poster > img, .poster > .ph { display: block; height: clamp(220px, 24vw, 300px); width: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.poster .ph::before { font-size: 10.5px; }

/* V8: arrows sit either side of the row, centred on the posters; View all posters alone underneath */
.posters__row { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 20px); }
.posters__row .posters__viewport { flex: 1; min-width: 0; }
.posters__row .posters__btn { flex: none; margin-bottom: 12px; }   /* offsets the viewport's extra bottom padding */
.posters__ctrl { display: flex; justify-content: center; margin-top: 4px; }
.posters__ctrl .posters__all { margin-left: 0; }
.posters__btn, .posters__all, .lb__toall {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-dark); background: transparent; color: var(--on-dark-muted); cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.posters__btn { width: 44px; height: 44px; border-radius: 50%; }
.posters__all, .lb__toall { height: 38px; padding: 0 16px; border-radius: 999px; font: 600 14px/1 var(--sans); margin-left: 6px; }
.posters__btn svg, .posters__all svg, .lb__toall svg { width: 16px; height: 16px; }
.posters__btn:hover, .posters__all:hover, .lb__toall:hover { border-color: var(--stardust); color: var(--moon); background: rgba(195, 178, 236, .08); }

@media (max-width: 640px) {
  .poster > img, .poster > .ph { height: 240px; }
  .posters__btn { display: none; }                   /* phones swipe */
  .posters__viewport { -webkit-mask-image: none; mask-image: none; }
  .posters__track { padding: 0 4px; }
}

/* ---------- Poster viewer ---------- */
.lb {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(7, 7, 32, .94); color: var(--moon); overflow: hidden;
}
.lb::backdrop { background: rgba(7, 7, 32, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lb[open] { display: flex; flex-direction: column; }
.lb__close {
  position: absolute; top: 16px; right: 16px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; border: 1px solid var(--line-dark); background: rgba(22, 19, 58, .7); color: var(--moon);
}
.lb__close svg { width: 20px; height: 20px; }
.lb__close:hover { border-color: var(--stardust); }

.lb__single { flex: 1; min-height: 0; display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: 1fr auto; align-items: center; padding: 64px 16px 20px; }
.lb__stage { grid-column: 2; display: flex; align-items: center; justify-content: center; min-height: 0; height: 100%; }
.lb__frame {
  display: block; max-width: 100%; padding: 4px; border-radius: 2px;
  background: linear-gradient(135deg, #F3E7D3 0%, #C7A56F 35%, #F3E7D3 55%, #95754E 100%);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
}
/* original artwork, original proportions */
.lb__frame > img { display: block; max-width: 100%; max-height: calc(100vh - 178px); width: auto; height: auto; }
.lb__frame > .ph { display: block; aspect-ratio: 4 / 5; height: min(calc(100vh - 178px), 760px, calc((100vw - 180px) * 1.25)); }
.lb__nav {
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer; justify-self: center;
  display: grid; place-items: center; border: 1px solid var(--line-dark); background: rgba(22, 19, 58, .6); color: var(--moon);
}
.lb__nav svg { width: 22px; height: 22px; }
.lb__nav:hover { border-color: var(--stardust); background: rgba(195, 178, 236, .12); }
.lb__nav--prev { grid-column: 1; grid-row: 1; }
.lb__nav--next { grid-column: 3; grid-row: 1; }
.lb__bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 16px; }
.lb__count { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--stardust); }
.lb :focus-visible { outline: 2px solid var(--comet); outline-offset: 3px; }

.lb__grid {
  flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: clamp(16px, 2.4vw, 28px); align-content: start; padding: 80px clamp(16px, 5vw, 64px) 48px;
  max-width: 1200px; width: 100%; margin: 0 auto;
}
.lb__grid .poster { width: 100%; }
.lb__grid .poster > img, .lb__grid .poster > .ph { width: 100%; height: auto; }
.lb__grid .poster > img { aspect-ratio: 3 / 4; }

@media (max-width: 640px) {
  .lb__single { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto auto; padding: 68px 16px 18px; }
  .lb__stage { grid-column: 1 / -1; }
  .lb__frame > img { max-height: calc(100vh - 218px); }
  .lb__frame > .ph { height: min(calc(100vh - 218px), calc((100vw - 40px) * 1.25)); }
  .lb__nav--prev, .lb__nav--next { grid-row: 2; margin-top: 14px; }
  .lb__nav--prev { grid-column: 1; justify-self: end; margin-right: 10px; }
  .lb__nav--next { grid-column: 2; justify-self: start; margin-left: 10px; }
  .lb__bar { grid-row: 3; flex-direction: column; gap: 10px; }
  .lb__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   4. BEHIND THE SCENES: Moonlight frosted-glass cards, 3 / 2 / 1 columns
   ========================================================================== */
.ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.2vw, 26px); }
.op {
  padding: clamp(24px, 2.6vw, 32px); border-radius: 20px; color: var(--deep);
  background: var(--moon);   /* V8: flat Moonlight, no frosted glass */
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 22px 44px -28px rgba(4, 2, 20, .9);
  transition: transform .3s var(--ease), box-shadow .3s ease;
}
/* V8: .op cards are not clickable, so no hover lift */
/* Number and title share one line, with the divider under both */
.op__head { display: flex; align-items: baseline; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid rgba(195, 178, 236, .75); }
.op__no { flex: none; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--nova-deep); }
.op h3 { font-size: clamp(19px, 1.7vw, 21px); line-height: 1.3; color: var(--nebula); }
.op p { margin-top: 10px; font-size: 16.5px; line-height: 1.6; color: var(--deep); }
/* Seven cards: the last one sits centred in its row at the normal card size */
.op:last-child:nth-child(3n+1) { grid-column: 2; }
@media (max-width: 960px) {
  .ops { grid-template-columns: repeat(2, 1fr); }
  .op:last-child:nth-child(3n+1) { grid-column: auto; }
  .op:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - clamp(18px, 2.2vw, 26px) / 2); }
}
@media (max-width: 600px) {
  .ops { grid-template-columns: 1fr; }
  .op:last-child:nth-child(odd) { grid-column: auto; width: auto; }
}

/* ==========================================================================
   5. WHAT COMES NEXT: two opportunity cards on the frosted panel
   ========================================================================== */
#next-title em { color: var(--aurora); }
.esec--last .open__head h2 { color: var(--moon); }
.esec--last .open__head p { color: var(--stardust); }
.opps { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(18px, 2.2vw, 26px); align-items: stretch; }
.opp { border-radius: 22px; padding: clamp(26px, 3.2vw, 40px); transition: transform .3s var(--ease); }
/* V8: .opp cards are not clickable, so no hover lift */
.opp .svc__icon { margin: 0 0 18px; }
.opp h3 { font-size: clamp(22px, 2.3vw, 28px); }
.opp p { margin-top: 12px; }
.opp--main { background: var(--nebula); color: var(--moon); box-shadow: 0 26px 50px -26px rgba(42, 34, 102, .9); }
.opp--main h3, .opp--main p { color: var(--moon); }
.opp--main .svc__icon { color: var(--stardust); background: rgba(195, 178, 236, .12); }
.opp--alt { background: var(--stardust); color: var(--deep); box-shadow: 0 22px 44px -28px rgba(42, 34, 102, .6); }
.opp--alt h3, .opp--alt p { color: var(--deep); }
.opp--alt .svc__icon { color: var(--nebula); background: rgba(74, 59, 156, .1); }
@media (max-width: 820px) { .opps { grid-template-columns: 1fr; } }

.next__cta { margin-top: clamp(36px, 4.5vw, 52px); text-align: center; }
.next__cta p { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.5vw, 30px);   /* V8: a little larger */ color: var(--moon); margin-bottom: 18px; }

@media (max-width: 560px) { .opp { padding: 24px 22px; } }

@media (prefers-reduced-motion: reduce) {
  .poster:hover, .poster:focus-visible, .op:hover, .opp:hover { transform: none; }
}

/* ==========================================================================
   V8: Behind the Scenes cards fade up in a short stagger as they enter (assets/js/events-v8.js).
   The cards are left out of the shared .rv reveal so the stagger can run row by row.
   `backwards` releases the transform afterwards, so the hover lift still works.
   ========================================================================== */
.js .op { opacity: 0; }
.js .op.is-in { opacity: 1; animation: opUp .6s var(--ease) backwards; animation-delay: var(--d, 0s); }
@keyframes opUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .op { opacity: 1; } }

/* ---------- V8 readability: reading text on Deep Space in full Moonlight (footer and small labels stay softer) ---------- */
:root { --on-dark: #F5F2FA; }
.esec .open__head p, .ehero__copy p, .chap__text p { color: var(--moon); }

/* ---------- V8 accessibility (WCAG 2.2 AA) ---------- */
.nav :focus-visible { outline-color: var(--nebula); }   /* mint ring is ~1.4:1 on the light nav pill */
.footer__links a, .footer__bottom a { display: inline-flex; align-items: center; min-height: 24px; }   /* tap targets ≥24px */
@media (min-width: 881px) { .nav__links a:not(.btn) { display: inline-flex; align-items: center; min-height: 24px; } }
.footer .footer__h { font-family: var(--sans); font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .16em; text-transform: uppercase; color: var(--stardust); margin: 0 0 14px; }   /* footer headings are h2 for a clean outline; same look as before */
.posters__ctrl { gap: 10px; }
.posters__pause { color: var(--moon); }
@media (prefers-reduced-motion: reduce) { .posters__pause { display: none; } }   /* no drift, so nothing to pause */

/* Quiet pause/play icon for moving strips (WCAG 2.2.2); hover-to-pause still works for mouse users */
.pause-icon { width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid rgba(195, 178, 236, .35); background: transparent; color: var(--moon); opacity: .6; cursor: pointer; transition: opacity .2s ease, border-color .2s ease; }
.pause-icon:hover, .pause-icon:focus-visible { opacity: 1; border-color: var(--stardust); }
.pause-icon svg { width: 12px; height: 12px; fill: currentColor; }

/* Phones and tablets (2026-10-15): keep the drifting poster row on its own GPU layer so the sub-pixel glide
   (assets/js/events-v8.js) stays smooth while images decode and the page scrolls. Desktop is unchanged. */
@media (hover: none), (max-width: 640px) {
  .posters__track { will-change: transform; backface-visibility: hidden; }
  .posters__viewport { contain: paint; }
}

/* Mobile (2026-10-15): phones use the light CSS fade-in (museum.js) instead of the GSAP reveals; no sideways overflow */
@media (max-width: 640px) {
  .sec { overflow-x: clip; }
}

/* Phones (2026-10-15): posters don't drift; swipe the row or use the ← → arrows under it. Pause has nothing to pause. */
@media (max-width: 640px) {
  .posters__row { flex-wrap: wrap; justify-content: center; row-gap: 12px; }
  .posters__row .posters__viewport { flex: 0 0 100%; order: -1; }
  .posters__row .posters__btn { display: inline-flex; margin: 0 6px; color: var(--moon); border-color: rgba(195, 178, 236, .45); }
  .posters__pause { display: none; }
}
