:root {
  color-scheme: light;
  --paper: #f6e9d9;
  --cream: #f5dbb9;
  --tan: #bf9163;
  --clay: #a96b41;
  --moss: #3b451d;
  --cocoa: #49230b;
  --espresso: #371505;
  --ink: var(--espresso);
  --muted: var(--cocoa);
  --line: color-mix(in srgb, var(--tan) 55%, var(--paper));
  --panel: color-mix(in srgb, var(--paper) 55%, white);
  --focus: var(--moss);
  --danger: #9f352b;
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 24px;
  --font-sans: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-family: var(--font-sans);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.55; }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .7rem 1rem; border-radius: var(--radius-s); color: var(--paper); background: var(--espresso); }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(12px); }
.header-row, .footer-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.wordmark img { height: 44px; width: auto; }
.header-end { display: flex; align-items: center; gap: 1.25rem; }
/* Seletor de idioma. Alvo de 36x44: acima do minimo de 24x24 da WCAG 2.5.8 sem
   empurrar o header dos 72px. O rotulo e' a sigla, nao o nome da lingua, para
   nao crescer com a traducao -- e o `title` de cada botao traz o endonimo. */
.lang-switch { display: flex; gap: .2rem; padding: .18rem; border: 1px solid var(--line); border-radius: 999px; }
.lang { min-height: 36px; min-width: 44px; padding: .2rem .5rem; border: 0; border-radius: 999px; background: transparent; color: var(--cocoa); font-family: var(--font-mono); font-size: .76rem; font-weight: 500; letter-spacing: .08em; transition: background-color 140ms ease, color 140ms ease; }
.lang:hover { color: var(--espresso); background: var(--cream); }
.lang { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; }
/* A bandeira leva um contorno proprio: o branco do Reino Unido e o amarelo de
   Espanha encostam ao creme do header e sem ele a forma dilui-se na barra. */
.flag { width: 18px; height: 12px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--espresso) 24%, transparent); }
.lang.is-active .flag { box-shadow: 0 0 0 1px color-mix(in srgb, var(--cream) 42%, transparent); }
.lang.is-active { color: var(--paper); background: var(--espresso); }
nav { display: flex; gap: 1.5rem; }
nav a { color: var(--muted); font-size: .94rem; font-weight: 600; text-decoration: none; padding-bottom: .15rem; border-bottom: 2px solid transparent; }
nav a:hover { border-bottom-color: var(--tan); }
nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--clay); }

.intro { position: relative; padding: clamp(3.5rem, 8vw, 7rem) 0 3rem; border-bottom: 1px solid var(--line); }
.intro-row { display: flex; justify-content: space-between; align-items: end; gap: 3rem; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 14ch; margin-bottom: 1rem; font-size: clamp(2.4rem, 6vw, 4.8rem); font-weight: 700; letter-spacing: -.045em; line-height: 1; color: var(--espresso); }
h2 { margin-bottom: .45rem; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; color: var(--espresso); }
.lede { max-width: 56ch; color: var(--muted); font-size: 1.08rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: .75rem; color: var(--clay); font-family: var(--font-mono); font-size: .74rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow img { height: 22px; width: auto; }
.intro-note { margin-bottom: .2rem; min-width: 230px; padding: .9rem 1rem; border-radius: var(--radius-s); background: var(--cream); color: var(--cocoa); font-size: .9rem; line-height: 1.5; }

.catalog, .process, .contact { padding-top: 4rem; padding-bottom: 4rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 1.4rem; }
.count { color: var(--muted); white-space: nowrap; font-family: var(--font-mono); font-size: .9rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.filter, .button, .text-button { min-height: 44px; border: 1px solid var(--tan); background: transparent; color: var(--ink); padding: .6rem 1.05rem; border-radius: var(--radius-s); font-weight: 600; transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease; }
.filter { border-radius: 999px; }
.filter:hover { border-color: var(--cocoa); }
.filter.is-active { border-color: var(--espresso); background: var(--espresso); color: var(--paper); }

.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.game-card { display: flex; flex-direction: column; min-height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--panel); }
.game-art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--cream), var(--tan)); }
.game-art::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--paper) 45%, transparent); }
.game-art img { position: relative; z-index: 1; height: 46%; width: auto; opacity: .9; filter: drop-shadow(0 6px 14px rgba(55, 21, 5, .18)); }
.game-art span { position: absolute; left: 1rem; bottom: .8rem; z-index: 1; color: var(--espresso); font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .14em; }
.game-art.has-thumb { display: block; }
.game-art.has-thumb::before { content: none; }
.game-art .game-thumb { position: static; width: 100%; height: 100%; object-fit: cover; opacity: 1; filter: none; }
.game-art.art-2 { background: linear-gradient(135deg, var(--clay), var(--cocoa)); }
.game-art.art-2::before { background: color-mix(in srgb, var(--tan) 35%, transparent); }
.game-art.art-2 span { color: var(--cream); }
.game-art.art-3 { background: linear-gradient(135deg, var(--moss), var(--espresso)); }
.game-art.art-3::before { background: color-mix(in srgb, var(--tan) 22%, transparent); }
.game-art.art-3 span { color: var(--cream); }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem 1.2rem 1.25rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.tag { border: 1px solid var(--line); border-radius: 999px; color: var(--cocoa); background: color-mix(in srgb, var(--cream) 55%, transparent); padding: .2rem .6rem; font-size: .74rem; font-weight: 600; }
.tag.live { border-color: var(--moss); color: var(--paper); background: var(--moss); }
.game-card h3 { margin: 0 0 .35rem; font-size: 1.3rem; font-weight: 700; letter-spacing: -.025em; color: var(--espresso); }
.game-card p { margin-bottom: 1.25rem; color: var(--muted); font-size: .92rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; }
.button { text-decoration: none; }
.button-primary { border-color: var(--cocoa); background: var(--cocoa); color: var(--paper); }
.button-primary:hover { border-color: var(--espresso); background: var(--espresso); }
.button-secondary:hover { border-color: var(--cocoa); background: var(--cream); }
.button:disabled { opacity: .55; cursor: progress; }

