/* Prosper Village: shared styles for the trust site, the games lobby and the documents.
   "Engraved" direction.
   The language of certificates and banknotes: paper, ink, fine-line guilloche.
   The brand gradient becomes iris printing (the rainbow ink banknotes use),
   so the old orb's colours survive as engraving instead of glass. */
:root {
  --paper: #f2ede3;
  --card: #f7f3eb;
  --ink: #1d1b17;
  --muted: #67625a;
  --faint: #9b9488;
  --line: #d6cebd;
  --rule: #1d1b17;
  --logo: brightness(0) saturate(100%);
  --blue: #2f62d6; --purple: #7b4fd6; --pink: #cf3f7c; --orange: #dc5f22; --gold: #c99a12;
  --serif: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --grain-o: .55;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130f; --card: #1a1915; --ink: #ede8dd; --muted: #a59f92; --faint: #6d685e;
    --line: #2f2c25; --rule: #ede8dd; --logo: brightness(0) invert(.93); --grain-o: .25;
    --blue: #6f97ff; --purple: #a988ff; --pink: #ff6fa6; --orange: #ff8a4d; --gold: #f0c64a;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
/* Paper grain over everything, never intercepting clicks */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: var(--grain-o); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .22  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { body::after { mix-blend-mode: screen; } }
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
.wrap { width: min(var(--wrap), 100% - 56px); margin: 0 auto; }
.sc { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }

/* ── Nav ─────────────────────────────────────────── */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 28px 0 0; position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font: 500 19px/1 var(--serif); letter-spacing: -.02em; }
.links { display: flex; align-items: center; gap: 30px; font-size: 14.5px; }
.links a { text-decoration: none; color: var(--muted); position: relative; transition: color .2s; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.links a:hover { color: var(--ink); } .links a:hover::after { transform: scaleX(1); }
.links .write-btn { color: var(--ink); border: 1px solid var(--rule); padding: 8px 16px; border-radius: 999px; transition: background .2s, color .2s; }
.links .write-btn::after { display: none; }
.links .write-btn:hover { background: var(--ink); color: var(--paper); }

/* ── Hero ────────────────────────────────────────── */
.hero { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 24px; min-height: min(86vh, 820px); padding: 40px 0 56px; }
.hero-copy { position: relative; z-index: 1; }
.kicker { display: flex; align-items: center; gap: 14px; color: var(--muted); margin: 0 0 30px; }
.kicker::before { content: ""; width: 40px; height: 1px; background: currentColor; }
.hero h1 { margin: 0; font: 300 clamp(48px, 6.4vw, 96px)/1.04 var(--serif); letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--faint); }
.tagline { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 36px 0 0; color: var(--muted); }
.tagline i { font: 400 15px/1 var(--serif); font-style: normal; color: var(--faint); }
.hero-links { display: flex; gap: 28px; margin-top: 44px; font-size: 15px; }
.hero-links a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.hero-links a span { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .2s; }
.hero-links a:hover span { border-color: var(--ink); }
.rosette-wrap { position: relative; aspect-ratio: 1; width: min(640px, 100%); justify-self: end; margin-right: -40px; }
.rosette-wrap > svg { width: 100%; height: 100%; overflow: visible; }
.seal { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.seal-disc { width: 24%; aspect-ratio: 1; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: 0 0 0 1px var(--rule), 0 0 0 6px var(--paper), 0 0 0 7px var(--rule); }
.seal-disc svg { width: 36%; height: auto; color: var(--ink); }
.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.8s cubic-bezier(.45,.05,.2,1) forwards; animation-delay: var(--dl, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ── Sections ────────────────────────────────────── */
.part { padding: 120px 0 0; }
.head { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: end; padding-bottom: 40px; position: relative; }
.head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule); transform-origin: left; }
.js .head::after { transform: scaleX(0); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.js .head.in::after { transform: scaleX(1); }
.numeral { display: flex; align-items: baseline; gap: 14px; color: var(--muted); margin: 0; }
.numeral b { font: 400 22px/1 var(--serif); color: var(--ink); letter-spacing: 0; text-transform: none; }
h2 { margin: 0; font: 300 clamp(36px, 4.6vw, 60px)/1.04 var(--serif); letter-spacing: -.035em; }
h2 em { font-style: normal; color: var(--faint); }

.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rd, 0s); }
.js .rv.in { opacity: 1; transform: none; }

