@font-face {
  font-family: "DM Sans";
  src: url("dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("space-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #151613;
  --night: #171916;
  --paper: #f7f3e7;
  --white: #fffdf4;
  --green: #dbf67b;
  --quiet: #b4b6a9;
  --muted: #515449;
  --line: #d7d4c8;
  --font-text: "DM Sans", Arial, sans-serif;
  --font-display: "Space Grotesk", "Arial", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font: 400 1rem/1.55 var(--font-text);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button { font: inherit; }

:focus-visible {
  outline: 3px solid #5b6e35;
  outline-offset: 5px;
}

.hero :focus-visible,
.masthead :focus-visible,
.books-section :focus-visible { outline-color: var(--green); }

:where(h1, h2, h3, p, dl) { margin: 0; }

:where(h1, h2, h3) {
  font-family: var(--font-display);
  line-height: .97;
  font-weight: 700;
}

.wrap {
  width: min(100% - clamp(36px, 9vw, 144px), 1328px);
  margin-inline: auto;
}

.skip {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 20;
  padding: 10px 18px;
  background: var(--green);
  color: var(--ink);
  transform: translateY(-150%);
}

.skip:focus { transform: none; }

.masthead {
  position: relative;
  z-index: 5;
  color: var(--white);
  background: #151713;
  border-bottom: 1px solid #383b32;
}

.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 82px;
  align-items: center;
  gap: 26px;
}

.wordmark {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 12px;
  font: 700 .94rem/.99 var(--font-display);
  letter-spacing: -.035em;
}

.monogram {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: #1b2011;
  background: var(--green);
  border-radius: 50%;
  font: 700 1.01rem/1 var(--font-display);
  letter-spacing: -.1em;
  padding-right: 2px;
}

.desktop-nav {
  display: flex;
  gap: clamp(20px, 4vw, 58px);
  align-items: center;
  font-size: .94rem;
  font-weight: 600;
}

.desktop-nav a { color: #dfdfd2; }
.desktop-nav a:hover { color: var(--green); }

.header-contact {
  justify-self: end;
  border: 1px solid #777b66;
  padding: 9px 15px 9px 17px;
  border-radius: 3px;
  font-weight: 700;
  font-size: .89rem;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}

.header-contact:hover { color: var(--ink); background: var(--green); border-color: var(--green); }

.mobile-menu { display: none; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #151914;
  color: var(--white);
}

.hero-screen {
  --art-focus: 59%;
  position: absolute;
  inset: 0 0 0 30%;
  container-type: size;
  overflow: hidden;
  z-index: -1;
}

.hero-layer {
  --travel: 0px;
  --lift: 0px;
  position: absolute;
  inset: 0;
  transform: translateY(calc(var(--travel) - var(--lift)));
}

.hero-layer-sky {
  --travel: var(--hero-sky-y, 0px);
  --lift: min(21px, 3.6cqh);
  bottom: calc(0px - var(--lift));
  transform: translateY(calc(var(--travel) - var(--lift))) scale(var(--hero-sky-scale, 1));
  transform-origin: center bottom;
}

.hero-layer-mountains { --travel: var(--hero-mountains-y, 0px); }
.hero-layer-water {
  --travel: var(--hero-water-y, 0px);
  --lift: min(15px, 2.5cqh);
}
.hero-layer-girl {
  --travel: var(--hero-girl-y, 0px);
  --lift: min(37px, 6cqh);
}
.hero-layer-foreground {
  --travel: var(--hero-foreground-y, 0px);
  --lift: min(54px, 8.5cqh);
}

.hero-composition {
  position: absolute;
  top: 50%;
  left: var(--art-focus);
  width: max(100%, 187.5cqh);
  aspect-ratio: 15 / 8;
  transform: translate(calc(0% - var(--art-focus)), -50%);
}

.hero-layer-sky .hero-composition {
  width: max(100%, calc(187.5cqh + 1.875 * var(--lift)));
}

.hero-composition :is(picture, .hero-rider) {
  position: absolute;
  left: var(--slice-x, 0%);
  top: var(--slice-y, 0%);
  width: var(--slice-w, 100%);
  height: var(--slice-h, 100%);
}

.hero-composition img {
  height: 100%;
  object-fit: fill;
}

.hero-composition .hero-rider :is(picture, video, canvas) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-rider video {
  opacity: 0;
  pointer-events: none;
}

.hero-rider canvas { visibility: hidden; }
.hero-rider.has-frame picture { visibility: hidden; }
.hero-rider.has-frame canvas { visibility: visible; }

.hero-leaves {
  position: absolute;
  inset: 0;
  visibility: hidden;
}

.hero-leaves i {
  position: absolute;
  top: var(--leaf-top);
  left: 0;
  width: clamp(5px, .9cqw, 10px);
  aspect-ratio: 1;
  background: url("path-depth-autumn-leaf.webp") center / contain no-repeat;
  animation: hero-leaf var(--leaf-duration) var(--leaf-delay) linear infinite paused;
}

.hero-screen.is-moving .hero-leaves { visibility: visible; }
.hero-screen.is-moving .hero-leaves i { animation-play-state: running; }

@keyframes hero-leaf {
  0% { opacity: 0; transform: translate(105cqw, 0) rotate(-30deg); }
  14%, 82% { opacity: .78; }
  50% { transform: translate(48cqw, 1cqh) rotate(145deg); }
  100% { opacity: 0; transform: translate(-6cqw, 7cqh) rotate(300deg); }
}

.hero-screen::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, #151914 0, #151914d6 10%, #15191429 42%, transparent 68%),
    linear-gradient(0deg, #141713a1 0, transparent 30%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: clamp(540px, 51vw, 670px);
  padding-block: 65px 80px;
}

.hero-copy { width: min(550px, 53%); }

.kicker {
  color: var(--muted);
  font: 700 .75rem/1.2 var(--font-text);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero .kicker { color: var(--green); }

.hero h1 {
  margin-top: clamp(14px, 2.2vw, 34px);
  font-size: clamp(4.35rem, 9.6vw, 9.15rem);
  letter-spacing: -.093em;
  line-height: .83;
}

.hero h1 span { color: var(--green); }

.hero-lead {
  margin-top: clamp(25px, 3vw, 44px);
  max-width: 390px;
  color: #efede1;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-lead strong { color: var(--white); font-weight: 700; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px 24px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 49px;
  padding: 10px 17px 10px 19px;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: .94rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}

.button span { font-size: 1.1rem; }
.button-light { background: var(--green); color: var(--ink); }
.button-light:hover { background: var(--white); }
.button-dark { background: var(--ink); color: var(--white); }
.button-dark:hover { background: var(--green); color: var(--ink); border-color: var(--ink); }

.text-link {
  display: inline-flex;
  min-height: 39px;
  width: fit-content;
  gap: .75rem;
  align-items: center;
  font-weight: 700;
  font-size: .97rem;
}


.arrow-link {
  box-shadow: inset 0 -1px currentColor;
  padding-right: 4px;
}

.section { padding-block: clamp(68px, 9vw, 138px); }

.section h2,
.contact-section h2 {
  color: currentColor;
  font-size: clamp(3.75rem, 7.05vw, 7.5rem);
  letter-spacing: -.09em;
}

.section .kicker,
.contact-section .kicker { margin-bottom: 17px; }

.work-section { background: var(--paper); }

.game-grid {
  display: grid;
  gap: clamp(26px, 4vw, 54px);
}

.game-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .74fr);
  align-items: end;
  gap: clamp(20px, 5vw, 82px);
}

.game-copy h2 { font-size: clamp(4rem, 7.05vw, 7.45rem); }

.game-summary > p {
  max-width: 36ch;
  color: var(--muted);
  font-size: 1.05rem;
  text-wrap: pretty;
}

.game-credits {
  display: flex;
  flex-wrap: wrap;
  gap: 13px 20px;
  margin: 16px 0 0;
}

.game-credits div {
  padding: 8px 12px;
  border: 1px solid #c5c5b6;
  border-radius: 4px;
}

.game-credits dt {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
}

.game-credits dd { margin: 0; font-size: .86rem; font-weight: 700; }

.gameplay-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(128px, 19%, 198px);
  gap: clamp(12px, 1.8vw, 24px);
  align-items: center;
  min-width: 0;
}

