/* =========================================================================
   LexOS — public site
   World: the embossed legal instrument. One continuous sheet of document
   stock; hierarchy is relief (pressed in / raised out), never floating cards.
   One committed accent: the violet aniline stamp-pad ink of an Arab registry.
   ========================================================================= */

/* ---------- faces ------------------------------------------------------ */

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/plex-ar-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/plex-la-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/plex-ar-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/plex-la-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/plex-ar-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/plex-la-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/plex-ar-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/plex-la-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- the stock -------------------------------------------------- */

:root {
  /* the sheet everything is pressed into */
  --stock: #e4e2dc;
  --stock-raised: #f1efea;
  --stock-high: #faf9f6;
  --stock-pressed: #d5d2ca;
  --stock-deep: #c8c4bb;

  /* document ink */
  --ink: #191d24;
  --ink-2: #4e545e;
  --ink-3: #767b84;

  /* the stamp pad */
  --stamp: #4a2c6b;
  --stamp-deep: #35204d;
  --stamp-lift: #6b4a8e;
  --stamp-pale: #c9b6e0;
  --stamp-wash: #ded3ec;

  /* engraved edges: light catches the top, shadow gathers below */
  --edge-light: rgba(255, 255, 255, 0.92);
  --edge-dark: rgba(25, 29, 36, 0.13);
  --edge-hair: rgba(25, 29, 36, 0.11);

  --raise-1: 0 1px 0 var(--edge-light) inset, 0 -1px 0 rgba(25, 29, 36, 0.05) inset,
    0 1px 2px rgba(25, 29, 36, 0.06), 0 6px 16px -6px rgba(25, 29, 36, 0.14);
  --raise-2: 0 1px 0 var(--edge-light) inset, 0 -1px 0 rgba(25, 29, 36, 0.06) inset,
    0 2px 4px rgba(25, 29, 36, 0.07), 0 18px 40px -14px rgba(25, 29, 36, 0.28);
  --press-1: 0 1px 2px rgba(25, 29, 36, 0.11) inset,
    0 8px 18px -12px rgba(25, 29, 36, 0.3) inset, 0 1px 0 var(--edge-light);
  --press-2: 0 2px 4px rgba(25, 29, 36, 0.14) inset,
    0 16px 34px -16px rgba(25, 29, 36, 0.38) inset, 0 1px 0 var(--edge-light);

  --r-plate: 22px;
  --r-well: 18px;
  --r-control: 13px;
  --r-round: 999px;

  /* one face, the product's own. Hierarchy is weight and size, not a second family. */
  --sans: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
  --kufi: var(--sans);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 1180px;
  --rhythm: clamp(4.5rem, 9vw, 8.5rem);

  --settle: cubic-bezier(0.16, 0.9, 0.24, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--stock);
  /* paper grain — the sheet is a material, not a color */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='0.055'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.85;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  /* width/height attributes are kept for CLS; height:auto lets aspect-ratio win */
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--stamp);
  color: #fff;
}

