/* Shares its tokens, type and components with swordofthefrontier.com (the reference design). */
:root {
  color-scheme: dark;
  --bg: #0c0b0a;
  --text: #efe9df;
  --muted: #9d968b;
  --line: rgb(239 233 223 / .12);
  --line-strong: rgb(239 233 223 / .3);
  /* Agave blue, sampled from sunlit Agave tequilana leaves (OKLCH 0.74 0.05 222) */
  --accent: #88b3c2;
  --accent-hover: #9fc5d3;
  --accent-ink: #09161a;
  --font-ui: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --gutter: clamp(20px, 3.5vw, 72px);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* film grain, sits behind the content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- shared pieces (same as Sword of the Frontier) ---------- */

.capsule { position: relative; margin: 0; }

.capsule img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .06), 0 30px 80px -30px rgb(0 0 0 / .9);
}

/* storyboard-style corner marks around the art */
.capsule::before {
  --l: calc(18 * var(--u, 1px));
  --t: 1px;
  content: "";
  position: absolute;
  inset: calc(-12 * var(--u, 1px));
  pointer-events: none;
  background:
    linear-gradient(var(--line-strong) 0 0) top left / var(--l) var(--t),
    linear-gradient(var(--line-strong) 0 0) top left / var(--t) var(--l),
    linear-gradient(var(--line-strong) 0 0) top right / var(--l) var(--t),
    linear-gradient(var(--line-strong) 0 0) top right / var(--t) var(--l),
    linear-gradient(var(--line-strong) 0 0) bottom left / var(--l) var(--t),
    linear-gradient(var(--line-strong) 0 0) bottom left / var(--t) var(--l),
    linear-gradient(var(--line-strong) 0 0) bottom right / var(--l) var(--t),
    linear-gradient(var(--line-strong) 0 0) bottom right / var(--t) var(--l);
  background-repeat: no-repeat;
}

.genre {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 600 clamp(16px, .7vw, 20px)/1.1 var(--font-ui);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.star { flex: none; width: .7em; height: .7em; fill: var(--accent); }

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font: 600 clamp(14px, .62vw, 18px)/1 var(--font-ui);
  letter-spacing: .26em;
  text-transform: uppercase;
}

.label {
  margin: 0 0 24px;
  color: var(--muted);
  font: 600 clamp(13px, .56vw, 16px)/1 var(--font-ui);
  letter-spacing: .28em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .85em;
  height: clamp(40px, 2vw, 50px);
  padding: 1px 1.15em 0 1.4em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: 700 clamp(14px, .6vw, 17px)/1 var(--font-ui);
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}

.pill svg { width: 1.15em; height: 1.15em; margin-top: -1px; transition: transform .2s; }

.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 clamp(12px, .55vw, 14px)/1 var(--font-ui);
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* the address stays lowercase so it reads (and copies) as an email */
.site-foot .contact { text-decoration: none; text-transform: none; letter-spacing: .08em; transition: color .2s; }
.site-foot .contact:hover { color: var(--accent); }

/* ---------- studio page ---------- */

.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  max-width: 2400px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.top {
  display: flex;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .8em;
  font: 600 clamp(15px, .62vw, 18px)/1 var(--font-ui);
  letter-spacing: .2em;
  text-decoration: none;
  text-transform: uppercase;
}

.mark { flex: none; width: 1.6em; height: 1.6em; margin-top: -.2em; fill: var(--accent); }

main { display: grid; grid-template-rows: 1fr auto; }

.hero {
  position: relative;
  display: grid;
  align-content: center;
  padding: clamp(32px, 6svh, 140px) 0;
  isolation: isolate;
}

/* sized by width and height so the games row still shows on a laptop screen */
.hero h1 {
  margin: 0;
  font: 700 clamp(52px, min(7.4vw, 12.5svh), 210px)/.88 var(--font-ui);
  letter-spacing: .005em;
  text-transform: uppercase;
}

.lede {
  max-width: 36ch;
  margin: 28px 0 0;
  text-wrap: pretty;
  color: var(--muted);
  font-size: clamp(18px, 1.5vw, 30px);
  line-height: 1.5;
}

/* the studio mark again, as a large hairline drawing behind the headline */
.hero-agave {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  height: calc(100% - clamp(24px, 5svh, 64px));
  aspect-ratio: 1;
  max-width: 52%;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: .45;
  /* fade the base so the leaves rise out of the dark */
  -webkit-mask-image: linear-gradient(to top, transparent 8%, #000 55%);
  mask-image: linear-gradient(to top, transparent 8%, #000 55%);
}

.games { padding: clamp(28px, 4.5svh, 48px) 0 clamp(28px, 5svh, 88px); border-top: 1px solid var(--line); }

.game-list { margin: 0; padding: 0; list-style: none; }
.game-list li + li { border-top: 1px solid var(--line); }

.game {
  --u: .7px; /* smaller corner marks on the thumbnail */
  display: grid;
  grid-template-columns: clamp(200px, 17vw, 480px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px clamp(24px, 3vw, 48px);
  padding: 20px 0;
  text-decoration: none;
}

.game-text { display: grid; gap: 10px; justify-items: start; }

.game-number { color: var(--muted); font: 600 clamp(13px, .56vw, 16px)/1 var(--font-ui); letter-spacing: .2em; }

.game-title {
  font: 700 clamp(28px, 2.8vw, 72px)/.95 var(--font-ui);
  letter-spacing: .01em;
  text-transform: uppercase;
  transition: color .2s;
}

.game .pill { justify-self: end; }

.game:hover .game-title { color: var(--accent); }
.game:hover .pill { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.game:hover .pill svg { transform: translate(2px, -2px); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero-copy { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.games { animation: rise .9s .15s cubic-bezier(.2, .7, .2, 1) both; }

@media (max-width: 1100px) {
  .game { grid-template-columns: clamp(200px, 30vw, 320px) minmax(0, 1fr); }
  .game .pill { grid-column: 2; justify-self: start; }
}

@media (max-width: 760px) {
  .hero-agave { right: -12vw; width: 72vw; height: 72vw; max-width: none; opacity: .25; }
  .game { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .game .pill { grid-column: auto; }
  .genre { font-size: 14px; letter-spacing: .16em; }
  .pill { height: 44px; }
  .site-foot { flex-direction: column; align-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
