/* Hammer Gaming — hammergaming.org
   System fonts only. No third-party resources. */

:root {
  --bg: #0c0b09;
  --bg-elevated: #161410;
  --ivory: #ede8dc;
  --ivory-soft: #d8d3c6;
  --ivory-dim: #b7b1a3;
  --ivory-mute: #8d877a;
  --line: rgba(237, 232, 220, 0.16);
  --line-strong: rgba(237, 232, 220, 0.3);
  --focus: #ede8dc;
  --max: 42rem;
  --header-max: 72rem;
  --font: system-ui, -apple-system, "PingFang HK", "PingFang TC", "Hiragino Sans CNS",
    "Hiragino Sans GB", "Noto Sans CJK TC", "Noto Sans TC", "Microsoft JhengHei",
    "Heiti TC", "Segoe UI", sans-serif;
}

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

html {
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ivory);
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  display: block;
}

a {
  color: var(--ivory);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--ivory-mute);
}

a:hover {
  text-decoration-color: var(--ivory);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
label:focus-visible,
.lang-switch label:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--ivory);
  color: var(--bg);
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Language switch: default Traditional Chinese (Hong Kong).
   Use revert so spans stay inline in the nav and blocks stay blocks. */
.i18n-en {
  display: none;
}

html:has(#lang-en:checked) .i18n-en {
  display: revert;
}

html:has(#lang-en:checked) .i18n-zh {
  display: none;
}

html:has(#lang-en:checked) .lang-switch label[for="lang-en"],
html:not(:has(#lang-en:checked)) .lang-switch label[for="lang-zh"] {
  background: var(--ivory);
  color: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--header-max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.brand img.lockup {
  height: 2.15rem;
  width: auto;
  max-width: min(100%, 16.5rem);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ivory-soft);
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ivory);
  text-decoration: underline;
  text-decoration-color: var(--ivory);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-switch label {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  color: var(--ivory-soft);
  line-height: 1.2;
  user-select: none;
}

.lang-switch label:hover {
  color: var(--ivory);
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}

main.landing {
  max-width: 40rem;
  text-align: left;
}

.page-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.85rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

h2 {
  margin: 2.15rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.35;
}

h3 {
  margin: 1.5rem 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.4;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin: 0 0 0.4rem;
}

li:last-child {
  margin-bottom: 0;
}

.meta {
  color: var(--ivory-dim);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

.meta p {
  margin: 0 0 0.25rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--ivory-soft);
}

.section-block + .section-block {
  margin-top: 0.25rem;
}

.faq h3 {
  font-size: 1.05rem;
  margin-top: 1.65rem;
}

.page-links {
  list-style: none;
  padding: 0;
}

.page-links li {
  margin: 0 0 0.5rem;
}

/* Landing */
.hero-mark {
  width: 4.25rem;
  height: auto;
  margin: 0 0 1.35rem;
}

.hero-wordmark {
  width: min(100%, 18rem);
  height: auto;
  margin: 0 0 1.5rem;
}

.cta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 1.75rem 0 2rem;
}

@media (min-width: 32rem) {
  .cta-row {
    grid-template-columns: 1fr 1fr;
  }
}

.cta {
  display: block;
  padding: 1.05rem 1.15rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ivory);
}

.cta:hover {
  border-color: var(--line-strong);
  text-decoration: none;
}

.cta strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.cta span {
  display: block;
  color: var(--ivory-dim);
  font-size: 0.92rem;
  text-decoration: none;
}

.contact-line {
  margin-top: 1.75rem;
  color: var(--ivory-soft);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 1.25rem 1.75rem;
}

.footer-inner {
  max-width: var(--header-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  color: var(--ivory-dim);
  font-size: 0.9rem;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.footer-inner a {
  color: var(--ivory-soft);
}

.not-found {
  text-align: left;
}

@media (max-width: 30rem) {
  .brand img.lockup {
    height: 1.85rem;
    max-width: 12.5rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .header-inner {
    padding: 0.9rem 1rem;
  }

  main {
    padding: 1.75rem 1rem 3rem;
  }
}

@media print {
  html,
  body {
    background: #fff;
    color: #111;
  }

  .site-header,
  .site-footer,
  .lang-switch,
  .skip-link {
    /* Keep header for identity; hide only the language control if printing one language. */
  }

  a {
    color: inherit;
    text-decoration: underline;
  }

  .cta {
    border: 1px solid #ccc;
    background: none;
  }
}
