/* museumOS™ — themuseumos.com
   Palette is lapis (the pigment museums were built on) against a cool
   gallery-neutral ground. One display sans, one text serif used exactly
   once, and a mono reserved for collection data, where fielded type is
   actually true. */

:root {
  --canvas: #f6f7f9;
  --paper: #ffffff;
  --ink: #0e1014;
  --ink-2: #4b5162;
  --ink-3: #767d8f;
  --line: #e5e8ee;
  --line-2: #d6dbe4;
  --lapis: #2b45cf;
  --lapis-deep: #1e31a4;
  --lapis-wash: #eef1fd;
  --green: #0f9d6e;

  --sans: "Instrument Sans", "Instrument Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1120px;
  --narrow: 720px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  --shadow-sm: 0 1px 2px rgba(14, 16, 20, 0.05);
  --shadow-card: 0 1px 2px rgba(14, 16, 20, 0.04), 0 10px 28px -16px rgba(14, 16, 20, 0.14);
  --shadow-hero: 0 2px 6px rgba(14, 16, 20, 0.05), 0 36px 70px -34px rgba(22, 32, 86, 0.34);
}

/* Metric-matched fallbacks so the swap to the webfont doesn't shift layout. */
@font-face {
  font-family: "Instrument Fallback";
  src: local("Helvetica Neue"), local("Arial");
  size-adjust: 98%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 103%;
  ascent-override: 94%;
  descent-override: 26%;
  line-gap-override: 0%;
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.1;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--lapis); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--lapis-deep); }

:focus-visible {
  outline: 2px solid var(--lapis);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 60;
}
.skip:focus { left: 0; }

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font: inherit;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.72rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--lapis);
  border-color: var(--lapis);
  color: #fff;
  box-shadow: 0 1px 2px rgba(14, 16, 20, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-primary:hover {
  background: var(--lapis-deep);
  border-color: var(--lapis-deep);
  color: #fff;
  transform: translateY(-1px);
}
.btn-primary:active { transform: none; }

.btn-invert {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}
.btn-invert:hover {
  background: #eef0f6;
  border-color: #eef0f6;
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-sm { padding: 0.5rem 0.85rem; font-size: 0.9375rem; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}
.masthead-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.035em;
}
.wordmark .mark { color: var(--lapis); flex: none; }
.wm-text { display: inline-flex; align-items: baseline; }
.wm-tm {
  font-size: 0.46em;
  font-weight: 600;
  line-height: 1;
  position: relative;
  top: -0.66em;
  margin-left: 0.1em;
  color: var(--ink-3);
  letter-spacing: 0;
}

.masthead-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.masthead-nav > a:not(.btn) {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.masthead-nav > a:not(.btn):hover { color: var(--ink); }
.masthead-nav > a[aria-current="page"] { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}
/* A single soft wash of pigment behind the record — the page's only gradient. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 150%;
  background:
    radial-gradient(58% 52% at 78% 30%, rgba(43, 69, 207, 0.13), transparent 68%),
    radial-gradient(46% 46% at 12% 8%, rgba(43, 69, 207, 0.055), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.45rem, 5.2vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin-bottom: 1.1rem;
  text-wrap: pretty;
}
.lead {
  font-size: clamp(1.075rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34ch;
}
.hero-cta { margin: 1.9rem 0 0.75rem; }
.hero-note {
  font-size: 0.9375rem;
  color: var(--ink-3);
  margin: 0;
}

/* ---------- the object record ---------- */

.record {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hero);
  overflow: hidden;
  max-width: 460px;
}
.record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe, #fff);
}
.record-kicker {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.record-status {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-2);
  background: #f2f6f4;
  border: 1px solid #dcebe4;
  border-radius: 999px;
  padding: 0.2rem 0.6rem 0.2rem 0.5rem;
}
.record-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}

.record-body { padding: 1.2rem 1.15rem 1.05rem; }
.record-accession {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--lapis);
  margin: 0 0 0.35rem;
}
.record-title {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.024em;
  margin: 0 0 0.2rem;
}
.record-byline {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin: 0 0 1.05rem;
}

