:root {
  --ink: #171611;
  --muted: #706d63;
  --paper: #f3f0e7;
  --paper-deep: #e8e3d6;
  --card: #faf8f2;
  --rule: #cbc4b4;
  --highlight: #147ba5;
  --focus: #0d67b5;
  --shadow: 0 16px 44px rgb(37 32 20 / 10%);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgb(23 22 17 / 2%) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 5px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

a { color: inherit; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  padding: .75rem 1rem;
  background: var(--ink);
  color: white;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 52px;
  padding: 0 clamp(1.1rem, 4vw, 4.5rem);
  border-bottom: 1px solid rgb(203 196 180 / 85%);
  background: rgb(243 240 231 / 92%);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  font-size: .94rem;
  font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand strong { color: var(--highlight); }
.brand-mark {
  position: relative;
  width: 37px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--card);
  transform: rotate(-2deg);
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.brand-mark::before { left: 5px; }
.brand-mark::after { right: 5px; }
.brand-mark span { position: absolute; left: 5px; right: 5px; bottom: 3px; height: 2px; background: var(--highlight); }

.site-nav { display: flex; align-items: stretch; align-self: stretch; }
.site-nav a {
  display: grid;
  place-items: center;
  position: relative;
  padding: 0 clamp(.65rem, 1.4vw, 1.2rem);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: .65rem;
  right: .65rem;
  bottom: 0;
  height: 3px;
  background: var(--highlight);
  transform: scaleX(0);
  transition: transform 160ms ease;
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

main { min-height: calc(100vh - 150px); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  min-height: 610px;
  padding: clamp(2rem, 4.5vw, 4rem) clamp(1.25rem, 7vw, 8rem);
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.eyebrow {
  margin: 0 0 1rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: var(--highlight);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero h1,
.catalog-hero h1,
.not-found h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: .94;
  letter-spacing: -.075em;
}
.hero h1 em { color: var(--highlight); font-weight: 700; }
.hero-intro {
  max-width: 650px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.7;
}

.hero-object { min-height: 340px; display: grid; place-items: center; }
.hero-object picture { display: block; width: min(100%, 500px); }
.hero-logo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 22px rgb(0 0 0 / 28%));
}

.collection-section { padding: clamp(4rem, 8vw, 8rem) clamp(1.25rem, 7vw, 8rem); }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 3rem;
}
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -.055em; }
.section-heading > p { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.65; }
.section-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
.section-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--card);
  box-shadow: 0 8px 20px transparent;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.section-card:nth-child(4) { grid-column: 3 / span 4; }
.section-card:nth-child(5) { grid-column: 7 / span 4; }
.section-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.section-art {
  position: relative;
  aspect-ratio: 533 / 300;
  overflow: hidden;
  background: #000;
}
.section-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 180ms ease; }
.section-card:hover .section-art img { transform: scale(1.015); }
.section-card-copy { display: flex; flex: 1; flex-direction: column; padding: 1.6rem; border-top: 5px solid var(--section-accent); }
.section-count { color: var(--muted); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.section-card h2 { margin: .7rem 0 .75rem; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.12; letter-spacing: -.035em; }
.section-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.card-link { margin-top: auto; padding-top: 1.5rem; font-weight: 700; font-size: .88rem; }
.card-link span { display: inline-block; transition: transform 160ms ease; }
.section-card:hover .card-link span { transform: translateX(4px); }

.catalog-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.35rem clamp(1.25rem, 7vw, 8rem);
  border-bottom: 6px solid var(--section-accent);
  background: var(--ink);
  color: var(--paper);
}
.catalog-hero h1 { max-width: 1050px; font-size: clamp(2rem, 3.2vw, 3.25rem); }
.catalog-hero > div > p:last-child { max-width: 720px; margin: .6rem 0 0; color: #c9c3b5; font-size: .9rem; line-height: 1.45; }
.catalog-hero .eyebrow { margin-bottom: .45rem; color: color-mix(in srgb, var(--section-accent) 70%, white); }
.catalog-count { flex: 0 0 auto; padding-left: 2rem; border-left: 1px solid #58554c; }
.catalog-count strong { display: block; font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: .9; letter-spacing: -.07em; }
.catalog-count span { display: block; margin-top: .4rem; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }

.catalog-shell { max-width: 1240px; margin: 0 auto; padding: 1.25rem clamp(1rem, 4vw, 3rem) 6rem; scroll-margin-top: 52px; }
.catalog-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}
.catalog-controls label > span:first-child { display: block; margin-bottom: .55rem; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .66rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.input-wrap { display: flex; align-items: center; border: 1px solid var(--rule); background: var(--card); }
.input-wrap > span { padding-left: 1rem; color: var(--muted); font-size: 1.25rem; }
.search-field input,
.sort-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--card);
  color: var(--ink);
}
.search-field input { border: 0; padding: 0 1rem .05rem .65rem; outline: 0; }
.sort-field select { padding: 0 2.6rem 0 1rem; }
.input-wrap:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.results-summary { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0 1rem; color: var(--muted); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; }
.results-summary p { margin: 0; }
.results-summary strong { color: var(--ink); }

