/* ==========================================================================
   Haz Games — base
   --------------------------------------------------------------------------
   Reset, typography, and the chrome shared by every page: header, nav,
   buttons, footer, focus styles. Page-specific layout lives in its own file.
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--orange); }
a:hover { color: var(--blue); }

/* Anchor jumps clear the sticky header instead of hiding under it. */
[id] { scroll-margin-top: 90px; }

/* --- Accessibility -------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
/* Orange-on-orange would be invisible, so flip the ring on orange surfaces. */
.btn--primary:focus-visible { outline-color: var(--ink); }

.skip-link {
  position: absolute;
  left: 0;
  top: -100%;
  z-index: 100;
  background: var(--orange);
  color: var(--paper);
  font-weight: 800;
  font-size: var(--fs-sm);
  padding: 12px 20px;
  border: var(--bw) solid var(--ink);
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  color: var(--paper);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}

/* --- Buttons -------------------------------------------------------------- */
/* The house style: flat fill, hard ink border, solid offset shadow, and a
   press-in hover that moves the button onto its own shadow. */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
  border: var(--bw-thin) solid var(--ink);
  padding: 10px 18px;
  font-size: var(--fs-xs);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn--primary { background: var(--orange); color: var(--paper); }
.btn--ink     { background: var(--ink);    color: var(--paper); }

.btn--primary:hover, .btn--ink:hover { color: var(--paper); }

/* Shadow variants, named for the colour they throw. */
.btn--shadow-blue   { box-shadow: var(--shadow-sm) var(--blue); }
.btn--shadow-ink    { box-shadow: var(--shadow-md) var(--ink); }

.btn--shadow-blue:hover,
.btn--shadow-blue:focus-visible { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--blue); }
.btn--shadow-ink:hover,
.btn--shadow-ink:focus-visible  { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); }

/* Held-back call to action: still a button, visibly not pressable. Rendered
   as a <span>, so there is no href to strip and no focus stop to remove. The
   shadow stays flat because the press-in animation reads as "clickable". */
.btn.is-disabled,
.link-row.is-disabled {
  background: var(--cream-light);
  color: var(--ink);
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}
.btn.is-disabled      { box-shadow: var(--shadow-sm) var(--ink); }
.link-row.is-disabled { box-shadow: var(--shadow-md) var(--ink); }

/* Oversized hero call-to-action. */
.btn--hero {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1rem, 0.85rem + 0.75vw, 1.25rem);
  letter-spacing: 1px;
  padding: 16px clamp(1.5rem, 1rem + 2.5vw, 2.5rem);
  border-width: var(--bw);
}

/* --- Site header ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--space-gutter);
  background: var(--ink);
  border-bottom: var(--bw-thick) solid var(--orange);
}

.site-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  flex-wrap: wrap;
}
.site-brand__studio {
  font-family: var(--font-display);
  color: var(--blue);
  font-size: var(--fs-3xs);
  letter-spacing: 2px;
}
.site-brand__game {
  font-family: var(--font-display);
  color: var(--paper);
  font-size: clamp(0.9375rem, 0.8rem + 0.6vw, 1.25rem);
  letter-spacing: 1px;
}
.site-brand:hover .site-brand__game { color: var(--orange); }

.site-nav {
  display: flex;
  gap: clamp(12px, 2vw, 24px);
  align-items: center;
}
.site-nav__link {
  color: var(--sand);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
  white-space: nowrap;
}
.site-nav__link:hover { color: var(--orange); }

/* --- Site footer ---------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--muted);
  text-align: center;
  padding: 24px var(--space-gutter);
  font-size: var(--fs-2xs);
  letter-spacing: 1px;
}
.site-footer a { color: var(--sand); }
.site-footer a:hover { color: var(--orange); }
.site-footer__links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 600px) {
  /* Only two in-page anchors, and the whole site is one scrolling page, so
     dropping them beats building a hamburger for two links. The wishlist
     button stays — it is the conversion. */
  .site-nav__link { display: none; }
  .site-header { padding-block: 12px; }
  .site-brand { gap: 6px; }
}

/* --- Motion --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