.gameplay-switch {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-weight: 700;
  font-size: .83rem;
  text-align: start;
  cursor: pointer;
}

.gameplay-switch[hidden] { display: none; }

.gameplay-switch img {
  aspect-ratio: 16 / 9;
  background: var(--night);
  object-fit: cover;
  border-radius: 4px;
  transition: opacity .2s;
}

.gameplay-switch:hover img { opacity: .83; }
.gameplay-switch:hover span { text-decoration: underline; }

.gameplay-clip { margin: 0; }

.video-frame {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  background: var(--night);
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 24px 65px #34302322;
}

.video-frame video {
  width: 100%;
  height: 100%;
  grid-area: 1 / 1;
  object-fit: contain;
}

.video-play {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 13px;
  color: var(--ink);
  background: var(--white);
  border: 0;
  border-radius: 99px;
  box-shadow: 0 7px 24px #0006;
  cursor: pointer;
  font-weight: 700;
  font-size: .94rem;
  transition: background-color .2s, transform .2s;
}

.video-play[hidden] { display: none; }
.video-play:hover { transform: scale(1.04); background: var(--green); }

.play-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: var(--green);
  background: var(--ink);
  border-radius: 50%;
}

.play-icon::before {
  display: block;
  content: "";
  margin-left: 2px;
  border-left: 8px solid currentColor;
  border-block: 5px solid transparent;
}

