:root {
  color-scheme: dark;
  --ink: #11110f;
  --ivory: #f1ebdf;
  --muted: #beb5a5;
  --gold: #d9b984;
  --rule: #a9926338;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 77% 35%, #2d271e 0, transparent 48%),
    radial-gradient(ellipse at 8% 76%, #25201a 0, transparent 43%),
    linear-gradient(145deg, #161612, var(--ink) 70%);
  color: var(--ivory);
  font: 16px/1.55 var(--sans);
}

.shell {
  width: min(1264px, calc(100% - clamp(36px, 9vw, 136px)));
  margin-inline: auto;
}

.masthead {
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
}

.identity {
  display: block;
  min-width: 0;
}

.identity-logo {
  display: block;
  width: clamp(200px, 24vw, 270px);
  max-width: 100%;
  height: auto;
}

svg { display: block; flex-shrink: 0; }

.status, .kicker, .plate-heading, .plate-footer {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.status {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.status svg { color: var(--gold); }

.entrance {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.12fr);
  align-items: start;
  gap: clamp(32px, 5.1vw, 74px);
  padding-block: clamp(32px, 5vh, 76px);
  min-height: calc(100svh - 128px);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 23px;
  color: var(--gold);
}

.kicker::before {
  content: "";
  width: 25px;
  height: 1px;
  background: var(--gold);
}

h1 {
  margin: 0;
  font: 400 clamp(47px, 5.6vw, 82px)/.99 var(--serif);
  letter-spacing: -.063em;
}

h1 em {
  display: block;
  color: var(--gold);
  font-weight: 400;
}

.intro {
  max-width: 40ch;
  margin: 23px 0 30px;
  color: var(--muted);
  font-size: clamp(15px, 1.24vw, 17px);
  line-height: 1.65;
}

.intro p { margin: 0; }
.intro p + p { margin-top: .75em; }

.collection-guide {
  padding-block: clamp(32px, 5vw, 64px);
  border-top: 1px solid var(--rule);
}

.site-footer {
  padding-block: 20px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.collection-guide .kicker { margin-bottom: 15px; }

.collection-guide h2 {
  margin: 0;
  font: 400 clamp(28px, 3.4vw, 45px)/1.13 var(--serif);
  letter-spacing: -.035em;
}

.guide-intro {
  max-width: 68ch;
  margin: 14px 0 25px;
  color: var(--muted);
}

.guide-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-topic {
  padding: clamp(15px, 2vw, 25px);
  border: 1px solid var(--rule);
  background: #e8ca920a;
}

.guide-topic h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font: 400 20px/1.2 var(--serif);
}

.guide-topic p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .guide-topics { grid-template-columns: minmax(0, 1fr); }
}

button { font: inherit; cursor: pointer; }

.register {
  min-width: 218px;
  min-height: 55px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 13px 19px;
  border: 1px solid #efd1a1;
  border-radius: 3px;
  background: linear-gradient(145deg, #ecd0a1, #cda671);
  color: #1b150f;
  font-size: 15px;
  font-weight: 700;
}

.register:hover { background: #f1d9b1; }

:focus-visible {
  outline: 2px solid #f9daa8;
  outline-offset: 4px;
}

.returning {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sign-in {
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 5px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sign-in:hover { color: var(--ivory); }

.plate {
  position: relative;
  min-width: 0;
  padding: 13px;
  border: 1px solid #a992635c;
  background: #171612;
  box-shadow: 0 24px 72px #0005, inset 0 0 0 4px #e2c28c0a;
}

.plate-heading, .plate-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 3px;
  color: var(--muted);
}

.plate-heading {
  align-items: center;
  margin: 1px 0 12px;
}

.plate-heading h2 {
  margin: 0;
  color: var(--gold);
  font: inherit;
}

.gallery-toggle {
  min-width: 58px;
  padding: 5px 9px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gallery-toggle:hover {
  border-color: var(--gold);
  color: var(--ivory);
}

.plate-footer {
  margin: 12px 0 1px;
  letter-spacing: .14em;
}

.plate-footer span:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plate-footer span:last-child::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: rotate(45deg);
}

.collage {
  --frame-gap: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: var(--frame-gap);
  height: clamp(388px, min(39vw, calc(100svh - 232px)), 552px);
}

.collage-column {
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  gap: var(--frame-gap);
}

.collage-column:nth-child(2) { grid-column: 2; }
.collage-column[hidden], .lightbox-step[hidden] { display: none; }

.object {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0;
  background: #352b22;
}

.object img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--position, center);
  filter: saturate(.58) sepia(.22) brightness(.79);
}

.object--main img {
  --position: 49% 46%;
  filter: saturate(.69) sepia(.22) brightness(.83);
}

/* Crops for the initial gallery images. */
.object img[src="assets/leather-equipment.jpg"] { object-position: 52% 50%; }
.object img[src="assets/binoculars.jpg"] { object-position: 55% 44%; }
.object img[src="assets/steel-helmet.jpg"] { object-position: 55% 49%; }
.object img[src="assets/solid-fuel-box.jpg"] { object-position: 50% 44%; }

.object img.object-image--wide {
  object-fit: contain;
  object-position: center;
  background: radial-gradient(ellipse at center, #49342b, #241b16 75%);
}

.object::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, #100e0be8 0%, #15110c43 34%, transparent 56%),
    linear-gradient(125deg, #1b140e32, transparent 63%);
  box-shadow: inset 0 0 0 1px #ffe1a425;
}

.object--main::after {
  background:
    linear-gradient(0deg, #12100de8 0%, #17130d08 32%, transparent 65%, #130e0c46 100%),
    linear-gradient(90deg, #1a140d32, transparent 42%);
}

.object figcaption {
  position: absolute;
  z-index: 1;
  inset: auto 12px 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ivory);
  font: 15px/1.15 var(--serif);
}

.object--main figcaption {
  inset: auto 22px 21px;
  gap: 11px;
  font-size: 23px;
}

.object-no {
  color: #eed1a3;
  font: 650 9px/1 var(--sans);
  letter-spacing: .1em;
}

.object-open {
  position: absolute;
  z-index: 2;
  inset: 0;
  cursor: zoom-in;
}

.object-open::after {
  content: "";
  position: absolute;
  inset: 7px 7px auto auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  color: var(--gold);
  opacity: 0;
  background:
    linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 10px no-repeat,
    #15110dd9;
}

@media (hover: hover) {
  .object-open:hover::after { opacity: 1; }
}

.object-open:focus-visible::after { opacity: 1; }
.object-open:focus-visible { outline-offset: -3px; }

.lightbox {
  width: min(1026px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100% - 28px);
  padding: 0;
  border: 1px solid #a9926370;
  background: #181611;
  color: var(--ivory);
  box-shadow: 0 24px 80px #000a;
  overscroll-behavior: contain;
}

.lightbox::backdrop { background: #0b0908e6; }

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lightbox-enter 340ms cubic-bezier(.2, .65, .3, 1); }
  .lightbox[open]::backdrop { animation: lightbox-dim 300ms ease-out; }
  .lightbox[open].lightbox--closing { animation: lightbox-exit 320ms ease-in-out both; }
  .lightbox[open].lightbox--closing::backdrop { animation: lightbox-undim 320ms ease-in-out both; }

  @keyframes lightbox-enter {
    from { opacity: 0; transform: translateY(6px) scale(.985); }
    to { opacity: 1; transform: none; }
  }

  @keyframes lightbox-dim {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes lightbox-exit {
    from {
      opacity: var(--lightbox-exit-opacity, 1);
      transform: var(--lightbox-exit-transform, none);
    }
    to { opacity: 0; transform: translateY(6px) scale(.985); }
  }

  @keyframes lightbox-undim {
    from { opacity: var(--lightbox-backdrop-opacity, 1); }
    to { opacity: 0; }
  }
}

body:has(.lightbox[open]) { overflow: hidden; }

.lightbox-header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
}

.lightbox-caption {
  grid-column: 2;
  margin: 0;
  color: var(--ivory);
  font: 400 clamp(16px, 2.8vw, 23px)/1.2 var(--serif);
  text-align: center;
}

.lightbox-header form { grid-column: 3; justify-self: end; }

.lightbox-close {
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: transparent;
  color: var(--gold);
  font-size: 13px;
}

.lightbox-close:hover { border-color: var(--gold); }

.lightbox-media {
  position: relative;
  overflow: hidden;
}

.lightbox-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 128px);
  object-fit: contain;
  background: var(--ink);
}

.lightbox-image--incoming {
  position: absolute;
  inset: 0;
  height: 100%;
}

.lightbox-navigation {
  display: grid;
  grid-template-columns: clamp(36px, 7.2vw, 92px) minmax(0, 1fr) clamp(36px, 7.2vw, 92px);
  align-items: stretch;
}

.lightbox-navigation:has(.lightbox-step[hidden]) { grid-template-columns: minmax(0, 1fr); }

.lightbox-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 0;
  border: 0;
  border-inline-end: 1px solid var(--rule);
  background: #201b14;
  color: var(--gold);
  white-space: nowrap;
}

.lightbox-step:last-child {
  border-inline-start: 1px solid var(--rule);
  border-inline-end: 0;
}

.lightbox-step:hover, .lightbox-step:focus-visible {
  background: #33291d;
  color: var(--ivory);
}

.lightbox-step:focus-visible { outline-offset: -3px; }
.lightbox-step-arrow { font-size: 23px; line-height: 1; }

.lightbox-step-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lightbox-step:is(:active, .lightbox-step--pressed) {
  background: #443629;
  color: var(--ivory);
}

@media (prefers-reduced-motion: no-preference) {
  .lightbox-step { transition: background-color 300ms ease-out, color 150ms ease-out; }
  .lightbox-step:is(:active, .lightbox-step--pressed) { transition: none; }
}

@media (max-width: 740px) {
  .lightbox-step-label { display: none; }
}

.lightbox-footer {
  padding: 7px 14px;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.lightbox-position {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  white-space: nowrap;
}

@media (max-width: 940px) {
  .shell { width: min(650px, calc(100% - 48px)); }
  .masthead { min-height: 71px; }
  .entrance {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-block: 46px 32px;
    min-height: 0;
  }
  h1 { font-size: clamp(48px, 8.7vw, 76px); }
  .collage { height: clamp(335px, 75vw, 500px); }
}

@media (max-width: 475px) {
  .shell { width: calc(100% - 34px); }
  .masthead { gap: 10px; }
  .identity-logo { width: min(205px, 54vw); }
  .status { gap: 6px; font-size: 9px; letter-spacing: .10em; white-space: nowrap; }
  .entrance { padding-top: 34px; }
  .kicker { margin-bottom: 19px; }
  .intro { margin-block: 19px 23px; }
  .register { width: 100%; }
  .plate { padding: 8px; }
  .plate-heading, .plate-footer { padding-inline: 1px; font-size: 9px; }
  .collage {
    --frame-gap: 5px;
    height: clamp(258px, 91vw, 384px);
  }
  .object figcaption { inset: auto 6px 7px; gap: 4px; font-size: 12px; }
  .object--main figcaption { inset: auto 8px 8px; gap: 5px; font-size: 16px; }
  .object-no { font-size: 8px; }
}
