:root {
  color-scheme: dark;
  --bg: #090b0a;
  --surface: #111412;
  --surface-raised: #171a18;
  --line: #303633;
  --line-soft: #202522;
  --text: #f1f2ee;
  --muted: #a9afab;
  --gold: #d1ad55;
  --blue: #9eb6c6;
  --wine: #9e6d76;
  --content: 1540px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  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;
}

button, video { font: inherit; }

button { color: inherit; }

.site-header,
.feature,
.library,
footer {
  width: min(var(--content), calc(100% - 64px));
  margin-inline: auto;
}

.site-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
  color: var(--text);
  text-decoration: none;
}

.brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
}

.brand small,
.review-label,
.kicker,
.clip-count,
.clip-id,
.clip-meta {
  margin: 0;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.4;
  text-transform: uppercase;
}

.brand small,
.review-label,
.clip-count,
.clip-meta { color: var(--muted); }

.feature { padding: 24px 0 54px; }

.feature-media {
  height: min(64svh, 760px);
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #020302;
  border-bottom: 1px solid var(--line);
}

.feature-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020302;
}

.feature-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
  gap: 56px;
  align-items: end;
  padding-top: 25px;
}

.kicker,
.clip-id { color: var(--gold); }

h1,
h2,
h3,
p { overflow-wrap: anywhere; }

h1 {
  max-width: 920px;
  margin: 7px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(43px, 6.5vw, 94px);
  font-weight: 400;
  line-height: 0.94;
}

.feature-description {
  max-width: 630px;
  margin: 0;
  color: #ced2cf;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
}

.library { padding: 42px 0 80px; }

.library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 24px;
}

.library-heading h2 {
  margin: 7px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 400;
  line-height: 1;
}

.tabs {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.library-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.library-note p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.library-note strong { color: var(--text); }

.tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 0 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.tab::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: transparent;
}

.tab:hover,
.tab:focus-visible,
.tab.is-active { color: var(--text); }

.tab.is-active::after { background: var(--gold); }

.clip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
  padding-top: 28px;
}

.clip-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.clip-card[hidden] { display: none; }

.clip-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: #020302;
  cursor: pointer;
}

.clip-media img:first-child {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 240ms ease, filter 240ms ease;
}

.clip-media:hover img:first-child,
.clip-media:focus-visible img:first-child {
  transform: scale(1.018);
  filter: brightness(1.08);
}

.play-icon {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  padding: 11px;
  border-radius: 50%;
  background: rgba(241, 242, 238, 0.93);
  filter: invert(1);
}

.clip-copy { padding: 18px 18px 21px; }

.clip-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clip-status {
  flex: 0 0 auto;
  padding: 4px 6px;
  color: var(--muted);
  background: #1b201d;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.clip-status.selected {
  color: #c8dfcc;
  background: #102016;
  border-color: #395342;
}

.clip-card h3 {
  margin: 6px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  line-height: 1.05;
}

.clip-description {
  min-height: 4.5em;
  margin: 15px 0 0;
  color: #c4c9c5;
  font-size: 14px;
  line-height: 1.5;
}

.clip-card:nth-child(3n + 2) .clip-id { color: var(--blue); }
.clip-card:nth-child(3n) .clip-id { color: var(--wine); }

footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.65fr);
  gap: 40px;
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

footer strong { color: var(--text); }

.player-dialog {
  width: min(1280px, calc(100% - 40px));
  max-width: none;
  padding: 0;
  color: var(--text);
  background: #080a09;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.player-dialog::backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.dialog-shell { padding: 22px; }

.dialog-toolbar,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.dialog-toolbar { padding-bottom: 18px; }

.dialog-toolbar h2 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 4vw, 46px);
  font-weight: 400;
  line-height: 1;
}

.player-dialog video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.dialog-footer { padding-top: 18px; }

.dialog-footer p {
  max-width: 740px;
  margin: 0;
  color: #c9cdca;
  line-height: 1.5;
}

.dialog-controls { display: flex; gap: 8px; }

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-raised);
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible { border-color: var(--text); }

.icon-button img {
  width: 19px;
  height: 19px;
  filter: invert(1);
}

@media (max-width: 1050px) {
  .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-copy { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 700px) {
  .site-header,
  .feature,
  .library,
  footer { width: min(100% - 28px, var(--content)); }

  .site-header {
    min-height: 70px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .brand { gap: 10px; }
  .brand span { font-size: 21px; }
  .review-label { display: none; }

  .feature { padding-top: 14px; }
  .feature-media { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
  .feature-copy { padding-top: 18px; }

  .library { padding-top: 30px; }
  .library-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .tabs { gap: 22px; }
  .library-note { grid-template-columns: 1fr; gap: 10px; }
  .clip-grid { grid-template-columns: 1fr; gap: 18px; }
  .clip-description { min-height: 0; }

  footer { grid-template-columns: 1fr; gap: 12px; }

  .player-dialog { width: calc(100% - 16px); }
  .dialog-shell { padding: 12px; }
  .dialog-footer { align-items: flex-start; flex-direction: column; }
  .dialog-controls { align-self: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .clip-media img:first-child { transition: none; }
}
