/* ==========================================================================
   USC Zeher case study — Western-editorial theme file.
   Loaded only on projects/zeher.html, after the theme-agnostic
   assets/css/projects.css (lightbox mechanics, reveal-on-scroll, base
   .gallery-item/.back-link structure). Scoped under .zeher-theme (set on
   <body>) using its own --zw-* tokens, never the site's global
   --maroon-deep/--cream/--gold names, so the shared navbar/footer keep the
   site's own look untouched.

   Fonts (no substitutions): Rye for Western display moments, Roboto Slab
   900 for longer heavy headlines, Fraunces for narrative copy, Barlow
   Condensed for labels/captions/metrics, Allura for handwritten
   annotations used sparingly.
   ========================================================================== */

.zeher-theme {
  --zw-cream: #F3E9D2;
  --zw-cream-deep: #E6D5A8;
  --zw-ink: #1A1410;
  --zw-red: #7A1F2B;
  --zw-red-bright: #B6232A;
  --zw-cobalt: #1B3A6B;
  --zw-coral: #E06A3F;
  --zw-pink: #D98BA6;

  --zw-western: 'Rye', serif;
  --zw-slab: 'Roboto Slab', serif;
  --zw-serif: 'Fraunces', Georgia, serif;
  --zw-label: 'Barlow Condensed', sans-serif;
  --zw-hand: 'Allura', cursive;

  --gutter: clamp(32px, 6vw, 96px);
  --section-pad-y: clamp(80px, 9vw, 140px);
  --gap-heading: 28px;
  --gap-intro: 56px;
  --gap-asset: 28px;
  --content-max: 1280px;

  background: var(--zw-cream);
  font-family: var(--zw-serif);
  color: var(--zw-ink);
  overflow-x: clip;
}

.zeher-theme img,
.zeher-theme video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Shared ---------- */
.zw-section { position: relative; width: 100%; overflow: hidden; }
.zw-inner,
.zw-hero-inner,
.zw-trajectory-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
}
.zw-section .zw-inner { padding-top: var(--section-pad-y); padding-bottom: var(--section-pad-y); }

.zw-h2 {
  font-family: var(--zw-slab);
  font-weight: 900;
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.02;
  color: var(--zw-ink);
  margin: 0 0 var(--gap-intro);
  overflow-wrap: break-word;
}
.zw-h2--light { color: var(--zw-cream); }

.zw-copy {
  font-family: var(--zw-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--zw-ink);
  opacity: 0.88;
  max-width: 68ch;
  overflow-wrap: break-word;
}
.zw-copy--light { color: var(--zw-cream); opacity: 0.88; }

.zw-eyebrow {
  display: inline-block;
  font-family: var(--zw-label);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--zw-red);
  font-weight: 600;
}
.zw-eyebrow--light { color: var(--zw-coral); }

.zw-tag {
  display: inline-block;
  font-family: var(--zw-label);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--zw-ink);
  border: 1.5px solid var(--zw-ink);
  padding: 0.4rem 0.9rem;
}

.zeher-theme .back-link {
  font-family: var(--zw-label);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zw-ink);
  opacity: 0.72;
}
.zeher-theme .back-link:hover,
.zeher-theme .back-link:focus-visible { color: var(--zw-red); opacity: 1; }
.zeher-theme .back-link:focus-visible { outline: 2px solid var(--zw-red); }

/* ========================================================================
   1. HERO
   ======================================================================== */
.zw-hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--zw-cream);
  overflow: hidden;
  position: relative;
}
.zw-back { max-width: var(--content-max); margin: 0 auto; padding: 1.75rem var(--gutter) 0; width: 100%; box-sizing: border-box; }

.zw-hero-inner {
  width: 100%;
  min-width: 0;
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
  display: flex;
  align-items: center;
}

.zw-hero-mark {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  width: min(320px, 26vw);
  height: auto;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.zw-hero-content { position: relative; z-index: 1; max-width: 46rem; min-width: 0; }

.zw-kicker {
  display: block;
  font-family: var(--zw-label);
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--zw-red);
  margin-bottom: 0.75rem;
}

.zw-hero-title { margin: 0; }
.zw-hero-title-lead {
  display: block;
  font-family: var(--zw-slab);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--zw-ink);
  line-height: 0.95;
}
.zw-hero-title-main {
  display: block;
  font-family: var(--zw-western);
  font-size: clamp(3.6rem, 9vw, 7.2rem);
  line-height: 0.9;
  color: var(--zw-red);
  margin-top: 0.05em;
  overflow-wrap: break-word;
}