.record-fields { margin: 0; display: grid; gap: 0; }
.record-row {
  display: grid;
  grid-template-columns: 6.9rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.record-row dt {
  font-family: var(--mono);
  font-size: 0.6563rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.record-row dd {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink);
}

.record-media {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--line);
  background: #fafbfd;
}
.record-media .tile {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: linear-gradient(145deg, #e8ecfa, #f7f8fc);
  flex: none;
}
.record-media .tile:nth-child(2) { background: linear-gradient(145deg, #dfe6f8, #f1f4fb); }
.record-media .tile:nth-child(3) { background: linear-gradient(145deg, #eef0f5, #fafbfd); }
.record-media-note {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-left: 0.15rem;
}

/* ---------- product scope ---------- */

.scope {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--line);
  background: var(--canvas);
}
.scope h2 {
  font-size: clamp(1.95rem, 3.6vw, 2.75rem);
  letter-spacing: -0.034em;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: 18ch;
}

.scope-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.scope-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.scope-item:hover {
  border-color: #c8d0ee;
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.scope-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--lapis-wash);
  color: var(--lapis);
  margin-bottom: 1rem;
}
.scope-item h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin-bottom: 0.35rem;
}
.scope-item p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Reporting reads across everything above it, so it spans the row. */
.scope-item.is-wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem;
}
.scope-item.is-wide .scope-ico { margin-bottom: 0; flex: none; }
.scope-item.is-wide p { max-width: 62ch; }

/* ---------- proposition ---------- */

.thesis {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
}
.thesis-head {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  letter-spacing: -0.014em;
  line-height: 1.08;
  margin-bottom: 1.5rem;
}
.thesis-body {
  font-size: clamp(1.05rem, 1.4vw, 1.1875rem);
  line-height: 1.62;
  color: var(--ink-2);
  margin: 0 auto;
  max-width: 58ch;
  text-wrap: pretty;
}

/* ---------- free ---------- */

.free {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  text-align: center;
}
.free::before {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 130%;
  background: radial-gradient(50% 60% at 50% 100%, rgba(65, 92, 232, 0.4), transparent 70%);
  pointer-events: none;
}
.free .wrap { position: relative; }
.free h2 {
  font-size: clamp(2rem, 3.8vw, 2.85rem);
  letter-spacing: -0.034em;
  margin-bottom: 1.1rem;
}
.free p {
  color: #b7bdcd;
  font-size: clamp(1.0125rem, 1.35vw, 1.125rem);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 54ch;
  text-wrap: pretty;
}
.free-cta { margin-top: 2.4rem; }

/* ---------- prose pages ---------- */

.doc-head {
  padding: clamp(3rem, 6.5vw, 5rem) 0 clamp(1.1rem, 2.2vw, 1.6rem);
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(43, 69, 207, 0.07), transparent 70%),
    var(--canvas);
}
.doc-head h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.15rem);
  letter-spacing: -0.038em;
}
.doc-head .lead { margin-top: 1rem; max-width: 52ch; }
.doc-updated {
  margin: 1rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.doc-body {
  padding-block: clamp(1.25rem, 2.5vw, 1.75rem) clamp(3.5rem, 7vw, 5.5rem);
  color: var(--ink-2);
}
.doc-body > :first-child { margin-top: 0; }
.doc-body h2 {
  font-size: 1.4375rem;
  letter-spacing: -0.026em;
  color: var(--ink);
  margin: 2.4rem 0 0.75rem;
}
.doc-body h3 {
  font-size: 1.0625rem;
  color: var(--ink);
  margin: 1.8rem 0 0.5rem;
}
.doc-body ul,
.doc-body ol { margin: 0 0 1.05em; padding-left: 1.2rem; }
.doc-body li { margin-bottom: 0.4rem; }
.doc-body li::marker { color: var(--ink-3); }
.doc-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}
.doc-body strong { color: var(--ink); font-weight: 600; }
.doc-body code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--lapis-wash);
  border-radius: 4px;
  padding: 0.1em 0.34em;
}

/* ---------- colophon ---------- */

.colophon {
  border-top: 1px solid var(--line);
  background: var(--canvas);
  padding: clamp(2.75rem, 5vw, 3.75rem) 0 2rem;
}
.colophon-inner,
.colophon-legal {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.colophon-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.colophon-brand p {
  margin: 0.7rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-3);
  max-width: 32ch;
}
.colophon-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
}
.colophon-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.colophon-nav a:hover { color: var(--ink); }

.colophon-legal {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  justify-content: space-between;
}
.colophon-legal p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.75rem;
  }
  .lead { max-width: 46ch; }
  .record { max-width: 470px; }
}

@media (max-width: 880px) {
  .scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .masthead-nav { gap: 1rem; }
  .masthead-nav > a:not(.btn) { display: none; }
  .scope-grid { grid-template-columns: minmax(0, 1fr); }
  .scope-item.is-wide { display: block; }
  .scope-item.is-wide .scope-ico { margin-bottom: 1rem; }
  .record-row { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .colophon-inner { flex-direction: column; gap: 1.75rem; }
}

/* ---------- motion ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .hero .lead,
  .hero-cta,
  .hero-note,
  .hero-figure {
    animation: rise 0.62s cubic-bezier(0.22, 0.68, 0.35, 1) backwards;
  }
  .hero h1 { animation-delay: 0.04s; }
  .hero .lead { animation-delay: 0.11s; }
  .hero-cta { animation-delay: 0.18s; }
  .hero-note { animation-delay: 0.23s; }
  .hero-figure { animation-delay: 0.15s; animation-duration: 0.78s; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
