/* =====================================================================
   EVEY VO — Portfolio Game Menu
   Persona 5 / Metaphor: ReFantazio inspired.
   ===================================================================== */

:root {
  /* Primary palette — "orange" var names retained for stability,
     but the colors are now blue. THEME in script.js overrides these. */
  --orange: #0004ff;
  --orange-deep: #0000c7;
  --orange-light: #7a8aff;
  --black: #0a0a0a;
  --black-soft: #161312;
  --cream: #f5ecdf;
  --cream-dim: #d6c8b3;
  --accent: #ffd400;

  /* Fonts (overridable via THEME.fontDisplay / THEME.fontBody). */
  --font-display: 'Archivo Black', sans-serif;
  --font-body: 'Oswald', sans-serif;

  /* Sizing knobs (overridable via THEME.sizes / THEME.card). */
  --evey-size: clamp(40px, 6vw, 90px);
  --label-size: clamp(34px, 5.5vw, 92px);
  --label-num-size: clamp(28px, 4vw, 56px);

  --strip-h-desktop: 33vh;
  /* Cards now grow vertically to fit the full image without cropping. */
  --item-w-desktop: clamp(220px, 22vw, 380px);
  --item-h-desktop: clamp(200px, 25vh, 320px);

  --slide-duration: 1.6s;
  --slide-ease: cubic-bezier(0.72, 0.02, 0.18, 1);
  --zoom-duration: 0.45s;
  --zoom-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--black);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  user-select: none;
}

/* ----------------------------- Background grain + vignette ---------- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.4) 0 1px, transparent 1px 3px);
  animation: grainShift 8s steps(8) infinite;
}
@keyframes grainShift {
  0%, 100% { transform: translate(0,0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-2px, 0); }
  80% { transform: translate(2px, 1px); }
}

.vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 50;
  background: radial-gradient(ellipse at center,
    transparent 50%, rgba(0,0,0,0.55) 100%);
}

/* ----------------------------- Standalone name --------------------- */
.evey-tag {
  position: fixed;
  top: 50%;
  left: clamp(8px, 1.5vw, 24px);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  /* Dela Gothic One — locked specifically for the standalone name. */
  font-family: var(--font-display);
  font-style: normal; /* Dela Gothic One only ships a regular cut */
  font-size: var(--evey-size);
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.02em;
  text-shadow:
    4px 4px 0 var(--orange),
    8px 8px 0 var(--black);
  line-height: 0.95;
  z-index: 70;
  pointer-events: none;
}

/* ----------------------------- HUD top ------------------------------ */
.hud-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 45;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
  pointer-events: none;
  mix-blend-mode: difference;
  color: var(--cream);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: dotPulse 1.4s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.6; }
}

