@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Sora:wght@200;300;400;600&display=swap');

/* =========================================================
   BD Games Entertainment
   Paleta tirada do próprio brinquedo: plástico injetado azul,
   gramado, garras laranja e branca, placar amarelo.
   ========================================================= */
:root {
  --night:       #0a1030;
  --night-deep:  #06091f;
  --night-soft:  #121a48;
  --plastic:     #1b4fe0;
  --plastic-lit: #4d7dff;
  --pitch:       #4fd14a;
  --orange:      #ff7a18;
  --bone:        #f2efe6;
  --score:       #ffd23f;

  --ink:         var(--bone);
  --ink-dim:     #9aa4cc;
  --rule:        rgba(154, 164, 204, 0.22);

  --shell:       min(1160px, 100% - 3rem);
  --gutter:      1.5rem;

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.95rem + 0.24vw, 1.14rem);
  --step-1:  clamp(1.25rem, 1.14rem + 0.55vw, 1.6rem);
  --step-2:  clamp(1.6rem, 1.33rem + 1.35vw, 2.5rem);
  --step-3:  clamp(1.95rem, 1.5rem + 2.1vw, 3.2rem);
  --step-4:  clamp(2.5rem, 1.7rem + 3.4vw, 4.4rem);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 300;
  font-size: var(--step-0);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: 'Fredoka', 'Sora', sans-serif;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
}

p { margin: 0 0 1.1em; max-width: 62ch; }
a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

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

.shell { width: var(--shell); margin-inline: auto; }

.skip {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 200;
  background: var(--score); color: var(--night-deep);
  padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600;
  transition: top 0.2s;
}
.skip:focus { top: 0.75rem; }

/* ---------- Faixa de plástico: separador que fecha cada seção ---------- */
.seam {
  height: 6px;
  background: linear-gradient(90deg,
    var(--orange) 0 25%, var(--bone) 25% 50%,
    var(--plastic) 50% 75%, var(--pitch) 75% 100%);
  opacity: 0.75;
}

/* =========================  NAV  ========================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.85rem max(1.5rem, calc((100vw - var(--shell)) / 2));
  background: rgba(6, 9, 31, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, padding 0.35s;
}
.nav.is-stuck {
  background: rgba(6, 9, 31, 0.92);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
  padding-block: 0.55rem;
}

.nav__logo img { width: 168px; height: auto; }
.nav__logo { margin-right: auto; display: block; flex: none; }

.nav__links { display: flex; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: 0.45rem 0.85rem; border-radius: 999px;
  text-decoration: none; font-size: var(--step--1); color: var(--ink-dim);
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--bone); background: rgba(154, 164, 204, 0.12); }

/* Botão de idioma: as duas metades do placar */
.lang {
  display: flex; border: 1px solid var(--rule); border-radius: 999px;
  overflow: hidden; flex: none;
}
.lang button {
  font: inherit; font-size: var(--step--1); font-weight: 400;
  background: none; border: 0; color: var(--ink-dim);
  padding: 0.35rem 0.7rem; cursor: pointer; transition: color 0.2s, background 0.2s;
}
.lang button[aria-pressed='true'] { background: var(--score); color: var(--night-deep); font-weight: 600; }

.nav__toggle { display: none; }

/* =========================  HERO  ========================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: center; gap: 3rem;
  width: var(--shell); margin-inline: auto;
  padding: 8.5rem 0 4.5rem;
}

.hero::before { /* halo do refletor sobre a mesa */
  content: ''; position: absolute; z-index: -1;
  right: -12%; top: 6%; width: 70vw; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(27, 79, 224, 0.4) 0%, rgba(10, 16, 48, 0) 62%);
  pointer-events: none;
}

.hero__eyebrow {
  font-size: var(--step--1); color: var(--score);
  margin: 0 0 1.2rem; letter-spacing: 0.01em;
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 700;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--bone);
  paint-order: stroke fill;
}

.hero__lede { font-size: var(--step-1); font-weight: 200; color: var(--ink-dim); max-width: 34ch; }
.hero__lede strong { color: var(--bone); font-weight: 400; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* Mesa interativa */
.table {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: 74svh;
  margin-inline: auto;
  width: 100%;
}
.table canvas {
  width: 100%; height: 100%; display: block;
  border-radius: 22px;
  touch-action: none;
  cursor: pointer;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85),
              0 0 0 1px rgba(77, 125, 255, 0.35);
}
.table__hint {
  position: absolute; left: 50%; bottom: -2.4rem; transform: translateX(-50%);
  font-size: var(--step--1); color: var(--ink-dim); white-space: nowrap;
  margin: 0;
}
.table__hint kbd {
  font: inherit; font-weight: 600; color: var(--bone);
  border: 1px solid var(--rule); border-radius: 5px; padding: 0.05em 0.4em;
}

