/* Kyle Bailey - kbsound.net */
:root {
  --bg: #0a0a0a;
  --ink: #f4f2ed;
  --content: 620px;
  --wide: 1200px;
  --gutter: 40px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Chivo", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dark fabric texture, fixed behind the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg) url("/images/background.jpg") center / cover no-repeat;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- Header ---------- */
.site-header {
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 60px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 40px;
}
.brand { text-decoration: none; flex: none; }
.brand img { width: 85px; }
.brand span {
  display: block;
  margin-top: 16px;
  text-transform: uppercase;
  font-size: 18px;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 40px;
}
.site-nav a {
  font-size: 16px;
  font-weight: 100;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Inner pages ---------- */
.entry {
  padding: 0 var(--gutter) 80px;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
}
.entry::after { content: ""; display: block; clear: both; }
.entry > * {
  max-width: var(--content);
  margin: 20px auto 0;
}
.entry > h1 {
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0;
  margin-bottom: 40px;
}
.entry h2 {
  font-size: clamp(38px, 6.5vw, 64px);
  font-weight: 100;
  line-height: 1.2;
}
.entry h2.bold { font-weight: 700; }
.entry h3 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 100;
  line-height: 1.2;
}
.entry h3.film { font-size: clamp(26px, 4vw, 36px); font-weight: 400; margin-top: 60px; clear: both; }
.entry h4 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 100;
  line-height: 1.25;
}
.entry h2 strong, .entry h3 strong, .entry h4 strong { font-weight: 400; }
.entry h3.film strong { font-weight: 700; }
.center { text-align: center; }
.entry ul { padding-left: 40px; }
.entry li { margin: 2px 0; }
.entry li ul { padding-left: 24px; }
.entry hr {
  border: 0;
  border-top: 2px solid var(--ink);
  width: 100px;
  margin-top: 40px;
  margin-bottom: 40px;
}
.clear { clear: both; }

/* Images */
figure { margin: 0; }
.entry > figure img { width: 100%; }
.entry > figure.natural img { width: auto; }
.entry > figure.alignleft {
  float: left;
  clear: left;
  max-width: 309px;
  margin: 8px 32px 16px 0;
}
.entry > figure.alignright {
  float: right;
  clear: right;
  max-width: 309px;
  margin: 8px 0 16px 32px;
}
.entry > figure.aligncenter img { margin: 0 auto; }
.rounded img { border-radius: 9999px; }
figure.rounded-soft img { border-radius: 24px; }
figcaption { font-size: 14px; text-align: center; margin-top: 6px; }

.gallery {
  display: flex;
  gap: 16px;
  float: right;
  max-width: 420px !important;
  margin: 8px 0 16px 32px !important;
}
.entry > .gallery img { width: 200px; min-width: 0; flex: 0 1 200px; aspect-ratio: 1; object-fit: cover; border-radius: 9999px; }
.entry a { overflow-wrap: anywhere; }

.split { display: flex; gap: 24px; align-items: center; }
.split > * { flex: 1; margin: 0; }

/* Embeds */
.video { aspect-ratio: 16 / 9; }
.video iframe, .spotify iframe, .podcast iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.spotify { height: 352px; }
.spotify.track { height: 152px; }
.spotify iframe { border-radius: 12px; }
.podcast { height: 420px; max-width: 500px !important; margin-left: max(0px, calc(50% - var(--content) / 2)) !important; }
.entry > .section-art { margin-top: 70px; }
.entry > h1 + .section-art { margin-top: 20px; }
.embed-row { display: flex; gap: 24px; max-width: var(--wide) !important; }
.embed-row > * { flex: 1; }

/* Page title pulled up level with the header and centred */
.entry > h1.raised { margin-top: -70px; margin-bottom: 24px; }
@media (max-width: 900px) { .entry > h1.raised { margin-top: -10px; } }

/* ---------- Sound Design tiles ---------- */
.games-hint { opacity: 0.7; margin-top: -20px !important; }
.entry > .games {
  max-width: var(--wide);
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.game {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.game:hover { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.game[aria-expanded="true"] { border-color: var(--ink); background: rgba(255, 255, 255, 0.12); }
.game:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.game img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  background: #000;
}
.tile-label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  flex: 1;
  padding: 14px 18px;
}
.game-name { flex: 1; font-size: 20px; line-height: 1.3; }
.game-count { font-size: 14px; font-weight: 100; white-space: nowrap; }
.tile-label::after {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s;
}
.game[aria-expanded="true"] .tile-label::after { transform: translateY(2px) rotate(-135deg); }
.game-panel {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  padding: 22px 22px 28px;
  scroll-margin-top: 16px;
}
.game-panel[hidden] { display: none; }
.entry .game-panel h2 { margin: 0 0 20px; font-size: 28px; font-weight: 400; }
.game-videos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
}
.clip p { margin: 10px 0 0; font-size: 15px; line-height: 1.4; }

