/*
  The Evade landing. Plain CSS, no build: the palette is the panel's
  (painel/src/index.css), which is itself the client's clickgui theme, and the
  fall is the panel login's (painel/src/features/auth/login.css).
*/

:root {
  --bg: #131419;
  --surface: #18191f;
  --surface-2: #1d1e23;
  --surface-3: #212228;
  --border: #2c2d33;
  --border-strong: #484951;

  --text: #ffffff;
  --text-secondary: #d6d6dc;
  --text-muted: #898a8c;
  --text-faint: #6c6e7a;

  --accent: #ffefbd;
  --accent-hover: #fff1c4;
  --accent-active: #e6d7aa;
  --on-accent: #18191f;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* One screen, never a scrollbar - not even while something falls off it. */
  overflow: hidden;
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}

/* ------------------------------------------------------------- backdrop */

/* A faint pixel-art brick wall, the same tile as the panel's login screen. */
.bricks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABACAIAAABdtOgoAAADlklEQVR42u1cTXPaMBAVwraURnSIG4YQCJ1eO53+/3+TqRPjME1pDy3B2IQeyORAcKIVWkt2dk8+vCzSxh/v7Yc6375+Z9r24/bm8+QKhP8ynerjr5PkcjTWx8+ydHw50cens1vo+qH+ofigKIqiKHTQ6/WaMXYMXgiRpOnw/BzJfxPxnB1tURRpIvM8n47H8/t7fee7VbbJ9nbErXu0a/r/3abY3o54zT9v8BC02ziFwK11hoORPnqZrz4ICcKrkxN9/N+HhzAAvHOKch2FAvC2LHLo+qH+ofhO7+MZ3YYOLTjIu2dZCuXj2PoA6h+Kh+736YsaijiO38TfzbMq/8FyuSQ+boBnjPFOV0r5MoAg/wG9BAzZZCiklIxYkCvr9XpWlBPHE1ya+PZpXZAW43iiVBPfPq0L0wFxPDzIr6F8HFsfQP1D8dD9djng87l5LKv8kw5wrQMuhm8r4cVisS7y3TV2vv6Y+sEzPa9a5yxLr8YAfXCTgvUE1L9WPUBKWZbl43bjOX8PumG5KXYXTdE3uh9hpRQoy+HElFJBNwy6oVKqKQQMwII45zXvx4AgKaU0o+8JAeMWw2d9P+9BInDi4451QL8/sMJnbeXrsesHMgLog9UarCeg/kkHeKkD7uYZNl/G7s/B9g/VQ1V6y349QAhxm80G8SeqH+jgOUbfw2R0+XPxC4lE+UmNjCkM94f8aEbWT7ZmfFtw/b/URxo/BIz6gihx74UO2DyW2HwZuz8H27+t+gHpAC/7gl7hs7b4L6von/EtXw/FQ/uFAuLjzGm/EPUFOe4Xor4g5rZfiFOjjnc6gPi++76gV/gsdv+Mb/l6KB66X9IBrnXAQZ5rwH+heOz8PrS/CKpXoP6r4tPI+YDXSw7vvR5Qg22329ZkW3kTc+v1E2W8X+Qe0n8dHlxzyQGPmlNfkGsdMDgfWeG/UDx2fh/aXwTl71D/VfEhHdC0+QAoH8euBxzJ36+T5Pn6JbW/ThLs+YZWzQcY4E+l/Lda7S72JJHv8wFmrMm3T71S6lTKUyn1m9rtMtfAeD7ALJQe5ro1Qx9FEWjxmvGheoDjW4fqAU2bD4Dycex6ADZ/x55vIB3g63lB2Oft2Mqn29IH2PPPdF5QHXghxN08O+vHLa8HMF+zm3meXwxHv/8ssOoBx1Axr9it28UYHldz5I3zTtitzkNgeGATWa3nBWGft2Mrn25LH2DPP9N5QZ7afyHyeGNOrAKBAAAAAElFTkSuQmCC");
  /* 128x64 tile at 3x, kept crisp - pixel art like the mascot. */
  background-size: 384px 192px;
  image-rendering: pixelated;
  mask-image: radial-gradient(ellipse 60% 70% at 70% 45%, black, transparent 80%);
  /* Parallax: the wall rises too, but far slower than the streaks - it sits
     a bit further back. One tile height per loop, so it wraps seamlessly. */
  animation: bricks 1.2s linear infinite;
}

