:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #14181d;
  --panel-2: #1c2328;
  --text: #f5f1e8;
  --muted: #aeb8bc;
  --line: rgba(245, 241, 232, 0.16);
  --amber: #e4a84f;
  --teal: #40b8b4;
  --red: #d85f54;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(5, 7, 9, 0.88), rgba(5, 7, 9, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--amber);
  font-size: 13px;
}

.nav-links {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.hero {
  min-height: 86vh;
  display: flex;
  align-items: center;
  padding: 104px clamp(18px, 5vw, 72px) 76px;
  background:
    linear-gradient(90deg, rgba(5, 7, 9, 0.96) 0%, rgba(5, 7, 9, 0.72) 38%, rgba(5, 7, 9, 0.18) 72%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 13, 16, 0) 26%),
    url("assets/hero-cinema-wall.png") center right / cover no-repeat;
}

.hero-copy {
  max-width: 670px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.search-panel {
  width: min(100%, 620px);
  margin-top: 32px;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 18, 22, 0.78);
  backdrop-filter: blur(14px);
}

input,
select,
button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

input,
select {
  width: 100%;
  background: #0f1317;
  color: var(--text);
  padding: 0 14px;
}

button {
  cursor: pointer;
  background: var(--amber);
  color: #16120a;
  padding: 0 18px;
  font-weight: 800;
}

button:hover,
button:focus-visible {
  filter: brightness(1.08);
}

.toolbar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #101417;
}

.toolbar-inner {
  display: flex;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px clamp(18px, 4vw, 32px);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.segment-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0d10;
}

.segment-control button {
  min-height: 38px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
}

.segment-control button.active {
  background: var(--panel-2);
  color: var(--text);
}

.toolbar select {
  max-width: 220px;
}

.section,
.collections,
.watchlist {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px clamp(18px, 4vw, 32px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.title-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.title-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.poster {
  min-height: 174px;
  padding: 14px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--poster-a), var(--poster-b));
}

.poster span {
  display: inline-block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.title-body {
  padding: 16px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.title-body h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.15;
}

.title-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.collection-grid article {
  border-top: 2px solid var(--amber);
  padding: 22px 0 0;
}

.collection-grid span {
  color: var(--red);
  font-weight: 900;
}

.collection-grid h3 {
  margin: 12px 0 8px;
  font-size: 24px;
}

.collection-grid p,
.watchlist p {
  color: var(--muted);
  line-height: 1.6;
}

.watchlist {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  border-top: 1px solid var(--line);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .title-grid,
  .collection-grid,
  .watchlist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar {
    position: absolute;
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 84vh;
    padding-top: 96px;
    background:
      linear-gradient(90deg, rgba(5, 7, 9, 0.96) 0%, rgba(5, 7, 9, 0.70) 62%, rgba(5, 7, 9, 0.34) 100%),
      linear-gradient(0deg, var(--bg) 0%, rgba(11, 13, 16, 0) 28%),
      url("assets/hero-cinema-wall.png") center right / cover no-repeat;
  }

  h1 {
    max-width: 10ch;
    font-size: 46px;
  }

  .search-row,
  .toolbar-inner,
  .section-heading,
  .watchlist,
  footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .title-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .toolbar select {
    max-width: none;
  }
}