/* Credits: portrait "box art" tiles */
.entry > .games.posters { grid-template-columns: repeat(5, 1fr); gap: 20px; margin-bottom: 70px; }
.entry > h2 + .games.posters { margin-top: 28px; }
.posters .game img, .tile-art { width: 100%; aspect-ratio: 3 / 4; }
.posters .game img { object-fit: cover; }
.posters .game img.contain, .posters .game img.logo { object-fit: contain; }
.posters .game img.logo { padding: 16px; }
.credit > img.logo { padding: 14px; background: #000; }
.game img.invert, .credit > img.invert { filter: invert(1); background: transparent; }
.game img.light, .credit > img.light { background: #fff; }
.tile-art {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  font-size: 22px;
  font-weight: 100;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(160deg, #1d1d1d, #050505);
}
.posters .tile-label { align-items: flex-start; padding: 12px 14px; }
.posters .game-name { font-size: 16px; }
.game-name small { display: block; margin-top: 3px; font-size: 13px; font-weight: 100; }
.posters .tile-label::after { margin-top: 8px; }
.credit { display: flex; gap: 28px; align-items: flex-start; }
.credit > img { width: 220px; flex: none; border-radius: 6px; }
.credit > div { flex: 1; min-width: 0; }
.credit p, .credit ul { margin: 14px 0 0; }
.credit ul { padding-left: 22px; }
.entry .game-panel .credit h2 { margin: 0; }
.credit .year { font-weight: 100; }
.credit-role { margin-top: 6px !important; font-weight: 100; font-size: 20px; }
.credit .podcast { margin: 18px 0 0 !important; }

/* ---------- Home ---------- */
.home-wrap {
  background: rgba(255, 255, 255, 0.06);
  padding: 16px 18px 18px;
}
.cover { position: relative; overflow: hidden; }
.cover > .cover-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.cover > .cover-tint { position: absolute; inset: 0; }
.cover > .cover-inner { position: relative; }

.hero { max-width: 1128px; margin: 0 auto; }
.hero .cover-tint { background: rgba(65, 79, 75, 0.5); }
.hero .cover-inner { padding: 48px 18px 40px; text-align: center; }
.hero h1 {
  margin: 0 0 24px;
  color: #fff;
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 400;
  line-height: 1.6;
}
.hero .video { max-width: 1090px; margin: 0 auto; }
.hero .portfolio-link {
  display: inline-block;
  margin: 18px 0 8px;
  font-size: clamp(22px, 3vw, 29px);
}

.love { margin-top: 8px; }
.love .cover-tint { background: rgba(140, 131, 117, 0.8); }
.love .cover-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 120px 0;
  min-height: 900px;
}
.love p {
  flex: 1;
  margin: 0;
  color: #000;
  font-size: clamp(44px, 6vw, 76.8px);
  font-weight: 100;
  line-height: 1;
  text-transform: uppercase;
}
.love figure { flex: 1; }
.love figure img { width: 100%; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 100px var(--gutter) 80px;
}
.site-footer ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
}
.site-footer a { font-size: 14px; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { font-size: 14px; margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .site-header { flex-direction: column; align-items: center; padding-bottom: 40px; }
  .brand { text-align: center; }
  .brand img { margin: 0 auto; }
  .site-nav ul { justify-content: center; padding-top: 0; gap: 10px 28px; }
  .entry > figure.alignleft,
  .entry > figure.alignright,
  .gallery {
    float: none;
    margin: 24px auto 0 !important;
  }
  .gallery { justify-content: center; }
  .entry > .gallery img { width: 140px; flex-basis: 140px; }
  .split, .embed-row { flex-direction: column; align-items: stretch; }
  .entry > .games, .game-videos { grid-template-columns: 1fr; }
  .game-panel { padding: 16px 14px 22px; }
  .entry > .games.posters { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tile-art { font-size: 18px; padding: 12px; }
  .credit { flex-direction: column; }
  .credit > img { width: 160px; }
  .home-wrap { padding: 8px; }
  .love .cover-inner { flex-direction: column; padding: 60px 20px; min-height: 0; }
  .love p { text-align: center; }
}
