/* =========================================================
   Jasinski Metal - visual extras
   Dark audio player, pull quotes, section entrance,
   banner glow, film grain.
   Loaded after jasinskimetal.css; remove the <link> in
   index.php to switch all of it off.
   ========================================================= */

/* ---------- Dark audio player ---------- */
.player-row audio {
  display: none;
}

.jm-player {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 8px 0 4px;
  background: linear-gradient(180deg, #1a1718 0%, #0e0d0e 100%);
  border: 1px solid #3a1b0f;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 6px 18px rgba(0, 0, 0, 0.5);
}

.jm-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #cfc8bd;
  cursor: pointer;
}

.jm-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d0663f 0%, #b8502f 45%, #7a3010 100%);
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 0 12px rgba(184, 80, 47, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.jm-play:hover {
  transform: scale(1.06);
  box-shadow: 0 0 18px rgba(184, 80, 47, 0.7);
}

.jm-play .fa-play {
  margin-left: 2px;   /* optical centring of the triangle */
}

.jm-mute {
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
  color: #8f877d;
}

.jm-mute:hover {
  color: #ece7db;
}

.jm-btn:focus-visible,
.jm-bar:focus-visible {
  outline: 2px solid #b8502f;
  outline-offset: 2px;
}

/* Equaliser bars: still when paused, bouncing while playing */
.jm-eq {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 16px;
  height: 14px;
}

.jm-eq span {
  flex: 1;
  height: 25%;
  background: #b8502f;
  border-radius: 1px;
  opacity: 0.5;
}

.jm-player.is-playing .jm-eq span {
  opacity: 1;
  animation: jmEq 0.9s ease-in-out infinite;
}

.jm-player.is-playing .jm-eq span:nth-child(2) { animation-delay: -0.3s; animation-duration: 0.7s; }
.jm-player.is-playing .jm-eq span:nth-child(3) { animation-delay: -0.55s; animation-duration: 1.1s; }
.jm-player.is-playing .jm-eq span:nth-child(4) { animation-delay: -0.15s; animation-duration: 0.8s; }

@keyframes jmEq {
  0%, 100% { height: 20%; }
  50%      { height: 100%; }
}

/* Seek bar */
.jm-bar {
  flex: 1 1 auto;
  min-width: 40px;
  height: 6px;
  position: relative;
  background: #2a2627;
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
}

.jm-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, #7a3010, #d0663f);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(208, 102, 63, 0.6);
}

.jm-fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #ece7db;
  box-shadow: 0 0 6px rgba(208, 102, 63, 0.9);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.jm-bar:hover .jm-fill::after,
.jm-player.is-playing .jm-fill::after {
  opacity: 1;
}

.jm-time {
  flex: 0 0 auto;
  font: 500 0.78rem 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: #8f877d;
  white-space: nowrap;
}

.jm-sep {
  margin: 0 3px;
  opacity: 0.5;
}

/* ---------- Pull quotes (one per section) ---------- */
.layout-container .portfolio-section > p.jm-pull:not(.section-sub) {
  position: relative;
  max-width: 60ch !important;
  margin: 1.6em 0 1.8em !important;
  padding: 6px 0 6px 26px;
  border-left: 3px solid #b8502f;
  font-family: 'Oswald', sans-serif !important;
  font-weight: 500 !important;
  font-size: 1.55rem !important;
  line-height: 1.35 !important;
  letter-spacing: 0.2px;
  color: #ece7db !important;
  text-shadow: 0 0 22px rgba(184, 80, 47, 0.25);
}

/* Source line under a quoted review */
.jm-pull .jm-cite {
  display: block;
  margin-top: 8px;
  font: 600 0.8rem 'Inter', system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a958c;
  text-shadow: none;
}

/* ---------- Embedded videos (e.g. EMGtv in Autumn's End) ---------- */
.layout-container .portfolio-section > .jm-videos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 68ch;
  margin: 0.4em 0 1.6em;
}

.jm-video {
  margin: 0;
}

.jm-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0b0b0c;
  border: 1px solid #2a2829;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}

