/* Lean Gamification Design — folha de estilo única
   Cores e fontes ficam nas variáveis abaixo: mude aqui e o site inteiro acompanha. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/silkscreen-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #131725;          /* azul-noite da marca */
  --night: #0b0e1b;
  --ink-line: #262b42;
  --coral: #fd4659;        /* coral da marca (títulos e detalhes sobre fundo escuro) */
  --coral-strong: #c81f36; /* coral com contraste para texto/botões sobre fundo claro */
  --paper: #ffffff;
  --mist: #f0f0f2;
  --text: #1e2233;
  --muted: #555a6e;
  --on-ink: #e9eaf2;
  --on-ink-muted: #a0a6be;

  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --pixel: "Silkscreen", "Courier New", monospace;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7rem);
  --header-h: 72px;

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral-strong); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.prose { max-width: 66ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid #e4e5ea;
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--header-h);
}
.brand { flex-shrink: 0; }
.brand img { width: 168px; height: auto; }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav a {
  display: block; padding: 0.5rem 0.7rem; border-radius: 6px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav a:hover { color: var(--coral-strong); }
.lang-switch {
  margin-left: 0.5rem; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em;
  border: 2px solid var(--ink); border-radius: 6px; padding: 0.3rem 0.6rem !important;
}
.lang-switch:hover { background: var(--ink); color: #fff !important; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    align-items: center; gap: 0.5rem;
    font: 700 0.95rem var(--font); color: var(--text);
    background: none; border: 2px solid var(--ink); border-radius: 6px; padding: 0.45rem 0.8rem; cursor: pointer;
  }
  .nav-toggle svg { width: 18px; height: 18px; }
  .nav { position: relative; }
  .nav-toggle { display: none; }
  .js .nav-toggle { display: inline-flex; }
  /* sem JavaScript: os links descem para uma linha própria abaixo do logo */
  html:not(.js) .site-header .wrap { flex-wrap: wrap; padding-bottom: 0.5rem; }
  html:not(.js) .nav { width: 100%; flex-wrap: wrap; }
  .nav ul { flex-wrap: wrap; }
  .js .nav ul {
    display: none; position: absolute; right: 0; top: calc(100% + 12px);
    flex-direction: column; min-width: 220px; gap: 0;
    background: #fff; border: 1px solid #e4e5ea; border-radius: 10px; padding: 0.5rem;
    box-shadow: 0 12px 30px rgba(19, 23, 37, 0.14);
  }
  .js .nav.is-open ul { display: flex; }
  .nav a { padding: 0.7rem 0.9rem; }
  .lang-switch { margin: 0 0.5rem 0 0; order: -1; }
}
@media (max-width: 420px) { .brand img { width: 136px; } }

/* ---------- Seções ---------- */
.section { padding-block: var(--section-y); }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--mist { background: var(--mist); }
.section--ink h2 { color: #fff; }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 46rem; }
.section-head p { color: var(--muted); }
.section--ink .section-head p { color: var(--on-ink-muted); }

/* grade de pontos que lembra pixels, usada nos fundos escuros */
.pixel-field {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.5px);
  background-size: 24px 24px;
  background-position: 12px 12px;
}

