@font-face {
  font-family: "Instrument Serif";
  src: url("/_wacht/assets/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: optional;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/_wacht/assets/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: optional;
}

@font-face {
  font-family: Geist;
  src: url("/_wacht/assets/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: optional;
}

:root {
  color-scheme: dark;
  --ink: #12241e;
  --paper: #f3efe2;
  --muted: #bec9bb;
  --accent: #ff754c;
  --rule: rgb(206 220 202 / 26%);
  --ease: cubic-bezier(.18,.76,.22,1);
  color: var(--paper);
  background: var(--ink);
  font-family: Geist, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 82% 32%, rgb(96 124 90 / 27%), transparent 58%),
    linear-gradient(118deg, #162a23, #12241e 52%, #192e25);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("/_wacht/assets/grain.png");
  opacity: .027;
}
::selection { color: var(--ink); background: var(--accent); }
a:focus-visible, .motion-setting:focus-visible + .mark-surface {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.poster {
  --edge: clamp(1.35rem, 5.4vw, 6.5rem);
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 120rem;
  margin-inline: auto;
  padding: clamp(1.15rem, 3.4vh, 3rem) var(--edge) clamp(1rem, 2.8vh, 2.5rem);
}
.masthead, .colophon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.masthead { padding-bottom: clamp(.85rem, 2.3vh, 1.75rem); }
.masthead::after, .colophon::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 1px;
  background: var(--rule);
}
.masthead::after { bottom: 0; transform-origin: left center; }
.colophon::before { top: 0; }
.masthead img { display: block; width: clamp(7.5rem, 10.2vw, 10.5rem); height: auto; }
.languages { display: flex; align-items: center; font-size: .79rem; letter-spacing: .035em; }
.languages span { color: #829683; }
.languages a {
  display: grid;
  min-width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  text-decoration: none;
  font-weight: 480;
  color: var(--muted);
}
.languages a:last-child { margin-right: -.65rem; }
.languages a[aria-current="page"] { color: var(--paper); text-decoration: underline; text-underline-offset: .4em; text-decoration-color: var(--accent); }

.announcement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(.75rem, 2vw, 2.5rem);
  padding-block: clamp(1.75rem, 5vh, 4.25rem);
}
h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font: 400 clamp(4.4rem, 10.65vw, 13rem)/.89 "Instrument Serif", Georgia, serif;
  letter-spacing: -.042em;
}
h1 .line { display: block; }
h1 .word { display: inline-block; }
h1 em { font-weight: inherit; }
h1 b { color: var(--accent); font-weight: inherit; }
.artwork {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
}
.artwork::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 90%;
  height: 82%;
  background: radial-gradient(ellipse at 46% 58%, rgb(5 16 11 / 38%), transparent 68%);
  transform: translate(2%, 9%);
}
.mark-surface { position: relative; display: block; width: min(100%, 66svh, 42rem); }
.sculpture { display: block; width: 100%; height: auto; overflow: visible; }
.motion-setting, .motion-hint, .play-icon { display: none; }

.colophon { min-height: 3.45rem; padding-top: .65rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 clamp(.85rem, 2.2vw, 2.4rem); }
.footer-links a, .back-link {
  display: inline-flex;
  align-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--paper);
  font-size: .875rem;
  line-height: 1.4;
  text-underline-offset: .28em;
  text-decoration-color: var(--rule);
}
.footer-links a[aria-current="page"] { text-decoration-color: var(--accent); }
.masthead > a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.info-page {
  width: min(100%, 46rem);
  min-width: 0;
  margin-inline: auto;
  padding-block: clamp(1.25rem, 4vw, 4rem) clamp(3rem, 6vw, 6rem);
  overflow-wrap: anywhere;
}
.back-link { gap: .45em; color: var(--muted); }
.info-page h1 {
  margin-block: clamp(1.25rem, 3vw, 2.5rem) clamp(1.5rem, 3.5vw, 3rem);
  font-size: clamp(2.65rem, 6.8vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.info-copy { color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.125rem); line-height: 1.65; }
.info-copy h2 {
  margin: 1.65em 0 .45em;
  color: var(--paper);
  font: 400 clamp(1.7rem, 3.4vw, 2.45rem)/1.13 "Instrument Serif", Georgia, serif;
}
.info-copy p { margin-block: 0 .85em; }
.info-copy > :first-child { margin-top: 0; }
.info-copy a { color: var(--paper); text-underline-offset: .2em; }
.info-copy dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  margin: 1.25em 0;
}
.info-copy dl > div { display: contents; }
.info-copy dt, .info-copy dd { margin: 0; padding-block: .7em; border-top: 1px solid var(--rule); }
.info-copy dt { padding-right: 1rem; color: var(--paper); font-weight: 500; }
@media (hover: hover) {
  .languages a:hover, .footer-links a:hover, .back-link:hover, .info-copy a:hover { color: var(--accent); text-decoration-color: currentColor; }
}
@media (max-width: 33rem) {
  .info-copy dl { grid-template-columns: minmax(0, 1fr); }
  .info-copy dt { padding: .8em 0 0; }
  .info-copy dd { padding: .1em 0 .8em; border-top: 0; }
}

