/* ============================================================================
   Landing page. The logo's colors (platform/assets/brand/): folder gray,
   ink charcoal, the canceled red, slate for secondary text. Each game is a
   folder in the filing cabinet: a tab with its label and the game's poster
   on the cover.
   ============================================================================ */
:root{
  --bg:#ececea;
  --surface:#fafaf9;
  --ink:#2a2a2a;
  --muted:#5d646b;
  --line:#d3d3d0;
  --accent:#9f2124;          /* the logo's red */
  --focus:#2f6fdb;
  --shadow:0 1px 0 rgba(42,42,42,.08),0 10px 30px -12px rgba(42,42,42,.28);
  --shadow-hover:0 1px 0 rgba(42,42,42,.08),0 18px 40px -14px rgba(42,42,42,.4);
  --font-ui:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-display:"Arial Black","Segoe UI Black","Helvetica Neue",system-ui,sans-serif;
  --radius:18px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#18181a;
    --surface:#242427;
    --ink:#efefed;
    --muted:#9ba2a9;
    --line:#38383c;
    --accent:#e5484d;        /* the red of the logo's dark version */
    --focus:#7fb0ff;
    --shadow:0 1px 0 rgba(0,0,0,.4),0 12px 30px -14px rgba(0,0,0,.7);
    --shadow-hover:0 1px 0 rgba(0,0,0,.4),0 20px 44px -14px rgba(0,0,0,.85);
    color-scheme:dark;
  }
}

body{
  min-height:100%;display:flex;flex-direction:column;
  background:var(--bg);color:var(--ink);font-family:var(--font-ui);line-height:1.5;
}
img{display:block;max-width:100%}
a{color:inherit}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}

/* ---------- Header ---------- */
.top{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  width:min(1120px,100%);margin:0 auto;padding:20px 16px 0;
}
/* The logo (platform/assets/brand/): a light-background and a dark-background
   version, picked by <picture> with prefers-color-scheme. */
.wordmark{display:flex;align-items:center;flex:none;border-radius:8px}
.wordmark-img{display:block;height:44px;width:auto}
.lang-btn{
  min-width:44px;min-height:44px;padding:0 14px;cursor:pointer;
  background:var(--surface);border:1px solid var(--line);border-radius:999px;
  font-weight:700;font-size:14px;letter-spacing:.04em;
}
.lang-btn:hover{border-color:var(--ink)}
.nav{display:flex;align-items:center;gap:6px}
.nav-link{
  display:inline-flex;align-items:center;min-height:44px;padding:0 12px;border-radius:999px;
  font-weight:700;font-size:14px;text-decoration:none;
}
.nav-link:hover{background:var(--surface)}
.nav-link[aria-current="page"]{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:2px}
.nav-account{white-space:nowrap}
.nav-account.signed-in::before{content:"●";margin-right:.45em;font-size:.7em;color:var(--accent)}
.nav-player{display:inline-flex;align-items:center;gap:.3em;min-height:44px;padding:0 10px;font-size:14px;
  max-width:24ch;white-space:nowrap;overflow:hidden}
.nav-player-label{color:var(--muted)}
.nav-player strong{overflow:hidden;text-overflow:ellipsis}

/* ---------- Hero ---------- */
main{flex:1;width:min(1120px,100%);margin:0 auto;padding:0 16px}
.hero{padding:56px 0 40px;max-width:720px}
.kicker{margin:0 0 12px;color:var(--accent);font-weight:700;font-size:14px;letter-spacing:.08em;text-transform:uppercase}
.hero h1{margin:0;font-family:var(--font-display);font-weight:900;font-size:clamp(34px,6vw,60px);line-height:1.02;letter-spacing:-.025em;text-wrap:balance}
.lead{margin:18px 0 0;font-size:clamp(16px,2vw,19px);color:var(--muted);max-width:60ch;text-wrap:pretty}