.media-credit {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.animation-section { padding-top: 0; }
.animation-section .wrap { border-top: 1px solid var(--line); padding-top: clamp(59px, 7.5vw, 108px); }

.section-heading {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 32px clamp(30px, 8vw, 120px);
  align-items: end;
  margin-bottom: 38px;
}

.section-heading > p,
.section-heading > div:nth-child(2) > p {
  color: var(--muted);
  max-width: 36ch;
  font-size: clamp(1rem, 1.48vw, 1.15rem);
  text-wrap: pretty;
}

.animation-reel {
  --reel-gap: clamp(16px, 2.1vw, 28px);
  padding-block: 5px 8px;
}

.animation-reel-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--reel-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.animation-reel-edge { display: none; }

.animation-card {
  display: grid;
  gap: 12px;
  font: 700 clamp(1.3rem, 1.9vw, 1.75rem)/1.15 var(--font-display);
  letter-spacing: -.035em;
}

.animation-card:hover > span:last-child { text-decoration: underline; }

.animation-card-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
}

.animation-card-image img { width: 100%; height: 100%; object-fit: cover; }

.animation-frames img {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity .24s ease, visibility 0s linear .24s;
}

.animation-frames img:first-child,
.animation-frames img.is-previous,
.animation-frames img.is-current {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.animation-frames img.is-previous { z-index: 1; }
.animation-frames img.is-current { z-index: 2; }

.animation-frames.is-rotating img:first-child:not(.is-current):not(.is-previous) {
  visibility: hidden;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .animation-frames.is-rotating img:is(.is-current, .is-previous) {
    transform: scale(1.04);
    transition: opacity .24s ease, transform 3.6s ease-out;
  }
}

@media (min-width: 681px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .animation-card { position: relative; transition: transform .24s ease; }
  .animation-card:hover { z-index: 1; transform: scale(1.035); }
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(15px, 2vw, 30px);
}

.project-info,
.book-info {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  align-items: flex-start;
  padding-top: 16px;
}

.project-info h3,
.book-info h3 {
  font-size: clamp(1.23rem, 2vw, 1.75rem);
  letter-spacing: -.045em;
  line-height: 1.06;
}

.project-info p,
.book-info p {
  margin-top: 6px;
  color: var(--muted);
  font-size: .83rem;
}

.section-foot { margin-top: 27px; }
.books-section { color: var(--white); background: var(--night); }
.books-section .kicker { color: var(--green); }
.books-section .section-heading > div:nth-child(2) > p,
.book-info p { color: var(--quiet); }
.books-section .arrow-link { margin-top: 14px; color: var(--green); }

.book-card { display: block; min-width: 0; }
.book-card:hover { color: var(--green); }

.book-cover {
  display: grid;
  place-items: center;
  padding: clamp(20px, 3vw, 38px);
  aspect-ratio: 1.12;
  border-radius: 4px;
  overflow: hidden;
}

.book-cover-character { background: #d8a351; }
.book-cover-digital { background: #7f809d; }
.book-cover-technical { background: #658873; }

.book-cover img {
  width: auto;
  max-width: 100%;
  height: min(100%, 260px);
  max-height: 100%;
  object-fit: contain;
  border-radius: 1px 4px 4px 1px;
  box-shadow: 8px 13px 18px #1516125c;
  transition: transform .45s cubic-bezier(.2,.75,.2,1);
}

.book-card:hover img { transform: translateY(-5px) rotate(-2deg); }

.about-grid,
.contact-content {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 30px clamp(30px, 8vw, 120px);
  align-items: start;
}

.about-copy {
  display: grid;
  gap: 17px;
  padding-top: 34px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.17rem);
}

.about-copy p { max-width: 42ch; }
.about-copy .arrow-link { color: var(--ink); }
.contact-section { padding-block: clamp(44px, 6vw, 88px); background: var(--green); }
.contact-section .kicker { color: #3e4c27; }
.contact-content { align-items: end; }
.contact-content p:not(.kicker) { max-width: 28ch; margin-bottom: 17px; font-weight: 600; }
.footer { color: #d4d5c9; background: var(--night); }

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  min-height: 70px;
  font-size: .85rem;
  font-weight: 600;
}

.footer a:hover { color: var(--green); }

@media (max-width: 900px) {
  .hero h1 { font-size: clamp(4.35rem, 11vw, 7rem); }
  .hero-inner { min-height: 560px; }
  .hero-copy { width: min(470px, 62%); }
  .hero-screen { left: 31%; }
  .game-grid { gap: 33px; }
  .book-cover img { height: min(100%, 215px); }
}

@media (max-width: 680px) {
  .masthead-inner {
    display: flex;
    min-height: 65px;
    justify-content: space-between;
  }

  .monogram { width: 34px; height: 34px; font-size: .91rem; }
  .desktop-nav, .header-contact { display: none; }
  .mobile-menu { display: block; }

  .mobile-menu summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding-inline: 10px;
    list-style: none;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
  }

  .mobile-menu summary::-webkit-details-marker { display: none; }

  .mobile-menu summary span {
    width: 14px;
    height: 6px;
    border-block: 1px solid var(--green);
  }

  .mobile-menu nav {
    position: absolute;
    top: 100%;
    right: 18px;
    z-index: 1;
    display: grid;
    min-width: 175px;
    padding: 9px 14px;
    color: var(--white);
    background: var(--night);
    border: 1px solid #54594a;
    border-radius: 4px;
    box-shadow: 0 6px 25px #0005;
  }

  .mobile-menu nav a { min-height: 44px; padding: 8px; }
  .mobile-menu nav a:not(:last-child) { border-bottom: 1px solid #44463c; }

  .hero { display: flex; flex-direction: column; }

  .hero-screen {
    inset: auto 0 0;
    height: 51%;
  }

  .hero-screen::after {
    background: linear-gradient(180deg, #151914 0, #1519142e 31%, transparent 65%, #15191488 100%);
  }

  .hero-screen { --art-focus: 55%; }

  .hero-inner {
    min-height: unset;
    align-items: flex-start;
    padding-top: 42px;
    padding-bottom: clamp(174px, 49vw, 297px);
  }

  .hero-copy { width: 100%; }
  .hero h1 { font-size: clamp(3.65rem, 13.8vw, 7rem); }
  .hero-lead { margin-top: 22px; max-width: 33ch; }
  .hero-actions { margin-top: 22px; }

  .section h2,
  .contact-section h2 { font-size: clamp(3.4rem, 12vw, 5.4rem); }

  .game-grid,
  .section-heading,
  .about-grid,
  .contact-content { grid-template-columns: 1fr; gap: 23px; }

  .gameplay-player { grid-template-columns: 1fr; gap: 17px; }
  .gameplay-switch { max-width: 165px; }
  .game-copy { grid-template-columns: 1fr; gap: 18px; }
  .game-credits { margin-top: 16px; }
  .section-heading { margin-bottom: 28px; }
  .animation-reel {
    --reel-card-width: min(76vw, 410px);
    container-type: inline-size;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .animation-reel::-webkit-scrollbar { display: none; }
  .animation-reel-track {
    display: flex;
    width: max-content;
    padding-inline-end: max(0px, calc(100cqw - var(--reel-card-width)));
  }
  .animation-reel-track li {
    flex: 0 0 var(--reel-card-width);
    scroll-snap-align: start;
  }
  .animation-reel.is-cycling .animation-reel-edge { display: block; }
  .books-section { padding-block: 52px; }
  .books-section .section-heading { gap: 14px; margin-bottom: 24px; }
  .books-section h2 { font-size: clamp(2.6rem, 9vw, 4rem); }
  .book-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .book-card {
    display: grid;
    grid-template-columns: clamp(82px, 25vw, 110px) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
  }
  .book-cover { aspect-ratio: 1 / 1.08; padding: 8px; }
  .book-cover img {
    height: auto;
    max-height: clamp(72px, 22vw, 96px);
    box-shadow: 3px 4px 7px #1516125c;
  }
  .book-info { padding-top: 0; }
  .book-info h3 { font-size: 1.12rem; line-height: 1.17; }
  .book-info p { font-size: .78rem; }
  .project-info h3 { font-size: 1.42rem; }
  .about-copy { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