/* Latin strings inside Arabic prose keep their own direction and tracking */
.latin {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.shell {
  width: min(var(--measure), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

/* ---------- type ------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--kufi);
  margin: 0;
  text-wrap: balance;
}

h1,
h2 {
  font-weight: 700;
}

h1 {
  font-size: clamp(2.3rem, 4.9vw, 4.1rem);
  line-height: 1.32;
}

h2 {
  font-size: clamp(1.85rem, 3.7vw, 3.05rem);
  line-height: 1.34;
}

h3 {
  font-size: clamp(1.125rem, 1.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.45;
}

p {
  margin: 0;
}

.lede {
  max-width: 46ch;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
  line-height: 1.8;
}

.prose {
  max-width: 62ch;
  color: var(--ink-2);
}

[lang="en"] h1,
[lang="en"] h2,
[lang="en"] h3 {
  letter-spacing: -0.025em;
}

/* ---------- relief primitives ------------------------------------------ */

.plate {
  background: linear-gradient(180deg, var(--stock-high), var(--stock-raised));
  border-radius: var(--r-plate);
  box-shadow: var(--raise-1);
}

.well {
  background: linear-gradient(180deg, var(--stock-pressed), var(--stock));
  border-radius: var(--r-well);
  box-shadow: var(--press-1);
}

/* ---------- controls: they press ---------------------------------------- */

.act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 54px;
  padding: 0 1.6rem;
  border: 0;
  border-radius: var(--r-control);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms var(--settle), box-shadow 140ms var(--settle),
    background-color 140ms var(--settle), color 140ms var(--settle);
}

.act-stamp {
  background: linear-gradient(180deg, var(--stamp-lift), var(--stamp));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 -1px 0 rgba(0, 0, 0, 0.22) inset, 0 2px 3px rgba(53, 32, 77, 0.24),
    0 14px 26px -12px rgba(53, 32, 77, 0.62);
}

.act-stamp:hover {
  background: linear-gradient(180deg, var(--stamp), var(--stamp-deep));
}

.act-stamp:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(53, 32, 77, 0.4) inset,
    0 1px 0 rgba(255, 255, 255, 0.2);
}

.act-plain {
  background: linear-gradient(180deg, var(--stock-high), var(--stock-raised));
  color: var(--ink);
  box-shadow: var(--raise-1);
}

.act-plain:hover {
  color: var(--stamp);
}

.act-plain:active {
  transform: translateY(2px);
  box-shadow: var(--press-1);
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- the sheet's top edge ---------------------------------------- */

.edge {
  position: sticky;
  top: 0;
  z-index: 40;
  transition: background-color 260ms var(--settle), box-shadow 260ms var(--settle),
    backdrop-filter 260ms var(--settle);
}

.edge.pressed {
  background: rgba(228, 226, 220, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--edge-light) inset, 0 1px 0 var(--edge-hair),
    0 10px 30px -22px rgba(25, 29, 36, 0.55);
}

.edge-row {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 78px;
}

/* the -transparent lockups have the supplied white plate keyed out; the originals
   (lexos-lockup.png / lexos-wordmark.png) still carry it — do not swap them back */
.mark img {
  width: 132px;
  height: auto;
}

.ways {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.9rem);
  margin-inline-end: auto;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.ways a {
  position: relative;
  padding-block: 0.35rem;
  transition: color 140ms var(--settle);
}

.ways a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--stamp);
  transform: scaleX(0);
  transform-origin: var(--origin, right);
  transition: transform 220ms var(--settle);
}

[dir="ltr"] .ways a::after {
  --origin: left;
}

.ways a:hover {
  color: var(--ink);
}

.ways a:hover::after {
  transform: scaleX(1);
}

.edge-acts {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tongue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 40px;
  padding-inline: 0.7rem;
  border-radius: var(--r-round);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  box-shadow: var(--press-1);
  transition: color 140ms var(--settle);
}

.tongue:hover {
  color: var(--stamp);
}

.edge-acts .act {
  min-height: 44px;
  padding-inline: 1.1rem;
  font-size: 0.9375rem;
}

/* ---------- hero -------------------------------------------------------- */

.opening {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5rem) var(--rhythm);
}

/* engraved guilloche — security-document linework, not decoration */
.guilloche {
  position: absolute;
  inset-block-start: -14vh;
  inset-inline-start: -18vw;
  width: min(1150px, 118vw);
  color: var(--ink);
  opacity: 0.09;
  pointer-events: none;
  z-index: 0;
}

.opening > .shell {
  position: relative;
  z-index: 1;
}

.opening-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  /* how far the tipped plate runs off the sheet's edge */
  --bleed: max(var(--gutter), calc((100vw - var(--measure)) / 2));
}

.opening h1 .said {
  display: block;
  color: var(--stamp);
}

.opening .lede {
  margin-top: 1.75rem;
}

.opening .acts {
  margin-top: 2.25rem;
}

.attest {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--ink-3);
}

.attest svg {
  flex: none;
  color: var(--stamp);
}

/* the screenshot is tipped into the sheet, not floated above it */
.tipped {
  position: relative;
  padding: clamp(0.7rem, 1.4vw, 1.1rem);
  border-radius: calc(var(--r-well) + 8px);
  box-shadow: var(--press-2);
  background: linear-gradient(180deg, var(--stock-pressed), var(--stock));
}

