/* ============================================================
   NeverMind — teaser site
   A restrained night-sky page for an upcoming Minecraft
   Java Practice server. Handwritten type, falling meteors.
   ============================================================ */

@font-face {
  font-family: "Lfont";
  src: url("Lfont-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #05060b;
  --bg-deep:   #030407;
  --ink:       #e9ecf6;
  --ink-dim:   #98a0b6;
  --ink-faint: #5a6178;
  --hair:      rgba(150, 168, 214, 0.12);
  --meteor:    #dbe7ff;
  --star:      #c9d4f2;
  --glow:      rgba(150, 185, 255, 0.55);
  --accent:    #a9c0ff;

  --max:  680px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 50% -10%, #11162a 0%, rgba(17, 22, 42, 0) 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Lfont", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.18rem);
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- atmosphere layers ---------------------------------- */

.sky,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.sky { overflow: hidden; }

/* meteors live in an oversized, tilted field so a simple
   vertical fall reads as a diagonal shower on screen */
.meteor-field {
  position: absolute;
  top: -30%;
  left: -25%;
  width: 150%;
  height: 170%;
  transform: rotate(17deg);
  transform-origin: center;
}

.meteor {
  position: absolute;
  top: -12vh;
  left: var(--x, 50%);
  width: 1.5px;
  height: var(--len, 120px);
  background: linear-gradient(180deg, rgba(219, 231, 255, 0) 0%, var(--meteor) 100%);
  border-radius: 2px;
  opacity: 0;
  filter: drop-shadow(0 0 5px rgba(170, 200, 255, 0.45));
  animation: meteor-fall var(--dur, 4s) var(--delay, 0s) linear infinite;
  will-change: transform, opacity;
}

.meteor::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: #f2f6ff;
  box-shadow: 0 0 9px 2px rgba(190, 214, 255, 0.8);
}

@keyframes meteor-fall {
  0%   { transform: translateY(-12vh); opacity: 0; }
  6%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(125vh); opacity: 0; }
}

.star {
  position: absolute;
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: var(--star);
  opacity: var(--o, 0.6);
  animation: twinkle var(--tw, 5s) var(--delay, 0s) ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: calc(var(--o, 0.6) * 0.35); }
  50%      { opacity: var(--o, 0.6); }
}

/* fine grain for a touch of texture over the flat dark */
.grain {
  opacity: 0.04;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

main { position: relative; z-index: 1; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.4rem;
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8vh 28px 12vh;
}

/* soft pool of light behind the headline */
.hero::before {
  content: "";
  position: absolute;
  top: 38%;
  left: 50%;
  width: min(680px, 86vw);
  height: 420px;
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(120, 160, 255, 0.16), rgba(120, 160, 255, 0) 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 640px);
}

.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0;
  animation: rise 1s var(--ease) 0.1s forwards;
}

.headline {
  margin: 1.4rem 0 1.6rem;
  font-size: clamp(2.1rem, 4.6vw + 1.2rem, 4.2rem);
  line-height: 1.16;
  font-weight: 400;
  color: #f3f5fc;
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.28s forwards;
}

/* the focal word: own line, glitching with RGB channel split */
.nm {
  display: block;
  position: relative;
  font-weight: 700;
  font-size: 1.22em;
  line-height: 1.1;
  margin: 0.08em 0 0.06em;
  letter-spacing: 0.01em;
  color: #f4f7ff;
  /* faint constant chromatic fringe + glow */
  text-shadow:
    0 0 16px rgba(150, 190, 255, 0.4),
    0.8px 0 rgba(255, 40, 95, 0.25),
    -0.8px 0 rgba(0, 225, 255, 0.25);
  animation: nm-jitter 3.4s steps(1, end) infinite;
}

/* two duplicated layers act as the red / cyan ghosts */
.nm::before,
.nm::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  width: 100%;
  text-align: center;
  pointer-events: none;
  clip-path: inset(100% 0 0 0); /* hidden until a glitch burst */
}

