:root {
  /* Paleta: colorhunt.co/palette/1b365d005a9c60c1e5a0e0ef
     #1B365D títulos/texto · #005A9C destaque · #60C1E5 detalhes · #A0E0EF tons claros */
  --bg: #f2f9fb;
  --surface: #ffffff;
  --text: #1b365d;
  --muted: #4a6283;
  --line: #c6e6ef;
  --heading: #1b365d;
  --accent: #005a9c;       /* botão principal, play, foco, textos de destaque */
  --accent-soft: #60c1e5;  /* marcadores e setas */
  --on-accent: #ffffff;
  --radius: 14px;
  --max: 1080px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f2240;
    --surface: #1b365d;
    --text: #eaf7fb;
    --muted: #a3c3d6;
    --line: #2a4a75;
    --heading: #a0e0ef;
    --accent: #60c1e5;
    --accent-soft: #60c1e5;
    --on-accent: #0f2240;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-weight: 700;
  font-size: 1.86rem;
  text-decoration: none;
}
.nav { display: flex; gap: 28px; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }

/* ---------- Hero / Bio ---------- */
.hero {
  padding: 96px 0 80px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 1.248rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(1.92rem, 4vw, 3.04rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero p { color: var(--muted); margin-bottom: 16px; max-width: 54ch; }
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: transform 0.15s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--text); }
.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Games grid ---------- */
.section { padding: 72px 0 96px; border-top: 1px solid var(--line); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
}
.section-head h2 {
  font-size: 2rem;
  letter-spacing: -0.01em;
}
.section-head span { color: var(--muted); font-size: 0.95rem; }

.games {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.3);
}
.cover {
  aspect-ratio: 808 / 632;
  overflow: hidden;
  position: relative;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .cover img { transform: scale(1.05); }
.card-body { padding: 22px 24px 26px; }
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.card h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.card p { color: var(--muted); font-size: 0.95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- Contact / Footer ---------- */
.contact { text-align: center; }
.contact-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}
.contact p { color: var(--muted); margin-bottom: 28px; }
.contact .hero-links { justify-content: center; }

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Game page ---------- */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 40px 0 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.back:hover { color: var(--text); }

/* Banner padrão de todos os projetos: formato largo (1272 × 448).
   A imagem preenche o quadro; use heroPosition no games.js para escolher o recorte. */
.game-hero {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1272 / 448;
  width: 100%;
  margin-bottom: 48px;
}
.game-hero img { width: 100%; height: 100%; object-fit: cover; }

.game-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  padding-bottom: 96px;
}
.game-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.game-tagline {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 40px;
}
.game-section { margin-bottom: 36px; }
/* Mesmo tamanho de texto para parágrafos e listas da página do projeto */
.game-section h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 12px;
}
.game-section p,
.game-section ul {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.facts {
  position: sticky;
  top: 96px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
}
.facts dl { display: grid; gap: 16px; }
.facts dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.facts dd { font-weight: 500; font-size: 0.95rem; line-height: 1.5; }

/* Selos das lojas */
/* Os selos não esticam: ficam com a largura do maior deles */
.store-links { display: grid; grid-template-columns: max-content; justify-content: start; gap: 10px; margin-top: 24px; }
.store-links .btn { justify-content: center; }
.store-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 10px;
  border-radius: 8px;
  background: #000;
  color: #fff;
  border: 1px solid #3a3a3c;
  text-decoration: none;
  line-height: 1.1;
  transition: transform 0.15s, border-color 0.2s;
}
.store-badge:hover { transform: translateY(-2px); border-color: #8e8e93; }
.store-badge svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.store-badge span { display: flex; flex-direction: column; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.store-badge small { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.02em; opacity: 0.85; margin-bottom: 2px; }

/* Ferramentas (seção depois das Responsabilidades) */
.tool-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-tag {
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
}

.game-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 64px;
  border-top: 1px solid var(--line);
}
.game-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
}
.game-nav a strong {
  display: block;
  color: var(--text);
  font-size: 1.15rem;
}
.game-nav a:last-child { text-align: right; margin-left: auto; }

.not-found { padding: 120px 0; text-align: center; }