.tipped img {
  width: 100%;
  border-radius: var(--r-well);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 5px rgba(25, 29, 36, 0.16),
    0 26px 50px -26px rgba(25, 29, 36, 0.55);
}

/* the plate runs off the sheet's edge; the bled corners lose their radius */
.opening .tipped-tall {
  margin-inline-end: calc(var(--bleed) * -1);
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.opening .tipped-tall img {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.tipped-tall img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top right;
}

[dir="ltr"] .tipped-tall img {
  object-position: top left;
}

/* A seal is applied across the edge of an affixed photograph. This one straddles
   the seam: an opaque disc pressed into the stock, half over the tipped plate. */
.seal {
  position: absolute;
  /* leans onto the plate so it never lands on the lede's measure */
  inset-block-end: 92px;
  inset-inline-start: -56px;
  width: 184px;
  height: 184px;
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, var(--stock-high), var(--stock) 62%, var(--stock-pressed));
  box-shadow: 0 1px 0 var(--edge-light), 0 1px 3px rgba(25, 29, 36, 0.14) inset,
    0 14px 30px -14px rgba(25, 29, 36, 0.45) inset,
    0 10px 28px -10px rgba(25, 29, 36, 0.4);
}

.seal-disc {
  width: 100%;
  height: 100%;
  color: var(--stamp);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55));
}

/* the seal does not spin — it comes down once and presses */
.js .seal-press,
.js .seal-standalone.settle {
  opacity: 0;
  transform: scale(1.22) rotate(-9deg);
  filter: blur(4px);
  transition: opacity 620ms var(--settle), transform 620ms var(--settle),
    filter 620ms var(--settle);
  transition-delay: 340ms;
}

.js .seal-press.set,
.js .seal-standalone.settle.set {
  opacity: 1;
  transform: none;
  filter: none;
}

.seal-standalone {
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, var(--stock-high), var(--stock) 62%, var(--stock-pressed));
  box-shadow: 0 1px 0 var(--edge-light), 0 1px 3px rgba(25, 29, 36, 0.14) inset,
    0 12px 26px -12px rgba(25, 29, 36, 0.42) inset;
}

.seal-standalone .seal-disc {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55));
}

/* ---------- the boundary: what stays, what crosses ---------------------- */

.head-block {
  max-width: 40ch;
  margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}

.head-block .prose {
  margin-top: 1.25rem;
}

.boundary {
  padding-block: var(--rhythm);
}

/* the asymmetry is the argument: a great deal stays, very little leaves */
.ledger {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 0.76fr);
  align-items: start;
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.column {
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
}

.column-stays {
  background: linear-gradient(180deg, var(--stock-high), var(--stock-raised));
  border-radius: var(--r-plate);
  box-shadow: var(--raise-2);
}

.column-crosses {
  background: linear-gradient(180deg, var(--stock-deep), var(--stock-pressed));
  border-radius: var(--r-plate);
  box-shadow: var(--press-2);
}

.column h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.column h3 svg {
  flex: none;
}

.column-stays h3 svg {
  color: var(--stamp);
}

.column-crosses h3 svg {
  color: var(--ink-3);
}

