/* ============ RESET ============ */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Impact', 'Arial Black', 'Helvetica Neue', sans-serif;
  background: #fff;
  color: #000;
  overflow-x: hidden;
  line-height: 1.3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: url("art/rage-face.webp") 16 16, auto;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ============ NOISE OVERLAY ============ */
#noise {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  animation: noise-shift 0.4s steps(4) infinite;
}
@keyframes noise-shift {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-3%, 2%); }
  50%  { transform: translate(2%, -1%); }
  75%  { transform: translate(-1%, 3%); }
  100% { transform: translate(0,0); }
}

/* ============ FFFUUU RAIN ============ */
#rain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.drop {
  position: absolute;
  top: -10%;
  color: #000;
  font-weight: 900;
  font-family: 'Impact', 'Arial Black', sans-serif;
  white-space: nowrap;
  animation: fall linear forwards;
  text-shadow: 2px 2px 0 #fff;
  opacity: 0.6;
}
@keyframes fall {
  0%   { transform: translateY(-10vh) rotate(0deg); }
  100% { transform: translateY(110vh) rotate(15deg); }
}

/* ============ DRIFTING FACES ============ */
#drift {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.drift-face {
  position: absolute;
  width: 80px;
  opacity: 0.15;
  filter: contrast(1.4);
  animation: drift linear infinite;
}
@keyframes drift {
  0%   { transform: translate(-15vw, 0) rotate(0); }
  100% { transform: translate(115vw, 50px) rotate(720deg); }
}

/* ============ NAV ============ */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 4px solid #ff0000;
  box-shadow: 0 4px 0 #fff, 0 8px 0 #000;
}
.brand {
  font-size: 28px;
  letter-spacing: 2px;
  font-weight: 900;
  animation: brand-glitch 4s infinite;
}
@keyframes brand-glitch {
  0%, 92%, 100% { transform: skewX(0); }
  93% { transform: skewX(-8deg); color: #ff0000; }
  95% { transform: skewX(8deg); color: #fff; }
  97% { transform: skewX(-4deg); color: #ff0000; }
}
#nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}
#nav ul a {
  font-size: 14px;
  letter-spacing: 1px;
  position: relative;
}
#nav ul a:hover {
  color: #ff0000;
  animation: jitter 0.2s infinite;
}
.buy {
  background: #ff0000;
  color: #fff;
  padding: 8px 20px;
  border: 3px solid #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  animation: pulse 0.8s ease-in-out infinite;
  box-shadow: 4px 4px 0 #fff;
}
.buy:hover {
  background: #fff;
  color: #ff0000;
  animation: jitter 0.15s infinite, pulse 0.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.06); }
}
@keyframes jitter {
  0%,100% { transform: translate(0,0); }
  25%     { transform: translate(-2px, 1px); }
  50%     { transform: translate(2px, -1px); }
  75%     { transform: translate(-1px, -2px); }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  z-index: 3;
  min-height: 90vh;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 40px, rgba(0,0,0,0.03) 40px 41px),
    #fff;
}
.ascii {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1;
  color: #ff0000;
  margin-bottom: 16px;
  letter-spacing: 0;
  font-weight: 900;
}
.hero-face {
  position: relative;
  margin: 20px auto;
}
#bigFace {
  width: min(360px, 70vw);
  filter: drop-shadow(8px 8px 0 #ff0000);
  animation: face-shake 0.12s infinite;
  cursor: pointer;
}
@keyframes face-shake {
  0%,100% { transform: translate(0,0) rotate(0); }
  20%     { transform: translate(-2px, 1px) rotate(-0.3deg); }
  40%     { transform: translate(2px, -1px) rotate(0.5deg); }
  60%     { transform: translate(-1px, 2px) rotate(-0.2deg); }
  80%     { transform: translate(1px, -2px) rotate(0.4deg); }
}
.bubble {
  position: absolute;
  top: 10%;
  right: -40px;
  background: #fff;
  border: 4px solid #000;
  padding: 12px 18px;
  font-size: 20px;
  font-weight: 900;
  transform: rotate(6deg);
  box-shadow: 6px 6px 0 #000;
  white-space: nowrap;
  animation: bubble-bob 1.2s ease-in-out infinite;
}
@keyframes bubble-bob {
  0%,100% { transform: rotate(6deg) translateY(0); }
  50%     { transform: rotate(6deg) translateY(-6px); }
}
.title {
  font-size: clamp(56px, 12vw, 160px);
  font-weight: 900;
  margin-top: 24px;
  letter-spacing: -2px;
  -webkit-text-stroke: 3px #000;
  color: #ff0000;
  text-shadow: 8px 8px 0 #000;
}
.shake { animation: title-shake 0.3s ease-in-out infinite; display: inline-block; }
@keyframes title-shake {
  0%,100% { transform: translate(0,0) rotate(0); }
  20%     { transform: translate(-3px, 2px) rotate(-0.5deg); }
  40%     { transform: translate(3px, -2px) rotate(0.5deg); }
  60%     { transform: translate(-2px, 3px) rotate(-0.3deg); }
  80%     { transform: translate(2px, -3px) rotate(0.3deg); }
}
.tag {
  font-size: 14px;
  margin-top: 12px;
  max-width: 700px;
  letter-spacing: 4px;
  opacity: 0.7;
}