.video-list { display: grid; gap: 1rem; }
.video-card {
  display: grid;
  grid-template-columns: 532px minmax(0, 1fr);
  min-height: 532px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--card);
  box-shadow: 0 8px 24px rgb(40 35 23 / 5%);
}
.cover-button {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 532px;
  padding: 1rem;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--rule);
  background: var(--paper-deep);
}
.cover-button img { width: min(500px, 100%); height: auto; box-shadow: 0 8px 18px rgb(0 0 0 / 22%); transition: transform 180ms ease; }
.cover-button > span { position: absolute; left: .75rem; right: .75rem; bottom: .75rem; padding: .55rem .7rem; background: rgb(23 22 17 / 90%); color: white; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .62rem; letter-spacing: .04em; opacity: 0; transform: translateY(5px); transition: opacity 160ms ease, transform 160ms ease; }
.cover-button:hover img { transform: scale(1.025); }
.cover-button:hover > span,
.cover-button:focus-visible > span { opacity: 1; transform: translateY(0); }
.video-details { padding: clamp(1.4rem, 3vw, 2.3rem); }
.video-details h2 { margin: 0 0 1.6rem; font-size: clamp(1.45rem, 2.6vw, 2.25rem); line-height: 1.08; letter-spacing: -.045em; }
.video-details dl { margin: 0; }
.video-details dl > div { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--rule); }
.video-details dt { color: var(--muted); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; }
.video-details dd { margin: 0; font-size: .9rem; line-height: 1.45; }
.video-details dd p { margin: 0; }
.empty-description { color: var(--muted); font-style: italic; }

.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 2rem; }
.pagination button { min-width: 42px; min-height: 42px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .72rem; }
.pagination button:hover:not(:disabled),
.pagination button[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: white; }
.pagination button:disabled { opacity: .35; cursor: not-allowed; }
.page-direction:first-child { justify-self: start; padding: 0 1rem; }
.page-direction:last-child { justify-self: end; padding: 0 1rem; }
.page-numbers { display: flex; gap: .4rem; }

.empty-state,
.not-found { padding: 6rem 1.25rem; text-align: center; }
.empty-state { border: 1px dashed var(--rule); background: var(--card); }
.empty-state > span { font-size: 2rem; }
.empty-state h2 { margin: .7rem 0 .4rem; }
.empty-state p { margin: 0; color: var(--muted); }
.not-found { max-width: 900px; margin: 4rem auto; }
.not-found h1 { font-size: clamp(2.5rem, 7vw, 6rem); }
.not-found > p:not(.eyebrow) { max-width: 600px; margin: 1.5rem auto; color: var(--muted); line-height: 1.7; }
.button-link { display: inline-block; margin-top: 1rem; padding: .9rem 1.2rem; background: var(--ink); color: white; text-decoration: none; font-weight: 700; }

