/* Homepage frame; catalog, footer and social-link presentation live in their own files. */
.catalog-page {
  --ink: var(--theme-brand);
  --muted: var(--theme-muted);
  --paper: var(--theme-page);
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
.catalog-page * { box-sizing: border-box; }
.catalog-page a { color: inherit; text-decoration: none; }
.catalog-page button { color: inherit; cursor: pointer; }
.catalog-page :focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.catalog-page button:disabled { opacity: .35; cursor: default; }
.catalog-shell { display: contents; }
.catalog-page .skip-link { top: -60px; z-index: 30; padding: 12px; }
.catalog-page .skip-link:focus { top: 10px; }

/* Film navigation fades the entire page, not only the catalog. */
.catalog-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--theme-departure);
  opacity: 0;
  pointer-events: none;
}
.catalog-page.is-departing::after { opacity: 1; transition: opacity 320ms ease-in-out; }
.catalog-page[data-view="orbit"] { overflow-x: clip; }
.catalog-page[data-view="orbit"] .catalog-shell {
  height: 100svh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  overflow: clip;
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 40px;
}
.brand { display: flex; min-width: 0; align-items: center; gap: 10px; font-size: 20px; font-weight: 650; letter-spacing: -.8px; line-height: 1.1; }
.brand img { object-fit: contain; flex-shrink: 0; }
.brand-copy { min-width: 0; white-space: nowrap; }
.brand-subtitle { display: block; overflow: hidden; margin-top: 6px; font-size: 10px; font-weight: 400; letter-spacing: 0; }
.brand-subtitle__track { display: block; position: relative; width: max-content; }
.brand-subtitle__copy { display: none; position: absolute; left: 100%; top: 0; padding-left: 24px; }
.brand-subtitle[data-overflow] .brand-subtitle__track { animation: subtitle-marquee 12s linear infinite; }
.brand-subtitle[data-overflow] .brand-subtitle__copy { display: block; }
.brand:is(:hover, :focus-visible) .brand-subtitle__track { animation-play-state: paused; }
@keyframes subtitle-marquee {
  0%, 15% { transform: translateX(0); }
  100% { transform: translateX(calc(-100% - 24px)); }
}
.site-header nav { display: flex; flex-shrink: 0; gap: 30px; align-items: center; font-size: 12px; margin-inline-end: 8px; }
/* Preserve layout while the entire surrounding frame waits for the films. */
.frame-entrance :is(.site-header, .view-switch, .catalog-toolbar, .site-footer) { transition: opacity 360ms ease-out; }
.frame-entrance :is(.view-switch, .catalog-toolbar, .site-footer) { transition-delay: 140ms; }
.frame-pending :is(.site-header, .view-switch, .catalog-toolbar, .site-footer) { opacity: 0; pointer-events: none; transition: none; }
/* Compact folder treatment belongs to this navigation, not every folder link. */
.site-header .folder-link { --folder-width: 66px; border-radius: 6px; }
.site-header .folder-link__front { border-radius: 6px; }
.site-header .folder-link__paper { border-radius: 3px; }
.site-header .folder-link__label { font-size: 10px; color: #183db7; }

.site-footer { margin: 0 40px; }

@media (min-width: 1600px) {
  .site-header { padding-top: 36px; padding-bottom: 36px; }
}
@media (max-width: 700px) {
  .site-header { padding: 22px 20px; gap: 12px; }
  .brand { font-size: 18px; }
  .brand img { width: 25px; height: 25px; }
  .site-header nav { gap: clamp(8px, 3vw, 18px); font-size: 11px; margin-inline: auto 0; }
  .site-header .folder-link { --folder-width: clamp(56px, 17vw, 66px); }
  .catalog-page[data-view="orbit"] .catalog-shell { min-height: 600px; }
  .site-footer { margin: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-page *, .catalog-page *::before, .catalog-page *::after { transition: none !important; }
  .brand-subtitle[data-overflow] .brand-subtitle__track { width: auto; overflow: hidden; text-overflow: ellipsis; animation: none; }
  .brand-subtitle[data-overflow] .brand-subtitle__copy { display: none; }
}
