/* Raxia — raxiacapital.com
   Palette lifted from the Raxia fundraise deck. Wordmark follows the Ataraxia
   title page. Reading layout follows the long-form essay-series convention. */

/* The site is dark. This is a committed look rather than a system preference,
   so the palette below is the palette everyone sees. Print flips to paper at
   the bottom of this file. */

:root {
  color-scheme: dark;

  --paper:    #14111c;
  --raised:   #1d1929;
  --ink:      #ece9f5;
  --body:     #c9c3da;
  --muted:    #948da9;
  --rule:     #2c2640;
  --accent:   #a48cff;
  --accent-2: #7c5cfc;
  --accent-ink: #14111c;
  --mark:     #d2cbe0;
  --dot:      rgba(164, 140, 255, 0.13);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --col: 40rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

/* Kept for proofing the paper palette. Not wired to any control. */
:root[data-theme="light"] {
  color-scheme: light;

  --paper:    #fcfbff;
  --raised:   #f4f1fd;
  --ink:      #191521;
  --body:     #3f3a4e;
  --muted:    #827c92;
  --rule:     #e3ddf3;
  --accent:   #7c5cfc;
  --accent-2: #bba9ff;
  --accent-ink: #ffffff;
  --mark:     #3a3654;
  --dot:      rgba(124, 92, 252, 0.10);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- chrome ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem var(--pad);
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.nav { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav a:hover { color: var(--ink); border-color: var(--rule); }

.nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* wordmark, following the Ataraxia title page */
.wordmark {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mark);
  white-space: nowrap;
}

/* ---------- essay sub-nav ---------- */

.subnav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  padding: 0.7rem var(--pad);
  border-bottom: 1px solid var(--rule);
  background: var(--raised);
}

.subnav .lead {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.5rem;
}

.subnav a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.3rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 2px;
}

.subnav a:hover { color: var(--accent); border-color: var(--accent-2); }

.subnav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

.subnav .pdf {
  margin-left: auto;
  color: var(--accent);
  border-color: var(--rule);
}

/* ---------- layout ---------- */

main {
  max-width: var(--col);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) var(--pad) 4rem;
}

main.wide { max-width: 46rem; }

.hero {
  background-image: radial-gradient(circle, var(--dot) 1.4px, transparent 1.5px);
  background-size: 34px 34px;
  border-bottom: 1px solid var(--rule);
}

.hero main { padding-bottom: clamp(2.5rem, 6vw, 3.5rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.2rem;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.7rem;
  text-wrap: balance;
}

h1 .sub {
  display: block;
  font-size: 0.52em;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 0.5rem;
  line-height: 1.3;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 3rem 0 1rem;
  letter-spacing: -0.01em;
}

.byline {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 2.4rem;
}

.byline a { color: var(--accent); }

p { margin: 0 0 1.35rem; }

.lede { font-size: 1.08em; color: var(--ink); }

strong { color: var(--ink); font-weight: 600; }

sup { font-size: 0.62em; line-height: 0; vertical-align: super; }
sup a { text-decoration: none; color: var(--accent); padding: 0 0.08em; }
sup a:hover { text-decoration: underline; }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 3.5rem 0; }

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

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.55rem 0.9rem;
  border-radius: 2px;
}

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

.btn.solid { background: var(--accent); color: var(--accent-ink); }
.btn.solid:hover { background: var(--ink); border-color: var(--ink); }

.btn.quiet { color: var(--muted); border-color: var(--rule); }
.btn.quiet:hover { background: transparent; color: var(--accent); border-color: var(--accent); }

.btnrow { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 2.4rem; }

/* ---------- contents ---------- */

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

.contents li { border-top: 1px solid var(--rule); }
.contents li:last-child { border-bottom: 1px solid var(--rule); }

.contents a {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0 1rem;
  padding: 1.35rem 0;
  text-decoration: none;
}

.contents a:hover .t { color: var(--accent); }

.contents .n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-top: 0.42em;
}

.contents .t {
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.contents .d {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-top: 0.4rem;
}

/* ---------- sources ---------- */

.sources {
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

.sources h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 1.1rem;
}

.sources ol { margin: 0; padding-left: 1.4rem; }

.sources li {
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

/* ---------- pager ---------- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pager a { color: var(--muted); text-decoration: none; max-width: 46%; }
.pager a:hover { color: var(--accent); }
.pager .next { text-align: right; margin-left: auto; }
.pager .lbl { display: block; color: var(--accent); margin-bottom: 0.35rem; }
.pager .ttl {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  line-height: 1.3;
}

/* ---------- home ---------- */

.home {
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 7rem) var(--pad) 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.home .lock {
  font-family: var(--sans);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 0.26em;
  /* the tracking leaves a trailing gap after the last letter, so nudge right
     by the same amount to keep the centred lockup optically balanced */
  text-indent: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1.6rem;
  line-height: 1;
  text-align: center;
}

.home .tag {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.4;
  color: var(--body);
  margin: 0 auto;
  max-width: 22em;
  text-wrap: balance;
  text-align: center;
}

@media (max-width: 60rem) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home .fig { max-width: 26rem; }
}

/* ---------- perspectives ---------- */

.persp {
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad) 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.persp h1 {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 2.2rem;
}

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

.docs li + li { margin-top: 0.1rem; }

.docs li.gap { height: 1.5rem; }

.docs button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--body);
  padding: 0.16rem 0.4rem;
}