/* ── Companies: four certificates ───────────────── */
.certs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 48px; }
.cert {
  position: relative; display: flex; flex-direction: column; text-decoration: none;
  background: var(--card); padding: 10px; border: 1px solid var(--rule);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s, opacity .9s ease;
}
.cert:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(40,30,10,.35); }
.cert-in { position: relative; flex: 1; display: flex; flex-direction: column; border: 1px solid var(--line); padding: 0 30px 26px; }
.band { position: relative; height: 92px; margin: 0 -30px; border-bottom: 1px solid var(--line); overflow: hidden; color: var(--tone); }
.band > svg { position: absolute; top: 0; left: 0; width: 200%; height: 100%; }
.cert:hover .band > svg { animation: drift 9s linear infinite; }
@keyframes drift { to { transform: translateX(-50%); } }
.plate {
  position: absolute; left: 30px; top: 50%; transform: translateY(-50%); z-index: 1;
  background: var(--card); border: 1px solid var(--rule); padding: 8px 12px 7px; display: flex; gap: 10px; align-items: baseline; color: var(--ink);
}
.plate b { font: 600 15px/1 var(--serif); letter-spacing: -.01em; }
.plate span { color: var(--muted); }
.cert-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 30px 0 0; min-height: 70px; }
.cert-top img { filter: var(--logo); }
.cert-top .zonos { height: 32px; } .cert-top .buildability { height: 24px; }
.wordmark { font: 600 22px/1 var(--sans); letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.wordmark span { font-weight: 400; color: var(--muted); }
.cert-top .sc { color: var(--muted); text-align: right; }
.cert h3 { margin: 18px 0 0; font: 400 25px/1.2 var(--serif); letter-spacing: -.025em; max-width: 26ch; }
.facts { list-style: none; margin: 22px 0 0; padding: 0; flex: 1; }
.facts li { display: grid; grid-template-columns: 22px 1fr; padding: 11px 0; border-top: 1px dotted var(--faint); color: var(--muted); font-size: 15.5px; }
.facts li::before { content: "—"; color: var(--tone); }
.facts li:last-child { border-bottom: 1px dotted var(--faint); }
sup { font-size: 10px; line-height: 0; margin-left: 2px; }
sup a { text-decoration: none; color: var(--tone, var(--muted)); font-weight: 600; font-family: var(--sans); }
.cert-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; font-size: 15px; }
.cert .go { text-decoration: none; }
.cert .go::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.cert sup a { position: relative; z-index: 2; }
.cert-foot .go { display: inline-flex; gap: 10px; align-items: center; }
.cert-foot .go svg { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.cert:hover .cert-foot .go svg { transform: translateX(5px); }
.cert-foot .sc { color: var(--faint); }

/* ── Beliefs: three columns divided by rules ────── */
.beliefs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; }
.beliefs li { padding: 44px 36px 8px; border-left: 1px solid var(--line); }
.beliefs li:first-child { border-left: 0; padding-left: 0; }
.beliefs .rn { display: block; font: 300 52px/1 var(--serif); letter-spacing: -.04em; color: var(--tone); }
.beliefs h3 { margin: 22px 0 0; font: 400 28px/1.12 var(--serif); letter-spacing: -.03em; }
.beliefs p { margin: 14px 0 0; color: var(--muted); }

/* ── History: a ruled ledger ────────────────────── */
.ledger { margin: 0; padding: 0; list-style: none; }
.ledger li { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 30px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.ledger time { font: 300 56px/1 var(--serif); letter-spacing: -.045em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 16px; }
.ledger time::after { content: ""; flex: 1; height: 1px; margin-right: 8px; background: repeating-linear-gradient(90deg, var(--faint) 0 2px, transparent 2px 6px); transform: translateY(-14px); }
.ledger p { margin: 0; font: 400 24px/1.3 var(--serif); letter-spacing: -.02em; max-width: 34ch; }
.ledger p small { display: block; margin-top: 8px; font: 15.5px/1.5 var(--sans); color: var(--muted); }

/* ── Contact: an envelope ───────────────────────── */
.envelope { position: relative; margin-top: 48px; border: 1px solid var(--rule); padding: 10px; background: var(--card); overflow: hidden; }
.envelope-in { position: relative; border: 1px solid var(--line); padding: 72px 64px 60px; display: grid; gap: 34px; min-height: 400px; }
.envelope-in > * { max-width: 62%; }
.envelope .mini { position: absolute; right: -86px; top: -80px; width: 380px; height: 380px; opacity: .6; pointer-events: none; overflow: visible; }
.envelope h3 { margin: 0; font: 300 clamp(36px, 4.4vw, 62px)/1.05 var(--serif); letter-spacing: -.04em; max-width: 14ch; position: relative; }
.mail { display: inline-block; margin-top: 26px; font: 300 clamp(22px, 2.6vw, 34px)/1.1 var(--serif); letter-spacing: -.025em; text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 4px; transition: color .2s; position: relative; }
.mail:hover { color: var(--pink); }
.envelope .side { position: relative; color: var(--muted); font-size: 15.5px; display: flex; gap: 32px; }
.envelope .side p { max-width: 34ch; }
.envelope .side p { margin: 0; }
.stamp { position: absolute; right: 56px; top: 52px; z-index: 1; width: 92px; height: 112px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--rule); outline: 1px dashed var(--faint); outline-offset: 5px; }
.stamp svg { width: 36px; height: auto; color: var(--ink); }
.stamp .sc { position: absolute; bottom: 8px; font-size: 9px; color: var(--muted); }