.hud-status .hud-blink {
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ----------------------------- Menu layout -------------------------- */
.menu {
  position: relative;
  height: 100vh;
  width: 100%;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.strip-section {
  position: relative;
  flex: 1 1 33.3333%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Orange section ------------------------------------------------------ */
.orange-section {
  background:
    /* diagonal stripes overlay */
    repeating-linear-gradient(
      135deg,
      rgba(0,0,0,0.05) 0 24px,
      rgba(0,0,0,0) 24px 48px
    ),
    linear-gradient(180deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: var(--black);
}

/* Black section ------------------------------------------------------- */
.black-section {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0,4,255,0.05) 0 22px,
      rgba(0,4,255,0) 22px 44px
    ),
    linear-gradient(180deg, var(--black) 0%, #1a0e07 100%);
  color: var(--cream);
}

/* Stack ordering + diagonal cuts (top → mid → bot) ------------------- */
.strip-section[data-pos="top"] {
  z-index: 3;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), 0 100%);
}

.strip-section[data-pos="mid"] {
  z-index: 2;
  clip-path: polygon(0 24px, 100% 0, 100% calc(100% - 24px), 0 100%);
  margin-top: -24px;
}

.strip-section[data-pos="bot"] {
  z-index: 1;
  clip-path: polygon(0 24px, 100% 0, 100% 100%, 0 100%);
  margin-top: -24px;
}

/* ----------------------------- Section labels ----------------------- */
/* Labels are siblings of strip-sections, so they can overlap the
   diagonal section seams without being clipped. */
.menu-labels {
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
}

.section-label {
  position: absolute;
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: baseline;
  gap: 18px;
  pointer-events: none;
  text-transform: uppercase;
  max-width: calc(100vw - 24px);
  left: 50%;
}

/* INSTALLATIONS — pinned to the very top of the page. */
.section-label-anchor-top {
  top: 14px;
  transform: translateX(-50%) skewX(-6deg);
}

/* STAGE DESIGN — centered on the seam between strips 1 and 2. */
.section-label-seam-1 {
  top: 33.3333%;
  transform: translate(-50%, -50%) skewX(-6deg);
}

/* 3D ARTS — centered on the seam between strips 2 and 3. */
.section-label-seam-2 {
  top: 66.6666%;
  transform: translate(-50%, -50%) skewX(-6deg);
}

.label-num {
  font-family: var(--font-display);
  font-size: var(--label-num-size);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  color: var(--orange);
  -webkit-text-stroke: 2px var(--cream);
}

.label-title {
  font-family: var(--font-display);
  font-size: var(--label-size);
  font-weight: 900;
  font-style: italic;
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 0.95;
  white-space: nowrap;
  color: var(--cream);
  /* Layered offset shadow so the title pops on both blue and black. */
  text-shadow:
    5px 5px 0 var(--orange),
    9px 9px 0 var(--black);
}

.label-tag {
  font-family: var(--font-body);
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 700;
  letter-spacing: 0.22em;
  opacity: 0.7;
  align-self: end;
  padding-bottom: 6px;
  color: var(--cream);
}

/* Focused-strip indicator on labels (driven by keyboard nav) */
.section-label.is-focused .label-num {
  color: var(--accent);
  -webkit-text-stroke: 2px var(--black);
  text-shadow: 2px 2px 0 var(--black);
}
.section-label.is-focused .label-title {
  text-shadow:
    5px 5px 0 var(--accent),
    9px 9px 0 var(--black);
}

/* ----------------------------- Strip viewport ----------------------- */
.strip-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.strip {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 50vw; /* generous so first/last items can be centered */
  height: 100%;
  will-change: transform;
}

/* ----------------------------- Strip item --------------------------- */
.strip-item {
  flex: 0 0 auto;
  width: var(--item-w-desktop);
  height: var(--item-h-desktop);
  position: relative;
  cursor: pointer;
  transform: scale(0.78);
  filter: brightness(0.55) saturate(0.7);
  transition:
    transform var(--zoom-duration) var(--zoom-ease),
    filter var(--zoom-duration) ease;
  isolation: isolate;
}

.strip-item.zoomed {
  transform: scale(1.18);
  filter: brightness(1.1) saturate(1.15) contrast(1.05);
  z-index: 8;
}

/* The actual card --------------------------------------------------- */
.card-frame {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--black);
  border: 3px solid var(--black);
  box-shadow:
    8px 8px 0 0 rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden;
  /* angled corner like Persona 5 menu */
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 18px),
    calc(100% - 18px) 100%,
    0 100%
  );
}

.orange-section .card-frame {
  border-color: var(--black);
  box-shadow:
    6px 6px 0 0 var(--cream),
    10px 10px 0 0 rgba(0,0,0,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.08);
}

.black-section .card-frame {
  border-color: var(--orange);
  box-shadow:
    6px 6px 0 0 var(--orange-deep),
    10px 10px 0 0 rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.08);
}

.card-frame img {
  width: 100%;
  height: 100%;
  /* `contain` shows the full image without cropping. The card-frame has
     a dark background that fills any letterbox area. */
  object-fit: contain;
  display: block;
  background: var(--black);
  filter: contrast(1.05) saturate(1.05);
  transition: transform 1s ease;
}

.zoomed .card-frame img {
  transform: scale(1.06);
}

/* Subtle gradient + corner tag ------------------------------------- */
.card-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    transparent 40%,
    rgba(0,0,0,0.85) 100%);
  pointer-events: none;
}

.card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: var(--black);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  z-index: 2;
  transform: skewX(-10deg);
}

.card-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  color: var(--cream);
}

.card-num {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.9;
  color: var(--accent);
  text-shadow: 2px 2px 0 var(--black);
}

.card-info-text { flex: 1; min-width: 0; }

.card-info h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(13px, 1.2vw, 18px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info p {
  margin: 2px 0 0;
  font-family: var(--font-body);
  font-size: clamp(10px, 0.85vw, 12px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----------------------------- Center marker ------------------------ */
.center-marker {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: calc(var(--item-w-desktop) + 50px);
  height: calc(var(--item-h-desktop) + 50px);
  pointer-events: none;
  z-index: 6;
}

.bracket {
  position: absolute;
  width: 28px; height: 28px;
  border: 4px solid currentColor;
}
.orange-section .bracket { color: var(--black); }
.black-section .bracket { color: var(--orange); }

.bracket-l {
  top: 0; left: 0;
  border-right: none;
  border-bottom: none;
}
.bracket-r {
  bottom: 0; right: 0;
  border-left: none;
  border-top: none;
}

/* Pulsing animation while zoomed */
.strip-section.is-locked .bracket {
  animation: bracketPulse 1.4s ease-in-out infinite;
}

@keyframes bracketPulse {
  0%, 100% { transform: translate(0,0); opacity: 1; }
  50%      { transform: translate(-4px,-4px); opacity: 0.65; }
}
.bracket-r {
  /* mirror the pulse direction */
}
.strip-section.is-locked .bracket-r {
  animation-name: bracketPulseR;
}
@keyframes bracketPulseR {
  0%, 100% { transform: translate(0,0); opacity: 1; }
  50%      { transform: translate(4px,4px); opacity: 0.65; }
}

/* ----------------------------- Section divider ---------------------- */
.section-divider {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--black);
  z-index: 4;
}

/* ----------------------------- HUD bottom --------------------------- */
.hud-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 45;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
  mix-blend-mode: difference;
  color: var(--cream);
  background: linear-gradient(0deg, rgba(0,0,0,0.45), transparent);
}

.hud-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hud-key kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--cream);
  color: var(--black);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  border-radius: 3px;
  letter-spacing: 0;
}