.zw-hero-intro {
  font-family: var(--zw-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--zw-ink);
  opacity: 0.85;
  max-width: 34rem;
  margin: var(--gap-heading) 0 0;
}

.zw-tag-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: var(--gap-intro); }

.zw-hero-frag {
  position: absolute;
  width: 90px;
  height: 90px;
  object-fit: cover;
  border: 4px solid var(--zw-cream-deep);
  box-shadow: 0 10px 22px rgba(26, 20, 16, 0.3);
  z-index: 2;
}
.zw-hero-frag--a { left: min(680px, 46%); bottom: 10%; width: 92px; height: 115px; object-position: 30% 15%; transform: rotate(-6deg); }
.zw-hero-frag--b { left: min(790px, 54%); top: 14%; width: 70px; height: 70px; object-position: 50% 30%; transform: rotate(6deg); }

@media (max-width: 760px) {
  .zw-hero-mark { position: static; transform: none; opacity: 0.6; width: 140px; margin-bottom: 1.5rem; }
  .zw-hero-inner { flex-direction: column; align-items: flex-start; }
  .zeher-theme .zw-hero-frag { display: none; }
}

/* ========================================================================
   2. SEASON TRAJECTORY
   ======================================================================== */
.zw-trajectory {
  background: var(--zw-cobalt);
  padding: clamp(40px, 5vw, 70px) 0;
  width: 100%;
  overflow: hidden;
}
.zw-trajectory-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 48px);
  flex-wrap: wrap;
  text-align: center;
}
.zw-trajectory-cell { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.zw-trajectory-label {
  font-family: var(--zw-label);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--zw-pink);
}
.zw-trajectory-value {
  font-family: var(--zw-slab);
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  color: var(--zw-cream);
  overflow-wrap: break-word;
}
.zw-trajectory-arrow {
  font-family: var(--zw-slab);
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  color: var(--zw-coral);
}

/* ========================================================================
   3. BEHIND THE PRODUCTION
   ======================================================================== */
.zw-production { background: var(--zw-cream); }
.zw-production-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 56px);
}
.zw-objectives { display: flex; flex-direction: column; gap: var(--gap-asset); min-width: 0; }
.zw-objective h3 {
  font-family: var(--zw-slab);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--zw-ink);
  margin: 0.4rem 0 0.5rem;
}
.zw-objective p {
  font-family: var(--zw-serif);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--zw-ink);
  opacity: 0.85;
  margin: 0;
}
.zw-tools {
  font-family: var(--zw-label);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--zw-ink);
  opacity: 0.7;
  margin: 0.25rem 0 0;
}

@media (max-width: 760px) {
  .zw-production-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ========================================================================
   4. BRANDING THE FRONTIER
   ======================================================================== */
.zw-branding { background: var(--zw-pink); }
.zw-branding-note { margin-top: -1.25rem; margin-bottom: var(--gap-intro); font-size: 0.95rem; }

.zw-frontier-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap-asset);
  align-items: start;
}

.zw-frontier-item { grid-column: span 12; min-width: 0; margin: 0; }
.zeher-theme .gallery-item:focus-visible { outline-color: var(--zw-red); }
.zw-span-7 { grid-column: span 7; }
.zw-span-6 { grid-column: span 6; }
.zw-span-5 { grid-column: span 5; }
.zw-span-3 { grid-column: span 3; }

@media (max-width: 900px) {
  .zw-span-7, .zw-span-6, .zw-span-5 { grid-column: span 6; }
  .zw-span-3 { grid-column: span 6; }
}
@media (max-width: 560px) {
  .zw-span-7, .zw-span-6, .zw-span-5, .zw-span-3 { grid-column: span 12; }
}

.zw-frontier-item .gallery-item-frame {
  background: var(--zw-cream);
  border-color: var(--zw-ink);
  width: 100%;
}
.zw-frontier-item .gallery-item-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.zw-frontier-item:hover .gallery-item-frame,
.zw-frontier-item:focus-visible .gallery-item-frame { border-color: var(--zw-red); }
.zw-frontier-item .gallery-item-caption {
  font-family: var(--zw-label);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--zw-ink);
  opacity: 0.72;
  overflow-wrap: break-word;
}

/* Western ephemera — selective, not on every frame */
.zw-span-7 .gallery-item-frame,
.zw-span-6:nth-of-type(4) .gallery-item-frame {
  position: relative;
}
.zw-span-7 .gallery-item-frame::before {
  content: "";
  position: absolute;
  left: 16%;
  top: -8px;
  width: 54px;
  height: 20px;
  background: linear-gradient(115deg, rgba(122, 31, 43, 0.55), rgba(243, 233, 210, 0.5));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: rotate(-5deg);
  z-index: 2;
  pointer-events: none;
}
.zw-supporting:nth-of-type(odd) .gallery-item-frame {
  transform: rotate(-1.5deg);
}
.zw-supporting:nth-of-type(even) .gallery-item-frame {
  transform: rotate(1.5deg);
}

