/* Hybridarium: a natural history museum hall of imagined species.
   Dark walnut walls, brass hairlines, ivory labels; the photographs are
   the hero. Everything is scoped under .hyb so nothing leaks. */

html:has(.hyb),
body:has(.hyb) {
  margin: 0;
  padding: 0;
  background: #15120e;
  color: #ece3cf;
  color-scheme: dark;
}

.hyb {
  --wall: #15120e;
  --wall-raised: #1e1a14;
  --wall-deep: #0e0c09;
  --ivory: #ece3cf;
  --ivory-soft: #b9ad94;
  --ivory-faint: #857a66;
  --brass: #c4a46a;
  --brass-soft: rgba(196, 164, 106, 0.38);
  --hair: rgba(236, 227, 207, 0.12);
  --display: "Skolar PE Web", Charter, Georgia, ui-serif, serif;
  --serif: Charter, Georgia, ui-serif, serif;
  --sans: "FF Meta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  min-height: 100svh;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(196, 164, 106, 0.10), transparent 70%),
    var(--wall);
  color: var(--ivory);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.hyb *,
.hyb *::before,
.hyb *::after {
  box-sizing: border-box;
}

.hyb a {
  color: inherit;
}

.hyb :focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

.hyb-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The layout's flash area sits above the page; present it as a placard
   floating over the hall rather than a block pushing the page down. */

body:has(.hyb) #flash {
  position: fixed;
  z-index: 50;
  right: 16px;
  bottom: 16px;
  left: 16px;
  max-width: 460px;
  margin-left: auto;
  pointer-events: none;
}

body:has(.hyb) #flash > div {
  margin: 0;
  pointer-events: auto;
}

body:has(.hyb) #flash > div > div {
  border: 1px solid var(--brass-soft, rgba(196, 164, 106, 0.38));
  border-radius: 4px;
  background: #221d16;
  color: #ece3cf;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

body:has(.hyb) #flash > div > div .text-\[18px\] {
  font-size: 16px;
  line-height: 1.5;
}

/* Top bar */

.hyb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px 32px;
  border-bottom: 1px solid var(--hair);
}

.hyb-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory-soft) !important;
  transition: color 0.2s ease;
}

.hyb-home:hover {
  color: var(--brass) !important;
}

.hyb-bar-note {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}

/* Hero: the one bold moment, a title wall with three lit vitrines */

.hyb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 56px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 72px 32px 80px;
}

.hyb-kicker {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
}

.hyb-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(52px, 8.2vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ivory);
}

.hyb-dek {
  max-width: 34em;
  margin: 28px 0 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ivory-soft);
}

.hyb-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 36px 0 0;
  border-top: 1px solid var(--brass-soft);
}

.hyb-stats > div {
  padding: 16px 28px 0 0;
  margin-right: 28px;
}

.hyb-stats > div + div {
  padding-left: 28px;
  border-left: 1px solid var(--hair);
}

.hyb-stats dt {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}

.hyb-stats dd {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: 26px;
  color: var(--ivory);
}

.hyb-vitrines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 20px;
}

.hyb-vitrine {
  margin: 0;
}

.hyb-vitrine-2 {
  transform: translateY(-28px);
}

.hyb-vitrine-frame {
  display: block;
  padding: 8px;
  border: 1px solid var(--brass-soft);
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, rgba(196, 164, 106, 0.12), rgba(0, 0, 0, 0.2));
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 240, 210, 0.08);
  transition: border-color 0.25s ease;
}

.hyb-vitrine-frame:hover {
  border-color: var(--brass);
}

.hyb-vitrine-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 999px 999px 2px 2px;
}

.hyb-vitrine figcaption {
  margin-top: 14px;
  font-style: italic;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  color: var(--ivory-soft);
}

.hyb-vitrine figcaption span[aria-hidden] {
  font-style: normal;
  color: var(--brass);
}

/* Catalogue index */

.hyb-index {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px 24px;
}

.hyb-index-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 22px 0 14px;
  border-top: 1px solid var(--brass-soft);
  border-bottom: 1px solid var(--hair);
}

.hyb-index-head h2 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
}

.hyb-index-head p {
  margin: 0;
  font-style: italic;
  font-size: 15px;
  color: var(--ivory-faint);
}

.hyb-index-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  column-gap: 28px;
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
}

.hyb-index-list a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 44px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hyb-index-no {
  flex: none;
  width: 22px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ivory-faint);
}

.hyb-index-name {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  text-transform: capitalize;
  color: var(--ivory);
}

.hyb-index-count {
  flex: none;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ivory-faint);
}

