/* Starlord — standalone cinematic memorial */

:root {
  --sl-bg: #070605;
  --sl-bg-2: #100e0c;
  --sl-gold: #e8b84a;
  --sl-gold-soft: #f0d392;
  --sl-cream: #f6f0e6;
  --sl-muted: #b7aea0;
  --sl-line: rgba(232, 184, 74, 0.22);
  --sl-serif: "Cormorant Garamond", Georgia, serif;
  --sl-sans: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body.starlord-page {
  margin: 0;
  background: var(--sl-bg);
  color: var(--sl-cream);
  font-family: var(--sl-sans);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--sl-serif);
  font-weight: 600;
  letter-spacing: 0.02em;
}

img { max-width: 100%; }

a { color: var(--sl-gold); text-decoration: none; }
a:hover { color: var(--sl-gold-soft); }

[hidden] { display: none !important; }

.sl-wrap {
  width: min(1180px, calc(100% - 2.4rem));
  margin: 0 auto;
}

/*--------------------------------------------------------------
# Home chip
--------------------------------------------------------------*/
.sl-home {
  position: fixed;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(7, 6, 5, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--sl-cream);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.35s ease, background 0.35s ease, opacity 0.4s ease;
}

.sl-home:hover {
  color: #1a140c;
  background: var(--sl-gold);
  transform: translateX(-2px);
}

body.is-scrolled .sl-home {
  background: rgba(7, 6, 5, 0.82);
}

/*--------------------------------------------------------------
# The film
--------------------------------------------------------------*/
.sl-film {
  position: relative;
  height: 100vh;
  height: 100dvh;
  background: #000;
  overflow: hidden;
  color: #fff;
}

.sl-stage,
.sl-film-video {
  position: absolute;
  inset: 0;
}

.sl-stage {
  z-index: 1;
}

.sl-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.15s ease;
  background: #000;
}

.sl-slide.is-active { opacity: 1; z-index: 1; }

.sl-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.sl-slide.ken-a img { animation: ken-a 7.5s ease-out forwards; }
.sl-slide.ken-b img { animation: ken-b 7.5s ease-out forwards; }
.sl-slide.ken-c img { animation: ken-c 7.5s ease-out forwards; }
.sl-slide.ken-d img { animation: ken-d 7.5s ease-out forwards; }

@keyframes ken-a {
  from { transform: scale(1.14) translate(2.2%, 1.4%); }
  to   { transform: scale(1.02) translate(0, 0); }
}
@keyframes ken-b {
  from { transform: scale(1.02) translate(0, 0); }
  to   { transform: scale(1.14) translate(-2.4%, 1.2%); }
}
@keyframes ken-c {
  from { transform: scale(1.12) translate(-1.6%, -1.4%); }
  to   { transform: scale(1.03) translate(1.4%, 0.6%); }
}
@keyframes ken-d {
  from { transform: scale(1.18) translate(0, 2%); }
  to   { transform: scale(1.04) translate(0, -0.8%); }
}

.sl-film-video {
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background: #000;
}

.sl-film.is-video .sl-film-video {
  opacity: 1;
}

.sl-letterbox {
  position: absolute;
  left: 0;
  right: 0;
  height: 7vh;
  background: #000;
  z-index: 5;
  pointer-events: none;
}
.sl-letterbox-top { top: 0; }
.sl-letterbox-bottom { bottom: 0; }

.sl-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, transparent 22%, transparent 58%, rgba(0, 0, 0, 0.72) 100%);
}

.sl-grain {
  position: absolute;
  inset: -40%;
  z-index: 4;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.55s steps(4) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -1%); }
  75% { transform: translate(-1%, -3%); }
  100% { transform: translate(0, 0); }
}

.sl-titlecard,
.sl-endcard,
.sl-chapter {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  pointer-events: none;
}

.sl-titlecard {
  background: rgba(0, 0, 0, 0.28);
  animation: title-in 1.6s ease both;
}

.sl-titlecard.is-out {
  animation: fade-out 0.9s ease forwards;
}

.sl-hero-emote {
  width: 86px;
  height: 86px;
  object-fit: contain;
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55));
  animation: float-emote 4.2s ease-in-out infinite;
}

.sl-kicker {
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  color: var(--sl-gold);
  margin: 0 0 0.85rem;
}

.sl-titlecard h1 {
  font-size: clamp(3.6rem, 12vw, 8rem);
  line-height: 0.88;
  margin: 0 0 0.55rem;
  color: #f3e27a;
  text-shadow: 0 10px 50px rgba(0, 0, 0, 0.55);
  animation: title-track 2.4s ease both;
}

