@font-face {
  font-family: "Barlow";
  src: url("fonts/Barlow-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/Barlow-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("fonts/BarlowSemiCondensed-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #14110c;
  --ink-2: #1d1912;
  --line: #3a3224;
  --paper: #f3ead2;
  --dim: #b5a888;
  --hay: #f2c230;
  --hay-hot: #ffd54f;
  --rust: #b8562a;
  --display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--ink); scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 18px/1.55 "Barlow", system-ui, sans-serif;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: var(--hay); }

h1, h2, .studio, .btn, .numbers strong, .community .name, figcaption b {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* top bar */

.bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
}

.studio {
  color: var(--paper);
  text-decoration: none;
  font-size: 20px;
}

.bar nav { display: flex; gap: clamp(14px, 3vw, 28px); }

.bar nav a {
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  opacity: 0.85;
}

.bar nav a:hover { opacity: 1; color: var(--hay); }

/* hero */

.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero picture, .hero picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20,17,12,0.95) 0%, rgba(20,17,12,0.6) 35%, rgba(20,17,12,0) 65%),
    linear-gradient(to bottom, rgba(20,17,12,0.55) 0%, rgba(20,17,12,0) 18%);
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 0 clamp(16px, 4vw, 48px) clamp(40px, 7vh, 72px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(54px, 10vw, 128px);
  line-height: 0.88;
  color: var(--hay);
  text-shadow: 0 3px 0 rgba(0,0,0,0.35);
}

.hook {
  margin: 18px 0 6px;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 500;
}

.pitch { margin: 0; color: var(--dim); max-width: 34em; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  display: inline-block;
  padding: 14px 26px 13px;
  font-size: 21px;
  line-height: 1;
  text-decoration: none;
  border: 2px solid var(--hay);
}

/* a strip of light that sweeps across a button */
.btn::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 40%;
  z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.7), transparent);
  transform: skewX(-20deg) translateX(0);
  pointer-events: none;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn:hover::after { animation: shine 0.7s ease; }

.btn.play {
  background: var(--hay);
  color: var(--ink);
  box-shadow: 0 0 0 0 rgba(242,194,48,0.6), 0 6px 18px rgba(242,194,48,0.25);
  animation: glow 2.4s ease-in-out infinite;
}

.btn.play::after { animation: shine 3.6s ease-in-out 1.2s infinite; }
.btn.play:hover { box-shadow: 0 8px 26px rgba(242,194,48,0.55); }
.btn.wish::after { background: linear-gradient(100deg, transparent, rgba(242,194,48,0.45), transparent); }
.btn.wish:hover { box-shadow: 0 8px 22px rgba(242,194,48,0.3); }

@keyframes shine {
  0% { transform: skewX(-20deg) translateX(0); }
  30%, 100% { transform: skewX(-20deg) translateX(420%); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242,194,48,0.55), 0 6px 18px rgba(242,194,48,0.25); }
  60% { box-shadow: 0 0 0 10px rgba(242,194,48,0), 0 6px 18px rgba(242,194,48,0.25); }
}
.btn.play:hover { background: var(--hay-hot); border-color: var(--hay-hot); }
.btn.wish { color: var(--hay); background: rgba(20,17,12,0.5); }
.btn.wish:hover { background: var(--hay); color: var(--ink); }

.note { margin: 14px 0 0; font-size: 15px; color: var(--dim); }

/* hazard stripe, the same yellow and black as the yard's markings */

.stripe {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--hay) 0 14px, #17140e 14px 28px);
}

/* numbers */

.numbers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
}

.numbers div {
  padding: 26px clamp(16px, 3vw, 36px);
  border-right: 1px solid var(--line);
}

.numbers div:last-child { border-right: 0; }

.numbers strong {
  display: block;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1;
  color: var(--paper);
}

.numbers span { display: block; margin-top: 6px; color: var(--dim); font-size: 16px; }

.numbers > a {
  position: relative;
  padding: 26px clamp(16px, 3vw, 36px);
  border-right: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.2s;
}