.process { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); gap: 2rem 6rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process > p { max-width: 48ch; color: var(--muted); }
.process ul { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.process li { border-top: 3px solid var(--tan); padding-top: .8rem; font-weight: 600; color: var(--espresso); }
.process li:nth-child(2) { border-top-color: var(--clay); }
.process li:nth-child(3) { border-top-color: var(--moss); }
.contact { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--cream); background: var(--espresso); font-size: .84rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--paper); }
.footer-brand img { height: 26px; width: auto; }

.demo-dialog { width: min(1440px, calc(100% - 2rem)); max-width: none; height: min(840px, calc(100dvh - 2rem)); margin: auto; padding: 0; border: 0; border-radius: var(--radius-l); overflow: hidden; color: var(--paper); background: var(--espresso); box-shadow: 0 30px 80px rgba(55, 21, 5, .45); }
.demo-dialog::backdrop { background: rgba(55, 21, 5, .82); }
.dialog-frame { display: flex; flex-direction: column; height: 100%; }
.dialog-header, .dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid color-mix(in srgb, var(--tan) 30%, transparent); }
.dialog-header .eyebrow { margin-bottom: .15rem; color: var(--tan); }
.dialog-header h2 { margin: 0; font-size: 1.18rem; letter-spacing: -.02em; color: var(--paper); }
.icon-button { width: 44px; min-height: 44px; border: 1px solid color-mix(in srgb, var(--tan) 55%, transparent); border-radius: 50%; background: transparent; color: var(--paper); font-size: 1.8rem; font-weight: 300; line-height: 1; }
.icon-button:hover { background: var(--cocoa); }
.demo-surface { position: relative; display: grid; flex: 1; min-height: 0; place-items: center; background: color-mix(in srgb, var(--espresso) 72%, black); color: var(--paper); }
.demo-loading, .demo-error { width: min(430px, calc(100% - 2rem)); text-align: center; }
.loader-mark { width: 48px; height: auto; margin: 0 auto 1.2rem; animation: pulse 1.4s ease-in-out infinite; }
.demo-surface h3 { margin: 0 0 .4rem; font-size: 1.3rem; font-weight: 700; }
.demo-surface p { color: var(--cream); }
.demo-surface iframe { display: block; width: 100%; height: 100%; border: 0; }
/* Jogo que so' aceita retrato leva moldura de retrato. O Hunting Shoot tapa-se
   com "ROTATE DEVICE TO PORTRAIT" sob `@media (orientation:landscape) and
   (max-height:600px)`, e num portatil 1366x768 a superficie da' ~478px de
   altura -- dispara quase sempre. Esticar o iframe a toda a largura nao era
   dar-lhe espaco, era esconder que a moldura esta' errada. */
