/* LISTOKRATIA — noir, ivory and one crimson full stop.
   No frameworks, no external requests: fonts are self-hosted, the only script is app.js. */

@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/fonts/playfair-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/fonts/playfair-latin.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: "Playfair Display"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("/fonts/playfair-italic-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("/fonts/playfair-italic-latin.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: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/inter-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/inter-latin.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; }

:root {
  --bg: #08080a;
  --bg-2: #0d0d10;
  --bg-3: #121216;
  --ink: #efe9df;
  --muted: #96908a;
  --gold: #c9a96a;
  --crimson: #c0122e;
  --line: rgba(201, 169, 106, .22);
  --line-soft: rgba(239, 233, 223, .08);
  --serif: "Playfair Display", "Times New Roman", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {                       /* noir vignette */
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 78% -10%, rgba(201, 169, 106, .09), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, rgba(192, 18, 46, .07), transparent 60%),
    radial-gradient(140% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, .55) 100%);
}
main, .topbar, .footer { position: relative; z-index: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.skip { position: absolute; left: -999px; top: 8px; padding: 10px 16px; background: var(--ink); color: var(--bg); z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- film grain ---------- */
.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 260px 260px;
}

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); }
.brand__mark { width: 34px; height: auto; color: var(--ink); }
.brand__word { font: 500 12px/1 var(--sans); letter-spacing: .46em; text-transform: uppercase; padding-left: .1em; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 24px; padding: 18px var(--gutter);
  transition: background .4s var(--ease), border-color .4s var(--ease), padding .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled { background: rgba(8, 8, 10, .78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line-soft); padding-block: 12px; }
.nav { display: flex; gap: 34px; }
.nav a { font: 500 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); padding: 8px 0; position: relative; transition: color .3s var(--ease); }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: var(--gold); transition: right .45s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }
.topbar__cta { justify-self: end; font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; padding: 12px 22px; border: 1px solid var(--line); border-radius: 999px; transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease); }
.topbar__cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 160px var(--gutter) 40px; overflow: hidden; }
.hero__ghost { position: absolute; right: -8vw; top: 50%; width: min(74vw, 1040px); transform: translateY(-50%); color: var(--ink); opacity: .065; pointer-events: none; animation: drift 24s ease-in-out infinite alternate; }
.hero__inner { position: relative; max-width: 1280px; width: 100%; margin: 0 auto; }
.eyebrow { font: 500 11px/1.4 var(--sans); letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
.hero__title { margin: 28px 0 0; font: 700 clamp(46px, 9.2vw, 150px)/.98 var(--serif); letter-spacing: -.02em; }
.hero__title .line { display: block; }
.hero__title em { font-style: italic; font-weight: 400; }
.hero__title .dot { color: var(--crimson); font-style: normal; }
.hero__lead { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 520px) auto; align-items: end; gap: 40px; }
.hero__lead p { font-size: clamp(16px, 1.35vw, 20px); line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__foot { position: relative; max-width: 1280px; width: 100%; margin: 72px auto 0; display: flex; align-items: center; gap: 22px; font: 500 11px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.hero__foot-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.eyebrow__sep, .eyebrow__sub { white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 17px 30px; border-radius: 999px; font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; border: 1px solid transparent; transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: #fff; box-shadow: 0 18px 40px -18px rgba(239, 233, 223, .45); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--gold); }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line-soft); background: var(--bg-2); }
.ticker__track { display: flex; align-items: center; gap: 28px; width: max-content; padding: 18px 0; animation: ticker 46s linear infinite; }
.ticker span { font: 400 15px/1 var(--serif); font-style: italic; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.ticker i { color: var(--crimson); font-style: normal; }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(88px, 12vw, 180px) var(--gutter); max-width: 1280px; margin: 0 auto; }
.section__head { display: grid; gap: 20px; margin-bottom: clamp(44px, 6vw, 88px); }
.section__title { font: 700 clamp(32px, 4.6vw, 68px)/1.08 var(--serif); letter-spacing: -.015em; max-width: 16ch; }

.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.principle { position: relative; padding: 36px 40px 44px 0; border-top: 1px solid var(--line); }
.principle + .principle { padding-left: 40px; border-left: 1px solid var(--line-soft); }
.principle__num { display: block; font: 400 15px/1 var(--serif); font-style: italic; color: var(--gold); margin-bottom: 56px; }
.principle h3 { font: 700 clamp(26px, 2.5vw, 36px)/1.15 var(--serif); }
.principle p { margin-top: 20px; color: var(--muted); max-width: 34ch; }
.principle::before { content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 1px; background: var(--gold); transition: width .9s var(--ease); }

/* The heading's longest word is 9.4em wide: the aside keeps room for it at every width
   where the two columns stand, so the heading never runs into the list of articles. */
.code { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 112px); }
.code__aside { position: sticky; top: 120px; align-self: start; display: grid; gap: 20px; min-width: 0; }
.code__aside .section__title { font-size: clamp(30px, 4.2vw, 58px); max-width: none; }
.code__list { list-style: none; margin: 0; padding: 0; counter-reset: art; min-width: 0; }
.code__list li { display: grid; grid-template-columns: 88px 1fr; gap: 24px; padding: 30px 0; border-top: 1px solid var(--line-soft); transition: padding-left .5s var(--ease), border-color .5s var(--ease); }
.code__list li:last-child { border-bottom: 1px solid var(--line-soft); }
.code__list span { font: 400 14px/1.5 var(--serif); font-style: italic; color: var(--gold); white-space: nowrap; }
.code__list p { color: var(--ink); font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; text-wrap: pretty; }

.section--membership { display: grid; grid-template-columns: minmax(280px, 5fr) 7fr; align-items: center; gap: clamp(40px, 7vw, 120px); }

.card { position: relative; aspect-ratio: 86 / 54; border-radius: 18px; overflow: hidden; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg, #16161b 0%, #0c0c0f 55%, #131316 100%); border: 1px solid rgba(201, 169, 106, .32); box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05); transform: perspective(1200px) rotateX(6deg) rotateY(-8deg); transition: transform 1s var(--ease); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .06) 48%, transparent 60%); transform: translateX(-60%); transition: transform 1.2s var(--ease); pointer-events: none; }
.card__grain { position: absolute; inset: 0; opacity: .35; background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.card__mark { width: 34%; color: var(--ink); filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .6)); }
.card__label { font: 500 10px/1 var(--sans); letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
.card__no { font: 400 clamp(26px, 2.6vw, 40px)/1 var(--serif); letter-spacing: .12em; }
.card__holder { font: 500 11px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

.membership__text { display: grid; gap: 24px; justify-items: start; }
.membership__lead { max-width: 48ch; color: var(--muted); font-size: clamp(16px, 1.35vw, 20px); text-wrap: pretty; }
.membership__actions { display: flex; align-items: center; gap: 18px 26px; flex-wrap: wrap; margin-top: 8px; }
.membership__terms { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 36px; }
.membership__terms li { display: grid; gap: 4px; font: 500 11px/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.membership__terms span { font: 400 30px/1 var(--serif); font-variant-numeric: lining-nums; color: var(--ink); letter-spacing: 0; text-transform: none; }
.membership__handle { font: 400 15px/1 var(--serif); font-style: italic; color: var(--gold); text-decoration: none; text-underline-offset: .4em; text-decoration-thickness: 1px; transition: color .3s var(--ease); padding: 12px 0; margin: -12px 0; }
.membership__handle:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.notfound, .rep { position: relative; z-index: 1; min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 22px; text-align: center; padding: 24px; }
.notfound__mark { width: 96px; color: var(--ink); }
.notfound__title { max-width: none; }
.notfound__title .dot, .rep__title .dot { color: var(--crimson); }
.rep__brand svg { width: 96px; color: var(--ink); }
.rep__title { font: 700 clamp(40px, 8vw, 104px)/1 var(--serif); letter-spacing: -.02em; }
.rep__note { max-width: 34ch; color: var(--muted); }
.notfound .btn { white-space: nowrap; }
@media (max-width: 360px) { .notfound .btn { padding-inline: 16px; } }
.footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; padding: 40px var(--gutter) 48px; border-top: 1px solid var(--line-soft); }
.footer__note { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-wrap: balance; }
.footer__link { font: 500 11px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); transition: color .3s var(--ease); padding: 14px 0; margin: -14px 0; }
.footer__link:hover { color: var(--ink); }

/* ---------- pointers only: what a finger cannot hover does not react ---------- */
@media (hover: hover) and (pointer: fine) {
  .principle:hover::before { width: 100%; }
  .code__list li:hover { padding-left: 14px; border-top-color: var(--line); }
  .card:hover { transform: perspective(1200px) rotateX(0) rotateY(0); }
  .card:hover::after { transform: translateX(60%); }
}

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translateY(-50%) translateX(0); } to { transform: translateY(-50%) translateX(-3vw); } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero .eyebrow, .hero__title .line, .hero__lead, .hero__foot { animation: rise 1.1s var(--ease) both; }
.hero .eyebrow { animation-delay: .1s; }
.hero__title .line:nth-child(1) { animation-delay: .2s; }
.hero__title .line:nth-child(2) { animation-delay: .32s; }
.hero__lead { animation-delay: .5s; }
.hero__foot { animation-delay: .8s; }

/* below the fold: hidden until app.js has seen them (no JS — always visible) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .section__head > *:nth-child(2), .js .principles > :nth-child(1), .js .code__list > :nth-child(1) { transition-delay: .05s; }
.js .principles > :nth-child(2), .js .code__list > :nth-child(2) { transition-delay: .15s; }
.js .principles > :nth-child(3), .js .code__list > :nth-child(3) { transition-delay: .25s; }
.js .code__list > :nth-child(4) { transition-delay: .35s; }
.js .code__list > :nth-child(5) { transition-delay: .45s; }
.js .membership__text > :nth-child(2) { transition-delay: .1s; }
.js .membership__text > :nth-child(3) { transition-delay: .2s; }
.js .membership__text > :nth-child(4) { transition-delay: .3s; }

/* ---------- small screens ---------- */
@media (max-width: 1199px) {
  .code { grid-template-columns: 1fr; gap: clamp(36px, 6vw, 56px); }
  .code__aside { position: static; }
  .code__aside .section__title { font-size: min(clamp(32px, 4.6vw, 68px), 9.2vw); }
}
@media (max-width: 980px) {
  .nav { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .hero__lead { grid-template-columns: 1fr; align-items: start; }
  .hero__lead p { max-width: 56ch; }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 30px 0 34px; border-left: 0; }
  .principle__num { margin-bottom: 20px; }
  .section--membership { grid-template-columns: 1fr; }
  .card { max-width: 460px; }
  .footer { grid-template-columns: 1fr; gap: 16px; justify-items: start; }
}
@media (max-width: 560px) {
  .topbar__cta { display: none; }
  .code__list li { grid-template-columns: 1fr; gap: 8px; }
  .hero { padding-top: 130px; }
  .hero__ghost { opacity: .05; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero__foot-rule { flex: none; width: 56px; }
  .membership__actions { width: 100%; }
  .membership__actions .btn { width: 100%; }
  .card { padding: 22px; }
}
@media (max-width: 509px) {   /* the eyebrow in one line is 436px wide */
  .hero .eyebrow__sep { display: none; }
  .hero .eyebrow__sub { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .eyebrow, .hero__title .line, .hero__lead, .hero__foot { animation: none; }
  .hero__ghost, .ticker__track, .card { animation: none; transform: none; transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