.hud-spacer { flex: 1; }

.hud-counter {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.12em;
  color: var(--accent);
}

/* ----------------------------- Responsive --------------------------- */
@media (max-width: 900px) {
  :root {
    --item-w-desktop: clamp(180px, 55vw, 260px);
    --item-h-desktop: clamp(120px, 36vw, 170px);
  }

  .label-title { font-size: clamp(24px, 7vw, 42px); }
  .label-num { font-size: clamp(20px, 5vw, 32px); }
  .label-tag { display: none; }

  .strip { gap: 18px; }

  .hud-top, .hud-bottom { font-size: 10px; gap: 12px; padding-left: 12px; padding-right: 12px; }
  .hud-key:nth-child(2), .hud-key:nth-child(3) { display: none; }
}

@media (max-width: 560px) {
  .evey-tag {
    font-size: clamp(28px, 9vw, 56px);
  }

  .section-label-anchor-top { top: 10px; }
  .label-title {
    font-size: clamp(24px, 8vw, 40px);
    text-shadow: 3px 3px 0 var(--orange), 6px 6px 0 var(--black);
  }

  .center-marker {
    width: calc(var(--item-w-desktop) + 24px);
    height: calc(var(--item-h-desktop) + 24px);
  }
  .bracket { width: 18px; height: 18px; border-width: 3px; }
}

/* Reduced motion: respect users who don't want animations */
@media (prefers-reduced-motion: reduce) {
  .strip-item { transition: none; }
  .strip { transition: none !important; }
}

/* ===================================================================
   Focused-strip indicator (driven by keyboard nav)
   =================================================================== */
.strip-section.is-focused .center-marker .bracket {
  box-shadow: 0 0 24px var(--accent), 0 0 4px var(--accent);
}
.strip-section.is-focused .section-label .label-num {
  color: var(--accent);
  -webkit-text-stroke: 0;
  text-shadow: 2px 2px 0 var(--black);
}

/* ===================================================================
   Detail modal
   =================================================================== */
.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, 0.85);
  backdrop-filter: blur(6px) saturate(0.9);
  -webkit-backdrop-filter: blur(6px) saturate(0.9);
  animation: backdropIn 0.25s ease-out forwards;
}

@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-window {
  position: relative;
  width: min(96vw, 1100px);
  max-height: calc(100vh - 48px);
  background: var(--cream);
  color: var(--black);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  border: 4px solid var(--black);
  box-shadow:
    14px 14px 0 0 var(--orange-deep),
    24px 24px 0 0 rgba(0, 0, 0, 0.45);
  clip-path: polygon(
    24px 0,
    100% 0,
    100% calc(100% - 24px),
    calc(100% - 24px) 100%,
    0 100%,
    0 24px
  );
  animation: modalIn 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  scrollbar-width: thin;
  scrollbar-color: var(--orange) transparent;
}

.modal-window::-webkit-scrollbar { width: 8px; }
.modal-window::-webkit-scrollbar-thumb { background: var(--orange); }

@keyframes modalIn {
  from { transform: scale(0.86) translateY(20px) skewX(-2deg); opacity: 0; }
  to   { transform: scale(1) translateY(0) skewX(0); opacity: 1; }
}

.modal.is-closing .modal-window {
  animation: modalOut 0.25s ease-in forwards;
}
.modal.is-closing .modal-backdrop {
  animation: backdropOut 0.25s ease-in forwards;
}
@keyframes modalOut {
  to { transform: scale(0.94) translateY(10px); opacity: 0; }
}
@keyframes backdropOut {
  to { opacity: 0; }
}

/* Header ----------------------------------------------------------- */
.modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--black);
  color: var(--cream);
}

