:root {
  --blue: #2563eb;
  --ink: #1d1d1f;
  --paper: #f5f5f7;
  --muted: rgba(29, 29, 31, .62);
  --line: rgba(0, 0, 0, .08);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; overflow-x: clip; background: #fff; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font: inherit; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  height: 64px;
  padding: 0 max(32px, calc((100vw - 1376px) / 2 + 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-links .active { color: var(--blue); font-weight: 500; }
.nav-cta { padding: 8px 16px; border-radius: 980px; background: var(--blue); color: #fff; font-weight: 500; }

.content-hero {
  padding: 76px max(32px, calc((100vw - 1214px) / 2)) 40px;
}
.content-hero h1 {
  margin: 0;
  font-size: clamp(44px, 5vw, 66px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.05em;
}
.content-hero p { margin: 14px 0 30px; color: var(--muted); font-size: 17px; }
.collection-links { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; }
.collection-links::-webkit-scrollbar { display: none; }
.collection-links a {
  padding: 10px 15px;
  flex: 0 0 auto;
  border-radius: 980px;
  background: var(--paper);
  color: rgba(29,29,31,.76);
  font-size: 13px;
  font-weight: 500;
}
.collection-links a:hover { background: #e8e8eb; }

.catalog { padding: 38px max(32px, calc((100vw - 1214px) / 2)) 10px; }
.collection-section { margin-bottom: 88px; scroll-margin-top: 90px; }
.rail-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}
.rail-heading h2 {
  margin: 0;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.045em;
}
.rail-heading span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.rail-buttons { display: flex; gap: 8px; }
.rail-buttons button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; font-size: 18px; }
.rail-buttons button:hover { background: #e7e7ea; }
.episode-rail {
  margin-right: calc(-1 * max(32px, calc((100vw - 1214px) / 2)));
  padding-right: max(32px, calc((100vw - 1214px) / 2));
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.episode-rail::-webkit-scrollbar { display: none; }
.episode-card {
  width: 268px;
  overflow: hidden;
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: 16px;
  background: #0062ad;
  color: #fff;
  border: 1px solid rgba(0,0,0,.07);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.episode-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.episode-card img, .art-placeholder { height: 268px; }
.episode-card > div:last-child { min-height: 148px; padding: 16px; display: flex; flex-direction: column; gap: 7px; }
.episode-card h3 { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.25; letter-spacing: -.02em; }
.episode-card p { margin: 0; color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.4; }
.episode-card .episode-meta {
  margin-top: auto;
  padding: 6px 10px;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  border-radius: 20px;
  background: rgba(20,20,20,.32);
  color: rgba(255,255,255,.76);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}
.episode-card .episode-meta b { color: #fff; font-weight: 600; }
.art-placeholder { padding: 22px; display: flex; align-items: flex-end; color: #fff; }
.art-placeholder strong { font-size: 38px; font-weight: 500; line-height: .96; letter-spacing: -.055em; }
.episode-card.places { background: #b66a12; }
.episode-card.people { background: #7c3f86; }
.episode-card.animals { background: #087f5b; }
.episode-card.machines { background: #1767b0; }
.episode-card.stories { background: #9e49c5; }
.awaiting-art .art-placeholder { background: rgba(255,255,255,.08); }
.placeholder-card.green { background: #087f5b; } .placeholder-card.blue { background: #2563eb; } .placeholder-card.rust { background: #b45309; }
.placeholder-card.violet { background: #7e22ce; } .placeholder-card.navy { background: #1e3a8a; } .placeholder-card.orange { background: #ea580c; }
.placeholder-card.aqua { background: #0f766e; } .placeholder-card.space { background: #312e81; } .placeholder-card.sky { background: #0284c7; }
.placeholder-card.red { background: #be123c; } .placeholder-card.gold { background: #a16207; } .placeholder-card.cobalt { background: #1d4ed8; }
.placeholder-card.midnight { background: #172554; } .placeholder-card.pink { background: #be185d; }

.footer {
  min-height: 150px;
  padding: 44px max(32px, calc((100vw - 1214px) / 2));
  display: flex;
  align-items: center;
  gap: 32px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.footer p { margin: 0 auto 0 0; color: var(--muted); font-size: 14px; }
.footer nav { display: flex; gap: 20px; font-size: 13px; font-weight: 500; }

@media (max-width: 720px) {
  .nav { height: 58px; padding: 0 16px; }
  .nav-links { gap: 10px; }
  .nav-links a:not(.nav-cta):not(.active) { display: none; }
  .nav-links .active { font-size: 12px; }
  .nav-cta { padding: 8px 11px; font-size: 12px; }
  .content-hero { padding: 44px 18px 24px; }
  .content-hero h1 { font-size: 44px; }
  .content-hero p { margin: 10px 0 24px; font-size: 15px; }
  .collection-links { margin-right: -18px; padding-right: 18px; }
  .collection-links a { padding: 9px 13px; font-size: 12px; }
  .catalog { padding: 34px 18px 4px; }
  .collection-section { margin-bottom: 58px; }
  .rail-heading { margin-bottom: 16px; align-items: flex-end; gap: 12px; }
  .rail-heading h2 { font-size: 31px; }
  .rail-heading span { margin-top: 6px; max-width: 315px; font-size: 12px; }
  .rail-buttons { display: none; }
  .episode-rail { margin-right: -18px; padding-right: 18px; gap: 11px; }
  .episode-card { width: 224px; border-radius: 14px; }
  .episode-card img, .art-placeholder { height: 224px; }
  .episode-card > div:last-child { min-height: 138px; padding: 14px; }
  .episode-card h3 { font-size: 18px; }
  .episode-card p { font-size: 12px; }
  .art-placeholder { padding: 18px; }
  .art-placeholder strong { font-size: 32px; }
  .footer { padding: 34px 18px; align-items: flex-start; flex-direction: column; gap: 14px; }
  .footer p { margin: 0; }
  .footer nav { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