.jm-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Thumbnail that opens the video on YouTube (for videos that can't play embedded) */
.jm-video-link {
  display: block;
}

.layout-container .portfolio-section .jm-video-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  background: none;
  border: 0;
  animation: none;
  filter: none;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.jm-video-link:hover img {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.jm-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d0663f 0%, #b8502f 45%, #7a3010 100%);
  color: #fff;
  font-size: 1.3rem;
  box-shadow: 0 0 22px rgba(184, 80, 47, 0.6);
}

.jm-video-play i {
  margin-left: 4px;
}

.jm-video-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  font: 600 0.72rem 'Inter', system-ui, sans-serif;
  color: #ece7db;
}

.jm-video figcaption {
  margin-top: 6px;
  font: 500 0.82rem/1.4 'Inter', system-ui, sans-serif;
  color: #9a958c;
}

@media (max-width: 768px) {
  .layout-container .portfolio-section > .jm-videos {
    grid-template-columns: 1fr;
  }
}

/* ---------- Section entrance when switching menu items ---------- */
.layout-container .portfolio-section.active-section {
  animation: jmSectionIn 0.45s ease-out both;
}

@keyframes jmSectionIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Band logo banners: slow ember glow ---------- */
.layout-container .portfolio-section > img {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(184, 80, 47, 0.22) 0%, rgba(184, 80, 47, 0) 60%),
    radial-gradient(circle at 50% 40%, #211f22 0%, #0b0b0c 75%) !important;
  filter: drop-shadow(0 0 14px rgba(184, 80, 47, 0.18));
  animation: jmEmber 6s ease-in-out infinite;
}

@keyframes jmEmber {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(184, 80, 47, 0.12)); }
  50%      { filter: drop-shadow(0 0 22px rgba(184, 80, 47, 0.32)); }
}

/* ---------- About Me: stage photo fading into the page ---------- */
.jm-about-photo {
  float: right;
  width: 46%;
  max-width: 460px;
  margin: -6px -24px 8px 24px;
  shape-outside: inset(0 0 0 8%);
}

.jm-about-photo img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 28%, #000 82%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 66%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 28%, #000 82%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 66%, transparent 100%);
  mask-composite: intersect;
}

/* Active menu item: faint heat glow */
.layout-container #menu-list a.menu-link.active {
  text-shadow: 0 0 12px rgba(184, 80, 47, 0.55);
}

/* ---------- Film grain over everything (very faint, never blocks clicks) ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Phones ---------- */
@media (max-width: 768px) {
  .layout-container .portfolio-section > p.jm-pull:not(.section-sub) {
    font-size: 1.3rem !important;
    padding-left: 18px;
  }

  .jm-time .jm-sep,
  .jm-time #jmDur {
    display: none;   /* just the elapsed time on narrow screens */
  }

  /* Stage photo goes full width above the text */
  .jm-about-photo {
    float: none;
    width: auto;
    max-width: none;
    margin: 0 -12px 4px;
    shape-outside: none;
  }
  .jm-about-photo img {
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 12%, #000 62%, transparent 100%);
    mask-image:
      linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 12%, #000 62%, transparent 100%);
  }
}

/* ---------- Phones: one continuous feed ----------
   Every section shows, one after another in menu order, so the next band
   follows when you reach the bottom of one (js/jasinskimetal.js keeps the
   menu and the #address in step while you scroll). Desktop is unchanged. */
@media (max-width: 768px) {
  .layout-container .portfolio-section {
    display: block !important;
  }
  .layout-container .portfolio-section.active-section {
    animation: none;   /* no fade each time a new band reaches the top */
  }
  .layout-container .portfolio-section + .portfolio-section {
    margin-top: 46px;
    padding-top: 34px;
    border-top: 1px solid #3a1a0a;
  }
  /* a row of links ("Website · Bandcamp · YouTube"): one link per line, no dots */
  .layout-container .portfolio-section > p.jm-links .jm-sep {
    display: none;
  }
  .layout-container .portfolio-section > p.jm-links a {
    display: table;   /* its own line, with the underline only as long as the words */
    margin: 8px 0;
  }
}

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  .layout-container .portfolio-section.active-section,
  .layout-container .portfolio-section > img,
  .jm-player.is-playing .jm-eq span {
    animation: none !important;
  }
}
