/* Project Dynasty home League Storylines deck (2026-09-29).
   Replaces the retired mid-page How-to-Join module with a rotating editorial
   feature fed only by the verified league feed. One large image, one headline,
   and one stat line per story. Paired with home-storylines.js. */

.m27-home .m27-storylines {
  overflow: hidden;
}

.m27-home .m27-storylines-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.m27-home .m27-storylines-eyebrow {
  display: block;
  margin-bottom: 2px;
  color: #71717a;
  font-family: var(--pd-font-mono, monospace);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.m27-home .m27-storylines-head h2 {
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.m27-home .m27-storylines-count {
  color: #71717a;
  font-family: var(--pd-font-mono, monospace);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.m27-home .m27-storylines-count b {
  color: #18181b;
}

.m27-home .m27-storyline-deck {
  position: relative;
  min-height: 260px;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #0b0b0f;
}

.m27-home .m27-storyline {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
  text-decoration: none;
  transition: opacity 0.35s ease;
}

.m27-home .m27-storyline.is-active {
  opacity: 1;
  pointer-events: auto;
}

.m27-home .m27-storyline-art,
.m27-home .m27-storyline-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.m27-home .m27-storyline-art img {
  object-fit: cover;
}

.m27-home .m27-storyline-art img.is-hidden {
  display: none;
}

.m27-home .m27-storyline-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 8, 15, 0.94) 0%, rgba(4, 8, 15, 0.6) 46%, rgba(4, 8, 15, 0.14) 100%),
    linear-gradient(0deg, rgba(4, 8, 15, 0.88) 0%, rgba(4, 8, 15, 0) 58%);
}

.m27-home .m27-storyline-mark {
  position: absolute;
  top: 16px;
  right: 18px;
  display: block;
  opacity: 0.92;
}

.m27-home .m27-storyline-mark .team-mark.mark-hero {
  width: 62px;
  height: 62px;
}

.m27-home .m27-storyline-copy {
  position: absolute;
  left: 26px;
  right: 88px;
  bottom: 22px;
  display: grid;
  gap: 6px;
  max-width: 640px;
}

.m27-home .m27-storyline-copy small {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-family: var(--pd-font-mono, monospace);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.m27-home .m27-storyline-copy small::before {
  content: "";
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--team-primary, #c8202f);
}

.m27-home .m27-storyline-copy strong {
  color: #fff;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(24px, 3.1vw, 40px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.02;
  text-transform: uppercase;
}

.m27-home .m27-storyline-copy em {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.m27-home .m27-storyline-go {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 18px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.m27-home .m27-storyline:hover .m27-storyline-go,
.m27-home .m27-storyline:focus-visible .m27-storyline-go {
  background: var(--team-primary, #c8202f);
  transform: translate(2px, -2px);
}

.m27-home .m27-storyline:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.m27-home .m27-storyline-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.m27-home .m27-storyline-dots button {
  width: 22px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d4d4d8;
  cursor: pointer;
  transition: width 0.15s ease, background 0.15s ease;
}

.m27-home .m27-storyline-dots button:hover {
  background: #a1a1aa;
}

.m27-home .m27-storyline-dots button.is-active {
  width: 34px;
  background: var(--team-primary, #c8202f);
}

.m27-home .m27-storyline-dots button:focus-visible {
  outline: 2px solid #2b5fa8;
  outline-offset: 2px;
}

html[data-theme="dark"] .m27-home .m27-storylines-head h2 {
  color: #f4f4f5;
}

html[data-theme="dark"] .m27-home .m27-storylines-count b {
  color: #f4f4f5;
}

html[data-theme="dark"] .m27-home .m27-storyline-dots button {
  background: #3f3f46;
}

html[data-theme="dark"] .m27-home .m27-storyline-dots button:hover {
  background: #52525b;
}

@media (max-width: 820px) {
  .m27-home .m27-storyline-deck {
    min-height: 340px;
    aspect-ratio: 4 / 5;
  }

  .m27-home .m27-storyline-copy {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .m27-home .m27-storyline-copy strong {
    font-size: clamp(22px, 7.4vw, 30px);
  }

  .m27-home .m27-storyline-mark {
    top: 12px;
    right: 12px;
  }

  .m27-home .m27-storyline-mark .team-mark.mark-hero {
    width: 48px;
    height: 48px;
  }

  .m27-home .m27-storyline-go {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m27-home .m27-storyline,
  .m27-home .m27-storyline-go,
  .m27-home .m27-storyline-dots button {
    transition: none;
  }
}