/* ── Notes + footer ─────────────────────────────── */
.notes { margin: 120px 0 0; padding: 32px 0 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 240px 1fr; gap: 40px; }
.notes ol { margin: 0; padding: 0 0 0 20px; color: var(--muted); font-size: 14px; display: grid; gap: 8px; }
.notes a { text-underline-offset: 3px; text-decoration-color: var(--line); }
.notes a:hover { text-decoration-color: var(--ink); }
.notes li { scroll-margin-top: 40vh; }
.notes li:target { color: var(--ink); }

footer { margin-top: 64px; padding: 28px 0 44px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; } footer a:hover { color: var(--ink); }
.colophon { font: 400 14px/1.4 var(--sans); }

a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

@media (max-width: 900px) {
  .wrap { width: min(var(--wrap), 100% - 40px); }
  .links { gap: 16px; } .links .hide-m { display: none; }
  .brand-name { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 0 0 24px; gap: 0; }
  .rosette-wrap { order: -1; width: 104vw; max-width: 460px; margin: -8px -30vw 12px auto; }
  .kicker { margin-bottom: 18px; }
  .hero-links { flex-direction: column; gap: 14px; margin-top: 32px; }
  .part { padding-top: 88px; }
  .head { grid-template-columns: 1fr; gap: 16px; padding-bottom: 28px; }
  .certs { grid-template-columns: 1fr; gap: 20px; margin-top: 28px; }
  .cert-in { padding: 0 20px 20px; } .band { margin: 0 -20px; height: 76px; } .plate { left: 20px; }
  .cert h3 { font-size: 22px; }
  .beliefs { grid-template-columns: 1fr; }
  .beliefs li { border-left: 0; border-top: 1px solid var(--line); padding: 28px 0 24px; display: grid; grid-template-columns: 64px 1fr; column-gap: 8px; }
  .beliefs li:first-child { border-top: 0; }
  .beliefs .rn { font-size: 40px; grid-row: span 2; }
  .beliefs h3 { margin: 0; font-size: 25px; }
  .beliefs p { margin-top: 8px; }
  .ledger li { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .ledger time { font-size: 44px; }
  .ledger p { font-size: 20px; }
  .envelope-in { grid-template-columns: 1fr; padding: 140px 22px 30px; min-height: 0; gap: 28px; }
  .stamp { right: 22px; top: 24px; width: 72px; height: 88px; }
  .envelope .mini { width: 260px; height: 260px; right: -72px; top: -68px; }
  .envelope-in > * { max-width: none; } .envelope .side { flex-direction: column; gap: 12px; }
  .notes { grid-template-columns: 1fr; gap: 16px; margin-top: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cert:hover .band > svg { animation: none; }
  .draw path { animation: none; stroke-dashoffset: 0; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js .head::after { transform: none; transition: none; }
}

/* ── Current page in the nav ────────────────────── */
.links a[aria-current="page"] { color: var(--ink); }
.links a[aria-current="page"]::after { transform: scaleX(1); }

/* ── Page hero (lobby, documents) ───────────────── */
.page-hero { padding: 96px 0 56px; position: relative; }
.page-hero h1 { margin: 0; max-width: 18ch; font: 300 clamp(44px, 5.8vw, 84px)/1.02 var(--serif); letter-spacing: -.04em; }
.page-hero h1 em { font-style: normal; color: var(--faint); }
.page-hero .lede { margin: 26px 0 0; max-width: 50ch; font: 400 clamp(19px, 1.7vw, 22px)/1.45 var(--sans); letter-spacing: -.01em; color: var(--muted); }

/* ── Lobby: game certificates with the game's own art as the band ── */
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.games .band.art { height: 300px; color: inherit; border-bottom: 1px solid var(--rule); }
.games .band.art img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.games .cert:hover .band.art img.bg { transform: scale(1.035); }
/* Space Pirate: the new cream-and-navy brand, the logo over a starfield and the pirate on his tether */
.band.art.sp { background: #0f1526; }
.band.art .sp-logo { position: absolute; left: 6%; top: 50%; width: 60%; height: auto; transform: translateY(-58%); filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.band.art .sp-pirate { position: absolute; right: 5%; top: 6%; height: 128%; width: auto; animation: tether 7s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes tether { 50% { transform: translateY(-10px) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .band.art .sp-pirate { animation: none; } }
@media (max-width: 900px) { .band.art .sp-logo { left: 4%; width: 58%; } .band.art .sp-pirate { right: -3%; top: 10%; height: 112%; } }
.band.art .logo { position: absolute; left: 50%; top: 50%; width: min(78%, 420px); height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 0 26px rgba(61,232,255,.25)); }
.band.art .plate { top: auto; bottom: 18px; transform: none; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }

/* A ruled index of links (help and policies) */
.index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.index li { border-right: 1px solid var(--line); }
.index li:last-child { border-right: 0; }
.index a { display: block; padding: 24px 22px 26px; text-decoration: none; transition: background .25s; height: 100%; }
.index li:first-child a { padding-left: 0; }
.index a:hover { background: var(--card); }
.index b { display: block; font: 400 21px/1.15 var(--serif); letter-spacing: -.02em; }
.index span { display: block; margin-top: 6px; color: var(--muted); font-size: 14.5px; }

/* ── Documents: a side rail and a reading column ── */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding-bottom: 40px; }
.doc-rail { position: sticky; top: 32px; align-self: start; padding-top: 6px; }
.doc-rail .sc { color: var(--muted); margin: 0 0 14px; }
.doc-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.doc-rail a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; text-decoration: none; color: var(--muted); font-size: 14.5px; transition: color .2s, border-color .2s; }
.doc-rail a:hover { color: var(--ink); border-left-color: var(--ink); }
.doc-body { max-width: 68ch; }
.doc-body > h2 { margin: 64px 0 0; padding-top: 28px; border-top: 1px solid var(--line); font: 400 28px/1.15 var(--serif); letter-spacing: -.03em; scroll-margin-top: 24px; }
.doc-body > h2:first-child { margin-top: 0; }
.doc-body h3 { margin: 32px 0 0; font: 500 20px/1.25 var(--serif); letter-spacing: -.02em; }
.doc-body p, .doc-body li { color: var(--muted); }
.doc-body p { margin: 16px 0 0; }
.doc-body strong { color: var(--ink); font-weight: 500; }
.doc-body a { text-underline-offset: 3px; text-decoration-color: var(--faint); }
.doc-body a:hover { text-decoration-color: var(--ink); }
.doc-body ul { list-style: none; margin: 18px 0 0; padding: 0; }
.doc-body ul li { display: grid; grid-template-columns: 22px 1fr; padding: 9px 0; border-top: 1px dotted var(--faint); }
.doc-body ul li:last-child { border-bottom: 1px dotted var(--faint); }
.doc-body ul li::before { content: "—"; color: var(--tone, var(--pink)); }
.updated { display: flex; gap: 14px; align-items: center; color: var(--muted); margin: 30px 0 0; }
.updated::before { content: ""; width: 40px; height: 1px; background: currentColor; }
.doc-hero .band { height: 70px; margin: 48px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--tone, var(--purple)); }

@media (max-width: 900px) {
  .page-hero { padding: 56px 0 36px; }
  .games { grid-template-columns: 1fr; gap: 20px; }
  .games .band.art { height: 220px; }
  .index { grid-template-columns: 1fr 1fr; }
  .index li:nth-child(2n) { border-right: 0; }
  .index li { border-bottom: 1px solid var(--line); }
  .index li a, .index li:first-child a { padding: 20px 14px 22px 0; }
  .index li:nth-child(2n) a { padding-left: 14px; }
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .doc-rail { position: static; }
  .doc-rail ol { display: flex; flex-wrap: wrap; gap: 4px 16px; border-left: 0; }
  .doc-rail a { padding: 2px 0; border: 0; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
  .doc-body > h2 { margin-top: 48px; font-size: 25px; }
  .doc-hero .band { margin-top: 32px; height: 56px; }
}