.btn {
  display: inline-block; font-weight: 700; font-size: 1rem; text-decoration: none;
  padding: 0.85rem 1.4rem; border-radius: 8px; border: 2px solid transparent; line-height: 1.2;
}
.btn--primary { background: var(--coral-strong); color: #fff; }
.btn--primary:hover { background: #a81a2d; }
.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero .lead { color: var(--on-ink-muted); max-width: 40ch; }
.hero-art { position: relative; justify-self: center; width: min(100%, 440px); }
.hero-art .heart {
  position: absolute; width: 30%; right: -2%; top: -12%;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}
@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { width: min(80%, 360px); }
}

/* ---------- Gamificação / LGD ---------- */
.explain { display: grid; gap: clamp(3rem, 7vw, 5rem); }
.explain-row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.explain-row:nth-child(even) .explain-art { order: 2; }
.explain-art img { width: min(100%, 440px); margin-inline: auto; }
.explain-row strong { color: var(--text); }
@media (max-width: 800px) {
  .explain-row { grid-template-columns: 1fr; }
  .explain-row:nth-child(even) .explain-art { order: 0; }
  .explain-art img { width: min(80%, 340px); }
}

/* ---------- Método: trilha de fases ---------- */
.phases {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  counter-reset: none;
}
.phase { position: relative; padding: 0 1.5rem 0 0; }
.phase-marker { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.phase-num {
  font-family: var(--pixel); font-size: 1rem; color: var(--ink);
  background: var(--coral); padding: 0.35rem 0.55rem 0.25rem; line-height: 1;
  box-shadow: 4px 4px 0 var(--night);
}
/* trilha pontilhada que liga as fases, como um mapa de fases de videogame */
.phase-marker::after {
  content: ""; flex: 1; height: 4px;
  background-image: linear-gradient(90deg, var(--coral) 0 8px, transparent 8px 16px);
  background-size: 16px 4px; opacity: 0.55;
}
.phase:last-child .phase-marker::after {
  background-image: none; flex: 0 0 12px; height: 12px; opacity: 1;
  background: var(--coral); box-shadow: 4px 4px 0 var(--night);
}
.phase h3 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 800; letter-spacing: 0.02em;
  color: var(--coral); margin-bottom: 0.5rem;
}
.phase p { color: var(--on-ink); font-size: 1rem; margin: 0; max-width: 30ch; }
@media (max-width: 900px) {
  .phases { grid-template-columns: 1fr; gap: 2.5rem; }
  .phase { padding: 0 0 0 3.75rem; }
  .phase-marker { position: absolute; left: 0; top: 0.3rem; margin: 0; }
  .phase-marker::after { display: none; }
  .phase:not(:last-child)::before {
    content: ""; position: absolute; left: 1.05rem; top: 3rem; bottom: -2.2rem; width: 4px;
    background-image: linear-gradient(180deg, var(--coral) 0 8px, transparent 8px 16px);
    background-size: 4px 16px; opacity: 0.55;
  }
  .phase p { max-width: 52ch; }
}

/* chamada de download, fechando a trilha das fases */
.download {
  margin-top: clamp(2.75rem, 5vw, 4rem); padding-top: clamp(1.75rem, 3vw, 2.25rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2.5rem;
  background-image: linear-gradient(90deg, var(--coral) 0 8px, transparent 8px 16px);
  background-size: 16px 4px; background-repeat: repeat-x; background-position: top left;
}
.download h3 { color: #fff; font-size: 1.35rem; margin-bottom: 0.35rem; }
.download p { color: var(--on-ink-muted); margin: 0; max-width: 52ch; }
.btn--download { display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap; }
.btn--download svg { width: 18px; height: 18px; flex: none; }

/* ---------- Depoimentos ---------- */
.quotes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.5rem); align-items: start;
}
.quote {
  margin: 0;
  padding-left: 1.25rem; border-left: 4px solid var(--coral);
}
.quote blockquote { margin: 0 0 0.75rem; font-size: 1.08rem; line-height: 1.55; font-style: italic; }
.quote figcaption { font-size: 0.9rem; color: var(--muted); }
.quote figcaption b { color: var(--text); font-weight: 700; }

/* ---------- Quem já utilizou ---------- */
.logos img { width: min(100%, 980px); margin-inline: auto; }

/* ---------- Liga: tela de seleção de personagens ---------- */
.league {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.player { display: flex; flex-direction: column; }
.player-stage {
  position: relative; height: 230px;
  display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(180deg, transparent 0 78%, rgba(253, 70, 89, 0.16) 78% 100%);
  border-bottom: 4px solid var(--coral);
  margin-bottom: 1rem;
}
.player-stage img {
  max-height: 200px; width: auto; margin-bottom: 10px;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.player h3 { color: #fff; margin-bottom: 0.25rem; font-size: 1.2rem; }
.player .role { color: var(--on-ink-muted); font-size: 0.92rem; margin-bottom: 0.75rem; }
.player details { font-size: 0.95rem; color: var(--on-ink); }
.player summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; color: var(--coral); font-size: 0.92rem;
}
.player summary::-webkit-details-marker { display: none; }
.player summary::before {
  content: ""; width: 0; height: 0;
  border-left: 7px solid var(--coral); border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  transition: transform 0.15s ease;
}
.player details[open] summary::before { transform: rotate(90deg); }
.player details p { margin: 0.75rem 0 0; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { .player summary::before { transition: none; } }
@media (max-width: 560px) {
  .league { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
  .player-stage { height: 180px; }
  .player-stage img { max-height: 155px; }
  .player h3 { font-size: 1.05rem; }
}

/* ---------- Workshops ---------- */
.workshop { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.workshop img { border-radius: 12px; }
.badge {
  display: inline-block; font-family: var(--pixel); font-size: 0.85rem; line-height: 1;
  background: var(--ink); color: var(--coral); padding: 0.45rem 0.6rem 0.35rem; margin-bottom: 1rem;
  box-shadow: 3px 3px 0 var(--coral);
}
.workshop h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 0.4rem; }
.workshop .when { font-size: 1.1rem; color: var(--muted); }
@media (max-width: 800px) { .workshop { grid-template-columns: 1fr; } }

/* ---------- Comunidade ---------- */
.community .wrap { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.community h2 { margin-bottom: 0.4rem; }
.community .btn-row { margin-top: 0; }
@media (max-width: 800px) { .community .wrap { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Blog ---------- */
.posts { list-style: none; margin: 0; padding: 0; max-width: 820px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.post-card a { color: inherit; text-decoration: none; display: block; }
.post-card img { aspect-ratio: 1200 / 630; object-fit: cover; width: 100%; border-radius: 10px; margin-bottom: 1rem; }
.post-card h3 { margin-bottom: 0.3rem; }
.post-card a:hover h3 { color: var(--coral-strong); text-decoration: underline; text-underline-offset: 0.18em; }
.post-card .meta { color: var(--muted); font-size: 0.92rem; margin: 0; }
.note { color: var(--muted); font-size: 0.95rem; }

/* ---------- Contato e parceiros ---------- */
.contact .wrap { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.mail-link {
  display: inline-block; font-size: clamp(1.05rem, 4.4vw, 2.1rem); font-weight: 800;
  color: var(--text); text-decoration: none; border-bottom: 4px solid var(--coral);
  overflow-wrap: anywhere; line-height: 1.3;
}
.mail-link:hover { color: var(--coral-strong); }
.partners h3 { font-size: 1rem; color: var(--muted); font-weight: 600; margin-bottom: 0.75rem; }
.partners img { width: 170px; }
@media (max-width: 800px) { .contact .wrap { grid-template-columns: 1fr; } }

/* ---------- Rodapé ---------- */
.site-footer {
  background: var(--night); color: var(--on-ink-muted); font-size: 0.92rem;
  padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--on-ink); }
.site-footer .foot-brand { display: flex; align-items: center; gap: 0.75rem; }
.site-footer .foot-brand img { width: 34px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

/* ---------- Página de post ---------- */
.post-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.post-hero .back { display: inline-block; font-weight: 700; margin-bottom: 1.5rem; color: var(--coral); text-decoration: none; }
.post-hero .back:hover { text-decoration: underline; }
.post-hero h1 { color: #fff; max-width: 22ch; }
.post-hero .sub { color: var(--on-ink-muted); font-size: 1.15rem; margin-bottom: 0.5rem; }
.post-hero .meta { color: var(--on-ink-muted); font-size: 0.92rem; margin: 0; }
.post-cover { margin-top: clamp(2rem, 4vw, 3rem); transform: translateY(clamp(2rem, 5vw, 4rem)); }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.post-body { padding-block: calc(var(--section-y) + 2rem) var(--section-y); }
.post-body .prose { margin-inline: auto; font-size: 1.1rem; line-height: 1.75; }
.post-body h2 { font-size: 1.5rem; margin-top: 2.2em; }
.post-body figure { margin: 2rem 0; }
.post-body figure img { border-radius: 10px; border: 1px solid #e4e5ea; }
.post-body figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 0.6rem; overflow-wrap: anywhere; }
.post-body .cta-box { margin-top: 2.5rem; padding: 1.5rem; background: var(--mist); border-left: 4px solid var(--coral); }
.post-body .cta-box p:last-child { margin: 0; }

/* ---------- 404 ---------- */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.not-found .code { font-family: var(--pixel); color: var(--coral); font-size: clamp(3rem, 10vw, 6rem); line-height: 1; margin-bottom: 1rem; }

/* texto só para leitores de tela */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.community .lead { color: var(--on-ink-muted); margin: 0; }
