/* Sly Theory Games
   Three inks, as on a screen print: orange field, fox black, paper white. */

:root {
  --orange: #f16a26;
  --ink: #000014;
  --paper: #ffffff;
  --orange-deep: #c94f12;
  --slip: 0.055em; /* how far the second ink sits off register */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--display);
  font-stretch: 100%;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.5;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
}

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
}

.masthead__mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.masthead__mark img {
  width: 2.4rem;
  height: auto;
}

.masthead nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.masthead nav a {
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.masthead nav a:hover {
  text-decoration-thickness: 4px;
}

/* ---------- Hero: the poster ---------- */

.poster {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 4rem) var(--gutter) 0;
  min-height: min(92vh, 60rem);
}

.poster__title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(3.4rem, 11.6vw, 11rem);
  line-height: 0.84;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: var(--slip) calc(var(--slip) * 0.8) 0 var(--paper);
  animation: slip 0.7s steps(4, end) 0.25s backwards;
}

.poster__title span {
  display: block;
}

@keyframes slip {
  from {
    text-shadow: 0 0 0 var(--paper);
  }
}

.poster__line {
  position: relative;
  z-index: 1;
  max-width: 22ch;
  margin: clamp(1.25rem, 3vw, 2.5rem) 0 0;
  font-stretch: 75%;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2.25rem);
  line-height: 1.15;
}

.poster__fox {
  position: absolute;
  z-index: 0;
  right: -9vw;
  bottom: -8vw;
  width: min(54vw, 52rem);
  height: auto;
  pointer-events: none;
  user-select: none;
}

.halftone {
  position: relative;
  z-index: 2;
  height: 126px;
  margin-top: -126px;
  background: url("assets/halftone.svg") repeat-x left bottom;
  pointer-events: none;
}

/* ---------- Hex Hustler ---------- */

.game {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(4rem, 11vw, 9rem) var(--gutter) clamp(4rem, 10vw, 8rem);
  overflow: hidden;
}

.game::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/hex.svg") 0 0 / 52px auto;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(105deg, transparent 30%, #000 85%);
  mask-image: linear-gradient(105deg, transparent 30%, #000 85%);
}

.game > * {
  position: relative;
}

.game__lead {
  margin: 0 0 0.75rem;
  font-stretch: 75%;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  color: var(--orange);
}

.game__title {
  margin: 0;
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(3rem, 12.5vw, 11.5rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: var(--slip) calc(var(--slip) * 0.8) 0 var(--orange);
}

.game__title span {
  display: block;
}

.game__status {
  display: inline-block;
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  padding: 0.55rem 1rem 0.6rem;
  background: var(--orange);
  color: var(--ink);
  font-stretch: 75%;
  font-weight: 800;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.1;
  transform: rotate(-2deg);
}

/* ---------- Contact ---------- */

.contact {
  background: var(--paper);
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
}

.contact h2 {
  margin: 0 0 1rem;
  font-stretch: 75%;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2.25rem);
  line-height: 1.15;
}

.contact__address {
  display: inline-block;
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(1.35rem, 5.6vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--orange), var(--orange)) left bottom / 100% 0.14em no-repeat;
  padding-bottom: 0.12em;
  transition: background-size 0.18s ease-out;
}

.contact__address:hover,
.contact__address:focus-visible {
  background-size: 100% 100%;
}

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

.colophon {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter);
  font-stretch: 75%;
  font-weight: 600;
}

.colophon img {
  width: clamp(7rem, 14vw, 11rem);
  height: auto;
}

.colophon p {
  margin: 0;
  text-align: right;
}

/* ---------- Not found ---------- */

.lost {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1.5rem;
  padding: var(--gutter);
}

.lost h1 {
  margin: 0;
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 10rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: var(--slip) calc(var(--slip) * 0.8) 0 var(--paper);
}

.lost p {
  margin: 0;
  font-stretch: 75%;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  .masthead__mark span {
    display: none;
  }

  .poster {
    min-height: 0;
    padding-bottom: 0;
  }

  .poster__fox {
    position: relative;
    display: block;
    right: auto;
    bottom: auto;
    width: 108%;
    margin: 1.5rem 0 -22% 8%;
  }

  .halftone {
    height: 84px;
    margin-top: -84px;
    background-size: 18.67px 84px;
  }

  .colophon {
    flex-direction: column;
    align-items: flex-start;
  }

  .colophon p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .poster__title {
    animation: none;
  }

  .contact__address {
    transition: none;
  }
}
