/* The Figma frame is 1920px wide. --u is one Figma pixel: it shrinks with
   narrower windows so the layout keeps its proportions, and stops at 1px. */
:root {
  --u: min(1px, calc(100vw / 1920));
  --bg: #0d0d0d;
  --gold: #ffce91;
  --gold-dim: #e1b681;
  --cream: #fffede;
  --border: #8d714e;
  --serif: "Averia Serif Libre", Georgia, serif;
  --sans: "Averia Sans Libre", "Trebuchet MS", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--cream); font-family: var(--serif); }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h1, h2, h3, h4 { color: var(--gold); }
img { display: block; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

main {
  display: flex; flex-direction: column; align-items: center;
  gap: calc(320 * var(--u)); padding-bottom: calc(320 * var(--u));
  overflow-x: clip;
}
section { width: 100%; max-width: 1920px; }

.heading { font-size: calc(64.24 * var(--u)); line-height: 1.377; letter-spacing: .07em; }
.label { font-family: var(--sans); font-size: max(13px, calc(29.7 * var(--u))); line-height: 1.414; }

/* Artwork that fades into the background: an oversized image behind a blurred mask */
.art { position: relative; flex: none; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
.art img {
  position: absolute; max-width: none; pointer-events: none;
  left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u));
  width: calc(var(--iw) * var(--u)); height: calc(var(--ih) * var(--u));
  object-fit: cover;
  -webkit-mask: var(--mask) calc(var(--mx) * var(--u)) calc(var(--my) * var(--u)) / calc(var(--mw) * var(--u)) calc(var(--mh) * var(--u)) no-repeat;
  mask: var(--mask) calc(var(--mx) * var(--u)) calc(var(--my) * var(--u)) / calc(var(--mw) * var(--u)) calc(var(--mh) * var(--u)) no-repeat;
}
.art-hero { --w: 478; --h: 305; --x: -498.72; --y: -281.67; --iw: 1475.73; --ih: 764.66; --mask: url("assets/hero-mask.svg"); --mx: 295.62; --my: 78.57; --mw: 884.2; --mh: 711.2; }
.art-dh { --w: 630; --h: 418; --x: -541; --y: -260; --iw: 1827; --ih: 946; --mask: url("assets/dungeon-hotpot-mask.svg"); --mx: 264.1; --my: -16.9; --mw: 1183.8; --mh: 971.8; }
.art-hoe { --w: 655; --h: 433.82; --x: -457.36; --y: -263.06; --iw: 1605.8; --ih: 917.6; --mask: url("assets/house-of-everlast-mask.svg"); --mx: 239.11; --my: 44.8; --mw: 1091.51; --mh: 870.33; }
.art-contact { --w: 727; --h: 525.33; --x: -240; --y: -164.83; --iw: 1636; --ih: 920; --mask: url("assets/contact-mask.svg"); --mx: 10.2; --my: -64.97; --mw: 1186.6; --mh: 984.94; }

/* Text sits above the soft edges of the artwork */
.hero-text, .project-info, .contact-text { position: relative; z-index: 1; }

.hero { display: flex; flex-direction: column; align-items: center; gap: calc(146 * var(--u)); min-height: calc(1080 * var(--u)); padding-top: calc(304 * var(--u)); }
.hero-text { display: flex; flex-direction: column; align-items: center; gap: calc(16 * var(--u)); text-align: center; }
h1 { font-size: calc(80.85 * var(--u)); line-height: .977; letter-spacing: .07em; }

.about { display: flex; justify-content: center; align-items: center; gap: calc(142 * var(--u)); }
.portrait { position: relative; flex: none; width: calc(446 * var(--u)); height: calc(456 * var(--u)); }
.portrait img { position: absolute; }
.portrait-photo { position: absolute; left: 0; top: calc(21 * var(--u)); width: calc(435 * var(--u)); height: calc(435 * var(--u)); border-radius: 50%; overflow: hidden; }
.portrait-photo img { left: 0; top: calc(-64 * var(--u)); width: calc(499 * var(--u)); height: calc(665 * var(--u)); max-width: none; object-fit: cover; }
.star-solid { left: 0; top: 0; width: calc(74 * var(--u)); height: calc(76 * var(--u)); }
.star-outline { left: calc(401 * var(--u)); top: calc(385 * var(--u)); width: calc(45 * var(--u)); height: calc(45 * var(--u)); }
.about-text { width: calc(863 * var(--u)); }
.about-text p { font-size: max(14px, calc(28 * var(--u))); line-height: 1.607; letter-spacing: .08em; text-align: justify; }
.about-text h2 { margin-bottom: calc(8 * var(--u)); }
.about-text p + p { margin-top: 1.607em; }

