/* Medusa services showcase (home page, under Project Management): a red glass panel with the
   "Founder & General Manager for Medusa" bar and a 3D carousel of the Medusa services.
   Positions of the cards are set by js/medusa-services-showcase.js. */
.mshow {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: clamp(28px, 4vw, 64px); padding: clamp(18px, 3.2vw, 52px) clamp(14px, 3.2vw, 52px) clamp(22px, 3vw, 44px);
  border-radius: clamp(18px, 2vw, 30px); color: #fff;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, #ff8f8a 0%, #e5383b 18%, transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 108%, #2e0103 0%, transparent 70%),
    linear-gradient(180deg, #c0161d 0%, #9c0d13 45%, #6f060b 100%);
  box-shadow: 0 30px 80px rgba(80, 4, 8, .35);
}
/* Light rays from the top and a glossy floor */
.mshow::before {
  content: ''; position: absolute; inset: -20% -10% 30%; z-index: -1; pointer-events: none; opacity: .55;
  background: repeating-conic-gradient(from 180deg at 50% 0%, rgba(255, 255, 255, .16) 0deg 3deg, transparent 3deg 11deg);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 0%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 60% 80% at 50% 0%, #000 0%, transparent 75%);
  animation: mshow-rays 18s ease-in-out infinite alternate;
}
.mshow::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 32%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .06) 40%, rgba(20, 0, 2, .35));
}
@keyframes mshow-rays { to { transform: rotate(4deg) scale(1.05); } }

