/* Whereabouts launch site. Palette and type from docs/site/BRIEF.md, shared with the app. */

:root {
  color-scheme: light dark;
  --paper: #f6f1e7;
  --wall: #efe8db;
  --card: #fbf8f2;
  --ink: #1c1a17;
  --ink-muted: #5c554b;
  --rule: #d9d0c0;
  --rule-strong: #8f8676;
  --accent: #c2381b;
  --accent-hover: #a52e14;
  --accent-soft: #f8e4dc;
  --on-accent: #ffffff;
  --gallery-bg: #dde7f0;
  --gallery-text: #1f4466;
  --fair-bg: #f3e3c3;
  --fair-text: #6a4708;
  --loan-bg: #e6def0;
  --loan-text: #4a2f6b;
  --studio-bg: #e7e1d6;
  --studio-text: #3d382f;
  --sold-bg: #f6d9cf;
  --sold-text: #8a2410;
  --shadow-label:
    0 1px 1px rgb(40 30 20 / 0.06), 0 6px 18px rgb(40 30 20 / 0.08);
  --shadow-lift:
    0 2px 4px rgb(40 30 20 / 0.08), 0 20px 48px rgb(40 30 20 / 0.12);
  --sheet: #ffffff;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --font-display:
    "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
    serif;
  --font-body:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --rhythm: clamp(5rem, 3rem + 8vw, 10rem);
  --gutter: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171513;
    --wall: #12100e;
    --card: #201d1a;
    --ink: #ede6da;
    --ink-muted: #b3aa9b;
    --rule: #3a352f;
    --rule-strong: #7d7466;
    --accent: #ff7a59;
    --accent-hover: #ff9478;
    --accent-soft: #3b211a;
    --on-accent: #1a0f0b;
    --gallery-bg: #1f3346;
    --gallery-text: #cfe2f3;
    --fair-bg: #3f3115;
    --fair-text: #f2d9a4;
    --loan-bg: #33284a;
    --loan-text: #ddd0f2;
    --studio-bg: #34302a;
    --studio-text: #e6dfd2;
    --sold-bg: #4a1d12;
    --sold-text: #ffc9b8;
    --shadow-label: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 4px 8px rgb(0 0 0 / 0.35), 0 20px 48px rgb(0 0 0 / 0.45);
    --sheet: var(--card);
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 1.6rem + 5vw, 5.5rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.2;
}

p {
  margin: 0;
  max-width: 62ch;
}

a {
  color: inherit;
}

.num {
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: calc(72rem + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (max-width: 479px) {
  :root {
    --gutter: 1.25rem;
  }
}

.top-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 8px;
  pointer-events: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-md);
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

section[id] {
  scroll-margin-top: 5rem;
}

/* ---------- Small parts ---------- */

.eyebrow,
.badge {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  line-height: 1.3;
}

.eyebrow {
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--studio-bg);
  color: var(--studio-text);
}