/* Um jogo de retrato numa moldura de 1440 e' o jogo ao centro entre duas lajes
   vazias. O dialogo estreita-se ao proprio jogo. */
.demo-dialog.is-portrait { width: min(430px, calc(100% - 2rem)); }
.demo-dialog.is-portrait .demo-surface { display: flex; align-items: stretch; justify-content: center; overflow: auto; }
/* `height:100%` numa grelha dimensionada por conteudo nao resolve, e o
   aspect-ratio deriva a ALTURA a partir da largura -- medido: 1319x2858. Em
   flex com align-items:stretch a altura fica definida e a largura e' que deriva. */
.demo-dialog.is-portrait .demo-surface iframe {
  width: auto; height: 100%; aspect-ratio: 9 / 19.5;
  min-width: 320px; min-height: 480px; max-width: 100%;
}
.dialog-footer { min-height: 62px; border-top: 1px solid color-mix(in srgb, var(--tan) 30%, transparent); border-bottom: 0; color: var(--cream); font-size: .86rem; }
.text-button { min-height: auto; padding: .35rem 0; border: 0; border-radius: 0; color: var(--paper); text-decoration: underline; text-underline-offset: .3rem; text-decoration-color: var(--tan); }
.text-button:hover { text-decoration-color: var(--paper); }

.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 12; max-width: 340px; padding: .85rem 1.1rem; transform: translateY(150%); border: 1px solid var(--cocoa); border-radius: var(--radius-s); background: var(--espresso); color: var(--paper); font-size: .9rem; transition: transform 180ms ease; }
.toast.is-visible { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .75; } 50% { transform: scale(1.12); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; } }
@media (max-width: 900px) { .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .shell { width: min(100% - 32px, 1180px); } .header-row { min-height: 64px; gap: .75rem; } .wordmark img { height: 36px; } .header-end { gap: .7rem; } .lang { min-width: 40px; padding: .2rem .35rem; } nav { gap: .85rem; font-size: .86rem; } .intro { padding-top: 3rem; } .intro-row, .contact { align-items: start; flex-direction: column; gap: 1.2rem; } .intro-note { min-width: 0; } .game-grid { grid-template-columns: 1fr; } .process { grid-template-columns: 1fr; gap: 1.5rem; } .process ul { grid-template-columns: 1fr; gap: .75rem; } .section-heading { align-items: start; flex-direction: column; gap: .4rem; } .catalog, .process, .contact { padding-top: 3rem; padding-bottom: 3rem; } .footer-row { flex-direction: column; align-items: start; gap: .6rem; padding: 1rem 0; } .demo-dialog { width: 100%; height: 100dvh; max-height: none; border-radius: 0; } .dialog-header, .dialog-footer { padding: .75rem 1rem; } .dialog-footer { align-items: start; flex-direction: column; gap: .25rem; } }
.demo-dialog button:focus-visible { outline-color: var(--tan); }

/* ── Ficha do jogo ───────────────────────────────────────────────────────────
   Painel claro, ao contrário do modal de demo, que é escuro de propósito: ali o
   jogo manda, aqui manda o texto. Reaproveita o <dialog> e as classes de moldura
   que já existem; só o que muda de cor é redeclarado.
   --sheet-label NAO e' --clay: clay mede 3,61 de contraste sobre --paper e reprova
   AA em texto pequeno, que e' exactamente o tamanho dos rotulos aqui. Este tom e'
   clay escurecido 30% em direccao a --cocoa e mede 5,08. */
.sheet-dialog {
  /* Mesma base do .demo-dialog (espresso/paper), nao uma segunda escala escura
     a viver ao lado. --line sobe a 65%: os 32% dos divisores do demo medem 1.75
     contra o espresso e a aresta do dialogo dissolve-se no backdrop. */
  --line: color-mix(in srgb, var(--tan) 65%, transparent);
  --sheet-label: var(--tan);
  width: min(720px, calc(100% - 2rem));
  max-height: min(880px, calc(100dvh - 2rem));
  margin: auto; padding: 0; border: 0;
  border-radius: var(--radius-l); overflow: hidden;
  color: var(--paper); background: var(--espresso);
  outline: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(55, 21, 5, .45);
}
.sheet-dialog::backdrop { background: rgba(55, 21, 5, .82); }
.sheet-dialog .dialog-frame { display: flex; flex-direction: column; max-height: inherit; }
.sheet-dialog .dialog-header { border-bottom: 1px solid var(--line); background: var(--cocoa); }
.sheet-dialog .dialog-header .eyebrow { margin-bottom: .15rem; color: var(--sheet-label); }
.sheet-dialog .dialog-header h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; color: var(--paper); }
/* X invertido: circulo creme, traco escuro. 12.36 para o traco, 10.28 para o
   circulo contra o cocoa do cabecalho. */
