/* Back to 50 — shared website styles */

:root {
  --bg: #000000;
  --text: #E8E8E8;
  --text-soft: rgba(255, 255, 255, 0.72);
  --dim: rgba(255, 255, 255, 0.45);
  --divider: rgba(255, 255, 255, 0.12);
  --warning: #C09060;
}

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

html, body {
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* html is the black fallback (if shader fails / WebGL unavailable).
   body MUST be transparent, otherwise it paints on top of #shader-bg
   which sits at z-index:-2. Per CSS painting order within the root
   stacking context, body's own background paints AFTER negative-z
   fixed descendants — so an opaque body background hides the shader. */
html {
  background: #000;
}
body {
  background: transparent;
  position: relative;
  overflow-x: hidden;
}

/* Animated shader sits behind all content */
#shader-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  display: block;
}

/* Fade-in for both animation layers. Shader appears first, particle "50"
   joins in a few hundred ms later — a soft two-beat entrance.
   Skipped entirely for users with prefers-reduced-motion. */
@keyframes backtoFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  /* The "50" is the subject — it arrives first on pure black. */
  .particle-number canvas {
    opacity: 0;
    animation: backtoFadeIn 1.6s ease-out 0.2s forwards;
  }
  /* The shader is the atmosphere — wavy lines wash in behind the "50"
     once it has settled. Slow 3s reveal. */
  #shader-bg {
    opacity: 0;
    animation: backtoFadeIn 3s ease-out 1.2s forwards;
  }
}

/* Black veil above the shader on INNER pages only, so body copy stays legible.
   Home page has no veil — the shader (wavy lines) is meant to be fully visible,
   with the particle "50" layered over it through a transparent canvas. */
body:not(.home)::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: -1;
  pointer-events: none;
}

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

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  position: relative;
  z-index: 1;
}

.kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
}

h2 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.3px;
  margin: 32px 0 12px;
}

h3 {
  font-size: 16px;
  font-weight: 900;
  margin: 24px 0 8px;
}

p {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 12px;
}

ul, ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
li { margin-bottom: 6px; color: var(--text-soft); }

hr {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 32px 0;
}

.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  color: var(--dim);
  font-weight: 700;
}
.footer a { color: var(--text-soft); }
.footer a:hover { color: var(--text); }

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 800;
  color: var(--dim);
  border: none;
}
.back-link:hover { color: var(--text); }

/* Home — minimal. Only the particle "50", nav links, and footer.
   Shader sits behind, particle canvas is transparent on top. */
.hero-minimal {
  min-height: 100vh;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* The particle "50" sits centered in the available vertical space.
   flex: 1 makes this region consume everything above the nav + footer,
   so the particle ends up in the visual middle of the viewport while
   the nav sits much lower, just above the footer. */
.hero-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Cursor-driven particle "50" — transparent canvas, shader shows through. */
.particle-number {
  width: 100%;
  height: clamp(240px, 48vw, 440px);
  touch-action: none;
  user-select: none;
  pointer-events: auto;
  /* explicitly transparent — confirms no CSS background competes with shader */
  background: transparent;
}

/* CTA row — plain clickable words, no boxes, no borders.
   On home: sits just above the footer (margin-bottom is the only gap). */
.cta-row {
  margin: 0 0 28px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}
.cta-row a {
  color: var(--text);
  border: none;
  padding: 0;
  background: none;
}
.cta-row a:hover {
  opacity: 0.65;
}
.cta-row .dot {
  color: var(--dim);
  user-select: none;
}

.footer-minimal {
  margin-top: 40px;
  font-size: 12px;
  color: var(--dim);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.footer-minimal a {
  color: var(--text-soft);
}
.footer-minimal a:hover {
  color: var(--text);
}