.badge.gallery {
  background: var(--gallery-bg);
  color: var(--gallery-text);
}
.badge.fair {
  background: var(--fair-bg);
  color: var(--fair-text);
}
.badge.loan {
  background: var(--loan-bg);
  color: var(--loan-text);
}
.badge.sold {
  background: var(--sold-bg);
  color: var(--sold-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  transition: background-color 160ms var(--ease);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-compact {
  padding: 0 1rem;
  font-size: 0.9375rem;
}

.btn-hero {
  min-height: 52px;
  font-size: 1.0625rem;
}

.btn-close {
  min-height: 56px;
}

.arrow {
  transition: transform 200ms var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration-color: var(--accent);
}

.fine {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--card);
}

@keyframes press {
  0% {
    transform: scale(0);
  }
  65% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

/* ---------- 1. Header ---------- */

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid transparent;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.logo {
  flex: none;
  color: var(--ink);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav a:not(.btn) {
  display: none;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.75rem;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.9375rem;
}

.header-nav a:not(.btn):hover {
  color: var(--ink);
}

@media (min-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .site-header.is-scrolled {
    border-bottom-color: var(--rule);
  }

  .header-nav a:not(.btn) {
    display: inline-flex;
  }

  .header-nav .btn {
    margin-left: 0.75rem;
  }
}

/* ---------- 2. Hero ---------- */

.hero {
  display: grid;
  gap: 3rem;
  padding-top: clamp(2.5rem, 1rem + 5vw, 5rem);
}

.hero-copy h1 {
  margin-bottom: 1.5rem;
}

.lede {
  font-size: 1.125rem;
  color: var(--ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin: 2rem 0 1rem;
}

.wall {
  position: relative;
  height: 24rem;
  background: var(--wall);
  border-radius: var(--radius-lg);
  overflow: hidden;
  --px: 0;
  --py: 0;
  --par: 0;
}

.label-slot {
  position: absolute;
  width: min(15rem, 68%);
  transform: translate3d(
    calc(var(--px) * -6px * var(--f)),
    calc(var(--py) * -6px * var(--f) + var(--par) * 24px * var(--f)),
    0
  );
  transition: transform 240ms var(--ease);
}

.slot-1 {
  top: 1.5rem;
  left: 1.25rem;
}
.slot-2 {
  top: 11.5rem;
  right: 1.25rem;
}
.slot-3 {
  display: none;
  top: 21rem;
  left: 22%;
}

@media (min-width: 600px) {
  .slot-3 {
    display: block;
  }
  .wall {
    height: 32rem;
  }
  .slot-2 {
    top: 8.5rem;
  }
  .slot-3 {
    top: 18.5rem;
  }
}

.label {
  position: relative;
  margin: 0;
  padding: 1rem 1.125rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-label);
  transform: rotate(var(--rot, 0deg));
}

.label p {
  max-width: none;
}

.label-artist {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.label-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0.15rem 0 0.35rem;
}

.label-title i {
  font-weight: 400;
}

.label-meta {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.label-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}

.sticker {
  position: absolute;
  top: -6px;
  right: -6px;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    gap: 1.5rem;
  }
  .hero-copy {
    grid-column: 1 / span 6;
    padding-right: 1.5rem;
  }
  .wall {
    grid-column: 7 / span 6;
    height: 34rem;
  }
  .slot-1 {
    top: 3rem;
    left: 2rem;
  }
  .slot-2 {
    top: 11.5rem;
    right: 2rem;
  }
  .slot-3 {
    top: 21.5rem;
    left: 4.5rem;
  }
}

/* ---------- 3. Problem ---------- */

.band {
  background: var(--wall);
}

.problem {
  margin-top: var(--rhythm);
  padding-block: clamp(4rem, 2rem + 6vw, 7rem);
}

.problem-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  line-height: 1.3;
  max-width: 30ch;
}

.problem-after {
  margin-top: 1.75rem;
  color: var(--ink-muted);
  font-size: 1rem;
}

.dup {
  position: relative;
  white-space: nowrap;
}

.dup-old {
  position: relative;
  display: inline-block;
}

.dup-old::after {
  content: "";
  position: absolute;
  left: -0.05em;
  right: -0.05em;
  top: 55%;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
}

.dup-new {
  display: inline-block;
  margin-left: 0.35em;
  color: var(--accent);
}

@media (min-width: 900px) {
  .problem {
    min-height: 60vh;
    display: flex;
    align-items: center;
  }
  .problem-inner {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .problem-inner > * {
    grid-column: 5 / span 8;
    justify-self: end;
  }
}

/* ---------- 4. How it works ---------- */

.how {
  margin-top: var(--rhythm);
}

.ledger {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.ledger > li {
  display: grid;
  gap: 0.75rem 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.verb {
  font-size: 2rem;
  letter-spacing: -0.01em;
}

.ledger > li > p {
  color: var(--ink);
}

.specimen {
  margin-top: 0.5rem;
}

.spec-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-label);
}

.spec-card:not(ul) {
  display: grid;
  gap: 0.4rem;
  justify-items: start;
}

.mini-label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.mini-input {
  display: block;
  width: 100%;
  padding: 0.45rem 0.65rem;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

.mini-btn {
  margin-top: 0.35rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transform: scale(0.7);
  transform-origin: left center;
}

.history {
  list-style: none;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.history li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.history li + li {
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
}

.sheet {
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: var(--shadow-lift);
}

.mini-sheet {
  padding: 1rem 1.1rem;
  font-size: 0.8125rem;
}

.sheet-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding-bottom: 0.45rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--ink);
}

.sheet-row {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.sheet-row i {
  margin-right: auto;
}

.sold-word {
  color: var(--accent);
  font-weight: 600;
}

@media (min-width: 900px) {
  .ledger > li {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    padding: 2.5rem 0;
  }
  .verb {
    grid-column: 1 / span 3;
  }
  .ledger > li > p {
    grid-column: 4 / span 5;
    padding-top: 0.4rem;
  }
  .specimen {
    grid-column: 9 / span 4;
    margin-top: 0;
  }
}

/* ---------- 5. Editions (the peak) ---------- */

.editions {
  margin-top: var(--rhythm);
}

.editions-head {
  text-align: center;
}

.editions-head h2,
.editions-head p {
  margin-inline: auto;
}

.editions-head p {
  margin-top: 1.25rem;
}

.strip-track {
  position: relative;
}

.strip-pin {
  padding-block: 2.5rem;
}

.summary {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-align: center;
  margin: 0 auto 1.75rem;
}

.strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.5rem 0.6rem;
}

.copy {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  width: 100%;
  min-height: 44px;
  padding: 0.35rem 0.15rem;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 18%;
  background: var(--card);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-label);
  transition: transform 200ms var(--ease);
}

.etching {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--ink);
  opacity: 0.7;
  overflow: visible;
}