.column > p {
  margin-top: 0.6rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.column ul {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.column li {
  padding-block: 0.72rem;
  border-top: 1px solid var(--edge-hair);
  font-size: 1.0625rem;
}

.column-stays li {
  font-weight: 400;
}

.column-crosses li {
  color: var(--ink-2);
}

.boundary-note {
  margin-top: 1.75rem;
  color: var(--ink-3);
  font-size: 0.9375rem;
}

/* ---------- index of the office's work ---------------------------------- */

.work {
  padding-block: var(--rhythm);
}

.index {
  border-top: 1px solid var(--edge-hair);
}

.entry {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  align-items: baseline;
  gap: clamp(1rem, 3vw, 3rem);
  padding-block: clamp(1.4rem, 2.2vw, 2rem);
  border-bottom: 1px solid var(--edge-hair);
  transition: background-color 240ms var(--settle),
    box-shadow 240ms var(--settle), padding-inline 240ms var(--settle);
  border-radius: var(--r-well);
  padding-inline: 0;
}

.entry:hover {
  background: linear-gradient(180deg, var(--stock-pressed), var(--stock));
  box-shadow: var(--press-1);
  border-color: transparent;
  padding-inline: clamp(0.9rem, 1.8vw, 1.5rem);
}

.entry dt {
  font-family: var(--kufi);
  font-size: clamp(1.3rem, 2.2vw, 1.95rem);
  font-weight: 700;
  line-height: 1.4;
}

.entry dd {
  margin: 0;
  color: var(--ink-2);
  max-width: 58ch;
}

/* ---------- proof: the product doing its job ---------------------------- */

.proof {
  padding-block: var(--rhythm);
}

.exhibits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.exhibit figcaption {
  margin-top: 1.1rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 44ch;
}

.exhibit figcaption strong {
  display: block;
  color: var(--ink);
  font-family: var(--kufi);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.exhibit .tipped img {
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: top right;
}

[dir="ltr"] .exhibit .tipped img {
  object-position: top left;
}

/* ---------- custody: roles and audit ------------------------------------ */

.custody {
  padding-block: var(--rhythm);
}

.custody-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.panel {
  padding: clamp(1.25rem, 2.4vw, 1.9rem);
  background: linear-gradient(180deg, var(--stock-high), var(--stock-raised));
  border-radius: var(--r-plate);
  box-shadow: var(--raise-2);
}

.roles {
  margin: 0;
  display: grid;
  gap: 0.25rem;
}

.role {
  display: grid;
  grid-template-columns: minmax(112px, 0.32fr) minmax(0, 1fr);
  gap: clamp(0.75rem, 2vw, 1.5rem);
  align-items: baseline;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--edge-hair);
}

.role:last-child {
  border-bottom: 0;
}

.role dt {
  font-family: var(--kufi);
  font-size: 1.0625rem;
  font-weight: 700;
}

.role dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.assurances {
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.assurances li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  color: var(--ink-2);
}

.assurances svg {
  flex: none;
  margin-top: 0.42em;
  color: var(--stamp);
}

.assurances strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- ownership: the violet instrument ---------------------------- */

.deed {
  position: relative;
  margin-block: var(--rhythm);
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: linear-gradient(168deg, var(--stamp-deep), var(--stamp) 62%, #40265d);
  color: #fff;
  border-radius: clamp(24px, 3vw, 40px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 -1px 0 rgba(0, 0, 0, 0.3) inset, 0 3px 6px rgba(53, 32, 77, 0.24),
    0 40px 80px -40px rgba(53, 32, 77, 0.8);
  overflow: hidden;
  isolation: isolate;
}

.deed::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='0.11'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -1;
}

.deed .head-block {
  max-width: 34ch;
}

.deed h2 {
  color: #fff;
}

.deed .prose {
  color: var(--stamp-pale);
}

.terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.5rem);
}

.term {
  padding: clamp(1.35rem, 2.4vw, 1.9rem);
  border-radius: var(--r-well);
  background: rgba(0, 0, 0, 0.19);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.34) inset,
    0 14px 30px -18px rgba(0, 0, 0, 0.6) inset,
    0 1px 0 rgba(255, 255, 255, 0.13);
}

.term h3 {
  color: #fff;
}

.term p {
  margin-top: 0.65rem;
  color: var(--stamp-pale);
  font-size: 0.9375rem;
  line-height: 1.72;
}

.deed-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.deed-foot p {
  color: var(--stamp-pale);
  font-size: 0.9375rem;
  max-width: 40ch;
}

.deed .act-plain {
  background: linear-gradient(180deg, #fff, #eee7f5);
  color: var(--stamp-deep);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 0 rgba(53, 32, 77, 0.22) inset, 0 2px 4px rgba(0, 0, 0, 0.24),
    0 16px 28px -14px rgba(0, 0, 0, 0.5);
}

.deed .act-plain:hover {
  color: var(--stamp);
}

.deed .act-ghost {
  background: transparent;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32) inset;
}

.deed .act-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.deed .act-ghost:active {
  transform: translateY(2px);
}

/* ---------- close ------------------------------------------------------- */

.close {
  position: relative;
  padding-block: var(--rhythm);
  text-align: center;
}

.close .seal-standalone {
  width: 154px;
  height: 154px;
  margin: 0 auto clamp(1.75rem, 3vw, 2.5rem);
}