.highlights { display: flex; flex-direction: column; align-items: center; gap: calc(28 * var(--u)); text-align: center; }
.highlights .label { color: #fff; letter-spacing: .19em; }

.project { display: flex; justify-content: space-between; align-items: center; min-height: calc(1080 * var(--u)); padding: 0 calc(140 * var(--u)); }
.project-info { display: flex; flex-direction: column; align-items: flex-start; gap: calc(40 * var(--u)); width: calc(725 * var(--u)); font-size: max(14px, calc(28 * var(--u))); line-height: 1.5; letter-spacing: -.01em; }
.copy h3 { font-size: calc(56 * var(--u)); font-weight: 400; }
.copy p { text-align: justify; }
.copy p + p { margin-top: 1.5em; }
.details { display: flex; gap: calc(40 * var(--u)); }
.details > div { display: flex; flex-direction: column; gap: calc(8 * var(--u)); }
dt { color: var(--gold-dim); font-weight: 700; white-space: nowrap; }
.logos { display: flex; align-items: center; gap: calc(20 * var(--u)); }
.steam { width: calc(131 * var(--u)); }
.itch { width: calc(110 * var(--u)); }

.button {
  display: inline-flex; justify-content: center; align-items: center; gap: .45em;
  width: calc(338 * var(--u)); min-width: 190px; height: calc(52.8 * var(--u)); min-height: 40px;
  border-radius: 999px; background: var(--gold); color: #000;
  font: 700 max(14px, calc(18 * var(--u)))/1.1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-decoration: none; transition: background-color .2s;
}
.button[href]:hover { background: #ffdfb5; }
.button svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.work { display: flex; flex-direction: column; gap: calc(84 * var(--u)); min-height: calc(1080 * var(--u)); padding: calc(27 * var(--u)) calc(45 * var(--u)) calc(45 * var(--u)); }
.work-header { display: flex; align-items: center; gap: calc(48 * var(--u)); }
.work-header h3 { font-size: calc(81.83 * var(--u)); font-weight: 400; line-height: 1.5; letter-spacing: -.01em; white-space: nowrap; }
.side { display: flex; flex: 1 1 0; align-items: center; gap: calc(24 * var(--u)); min-width: 0; }
.side p { line-height: 1.5; color: var(--gold); font-size: max(13px, calc(30 * var(--u))); letter-spacing: -.01em; white-space: nowrap; }
.line { flex: 1 1 0; width: 0; min-width: 0; height: max(1px, calc(2.5 * var(--u))); }
.logo-dh { position: relative; flex: none; overflow: hidden; width: calc(185 * var(--u)); height: calc(103.5 * var(--u)); }
.logo-dh img { position: absolute; left: -14.18%; top: -70.8%; width: 135.26%; height: 241.67%; max-width: none; }
.logo-hoe { width: calc(209 * var(--u)); height: calc(111 * var(--u)); }

.cards { display: flex; justify-content: space-between; align-items: flex-start; }
.card { display: flex; flex-direction: column; align-items: center; width: calc(562 * var(--u)); text-align: center; font-size: max(13px, calc(26 * var(--u))); line-height: 1.51; }
.shot { width: 100%; aspect-ratio: 562 / 316; object-fit: cover; border: max(1px, calc(2 * var(--u))) solid var(--border); border-radius: calc(25 * var(--u)); }
.icon { width: calc(60 * var(--u)); height: calc(48 * var(--u)); margin: calc(56 * var(--u)) 0 calc(12 * var(--u)); }
.card h4 { font-size: inherit; }
.card p { max-width: calc(499 * var(--u)); }
.card:nth-child(1) p { max-width: calc(468 * var(--u)); }
.card:nth-child(2) p { max-width: calc(483 * var(--u)); }

.contact { display: flex; justify-content: space-between; align-items: center; min-height: calc(1080 * var(--u)); padding: 0 calc(78 * var(--u)) 0 calc(233 * var(--u)); }
.contact-text { display: flex; flex-direction: column; align-items: center; gap: calc(12 * var(--u)); text-align: center; }
address { display: flex; align-items: center; gap: calc(24 * var(--u)); color: #fff; font: normal max(13px, calc(23 * var(--u))) var(--sans); }
address a { display: flex; align-items: center; gap: calc(6 * var(--u)); text-decoration: none; }
address a:hover { color: var(--gold); }
.email { width: calc(24 * var(--u)); height: calc(24 * var(--u)); margin: calc(4 * var(--u)); }
.instagram { width: calc(42 * var(--u)); height: calc(42 * var(--u)); }

/* Tablets and phones: the 1040px "Mobile" frame in Figma, scaled to the window */
@media (max-width: 1040px) {
  :root { --u: calc(100vw / 1040); }

  .art-dh { --w: 494; --h: 328; --x: -760; --y: -322.56; --iw: 2041; --ih: 1057; --mask: url("assets/dungeon-hotpot-mask-mobile.svg"); --mx: 483.1; --my: 45.66; --mw: 1047.8; --mh: 881.8; }
  .art-contact { --w: 635; --h: 459; --x: -240; --y: -198.29; --iw: 1636; --ih: 920; --mask: url("assets/contact-mask-mobile.svg"); --mx: 10.2; --my: -31.52; --mw: 1094.6; --mh: 918.6; }

  .about { flex-direction: column; gap: calc(37 * var(--u)); }
  .portrait { --u: calc(100vw / 1040 * .6886); }

  .project { flex-direction: column; justify-content: center; }
  .project-info { align-items: center; }
  .copy h3 { text-align: center; }
  .details { justify-content: space-between; width: 100%; }
  .details > div { align-items: center; }

  .work-header { flex-direction: column; }
  .work-header h3 { font-size: calc(64 * var(--u)); }
  .side { flex: none; }
  .line { display: none; }
  .cards { flex-direction: column; align-items: center; gap: calc(80 * var(--u)); }

  .contact { flex-direction: column; justify-content: flex-start; padding: 0; }
}

/* Phones: same layout, but text, photo and screenshots stop shrinking at a readable size */
@media (max-width: 640px) {
  .heading { font-size: max(calc(64.24 * var(--u)), min(8.5vw, 32px)); }
  .label { font-size: 14px; }
  h1 { font-size: max(calc(80.85 * var(--u)), min(10.5vw, 38px)); }

  .about { gap: 24px; }
  .portrait { --u: max(.39px, calc(100vw / 1040 * .6886)); }
  .about-text, .project-info { width: calc(100% - 48px); font-size: 16px; }
  .about-text p { font-size: 16px; letter-spacing: .03em; text-align: left; }

  .project { padding: 0; }
  .project-info { gap: 24px; }
  .copy h3 { font-size: 32px; }
  .copy p { text-align: left; }
  .details { flex-wrap: wrap; gap: 16px 10px; font-size: min(15px, 4vw); }
  .logos { --u: .5px; min-height: 24px; }
  .button { width: 100%; height: 48px; font-size: 16px; }

  .work { gap: 40px; padding: 0 24px; }
  .work-header { gap: 12px; }
  .work-header h3 { font-size: 36px; }
  .side p { font-size: 17px; }
  .logo-dh, .logo-hoe { --u: .65px; }
  .cards { gap: 56px; }
  .card { width: 100%; font-size: 16px; }
  .shot { border-radius: 15px; }
  .icon { width: 45px; height: 36px; margin: 24px 0 8px; }
  .cards .card p { max-width: 320px; }

  address { --u: .61px; flex-wrap: wrap; justify-content: center; gap: 0 16px; font-size: 14px; }
  address a { min-height: 44px; }
}
