/* RockBay Games: fundo azul-noite quase preto, texto creme e um destaque só, o azul-glaciar.
   O vermelho do logo do Planets & Beyond aparece só no status do jogo. */
:root {
  --ink: #070b14;
  --ink-2: #0b111d;
  --line: rgba(205, 220, 245, 0.12);
  --line-strong: rgba(205, 220, 245, 0.24);
  --glacier: #4ea3e6;
  --cream: #f1ece1;
  --text: #d9dee8;
  --muted: #949fb3;
  --pb-red: #f05a43;
  --wrap: 1320px;
  --wrap-wide: 1600px;
  --gutter: clamp(16px, 4vw, 56px);
  --display: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* Grão de filme, o mesmo na abertura e nas imagens */
  --grain: 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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--cream); }
p, figure { margin: 0; }

:focus-visible { outline: 2px solid var(--glacier); outline-offset: 4px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: var(--wrap-wide); margin-left: auto; margin-right: auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  background: var(--cream); color: var(--ink); padding: 10px 14px; font-weight: 500; text-decoration: none;
}
.skip:focus { top: 16px; }

/* Tipografia: um único momento gigante (a frase da abertura); o resto em escala menor */
.title {
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.title-sm {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.eyebrow, .status, .facts dt, figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.eyebrow { color: var(--glacier); margin-bottom: 18px; }
.lead { font-size: clamp(1.08rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--text); max-width: 36em; }

/* Botão: um por bloco, retângulo glaciar com seta */
.cta {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px;
  font: 500 1rem var(--display);
  text-decoration: none;
  color: #04101e;
  background: var(--glacier);
  padding: 0 22px 0 24px;
  border-radius: 2px;
  transition: background 0.2s ease;
}
.cta:hover { background: #79bcef; }
.cta-arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.cta:hover .cta-arrow { transform: translateY(3px); }

/* Barra de navegação: alinhada à mesma grade do conteúdo */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  height: 72px;
  display: flex; align-items: center; gap: 40px;
}
.nav.is-scrolled {
  background: rgba(7, 11, 20, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  font: 600 1rem var(--display);
  letter-spacing: -0.01em;
  color: var(--cream);
  min-height: 44px;
}
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 500 0.92rem var(--display);
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--cream); }
.lang { display: flex; }
.lang button {
  min-width: 44px; min-height: 44px;
  font: 500 0.75rem var(--mono);
  letter-spacing: 0.06em;
  background: none; border: 0; cursor: pointer;
  color: var(--muted);
  position: relative;
}
.lang button::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 10px; height: 1px; background: transparent;
}
.lang button:hover { color: var(--cream); }
.lang button[aria-pressed="true"] { color: var(--cream); }
.lang button[aria-pressed="true"]::after { background: var(--glacier); }

/* Abertura: a cena ocupa a tela; o texto fica embaixo, à esquerda */
.hero {
  position: relative;
  min-height: 600px;
  height: 100vh;
  height: 100svh;
  max-height: 1200px;
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: radial-gradient(120% 80% at 70% 42%, #0c1730 0%, var(--ink) 60%);
}
.hero-scene { position: absolute; inset: 0; }
.hero-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-canvas, .hero-halo { opacity: 0; transition: opacity 0.8s ease; }
.hero-scene.is-live .hero-canvas, .hero-scene.is-live .hero-halo { opacity: 1; }
.hero-halo {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(78, 163, 230, 0.3) 0%, rgba(78, 163, 230, 0.12) 56%, rgba(78, 163, 230, 0.035) 78%, transparent 100%);
  pointer-events: none;
}
.hero-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.is-still .hero-halo, .is-still canvas { display: none; }
/* Grão e vinheta por cima da cena; escurece o canto do texto sem apagar o planeta */
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(0deg, var(--ink) 0%, rgba(7, 11, 20, 0) 30%),
    linear-gradient(90deg, rgba(7, 11, 20, 0.6) 0%, rgba(7, 11, 20, 0) 46%),
    radial-gradient(140% 100% at 60% 45%, transparent 55%, rgba(3, 5, 10, 0.55) 100%);
}
.hero::before, .shot::after, .studio-art::before {
  background: var(--grain);
  opacity: 0.07;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* some antes da borda de baixo, para não marcar a emenda com a seção seguinte */
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}
.hero-content {
  position: relative; z-index: 1;
  width: 100%;
  padding-bottom: clamp(40px, 7vh, 88px);
}
.hero-logo img { width: clamp(180px, 20vw, 300px); margin-bottom: clamp(18px, 2.6vh, 32px); }
.hero-line {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: var(--cream);
  max-width: 9em;
  margin-bottom: clamp(26px, 3.6vh, 40px);
  text-wrap: balance;
}
.hero-actions { display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap; }

