@font-face {
  font-family: "IM Fell";
  src: url("fonts/IMFellDoublePica-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #0d0907;
  --bg-raised: #1c1511;
  --line: #3a2d24;
  --text: #eae3d2;
  --muted: #b9ab98;
  --accent: #e5a161;
  --accent-deep: #c9773f;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IM Fell", Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px;
}
.topbar .studio img { width: clamp(130px, 7vw, 180px); opacity: .9; }
.topbar nav { display: flex; gap: clamp(22px, 1.6vw, 36px); font-size: clamp(18px, 1.15vw, 24px); }
.topbar nav a { color: var(--text); text-decoration: none; opacity: .85; }
.topbar nav a:hover { opacity: 1; color: var(--accent); }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero-art { position: relative; max-width: 1920px; margin: 0 auto; }
.hero-art img { width: 100%; }
.hero-title {
  position: absolute; z-index: 2; left: 50%; top: 43%; width: 66%; margin: 0; transform: translateX(-50%);
}
.hero-title img { filter: drop-shadow(0 0 min(.9vw, 17px) rgba(214, 104, 40, .55)); }
.hero-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(13,9,7,.45) 0%, rgba(13,9,7,0) 12%, rgba(13,9,7,0) 86%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 0 24px 64px; margin-top: -1.5vw; }
.hero h1 { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.tagline { max-width: 760px; margin: 0 auto; font-size: 22px; color: var(--text); }

.cta { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* wide screens: the text sits over the bottom of the art */
@media (min-width: 821px) {
  .hero-art::after {
    background: linear-gradient(to bottom, rgba(13,9,7,.45) 0%, rgba(13,9,7,0) 12%, rgba(13,9,7,0) 62%, rgba(13,9,7,.72) 80%, var(--bg) 100%);
  }
  .hero-inner { position: absolute; left: 0; right: 0; top: 73%; margin: 0; padding: 0 24px; z-index: 3; }
  .hero-art + .hero-inner { max-width: 1920px; margin: 0 auto; }
  .tagline { font-size: clamp(15px, 1.4vw, 26px); max-width: 34em; text-shadow: 0 2px 14px rgba(0,0,0,.95), 0 0 4px rgba(0,0,0,.8); }
  .cta { margin-top: clamp(10px, 1.3vw, 26px); }
}
.badge {
  display: inline-block; padding: 10px 26px; border: 1px solid var(--accent-deep);
  color: var(--accent); letter-spacing: .06em; font-size: 19px; background: rgba(13,9,7,.6);
}
.button {
  display: inline-block; padding: 12px 34px; background: var(--accent-deep); color: #1a120c;
  text-decoration: none; font-size: 21px; letter-spacing: .04em; border: 1px solid var(--accent);
}
.button:hover { background: var(--accent); color: #1a120c; }
.button.steam { display: inline-flex; align-items: center; gap: .55em; box-shadow: 0 6px 22px rgba(0,0,0,.5); }
.steam-icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.cta-end { margin-top: 30px; }

/* hero: the badge and the Steam button are twin boxes, same width, height and type */
.hero .cta { display: inline-grid; grid-auto-columns: 1fr; gap: 14px; }
.hero .badge, .hero .button {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  font-size: 18px; letter-spacing: .04em; line-height: 1.2; padding: 10px 24px; border: 1px solid var(--accent);
}
@media (min-width: 821px) {
  .hero .cta { grid-auto-flow: column; gap: clamp(10px, 1.1vw, 18px); }
  .hero .badge, .hero .button { font-size: clamp(14px, 1.1vw, 20px); padding: clamp(7px, .6vw, 11px) clamp(16px, 1.5vw, 28px); }
}

/* ---------- sections ---------- */
section { padding: 72px 0; }
.rule { border: 0; height: 1px; background: var(--line); max-width: var(--max); margin: 0 auto; }

h2 {
  font-weight: normal; font-size: 40px; line-height: 1.15; margin: 0 0 18px; color: var(--text);
}
h2::after { content: ""; display: block; width: 64px; height: 2px; margin-top: 14px; background: var(--accent-deep); }

.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
}
.feature + .feature { margin-top: 88px; }
.feature.flip .media { order: 2; }
.feature p { margin: 0 0 16px; color: var(--muted); }
.feature p:last-child { margin-bottom: 0; }
.media video, .media img { width: 100%; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0,0,0,.45); }

.behind { max-width: 760px; margin: 0 auto; text-align: center; }
.behind h2::after { margin-left: auto; margin-right: auto; }
.behind p { color: var(--muted); }

/* ---------- the family ---------- */
.lead { color: var(--accent); font-size: 24px; margin: 0 0 36px; }
.family { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.family { margin-top: 70px; row-gap: 90px; column-gap: 56px; }
.member { position: relative; min-height: 330px; isolation: isolate; }
/* the dev's painted blotch, darkened, as the card */
.member::before, .mystery::before {
  content: ""; position: absolute; inset: -7% -5%; z-index: -1; pointer-events: none;
  background: url("img/card_shadow_3.webp") center / 100% 100% no-repeat;
  /* the art has an opaque square core; fade it out gradually so no box shows */
  -webkit-mask-image: radial-gradient(ellipse 58% 58% at 50% 50%, #000 40%, rgba(0,0,0,.75) 70%, rgba(0,0,0,.35) 90%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 58% at 50% 50%, #000 40%, rgba(0,0,0,.75) 70%, rgba(0,0,0,.35) 90%, transparent 100%);
}
.figure { position: absolute; left: -1%; bottom: 0; height: 440px; pointer-events: none; }
.figure img {
  height: 100%; width: auto; display: block; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6));
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent);
}
.member:nth-child(1) .figure { left: -12%; }
.member:nth-child(2) .figure { left: -13%; }
.member:nth-child(3) .figure { left: -10%; }
.member:nth-child(4) .figure { left: -10%; }
/* the left column keeps clear of the figures leaning in from the right column */
.member:nth-child(odd) .bio { padding-right: 40px; }
#family { overflow-x: clip; }
.bio { position: relative; margin-left: 45%; padding: 26px 4px 26px 0; }
.bio h3 { font-weight: normal; font-size: 30px; margin: 0 0 4px; color: var(--text); }
.bio p { margin: 0 0 12px; font-size: 19.5px; line-height: 1.5; color: var(--muted); }
.bio p:last-child { margin-bottom: 0; }
.bio .role { color: var(--accent); font-style: italic; }
.family-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 60px; }
.mystery {
  position: relative; isolation: isolate; aspect-ratio: 4 / 3; display: grid; place-items: center;
}
.mystery::before { background-image: url("img/mystery_shadow_2.webp"); }
.mystery span { font-size: clamp(56px, 6vw, 96px); color: var(--accent-deep); opacity: .55; line-height: 1; }

