/* ==================================================================
   Museum Speelklok, Interactive Encyclopedia
   Typography and palette taken from museumspeelklok.nl:
   PP Right Grotesk (display) + Montserrat (body), gold on black.
   ================================================================== */

/* ------------------------------- fonts ------------------------------ */
@font-face {
  font-family: 'Right Grotesk Compact Dark';
  src: url('../fonts/PPRightGrotesk-CompactDark.woff') format('woff');
  font-weight: 770; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Right Grotesk Medium';
  src: url('../fonts/PPRightGrotesk-Medium.woff') format('woff');
  font-weight: 470; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Right Grotesk Regular';
  src: url('../fonts/PPRightGrotesk-Regular.woff') format('woff');
  font-weight: 340; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Right Grotesk Light';
  src: url('../fonts/PPRightGrotesk-Light.woff') format('woff');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Right Grotesk Variable';
  src: url('../fonts/PPRightGroteskSpatialVariable.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Italic.ttf') format('truetype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ------------------------------ tokens ------------------------------ */
:root {
  --yellow: gold;
  --orange: #ff6800;
  --green: #00f280;
  --purple: #8268ff;
  --blue: #0091ff;
  --link: #2a00ff;
  --black: #000;
  --darkgrey: #bcbcbc;
  --grey: #ebebeb;
  --lightgrey: #f4f4f4;
  --white: #fff;

  --display: 'Right Grotesk Compact Dark', 'Arial Narrow', sans-serif;
  --sub: 'Right Grotesk Medium', sans-serif;
  --body: 'Montserrat', sans-serif;

  --gut: 2.4rem;
  --header-h: 9.2rem;
}

/* ------------------------------- reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--body);
  font-size: 1.5rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
.u-hide { display: none !important; }
.u-vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ------------------------------ wordmark ---------------------------- */
/* The museum wordmark: PP Right Grotesk Spatial Variable with a weight
   ramp across the letters, 100→700 on "museum", 700→100 on "speelklok". */
.logo {
  font-family: 'Right Grotesk Variable', var(--display);
  font-variation-settings: 'wght' 200;
  font-size: 2.7rem;
  line-height: .9;
  text-transform: lowercase;
  display: block;
  white-space: nowrap;
}
.logo span { display: flex; }
.logo span i { font-style: normal; font-variation-settings: 'wght' var(--w); }
.logo .l1 { letter-spacing: .08rem; }

/* ------------------------------- header ----------------------------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--yellow);
  border-bottom: 2px solid var(--black);
}
.header__in {
  display: flex; align-items: center; gap: 3.2rem;
  min-height: var(--header-h);
  padding: 1.6rem var(--gut);
  max-width: 1920px; margin: 0 auto;
}
.header__brand { display: flex; align-items: center; gap: 1.2rem; flex: 0 0 auto; }
.header__brand .mark { width: 30px; height: 30px; flex: 0 0 auto; }

.search { flex: 1 1 auto; position: relative; max-width: 620px; }
.search input {
  width: 100%;
  background: transparent;
  border: 0; border-bottom: 2px solid var(--black);
  padding: .9rem .2rem;
  font-size: 1.6rem; font-style: italic;
  color: var(--black);
}
.search input::placeholder { color: rgba(0,0,0,.55); font-style: italic; }
.search input:focus { outline: none; border-bottom-width: 3px; }
.search__clear {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--sub); font-size: 1.3rem; text-transform: uppercase;
  letter-spacing: .08em; padding: .4rem;
}

.chip {
  font-family: var(--sub);
  font-size: 1.4rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .06em;
  border: 2px solid var(--black);
  padding: .9rem 1.2rem;
  flex: 0 0 auto;
}
.btn {
  display: inline-flex; align-items: center; gap: .8rem;
  font-family: var(--sub); font-size: 1.4rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .06em;
  border: 2px solid var(--black);
  padding: 1rem 1.4rem;
  background: transparent;
  transition: background .15s ease, color .15s ease;
  flex: 0 0 auto;
}
.btn:hover { background: var(--black); color: var(--yellow); }
.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: var(--white); color: var(--black); }
.btn .arw { font-size: 1.5rem; line-height: 1; }

.jump { position: relative; }
.jump__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 26rem;
  background: var(--white);
  border: 2px solid var(--black);
  padding: .6rem;
  z-index: 60;
}
.jump__menu button {
  display: flex; justify-content: space-between; gap: 1.6rem;
  width: 100%; text-align: left;
  font-family: var(--sub); font-size: 1.4rem;
  padding: .9rem 1rem;
}
.jump__menu button:hover { background: var(--yellow); }
.jump__menu button b { font-family: var(--body); font-weight: 400; color: #666; }

/* ------------------------------ meta rows --------------------------- */
.collection-note {
  font-size: 1.5rem; line-height: 1.6; color: #444;
  max-width: 90rem;
  padding: 2.8rem 0 0;
}
.collection-note em { font-style: italic; }

/* ------------------------------- filters ---------------------------- */
.filters {
  display: flex; flex-wrap: nowrap; gap: 0;
  border-bottom: 1px solid var(--black);
}
.fgroup {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .2rem;
  padding: 1.2rem 2.4rem 1.2rem 0;
  flex: 1 1 auto;
}
.fgroup + .fgroup { border-left: 1px solid var(--black); padding-left: 2.4rem; }
.fgroup__name {
  font-family: var(--sub); font-size: 1.2rem;
  text-transform: uppercase; letter-spacing: .14em;
  padding-right: 1.2rem; white-space: nowrap;
}
.tab {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--sub); font-size: 1.3rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .04em;
  padding: .7rem 1rem;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}
.tab .n { font-family: var(--body); font-size: 1rem; color: #777; letter-spacing: 0; }
.tab:hover { background: var(--lightgrey); }
.tab[aria-pressed="true"] { border-color: var(--black); background: var(--yellow); }
.tab[aria-pressed="true"] .n { color: var(--black); }
.tab[disabled] { opacity: .3; cursor: default; }
.tab[disabled]:hover { background: none; }

/* ------------------------------- gallery ---------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4.8rem 3.2rem;
  padding: 4.8rem 0 8rem;
}
.card { text-align: left; display: block; width: 100%; }
/* No tile, no frame, specimens sit directly on the white page. */
.card__fig {
  position: relative;
  aspect-ratio: 1 / 1;
  background: transparent;
  display: grid; place-items: center;
}
.card__fig img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card__fig img { transform: scale(1.04); }
.card:hover .card__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.card__name {
  font-family: var(--display);
  font-size: 2.1rem; line-height: 1.02;
  margin: 1.6rem 0 .4rem;
  text-wrap: balance;
}
.card__sub { font-size: 1.3rem; font-style: italic; color: #555; line-height: 1.4; }
.card__tag {
  font-family: var(--sub); font-size: 1.1rem;
  text-transform: uppercase; letter-spacing: .1em;
  color: #888; margin-top: .6rem;
}

.empty { padding: 10rem 0 14rem; text-align: center; }
.empty h2 { font-family: var(--display); font-size: 4rem; margin: 0 0 1.2rem; }
.empty p { font-size: 1.6rem; color: #555; margin: 0 0 2.4rem; }

/* ------------------------------- detail ----------------------------- */
.detail { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.detail__media {
  padding: 4.8rem var(--gut) 6.4rem;
  display: flex; flex-direction: column; gap: 2.4rem;
  align-items: stretch; justify-content: center;
}
.thumbs { justify-content: center; }
.detail__stage {
  width: 100%;
  background: transparent;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
}
.detail__stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail__stage--3d {
  aspect-ratio: auto;
  width: 100%;
  height: min(78vh, 860px);
  display: block;
  background: var(--white);
}
.detail__stage--3d iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
}
.scan3d {
  width: 100%; height: 100%;
  background-color: var(--white);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  position: relative;
  display: block;
}
.scan3d span {
  position: absolute; left: 50%; bottom: 2.4rem; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .8rem;
  font-family: var(--sub); font-size: 1.4rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .06em;
  background: var(--black); color: var(--white);
  border: 2px solid var(--black);
  padding: 1.1rem 1.6rem;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.scan3d:hover span { background: var(--yellow); color: var(--black); }
.thumbs { display: flex; gap: 1.2rem; }
.thumbs button {
  width: 76px; height: 76px;
  background: transparent;
  border-bottom: 2px solid transparent;
  display: grid; place-items: center; padding: .4rem;
}
.thumbs button[aria-pressed="true"] { border-bottom-color: var(--black); }
.thumbs img { max-width: 100%; max-height: 100%; object-fit: contain; }

.detail__body {
  padding: 4.8rem var(--gut) 8rem 0;
  max-width: 78rem;
}
.detail__kicker {
  font-family: var(--sub); font-size: 1.2rem;
  text-transform: uppercase; letter-spacing: .16em;
  color: #666; margin-bottom: 1.6rem;
}
.detail__title {
  font-family: var(--display);
  font-size: clamp(3.6rem, 4.2vw, 6.4rem);
  line-height: .94; letter-spacing: -.015em;
  margin: 0 0 .8rem;
  text-wrap: balance;
}
.detail__nl { font-size: 1.7rem; font-style: italic; color: #555; margin: 0 0 3.2rem; }
.detail__lead {
  font-family: var(--sub);
  font-size: clamp(2rem, 1.9vw, 2.6rem);
  line-height: 1.24;
  margin: 0 0 3.2rem;
  text-wrap: pretty;
}

.specs {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--black);
}
.spec { padding: 1.6rem 2.4rem 1.6rem 0; border-bottom: 1px solid var(--grey); }
.spec:nth-child(2n) { padding-left: 2.4rem; border-left: 1px solid var(--grey); }
.spec dt {
  font-family: var(--sub); font-size: 1.1rem;
  text-transform: uppercase; letter-spacing: .14em;
  color: #777; margin-bottom: .5rem;
}
.spec dd { margin: 0; font-size: 1.5rem; line-height: 1.45; }

.about { margin-top: 4rem; }
.about h2 {
  font-family: var(--sub); font-size: 1.2rem;
  text-transform: uppercase; letter-spacing: .16em;
  margin: 0 0 1.2rem; color: #666;
}
.about p { margin: 0 0 1.6rem; font-size: 1.6rem; line-height: 1.72; }

.detail__nav {
  display: flex; justify-content: space-between; gap: 1.6rem;
  margin-top: 4.8rem; padding-top: 2.4rem;
  border-top: 1px solid var(--black);
}
.detail__nav a { font-family: var(--sub); font-size: 1.4rem; text-transform: uppercase; letter-spacing: .06em; }
.detail__nav a:hover { background: var(--yellow); }
.detail__nav span { color: var(--darkgrey); }

/* subheader on detail view */
.subhead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.6rem; padding: 1.6rem var(--gut);
  border-bottom: 1px solid var(--black);
  max-width: 1920px; margin: 0 auto;
}

/* ------------------------------ lightbox ---------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: var(--black);
  display: grid; place-items: center; padding: 4rem;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 2.4rem; right: 2.4rem;
  color: var(--white); border: 2px solid var(--white);
  font-family: var(--sub); font-size: 1.4rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 1rem 1.4rem;
}
.lightbox__close:hover { background: var(--white); color: var(--black); }

/* ------------------------------- footer ----------------------------- */
.footer {
  background: var(--black); color: var(--white);
  padding: 6.4rem 0 3.2rem;
}
.footer__in {
  max-width: 1920px; margin: 0 auto; padding: 0 var(--gut);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3.2rem;
}
.footer h3 {
  font-family: var(--sub); font-size: 1.2rem;
  text-transform: uppercase; letter-spacing: .14em;
  margin: 0 0 1.2rem; color: var(--yellow);
}
.footer p, .footer li { font-size: 1.4rem; line-height: 1.7; color: #ddd; margin: 0 0 .6rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer__note {
  max-width: 1920px; margin: 4.8rem auto 0; padding: 2.4rem var(--gut) 0;
  border-top: 1px solid #333;
  font-size: 1.2rem; color: #888;
}
.hours {
  background: var(--black); color: var(--white);
  text-align: center; padding: 1.4rem;
  font-family: var(--sub); font-size: 1.5rem;
}

/* ----------------------------- responsive --------------------------- */
@media (max-width: 1500px) { .grid { grid-template-columns: repeat(5, minmax(0,1fr)); } }
@media (max-width: 1240px) { .grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 1360px) {
  .filters { flex-direction: column; }
  .fgroup { padding-right: 0; }
  .fgroup + .fgroup { border-left: 0; border-top: 1px solid var(--grey); padding-left: 0; }
}
@media (max-width: 1100px) {
  .detail { grid-template-columns: 1fr; }
  .detail__media { padding-bottom: 0; }
  .detail__body { padding: 3.2rem var(--gut) 6.4rem; max-width: none; }
  .footer__in { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 3.2rem 2rem; }
  .header__in { flex-wrap: wrap; gap: 1.6rem; }
  .search { order: 3; flex: 1 1 100%; max-width: none; }
}
@media (max-width: 640px) {
  :root { --gut: 1.6rem; }
  .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .specs { grid-template-columns: 1fr; }
  .spec:nth-child(2n) { padding-left: 0; border-left: 0; }
  .footer__in { grid-template-columns: 1fr; }
  .rowbar { flex-direction: column; gap: .4rem; }
  .rowbar__note { text-align: left; }
}