.modal-tag {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  text-transform: uppercase;
}
.modal-num {
  font-size: clamp(22px, 2.6vw, 34px);
  font-style: italic;
  color: var(--orange);
  -webkit-text-stroke: 1px var(--cream);
}
.modal-section {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--cream);
}
.modal-year {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--accent);
  padding: 2px 8px;
  border: 1px solid var(--accent);
}

.modal-close {
  appearance: none;
  border: 2px solid var(--orange);
  background: transparent;
  color: var(--cream);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.2em;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.modal-close:hover {
  background: var(--orange);
  color: var(--black);
  transform: translate(-2px, -2px);
}
.modal-close-x {
  font-family: var(--font-display);
  font-size: 16px;
}

/* Title block ------------------------------------------------------ */
.modal-title {
  margin: 22px 28px 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.modal-subtitle {
  margin: 0 28px 18px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

/* Hero (video) ----------------------------------------------------- */
.modal-hero {
  position: relative;
  margin: 0 28px;
  aspect-ratio: 16 / 9;
  background: var(--black);
  overflow: hidden;
  border: 3px solid var(--black);
  box-shadow: 6px 6px 0 var(--orange);
}
.modal-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--black);
}

/* 3D Arts modal: a big still image instead of a video. We use object-fit:
   contain so the full render shows without being cropped. */
.modal-hero-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--black);
}

/* ===================================================================
   "is-threed" modal variant
   Stripped-down layout for 3D Arts: title + subtitle + year + 1
   description paragraph + a single FULL-SIZE image.
   No meta sidebar, no credits, no documentation gallery.
   =================================================================== */
.modal-window.is-threed .modal-meta,
.modal-window.is-threed .modal-gallery {
  display: none;
}

/* Body becomes a single column, padded comfortably. */
.modal-window.is-threed .modal-body {
  display: block;
  grid-template-columns: 1fr;
  padding: 14px 28px 24px;
}

/* Show only the first description paragraph; hide the rest. */
.modal-window.is-threed .modal-text p ~ p {
  display: none;
}

/* The hero drops the 16:9 frame entirely and grows to match the image. */
.modal-window.is-threed .modal-hero {
  /* Cancel the fixed 16:9 lock and any inherited fixed height. */
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0;
  max-height: none;
  margin: 6px 28px 0;
  padding: 0;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;          /* don't let the flex column squish it */
  overflow: visible;
}

/* Hide the corner-bracket frame in 3D mode — the image carries itself. */
.modal-window.is-threed .modal-hero-frame {
  display: none;
}

/* The image: natural aspect, capped at viewport-sized max-height. */
.modal-window.is-threed .modal-hero-image {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 75vh !important;
  object-fit: contain;
  background: transparent;
}

.hero-bracket {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid var(--accent);
  pointer-events: none;
  z-index: 2;
}
.hero-bracket-tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.hero-bracket-tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.hero-bracket-bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.hero-bracket-br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

/* Body grid -------------------------------------------------------- */
.modal-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  padding: 24px 28px 8px;
}

.modal-meta dl {
  margin: 0;
  display: grid;
  gap: 14px;
}
.modal-meta dl > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 3px solid var(--orange);
  padding-left: 12px;
}
.modal-meta dt {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange-deep);
}
.modal-meta dd {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-meta-title,
.modal-gallery-title {
  margin: 22px 0 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--black);
  border-bottom: 3px solid var(--black);
  padding-bottom: 4px;
}

.modal-credits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
}
.modal-credits li::before {
  content: '— ';
  color: var(--orange-deep);
}

.modal-text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
}
.modal-text p {
  margin: 0 0 14px;
}
.modal-text p:first-of-type {
  font-size: 17px;
  font-weight: 500;
}
.modal-text p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3em;
  float: left;
  line-height: 0.9;
  margin: 0.05em 8px 0 0;
  color: var(--orange);
  -webkit-text-stroke: 2px var(--black);
}

/* Gallery ---------------------------------------------------------- */
.modal-gallery {
  padding: 0 28px 32px;
}
.modal-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.modal-gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 var(--orange);
  transition: transform 0.25s ease;
}
.modal-gallery-grid img:hover {
  transform: translate(-3px, -3px);
}

/* Modal responsive ------------------------------------------------- */
@media (max-width: 800px) {
  .modal-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .modal-title { font-size: clamp(28px, 8vw, 48px); margin: 16px 18px 4px; }
  .modal-subtitle, .modal-hero { margin-left: 18px; margin-right: 18px; }
  .modal-body { padding: 18px 18px 8px; }
  .modal-gallery { padding: 0 18px 24px; }
  .modal-header { padding: 12px 18px; }
}

/* Reduced motion modal ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .modal-window,
  .modal.is-closing .modal-window,
  .modal-backdrop,
  .modal.is-closing .modal-backdrop {
    animation: none !important;
  }
}