/* ============ CA BOX ============ */
.ca {
  margin: 32px auto 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #000;
  color: #fff;
  padding: 8px 8px 8px 16px;
  border: 4px solid #ff0000;
  box-shadow: 6px 6px 0 #ff0000;
  font-family: 'Courier New', monospace;
  max-width: 95vw;
  flex-wrap: wrap;
}
.ca-label { font-weight: 900; color: #ff0000; }
#caText {
  font-size: 14px;
  word-break: break-all;
  letter-spacing: 1px;
}
#copyCa {
  background: #ff0000;
  color: #fff;
  border: none;
  padding: 6px 14px;
  font-weight: 900;
  font-family: inherit;
  letter-spacing: 2px;
  transition: transform 0.05s;
}
#copyCa:hover { transform: scale(1.1); }
#copyCa:active { transform: scale(0.95); }
#copyCa.copied { background: #fff; color: #000; }

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: 4px solid #000;
  background: #fff;
  color: #000;
  font-weight: 900;
  letter-spacing: 2px;
  font-size: 16px;
  box-shadow: 6px 6px 0 #000;
  transition: all 0.08s ease;
}
.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 #000;
}
.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 #000;
}
.btn.primary {
  background: #ff0000;
  color: #fff;
  border-color: #000;
  box-shadow: 6px 6px 0 #000;
}
.btn.primary:hover { box-shadow: 9px 9px 0 #000; background: #000; color: #ff0000; }

/* ============ TICKER ============ */
.ticker {
  position: relative;
  z-index: 3;
  background: #ff0000;
  color: #fff;
  padding: 14px 0;
  overflow: hidden;
  display: flex;
  white-space: nowrap;
  border-top: 4px solid #000;
  border-bottom: 4px solid #000;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 4px;
}
.ticker span {
  display: inline-block;
  padding-right: 0;
  animation: scroll-left 22s linear infinite;
}
@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============ SECTIONS ============ */
.section {
  position: relative;
  z-index: 3;
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.section.dark {
  max-width: none;
  background: #000;
  color: #fff;
  margin-top: 0;
  border-top: 8px solid #ff0000;
  border-bottom: 8px solid #ff0000;
  padding-left: max(24px, calc((100vw - 1200px) / 2));
  padding-right: max(24px, calc((100vw - 1200px) / 2));
}
.section h2 {
  font-size: clamp(36px, 7vw, 96px);
  letter-spacing: -1px;
  margin-bottom: 32px;
  -webkit-text-stroke: 2px #000;
  color: #ff0000;
}
.section.dark h2 {
  -webkit-text-stroke: 2px #fff;
  color: #ff0000;
}

/* ============ STORY ============ */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.story-col {
  border: 4px solid #000;
  padding: 24px;
  background: #fff;
  box-shadow: 8px 8px 0 #ff0000;
  position: relative;
}
.story-col:nth-child(2) { transform: rotate(-0.5deg); }
.story-col:nth-child(3) { transform: rotate(0.4deg); }
.story-col h3 {
  font-size: 48px;
  margin-bottom: 12px;
  color: #ff0000;
  -webkit-text-stroke: 1px #000;
}
.story-col p {
  font-size: 14px;
  text-transform: none;
  margin-bottom: 12px;
  line-height: 1.5;
}
.repeat {
  margin-top: 48px;
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.4;
  line-height: 1.6;
  word-spacing: 4px;
}
.repeat.inv { color: #fff; opacity: 0.3; }

/* ============ RAGENOMICS ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.stat {
  border: 4px solid #ff0000;
  padding: 24px;
  text-align: center;
  background: #000;
  transition: transform 0.1s;
}
.stat:hover {
  transform: scale(1.05) rotate(1deg);
  background: #ff0000;
}
.stat b {
  display: block;
  font-size: 32px;
  color: #ff0000;
  margin-bottom: 8px;
}
.stat:hover b { color: #fff; }
.stat span {
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.8;
}
.ca-mini {
  font-family: 'Courier New', monospace;
  text-align: center;
  margin-top: 32px;
  font-size: 14px;
  word-break: break-all;
  letter-spacing: 1px;
  color: #ff0000;
}

/* ============ MEMES ============ */
.meme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.meme {
  border: 4px solid #000;
  background: #fff;
  padding: 12px;
  box-shadow: 8px 8px 0 #000;
  transition: all 0.15s;
}
.meme:hover {
  box-shadow: 12px 12px 0 #ff0000;
  transform: translate(-4px, -4px) rotate(0) !important;
}
.meme img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: #f4f4f4;
}
.meme figcaption {
  padding: 12px 4px 4px;
  text-align: center;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 1px;
}
.tilt-a { transform: rotate(-1.5deg); }
.tilt-b { transform: rotate(1deg); }
.tilt-c { transform: rotate(-0.6deg); }

/* ============ COMMUNITY ============ */
#community .big {
  font-size: clamp(20px, 3vw, 32px);
  margin-bottom: 16px;
  letter-spacing: 2px;
  line-height: 1.2;
}
.socials {
  display: flex;
  gap: 16px;
  margin: 40px 0;
  flex-wrap: wrap;
}

/* ============ FOOTER ============ */
footer {
  position: relative;
  z-index: 3;
  background: #000;
  color: #fff;
  text-align: center;
  padding: 32px 24px;
  border-top: 4px solid #ff0000;
}
footer p { margin-bottom: 8px; }
.tiny {
  font-size: 11px;
  opacity: 0.5;
  text-transform: none;
  letter-spacing: 0.5px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  #nav { padding: 10px 14px; }
  #nav ul { display: none; }
  .bubble { font-size: 14px; right: -10px; top: 0; }
  .ascii { font-size: 9px; }
  .ca { font-size: 11px; padding: 8px; }
  #caText { font-size: 11px; }
  .ticker { font-size: 16px; }
  .section { padding: 50px 16px; }
}

/* ============ GLOBAL SCREEN SHAKE (triggered by JS) ============ */
body.screen-shake { animation: screen-shake 0.4s; }
@keyframes screen-shake {
  0%,100% { transform: translate(0,0); }
  10%     { transform: translate(-6px, 4px); }
  20%     { transform: translate(6px, -4px); }
  30%     { transform: translate(-4px, -6px); }
  40%     { transform: translate(4px, 6px); }
  50%     { transform: translate(-8px, 2px); }
  60%     { transform: translate(8px, -2px); }
  70%     { transform: translate(-3px, 5px); }
  80%     { transform: translate(3px, -5px); }
  90%     { transform: translate(-2px, 2px); }
}