/* Glass bar: Founder & General Manager for [Medusa logo] */
.mshow__bar {
  display: flex; align-items: center; justify-content: space-between; gap: clamp(14px, 3vw, 48px);
  padding: clamp(14px, 2vw, 26px) clamp(18px, 3.4vw, 54px); border-radius: clamp(14px, 1.4vw, 22px);
  border: 1px solid rgba(255, 255, 255, .5); color: #fff; text-decoration: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .34), rgba(255, 220, 220, .16) 55%, rgba(255, 255, 255, .26));
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 18px 40px rgba(60, 0, 4, .25);
  transition: background .4s, transform .4s;
}
.mshow__bar:hover { background: linear-gradient(115deg, rgba(255, 255, 255, .42), rgba(255, 230, 230, .22) 55%, rgba(255, 255, 255, .32)); }
.mshow__bar:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.mshow__role { margin: 0; font: 400 clamp(12px, 1.2vw, 18px)/1.5 var(--_font-default); letter-spacing: .32em; text-transform: uppercase; color: #120a0b; }
.mshow__brand { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 40px); margin-left: auto; }
.mshow__logo { display: block; height: clamp(54px, 7.4vw, 118px); width: auto; filter: drop-shadow(0 4px 14px rgba(255, 255, 255, .25)); }
.mshow__arrow { width: clamp(26px, 2.6vw, 42px); height: auto; flex: none; color: #120a0b; transition: transform .35s; }
.mshow__bar:hover .mshow__arrow { transform: translate(4px, -4px); }

/* Carousel */
.mshow__carousel { position: relative; margin-top: clamp(24px, 3.4vw, 56px); outline: none; }
.mshow__stage { position: relative; height: var(--mshow-h, 480px); perspective: 1600px; touch-action: pan-y; }
.mshow__card {
  position: absolute; left: 50%; top: 50%; margin: 0; list-style: none; overflow: hidden; cursor: pointer;
  border-radius: clamp(14px, 1.4vw, 22px); border: 1px solid rgba(255, 255, 255, .55);
  background: linear-gradient(115deg, rgba(255, 244, 242, .95), rgba(250, 226, 224, .9));
  box-shadow: 0 30px 60px rgba(50, 0, 4, .38), inset 0 1px 0 rgba(255, 255, 255, .8);
  transform-style: preserve-3d; will-change: transform;
  transition: transform .75s cubic-bezier(.22, .8, .2, 1), width .75s cubic-bezier(.22, .8, .2, 1), height .75s cubic-bezier(.22, .8, .2, 1), opacity .5s, filter .5s;
}
.mshow__card.is-active { cursor: default; }
.mshow__card:not(.is-active) { filter: saturate(.9) brightness(.92); }
/* Full layout (active card): text on the left, picture on the right */
.mshow__full { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; transition: opacity .45s; }
.mshow__card:not(.is-active) .mshow__full { opacity: 0; pointer-events: none; }
.mshow__text { display: flex; flex-direction: column; justify-content: center; padding: clamp(22px, 4vw, 64px) clamp(18px, 3.6vw, 56px); color: #1d0f10; }
.mshow__eyebrow { margin: 0 0 clamp(12px, 1.6vw, 24px); font: 400 clamp(10px, .85vw, 13px)/1.4 var(--_font-default); letter-spacing: .3em; text-transform: uppercase; color: #a1161d; }
.mshow__title { margin: 0 0 clamp(12px, 1.4vw, 20px); font: 500 clamp(26px, 3.7vw, 64px)/1 var(--_font-default); letter-spacing: -.02em; color: #1d0f10; }
.mshow__desc { margin: 0 0 clamp(18px, 2.2vw, 34px); max-width: 34ch; font: 400 clamp(13px, 1.1vw, 18px)/1.5 var(--_font-accent); color: #3a2a2b; }
.mshow__btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; padding: clamp(11px, 1vw, 16px) clamp(18px, 1.8vw, 30px);
  border-radius: 999px; color: #fff; text-decoration: none; font: 500 clamp(13px, 1.05vw, 17px)/1 var(--_font-default);
  background: linear-gradient(180deg, #b0141b, #7d070c); box-shadow: 0 10px 24px rgba(125, 7, 12, .4), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .3s, box-shadow .3s;
}
.mshow__btn svg { width: 16px; height: 16px; transition: transform .3s; }
.mshow__btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(125, 7, 12, .5), inset 0 1px 0 rgba(255, 255, 255, .25); }
.mshow__btn:hover svg { transform: translate(3px, -3px); }
.mshow__btn:focus-visible { outline: 2px solid #7d070c; outline-offset: 3px; }
.mshow__media { position: relative; margin: 0; overflow: hidden; background: radial-gradient(circle at 50% 45%, #f6dcd8, #d9b3ae); }
.mshow__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The service posters carry their own title: shown whole, on the ivory of their own background. */
.mshow__media--poster { background: #f7f1ec; }
.mshow__media--poster img { object-fit: contain; }
/* Compact layout (side cards): the picture with the service name over it */
.mshow__mini { position: absolute; inset: 0; transition: opacity .45s; }
.mshow__card.is-active .mshow__mini { opacity: 0; pointer-events: none; }
.mshow__mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mshow__card[data-side="right"] .mshow__mini span { text-align: right; }
/* On the side cards a poster shows its picture, below its own title, so the two titles never overlap. */
.mshow__mini--poster img { transform: scale(1.75); transform-origin: 50% 80%; }
.mshow__mini::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(120, 10, 16, .55), rgba(120, 10, 16, .1) 55%, rgba(255, 255, 255, .08)); }
.mshow__mini span { position: absolute; left: 0; right: 0; top: 10%; z-index: 1; padding: 0 10%; font: 400 clamp(13px, 1.35vw, 24px)/1.1 var(--_font-default); color: #fff; text-shadow: 0 2px 12px rgba(60, 0, 4, .6); }

/* Controls */
.mshow__controls { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2.6vw, 40px); margin-top: clamp(18px, 2.4vw, 36px); }
.mshow__arrowbtn {
  display: grid; place-items: center; width: clamp(46px, 4.2vw, 62px); aspect-ratio: 1; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .06); color: #fff; transition: background .3s, transform .3s;
}
.mshow__arrowbtn svg { width: 22px; height: 22px; }
.mshow__arrowbtn:hover { background: rgba(255, 255, 255, .18); transform: scale(1.05); }
.mshow__arrowbtn:focus-visible, .mshow__dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mshow__dots { display: flex; align-items: center; gap: 14px; }
.mshow__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; transition: transform .3s, background .3s, box-shadow .3s; }
.mshow__dot[aria-current="true"] { width: 12px; height: 12px; background: #ff2a2a; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 0 14px rgba(255, 60, 60, .8); }
.mshow__count { margin: clamp(10px, 1.2vw, 16px) 0 0; text-align: center; font: 400 12px/1 var(--_font-default); letter-spacing: .3em; color: rgba(255, 255, 255, .75); }

/* Phones: one card, picture on top, text below */
@media (max-width: 767px) {
  .mshow__bar { flex-direction: column; align-items: flex-start; }
  .mshow__brand { margin-left: 0; width: 100%; justify-content: space-between; }
  .mshow__full { grid-template-columns: 1fr; grid-template-rows: 44% 1fr; }
  .mshow__media { order: -1; }
  .mshow__text { justify-content: flex-start; padding: 20px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .mshow::before { animation: none; }
  .mshow__card, .mshow__full, .mshow__mini { transition: none; }
}
