:root {
  color-scheme: light;
  --paper: #f7f5ee;
  --panel: #fffcf6;
  --ink: #1b2c26;
  --muted: #46564e;
  --leaf: #244b3b;
  --line: #d9ddd0;
  --mist: #e8eee7;
  --display: Fraunces, Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.6 var(--body);
}
img { display: block; width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid #576d24; outline-offset: 4px; }
[id] { scroll-margin-top: 24px; }

.shell { width: min(1280px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 3;
  padding: 8px 12px;
  transform: translateY(-160%);
  background: var(--panel);
}
.skip-link:focus { transform: none; }

.site-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font: 500 1.65rem/1 var(--display);
  letter-spacing: -.052em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { font-style: italic; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(12px, 3vw, 36px); }
.site-nav a { font-size: .9375rem; font-weight: 600; text-decoration: none; }
.site-nav a:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: .24em; }
.site-nav .nav-contact { padding: .5rem .85rem; border: 1px solid var(--leaf); border-radius: 4px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(26px, 4vw, 64px);
  padding-block: clamp(50px, 6vw, 100px) clamp(54px, 6.7vw, 108px);
}
.hero h1 {
  max-width: 13ch;
  font: 500 clamp(3.55rem, 5.65vw, 5.55rem)/.99 var(--display);
  letter-spacing: -.061em;
  text-wrap: balance;
}
.hero h1 em { color: var(--leaf); font-weight: 450; }
.hero-copy > p {
  max-width: 34ch;
  margin-top: 26px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .62rem 1rem;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 650;
  font-size: .9375rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease;
}
.button-primary { background: var(--leaf); color: #fff; }
.button-primary:hover { background: #19382a; }
.button-secondary { background: transparent; border-color: #9daea1; color: var(--ink); }
.button-secondary:hover { background: #e4ede1; }

.hero-art { display: grid; padding-right: 24px; }
.hero-art figure { overflow: hidden; border-radius: 6px; }
.hero-illustration { background: #244b3b; color: white; }
.hero-illustration img { height: auto; }
.hero-illustration figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  align-items: baseline;
  padding: 10px 49% 10px 15px;
  font-size: .9rem;
  font-weight: 650;
}
.hero-illustration figcaption span { color: #e2eee3; font-weight: 400; }
.hero-game {
  position: relative;
  z-index: 1;
  justify-self: end;
  margin-top: -22px;
  margin-right: -24px;
  width: min(48%, 310px);
  border: 6px solid var(--paper);
  background: var(--leaf);
  color: #fff;
  box-shadow: 0 15px 32px rgb(34 49 37 / 19%);
}
.hero-game img { height: auto; aspect-ratio: 1.92; object-fit: cover; }
.hero-game figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 9px; padding: 8px 12px; font-size: .9rem; font-weight: 650; }
.hero-game figcaption span { color: #e2eee3; font-weight: 400; }

.work-section { padding-block: clamp(55px, 6vw, 92px); }
.illustration { border-top: 1px solid var(--line); background: var(--panel); }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  margin-bottom: clamp(22px, 3vw, 36px);
}
.section-heading h2, .contact h2, .legal-page h1 {
  font: 500 clamp(2.65rem, 4.5vw, 4rem)/1.07 var(--display);
  letter-spacing: -.055em;
}
.section-heading p { color: var(--muted); font-size: 1.05rem; }
.illustration-grid, .game-grid { display: grid; gap: clamp(15px, 2.2vw, 28px); }
.illustration-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.project-card:hover { border-color: #8ca494; box-shadow: 0 9px 24px rgb(26 53 38 / 8%); }
.project-card:has(button:focus-visible) { outline: 2px solid #576d24; outline-offset: 3px; }
.card-image, .feature-image { overflow: hidden; background: #d5e0d9; }
.card-image img, .feature-image img { height: 100%; object-fit: cover; transition: transform .24s ease; }
.card-image { aspect-ratio: 1.6; }
.game-grid .card-image { aspect-ratio: 2.15; }
.project-card:hover img { transform: scale(1.025); }
.card-info { padding: clamp(16px, 2vw, 24px); }
.project-type { color: #3c634e; font-size: .875rem; font-weight: 700; }
.card-info h3, .feature-info h3 {
  margin-block: 4px 8px;
  font: 500 clamp(1.55rem, 2.2vw, 2.04rem)/1.15 var(--display);
  letter-spacing: -.033em;
}
.project-trigger {
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgb(110 144 123 / 55%);
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
  cursor: pointer;
}
.project-card:hover .project-trigger { text-decoration-color: currentColor; }
.project-trigger::after { position: absolute; inset: 0; content: ""; }
.card-info > p:last-child { color: var(--muted); }

.games { background: var(--mist); border-block: 1px solid #d5dfd4; }
.feature {
  display: grid;
  grid-template-columns: 1.56fr 1fr;
  margin-bottom: clamp(16px, 2.2vw, 28px);
  border-color: transparent;
  background: #223f33;
  color: white;
}
.feature-image { min-height: 310px; }
.feature-info { align-self: center; padding: clamp(30px, 4vw, 64px); }
.feature-info .project-type { color: #d9e8bf; }
.feature-info h3 { font-size: clamp(2.5rem, 4.7vw, 4rem); margin-block: 5px 13px; }
.feature-info p:not(.project-type) { color: #e1ebe4; }
.feature-info .feature-roles { margin-top: 24px; padding-top: 15px; border-top: 1px solid #6b8377; font-size: .9375rem; }

.contact { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-block: clamp(47px, 7vw, 88px); }
.contact h2 { font-size: clamp(2.15rem, 4vw, 3.45rem); }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-block: 20px 24px; color: var(--muted); font-size: .9rem; }
.site-footer p { font-weight: 650; }
.site-footer a { text-decoration: underline; text-underline-offset: .24em; }

.project-dialog {
  width: min(860px, calc(100% - 30px));
  max-height: min(830px, calc(100% - 34px));
  margin: auto;
  padding: 0;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgb(15 28 20 / 30%);
}
.project-dialog::backdrop { background: rgb(23 39 31 / 73%); }
.dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 15px clamp(16px, 3vw, 30px);
}
.dialog-header h2 { font: 500 clamp(1.55rem, 4vw, 2.5rem)/1.14 var(--display); letter-spacing: -.04em; }
.dialog-content { padding: clamp(16px, 3vw, 30px); }
.dialog-content > p { max-width: 70ch; color: var(--muted); margin-bottom: 20px; }
.project-lead-image { margin-bottom: 18px; }
.project-lead-image img { height: auto; border-radius: 4px; }
.project-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.project-images img { aspect-ratio: 1.45; height: auto; object-fit: contain; border-radius: 4px 4px 0 0; background: #ecece4; }
.project-lead-image figcaption, .project-images figcaption { padding: 6px 1px; color: var(--muted); font-size: .92rem; }

.legal-page { padding-block: clamp(35px, 7vw, 80px); }
.legal-page section { margin-top: 32px; }
.legal-page h2 { font: 500 1.6rem/1.2 var(--display); margin-bottom: 12px; }
.legal-page address { font-style: normal; }
.legal-page dt { font-weight: 650; }
.legal-page dd { margin-left: 0; margin-bottom: .45rem; }

@media (max-width: 1000px) {
  .hero { gap: 26px; }
  .hero h1 { font-size: clamp(2.9rem, 6vw, 4.5rem); }
  .hero-art { padding-right: 15px; }
  .hero-illustration figcaption { padding-block: 8px; padding-left: 10px; }
  .hero-game { width: 50%; margin-right: -15px; border-width: 4px; }
  .hero-game figcaption { padding: 6px 8px; }
}

@media (max-width: 735px) {
  .site-header { min-height: 70px; }
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: clamp(3.1rem, 8.7vw, 4.4rem); }
  .hero-art { width: min(100%, 560px); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .illustration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: 1fr; }
  .feature-image { min-height: 0; aspect-ratio: 1.78; }
  .feature-info { padding: 25px; }
}

@media (max-width: 500px) {
  .site-header { align-items: flex-start; justify-content: center; flex-direction: column; gap: 12px; padding-block: 15px; }
  .site-nav { width: 100%; flex-wrap: nowrap; gap: 14px; justify-content: space-between; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: clamp(2.75rem, 11vw, 3.2rem); }
  .hero-copy > p { margin-top: 17px; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .button { padding-inline: .75rem; }
  .hero-art { padding-right: 10px; }
  .hero-illustration figcaption { line-height: 1.35; }
  .hero-game { margin-right: -10px; }
  .illustration-grid, .game-grid, .project-images { grid-template-columns: 1fr; }
  .game-grid .card-image { aspect-ratio: 1.8; }
  .contact { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .project-card, .project-card img { transition: none; }
}
