/*
 * HES Arcade site styles. Colours, radius and font stacks come from tokens.css (copied unchanged
 * from hes-euchre apps/web/src/styles/tokens.css). The fonts are self-hosted (fonts.css, written
 * by the build from @fontsource/inter and @fontsource/inter-tight).
 *
 * HES Design System rules applied here: Charcoal Blue canvas, HES Orange for the one primary
 * action per card, sharp panels (no radius), 4px radius on controls, Inter Tight for display
 * type and Inter for text.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--hes-charcoal-blue);
  color: var(--hes-white);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.55;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

a {
  color: var(--hes-white);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--hes-orange);
  outline-offset: 3px;
}

/* On the slate-grey cards an orange ring is too faint (2.1:1), so it is white there (7.2:1). */
.game-card :focus-visible {
  outline-color: var(--hes-white);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--hes-white);
  color: var(--hes-charcoal-blue);
  border-radius: var(--radius-control);
  font-weight: 600;
}

.skip-link:focus {
  top: calc(var(--safe-top) + 12px);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

/* Header ---------------------------------------------------------------------------------- */

.site-header {
  padding: 40px 0 8px;
  text-align: center;
}

.lockup {
  display: block;
  width: min(220px, 62vw);
  height: auto;
  margin: 0 auto;
}

.site-title {
  margin: 28px 0 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.site-tagline {
  margin: 0;
  color: var(--hes-pale-silver);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
}

/* Game cards ------------------------------------------------------------------------------ */

.games {
  padding: 32px 0 48px;
}

.games h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.game-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .game-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

.game-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--hes-slate-gray);
  border: 1px solid var(--border-on-dark);
  border-top: 4px solid var(--hes-orange);
  border-radius: 0;
  padding: 24px;
}

@media (min-width: 720px) {
  .game-card {
    padding: 32px;
  }
}

.game-card h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  line-height: 1.15;
}

.game-studio {
  margin: 0 0 12px;
  color: var(--hes-pale-silver);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-card p.game-blurb {
  margin: 0 0 24px;
  color: var(--hes-cloud-gray);
}

.game-card .game-note {
  margin: -12px 0 24px;
  color: var(--hes-pale-silver);
  font-size: 0.875rem;
}

.game-actions {
  margin-top: auto;
}

/* The control: 4px radius, at least 48px tall so it is easy to hit on a phone or a car screen. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 140px;
  padding: 0 24px;
  border-radius: var(--radius-control);
  background: var(--hes-orange);
  color: var(--hes-white);
  font-family: var(--font-text);
  /* White on HES Orange is 3.4:1, so the label is large bold text (19px, 700), which WCAG 2.2
     AA accepts at 3:1. */
  font-weight: 700;
  font-size: 1.1875rem;
  text-decoration: none;
}

.button:hover {
  background: var(--hes-vibrant-red);
  color: var(--hes-white);
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--hes-white);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Prose pages (privacy, 404, placeholder) ------------------------------------------------- */

.page {
  max-width: 760px;
  padding-top: 32px;
  padding-bottom: 56px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-on-dark);
}

.page-header .lockup {
  width: 96px;
  margin: 0;
}

.page h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  margin: 32px 0 16px;
}

.page h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  margin: 36px 0 8px;
}

.page p,
.page li {
  color: var(--hes-cloud-gray);
}

.page li + li {
  margin-top: 6px;
}

.notice {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--hes-orange);
  background: var(--hes-slate-gray);
  color: var(--hes-white);
}

.notice strong {
  color: var(--hes-white);
}

.draft-banner {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 6px solid var(--hes-orange);
  background: var(--hes-white);
  color: var(--hes-charcoal-blue);
  font-weight: 600;
  text-align: center;
}

.owner-note {
  display: block;
  margin: 8px 0;
  padding: 8px 12px;
  border: 1px dashed var(--hes-coral);
  color: var(--hes-pale-silver);
  font-size: 0.9375rem;
}

.placeholder-tag {
  display: inline-block;
  margin: 24px 0 0;
  padding: 4px 10px;
  border: 2px solid var(--hes-orange);
  border-radius: var(--radius-control);
  color: var(--hes-white);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Footer ---------------------------------------------------------------------------------- */

.site-footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--border-on-dark);
  color: var(--hes-pale-silver);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  display: inline-block;
  padding: 4px 0;
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: background-color 0.12s ease-out;
  }
}