/* ---------- trailer ---------- */
.trailer .frame { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line); }
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery button {
  padding: 0; border: 1px solid var(--line); background: none; cursor: zoom-in; display: block;
}
.gallery button:hover img { filter: brightness(1.12); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: filter .15s; }

dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; color: var(--text);
}
dialog.lightbox::backdrop { background: rgba(8,6,5,.92); }
dialog.lightbox img { max-width: 96vw; max-height: 88vh; width: auto; margin: 0 auto; }
.lb-bar { display: flex; justify-content: center; gap: 28px; margin-top: 12px; }
.lb-bar button {
  background: none; border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 18px;
  padding: 6px 18px; cursor: pointer;
}
.lb-bar button:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- footer ---------- */
footer { padding: 56px 0 64px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 18px; }
footer .studio img { width: 150px; margin: 0 auto 22px; }
footer .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin: 0 0 18px; }
footer .small { font-size: 16px; opacity: .8; margin-top: 18px; }

/* ---------- credits page ---------- */
.page-head { padding: 120px 0 24px; }
.page-head h1 { font-weight: normal; font-size: 48px; margin: 0 0 12px; }
.page-head p { color: var(--muted); max-width: 760px; }
.credits h2 { font-size: 32px; margin-top: 56px; }
.credits h3 { font-weight: normal; color: var(--accent); font-size: 22px; margin: 32px 0 8px; }
.credits ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 48px; font-size: 17px; color: var(--muted); }
.credits li { break-inside: avoid; padding: 3px 0; }
.credits li a { color: var(--text); }
.credits li a:hover { color: var(--accent); }
.credits .single { columns: 1; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  body { font-size: 18px; }
  .topbar { padding: 14px 16px; }
  .topbar .studio img { width: 80px; }
  .topbar nav { gap: 14px; font-size: 16px; }
  .hero-art { margin-top: 56px; }
  .hero-title { width: 94%; top: 44%; }
  .hero-inner { padding-bottom: 40px; margin-top: 8px; }
  .tagline { font-size: 19px; }
  .badge { padding: 9px 16px; font-size: 16px; letter-spacing: .03em; }
  .button { font-size: 18px; padding: 11px 24px; }
  .hero .badge, .hero .button { font-size: 17px; padding: 10px 22px; }
  .wrap { padding: 0 16px; }
  section { padding: 52px 0; }
  h2 { font-size: 32px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feature.flip .media { order: 0; }
  .feature + .feature { margin-top: 56px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .family { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .family { margin-top: 60px; row-gap: 80px; }
  .member { min-height: 0; }
  .figure { position: relative; left: auto; bottom: auto; height: 290px; margin: -50px 0 0; display: flex; justify-content: center; }
  .member:nth-child(n) .figure { left: auto; }
  .figure img { -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent); }
  .bio { margin-left: 0; padding: 4px 18px 20px; }
  .bio h3 { font-size: 24px; }
  .bio p { font-size: 17px; }
  .family-more { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
  .lead { font-size: 20px; margin-bottom: 24px; }
  .credits ul { columns: 1; }
  .page-head { padding-top: 96px; }
  .page-head h1 { font-size: 38px; }
}

/* narrow phones: five links do not fit beside the logo */
@media (max-width: 480px) {
  .topbar nav { gap: 11px; font-size: 14.5px; white-space: nowrap; }
  .topbar .nav-contact { display: none; }
}

/* a recruit teased by an epithet */
.mystery.known { place-items: center; align-content: center; gap: 4px; text-align: center; padding: 0 10px; }
.mystery.known span { font-size: clamp(30px, 3vw, 46px); color: var(--muted); opacity: .5; }
.mystery .aka { margin: 0; font-size: clamp(14px, 1.2vw, 19px); line-height: 1.15; color: var(--muted); opacity: .6; }