.sheet-dialog .icon-button { border-color: var(--cream); color: var(--espresso); background: var(--cream); }
.sheet-dialog .icon-button:hover { border-color: var(--paper); background: var(--paper); }

.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1.4rem 1.25rem 1.5rem; }
.sheet-pitch {
  max-width: 46ch; margin: 0 0 1.2rem;
  color: var(--paper); font-size: 1.32rem; font-weight: 600;
  line-height: 1.3; letter-spacing: -.02em; text-wrap: pretty;
}
.sheet-facts { display: grid; grid-template-columns: auto 1fr; gap: .5rem .9rem; margin: 0; }
.sheet-facts dt { color: var(--sheet-label); font-size: .82rem; white-space: nowrap; }
.sheet-facts dd { margin: 0; color: var(--cream); font-size: .95rem; line-height: 1.45; text-wrap: pretty; }
.sheet-note { margin: .7rem 0 0; color: var(--sheet-label); font-size: .8rem; line-height: 1.45; }
.sheet-tags-label { margin-bottom: .55rem; }
.sheet-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.sheet-tags .tag {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .42rem .85rem .42rem .7rem;
  border-color: var(--line); color: var(--cream);
  background: color-mix(in srgb, var(--cocoa) 60%, transparent);
  font-size: .8rem; font-weight: 600;
}
.sheet-tags .tag svg { width: 17px; height: 17px; flex: none; color: var(--tan); }

/* Cartao claro dentro do dialogo escuro. --sheet-label volta a #8c5531 aqui, e
   so' aqui: --tan sobre o papel do cartao mede 2.4 e o rotulo desaparece. */
.sheet-card {
  --sheet-label: #8c5531;
  display: flex; align-items: flex-start; gap: 1rem;
  margin-top: 1.1rem; padding: 1.05rem 1.2rem 1.15rem;
  border-radius: var(--radius-m);
  color: var(--espresso); background: var(--panel);
}
.sheet-badge {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--cocoa); background: color-mix(in srgb, var(--tan) 38%, var(--panel));
}
.sheet-badge svg { width: 22px; height: 22px; }
.sheet-card-body { min-width: 0; }
.sheet-card h3 {
  margin: 0 0 .75rem; color: var(--sheet-label);
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
}
.sheet-card dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem .95rem; margin: 0; }
.sheet-card dt { color: var(--sheet-label); font-size: .82rem; white-space: nowrap; }
.sheet-card dd { margin: 0; color: var(--espresso); font-size: .9rem; line-height: 1.45; text-wrap: pretty; }
.sheet-card dd.mono { font-family: var(--font-mono); font-size: .84rem; }

.sheet-dialog .dialog-footer {
  min-height: 62px; border-top: 1px solid var(--line); border-bottom: 0;
  color: var(--cream); background: var(--cocoa); font-size: .82rem;
}
.sheet-foot-note { display: inline-flex; align-items: center; gap: .6rem; }
.sheet-foot-note svg { width: 19px; height: 19px; flex: none; color: var(--tan); }
/* Inverso do botao do catalogo: la' e' cocoa sobre papel, aqui creme sobre
   espresso. O .button-primary herdado mede 1.4 sobre o cocoa do rodape. */
.sheet-dialog .button-primary { border-color: var(--cream); color: var(--espresso); background: var(--cream); }
.sheet-dialog .button-primary:hover { border-color: var(--paper); background: var(--paper); }
/* --focus e' --moss e mede 1.6 sobre espresso: o anel desaparece. */
.sheet-dialog button:focus-visible { outline-color: var(--tan); }

@media (max-width: 700px) {
  .sheet-pitch { font-size: 1.15rem; }
  .sheet-card { gap: .8rem; padding: 1rem; }
  .sheet-card dl { grid-template-columns: 1fr; gap: .1rem .9rem; }
  .sheet-card dd { margin-bottom: .45rem; }
  .sheet-dialog .dialog-footer { align-items: start; flex-direction: column; gap: .6rem; }
}
