/* Teeworlds Revival: cores do menu do jogo (menus_revival.h) */
:root {
  --bg: #0a0d12;
  --surface: #11151c;
  --surface2: #181d26;
  --line: rgba(255, 255, 255, .07);
  --text: #edf0f2;
  --muted: #a8b3c2;
  --faint: #7a8594;
  --gold: #f6b93b;
  --gold2: #ffd479;
  --on-gold: #1a140a;
  --red: #f26b6b;
  --blue: #739eff;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--gold); color: var(--on-gold); }

h1, h2, h3 { font-weight: 900; font-style: italic; letter-spacing: -.02em; line-height: 1.02; }
h2 { font-size: clamp(40px, 7vw, 104px); }
.kicker {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.kicker::before { content: ""; display: inline-block; width: 28px; height: 2px; background: var(--gold); vertical-align: middle; margin-right: 12px; }

/* letras que entram uma a uma (main.js quebra o texto) */
.split .w { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: top; padding: 0 .04em .12em; margin-bottom: -.12em; }
.split .c { display: inline-block; will-change: transform; }

/* botoes */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; border-radius: 12px; padding: 13px 22px;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s;
  overflow: hidden; isolation: isolate;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-big { padding: 17px 28px; font-size: 17px; }
.btn-small { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn-gold { background: var(--gold); color: var(--on-gold); box-shadow: 0 10px 40px -10px rgba(246, 185, 59, .55); }
.btn-gold::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -10px rgba(246, 185, 59, .75); }
.btn-gold:hover::after { transform: translateX(120%); }
.btn-ghost { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.btn em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); background: rgba(246, 185, 59, .12); border-radius: 6px; padding: 3px 7px; }
.is-soon { cursor: default; }

/* abertura */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-content: center; justify-items: center; gap: 28px;
}
.loader-logo { width: min(340px, 70vw); animation: bob 1.6s ease-in-out infinite; }
.loader-bar { width: 200px; height: 3px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-1deg); } }

/* camadas por cima de tudo */
.fx { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 89; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(4%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}
.cursor {
  position: fixed; left: 0; top: 0; z-index: 95; width: 32px; height: 32px; pointer-events: none;
  opacity: 0; transition: opacity .2s, width .2s, height .2s; image-rendering: auto;
}
@media (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
  body.has-cursor .cursor { opacity: 1; }
}
body.cursor-hot .cursor { width: 40px; height: 40px; }

/* barra de cima */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
  transition: background .3s, backdrop-filter .3s, padding .3s, transform .4s var(--ease);
}
.nav.solid { background: rgba(10, 13, 18, .72); backdrop-filter: blur(14px); padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.nav.hide { transform: translateY(-100%); }
.nav > .btn { justify-self: end; }
.nav-brand { justify-self: start; display: flex; align-items: center; gap: 10px; font-weight: 800; font-style: italic; letter-spacing: -.01em; }
.nav-brand img { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 30px; font-size: 15px; font-weight: 600; color: var(--muted); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
@media (max-width: 760px) { .nav { grid-template-columns: 1fr auto; } .nav-links { display: none; } }

/* topo */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; display: grid; place-items: center; }
.hero-media { position: absolute; inset: 0; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); filter: saturate(1.1) brightness(.78); }
.snow { position: absolute; inset: 0; pointer-events: none; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(10, 13, 18, .1) 0%, rgba(10, 13, 18, .55) 60%, rgba(10, 13, 18, .9) 100%),
    linear-gradient(180deg, rgba(10, 13, 18, .5) 0%, transparent 25%, transparent 60%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 0 16px; display: grid; justify-items: center; }
.hero-logo { width: min(620px, 86vw); filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .6)); will-change: transform; }
.hero-title { font-size: clamp(38px, 6.4vw, 92px); margin-top: 6px; text-shadow: 0 6px 30px rgba(0, 0, 0, .6); }
.hero-sub { margin-top: 14px; font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); max-width: 560px; }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; z-index: 2; width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* historia */
.story { position: relative; height: 420vh; }
.story-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; place-items: center; }
.story-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.35) contrast(1.1); transform: scale(1.15); }
.story-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 0%, var(--bg) 85%); }
.story-lines { position: relative; z-index: 2; width: 100%; height: 100%; display: grid; place-items: center; }
.story-line {
  grid-area: 1 / 1; padding: 0 16px; text-align: center;
  font-size: clamp(40px, 8vw, 128px); font-weight: 900; font-style: italic; letter-spacing: -.03em; line-height: 1;
  opacity: 0;
}
.story-final { color: var(--gold); text-shadow: 0 0 60px rgba(246, 185, 59, .45); position: relative; }
.story-final::before, .story-final::after {
  content: attr(data-text); position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen;
}
.story-final::before { color: #ff3355; }
.story-final::after { color: #33d6ff; }
.story-final.glitch::before { animation: glitchA .45s steps(2) 2; }
.story-final.glitch::after { animation: glitchB .45s steps(2) 2; }
@keyframes glitchA { 0% { opacity: .9; transform: translate(-8px, 2px); clip-path: inset(10% 0 55% 0); } 50% { opacity: .9; transform: translate(6px, -3px); clip-path: inset(60% 0 8% 0); } 100% { opacity: 0; } }
@keyframes glitchB { 0% { opacity: .9; transform: translate(8px, -2px); clip-path: inset(50% 0 20% 0); } 50% { opacity: .9; transform: translate(-6px, 3px); clip-path: inset(5% 0 70% 0); } 100% { opacity: 0; } }
.story-flash { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }

/* secoes */
.section-head { text-align: center; padding: 0 16px; margin-bottom: clamp(40px, 6vw, 80px); }

/* trailer */
.trailer { padding: clamp(100px, 14vw, 180px) 0 clamp(80px, 10vw, 140px); }
.player-wrap { perspective: 1400px; padding: 0 clamp(16px, 5vw, 80px); }
.player {
  position: relative; max-width: 1280px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden;
  background: #000; transform-origin: 50% 100%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 60px 120px -30px rgba(0, 0, 0, .8), 0 0 120px -40px rgba(246, 185, 59, .35);
}
.player video { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-cover { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .1), rgba(0, 0, 0, .55)); transition: opacity .5s; }
.player.playing .player-cover { opacity: 0; pointer-events: none; }
.play-btn {
  position: relative; z-index: 2; width: clamp(76px, 9vw, 116px); aspect-ratio: 1; border-radius: 50%;
  background: var(--gold); color: var(--on-gold); display: grid; place-items: center;
  box-shadow: 0 20px 60px -10px rgba(246, 185, 59, .7); transition: transform .35s var(--ease);
}
.play-btn svg { width: 40%; fill: currentColor; margin-left: 6%; }
.player-cover:hover .play-btn { transform: scale(1.1); }
.play-ring { position: absolute; width: clamp(76px, 9vw, 116px); aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--gold); animation: ring 2.4s var(--ease) infinite; }
.play-ring.r2 { animation-delay: 1.2s; }
@keyframes ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.4); opacity: 0; } }
.player-time { position: absolute; right: 18px; bottom: 16px; font-size: 13px; font-weight: 700; background: rgba(0, 0, 0, .6); padding: 4px 9px; border-radius: 7px; }

