/* Ragnarok landing — near-black ground, bone type, one glacial accent.
   Implements "Ragnarok Landing v2" (claude.ai/design) as static CSS: every
   inline style became a rule here because the relay's CSP has no
   'unsafe-inline' (style-src 'self'). Fonts are self-hosted for the same
   reason (font-src 'self') — a privacy messenger's landing page should not
   phone Google on every visit. */

/* ---------- fonts (see fonts/*-OFL.txt) ---------- */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62.5% 125%;
  font-display: swap;
  src: url(fonts/archivo-latin-var.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 Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-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 Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-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 Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-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;
}

/* ---------- ground ---------- */

:root {
  --bg: #060608;
  --fg: #f2f2ee;
  --muted: #a3a39c;
  --dim: #8f8f89;
  --dimmer: #6e6e68;
  --faint: #55554f;
  --accent: #8fd6ff;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html {
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}
body {
  color: var(--fg);
  font-family: Archivo, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
a {
  color: var(--fg);
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
::selection {
  background: var(--accent);
  color: var(--bg);
}
.hidden {
  display: none !important;
}

@keyframes rgFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes rgFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
@keyframes rgPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
@keyframes rgTicker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Film grain over everything (design: fractal-noise SVG at 5%). */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url(noise.svg);
}

/* The mark is black-on-white; invert + screen lifts a white glyph out of it. */
.as-white {
  filter: invert(1);
  mix-blend-mode: screen;
}

.mono {
  font-family: var(--mono);
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.hero-logo {
  position: absolute;
  right: -6vw;
  top: 50%;
  transform: translateY(-54%);
  height: 78vh;
  opacity: 0.07;
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 280px;
  pointer-events: none;
  animation: rgPulse 10s ease-in-out infinite;
  background: radial-gradient(
    75% 100% at 50% 100%,
    color-mix(in oklab, var(--accent) 13%, transparent),
    transparent 70%
  );
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 2.6vw, 28px) clamp(20px, 4.5vw, 52px);
  animation: rgFadeUp 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s both;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand img {
  height: 34px;
  width: 34px;
}
.brand-name {
  font-weight: 900;
  font-stretch: 125%;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 30px);
  font-size: 13.5px;
  font-weight: 600;
}
.nav-links a {
  text-underline-offset: 6px;
}
.nav-links a:hover {
  text-decoration: underline;
}

.hero-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px clamp(20px, 4.5vw, 52px);
  gap: clamp(26px, 4.5vh, 44px);
}
.hero-main .kicker {
  animation: rgFadeUp 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s both;
}
.hero-title {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(54px, 10.8vw, 176px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  animation: rgFadeUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.22s both;
}
.accent {
  color: var(--accent);
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  animation: rgFadeUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.38s both;
}
.lede {
  margin: 0;
  max-width: 520px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}
.cta-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-block;
  white-space: nowrap;
  font-size: 15px;
  padding: 19px 38px;
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  border: 1px solid var(--fg);
  transition: background 0.2s, border-color 0.2s;
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  font-weight: 600;
  border: 1px solid rgba(242, 242, 238, 0.3);
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cta-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dimmer);
}

.ticker {
  position: relative;
  border-top: 1px solid rgba(242, 242, 238, 0.12);
  border-bottom: 1px solid rgba(242, 242, 238, 0.12);
  overflow: hidden;
  padding: 13px 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: rgTicker 30s linear infinite;
}
.ticker-group {
  display: flex;
  gap: 34px;
  padding-right: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim);
  white-space: nowrap;
}
.tick-sep {
  color: var(--accent);
}

/* ---------- shared section shell ---------- */