/* Status do jogo: discreto, com um ponto que pulsa devagar */
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.status-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--pb-red); }
.status-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--pb-red);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(0.5); opacity: 0.9; }
  to { transform: scale(1.8); opacity: 0; }
}

/* O jogo */
.game { padding: clamp(72px, 9vw, 140px) 0 0; }
.game-intro {
  display: grid; grid-template-columns: 5fr 6fr; gap: 28px clamp(32px, 6vw, 96px); align-items: start;
}
.game-intro .lead { padding-top: 6px; }

.shot { position: relative; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink-2); }
/* O mesmo grão das imagens da abertura, por cima de cada captura */
.shot::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 16 / 9;
  pointer-events: none;
}
.shot figcaption { color: var(--muted); margin-top: 14px; text-transform: none; letter-spacing: 0.01em; font-size: 0.78rem; }

/* Três blocos de imagem com frase, alternando o lado */
.features { display: grid; gap: clamp(64px, 9vw, 140px); margin-top: clamp(64px, 8vw, 120px); }
.feature { display: grid; grid-template-columns: 7fr 4fr; gap: 28px clamp(32px, 5vw, 80px); align-items: center; }
.feature:nth-child(even) { grid-template-columns: 4fr 7fr; }
.feature:nth-child(even) .shot { order: 2; }
.feature-text h3 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.feature-text p { color: var(--muted); max-width: 26em; }
/* Gatilho de ação no fim de cada ponto: leva a algo real na página ou ao e-mail */
.more-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 14px;
  font: 500 0.95rem var(--display);
  color: var(--glacier);
  text-decoration: none;
}
.more-link span:first-child { border-bottom: 1px solid rgba(78, 163, 230, 0.35); transition: border-color 0.2s ease; }
.more-link:hover span:first-child { border-bottom-color: var(--glacier); }
.more-link:hover .cta-arrow { transform: translateX(4px); }

