/* Spore Wars site. One stylesheet, no external requests. Look follows the game's "night mushroom forest" menu:
   dark teal panels, blue glossy buttons, a gold primary, Baloo 2 for headings. */
@font-face {
  font-family: "Baloo 2";
  src: url("fonts/baloo2-vi.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --bg: #071a1f;
  --bg2: #0b2a30;
  --panel: #0f3239;
  --panel2: #134149;
  --line: #1f6068;
  --text: #e9f5f3;
  --muted: #a3c6c2;
  --gold: #f5b83d;
  --gold2: #d98f14;
  --blue: #3b8cf0;
  --blue2: #1f5fc4;
  --mint: #8be9b5;
  --ph: #ff6bd6;
  --radius: 18px;
  --head: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font: 17px/1.65 var(--body);
  background: radial-gradient(1200px 600px at 70% -10%, #11474f 0%, transparent 60%), var(--bg);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #8fd0ff; text-underline-offset: 3px; }
a:hover { color: #c3e6ff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5.4vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 800; margin-top: 2.2em; scroll-margin-top: 90px; }
h3 { font-size: 1.25rem; font-weight: 700; margin-top: 1.6em; scroll-margin-top: 90px; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }
.small { font-size: .88rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #111; padding: .6em 1em; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(7, 26, 31, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: .6rem 1rem; padding: .5rem 0; flex-wrap: wrap; }
.brand { font: 800 1.45rem/1 var(--head); color: var(--text); text-decoration: none; display: flex; align-items: center; gap: .5rem; min-height: 44px; }
.brand-mark { width: 1.9rem; height: 1.9rem; background: url("favicon.png") center/contain no-repeat; border-radius: 22%; }
.nav { flex: 1 1 auto; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; justify-content: center; }
.nav li { margin: 0; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 .85rem; border-radius: 999px; color: var(--text); text-decoration: none; font: 700 1rem/1.2 var(--head); }
.nav a:hover { background: var(--panel2); }
.nav a[aria-current="page"] { background: linear-gradient(var(--gold), var(--gold2)); color: #2a1c00; }
.lang { display: inline-flex; align-items: center; min-height: 44px; font: 700 .95rem/1 var(--head); padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; }
.lang:hover { background: var(--panel2); }

/* buttons */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: .55rem 1.5rem; border-radius: 999px; border: 2px solid #0c3a86;
  background: linear-gradient(var(--blue), var(--blue2)); color: #fff; text-decoration: none;
  font: 800 1.1rem/1.2 var(--head); box-shadow: 0 3px 0 #0b2f6b, 0 6px 16px rgba(0, 0, 0, .35);
}
.btn:hover { filter: brightness(1.1); color: #fff; }
.btn-gold { background: linear-gradient(var(--gold), var(--gold2)); border-color: #8a5a00; color: #2a1c00; box-shadow: 0 3px 0 #7a4f00, 0 6px 16px rgba(0, 0, 0, .35); }
.btn-gold:hover { color: #2a1c00; }
.btn-quiet { background: linear-gradient(#134149, #0d3037); border-color: var(--line); box-shadow: 0 3px 0 #082127; }
.btn small { font: 600 .72rem/1.2 var(--body); opacity: .95; }
.btn-ph { border-style: dashed; border-color: var(--ph); background: #2a0f2a; color: #ffd6f4; box-shadow: none; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.4rem 0; }

/* placeholders: loud on purpose */
mark.ph { background: #3a1238; color: #ffd6f4; border: 1px dashed var(--ph); border-radius: 6px; padding: 0 .35em; font-style: normal; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: #06161b url("img/menu-bg.webp") center/cover; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 20, 25, .92) 0%, rgba(5, 20, 25, .72) 50%, rgba(5, 20, 25, .35) 100%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding: 3rem 0 3.4rem; }
.hero h1 { margin-bottom: .25em; }
.hero .lead { font-size: 1.2rem; color: #d4ece8; }
.hero-logo { width: min(460px, 100%); margin-bottom: .6rem; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5)); }
.hero-shot { border-radius: var(--radius); border: 2px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.app-line { display: flex; align-items: center; gap: 1rem; margin: 1rem 0 0; }
.app-icon { width: 96px; height: 96px; border-radius: 22%; flex: none; }

/* sections and cards */
.section { padding: 1.2rem 0 .4rem; }
.section > h2:first-child { margin-top: 1.2em; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 1.2rem 0; }
.card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.card h3 { margin-top: 0; color: var(--gold); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.heroes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 1.2rem 0; }
.hero-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hero-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.hero-card div { padding: .8rem 1rem 1rem; }
.hero-card h3 { margin: 0 0 .2em; color: var(--gold); }
.hero-card p { margin: 0 0 .4em; font-size: .95rem; }
figure { margin: 1.2rem 0; }
figure img { border-radius: 14px; border: 2px solid var(--line); box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
figcaption { font-size: .9rem; color: var(--muted); padding-top: .5rem; }
.shots { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.shots figure { margin: 0; }
.wide-shot { max-width: 860px; }

/* prose pages */
.page-head { padding: 2.4rem 0 .6rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(19, 65, 73, .5), transparent); }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 46rem; margin: 0 0 1.2rem; }
.prose { max-width: 50rem; padding-bottom: 3rem; }
.layout-2 { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.4rem; align-items: start; }
.toc { position: sticky; top: 84px; font-size: .95rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.toc strong { font-family: var(--head); font-size: 1.05rem; color: var(--gold); }
.toc ol, .toc ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.toc li { margin: 0; }
.toc a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: .2rem 0 .2rem 3rem; margin: 0 0 .9rem; min-height: 2.4rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(var(--gold), var(--gold2)); color: #2a1c00; font: 800 1.1rem/1 var(--head); }
table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.4rem; font-size: .97rem; overflow-wrap: break-word; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--head); color: var(--gold); white-space: nowrap; }
.note { border-left: 5px solid var(--gold); background: var(--panel); padding: .8rem 1rem; border-radius: 0 12px 12px 0; margin: 1.2rem 0; }
.note p:last-child { margin: 0; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .2rem 1rem; margin: .7rem 0; }
summary { cursor: pointer; font: 700 1.1rem/1.4 var(--head); padding: .6rem 0; min-height: 44px; }
details[open] summary { color: var(--gold); }
kbd { font: 600 .9em/1 ui-monospace, Menlo, monospace; background: #06161b; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; padding: .15em .45em; }
.tag { display: inline-block; font: 700 .8rem/1 var(--head); padding: .3em .7em; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: var(--mint); }
.tag.no { color: #ffb4a8; }

/* footer */
.site-footer { margin-top: 3rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); background: #051317; color: var(--muted); font-size: .95rem; }
.site-footer p { margin: 0 0 .6em; }
.foot-nav a { color: var(--text); display: inline-flex; align-items: center; min-height: 44px; padding: 0 .2rem; }
/* a link that stands alone on its line is a target of its own; links inside a sentence keep the text's own size, with a little extra reach */
p > a:only-child { display: inline-flex; align-items: center; min-height: 44px; }
p a, li a, td a, figcaption a { padding-block: .3em; }

/* root language chooser */
.page-root main { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; text-align: center; background: linear-gradient(rgba(5, 20, 25, .75), rgba(5, 20, 25, .9)), url("img/menu-bg.webp") center/cover; }
.page-root .choose { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.page-root .btn { min-width: 220px; font-size: 1.3rem; }
.page-root img { margin: 0 auto 1rem; width: min(420px, 90%); }

@media (max-width: 1040px) {
  /* the Vietnamese nav wraps to two rows below ~1000 px: a header that tall scrolls away instead of covering the page, and anchors land at the top */
  .site-header { position: static; }
  h2, h3 { scroll-margin-top: 16px; }
}
@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .hero .wrap { grid-template-columns: 1fr; padding: 2rem 0 2.4rem; }
  .layout-2 { grid-template-columns: 1fr; gap: 1rem; }
  .toc { position: static; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem; }  /* one swipeable row (the footer repeats every link) */
  .nav::-webkit-scrollbar { display: none; }
  .nav ul { flex-wrap: nowrap; justify-content: flex-start; }
  .nav a { white-space: nowrap; }
  .bar { padding: .2rem 0 .3rem; row-gap: 0; }
  .nav a { padding: .5rem .7rem; font-size: .95rem; }
  .lang { margin-left: auto; }
  .brand { font-size: 1.3rem; }
}
@media (min-width: 641px) {
  /* privacy: fixed shares so the label column is not squeezed into broken words and one long cell does not take the whole width */
  .t-files td:first-child { width: 24%; }
  .t-platforms { table-layout: fixed; }
  .t-platforms th:first-child { width: 22%; }
  .t-platforms th:nth-child(2) { width: 36%; }
  .t-platforms th:nth-child(n+3) { width: 21%; }
}
@media (max-width: 640px) {
  table, thead, tbody, tfoot, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* still read by screen readers */
  tr { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .4rem .9rem .6rem; margin: 0 0 .9rem; }
  th, td { border: 0; padding: .3rem 0; }
  td:first-child, th:first-child { font-size: 1.05rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; padding-bottom: .4rem; }
  td[data-label]:not(:first-child)::before { content: attr(data-label) ":"; margin-right: .4em; color: var(--gold); font: 700 .9rem var(--head); }
  th[role=rowheader]:not(:first-child) { color: var(--gold); padding-bottom: 0; }
  .heroes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .hero-card div { padding: .6rem .7rem .8rem; }
  .hero-card p { font-size: .88rem; }
}
@media (max-width: 420px) {
  .btn { width: 100%; }
  .actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