.close h2 {
  max-width: 18ch;
  margin-inline: auto;
}

.close .prose {
  margin: 1.5rem auto 0;
  max-width: 52ch;
}

.close .acts {
  justify-content: center;
  margin-top: 2.25rem;
}

.close-note {
  margin-top: 2rem;
  color: var(--ink-3);
  font-size: 0.9375rem;
}

/* ---------- foot -------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--edge-hair);
  box-shadow: 0 1px 0 var(--edge-light) inset;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding-block: clamp(2rem, 4vw, 3rem);
}

.foot img {
  width: 108px;
}

.foot p {
  margin-top: 0.6rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.foot nav a:hover {
  color: var(--stamp);
}

/* ---------- the authored moment: everything presses into the sheet ------
   Nothing rises from below. Every element arrives from above the page, over-
   sized and out of focus, and is pressed down flat — the same gesture as the
   seal. It has to be plainly visible or the world doesn't read. */

.js .settle {
  opacity: 0;
  /* raised off the sheet and out of focus, then pressed flat */
  transform: translateY(30px) scale(1.04);
  filter: blur(9px);
  transition: opacity 780ms var(--settle), transform 780ms var(--settle),
    filter 780ms var(--settle);
  transition-delay: var(--lag, 0ms);
  will-change: transform, opacity, filter;
}

/* The hero is the one place nothing is scrolling, so the press can come from
   above without the page moving the other way underneath it. */
.js .opening .settle {
  transform: translateY(-34px) scale(1.035);
}

.js .settle.set {
  opacity: 1;
  transform: none;
  filter: none;
  will-change: auto;
}

/* the exhibits lift under the pointer, like a plate you could pick up */
.exhibit .tipped,
.column-stays,
.panel {
  transition: transform 320ms var(--settle), box-shadow 320ms var(--settle);
}

.exhibit:hover .tipped {
  transform: translateY(-5px);
}

.exhibit:hover .tipped img {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 10px rgba(25, 29, 36, 0.18),
    0 34px 60px -26px rgba(25, 29, 36, 0.6);
}

.column-stays:hover,
.panel:hover {
  transform: translateY(-3px);
}

/* ---------- adapt ------------------------------------------------------- */

@media (max-width: 1080px) {
  .opening-grid,
  .custody-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .opening-grid {
    gap: clamp(3rem, 8vw, 4rem);
  }

  .tipped-tall img {
    aspect-ratio: 16 / 10;
  }

  .terms {
    grid-template-columns: minmax(0, 1fr);
  }

  .seal {
    inset-block-end: -34px;
    inset-inline-start: -22px;
    width: 138px;
    height: 138px;
  }
}

@media (max-width: 860px) {
  .ways {
    display: none;
  }

  .edge-row {
    justify-content: space-between;
    min-height: 68px;
  }

  .mark {
    margin-inline-end: auto;
  }

  .ledger,
  .exhibits {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .role {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .edge-acts .act-stamp {
    display: none;
  }

  .acts .act {
    width: 100%;
  }

  .guilloche {
    inset-block-start: -6vh;
    opacity: 0.07;
  }

  .seal {
    inset-block-end: -30px;
    inset-inline-start: -16px;
    width: 104px;
    height: 104px;
  }

  .close .seal-standalone {
    width: 124px;
    height: 124px;
  }

  .foot-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Reduced motion removes MOVEMENT, not feedback.
   An earlier version killed every transition on the page with a blanket
   `* { transition-duration: 1ms }`, so a visitor with Windows animations turned
   off got a page where nothing responded to anything — no reveal, no button
   press, no hover. Vestibular triggers are large transforms, parallax and blur;
   an opacity fade and a 140ms control state are not. Keep those. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .settle,
  .js .seal-press,
  .js .seal-standalone.settle {
    transform: none;
    filter: none;
    transition: opacity 420ms ease;
    transition-delay: var(--lag, 0ms);
  }

  .exhibit:hover .tipped,
  .column-stays:hover,
  .panel:hover {
    transform: none;
  }

  .act:active {
    transform: none;
  }
}

@media print {
  .edge,
  .guilloche,
  .seal {
    display: none;
  }

  body {
    background: #fff;
  }
}