/* ---------- Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 56px 0; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .photo { max-width: 360px; order: -1; }
  .games { grid-template-columns: 1fr; }
  /* No mobile, o card de informações sobe para logo depois do título,
     antes de "About the game", e os itens ficam lado a lado */
  .game-layout { grid-template-columns: 1fr; gap: 0; }
  .game-layout > article { display: contents; }
  .game-title, .game-tagline { order: 0; }
  .game-tagline { margin-bottom: 28px; }
  .game-layout > article > :not(.game-title):not(.game-tagline) { order: 2; }
  .facts {
    order: 1;
    position: static;
    margin-bottom: 40px;
    padding: 18px;
  }
  /* Uma faixa horizontal: cada informação numa coluna, com divisórias finas */
  .facts dl {
    grid-auto-flow: column;
    grid-auto-columns: auto;
    gap: 0;
  }
  .facts dl > div {
    min-width: 0;
    padding: 0 12px;
    border-left: 1px solid var(--line);
  }
  .facts dl > div:first-child { padding-left: 0; border-left: 0; }
  .facts dl > div:last-child { padding-right: 0; }
  .facts dt { font-size: 0.68rem; margin-bottom: 4px; }
  .facts dd { font-size: 0.9rem; line-height: 1.4; overflow-wrap: break-word; }
  /* Com 4 ou mais itens, vira uma grade 2 × 2 */
  .facts dl:has(> div:nth-child(4)) {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
    row-gap: 16px;
  }
  .facts dl:has(> div:nth-child(4)) > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts dl:has(> div:nth-child(4)) > div:nth-child(even) { padding-right: 0; }
  .store-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .nav { gap: 18px; }
  .section-head { flex-direction: column; gap: 4px; }
}

/* ---------- Language switch ---------- */
.header-right { display: flex; align-items: center; gap: 28px; }
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.lang-switch button {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
@media (max-width: 720px) {
  .header-right { gap: 14px; }
  .nav { gap: 14px; font-size: 0.88rem; }
}
@media (max-width: 560px) {
  .nav { display: none; }
}

/* ---------- Bullet lists ---------- */
.game-section ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.game-section li { position: relative; padding-left: 18px; }
.game-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.game-section p + ul { margin-top: 14px; }

/* ---------- Game video ---------- */
.video {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-play {
  all: unset;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.video-play img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease, filter 0.3s; }
.video-play:hover img { transform: scale(1.03); filter: brightness(0.85); }
.video-play:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.play-icon {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  transition: transform 0.2s, background 0.2s;
}
.play-icon::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 22px;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent #fff;
}
.video-play:hover .play-icon { transform: scale(1.08); background: var(--accent); }


/* ---------- Experience (accordion) ---------- */
.exp-accordion { list-style: none; border-top: 1px solid var(--line); }
.exp-item { border-bottom: 1px solid var(--line); }
.exp-item h3 { font: inherit; }
.exp-trigger {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 28px 0;
  cursor: pointer;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
}
.exp-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.exp-arrow { color: var(--accent-soft); margin: 0 2px; }
.exp-company { transition: color 0.2s; }
.exp-trigger:hover .exp-company { text-decoration: underline; text-underline-offset: 4px; }

/* Ícone + que vira − */
.exp-icon { position: relative; flex: none; width: 18px; height: 18px; }
.exp-icon::before,
.exp-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
  transition: transform 0.35s ease;
}
.exp-icon::after { transform: rotate(90deg); }
.exp-item.open .exp-icon::after { transform: rotate(0deg); }

/* Painel que abre com altura animada */
.exp-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}
.exp-item.open .exp-panel { grid-template-rows: 1fr; }
.exp-panel-inner { overflow: hidden; }
.exp-body {
  padding: 0 42px 32px 0;
  max-width: 76ch;
  color: var(--muted);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.exp-item.open .exp-body { opacity: 1; transform: none; transition-delay: 0.1s; }
.exp-meta { margin-bottom: 14px; font-size: 0.95rem; }
.exp-meta strong { color: var(--text); }
.exp-body p + p { margin-top: 10px; }

.exp-list { list-style: none; display: grid; gap: 8px; }
.exp-list li { position: relative; padding-left: 18px; }
.exp-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.exp-body p + .exp-list { margin-top: 12px; }
@media (max-width: 520px) {
  .exp-trigger { padding: 22px 0; }
  .exp-body { padding-right: 0; }
}

/* ---------- Títulos ---------- */
.hero h1,
.section-head h2,
.contact-title,
.card h3,
.game-title,
.game-section h2,
.exp-trigger { color: var(--heading); }
