/* Real Trauma Intelligence — landing (Raining Letters + scrambled title).
   Desaturated fork of 21st.dev modern-animated-hero-section: green →
   white, everything else monochrome on pure black. */

:root {
  --bg: #000000;
  --text: #FFFFFF;
  --text-soft: rgba(255, 255, 255, 0.72);
  --dim: rgba(255, 255, 255, 0.48);
  --divider: rgba(255, 255, 255, 0.12);
  --rain-inactive: #333333;
  --rain-active: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
body {
  position: relative;
  overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; transition: opacity 0.2s ease; }
a:hover { opacity: 0.7; }

/* ==========================================================
   Hero: raining letters + scrambled title
   ========================================================== */
#raining-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
}

/* Scrambled title — sits above every rain-char (z-index: 20).
   Nudged up from dead-centre (50%) to ~40% so the title reads as
   "upper-middle" rather than bang in the middle. */
#raining-hero .scrambled-title {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, "Courier New", monospace;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  white-space: pre;
  /* Reserve height so the title block doesn't jump when a short phrase
     replaces a long one. */
  min-height: 1.2em;
  min-width: 12ch;
  pointer-events: none;
}

/* Scramble glyphs shown mid-transition — source used green (#0f0);
   desaturated to white at the source's 0.7 opacity. */
#raining-hero .scrambled-title .dud {
  color: var(--text);
  opacity: 0.7;
}

/* Raining characters — absolutely-positioned over the hero. */
.rain-char {
  position: absolute;
  font-size: 1.8rem;
  color: var(--rain-inactive);
  font-weight: 300;
  transform: translate(-50%, -50%);
  transition: color 0.1s ease, transform 0.1s ease, text-shadow 0.1s ease;
  will-change: transform, top;
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
  font-family: "JetBrains Mono", ui-monospace, "Courier New", monospace;
}
/* Active flicker — source used bright green; desaturated to white
   with the same scale, glow, and pulse. */
.rain-char.active {
  color: var(--rain-active);
  font-weight: 700;
  font-size: 2rem;
  transform: translate(-50%, -50%) scale(1.25);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8),
               0 0 12px rgba(255, 255, 255, 0.4);
  opacity: 1;
  z-index: 10;
  animation: rain-pulse 0.9s ease-in-out infinite alternate;
}
@keyframes rain-pulse {
  from { opacity: 1; }
  to   { opacity: 0.72; }
}

/* Generic content layout. ABSOLUTELY positioned (not relative) so it
   OVERLAYS the 100vh #raining-hero behind it rather than stacking
   below it and pushing the footer off-screen. Without this the page
   was 200vh tall and the footer was invisible unless you scrolled. */
.content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 24px 32px;
  /* Clicks on the rest of the area fall through to the raining hero. */
  pointer-events: none;
}
.content .hero-filler {
  flex: 1;
  width: 100%;
}
/* Re-enable pointer events on interactive footer children only. */
.content .footer-block,
.content .footer-block a,
.content .footer-block button {
  pointer-events: auto;
}

/* Footer fade-in — one animation on the container, inherited by the
   three lines. No per-line animations means no desync. */
@keyframes rtiFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.footer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 720px;
}
@media (prefers-reduced-motion: no-preference) {
  .footer-block {
    opacity: 0;
    animation: rtiFadeIn 2s ease-out 1.8s forwards;
  }
}

/* ==========================================================
   Footer lines (inside .footer-block). Position comes from the
   .content flex container — no fixed positioning.
   ========================================================== */
.cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.cta-row a { color: rgba(255, 255, 255, 0.72); text-decoration: none; transition: color 0.2s ease; }
.cta-row a:hover { color: #FFF; }
.cta-row .dot { color: rgba(255, 255, 255, 0.3); user-select: none; }

.platforms {
  display: flex;
  gap: 0.5em 0.75em;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.6;
}
.platforms .platform { color: var(--text); }
.platforms .sep { opacity: 0.4; user-select: none; }

.culture-line {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  letter-spacing: 0.04em;
}
.culture-line a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.culture-line a:hover { color: #FFF; }
.culture-line .sep { margin: 0 8px; color: rgba(255, 255, 255, 0.3); }

/* ==========================================================
   Inner pages (privacy, terms) — quiet reading layout
   ========================================================== */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 48px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}
.page h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 800;
  margin-bottom: 8px;
}
.page h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 28px 0 10px;
}
.page p   { color: var(--text-soft); margin-bottom: 12px; font-size: 15px; }
.page ul  { padding-left: 22px; margin-bottom: 14px; }
.page li  { margin-bottom: 6px; color: var(--text-soft); font-size: 15px; }
.page .updated { color: var(--dim); font-size: 13px; margin-bottom: 24px; }
.page .back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--dim);
  font-weight: 700;
}
.page .back-link:hover { color: var(--text); }
.page .footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
  font-size: 12px;
  color: var(--dim);
  font-weight: 600;
}
.page .footer a { color: var(--text-soft); }

/* Inner-page bodies sit over plain black; hide the fixed hero footer
   nav on those pages (they have their own in-page footer). */
body:not(.home) .cta-row,
body:not(.home) .footer-minimal {
  display: none;
}