.copy .dot {
  position: absolute;
  top: -6px;
  right: -6px;
  transform: scale(0);
  opacity: 0;
  transition:
    transform 200ms var(--ease),
    opacity 200ms var(--ease);
}

.copy[aria-pressed="true"] .dot {
  transform: scale(1);
  opacity: 1;
  animation: press 360ms var(--ease);
}

.copy:hover .frame {
  transform: translateY(-2px);
}

.copy-no {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

.copy-place {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.2;
  white-space: nowrap;
}

.dup-check {
  display: grid;
  justify-items: center;
  text-align: center;
  margin-top: 2rem;
}

.dup-demo {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  margin-bottom: 0.6rem;
}

.dup-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.dup-field .mini-input {
  width: 4rem;
  color: var(--ink);
}

.mini-input.is-error {
  border: 2px solid var(--accent);
}

.error-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sold-text);
}

@media (min-width: 900px) {
  .strip {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 1rem;
    max-width: 66rem;
    margin-inline: auto;
  }
}

/* Pinning only when motion is welcome; reduced motion leaves the section at normal height. */
@media (prefers-reduced-motion: no-preference) {
  .js .strip-track {
    height: 120vh;
  }
  .js .strip-pin {
    position: sticky;
    top: 8vh;
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .js .strip-track {
    height: 110vh;
  }
  .js .strip-pin {
    top: 22vh;
  }
}

/* ---------- 6. Pinboard ---------- */

.sheets {
  margin-top: var(--rhythm);
}

.pinboard {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
}

.pin {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.pin-text h3 {
  margin-bottom: 0.5rem;
}

.pin-text p {
  color: var(--ink-muted);
}

.pin > :first-child {
  transition:
    transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

@media (hover: hover) {
  .pin > :first-child:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
  }
}

.consign {
  padding: 1.5rem;
  font-size: 0.875rem;
}

.consign .sheet-head {
  font-size: 1.0625rem;
}

.sheet-artist {
  margin: 0.4rem 0 0.75rem;
  font-weight: 600;
}

.consign table {
  width: 100%;
  border-collapse: collapse;
}

.consign td {
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.consign td:first-child {
  width: 1.5rem;
  color: var(--ink-muted);
  padding-left: 0;
}

.consign td:last-child {
  text-align: right;
  padding-right: 0;
}

.consign tfoot td {
  border-bottom: 0;
  border-top: 1px solid var(--ink);
  font-weight: 600;
  padding-left: 0;
}

.sheet-note {
  margin-top: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.signatures span {
  padding-top: 0.35rem;
  border-top: 1px solid var(--ink);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.panel {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-label);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  min-height: 44px;
  min-width: 44px;
  padding: 0 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font: 500 0.9375rem/1 var(--font-body);
  cursor: pointer;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink-muted);
}

#filter-search {
  color: var(--ink);
}

#filter-search:empty::before {
  content: "Search";
  color: var(--ink-muted);
}

.filter-count {
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.file-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--wall);
  border-radius: var(--radius-lg);
  min-width: 0;
}