.sl-dates {
  font-family: var(--sl-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  margin: 0;
  opacity: 0;
  animation: fade-up 1.1s ease 0.7s both;
}

.sl-chapter span,
.sl-endcard h2 {
  font-family: var(--sl-serif);
  font-size: clamp(3.4rem, 10vw, 7rem);
  color: #fff;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.sl-chapter {
  background: rgba(0, 0, 0, 0.18);
}

.sl-chapter.is-on span {
  animation: chapter-pop 2.1s ease both;
}

.sl-endcard {
  background: rgba(0, 0, 0, 0.46);
}

@keyframes title-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes title-track {
  from { letter-spacing: 0.28em; opacity: 0; }
  to { letter-spacing: 0.02em; opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-out {
  to { opacity: 0; visibility: hidden; }
}
@keyframes chapter-pop {
  0% { opacity: 0; transform: scale(1.12); filter: blur(8px); }
  25% { opacity: 1; transform: scale(1); filter: none; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.96); }
}
@keyframes float-emote {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.sl-film-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8.5vh;
  z-index: 7;
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.sl-caption {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
  min-height: 1.6rem;
}

.sl-now-year {
  font-family: var(--sl-serif);
  font-size: 2rem;
  color: var(--sl-gold);
  line-height: 1;
}

.sl-now-label {
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 240, 230, 0.78);
}

.sl-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  margin-bottom: 0.7rem;
  overflow: hidden;
}

.sl-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--sl-gold);
  transform-origin: left center;
}

.sl-film.is-playing .sl-progress i {
  animation: none;
}

.sl-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sl-rail {
  flex: 1;
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.sl-rail::-webkit-scrollbar { display: none; }

.sl-year-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(246, 240, 230, 0.4);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.sl-year-btn.is-active {
  color: var(--sl-gold);
  border-bottom-color: var(--sl-gold);
}

.sl-buttons { display: flex; gap: 0.35rem; }

.sl-btn {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sl-btn:hover,
.sl-btn-play {
  background: var(--sl-gold);
  color: #1a140c;
  border-color: var(--sl-gold);
}

.sl-btn:active { transform: scale(0.94); }

.sl-scroll {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 1.5vh;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: bob 1.6s ease-in-out infinite;
}

.sl-scroll i { font-size: 1.15rem; }

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/*--------------------------------------------------------------
# Page sections
--------------------------------------------------------------*/
.sl-section { padding: 5.5rem 0; }
.sl-section.alt { background: var(--sl-bg-2); }

.sl-head {
  text-align: center;
  margin-bottom: 2.6rem;
}

.sl-head span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.72rem;
  color: var(--sl-gold);
  margin-bottom: 0.6rem;
}

.sl-head h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  margin: 0 0 0.65rem;
}

.sl-head p {
  color: var(--sl-muted);
  max-width: 38rem;
  margin: 0 auto;
  line-height: 1.6;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.sl-story {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.6rem;
  align-items: start;
}

.sl-story-copy p {
  color: var(--sl-muted);
  font-size: 1.08rem;
  line-height: 1.8;
  margin: 0 0 1.1rem;
}

.sl-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.sl-fact {
  border: 1px solid var(--sl-line);
  background: rgba(232, 184, 74, 0.05);
  padding: 0.95rem 0.85rem;
  border-radius: 12px;
}

.sl-fact strong {
  display: block;
  font-family: var(--sl-serif);
  font-size: 1.4rem;
  color: var(--sl-gold);
}

.sl-fact span { color: var(--sl-muted); font-size: 0.84rem; }

.sl-story-mosaic {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: 230px 200px;
  gap: 0.7rem;
}

.sl-story-mosaic a,
.sl-story-mosaic .sl-live {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  height: 100%;
  background: #000;
}

.sl-story-mosaic a:first-child,
.sl-story-mosaic .sl-live:first-child {
  grid-row: 1 / span 2;
}

.sl-story-mosaic img,
.sl-story-mosaic video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.sl-story-mosaic a:hover img { transform: scale(1.06); }

/*--------------------------------------------------------------
# Collections
--------------------------------------------------------------*/
.sl-collection {
  margin-top: 3.4rem;
}

.sl-collection:first-child { margin-top: 0; }

.sl-collection h3 {
  font-size: 2rem;
  margin: 0 0 0.4rem;
}

.sl-collection p {
  color: var(--sl-muted);
  max-width: 44rem;
  margin: 0 0 1.2rem;
  line-height: 1.65;
}

.sl-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.sl-strip a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 5;
  background: #111;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
}

.sl-collection.in .sl-strip a {
  animation: card-in 0.7s ease forwards;
}