.streaks {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.streaks span {
  position: absolute;
  top: 0;
  left: var(--x);
  width: 2px;
  height: var(--h);
  opacity: var(--o);
  border-radius: 999px;
  background: linear-gradient(to bottom, transparent, #fff, transparent);
  animation: streak var(--d) linear infinite;
  animation-delay: calc(var(--t) * -1);
}

/* ----------------------------------------------------------------- page */

.page {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100svh;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

/* The watermark tile from the client: accent square, logo cut in. */
.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 6px 20px -6px rgb(255 239 189 / 0.5);
}

/* One colour on transparency, tinted by currentColor - as the DLL does. */
.logo {
  width: 72%;
  height: 72%;
  background: currentColor;
  mask: url("/assets/logo-mask.png") center / contain no-repeat;
  -webkit-mask: url("/assets/logo-mask.png") center / contain no-repeat;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* The copy and the mascot share one row, both centred on it, and the row sits in
   the middle of whatever height the nav and the footer leave. */
.hero {
  display: grid;
  /* minmax(0, …): the print may spill out of its column, never widen it. */
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: 32px 0;
}

/* ----------------------------------------------------------------- copy */

/* The headline is sized off its own column, not the viewport, so each line
   ("Quem sonega junto," / "vence junto.") always fits on one row. */
.copy {
  container-type: inline-size;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 10.5cqi, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

h1 .line {
  display: block;
  white-space: nowrap;
}

.accent {
  color: var(--accent);
  text-shadow: 0 0 48px rgb(255 239 189 / 0.25);
}

.lede {
  max-width: 470px;
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.65;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 36px;
}

.cta-hint {
  margin: 0;
  color: var(--text-faint);
  font-size: 13px;
}

/* -------------------------------------------------------------- buttons */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    translate 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.btn svg {
  flex-shrink: 0;
}

.icon-discord {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate 0.15s ease;
}

.btn-primary {
  height: 64px;
  padding: 0 32px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  box-shadow:
    0 0 0 6px rgb(255 239 189 / 0.08),
    0 14px 40px -10px rgb(255 239 189 / 0.6);
}

.btn-primary:hover {
  translate: 0 -2px;
  background: var(--accent-hover);
  box-shadow:
    0 0 0 8px rgb(255 239 189 / 0.1),
    0 20px 50px -10px rgb(255 239 189 / 0.75);
}

.btn-primary:active {
  translate: none;
  background: var(--accent-active);
}

.btn-primary:hover .icon-arrow {
  translate: 4px 0;
}

/* A sweep of light across it on hover. */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.6), transparent);
  translate: -120% 0;
  pointer-events: none;
}

.btn-primary:hover::after {
  animation: shine 0.75s ease-out;
}

.btn-ghost {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: rgb(255 255 255 / 0.02);
  color: var(--text-secondary);
  font-size: 13px;
}

.btn-ghost .icon-discord {
  width: 16px;
  height: 16px;
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
  color: var(--text);
}

/* No invite yet: still visibly the call to action, but plainly not live. */
.btn.is-soon {
  cursor: default;
}

.btn-primary.is-soon {
  background: var(--surface-2);
  color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  translate: none;
}

.btn-primary.is-soon::after,
.btn-primary.is-soon .icon-arrow {
  display: none;
}

.btn-ghost.is-soon {
  color: var(--text-faint);
}

.btn-primary.is-soon:hover {
  translate: none;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

/* ------------------------------------------------------------- features */

/* ---------------------------------------------------------------- scene */

.scene {
  position: relative;
  display: grid;
  grid-template: 100% / 100%;
  place-items: center;
  height: min(76vh, 680px);
}

/* Mascot and print stack in the same cell and take turns. */
.scene > * {
  grid-area: 1 / 1;
}

.bloom {
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 239 189 / 0.12), transparent 65%);
  filter: blur(10px);
}

.drop-in {
  position: relative;
  height: 88%;
  aspect-ratio: 778 / 1000;
  animation: swap 14s infinite both;
}

/* Half a cycle behind the mascot: lands as he leaves. */
.shot-drop {
  width: 100%;
  animation: swap 14s 7s infinite both;
}

/* Wide screens: anchor the print just left of its column and let it grow to
   the right, out to 24px short of the viewport edge. */