/* CTF */
.mode { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.mode-bg { position: absolute; inset: -10% 0; }
.mode-bg video { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(1.1); }
.mode-shade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(10, 13, 18, .85) 35%, rgba(10, 13, 18, .2) 75%), linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%); }
.mode-inner { position: relative; z-index: 2; max-width: 920px; padding: 0 clamp(16px, 6vw, 96px); }
.mode-title { font-size: clamp(44px, 7.4vw, 112px); }
.mode-text { margin-top: 24px; color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); max-width: 520px; }
.flag { position: absolute; z-index: 1; width: clamp(70px, 9vw, 140px); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .5)); transform-origin: 10% 100%; }
.flag-red { right: 22%; top: 18%; animation: wave 2.6s ease-in-out infinite; }
.flag-blue { right: 8%; top: 40%; transform-origin: 90% 100%; animation: wave-esq 2.6s ease-in-out -1.3s infinite; }
@keyframes wave { 50% { transform: rotate(-5deg) skewY(2deg); } }
@keyframes wave-esq { 50% { transform: rotate(5deg) skewY(-2deg); } } /* azul espelhada: o mastro fica na direita */
@media (max-width: 760px) {
  .mode { align-items: flex-end; padding-bottom: 80px; }
  .mode-shade { background: linear-gradient(180deg, var(--bg) 0%, rgba(10, 13, 18, .3) 30%, rgba(10, 13, 18, .9) 65%, var(--bg) 100%); }
  .flag-red { right: 46%; top: 14%; } .flag-blue { right: 14%; top: 20%; }
}

/* recursos */
.features { padding: clamp(80px, 10vw, 140px) 0; }
.marquee { overflow: hidden; display: grid; gap: 6px; margin-bottom: clamp(60px, 8vw, 110px); -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-row { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-row.reverse { animation-direction: reverse; animation-duration: 44s; }
.marquee-row span { font-size: clamp(40px, 6vw, 88px); font-weight: 900; font-style: italic; letter-spacing: -.03em; line-height: 1.15; white-space: nowrap; padding-right: .6em; color: transparent; -webkit-text-stroke: 1.5px rgba(237, 240, 242, .22); transition: color .3s, -webkit-text-stroke-color .3s; }
.marquee-row span::after { content: "\2726"; font-style: normal; font-size: .35em; vertical-align: middle; margin-left: .6em; color: var(--gold); -webkit-text-stroke: 0; }
.marquee-row span:nth-child(3n+1) { color: var(--text); -webkit-text-stroke-color: transparent; }
@keyframes marquee { to { transform: translateX(-50%); } }
.feature-list { width: min(1200px, calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.feature { background: var(--bg); padding: clamp(26px, 3vw, 40px); transition: background .3s; }
.feature:hover { background: var(--surface); }
.feature-n { font-size: 13px; font-weight: 800; color: var(--gold); letter-spacing: .1em; }
.feature h3 { font-size: 28px; margin: 14px 0 10px; }
.feature p { color: var(--muted); font-size: 15.5px; }
@media (max-width: 900px) { .feature-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-list { grid-template-columns: 1fr; } }

/* final */
.final { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse at 50% 100%, rgba(246, 185, 59, .12), transparent 60%), var(--bg); }
.playground { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.final-inner { position: relative; z-index: 2; text-align: center; padding: 0 16px; display: grid; justify-items: center; pointer-events: none; }
.final-inner > * { pointer-events: auto; }
.final-logo { width: min(380px, 72vw); margin-bottom: 10px; }
.final-inner p { color: var(--muted); margin: 14px 0 28px; }
.final-inner .hint { pointer-events: none; margin: 26px 0 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
@media (pointer: coarse) { .final-inner .hint { display: none; } }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 28px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.footer span:first-child { color: var(--text); font-weight: 800; font-style: italic; }

/* sem animacao: as frases da historia ficam uma embaixo da outra */
.reduz .story { height: auto; }
.reduz .story-pin { position: relative; height: auto; padding: 18vh 0; }
.reduz .story-lines { display: flex; flex-direction: column; gap: 4vh; }
.reduz .story-line { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .grain, .marquee-row, .flag, .play-ring, .loader-logo { animation: none; }
}