.sl-collection.in .sl-strip a:nth-child(1) { animation-delay: 0.05s; }
.sl-collection.in .sl-strip a:nth-child(2) { animation-delay: 0.12s; }
.sl-collection.in .sl-strip a:nth-child(3) { animation-delay: 0.19s; }
.sl-collection.in .sl-strip a:nth-child(4) { animation-delay: 0.26s; }
.sl-collection.in .sl-strip a:nth-child(5) { animation-delay: 0.33s; }
.sl-collection.in .sl-strip a:nth-child(6) { animation-delay: 0.4s; }
.sl-collection.in .sl-strip a:nth-child(7) { animation-delay: 0.47s; }
.sl-collection.in .sl-strip a:nth-child(8) { animation-delay: 0.54s; }

@keyframes card-in {
  to { opacity: 1; transform: none; }
}

.sl-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.sl-strip a:hover img { transform: scale(1.08); }

.sl-strip a:nth-child(3),
.sl-strip a:nth-child(6) {
  aspect-ratio: 16 / 11;
  align-self: end;
}

/*--------------------------------------------------------------
# Videos
--------------------------------------------------------------*/
.sl-videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.sl-video {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  aspect-ratio: 16 / 10;
}

.sl-video img,
.sl-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.sl-video:hover img { transform: scale(1.05); }

.sl-video .play {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sl-gold);
  color: #1a140c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transform: scale(0.92);
  transition: transform 0.25s ease;
}

.sl-video:hover .play { transform: scale(1); }

.sl-video .when {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 10px #000;
}

/*--------------------------------------------------------------
# Archive
--------------------------------------------------------------*/
.sl-years {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.7rem;
}

.sl-chip {
  appearance: none;
  border: 1px solid var(--sl-line);
  background: transparent;
  color: var(--sl-muted);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.sl-chip.is-active,
.sl-chip:hover {
  color: #1a140c;
  background: var(--sl-gold);
  border-color: var(--sl-gold);
}

.sl-archive {
  columns: 4;
  column-gap: 0.65rem;
}

.sl-archive a {
  display: block;
  break-inside: avoid;
  margin-bottom: 0.65rem;
  overflow: hidden;
  border-radius: 10px;
}

.sl-archive img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s ease;
}

.sl-archive a:hover img { transform: scale(1.04); }
.sl-archive a.is-hidden { display: none; }

/*--------------------------------------------------------------
# Close + footer
--------------------------------------------------------------*/
.sl-close { position: relative; overflow: hidden; }

.sl-close-photo { position: relative; min-height: 78vh; }

.sl-close-photo img {
  width: 100%;
  height: 78vh;
  object-fit: cover;
  display: block;
  animation: ken-b 24s ease-in-out infinite alternate;
}

.sl-close-photo:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 6, 5, 0.15), rgba(7, 6, 5, 0.9));
}

.sl-close-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  text-align: center;
  padding: 3rem 1.25rem 3.6rem;
}

.sl-close-copy h2 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  margin: 0 0 0.7rem;
}

.sl-close-copy p {
  max-width: 36rem;
  margin: 0 auto 0.45rem;
  color: var(--sl-muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.sl-close-copy em { color: var(--sl-gold-soft); }

.sl-footer {
  text-align: center;
  padding: 1.6rem 1rem 2rem;
  color: var(--sl-muted);
  font-size: 0.88rem;
}

.sl-footer p { margin: 0.2rem 0; }

.sl-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--sl-gold);
  color: #1a140c;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  font-size: 1.4rem;
}

.sl-top.is-on {
  opacity: 1;
  visibility: visible;
}

/* Used on the main site About row */
.starlord-emote {
  height: 1.35em;
  width: auto;
  vertical-align: middle;
  margin: 0 0.2em;
}

.cat-dad-link {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15em;
  color: inherit;
}

.cat-dad-link:hover { color: #ffb727; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 991px) {
  .sl-story,
  .sl-videos,
  .sl-strip { grid-template-columns: 1fr 1fr; }
  .sl-archive { columns: 3; }
  .sl-facts { grid-template-columns: 1fr; }
  .sl-letterbox { height: 4.5vh; }
  .sl-film-ui { bottom: 6.5vh; }
}

@media (max-width: 640px) {
  .sl-home span { display: none; }
  .sl-titlecard h1 { font-size: 3.3rem; }
  .sl-hero-emote { width: 64px; height: 64px; }
  .sl-story,
  .sl-videos,
  .sl-strip,
  .sl-facts { grid-template-columns: 1fr; }
  .sl-story-mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 190px 150px;
  }
  .sl-story-mosaic a:first-child,
  .sl-story-mosaic .sl-live:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .sl-archive { columns: 2; }
  .sl-section { padding: 3.4rem 0; }
  .sl-scroll span { display: none; }
  .sl-now-year { font-size: 1.45rem; }
}