.hyb-index-empty .hyb-index-name {
  color: var(--ivory-faint);
}

.hyb-index-list a:hover {
  border-bottom-color: var(--brass);
}

.hyb-index-list a:hover .hyb-index-name {
  color: var(--brass);
}

/* Galleries */

.hyb-halls {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 32px 24px;
}

.hyb-hall {
  scroll-margin-top: 16px;
  padding: 48px 0 32px;
}

.hyb-hall-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 4px 20px;
  padding-bottom: 14px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--brass-soft);
}

.hyb-hall-no {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}

.hyb-hall-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  text-transform: capitalize;
  color: var(--ivory);
}

.hyb-hall-count {
  margin: 0;
  font-style: italic;
  font-size: 15px;
  color: var(--ivory-faint);
}

.hyb-top {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  color: var(--ivory-soft);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hyb-top:hover {
  color: var(--brass);
  border-color: var(--brass-soft);
}

.hyb-top svg {
  stroke: currentColor;
}

.hyb-empty {
  margin: 0;
  font-style: italic;
  color: var(--ivory-faint);
}

.hyb-plates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 30px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hyb-plate-link {
  display: block;
  text-decoration: none;
}

.hyb-plate-frame {
  display: block;
  padding: 5px;
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: var(--wall-deep);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  transition: border-color 0.25s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.hyb-plate-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1px;
  background: var(--wall-raised);
}

.hyb-plate-label {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--hair);
}

.hyb-plate-no {
  flex: none;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ivory-faint);
}

.hyb-plate-name {
  min-width: 0;
  font-style: italic;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ivory-soft);
}

.hyb-plate-parent {
  text-transform: capitalize;
}

.hyb-plate-x {
  font-style: normal;
  color: var(--brass);
}

.hyb-plate-link:hover .hyb-plate-frame,
.hyb-plate-link:focus-visible .hyb-plate-frame {
  border-color: var(--brass);
  transform: translateY(-3px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.6);
}

.hyb-plate-link:hover .hyb-plate-name {
  color: var(--ivory);
}

.hyb-plate-link:focus-visible {
  outline-offset: 6px;
}

/* Footer */

.hyb-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 32px 48px;
  border-top: 1px solid var(--hair);
  font-size: 15px;
  color: var(--ivory-faint);
}

.hyb-foot p {
  margin: 0;
  max-width: 44em;
}

.hyb-foot p a {
  color: var(--ivory-soft);
  text-decoration-line: underline;
  text-decoration-color: var(--brass-soft);
  text-underline-offset: 3px;
}

.hyb-foot p a:hover {
  color: var(--brass);
}

.hyb-foot-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory-soft) !important;
}

.hyb-foot-top:hover {
  color: var(--brass) !important;
}

/* Responsive */

@media (max-width: 1080px) {
  .hyb-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding: 56px 32px 64px;
  }

  .hyb-vitrines {
    max-width: 640px;
  }
}

@media (max-width: 640px) {
  .hyb-bar,
  .hyb-hero,
  .hyb-index,
  .hyb-halls,
  .hyb-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hyb-bar-note {
    display: none;
  }

  .hyb-hero {
    padding-top: 40px;
    padding-bottom: 48px;
  }

  .hyb-dek {
    font-size: 17px;
  }

  .hyb-stats {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .hyb-stats > div {
    padding-right: 12px;
    margin-right: 0;
  }

  .hyb-stats > div + div {
    padding-left: 12px;
  }

  .hyb-stats dt {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .hyb-stats dd {
    font-size: 19px;
  }

  .hyb-vitrines {
    gap: 10px;
  }

  .hyb-vitrine-2 {
    transform: translateY(-16px);
  }

  .hyb-vitrine-frame {
    padding: 4px;
  }

  .hyb-vitrine figcaption {
    font-size: 12px;
  }

  .hyb-index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  .hyb-index-no {
    display: none;
  }

  .hyb-index-name {
    font-size: 15px;
  }

  .hyb-halls {
    padding-top: 16px;
  }

  .hyb-hall {
    padding-top: 36px;
  }

  .hyb-hall-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
  }

  .hyb-hall-no {
    grid-column: 1;
  }

  .hyb-hall-head h2 {
    grid-column: 1;
  }

  .hyb-hall-count {
    grid-column: 1;
  }

  .hyb-top {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .hyb-plates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
  }

  .hyb-plate-name {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hyb *,
  .hyb *::before,
  .hyb *::after {
    transition: none !important;
  }

  .hyb-plate-link:hover .hyb-plate-frame,
  .hyb-plate-link:focus-visible .hyb-plate-frame {
    transform: none;
  }
}