.section {
  padding: clamp(80px, 11vw, 140px) clamp(20px, 4.5vw, 52px);
}
.wrap {
  max-width: 1060px;
  margin: 0 auto;
}
.section .kicker {
  margin-bottom: 16px;
}
.section-title {
  margin: 0 0 clamp(36px, 5.5vw, 60px);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(38px, 5.8vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

/* ---------- faq ---------- */

.faq-item {
  border-top: 1px solid rgba(242, 242, 238, 0.13);
}
.faq-end {
  border-top: 1px solid rgba(242, 242, 238, 0.13);
}
.faq-item summary {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline;
  gap: 14px;
  padding: 25px 0;
  cursor: pointer;
  list-style: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary:hover {
  color: var(--accent);
  transform: translateX(8px);
}
.faq-num {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
}
.faq-q {
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(19px, 2.5vw, 26px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.faq-sym {
  font-size: 21px;
  font-weight: 400;
  color: var(--dim);
  line-height: 1;
}
.faq-sym::before {
  content: "+";
}
.faq-item[open] .faq-sym::before {
  content: "−";
}
.faq-a {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 0 0 30px;
  animation: rgFadeIn 0.35s ease both;
}
.faq-a p {
  grid-column: 2;
  margin: 0;
  max-width: 660px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- self-host / downloads (same row language as the faq) ---------- */

.dl-lede {
  margin: 0 0 clamp(28px, 4vw, 44px);
  max-width: 620px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  text-wrap: pretty;
}
.dl-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: baseline;
  gap: 14px;
  padding: 21px 0;
  border-top: 1px solid rgba(242, 242, 238, 0.13);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s;
}
a.dl-row:hover {
  color: var(--accent);
  transform: translateX(8px);
}
.dl-num {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
}
.dl-name {
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(17px, 2.2vw, 22px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.dl-sha {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
}
.dl-arrow {
  font-size: 17px;
  color: var(--dim);
  line-height: 1;
}
a.dl-row:hover .dl-arrow,
a.dl-row:hover .dl-sha {
  color: var(--accent);
}
.dl-foot {
  border-top: 1px solid rgba(242, 242, 238, 0.13);
  padding: 18px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 2;
  color: var(--dimmer);
}
.dl-foot a {
  color: var(--dim);
}
.dl-foot a:hover {
  color: var(--accent);
}
#dl-missing {
  border-top: 1px solid rgba(242, 242, 238, 0.13);
  padding: 21px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
  color: var(--dim);
  max-width: 620px;
}

/* ---------- manifesto ---------- */

.manifesto {
  position: relative;
  border-top: 1px solid rgba(242, 242, 238, 0.1);
  padding: clamp(80px, 11vw, 140px) clamp(20px, 4.5vw, 52px) 0;
  overflow: hidden;
}
.mani-logo {
  position: absolute;
  left: -8vw;
  bottom: -12vh;
  height: 60vh;
  opacity: 0.05;
  pointer-events: none;
}
.mani-wrap {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
}
.mani-lines {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(36px, 5.6vw, 82px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.mani-wrap .kicker {
  margin-bottom: 22px;
}
.mani-para {
  margin: clamp(32px, 4.5vw, 52px) 0 0;
  max-width: 620px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  text-wrap: pretty;
}
.sig {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sig img {
  height: 22px;
  width: 22px;
}
.sig-text {
  font-weight: 800;
  font-stretch: 112%;
  font-size: 15px;
}

.foot {
  position: relative;
  max-width: 1160px;
  margin: clamp(56px, 8vw, 100px) auto 0;
  border-top: 1px solid rgba(242, 242, 238, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding: 22px 0 26px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dimmer);
}
.foot-sha {
  color: var(--faint);
}
.foot-sha a {
  color: inherit;
}
.foot-sha a:hover {
  color: var(--accent);
}
.foot-links {
  display: flex;
  gap: 22px;
}
.foot-links a {
  color: var(--dim);
}

/* ---------- calm mode ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .nav,
  .hero-main .kicker,
  .hero-title,
  .hero-row,
  .faq-a {
    animation: none;
  }
  .ticker-track {
    animation: none;
  }
  .hero-glow {
    animation: none;
    opacity: 0.55;
  }
  .faq-item summary,
  .dl-row {
    transition: none;
  }
}