@media (max-width: 42rem) and (orientation: portrait) {
  .poster { padding-block: 1rem max(.7rem, env(safe-area-inset-bottom)); }
  .masthead { padding-bottom: .6rem; }
  .announcement {
    grid-template-columns: 1fr;
    align-content: center;
    gap: clamp(.8rem, 2.6svh, 2rem);
    padding-block: clamp(1rem, 3svh, 2rem);
  }
  h1 { font-size: clamp(3.9rem, min(20.3vw, 12.4svh), 7.5rem); }
  .artwork { justify-self: end; width: min(94%, 46svh, 28rem); }
}
@media (max-height: 29rem) and (orientation: landscape) {
  .poster { padding-block: .45rem; }
  .masthead { padding-bottom: 0; }
  .announcement { padding-block: .8rem; }
  h1 { font-size: clamp(3rem, min(10vw, 22svh), 6.5rem); }
  .mark-surface { width: min(100%, 57svh); }
  .colophon { padding-top: .15rem; min-height: 2.9rem; }
}

/* The five pieces come together once. Their unanimated positions are the finished mark. */
@media (prefers-reduced-motion: no-preference) {
  .masthead::after { animation: draw-rule .9s var(--ease) both; }
  h1 .word { animation: reveal-word .9s var(--ease) .08s backwards; }
  h1 em.word { animation-delay: .2s; }
  .sculpture__piece {
    transform-box: fill-box;
    transform-origin: center;
    animation: assemble 1.35s var(--ease) var(--delay, 0s) both;
  }
  .sculpture__piece--stem { --x: -30px; --y: -24px; --angle: -3deg; }
  .sculpture__piece--wing { --x: 40px; --y: -29px; --angle: 3deg; --delay: .08s; }
  .sculpture__piece--beak { --x: 29px; --y: -3px; --angle: 4deg; --delay: .16s; }
  .sculpture__piece--leg { --x: 26px; --y: 36px; --angle: -2deg; --delay: .24s; }
  .sculpture__piece--inlay { --x: -34px; --y: 31px; --angle: 3deg; --delay: .34s; }
  .sculpture__sweep { animation: graze 1.1s cubic-bezier(.3,.03,.35,1) 1.24s both; }

  /* The whole seal drifts only after the five pieces and the light sweep settle. */
  .sculpture { transform-origin: 50% 56%; animation: drift 9s ease-in-out 2.4s infinite; }
  .motion-setting {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .mark-surface { cursor: pointer; }
  .motion-hint {
    position: absolute;
    right: 0;
    bottom: 0;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--rule);
    border-radius: 50%;
    color: var(--muted);
    opacity: 0;
    transition: opacity .2s ease-out;
  }
  .mark-surface:hover .motion-hint,
  .motion-setting:focus-visible + .mark-surface .motion-hint,
  .motion-setting:checked + .mark-surface .motion-hint { opacity: 1; }
  .motion-setting:checked + .mark-surface .sculpture,
  .motion-setting:checked + .mark-surface .sculpture__piece,
  .motion-setting:checked + .mark-surface .sculpture__sweep { animation-play-state: paused; }
  .motion-setting:checked + .mark-surface .pause-icon { display: none; }
  .motion-setting:checked + .mark-surface .play-icon { display: block; }
  @media (hover: none) { .motion-hint { opacity: .8; } }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(.25%, -.85%) rotate(.5deg); }
}
@keyframes draw-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes reveal-word { from { opacity: .15; transform: translateY(.15em); } to { opacity: 1; transform: none; } }
@keyframes assemble { from { opacity: .18; transform: translate(var(--x), var(--y)) rotate(var(--angle)); } to { opacity: 1; transform: none; } }
@keyframes graze { from { transform: translateX(0); } to { transform: translateX(850px); } }
