/* Studio Markata.
   The logo is warm (fur, cream, bark). Every blue below is the exact 180 degree hue
   rotation of a logo colour at the same saturation and lightness, so the monkey is
   the only warm thing on the cool paper. */
:root {
  color-scheme: dark;
  /* Logo colours */
  --fur: #9c6b4c; --tuft: #7b4b32; --face: #f3ddb5; --muzzle: #fff0d1; --bark: #442418;
  /* Their complements */
  --ink: #12191f;      /* near-black brown */
  --petrol: #183844;   /* bark */
  --petrol-2: #1f4656;
  --steel: #32627b;    /* tuft */
  --sky: #4c7d9c;      /* fur */
  --peri: #8cafd8;     /* inner ear */
  --ice: #b5cbf3;      /* face */
  --frost: #d1e0ff;    /* muzzle */
  --paper: #eef3ff;
  --display: "Segoe UI Black", "Arial Black", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --gutter: clamp(16px, 4.5vw, 72px);
  --wrap: 1240px;
  --shadow: 0 2px 0 rgba(8, 16, 24, .18), 0 18px 34px -14px rgba(8, 16, 24, .55);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--petrol); scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--body); font-size: clamp(16px, 1.05vw + 12px, 19px); line-height: 1.6; color: var(--frost); background: var(--petrol); overflow-x: clip; }
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--muzzle); }
:focus-visible { outline: 3px solid var(--muzzle); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.04; letter-spacing: -.015em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
h3 { font-size: clamp(1.25rem, 1.7vw, 1.6rem); line-height: 1.15; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow { max-width: 46em; }
.eyebrow { font-weight: 700; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--peri); margin: 0 0 1em; }
.lede { font-size: 1.22em; line-height: 1.5; }
.muted { opacity: .78; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--muzzle); color: var(--bark); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }

/* Header */
.bar { position: fixed; inset: 0 0 auto; z-index: 40; transition: background-color .25s, box-shadow .25s; }
.bar.solid, .bar:has(details[open]) { background: rgba(18, 25, 31, .94); box-shadow: 0 8px 24px -14px rgba(0, 0, 0, .7); }
.bar-row { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 1.05rem; letter-spacing: .01em; color: var(--muzzle); margin-right: auto; }
.brand .monkey { width: 46px; flex: none; }
.nav-wide { display: none; align-items: center; gap: clamp(12px, 1.5vw, 24px); font-weight: 600; font-size: .95rem; }
.nav-wide a { text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-wide a:hover, .nav-wide a[aria-current] { border-bottom-color: var(--muzzle); color: var(--muzzle); }
.nav-menu { position: relative; }
.nav-menu summary { list-style: none; cursor: pointer; font-weight: 700; padding: 8px 14px; border: 2px solid var(--peri); border-radius: 999px; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: var(--ink); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); display: grid; }
.nav-panel a { text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.nav-panel a:hover { background: var(--petrol); }
@media (min-width: 980px) { .nav-wide { display: flex; } .nav-menu { display: none; } }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6em; }
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .82em 1.3em; border-radius: 12px; font-weight: 800; text-decoration: none; transition: transform .16s, box-shadow .16s, background-color .16s; }
.btn.primary { background: var(--muzzle); color: var(--bark); box-shadow: 0 5px 0 var(--fur); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--fur); color: var(--bark); }
.btn.primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--fur); }
.btn.ghost { border: 2px solid currentColor; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.big { font-size: 1.2em; }

/* Living monkey faces. The picture stays underneath until the puppet is ready. */
.monkey, .logo-stage { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.monkey { position: relative; display: block; }
.monkey img { display: block; width: 100%; height: auto; }
.monkey.alive img { visibility: hidden; }
/* Wider than its box on purpose, so the site-wide max-width must not squeeze it. */
.monkey-canvas { position: absolute; max-width: none; pointer-events: none; }
.monkey-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }
.monkey-says { position: fixed; left: 0; top: 0; z-index: 75; max-width: min(15em, 64vw); padding: .5em .85em; border-radius: 16px; background: var(--muzzle); color: var(--bark); font: 800 .95rem/1.25 var(--body); box-shadow: 0 8px 20px -8px rgba(4, 12, 20, .65); pointer-events: none; opacity: 0; visibility: hidden; transform-origin: 14px 100%; }
.monkey-says::after { content: ""; position: absolute; left: 14px; bottom: -6px; width: 14px; height: 14px; border-radius: 3px; background: inherit; transform: rotate(45deg); }
.monkey-says.left { transform-origin: calc(100% - 14px) 100%; }
.monkey-says.left::after { left: auto; right: 14px; }
.monkey-says.top { transform-origin: 50% 100%; }
.monkey-says.top::after { left: calc(50% - 7px); }
.monkey-says.show { opacity: 1; visibility: visible; }
.motion .monkey-says { transform: scale(.5); transition: opacity .14s, transform .26s cubic-bezier(.2, 1.7, .4, 1), visibility 0s .14s; }
.motion .monkey-says.show { transform: none; transition: opacity .14s, transform .26s cubic-bezier(.2, 1.7, .4, 1); }
.monkey-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.banana-button { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70; display: grid; place-items: center; width: 66px; height: 66px; padding: 0; border: 3px solid var(--muzzle); border-radius: 50%; background: radial-gradient(circle at 42% 34%, var(--sky), var(--petrol) 78%); box-shadow: 0 10px 24px -8px rgba(4, 12, 20, .7); cursor: grab; user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
.banana-button:active { cursor: grabbing; }
.banana-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.banana-button canvas { width: 44px; height: auto; pointer-events: none; transition: opacity .15s, transform .15s; }
.banana-button:hover canvas { transform: rotate(-12deg) scale(1.1); }
.banana-button.empty canvas { opacity: .18; }
.motion .banana-button.fresh canvas { animation: banana-wiggle 1.6s ease-in-out infinite; }
@keyframes banana-wiggle { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg) scale(1.08); } }
.banana-tip { position: absolute; right: calc(100% + 10px); top: 50%; translate: 0 -50%; padding: .42em .85em; border-radius: 999px; background: var(--muzzle); color: var(--bark); font: 700 .85rem var(--body); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s; }
.banana-count { position: absolute; left: -8px; top: -8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--muzzle); color: var(--bark); font: 800 .82rem/26px var(--body); text-align: center; box-shadow: 0 2px 6px rgba(4, 12, 20, .5); pointer-events: none; }
.banana-count:empty { display: none; }
.banana-button:hover .banana-tip, .banana-button:focus-visible .banana-tip, .banana-button.fresh .banana-tip { opacity: 1; }

