/* LOST THREADS — FINAL EXPERIENCE POLISH */
:root { --lt-feature-seconds: 13s; }

body::before {
  opacity: .72;
  background-image: url("./brand/thread-motif.svg");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: max(1120px, 100vw) auto;
  mask-image: linear-gradient(to bottom, black 0, rgba(0,0,0,.9) 58%, transparent 96%);
}

.lt-hero {
  position: relative;
  isolation: isolate;
  padding: 10px 0 5px;
}

.lt-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 6%;
  bottom: 22px;
  width: min(46vw, 430px);
  height: 1px;
  background: linear-gradient(90deg,transparent,rgba(215,170,103,.34),rgba(95,184,189,.22),transparent);
  box-shadow: 0 0 18px rgba(215,170,103,.12);
}

.lt-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 15px;
  padding: 6px 10px;
  border: 1px solid rgba(215,170,103,.25);
  border-radius: 999px;
  background: rgba(12,14,20,.44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  letter-spacing: .17em;
}

.lt-hero-label::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(215,170,103,.48);
}

.lt-hero h1 {
  width: fit-content;
  color: var(--text);
  background: linear-gradient(102deg,#fffaf0 8%,#f5efe3 55%,#e6c58e 105%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.18));
}

.lt-hero .subtitle { margin-bottom: 33px; }

.grid > .card > .lt-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lt-card-action > span {
  color: inherit;
  white-space: nowrap;
}

.lt-card-action--external > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lt-action-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin: -4px 3px 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: rgba(245,239,227,.62);
  transform: rotate(45deg);
  transition: transform .2s ease,color .2s ease;
}

.card[aria-expanded="true"] .lt-action-chevron,
#playToggle.is-open .lt-action-chevron {
  color: var(--text);
  transform: translateY(4px) rotate(225deg);
}

.lt-external-arrow {
  margin-left: auto;
  color: rgba(245,239,227,.64);
  font-size: 1rem;
  font-style: normal;
  line-height: 1;
  transition: transform .18s ease,color .18s ease;
}

.lt-service-card--nextcloud:hover .lt-external-arrow {
  color: var(--lt-nextcloud-sky);
  transform: translate(2px,-2px);
}

.lt-service-card--abs[aria-expanded="true"],
.lt-service-card--jellyfin[aria-expanded="true"],
.lt-service-card--play[aria-expanded="true"],
.lt-service-card--play.is-open {
  transform: translateY(-2px);
  background: rgba(27,31,41,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045),0 20px 48px rgba(0,0,0,.32);
}

.lt-service-card--abs[aria-expanded="true"] {
  border-color: rgba(205,157,73,.62);
}

.lt-service-card--jellyfin[aria-expanded="true"] {
  border-color: rgba(0,164,220,.56);
}

.lt-service-card--play[aria-expanded="true"],
.lt-service-card--play.is-open {
  border-color: rgba(125,172,139,.62);
}

.ab-hub:not([hidden]),
.mt-hub:not([hidden]),
.minecraft:not(.hidden) {
  animation: lt-section-reveal .38s cubic-bezier(.2,.72,.25,1) both;
}

@keyframes lt-section-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.lt-featured-stage {
  touch-action: pan-y;
  will-change: opacity,transform;
}

.lt-featured-stage.is-changing-forward {
  opacity: .08;
  transform: translateX(-8px);
}

.lt-featured-stage.is-changing-backward {
  opacity: .08;
  transform: translateX(8px);
}

.lt-feature-card {
  isolation: isolate;
}

.lt-feature-card::before {
  z-index: 1;
  background: linear-gradient(110deg,rgba(7,9,14,.08) 19%,rgba(7,9,14,.78) 55%,rgba(7,9,14,.96));
}

.lt-feature-ambient {
  position: absolute;
  z-index: 0;
  inset: -35%;
  width: 170%;
  height: 170%;
  pointer-events: none;
  object-fit: cover;
  opacity: .12;
  filter: blur(52px) saturate(1.28);
  transform: scale(1.03);
}

.lt-feature-card--movie .lt-feature-ambient { opacity: .14; }
.lt-feature-card--book .lt-feature-ambient { opacity: .11; }

.lt-feature-image-wrap {
  z-index: 2;
  isolation: isolate;
  display: grid;
  place-items: center;
}

.lt-feature-image-backdrop {
  position: absolute;
  z-index: 0;
  inset: -13%;
  width: 126%;
  height: 126%;
  object-fit: cover;
  opacity: .25;
  filter: blur(18px) saturate(1.12);
  transform: scale(1.08);
}

.lt-feature-image {
  position: relative;
  z-index: 1;
}

.lt-feature-card--movie .lt-feature-image {
  object-fit: cover;
}

.lt-feature-card--book .lt-feature-image {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
  border-radius: 5px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.34));
}

.lt-feature-image-wrap.has-image-error::before {
  content: "Artwork unavailable";
  position: relative;
  z-index: 1;
  padding: 12px;
  color: var(--soft);
  font-size: .7rem;
  text-align: center;
}

.lt-feature-copy { z-index: 3; }

.lt-feature-action {
  transition: transform .15s ease,filter .15s ease,border-color .15s ease;
}

.lt-featured-track i.is-running {
  animation-duration: var(--lt-feature-seconds,13s);
}

@media (max-width: 620px) {
  body::before {
    opacity: .54;
    background-position: 44% top;
    background-size: 980px auto;
  }

  .lt-hero { padding-top: 4px; }
  .lt-hero::after { right: 0; bottom: 18px; width: 66vw; }
  .lt-hero-label { margin-bottom: 13px; font-size: .67rem; }
  .lt-hero .subtitle { margin-bottom: 28px; }

  .lt-feature-card--book .lt-feature-image {
    width: calc(100% - 10px);
    height: calc(100% - 10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lt-action-chevron,
  .lt-external-arrow,
  .lt-featured-stage,
  .lt-feature-action {
    transition: none !important;
  }

  .ab-hub:not([hidden]),
  .mt-hub:not([hidden]),
  .minecraft:not(.hidden) {
    animation: none !important;
  }

  .lt-feature-ambient,
  .lt-feature-image-backdrop {
    filter: none;
    opacity: .06;
  }
}
