/* ponytail: four-character font subset; regenerate it when the headline changes. */
@font-face {
  font-family: "Noto Serif SC Heading";
  src: url("assets/heading.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f8f7;
  --ink: #292c28;
  --muted: #6b6d63;
  --accent: #ba482b;
  --rule: #d6d8cd;
  --body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display-font: "Noto Serif SC Heading", "Songti SC", serif;
  --settle: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
}

::selection { color: var(--paper); background: var(--accent); }

.page {
  width: min(100% - 112px, 1440px);
  min-height: 100svh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

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

.identity { font-size: 14px; font-weight: 500; letter-spacing: .04em; }
.status { margin: 0; color: var(--muted); font-size: 12px; }

.hero {
  flex: 1;
  min-height: 630px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: 16px;
  padding-block: 38px 48px;
}

.message { padding-left: clamp(0px, 3.7vw, 64px); }

h1 {
  width: fit-content;
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(76px, 7.4vw, 96px);
  font-weight: 500;
  line-height: 1.26;
  letter-spacing: -.03em;
}

.title-line { display: block; }
.title-line > span { display: inline-block; }

.full-stop {
  display: inline-block;
  width: .65em;
  margin-left: -.06em;
  color: var(--accent);
  font-family: "Songti SC", serif;
  font-size: .62em;
  vertical-align: -.08em;
}

.description {
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 2;
  letter-spacing: .04em;
}

.artwork { min-width: 0; margin: 0; }
.sculpture-wrap { max-width: 640px; margin-inline: auto; }
.sculpture { display: block; width: 100%; height: auto; }

/* Only start the loop after its pause control has been wired up. */
.sculpture.motion-ready { animation: balance 18s cubic-bezier(.45, 0, .55, 1) infinite; }
.sculpture.is-paused,
.sculpture.is-hidden,
.sculpture.is-offscreen { animation-play-state: paused; }

figcaption { display: flex; justify-content: center; min-height: 44px; margin-top: -12px; }
.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font: 12px/1.5 var(--body-font);
  cursor: pointer;
  transition: color 180ms ease;
}

.motion-toggle:hover { color: var(--accent); }
.motion-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.play-icon { display: none; }
.motion-toggle[data-paused="true"] .pause-icon { display: none; }
.motion-toggle[data-paused="true"] .play-icon { display: block; }

.footer {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 24px;
  border-top: 1px solid var(--rule);
}

.filing { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; }

@keyframes ink-set {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes balance {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(7deg) translateY(-6px); }
  75% { transform: rotate(-7deg) translateY(4px); }
}

@media (prefers-reduced-motion: no-preference) {
  .title-line > span { animation: ink-set 1.1s var(--settle) both; }
  .title-line:nth-child(2) > span { animation-delay: 140ms; }
}

@media (min-width: 1600px) {
  .message { padding-left: 86px; }
}

@media (max-width: 1000px) {
  .page { width: calc(100% - 64px); }
  .hero { min-height: 600px; grid-template-columns: .85fr 1.15fr; gap: 0; }
  .message { padding-left: 12px; }
  .description { font-size: 14px; }
}

@media (max-width: 650px) {
  .page { width: calc(100% - 48px); }
  .masthead { min-height: 84px; gap: 12px; }
  .identity { font-size: 13px; }
  .status { font-size: 11px; }
  .hero { min-height: 0; display: flex; flex-direction: column; align-items: stretch; padding-block: 55px 32px; gap: 16px; }
  .message { padding-left: 8px; }
  h1 { font-size: clamp(68px, 18vw, 90px); line-height: 1.2; }
  .description { margin-top: 25px; line-height: 1.95; }
  .artwork { width: min(100%, 430px); align-self: center; margin-top: -6px; }
  figcaption { margin-top: -12px; }
  .footer { min-height: 78px; }
}

@media (prefers-reduced-motion: reduce) {
  .sculpture.motion-ready { animation: none; }
  .motion-toggle { display: none; }
}