/* =========================  BOTÕES  ========================= */
.btn {
  --btn-face: var(--score);
  --btn-edge: #c79800;
  --btn-ink: var(--night-deep);
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: var(--step-0);
  text-decoration: none; cursor: pointer;
  padding: 0.82rem 1.6rem; border: 0; border-radius: 14px;
  background: var(--btn-face); color: var(--btn-ink);
  box-shadow: 0 5px 0 var(--btn-edge);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.2s;
}
.btn[aria-disabled='true'] { cursor: default; color: var(--ink-dim); }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn-edge); }

.btn--ghost {
  --btn-face: transparent; --btn-ink: var(--bone); --btn-edge: transparent;
  box-shadow: inset 0 0 0 1.5px var(--rule);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--plastic-lit); background: rgba(27, 79, 224, 0.14); }
.btn--ghost:active { transform: none; }

/* =========================  SEÇÕES  ========================= */
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section--tint { background: var(--night-deep); }

.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 40ch; }
.section__head h2 { font-size: var(--step-3); margin-bottom: 1rem; }
.section__head p { color: var(--ink-dim); font-size: var(--step-1); font-weight: 200; }

/* ---- Jogo em destaque ---- */
.game { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

.game__badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--step--1); color: var(--pitch);
  border: 1px solid rgba(79, 209, 74, 0.4); background: rgba(79, 209, 74, 0.1);
  border-radius: 999px; padding: 0.3rem 0.85rem; margin-bottom: 1.4rem;
}
.game h2 { font-size: var(--step-3); margin-bottom: 1.1rem; }
.game__sub { color: var(--score); font-size: var(--step-1); font-weight: 300; margin-bottom: 1.4rem; }

.game__list { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 0.7rem; }
.game__list li {
  position: relative; padding-left: 1.9rem; color: var(--ink-dim);
  font-size: var(--step--1); line-height: 1.55;
}
.game__list li::before {
  content: ''; position: absolute; left: 0; top: 0.52em;
  width: 16px; height: 5px; border-radius: 3px;
  background: var(--bone);
  transform: rotate(-38deg);
}
.game__list li:nth-child(even)::before { background: var(--orange); transform: rotate(38deg); }

/* Telas do jogo: baralho em leque, sem moldura de celular genérica */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.shots img {
  width: 100%; border-radius: 14px;
  border: 1px solid rgba(77, 125, 255, 0.3);
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.9);
}
.shots img:nth-child(2) { transform: translateY(-1.6rem); }
.shots img:nth-child(3) { transform: translateY(0.8rem); }

/* ---- O que fazemos ---- */
.craft { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2.5rem 3rem; }
.craft__item h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.craft__item p { color: var(--ink-dim); font-size: var(--step--1); margin: 0; }
.craft__rule { height: 3px; width: 44px; margin-bottom: 1.1rem; border-radius: 2px; }

