@view-transition {
  navigation: auto;
}

:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --bg-soft: #12141a;
  --bg-card: #181b22;
  --ink: #f4efe6;
  --muted: #9b9488;
  --faint: #6f6a62;
  --line: rgba(244, 239, 230, 0.1);
  --accent: #e8a060;
  --accent-2: #ff7a59;
  --accent-soft: rgba(232, 160, 96, 0.14);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --header-h: 3.6rem;
  --radius: 16px;
  --page: min(72rem, calc(100% - 2rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 480px at 12% -10%, rgba(232, 160, 96, 0.08), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(255, 122, 89, 0.05), transparent 50%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.015) 2px,
    rgba(255, 255, 255, 0.015) 3px
  );
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 40;
  padding: 0.45rem 0.8rem;
  background: var(--accent);
  color: #1a1208;
  font-weight: 650;
  border-radius: 999px;
}

.skip-link:focus {
  left: 0.75rem;
  color: #1a1208;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 16, 0.88);
  backdrop-filter: blur(16px);
}

.site-header-inner,
.wrap,
.site-footer-inner {
  width: var(--page);
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.05rem;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark-mark {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.wordmark-movie {
  color: var(--accent);
}

.header-note {
  color: var(--faint);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

main {
  width: var(--page);
  margin: 0 auto;
  padding: 2.25rem 0 4rem;
}

.hero {
  padding: 1.25rem 0 2.25rem;
  max-width: 40rem;
}

.eyebrow,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 0.85rem;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
}

h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.lede,
.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 38rem;
}

.letter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0 0 1.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.letter-nav a,
.letter-nav span {
  min-width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.letter-nav a {
  color: var(--ink);
  background: var(--bg-card);
}

.letter-nav a:hover {
  background: var(--accent);
  color: #1a1208;
}

.letter-nav span {
  color: var(--faint);
}

.letter-group {
  margin-bottom: 2rem;
}

.letter-group h2 {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--sans);
}

.poster-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1.15rem 0.9rem;
}

.poster-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
  animation: rise 0.55s ease both;
}

.poster-card img,
.poster img,
.no-poster {
  border-radius: 10px;
  background: #111318;
  box-shadow: var(--shadow);
}

.poster-card img,
.no-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

.poster-card:hover {
  color: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .poster-card,
  .rec-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }

  .poster-card:hover,
  .rec-card:hover {
    transform: translateY(-6px);
  }

  .poster-card:hover img {
    filter: brightness(1.08);
  }
}

.poster-card .title {
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.poster-card .year {
  color: var(--muted);
  font-weight: 500;
}

.seed-hero {
  display: grid;
  grid-template-columns: 13.5rem 1fr;
  gap: 1.75rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.seed-hero .poster img,
.seed-hero .no-poster {
  width: 13.5rem;
  height: auto;
  aspect-ratio: 2 / 3;
}

.crumbs {
  margin: 0 0 0.85rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--accent);
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.45rem;
  color: var(--faint);
}

.seed-overview {
  margin: 1rem 0 0;
  color: var(--muted);
  max-width: 40rem;
}

.recs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.rec-card {
  display: grid;
  grid-template-columns: 7.6rem 1fr;
  gap: 1.2rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: rise 0.55s ease both;
}

.rec-card:nth-child(1) { animation-delay: 0.04s; }
.rec-card:nth-child(2) { animation-delay: 0.08s; }
.rec-card:nth-child(3) { animation-delay: 0.12s; }
.rec-card:nth-child(4) { animation-delay: 0.16s; }
.rec-card:nth-child(5) { animation-delay: 0.2s; }
.rec-card:nth-child(6) { animation-delay: 0.24s; }
.rec-card:nth-child(7) { animation-delay: 0.28s; }
.rec-card:nth-child(8) { animation-delay: 0.32s; }
.rec-card:nth-child(9) { animation-delay: 0.36s; }
.rec-card:nth-child(10) { animation-delay: 0.4s; }

.poster-wrap {
  position: relative;
}

.poster-wrap img,
.poster-wrap .no-poster {
  width: 7.6rem;
  height: 11.4rem;
  object-fit: cover;
  display: block;
}

.no-poster {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 0.82rem;
  text-align: center;
  padding: 0.6rem;
}

.rank-badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111318;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  font-size: 0.78rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.info h2 {
  font-family: var(--sans);
  font-size: 1.18rem;
  margin-bottom: 0.45rem;
}

.info h2 a {
  color: inherit;
  text-decoration: none;
}

.info h2 a:hover {
  color: var(--accent);
}

.year {
  font-weight: 500;
  color: var(--muted);
}

.fit-pill {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.65rem;
}

.fit-label {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: 0.92rem;
}

.fit-track {
  flex: 1;
  max-width: 11rem;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.08);
  overflow: hidden;
}

.fit-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  animation: fit-fill 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.why-match {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.overview {
  margin: 0;
  color: var(--ink);
  opacity: 0.88;
}

.empty {
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  color: var(--muted);
}

.more-lists {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.more-lists h2 {
  margin-bottom: 1rem;
}

.faq {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.faq h2 {
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
}

.faq article {
  margin-bottom: 1.15rem;
  max-width: 42rem;
}

.faq h3 {
  font-size: 1.02rem;
  margin: 0 0 0.3rem;
}

.faq p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer-inner {
  display: grid;
  gap: 1rem;
}

.how-short {
  margin: 0;
  max-width: 40rem;
}

.tmdb-credit {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
}

.tmdb-credit img {
  height: 1.35rem;
  width: auto;
}

.brand-foot {
  margin: 0;
  color: var(--faint);
}

.brand-foot a {
  color: inherit;
  text-decoration: none;
}

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

@keyframes fit-fill {
  to {
    width: calc(var(--fit, 0) * 1%);
  }
}

@media (max-width: 720px) {
  :root {
    --page: min(72rem, calc(100% - 1.25rem));
  }

  .header-note {
    display: none;
  }

  .seed-hero,
  .rec-card {
    grid-template-columns: 1fr;
  }

  .seed-hero .poster img,
  .seed-hero .no-poster,
  .poster-wrap img,
  .poster-wrap .no-poster {
    width: 7.5rem;
    height: 11.25rem;
  }

  h1 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .fit-fill {
    width: calc(var(--fit, 0) * 1%);
  }
}