/* Os outros pontos: três colunas curtas */
.more {
  list-style: none; margin: clamp(80px, 10vw, 150px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px clamp(28px, 4vw, 64px);
}
.more li { border-top: 1px solid var(--line); padding-top: 24px; }
.more h3 { font: 600 1.2rem/1.2 var(--display); letter-spacing: -0.02em; margin-bottom: 10px; }
.more p { color: var(--muted); font-size: 0.97rem; }

/* Galeria: uma captura larga, duas médias e três menores; legendas embaixo */
.gallery { margin-top: clamp(96px, 12vw, 180px); }
.gallery-head { margin-bottom: clamp(32px, 4vw, 56px); }
.shots { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(32px, 3.6vw, 52px) clamp(12px, 1.4vw, 20px); }
.shot-full { grid-column: 1 / -1; }
.shot-half { grid-column: span 3; }
.shot-third { grid-column: span 2; }
.shots .shot { overflow: hidden; }
.shots .shot img { transition: transform 0.8s var(--ease), filter 0.4s ease; }
.shots .shot:hover img { transform: scale(1.025); filter: brightness(1.08); }
.shots .shot figcaption { position: relative; z-index: 1; background: var(--ink); padding-top: 14px; margin-top: 0; }

/* O estúdio: a baía (sem o logo embutido) com o logo de verdade por cima, e o texto ao lado */
.studio { padding: clamp(96px, 12vw, 180px) 0 clamp(72px, 9vw, 140px); }
.studio-grid { display: grid; grid-template-columns: 5fr 6fr; gap: 40px clamp(32px, 6vw, 96px); align-items: center; }
.studio-art { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.studio-bay { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: saturate(0.9); }
.studio-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0) 40%, rgba(7, 11, 20, 0.75) 100%);
}
.studio-art::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.studio-logo { position: absolute; z-index: 1; left: 50%; bottom: 9%; width: 58%; transform: translateX(-50%); filter: drop-shadow(0 6px 30px rgba(0, 0, 0, 0.5)); }
.studio-text .title { margin-bottom: 24px; }
.facts {
  display: flex; flex-wrap: wrap; gap: 20px clamp(32px, 5vw, 72px);
  margin: 40px 0 0; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.facts dt { color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font: 500 1.3rem var(--display); letter-spacing: -0.02em; color: var(--cream); }

/* Contato */
.contact { padding: clamp(64px, 8vw, 120px) 0; border-top: 1px solid var(--line); }
.contact-body { display: grid; grid-template-columns: 5fr 6fr; gap: 24px clamp(32px, 6vw, 96px); align-items: end; }
.contact-body p { color: var(--muted); margin-bottom: 20px; }
.mail {
  display: inline-flex; align-items: baseline; gap: 0.4em;
  font: 500 clamp(1.4rem, 3vw, 2.5rem) var(--display);
  letter-spacing: -0.035em;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 6px;
  overflow-wrap: anywhere;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.mail:hover { color: #fff; border-bottom-color: var(--glacier); }
.mail .cta-arrow { color: var(--glacier); font-size: 0.7em; }
.mail:hover .cta-arrow { transform: translateX(4px); }
.is-hidden { display: none !important; }

/* Rodapé enxuto: marca, e-mail, idioma e voltar ao topo */
.footer { border-top: 1px solid var(--line); padding: 20px 0 28px; color: var(--muted); font-size: 0.875rem; }
.footer-row { display: flex; align-items: center; gap: 8px 32px; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.footer-brand img { opacity: 0.8; }
.footer a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.footer a:hover { color: var(--cream); }
.lang-footer { margin-left: -12px; }

/* Revelação ao rolar (main.js liga a classe has-reveal só quando o movimento é permitido) */
.has-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.has-reveal .reveal.is-in { opacity: 1; transform: none; }
.more li:nth-child(2), .shots .reveal:nth-child(3), .shots .reveal:nth-child(5) { transition-delay: 0.08s; }
.more li:nth-child(3), .shots .reveal:nth-child(6) { transition-delay: 0.16s; }

/* Pré-cadastro: texto à esquerda, formulário à direita (empilha no celular) */
.signup { padding: clamp(80px, 10vw, 150px) 0 0; }
.signup-grid { display: grid; grid-template-columns: 5fr 6fr; gap: 40px clamp(32px, 6vw, 96px); align-items: start; border-top: 1px solid var(--line); padding-top: clamp(48px, 6vw, 80px); }
.signup-intro .title { margin-bottom: 20px; }
.signup-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font: 500 0.72rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 0 14px;
  font: 400 1rem var(--body); color: var(--cream);
  background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--ink-2); color: var(--cream); }
.field input:hover, .field select:hover { border-color: rgba(205, 220, 245, 0.4); }
.field input:focus, .field select:focus { outline: none; border-color: var(--glacier); background: #0d1626; }
.signup-form [aria-invalid="true"] { border-color: #e5674f; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; color: var(--text); font-size: 0.95rem; line-height: 1.5; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--glacier); cursor: pointer; }
.consent input[aria-invalid="true"] { outline: 2px solid #e5674f; outline-offset: 2px; }
.captcha { min-height: 65px; }
.signup-form.is-done .captcha { display: none; }
.signup-privacy { margin: -4px 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.signup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }
.signup-actions .cta { border: 0; cursor: pointer; }
.signup-actions .cta:disabled { opacity: 0.6; cursor: wait; }
.signup-status { margin: 0; font-size: 0.95rem; color: var(--muted); }
.signup-status[data-kind="error"] { color: #f08a75; }
.signup-status[data-kind="ok"] { color: var(--cream); }
.signup-form.is-done .field, .signup-form.is-done .field-row, .signup-form.is-done .consent, .signup-form.is-done .signup-privacy, .signup-form.is-done .cta { display: none; }
.signup-form.is-done .signup-status { font: 500 clamp(1.2rem, 2vw, 1.5rem)/1.35 var(--display); letter-spacing: -0.01em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 860px) {
  .signup-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .nav-inner { gap: 20px; }
  .nav-links { gap: 20px; }
  .game-intro, .studio-grid, .contact-body { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; }
  .feature:nth-child(even) .shot { order: 0; }
  .more { grid-template-columns: 1fr; gap: 0; }
  .more li { padding: 24px 0 28px; }
  .studio-art { aspect-ratio: 4 / 3; }
  .studio-logo { width: 40%; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-inner { height: 60px; gap: 8px; }
  .nav-links { gap: 4px; }
  .nav-hide-sm { display: none !important; }
  html { scroll-padding-top: 60px; }
  /* No celular o planeta fica numa faixa reservada em cima (hero.js usa a mesma conta) */
  .hero { height: auto; min-height: 100svh; max-height: none; }
  .hero-content { padding-top: calc(60px + 88vw); padding-bottom: 40px; }
  .hero::after {
    background: linear-gradient(0deg, var(--ink) 0%, rgba(7, 11, 20, 0.6) 40%, rgba(7, 11, 20, 0) 60%);
  }
  .hero-logo img { width: 180px; }
  .shots { grid-template-columns: 1fr; }
  .shot-full, .shot-half, .shot-third { grid-column: auto; }
  .features .shot, .shot-full { margin: 0 calc(var(--gutter) * -1); }
  .features .shot figcaption, .shot-full figcaption { padding-left: var(--gutter); padding-right: var(--gutter); }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta, .cta-arrow, .hero-canvas, .hero-halo, .mail, .shots .shot img { transition: none; }
  .status-dot::after { animation: none; opacity: 0; }
}