.file-wrap > div:last-child {
  min-width: 0;
}

.file {
  position: relative;
  flex: none;
  width: 3.2rem;
  height: 4rem;
  background: var(--card);
  border: 1px solid var(--rule-strong);
  clip-path: polygon(0 0, 70% 0, 100% 24%, 100% 100%, 0 100%);
  display: grid;
  place-items: end center;
  padding-bottom: 0.5rem;
}

.file::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 24%;
  background: var(--rule);
}

.file-ext {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.file-name {
  font-weight: 600;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.file-code {
  display: block;
  margin-top: 0.35rem;
  font:
    0.75rem/1.5 ui-monospace,
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.day-night {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rule);
}

.half-label {
  padding: 1.25rem;
  min-width: 0;
}

.half-label p {
  max-width: none;
}

.half-label .label-foot {
  font-size: 0.8125rem;
}

.half-label .badge {
  white-space: nowrap;
}

.is-day {
  background: #efe8db;
  color: #1c1a17;
}
.is-day .label-meta,
.is-day .label-foot > span:last-child {
  color: #5c554b;
}
.is-day .label-foot {
  border-color: #d9d0c0;
}
.is-day .badge {
  background: #f3e3c3;
  color: #6a4708;
}

.is-night {
  background: #12100e;
  color: #ede6da;
}
.is-night .label-meta,
.is-night .label-foot > span:last-child {
  color: #b3aa9b;
}
.is-night .label-foot {
  border-color: #3a352f;
}
.is-night .badge {
  background: #3f3115;
  color: #f2d9a4;
}

@media (min-width: 900px) {
  .pinboard {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
    row-gap: 3.5rem;
  }
  .pin-consign {
    grid-column: span 7;
  }
  .pin-filters {
    grid-column: span 5;
  }
  .pin-backup {
    grid-column: span 5;
    margin-top: 2rem;
  }
  .pin-night {
    grid-column: span 7;
    margin-top: 2rem;
  }
}

/* ---------- 7. See it ---------- */

.see-it {
  margin-top: var(--rhythm);
  text-align: center;
}

.see-it > p {
  margin: 1.25rem auto 0;
}

.window {
  margin: 2.5rem 0 1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  text-align: left;
}

.window-bar {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.window iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
  background: var(--paper);
}

@media (min-width: 900px) {
  .window iframe {
    height: 720px;
  }
}

/* ---------- 8. Yours ---------- */

.yours {
  margin-top: var(--rhythm);
  display: grid;
  gap: 2.5rem;
}

.yours-copy p {
  margin-top: 1.25rem;
  color: var(--ink-muted);
}

.register {
  list-style: none;
  margin: 0;
  padding: 0;
}

.register li {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  line-height: 1.3;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.register li:first-child {
  border-top: 1px solid var(--rule);
}

@media (min-width: 900px) {
  .yours {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
    align-items: start;
  }
  .yours-copy {
    grid-column: 1 / span 5;
  }
  .register {
    grid-column: 6 / span 7;
    padding-left: 2rem;
  }
}

/* ---------- 9. Close ---------- */

.close {
  margin-top: var(--rhythm);
  padding-block: 6rem;
  text-align: center;
}

.close-inner {
  display: grid;
  justify-items: center;
}

.close-inner > p {
  margin-top: 1.25rem;
}

.close-inner h2 {
  font-size: clamp(2.2rem, 1.28rem + 4vw, 4.4rem);
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.close-label-wrap {
  position: relative;
  width: min(20rem, 100%);
  margin-bottom: 3rem;
}

.close-label {
  text-align: left;
  display: grid;
  gap: 0.6rem;
  justify-items: start;
}

.close-label .label-title {
  margin: 0;
}

.close-label .label-foot {
  width: 100%;
  margin-top: 0.25rem;
}

.line {
  display: block;
  height: 0.6rem;
  border-radius: 2px;
  background: var(--rule);
  transform-origin: left center;
}

.close-label .label-foot .line {
  height: 0.85rem;
}

.close-dot {
  position: absolute;
  top: 50%;
  right: -1.6rem;
  margin-top: -7px;
}

.close .btn {
  margin-top: 2rem;
}

@media (min-width: 900px) {
  .close {
    min-height: 80vh;
    display: flex;
    align-items: center;
  }
}

/* ---------- 10. Footer ---------- */

.site-footer {
  padding-block: 2rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--ink);
  text-underline-offset: 4px;
}

/* ---------- Motion (only when motion is welcome and JS is running) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Hero entrance */
  .js .hero-copy,
  .js .wall .label {
    opacity: 0;
    transition:
      opacity 600ms var(--ease),
      transform 600ms var(--ease);
  }
  .js .hero-copy {
    transform: translateY(12px);
  }
  .js .wall .label {
    transform: translateY(12px) rotate(var(--rot));
    transition-delay: calc(200ms + var(--i) * 120ms);
  }
  .js.is-ready .hero-copy,
  .js.is-ready .wall .label {
    opacity: 1;
    transform: rotate(var(--rot, 0deg));
  }
  .js .hero-dot {
    transform: scale(0);
  }
  .js.is-ready .hero-dot {
    animation: press 360ms var(--ease) 1000ms both;
  }

  /* Problem: strike the duplicate, then correct it */
  .js .problem .dup-old::after {
    transform: scaleX(0);
    transition: transform 500ms var(--ease) 200ms;
  }
  .js .problem .dup-new {
    opacity: 0;
    transition: opacity 400ms var(--ease) 750ms;
  }
  .js .problem .is-in .dup-old::after {
    transform: scaleX(1);
  }
  .js .problem .is-in .dup-new {
    opacity: 1;
  }

  /* Ledger specimens */
  .js .specimen[data-reveal] {
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity 500ms var(--ease),
      transform 500ms var(--ease);
  }

  /* Pinboard objects */
  .js .pin[data-reveal] {
    opacity: 0;
    transform: translateY(10px);
    transition:
      opacity 500ms var(--ease),
      transform 500ms var(--ease);
    transition-delay: calc(var(--i) * 90ms);
  }

  /* See it window */
  .js .window[data-reveal] {
    opacity: 0;
    transition: opacity 600ms var(--ease);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  /* Close label fills in, then the dot presses on */
  .js .close-label .line {
    transform: scaleX(0);
    transition: transform 400ms var(--ease);
    transition-delay: calc(var(--i) * 120ms);
  }
  .js .close-dot {
    transform: scale(0);
  }
  .js .is-in .close-label .line {
    transform: scaleX(1);
  }
  .js .is-in .close-dot {
    animation: press 360ms var(--ease) 1000ms both;
  }
}

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