:root {
  --bg: #05040c;
  --panel: rgba(12, 16, 32, 0.72);
  --panel-border: rgba(160, 190, 255, 0.16);
  --line: rgba(160, 190, 255, 0.14);
  --text: #f4f7ff;
  --muted: rgba(220, 228, 255, 0.64);
  --magenta: #ff16c8;
  --cyan: #12d8ff;
  --orange: #ffb21c;
  --purple: #813cff;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100%;
  background:
    radial-gradient(ellipse at 12% 16%, rgba(255, 22, 200, .12), transparent 35%),
    radial-gradient(ellipse at 88% 34%, rgba(18, 216, 255, .11), transparent 32%),
    radial-gradient(ellipse at 54% 88%, rgba(255, 178, 28, .08), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.bg-glow {
  position: fixed;
  pointer-events: none;
  filter: blur(100px);
  opacity: 0.22;
  z-index: 0;
}
.bg-glow-1 {
  width: 45vw;
  height: 35vh;
  left: 10%;
  top: 10%;
  background: radial-gradient(circle, #ff16c8, transparent 70%);
  opacity: .19;
}
.bg-glow-2 {
  width: 40vw;
  height: 32vh;
  right: 5%;
  top: 40%;
  background: radial-gradient(circle, #12d8ff, transparent 70%);
  opacity: .2;
}
.bg-glow-3 {
  width: 42vw;
  height: 32vh;
  left: 25%;
  bottom: 5%;
  background: radial-gradient(circle, #ffb21c 0%, #813cff 38%, transparent 72%);
  opacity: .18;
}

.nav,
.row,
.about-section,
.foot {
  position: relative;
  z-index: 1;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 40px;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-family: Outfit, Inter, sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 14px;
}
.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  mix-blend-mode: screen;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav nav a,
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  padding: 6px 4px;
  transition: color 0.2s ease;
}
.nav nav a:hover,
.nav-link:hover,
.nav nav a.is-active {
  color: var(--text);
}
.nav nav a.is-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 4px;
  right: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
}

.cta {
  justify-self: end;
  border: 1px solid rgba(160, 190, 255, 0.3);
  background: linear-gradient(180deg, rgba(80, 90, 180, 0.4), rgba(20, 24, 55, 0.6));
  color: var(--text);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
}
.cta:hover {
  border-color: rgba(200, 220, 255, 0.6);
  background: linear-gradient(180deg, rgba(100, 110, 210, 0.5), rgba(30, 35, 75, 0.7));
  box-shadow: 0 0 20px rgba(120, 100, 255, 0.35);
  transform: translateY(-1px);
}

.showcase-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  padding: 14px 28px 14px 44px;
  border-bottom: 0;
  min-height: 0;
  overflow: hidden;
}

.showcase-row::before { display: none; }

.copy {
  position: relative;
  z-index: 3;
  max-width: 220px;
}

.copy .idx {
  font-family: Outfit, sans-serif;
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2px;
}

.copy h2 {
  font-family: Outfit, sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.copy p {
  color: rgba(220, 228, 255, 0.65);
  font-size: 12.5px;
  line-height: 1.48;
}

.stage {
  position: relative;
  height: 280px;
  width: 100%;
  min-width: 0;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  cursor: grab;
  overflow: hidden;
  isolation: isolate;
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -35% -8%;
  pointer-events: none;
  transform: translateZ(-150px) rotateX(56deg) scale(1.35);
  transform-origin: 50% 55%;
  filter: blur(34px);
  opacity: .72;
  background:
    radial-gradient(ellipse at 18% 45%, rgba(255, 22, 200, .48), transparent 30%),
    radial-gradient(ellipse at 48% 65%, rgba(129, 60, 255, .42), transparent 31%),
    radial-gradient(ellipse at 82% 42%, rgba(18, 216, 255, .42), transparent 30%),
    radial-gradient(ellipse at 68% 84%, rgba(255, 178, 28, .24), transparent 25%);
}

#stage-logos {
  height: 265px;
}

#stage-ads {
  height: 295px;
}

.stage:active {
  cursor: grabbing;
}

.stage .floor {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 2%;
  height: 38%;
  background: radial-gradient(ellipse at 24% 100%, rgba(255, 22, 200, .28), transparent 45%), radial-gradient(ellipse at 76% 100%, rgba(18, 216, 255, .25), transparent 46%), radial-gradient(ellipse at 50% 100%, rgba(255, 178, 28, .12), transparent 62%);
  filter: blur(14px);
  pointer-events: none;
}

.rail {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.stage-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 14, 30, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
  opacity: 0.65;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.stage-nav:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  background: rgba(22, 28, 56, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(120, 100, 255, 0.45);
}

.stage-nav.prev {
  left: 12px;
}

.stage-nav.next {
  right: 12px;
}

.stage-nav svg {
  width: 18px;
  height: 18px;
}

.card {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 0;
  color: inherit;
  font: inherit;
  transform-style: preserve-3d;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(160, 190, 255, 0.2);
  background-color: #090c18;
  background-image: var(--video-poster, radial-gradient(ellipse at 35% 30%, rgba(72, 111, 200, .38), transparent 46%), linear-gradient(135deg, #202b47, #11182c 58%, #182039));
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
  cursor: pointer;
}

.showcase-row[data-gallery="videos"] .card.is-center {
  border-color: rgba(140, 180, 255, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 35px rgba(60, 120, 255, 0.35),
    0 20px 45px rgba(0, 0, 0, 0.8);
}

.showcase-row[data-gallery="logos"] .card.is-center {
  border-color: rgba(160, 140, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 35px rgba(130, 90, 255, 0.35),
    0 20px 45px rgba(0, 0, 0, 0.8);
}

.showcase-row[data-gallery="ads"] .card.is-center {
  border-color: rgba(255, 90, 160, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 35px rgba(255, 60, 120, 0.35),
    0 20px 45px rgba(0, 0, 0, 0.8);
}

.card video,
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
  pointer-events: none;
}
.card video { opacity: 0; transition: opacity .2s ease; }
.card.has-video-frame video { opacity: 1; }

#stage-logos .card video {
  object-fit: cover;
  background: transparent;
  padding: 0;
}

.card .meta {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}
#stage-logos .card .meta {
  color: #0b1020;
  text-shadow: none;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* 04 Notre Entreprise - Scrollable Next Page */
.about-section {
  min-height: 85vh;
  padding: 90px 48px 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid rgba(160, 190, 255, 0.08);
}
.about-header {
  max-width: 720px;
  margin-bottom: 44px;
}
.about-header .badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: Outfit, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);
  background: rgba(42, 212, 255, 0.1);
  border: 1px solid rgba(42, 212, 255, 0.25);
  margin-bottom: 14px;
}
.about-header h2 {
  font-family: Outfit, sans-serif;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.about-header .about-sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.about-grid {
  display: grid;
  grid-template-columns: 280px 1.5fr 190px 300px;
  gap: 20px;
  align-items: stretch;
}
.mini-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mini-card,
.hero-card,
.stats,
.vision-card {
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(16, 22, 44, 0.8), rgba(9, 12, 26, 0.85));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.mini-card:hover,
.hero-card:hover,
.stats:hover,
.vision-card:hover {
  border-color: rgba(180, 210, 255, 0.35);
  transform: translateY(-2px);
}
.mini-col .mini-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.icon-box {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(160, 190, 255, 0.25);
  border-radius: 12px;
  background: rgba(30, 40, 80, 0.4);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: var(--cyan);
}
.icon-box svg {
  width: 22px;
  height: 22px;
}
.mini-card h3,
.vision-card h3 {
  font-family: Outfit, sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.mini-card p,
.vision-card p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 32px;
  background:
    linear-gradient(135deg, rgba(8, 12, 28, 0.9), rgba(16, 20, 48, 0.75)),
    radial-gradient(circle at 75% 35%, rgba(120, 60, 200, 0.4), transparent 60%);
}
.hero-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin-bottom: 16px;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 15px rgba(120, 100, 255, 0.5));
}
.hero-kicker {
  font-family: Outfit, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin-bottom: 10px;
}
.hero-card h3 {
  font-family: Outfit, sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
}
.hero-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 22px;
}
.hero-card .cta.ghost {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hero-card .cta.ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(3px);
}

.stats {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 24px 20px;
}
.stat-box {
  padding: 10px 0;
}
.stats strong {
  display: block;
  font-family: Outfit, sans-serif;
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 4px;
}
.stats span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.vision-card {
  display: flex;
  flex-direction: column;
}
.vision-art {
  margin-top: 20px;
  flex: 1;
  min-height: 120px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, transparent, rgba(5, 6, 13, 0.6)),
    radial-gradient(circle at 30% 40%, #7c5cff 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, #ff2bd6 0%, transparent 45%),
    #14182c;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 48px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  background: rgba(5, 6, 13, 0.6);
}
.socials {
  display: flex;
  gap: 16px;
}
.socials a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}
.socials a:hover {
  color: #fff;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  font-family: Outfit, sans-serif;
}
.foot-brand img {
  width: 24px;
  height: 24px;
  mix-blend-mode: screen;
}
.links,
.copy-right {
  white-space: nowrap;
}