.nm::before {
  color: #ff285f;
  text-shadow: 0 0 12px rgba(255, 40, 95, 0.5);
  animation: nm-glitch-a 2.9s steps(1, end) infinite;
}

.nm::after {
  color: #21e6ff;
  text-shadow: 0 0 12px rgba(33, 230, 255, 0.5);
  animation: nm-glitch-b 2.3s steps(1, end) infinite;
}

/* red ghost — a burst of displaced horizontal slices, then gone */
@keyframes nm-glitch-a {
  0%, 38%, 53%, 100% { clip-path: inset(100% 0 0 0); transform: translate(0, 0); }
  39% { clip-path: inset(12% 0 74% 0); transform: translate(-5px, -1px); }
  43% { clip-path: inset(58% 0 28% 0); transform: translate(4px, 1px); }
  47% { clip-path: inset(33% 0 52% 0); transform: translate(-3px, 0); }
  50% { clip-path: inset(78% 0 8% 0);  transform: translate(3px, 1px); }
}

/* cyan ghost — different rhythm so the two rarely line up */
@keyframes nm-glitch-b {
  0%, 16%, 31%, 100% { clip-path: inset(100% 0 0 0); transform: translate(0, 0); }
  17% { clip-path: inset(70% 0 14% 0); transform: translate(5px, 1px); }
  21% { clip-path: inset(20% 0 66% 0); transform: translate(-4px, 0); }
  25% { clip-path: inset(45% 0 40% 0); transform: translate(3px, -1px); }
  28% { clip-path: inset(6% 0 84% 0);  transform: translate(-3px, 1px); }
}

/* base word — tiny occasional jolt to sell the glitch */
@keyframes nm-jitter {
  0%, 19%, 23%, 41%, 45%, 100% { transform: translate(0, 0); }
  21% { transform: translate(1px, -1px); }
  43% { transform: translate(-1px, 1px); }
}

.hero__sub {
  font-size: 1.02rem;
  color: var(--ink-dim);
  margin: 0;
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.5s forwards;
}

/* scroll cue */
.cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 10px;
  justify-items: center;
  opacity: 0;
  animation: rise 1.2s var(--ease) 1s forwards;
}

.cue span {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.cue i {
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
  transform: rotate(45deg);
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50%      { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}

/* ---------- content sections ---------------------------------- */

section.block {
  padding: clamp(5rem, 12vh, 9rem) 0;
  border-top: 1px solid var(--hair);
}

.lede {
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.42rem);
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
}

.lede .quiet { color: var(--ink-dim); }

/* FAQ */
.faq { display: grid; gap: 0; }

.qa {
  padding: 1.7rem 0;
  border-top: 1px solid var(--hair);
}
.qa:first-child { border-top: 0; padding-top: 0; }

.qa h3 {
  margin: 0 0 0.5rem;
  font-size: 1.22rem;
  font-weight: 400;
  color: #eef1fa;
}

.qa p {
  margin: 0;
  color: var(--ink-dim);
  max-width: 56ch;
}

/* community / QQ */
.join { text-align: center; }

.join .lede { margin: 0 auto 2.6rem; max-width: 40ch; }

.qq {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.6rem 2.4rem;
  border: 1px solid var(--hair);
  border-radius: 4px;
  background: rgba(140, 165, 230, 0.04);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.qq:hover {
  border-color: rgba(169, 192, 255, 0.4);
  background: rgba(140, 165, 230, 0.08);
  transform: translateY(-2px);
}

.qq__label {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.qq__num {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.06em;
  color: #f1f4fc;
  text-shadow: 0 0 18px rgba(150, 185, 255, 0.25);
}

.qq__hint {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  min-height: 1em;
}

/* footer */
.foot {
  padding: 3rem 0 3.4rem;
  border-top: 1px solid var(--hair);
  text-align: center;
}
.foot p {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- scroll reveal ------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