.zw-frontier-item:nth-of-type(1) { transition-delay: 0ms; }
.zw-frontier-item:nth-of-type(2) { transition-delay: 80ms; }
.zw-frontier-item:nth-of-type(3) { transition-delay: 140ms; }
.zw-frontier-item:nth-of-type(4) { transition-delay: 200ms; }
.zw-frontier-item:nth-of-type(5) { transition-delay: 260ms; }
.zw-frontier-item:nth-of-type(6) { transition-delay: 320ms; }
.zw-frontier-item:nth-of-type(7) { transition-delay: 380ms; }
.zw-frontier-item:nth-of-type(8) { transition-delay: 440ms; }

/* ========================================================================
   5. ZEHER IN MOTION — the only section with video
   ======================================================================== */
.zw-motion { background: var(--zw-ink); }

.zw-motion-feature {
  display: flex;
  gap: clamp(28px, 4vw, 48px);
  flex-wrap: wrap;
  align-items: flex-start;
}
.zw-motion-feature-media {
  position: relative;
  width: min(340px, 100%);
  flex-shrink: 0;
  min-width: 0;
}
.zw-motion-feature-media video {
  width: 100%;
  aspect-ratio: 576 / 1024;
  border-radius: 4px;
  background: #000;
}
.zw-motion-flag {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  font-family: var(--zw-label);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zw-cream);
  background: var(--zw-red);
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
}
.zw-motion-feature-body { flex: 1 1 260px; min-width: 0; }
.zw-metrics-list {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.zw-metrics-list li {
  font-family: var(--zw-serif);
  font-size: 1.15rem;
  color: var(--zw-cream);
}
.zw-metrics-list strong {
  font-family: var(--zw-label);
  color: var(--zw-coral);
  font-variant-numeric: tabular-nums;
}
.zw-motion-sub-label { display: block; margin-top: var(--gap-intro); margin-bottom: 1rem; }

.zw-motion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-asset);
  align-items: start;
}
.zw-motion-card { min-width: 0; }
.zw-motion-card video { width: 100%; border-radius: 4px; background: #000; aspect-ratio: 9 / 16; margin: 0; }
/* stage-performance.mp4 is the one landscape clip in the feed */
.zw-motion-card:nth-child(2) video { aspect-ratio: 720 / 406; }

@media (max-width: 900px) {
  .zw-motion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .zw-motion-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ========================================================================
   6. BUILDING MOMENTUM
   ======================================================================== */
.zw-momentum { background: var(--zw-cream); }
.zw-momentum-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap-asset);
}
.zw-stat { min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.zw-stat-value {
  font-family: var(--zw-slab);
  font-weight: 900;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--zw-red);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}
.zw-stat-value--sm { font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--zw-cobalt); }
.zw-stat-label {
  font-family: var(--zw-label);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--zw-ink);
  opacity: 0.72;
}

@media (max-width: 760px) {
  .zw-momentum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ========================================================================
   7. THE PAYOFF
   ======================================================================== */
.zw-payoff { background: var(--zw-ink); }
.zw-payoff-grid {
  display: flex;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  flex-wrap: wrap;
}
.zw-payoff-media {
  position: relative;
  flex: 1 1 380px;
  min-width: 0;
}
.zw-payoff-media img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}
.zw-payoff-badge {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) rotate(-3deg);
  font-family: var(--zw-label);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zw-ink);
  background: var(--zw-cream);
  border: 2px solid var(--zw-ink);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zw-payoff-body { flex: 1 1 380px; min-width: 0; }
.zw-payoff-facts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: var(--gap-intro);
}
.zw-payoff-facts p {
  font-family: var(--zw-label);
  font-size: 0.98rem;
  color: var(--zw-cream);
  opacity: 0.85;
  margin: 0;
}
.zeher-theme .zw-payoff-back {
  display: inline-flex;
  margin-top: var(--gap-intro);
  color: var(--zw-cream);
  opacity: 0.8;
}
.zeher-theme .zw-payoff-back:hover,
.zeher-theme .zw-payoff-back:focus-visible { color: var(--zw-coral); opacity: 1; }

@media (max-width: 760px) {
  .zw-payoff-grid { flex-direction: column; align-items: stretch; }
}