/* Modal Overlay */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 4, 10, 0.78);
  display: grid;
  place-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.overlay[hidden] {
  display: none;
}
.modal {
  position: relative;
  width: min(880px, 92vw);
  max-height: 86vh;
  background: #0c1020;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  overflow: auto;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}
.close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}
.close:hover {
  background: rgba(255, 255, 255, 0.12);
}
.modal video,
.modal img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 14px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.modal h3 {
  font-family: Outfit, sans-serif;
  font-size: 28px;
  margin-bottom: 12px;
}
.modal p,
.modal label {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.modal form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.modal input,
.modal textarea {
  width: 100%;
  background: #101628;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
}
.modal input:focus,
.modal textarea:focus {
  outline: none;
  border-color: var(--cyan);
}
.modal textarea {
  min-height: 100px;
  resize: vertical;
}

/* Responsive */
@media (max-width: 1200px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .stats {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (max-width: 960px) {
  .nav {
    padding: 0 20px;
  }
  .nav nav {
    gap: 16px;
  }
  .showcase-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 20px;
  }
  .copy {
    max-width: 100%;
  }
  .stage {
    height: 250px;
  }
  .about-section {
    padding: 60px 20px 80px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Finishing touches for the client presentation */
:root { color-scheme: dark; }
::selection { color: #05060d; background: #75e5ff; }
:focus-visible { outline: 2px solid #7ce7ff; outline-offset: 4px; }
.nav { min-height: 70px; }
.showcase-row { min-height: clamp(300px, 34vh, 410px); padding-right: clamp(20px, 4vw, 60px); }
.copy .idx { color: #9ba6c6; font-size: 30px; letter-spacing: .08em; }
.copy h2 { font-size: clamp(34px, 3.5vw, 48px); letter-spacing: -.035em; }
.copy p { max-width: 27ch; font-size: 13px; }
.stage { height: clamp(260px, 31vh, 350px); }
#stage-logos { height: clamp(250px, 29vh, 330px); }
#stage-ads { height: clamp(270px, 32vh, 360px); }
.about-section, .showcase-row[id] { scroll-margin-top: 70px; }
.nav nav a, .nav-link { transition: color .2s ease, opacity .2s ease; }
.nav nav a:hover, .nav-link:hover { color: #fff; }
.stage-nav { opacity: .84; }
.modal { scrollbar-color: rgba(160,190,255,.3) transparent; }
@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; height: auto; min-height: 64px; padding: 9px 16px 0; }
  .nav nav { grid-column: 1 / -1; grid-row: 2; width: 100%; gap: 22px; overflow-x: auto; padding: 8px 2px 10px; scrollbar-width: none; }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav a, .nav-link { flex: 0 0 auto; }
  .nav > .cta { padding: 9px 13px; font-size: 11px; }
  .showcase-row { min-height: 0; padding: 26px 16px 22px; gap: 8px; }
  .copy { padding-left: 3px; }
  .copy .idx { font-size: 22px; }
  .copy h2 { font-size: 32px; margin-bottom: 4px; }
  .copy p { font-size: 12px; }
  .stage, #stage-logos, #stage-ads { height: 245px; }
  .stage { mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%); }
  .stage-nav { width: 34px; height: 34px; }
  .about-header h2 { font-size: 36px; }
  .foot { padding: 24px 20px; flex-wrap: wrap; justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Keep all three portfolio galleries visible together on laptop screens. */
@media (min-width: 961px) and (min-height: 640px) {
  .nav { height: 68px; min-height: 68px; }
  .showcase-row {
    height: calc((100svh - 68px) / 3);
    min-height: 0;
    padding-block: 6px;
  }
  .stage, #stage-logos, #stage-ads {
    height: min(27vh, 220px);
    min-height: 0;
  }
  .copy .idx { font-size: clamp(20px, 3vh, 28px); margin-bottom: 0; }
  .copy h2 { font-size: clamp(27px, 4vh, 40px); margin-bottom: 5px; }
  .copy p { font-size: clamp(11px, 1.65vh, 13px); }
}
/* Selected media opens in a preview card; the frame stays visible during loading. */
body.modal-open { overflow: hidden; }
.overlay.media-view {
  padding: 24px;
  background: rgba(7, 10, 22, .78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.overlay.media-view .modal {
  width: min(1080px, 92vw);
  height: min(760px, 88vh);
  height: min(760px, 88svh);
  max-height: 88vh;
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(167, 190, 255, .2);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(18, 25, 48, .98), rgba(9, 12, 26, .98));
  box-shadow: 0 30px 100px rgba(0, 0, 0, .58), 0 0 60px rgba(68, 132, 255, .12);
}
.overlay.media-view .modal-body {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.overlay.media-view .modal h3 {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 54px 16px 2px;
  font-size: clamp(20px, 2.4vw, 28px);
}
.overlay.media-view .close {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  font-size: 30px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}
.overlay.media-view .media-frame {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(178, 198, 255, .15);
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(68, 105, 180, .28), transparent 58%),
    linear-gradient(135deg, #202b47, #11182c 58%, #182039);
}
.overlay.media-view .media-content { z-index: 1; }
.overlay.media-view .media-content::-webkit-media-controls { z-index: 4; }
.overlay.media-view .media-content,
.overlay.media-view .media-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 0;
  transition: opacity .3s ease;
}
.overlay.media-view .media-content { z-index: 1; }
.overlay.media-view .media-poster { z-index: 2; opacity: 1; pointer-events: none; }
.overlay.media-view.media-ready .media-content { opacity: 1; }
.overlay.media-view.media-ready .media-poster { opacity: 0; }
.overlay.media-view .media-loading {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 28px);
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: #f5f7ff;
  background: rgba(18, 23, 39, .78);
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  font-size: 13px;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.overlay.media-view.media-ready .media-loading { opacity: 0; visibility: hidden; }
.loading-orbit {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,.28);
  border-top-color: #84eaff;
  border-radius: 50%;
  animation: media-spin .8s linear infinite;
}
@keyframes media-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .overlay.media-view { padding: 12px; }
  .overlay.media-view .modal {
    width: 100%;
    height: min(82vh, 720px);
    height: min(82svh, 720px);
    padding: 18px;
    border-radius: 20px;
  }
  .overlay.media-view .modal h3 { padding: 2px 48px 12px 2px; }
  .overlay.media-view .close { top: 10px; right: 10px; }
  .overlay.media-view .media-frame { border-radius: 13px; }
}
/* Keep gallery cards clean and show ad artwork in full. */
.card .meta { display: none; }
#stage-ads .card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -10px;
  background-image: var(--ad-image);
  background-size: cover;
  background-position: center;
  filter: blur(13px) brightness(.85) saturate(1.25);
  transform: scale(1.08);
}
#stage-ads .card img {
  position: relative;
  z-index: 1;
  object-fit: contain;
  background: transparent;
}