.numbers > a:hover { background: #262016; }
.numbers > a:hover strong { color: var(--hay-hot); }
.numbers .views strong { color: var(--hay); }
.numbers .views em { font-style: normal; color: var(--hay); margin-left: 4px; white-space: nowrap; }
.numbers .views[aria-expanded="true"] { background: #262016; box-shadow: inset 0 -3px 0 var(--hay); }

/* creator videos, opened from the views number */

.videos {
  display: none;
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
  padding: 32px clamp(16px, 4vw, 48px) 48px;
}

.videos:target, .videos.is-open { display: block; }

html.js .videos:target:not(.is-open) { display: none; }

.videos > * { max-width: 1240px; margin-left: auto; margin-right: auto; }

.videos-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.videos h2 { margin: 0; }

.videos-sum { margin: 8px 0 0; color: var(--dim); font-size: 16px; }

.videos .close { color: var(--dim); font-size: 16px; }

.sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  margin-bottom: 22px;
}

.sort[hidden] { display: none; }

.sort span { color: var(--dim); font-size: 15px; margin-right: 4px; }

.sort button {
  font: 600 17px/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 9px 14px 8px;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}

.sort button:hover { border-color: var(--hay); color: var(--hay); }

.sort button[aria-pressed="true"] { background: var(--hay); border-color: var(--hay); color: var(--ink); }

.videos ul { list-style: none; padding: 0; }

.wall {
  margin-top: 22px;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 18px;
}

.sort + .wall { margin-top: 0; }

.wall a { position: relative; display: block; color: var(--paper); text-decoration: none; }

.wall img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); margin-bottom: 10px; background: var(--ink); }

.wall a:hover img { border-color: var(--hay); }

.wall em {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px 2px;
  background: #c4302b;
  color: #fff;
  font: 600 13px/1 var(--display);
  font-style: normal;
  text-transform: uppercase;
}

.wall b {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 20px;
  line-height: 1.1;
}

.wall a:hover b { color: var(--hay); }

.wall span { display: block; color: var(--hay); font-size: 15px; margin: 2px 0 4px; }

.wall i {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-style: normal;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.4;
}

.twitch-head {
  margin-top: 44px;
  margin-bottom: 14px;
  font: 600 24px/1 var(--display);
  text-transform: uppercase;
  color: var(--paper);
}

.twitch {
  margin-top: 0;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.twitch a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #9146ff;
  color: var(--paper);
  text-decoration: none;
}

.twitch a:hover { border-color: #9146ff; }

.twitch b { display: block; font: 600 19px/1.1 var(--display); text-transform: uppercase; }

.twitch span { display: block; margin-top: 3px; color: var(--dim); font-size: 15px; }

/* story */

main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

.story {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1;
  color: var(--hay);
}

.story p { margin: 0 0 14px; }
.story p:last-child { color: var(--dim); font-style: italic; }

.story img { border: 1px solid var(--line); }

/* clips */

.clips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.clips figure { margin: 0; }

.clips video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border: 1px solid var(--line); }

figcaption { margin-top: 12px; font-size: 16px; color: var(--dim); }

figcaption b { display: block; color: var(--paper); font-size: 22px; margin-bottom: 2px; }

/* screenshots */

.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: clamp(40px, 6vw, 72px) 0;
}

.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* community */

.community {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) clamp(16px, 4vw, 48px) 24px;
}

.community ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.community li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.community a {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 14px;
  align-items: center;
  padding: 18px 20px;
  color: var(--paper);
  text-decoration: none;
}

.community a:hover { background: var(--ink-2); color: var(--hay); }

.community svg { grid-row: span 2; width: 26px; height: 26px; fill: currentColor; }
.community svg.line { fill: none; stroke: currentColor; stroke-width: 2; }
.community svg.line .dot { fill: currentColor; stroke: none; }

.community .name { font-size: 22px; line-height: 1.1; }
.community .handle { font-size: 15px; color: var(--dim); }

footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px) 48px;
  color: var(--dim);
  font-size: 15px;
}

footer p { margin: 0 0 4px; }

/* narrow screens */

@media (max-width: 1100px) {
  .wall { grid-template-columns: repeat(3, 1fr); }
  .twitch { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .numbers > * { border-bottom: 1px solid var(--line); }
  .numbers > :nth-child(2n) { border-right: 0; }
  .numbers > :last-child { grid-column: 1 / -1; border-bottom: 0; border-right: 0; }
  .wall { grid-template-columns: repeat(2, 1fr); }
  .twitch { grid-template-columns: repeat(2, 1fr); }
  .story { grid-template-columns: 1fr; }
  .clips { grid-template-columns: 1fr; gap: 32px; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .community ul { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .bar nav a:not(:last-child) { display: none; }
  .community ul { grid-template-columns: 1fr; }
  .wall { grid-template-columns: 1fr; }
  .btn { flex: 1 1 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn::after, .btn.play, .btn.play::after { animation: none !important; transition: none; }
}