@media (min-width: 1280px) {
  .shot-drop {
    justify-self: start;
    width: min(780px, 50vw - 40px);
    margin-left: -24px;
  }
}

.shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 30px 60px -12px rgb(0 0 0 / 0.65), 0 0 0 6px rgb(255 255 255 / 0.03), 0 0 80px rgb(255 239 189 / 0.08);
  user-select: none;
}

.fall {
  position: relative;
  width: 100%;
  height: 100%;
  animation: fall 4.6s ease-in-out infinite;
}

.flail {
  width: 100%;
  height: 100%;
  transform-origin: 55% 40%;
  animation: flail 1.7s ease-in-out infinite;
}

.mascot {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  filter: drop-shadow(0 28px 44px rgb(0 0 0 / 0.5));
  animation: shiver 0.14s linear infinite;
}

.fire-glow {
  position: absolute;
  left: 2%;
  top: 52%;
  width: 46%;
  height: 46%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 140 50 / 0.38), transparent 70%);
  filter: blur(24px);
  animation: glow 1.8s ease-in-out infinite;
}

.embers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.embers span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  background: #ff8a3d;
  /* Pixel-art outline: a hard black ring first, the glow outside it. */
  box-shadow: 0 0 0 2px #0a0a0a, 0 0 10px rgb(255 140 50 / 0.75);
  animation: ember var(--d) ease-out infinite;
  animation-delay: calc(var(--t) * -1);
}

.embers span:nth-child(3n + 1) {
  background: #ffd166;
}

/* --------------------------------------------------------------- footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: center;
  padding: 24px 0 28px;
  color: var(--text-faint);
  font-size: 12px;
}

/* --------------------------------------------------------------- motion */

.rise {
  animation: rise 0.6s ease-out both;
  animation-delay: var(--delay, 0ms);
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 12px;
  }
  to {
    opacity: 1;
    translate: none;
  }
}

/* 14s turn: falls in (~1s), holds ~5s, drops out the bottom, waits for the other. */
@keyframes swap {
  0% {
    opacity: 0;
    translate: 0 -80vh;
    rotate: -10deg;
    animation-timing-function: cubic-bezier(0.22, 1.1, 0.36, 1);
  }
  5% {
    opacity: 1;
    translate: 0 16px;
    rotate: 3deg;
    animation-timing-function: ease-out;
  }
  7%,
  43% {
    opacity: 1;
    translate: none;
    rotate: none;
    animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.4);
  }
  50%,
  100% {
    opacity: 0;
    translate: 0 90vh;
    rotate: 8deg;
  }
}

/* Turbulence: an uneven drift, so it never reads as a metronome. */
@keyframes fall {
  0%,
  100% {
    translate: 0 0;
  }
  25% {
    translate: -7px -14px;
  }
  50% {
    translate: 5px 5px;
  }
  75% {
    translate: 8px -9px;
  }
}

@keyframes flail {
  0%,
  100% {
    rotate: -3deg;
  }
  50% {
    rotate: 2.5deg;
  }
}

@keyframes shiver {
  0%,
  100% {
    translate: 0 0;
  }
  25% {
    translate: 0.6px -0.6px;
  }
  75% {
    translate: -0.6px 0.6px;
  }
}

/* The world rushes up past him - that is what makes it a fall. */
@keyframes streak {
  from {
    translate: 0 110vh;
  }
  to {
    translate: 0 -40vh;
  }
}

@keyframes bricks {
  to {
    background-position: 0 -192px;
  }
}

@keyframes ember {
  0% {
    opacity: 0;
    translate: 0 0;
    scale: 1;
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: var(--drift) -280px;
    scale: 0.6;
  }
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.55;
    scale: 1;
  }
  50% {
    opacity: 0.95;
    scale: 1.08;
  }
}

@keyframes shine {
  from {
    translate: -120% 0;
  }
  to {
    translate: 260% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .streaks,
  .embers,
  .shot-drop {
    display: none;
  }
}

/* --------------------------------------------------------------- mobile */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    /* The mascot gets whatever height the copy leaves. */
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    padding-top: 0;
    text-align: center;
  }

  /* Mascot first: he is the hook. */
  .scene {
    order: -1;
    height: 100%;
    max-height: 440px;
  }

  .copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .cta {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary {
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 520px) {
  .nav {
    height: 72px;
  }
}