/* ---- Estúdio / dupla ---- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.crew { display: grid; gap: 1.4rem; margin: 0; padding: 0; list-style: none; }
.crew li { display: flex; align-items: center; gap: 1.1rem; }
.crew__mark {
  flex: none; width: 66px; height: 66px; border-radius: 18px;
  display: grid; place-items: center;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.3rem;
  letter-spacing: -0.04em;
}
.crew__mark--lr { background: var(--orange); color: var(--night-deep); }
.crew__mark--jo { background: var(--bone); color: var(--night-deep); }
.crew__name { font-family: 'Fredoka', sans-serif; font-weight: 500; font-size: var(--step-1); }
.crew__role { color: var(--ink-dim); font-size: var(--step--1); }

/* ---- Contato ---- */
.form { display: grid; gap: 1rem; max-width: 34rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--step--1); color: var(--ink-dim); }
.field input, .field textarea {
  font: inherit; font-size: var(--step-0); color: var(--bone);
  background: rgba(18, 26, 72, 0.8);
  border: 1px solid var(--rule); border-radius: 12px;
  padding: 0.75rem 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus { border-color: var(--plastic-lit); background: rgba(18, 26, 72, 1); }
.form .btn { justify-self: start; margin-top: 0.4rem; }
.form__note { font-size: var(--step--1); color: var(--ink-dim); margin: 0; }
.form__note a { color: var(--score); }

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__aside h3 { font-size: var(--step-0); margin-bottom: 0.45rem; }
.contact__aside h3 + p { margin-bottom: 1.9rem; }
.contact__aside p { font-size: var(--step--1); color: var(--ink-dim); }
.contact__aside a { color: var(--score); }

/* =========================  POLÍTICA  ========================= */
.doc { padding: 9rem 0 5rem; }
.doc h1 { font-size: var(--step-3); margin-bottom: 0.6rem; }
.doc__meta { color: var(--ink-dim); font-size: var(--step--1); margin-bottom: 3rem; }
.doc h2 { font-size: var(--step-2); margin: 3rem 0 1rem; }
.doc h3 { font-size: var(--step-1); margin: 2rem 0 0.7rem; color: var(--score); }
.doc p, .doc li { color: #cdd4ee; }
.doc code { font-size: 0.9em; background: rgba(154,164,204,.14); padding: 0.1em 0.4em; border-radius: 5px; }
.doc a { color: var(--score); }
.doc ul { padding-left: 1.2rem; max-width: 62ch; }
.doc li { margin-bottom: 0.5rem; }
.doc__back { display: inline-block; margin-top: 3rem; font-size: var(--step--1); color: var(--score); }

/* =========================  RODAPÉ  ========================= */
.foot { background: var(--night-deep); padding: 3.5rem 0 2.5rem; }
.foot__grid { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; }
.foot img { width: 180px; height: auto; opacity: 0.9; }
.foot ul { display: flex; flex-wrap: wrap; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.foot a { color: var(--ink-dim); text-decoration: none; font-size: var(--step--1); }
.foot a:hover { color: var(--bone); }
.foot__legal {
  margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--rule);
  color: var(--ink-dim); font-size: 0.78rem; max-width: 70ch; line-height: 1.6;
}

/* =========================  MOVIMENTO  ========================= */
/* Um único momento coreografado: a entrada do herói. */
.reveal { opacity: 0; transform: translateY(18px); }
.is-ready .reveal { animation: rise 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.is-ready .reveal:nth-child(2) { animation-delay: 0.08s; }
.is-ready .reveal:nth-child(3) { animation-delay: 0.16s; }
.is-ready .reveal:nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.table { opacity: 0; transform: scale(0.96); }
.is-ready .table { animation: land 0.9s 0.2s cubic-bezier(0.2, 0.75, 0.25, 1) forwards; }
@keyframes land { to { opacity: 1; transform: none; } }

/* As telas do jogo entram quando entram em cena — a única revelação por rolagem. */
.shots img { opacity: 0; transform: translateY(24px) scale(0.97); transition: opacity 0.7s, transform 0.7s; }
.shots.is-in img { opacity: 1; }
.shots.is-in img:nth-child(1) { transform: none; transition-delay: 0s; }
.shots.is-in img:nth-child(2) { transform: translateY(-1.6rem); transition-delay: 0.1s; }
.shots.is-in img:nth-child(3) { transform: translateY(0.8rem); transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .table, .shots img { opacity: 1 !important; animation: none !important; }
  .table { transform: none !important; }
  .shots img { transition: none !important; }
  .shots img:nth-child(2) { transform: translateY(-1.6rem); }
  .shots img:nth-child(3) { transform: translateY(0.8rem); }
}

/* =========================  RESPONSIVO  ========================= */
@media (max-width: 980px) {
  :root { --shell: min(1160px, 100% - 2.5rem); }

  .nav__toggle {
    display: grid; place-items: center; order: 3;
    width: 42px; height: 42px; flex: none;
    background: none; border: 1px solid var(--rule); border-radius: 12px;
    color: var(--bone); cursor: pointer;
  }
  .nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
    content: ''; display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  }
  .nav__toggle span::before { transform: translateY(-6px); }
  .nav__toggle span::after { transform: translateY(4px); }

  .nav__links {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; gap: 0;
    background: rgba(6, 9, 31, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem max(1.5rem, calc((100vw - var(--shell)) / 2)) 1.2rem;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 0.75rem 0; font-size: var(--step-0); border-radius: 0; }

  .hero { grid-template-columns: 1fr; padding-top: 6.5rem; gap: 3.5rem; text-align: left; }
  .hero__text { order: 1; }
  .table { order: 2; max-width: 420px; max-height: none; }
  

  .game, .studio, .contact { grid-template-columns: 1fr; }
  .game__media { order: -1; }
}

@media (max-width: 560px) {
  .nav { gap: 0.7rem; }
  .nav__logo img { width: 132px; }
  .shots { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .shots img:nth-child(2) { transform: translateY(-0.8rem); }
  .shots.is-in img:nth-child(2) { transform: translateY(-0.8rem); }
  .btn { width: 100%; justify-content: center; }
  .form .btn { width: auto; }
}