.docs button::before {
  content: "\203A\00a0";
  color: transparent;
}

.docs button:hover,
.docs button:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
  outline: none;
}

.docs button:hover::before,
.docs button:focus-visible::before { color: var(--accent-ink); }

.docs .yr { opacity: 0.75; }

.persp .note {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 2.5rem 0 0;
  padding-left: 0.4rem;
  max-width: 30rem;
}

/* the factory */

.factory-wrap {
  border: 1px solid var(--rule);
  padding: 1px;
  aspect-ratio: 1 / 1;
  width: 100%;
}

.factory { display: block; width: 100%; height: 100%; }

.factory .ln { fill: none; stroke: var(--muted); stroke-width: 1; opacity: 0.55; }
.factory .rack { fill: none; stroke: var(--muted); stroke-width: 1; opacity: 0.8; }
.factory .blade { stroke: var(--muted); stroke-width: 1; opacity: 0.35; }
.factory .hot { stroke: var(--accent); opacity: 0.9; animation: blade 3.2s ease-in-out infinite; }
.factory .rail { stroke: var(--accent-2); stroke-width: 1.2; opacity: 0.9;
  stroke-dasharray: 5 7; animation: flow 2.6s linear infinite; }
.factory .tok { fill: var(--accent); animation: tok 5.2s linear infinite; }
.factory .lbl { fill: var(--muted); font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }

@keyframes flow { to { stroke-dashoffset: -48; } }
@keyframes blade { 0%, 100% { opacity: 0.18; } 50% { opacity: 1; } }
@keyframes tok {
  0%   { transform: translateX(0);     opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateX(330px); opacity: 0; }
}

/* the fan-out, used on the home page */

.fan { display: block; width: 100%; height: 100%; }

.fan .rail { fill: none; stroke: var(--accent-2); stroke-width: 1.2; opacity: 0.9;
  stroke-dasharray: 5 7; animation: flow 2.6s linear infinite; }
.fan .bolt { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.fan .frame { fill: none; stroke: var(--muted); stroke-width: 1; opacity: 0.8; }
.fan .bar { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: 0.85; }
.fan .spokes path { fill: none; stroke: var(--muted); stroke-width: 1; opacity: 0.4; }
.fan .lbl { fill: var(--muted); font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; }

.fan .tok { fill: var(--accent); animation: fantok 3.6s linear infinite; }
.fan .tile { fill: none; stroke: var(--muted); stroke-width: 1;
  animation: fantile 3.6s ease-in-out infinite; }

@keyframes fantok {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate(150px, var(--dy)); opacity: 0; }
}

@keyframes fantile { 0%, 100% { opacity: 0.14; } 55% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .factory .hot, .factory .rail, .factory .tok { animation: none; }
  .factory .tok { opacity: 0.85; }
  .fan .rail, .fan .tok, .fan .tile { animation: none; }
  .fan .tok { opacity: 0.85; }
  .fan .tile { opacity: 0.5; }
}

@media (max-width: 60rem) {
  .persp { grid-template-columns: minmax(0, 1fr); }
  .persp .fig { order: -1; max-width: 26rem; }
}

/* ---------- request dialog ---------- */

.req-dialog {
  border: 1px solid var(--accent-2);
  background: var(--raised);
  color: var(--body);
  padding: 0;
  max-width: 30rem;
  width: calc(100% - 2rem);
}

.req-dialog::backdrop { background: rgba(8, 6, 14, 0.72); }

.req-dialog .body { padding: 1.6rem 1.7rem 1.7rem; }

.req-dialog .top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.req-dialog .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.4rem;
}

.req-dialog h2 {
  font-size: 1.2rem;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.req-dialog p { font-size: 0.9rem; margin: 0 0 1.3rem; }

.req-dialog .x {
  flex: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

.req-dialog .x:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- about ---------- */

.facts { margin: 2.2rem 0 0; padding: 0; list-style: none; }

.facts li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}

.facts li:last-child { border-bottom: 1px solid var(--rule); }

.facts .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.45em;
}

.facts .v { color: var(--ink); }

/* ---------- no offer notice ---------- */

.notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--raised);
  border-top: 1px solid var(--accent-2);
  padding: 1rem var(--pad);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
}

.notice[hidden] { display: none; }

.notice .inner {
  max-width: 58rem;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.notice p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}

.notice strong {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.notice .x {
  flex: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}

.notice .x:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 34rem) {
  .notice .inner { gap: 0.75rem; }
  .notice p { font-size: 0.75rem; }
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding: 2rem var(--pad) 3rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

.legal {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--pad) 3rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--serif);
}

/* ---------- print / PDF ---------- */

@media print {
  :root {
    color-scheme: light;
    --paper: #fff; --ink: #000; --body: #1a1a1a; --muted: #444;
    --rule: #bbb; --accent: #4b32c3; --mark: #3a3654; --dot: transparent;
  }
  .bar, .subnav, footer, .pager, .btnrow, .notice, .noprint { display: none !important; }
  .hero { background-image: none; border: 0; }
  body { font-size: 11pt; line-height: 1.45; }
  main { max-width: none; padding: 0; }
  h1 { font-size: 20pt; page-break-after: avoid; }
  h2 { page-break-after: avoid; }
  .essay { page-break-before: always; }
  .essay:first-of-type { page-break-before: avoid; }
  .sources li { font-size: 8pt; }
  @page { margin: 20mm 18mm; }
}