/* ---------- Shelf ---------- */
.shelf{padding-bottom:64px}
.shelf-title{margin:0 0 18px;font-size:14px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.games{
  list-style:none;margin:0;padding:0;
  display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:40px 30px;
}

/* ---------- Each game is a folder (like the logo's) ----------
   li: room for the tab above. The folder itself (.game) has
   a tab with the game's label; hovering pulls it up out of the cabinet. */
.games > li:not(.soon){position:relative;padding-top:30px}

.game{
  position:relative;display:flex;flex-direction:column;height:100%;text-decoration:none;
  background:var(--surface);border-radius:0 var(--radius) var(--radius) var(--radius);
  filter:drop-shadow(0 1px 0 rgba(0,0,0,.08)) drop-shadow(0 10px 14px rgba(0,0,0,.16));
  transition:transform .2s ease;
}
.game:hover{transform:translateY(-8px) rotate(-.6deg)}
.game:active{transform:translateY(-3px)}

/* The tab: the folder's label, joined to its top-left corner. */
.tab{
  position:absolute;left:0;bottom:100%;display:flex;align-items:center;
  height:30px;max-width:70%;padding:0 26px 0 16px;
  background:var(--surface);border-radius:12px 22px 0 0;
}
.tab::after{                       /* the curve where the tab meets the folder's top edge */
  content:"";position:absolute;right:-12px;bottom:0;width:12px;height:12px;
  background:radial-gradient(circle at 100% 0,transparent 12px,var(--surface) 12.5px);
}
.tab .tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--game-accent,var(--accent))}

/* The cover: the game's poster (games/<id>/assets/poster.webp). */
.cover{
  position:relative;display:block;aspect-ratio:4/3;overflow:hidden;background:var(--line);
  margin:8px 8px 0;border-radius:4px calc(var(--radius) - 6px) 6px 6px;
}
.poster{width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.game:hover .poster{transform:scale(1.04)}
.game-fuga .poster{object-position:50% 40%}

.body{display:flex;flex-direction:column;gap:8px;padding:18px 20px 20px;flex:1}
.tag{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.name{font-family:var(--font-display);font-weight:900;font-size:26px;line-height:1.1;letter-spacing:-.015em}
.desc{color:var(--muted);font-size:15px;text-wrap:pretty}
.meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.meta > span{font-size:13px;padding:3px 10px;border-radius:999px;border:1px solid var(--line)}
.cta{
  margin-top:auto;padding-top:14px;align-self:flex-start;
  display:inline-flex;gap:.4em;align-items:center;font-weight:700;
  color:var(--game-accent,var(--accent));
}
.cta span[aria-hidden]{transition:transform .18s ease}
.game:hover .cta span[aria-hidden]{transform:translateX(4px)}

/* Each game's accent (its tab label and "Play"): Fuga, barn red. */
.game-fuga{--game-accent:#bc4749}
@media (prefers-color-scheme: dark){ .game-fuga{--game-accent:#ff7f6e} }

/* Sobrecarga: neon red. */
.game-sobrecarga{--game-accent:#e8202f}
@media (prefers-color-scheme: dark){ .game-sobrecarga{--game-accent:#ff4a58} }

/* The empty slot: a folder outline, tab included, waiting for a game. */
.soon{
  position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px;
  min-height:260px;margin-top:30px;padding:24px;
  border:2px dashed var(--line);border-radius:0 var(--radius) var(--radius) var(--radius);color:var(--muted);
}
.soon::before{
  content:"";position:absolute;left:-2px;bottom:100%;width:42%;height:28px;
  border:2px dashed var(--line);border-bottom:none;border-radius:12px 22px 0 0;
}
.soon .name{font-size:20px;color:var(--ink)}
.soon-mark{
  display:grid;place-items:center;width:44px;height:44px;border-radius:12px;
  border:2px dashed var(--line);font-family:var(--font-display);font-size:22px;
}

/* ---------- Footer ---------- */
.foot{
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 20px;
  width:min(1120px,100%);margin:0 auto;padding:24px 16px 32px;border-top:1px solid var(--line);color:var(--muted);font-size:14px;
}
.foot-links{display:flex;gap:16px}
.foot-links a{text-underline-offset:3px}

@media (max-width:560px){
  .top{padding-top:14px}
  .wordmark-img{height:34px}
  .nav{gap:2px}
  .nav-link{padding:0 8px;font-size:13px}
  .nav-player{font-size:13px;padding:0 4px;max-width:16ch}
  .nav-player-label{display:none}
  .hero{padding:36px 0 28px}
}
@media (prefers-reduced-motion: reduce){
  .game,.poster,.cta span[aria-hidden]{transition:none}
  .game:hover,.game:active{transform:none}
  .game:hover{transform:none}
  .game:hover .poster{transform:none}
}