/* Hero */
.hero { position: relative; background: var(--petrol); }
.hero-stage { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; }
.hero-stage { --cx: 68%; --cy: 48%; --size: min(80vh, 50vw); }
.burst, .disc, .logo-stage { position: absolute; left: var(--cx); top: var(--cy); transform: translate(-50%, -50%); }
.burst { width: 175vmax; height: 175vmax; max-width: none; z-index: -3; will-change: transform; }
.motion .hero .burst { animation: burst-turn 240s linear infinite; }
@keyframes burst-turn { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.disc { width: calc(var(--size) * .9); height: calc(var(--size) * .9); border-radius: 50%; background: radial-gradient(circle at 42% 34%, var(--sky), var(--steel) 72%); box-shadow: 0 0 0 clamp(8px, 1.2vw, 18px) rgba(76, 125, 156, .26), 0 30px 70px -20px rgba(4, 12, 20, .7); z-index: -2; will-change: transform; }
.logo-stage { width: var(--size); height: var(--size); z-index: 2; }
.logo-poster, .logo-poster img, .logo-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo-poster { transition: opacity .25s; }
.logo-poster.faded { opacity: 0; }
.play-logo { display: block; margin-top: 1.1em; padding: .3em 0; font: 700 .95rem var(--body); color: var(--muzzle); background: none; border: 0; border-bottom: 2px solid currentColor; cursor: pointer; }
.play-logo[hidden] { display: none; }
.play-logo:hover { color: #fff; }
.hero-copy { position: absolute; left: var(--gutter); top: 50%; translate: 0 -54%; width: min(44vw, 620px); z-index: 5; }
.hero-copy .lede { max-width: 30em; }
.hero-hint { position: absolute; left: var(--gutter); bottom: clamp(70px, 13vh, 130px); margin: 0; font-size: .9rem; font-weight: 700; color: var(--ice); z-index: 5; }
.foliage { position: absolute; left: 0; right: 0; bottom: -2px; pointer-events: none; will-change: transform; }
.foliage svg { width: 100%; min-width: 900px; height: auto; margin-inline: auto; }
.foliage::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 60vh; background: currentColor; }
.foliage-back { z-index: 0; color: var(--steel); }
.foliage-mid { z-index: 1; color: var(--petrol-2); }
.foliage-front { z-index: 4; color: var(--ink); }
@media (max-width: 859px) {
  .hero-stage { --cx: 50%; --cy: 31%; --size: min(88vw, 44svh); }
  .hero-copy { left: var(--gutter); right: var(--gutter); top: auto; bottom: clamp(44px, 8svh, 90px); translate: none; width: auto; }
  .hero-copy h1 { font-size: clamp(1.9rem, 8.6vw, 3rem); }
  .hero-copy .lede { font-size: 1.02em; }
  .hero-copy .actions { margin-top: 1em; gap: 10px; }
  .hero-copy .eyebrow { margin-bottom: .5em; }
  .hero-hint { display: none; }
}
@media (max-width: 859px) and (max-height: 760px) {
  .hero-copy .lede, .hero-copy .btn.ghost, .hero-copy .eyebrow { display: none; }
}
/* Phones held sideways: logo and words side by side. */
@media (max-width: 959px) and (max-height: 500px) and (orientation: landscape) {
  .hero-stage { --cx: 76%; --cy: 47%; --size: 74svh; }
  .hero-copy { top: 50%; bottom: auto; translate: 0 -50%; right: auto; width: 54vw; }
  .hero-copy h1 { font-size: clamp(1.6rem, 4.6vw, 2.2rem); }
  .foliage svg { min-width: 1100px; }
}

/* Sheets of paper */
.sheet { position: relative; padding-block: clamp(64px, 9vw, 130px); z-index: 1; }
.sheet-ink { background: var(--ink); color: var(--frost); }
.sheet-petrol { background: var(--petrol); color: var(--frost); }
.sheet-steel { background: var(--steel); color: #eef3ff; }
.sheet-steel .eyebrow { color: var(--frost); }
.sheet-frost { background: var(--frost); color: var(--ink); color-scheme: light; }
.sheet-frost .eyebrow { color: var(--steel); }
.sheet-frost a:hover { color: var(--steel); }
.sheet-paper { background: var(--paper); color: var(--ink); color-scheme: light; }
.sheet-paper .eyebrow { color: var(--steel); }
.sheet-paper a { color: #1d4a62; }
.sheet-paper a:hover { color: var(--steel); }
.sheet-paper .btn.primary, .sheet-frost .btn.primary { color: var(--bark); }
.edge { position: absolute; left: 0; right: 0; bottom: calc(100% - 2px); pointer-events: none; overflow: hidden; }
.edge svg { width: 100%; min-width: 900px; height: auto; }
.sheet-ink > .edge { color: var(--ink); }
.sheet-petrol > .edge { color: var(--petrol); }
.sheet-steel > .edge { color: var(--steel); }
.sheet-frost > .edge { color: var(--frost); }
.sheet-paper > .edge { color: var(--paper); }

/* Rise on reveal */
.motion .rise { opacity: 0; transform: translateY(26px) rotate(.5deg); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .9, .3, 1.15); }
.motion .rise.in { opacity: 1; transform: none; }

/* Featured game */
.game-feature { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; }
@media (min-width: 900px) { .game-feature { grid-template-columns: 1.25fr 1fr; } }
.card-photo { margin: 0; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transform: rotate(-1.2deg); transition: transform .3s; background: var(--petrol); }
.card-photo:hover { transform: rotate(0) scale(1.01); }
.card-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-photo figcaption { padding: 10px 14px; font-size: .84rem; color: var(--ice); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 1em 0 0; }
.chips li { padding: .28em .8em; border-radius: 999px; font-size: .86rem; font-weight: 700; background: rgba(140, 175, 216, .18); color: var(--ice); }
.sheet-paper .chips li, .sheet-frost .chips li { background: rgba(50, 98, 123, .14); color: #1d4a62; }

/* Strip of captures */
.strip { margin-top: clamp(40px, 6vw, 80px); overflow: hidden; }
.strip-track { display: flex; gap: 14px; width: max-content; }
.motion .strip-track { animation: strip 70s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip figure { margin: 0; width: clamp(220px, 24vw, 340px); flex: none; }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.strip figcaption { font-size: .8rem; margin-top: 6px; color: var(--ice); }
@keyframes strip { to { transform: translateX(calc(-50% - 7px)); } }
.strip-note { font-size: .84rem; color: var(--ice); margin-top: 12px; }
html:not(.motion) .strip { overflow-x: auto; }

/* Principles and door cards */
.tri { display: grid; gap: 18px; margin-top: 2em; }
@media (min-width: 820px) { .tri { grid-template-columns: repeat(3, 1fr); } }
.note { background: rgba(255, 255, 255, .1); border-radius: 14px; padding: 22px; }
.note h3 { color: var(--muzzle); }
.sheet-paper .note, .sheet-frost .note { background: #fff; box-shadow: var(--shadow); }
.sheet-paper .note h3, .sheet-frost .note h3 { color: var(--ink); }
.note p:last-child { margin: 0; }
.split { display: grid; gap: clamp(32px, 5vw, 80px); }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr 1fr; } }
.doors { display: grid; gap: 14px; }
@media (min-width: 560px) { .doors { grid-template-columns: 1fr 1fr; } }
.door { display: block; background: var(--petrol); color: var(--frost); border-radius: 14px; padding: 18px 20px; text-decoration: none; box-shadow: var(--shadow); transition: transform .18s, background-color .18s; }
.door:nth-child(odd) { transform: rotate(-.7deg); }
.door:nth-child(even) { transform: rotate(.6deg); }
.door:hover { transform: rotate(0) translateY(-3px); background: var(--steel); color: #fff !important; }
.door strong { display: block; font-family: var(--display); font-weight: 900; font-size: 1.25rem; }
.door span { font-size: .92rem; opacity: .86; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 16px 0; border-top: 2px solid rgba(18, 25, 31, .16); }
.sheet-petrol .news-list li, .sheet-ink .news-list li { border-top-color: rgba(209, 224, 255, .2); }
.news-list time { display: block; font-size: .84rem; font-weight: 700; opacity: .7; }
.news-list a { font-family: var(--display); font-weight: 900; font-size: 1.25rem; line-height: 1.2; text-decoration: none; }
.news-list a:hover { text-decoration: underline; }
.news-list p { margin: .3em 0 0; }

/* Inner page header */
.page-head { position: relative; padding-top: clamp(130px, 17vw, 200px); padding-bottom: clamp(110px, 13vw, 190px); background: var(--petrol); overflow: hidden; isolation: isolate; }
.page-head .burst-static { position: absolute; right: calc(clamp(12px, 7vw, 120px) + clamp(130px, 21vw, 300px) / 2 - 90vmax); bottom: calc(clamp(16px, 3vw, 44px) + clamp(57px, 9.3vw, 132px) - 90vmax); width: 180vmax; height: 180vmax; max-width: none; z-index: -2; }
.page-head h1 { max-width: min(13em, 66vw); }
.page-head .lede { max-width: min(34em, 62vw); margin-bottom: 0; }
@media (max-width: 620px) { .page-head h1, .page-head .lede { max-width: none; } }
.peek { position: absolute; right: clamp(12px, 7vw, 120px); bottom: clamp(16px, 3vw, 44px); width: clamp(130px, 21vw, 300px); z-index: 0; }
.page-head .foliage-back { z-index: -1; }
.page-head .foliage-front { z-index: 1; color: var(--paper); }
.page-head.to-ink .foliage-front { color: var(--ink); }
.page-head.to-frost .foliage-front { color: var(--frost); }
@media (max-width: 620px) { .page-head { padding-bottom: 156px; } }

/* Long-form text */
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin-top: 1.5em; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: .4em; }

/* Facts table */
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: .62em 0; border-top: 2px solid rgba(18, 25, 31, .13); }
.facts th { width: 38%; font-weight: 800; padding-right: 1em; }
.sheet-ink .facts th, .sheet-ink .facts td, .sheet-petrol .facts th, .sheet-petrol .facts td { border-top-color: rgba(209, 224, 255, .2); }

/* Game page gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.gallery figure { margin: 0; }
.gallery a { display: block; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.gallery figcaption { font-size: .86rem; margin-top: 6px; font-weight: 600; }
.send-off { text-align: center; }
.send-off h2 { max-width: 16em; margin-inline: auto; }
.send-off .actions { justify-content: center; }

/* Press kit */
.swatches { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin: 0; padding: 0; list-style: none; }
.swatches li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.swatches svg { flex: none; border-radius: 8px; }
.swatches b { display: block; }
.wheel { max-width: 440px; margin-inline: auto; }
.downloads { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.downloads a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px 18px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); text-decoration: none; font-weight: 700; }
.downloads a:hover { transform: translateY(-2px); }
.downloads small { font-weight: 500; opacity: .75; white-space: nowrap; }
.press-logo, .mascot-card { background: var(--petrol); border-radius: 16px; padding: 18px; }
.mascot-card { margin: 0; box-shadow: var(--shadow); }
.mascot-card figcaption { padding: 4px 4px 0; font-size: .9rem; font-weight: 700; color: var(--ice); text-align: center; }

.press-gap { margin-top: 2em; }

/* Contact */
.mail { font-weight: 800; word-break: break-word; }
.doors-contact { display: grid; gap: 18px; }
@media (min-width: 720px) { .doors-contact { grid-template-columns: 1fr 1fr; } }
.defs { position: absolute; width: 0; height: 0; }
.foot-second { margin-top: 1.6em !important; }

/* Footer */
.site-foot { position: relative; background: var(--ink); color: var(--ice); padding-block: clamp(50px, 6vw, 90px) 100px; z-index: 1; }
.site-foot > .edge { color: var(--ink); }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1.5fr repeat(3, 1fr); } }
.foot-brand .monkey { width: 150px; }
.foot-grid h2 { font: 800 .82rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--peri); margin: 0 0 .9em; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .4em; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.legal-line { margin: 40px 0 0; font-size: .85rem; opacity: .75; }

/* 404 */
.lost { text-align: center; }
.lost img { width: min(280px, 60vw); margin: 0 auto 1em; }

@media (prefers-reduced-motion: reduce) {
  html:not(.motion) *, html:not(.motion) *::before, html:not(.motion) *::after { transition: none !important; animation: none !important; }
}