.lightbox { width: min(96vw, 1120px); max-width: none; height: min(94vh, 920px); max-height: none; padding: 0; border: 0; background: transparent; color: white; overflow: visible; }
.lightbox::backdrop { background: rgb(12 11 9 / 90%); backdrop-filter: blur(7px); }
.lightbox-frame { display: flex; flex-direction: column; width: 100%; height: 100%; background: #1c1a16; box-shadow: 0 30px 90px rgb(0 0 0 / 50%); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; padding: .75rem 1rem .75rem 1.25rem; border-bottom: 1px solid #4c4941; }
.lightbox-bar h2 { margin: 0; overflow: hidden; font-size: .94rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border: 1px solid #68645a; background: transparent; color: white; font-size: 1.5rem; }
.lightbox-image-wrap { display: grid; flex: 1; min-height: 0; place-items: center; padding: 1rem; overflow: auto; }
.lightbox-image-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1.25rem, 7vw, 8rem); border-top: 1px solid var(--rule); background: var(--paper-deep); color: var(--muted); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .67rem; letter-spacing: .06em; text-transform: uppercase; }
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }

.loading-state { display: flex; align-items: center; justify-content: center; gap: 1rem; min-height: 70vh; color: var(--muted); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; }
.loading-reel { width: 24px; height: 24px; border: 3px dotted var(--ink); border-radius: 50%; animation: spin 1.2s linear infinite; }

.reveal { animation: reveal 500ms both; animation-delay: var(--delay, 0ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-object { min-height: 280px; }
  .section-card { grid-column: span 6; }
  .section-card:nth-child(4) { grid-column: span 6; }
  .section-card:last-child { grid-column: 4 / span 6; }
  .catalog-hero { align-items: start; flex-direction: column; }
  .catalog-count { padding: 1rem 0 0; border-top: 1px solid #58554c; border-left: 0; }
}

@media (max-width: 700px) {
  .site-header { position: relative; align-items: stretch; flex-direction: column; gap: 0; min-height: 0; padding: 1rem 0 0; }
  .brand { padding: 0 1rem 1rem; }
  .site-nav { width: 100%; min-height: 48px; overflow-x: auto; border-top: 1px solid var(--rule); }
  .site-nav a { flex: 1 0 auto; min-width: 64px; }
  .hero { min-height: 0; padding-top: 2rem; }
  .hero-object { min-height: 240px; }
  .hero-object picture { width: min(100%, 390px); }
  .section-heading { align-items: start; flex-direction: column; gap: 1rem; }
  .section-grid { display: grid; grid-template-columns: 1fr; }
  .section-card,
  .section-card:nth-child(4),
  .section-card:nth-child(5),
  .section-card:last-child { grid-column: 1; min-height: 500px; }
  .catalog-controls { grid-template-columns: 1fr; }
  .catalog-hero { padding: 3rem 1.25rem 2.25rem; }
  .catalog-hero h1 { font-size: clamp(2.2rem, 11vw, 3.4rem); }
  .video-card { grid-template-columns: 1fr; }
  .cover-button { min-height: 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .cover-button > span { opacity: 1; transform: none; }
  .video-details dl > div { grid-template-columns: 1fr; gap: .35rem; }
  .pagination { grid-template-columns: 1fr 1fr; }
  .page-numbers { grid-column: 1 / -1; grid-row: 1; justify-content: center; }
  .page-direction { grid-row: 2; }
  .site-footer { align-items: start; flex-direction: column; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 2.75rem; }
  .hero-object { min-height: 200px; }
  .catalog-count { width: 100%; }
  .results-summary { align-items: start; flex-direction: column; }
  .page-numbers button:nth-child(2),
  .page-numbers button:nth-last-child(2) { display: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2eee3;
    --muted: #aaa69b;
    --paper: #151512;
    --paper-deep: #1c1b17;
    --card: #22211c;
    --rule: #403d35;
    --highlight: #59b9e6;
    --focus: #73bfff;
    --shadow: 0 16px 44px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }

  body {
    background:
      linear-gradient(rgb(255 255 255 / 2.5%) 1px, transparent 1px),
      var(--paper);
  }

  .site-header {
    border-bottom-color: rgb(64 61 53 / 90%);
    background: rgb(21 21 18 / 92%);
  }

  .skip-link,
  .pagination button[aria-current="page"],
  .pagination button:hover:not(:disabled),
  .button-link {
    background: var(--ink);
    color: var(--paper);
  }

  .catalog-hero {
    background: #0b0b09;
    color: #f3f0e7;
  }

}

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