/* Incregames: the studio's home page.
   The studio itself is quiet: warm paper, soil-brown ink, one typeface. Each game brings its own look into its part
   of the page: Terrazzo its stone floor, serif and terracotta; Increfarma its meadow, rounded letters and leaf green. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(../fonts/bricolage-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(../fonts/bricolage-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --hill: clamp(36px, 5vw, 72px);
  /* the studio */
  --paper: #fbf6ec;
  --ink: #2c2119;
  --muted: #74614f;
  --soil: #5b3b25;
  --soil-deep: #33251b;
  --night: #3a2a1f;
  --on-night: #f7ecdc;
  --on-night-muted: rgba(247, 236, 220, 0.66);
  --sun: #f8d9a8;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Terrazzo, as its own site has it */
  --tz-bg: #f6efe6;
  --tz-ink: #3a2f27;
  --tz-muted: #85715f;
  --tz-brand: #a8482a;
  --tz-accent: #ce7a52;
  --tz-accent-dark: #b4603a;
  --tz-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  /* Increfarma, as its own site has it */
  --fm-ink: #243d2d;
  --fm-muted: #5c715c;
  --fm-paper: #fff9e9;
  --fm-meadow: #eef4d4;
  --fm-leaf: #315c3d;
  --fm-leaf-dark: #23452d;
  --fm-on-leaf: #f6efd6;
  --fm-round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;

  --todo: #fff0b3;
  --todo-edge: #c99a12;

  --gutter: clamp(20px, 5vw, 72px);
  --wide: 1240px;
  --top-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--top-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.6 var(--font); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--tz-accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

/* words only Adam can fill in, marked as on his other sites */
.todo { background: var(--todo) !important; color: #5b4300 !important; box-shadow: inset 0 0 0 2px var(--todo-edge) !important; }

/* ------------------------------------------------------------------------------------------------ header */

.top {
  position: fixed; inset: 0 0 auto; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter);
  transition: background-color .4s, box-shadow .4s, backdrop-filter .4s;
}
.top[data-scrolled] {
  background: rgba(251, 246, 236, 0.86); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(91, 59, 37, 0.1);
}
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--soil); }
.tiles { position: relative; width: 50px; height: 57px; flex: none; }
.tile {
  position: absolute; inset: auto 0 0 0; width: 100%; height: auto;
  opacity: 0; scale: .6; translate: 0 8px; transition: opacity .35s, scale .5s var(--ease), translate .5s var(--ease);
}
.top[data-game="terrazzo"] .tile[data-for="terrazzo"], .top[data-game="increfarma"] .tile[data-for="increfarma"] { opacity: 1; scale: 1; translate: 0 0; transition-delay: .12s; }
.word { font-weight: 800; font-size: 23px; letter-spacing: -0.03em; font-variation-settings: "opsz" 96; }
.nav { display: flex; gap: clamp(18px, 3vw, 36px); }
.nav a { position: relative; font-weight: 600; font-size: 16px; text-decoration: none; color: var(--ink); text-shadow: 0 0 14px rgba(255, 249, 233, 0.9), 0 0 3px rgba(255, 249, 233, 0.7); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: currentColor; scale: 0 1; transition: scale .3s var(--ease); }
.nav a:hover::after { scale: 1 1; }

/* ------------------------------------------------------------------------------------------------ the showcase */

.show { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: var(--tz-bg); isolation: isolate; }
.show::after { /* the bottom melts into the page below */
  content: ""; position: absolute; inset: auto 0 0; height: 22%; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom, rgba(251, 246, 236, 0), var(--paper) 92%);
}
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s .9s; }
.slide.is-on { opacity: 1; visibility: visible; transition: opacity .9s var(--ease), visibility 0s; z-index: 1; }
.slide-in {
  position: relative; z-index: 2; height: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto;
  padding: var(--top-h) var(--gutter) clamp(120px, 15vh, 160px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4vw;
}
.copy { max-width: 540px; }
.copy > * { opacity: 0; translate: 0 18px; transition: opacity .7s var(--ease), translate .9s var(--ease); }
.is-on .copy > * { opacity: 1; translate: 0 0; }
.is-on .copy > :nth-child(2) { transition-delay: .08s; }
.is-on .copy > :nth-child(3) { transition-delay: .16s; }
.is-on .copy > :nth-child(4) { transition-delay: .24s; }
.is-on .copy > :nth-child(5) { transition-delay: .32s; }
.tagline { margin-top: 18px; text-wrap: balance; }
.line { margin-top: 10px; font-size: 19px; }
.acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.soon { margin-top: 16px; font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 650; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, translate .2s var(--ease), box-shadow .2s;
}
.btn:hover { translate: 0 -2px; }
.btn svg { width: 15px; height: 15px; fill: currentColor; }

/* Terrazzo's scene: its cream stone floor, a few pieces floating, three worlds playing */
.tz-slide { color: var(--tz-ink); }
.tz-floor { position: absolute; inset: 0; background: url(../img/terrazzo/chips.svg) 0 0 / 520px repeat, radial-gradient(80% 70% at 70% 45%, #fffaf2, var(--tz-bg) 70%); }
.tz-word { display: flex; align-items: center; gap: .28em; font: 700 clamp(48px, 5.6vw, 88px)/1 var(--tz-serif); letter-spacing: -0.025em; color: var(--tz-brand); }
.tz-word img { width: .92em; height: .92em; border-radius: 22%; box-shadow: 0 .06em .16em rgba(120, 60, 30, 0.22); }
.tz-slide .tagline { font: 600 clamp(26px, 2.5vw, 36px)/1.2 var(--tz-serif); color: var(--tz-ink); }
.tz-slide .line, .tz-slide .soon { color: var(--tz-muted); }
.tz-btn { background: var(--tz-accent); color: #fffdfb; box-shadow: 0 8px 20px -8px rgba(180, 96, 58, 0.6); }
.tz-btn:hover { background: var(--tz-accent-dark); }
.tz-ghost { background: rgba(168, 72, 42, 0.08); color: var(--tz-brand); }
.tz-ghost:hover { background: rgba(168, 72, 42, 0.14); }

.pieces { position: absolute; inset: 0; pointer-events: none; }
.pc {
  position: absolute; left: var(--x); top: var(--y); width: calc(var(--w) * 1vw); min-width: calc(var(--w) * 9px); height: auto;
  rotate: var(--r); filter: blur(var(--b, 0)) drop-shadow(0 18px 22px rgba(120, 70, 40, 0.18));
  translate: calc(var(--px, 0) * var(--d) * -36px) calc(var(--py, 0) * var(--d) * -36px);
  animation: bob 7s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -9s);
  transition: translate 1.2s var(--ease);
}
@keyframes bob { from { transform: translateY(-10px); } to { transform: translateY(12px); } }

.screens { position: relative; height: min(66vh, 640px); aspect-ratio: 1.1; justify-self: center; display: grid; place-items: center; }
.scr { position: absolute; height: 100%; width: auto; aspect-ratio: 540 / 1168; object-fit: cover; border-radius: 30px; background: #eadbc8; box-shadow: 0 40px 70px -30px rgba(80, 45, 25, 0.45), 0 0 0 1px rgba(80, 45, 25, 0.06); }
.scr-c { z-index: 2; }
.scr-l, .scr-r { height: 82%; filter: saturate(.92); transition: translate 1.1s var(--ease), rotate 1.1s var(--ease); }
.scr-l { translate: -58% 4%; rotate: -7deg; }
.scr-r { translate: 58% 4%; rotate: 7deg; }
.tz-slide:not(.is-on) .scr-l { translate: -30% 6%; rotate: -2deg; }
.tz-slide:not(.is-on) .scr-r { translate: 30% 6%; rotate: 2deg; }

/* Increfarma's scene: the farm itself, full size, in the season of the day */
.fm-slide { color: var(--fm-ink); background: #9cc36a; }
.fm-farm, .fm-farm img { position: absolute; inset: 0; width: 100%; height: 100%; }
.fm-farm img { object-fit: cover; }
.fm-live { position: absolute; inset: 0; }
.fm-haze { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(64% 86% at 6% 46%, rgba(255, 249, 233, 0.94) 0%, rgba(255, 249, 233, 0.76) 38%, rgba(255, 249, 233, 0) 72%), linear-gradient(to bottom, rgba(255, 249, 233, 0.6), rgba(255, 249, 233, 0) 18%); }
.fm-word img { width: clamp(270px, 30vw, 450px); height: auto; margin: -3% 0 -2% -3%; filter: drop-shadow(0 14px 18px rgba(60, 40, 10, 0.18)); }
/* the farm answers taps (hearts, puffs, sparkles) everywhere but on the words */
.fm-slide .slide-in { pointer-events: none; }
.fm-slide .copy { pointer-events: auto; }
.fm-slide .tagline { font: 800 clamp(28px, 2.7vw, 40px)/1.12 var(--fm-round); letter-spacing: -0.01em; color: var(--fm-ink); }
.fm-slide .line { font-family: var(--fm-round); color: var(--fm-muted); font-weight: 500; }
.fm-slide .soon { font-family: var(--fm-round); color: var(--fm-muted); }
.fm-btn { background: var(--fm-leaf); color: var(--fm-on-leaf); font-family: var(--fm-round); box-shadow: 0 8px 20px -8px rgba(35, 69, 45, 0.6); }
.fm-btn:hover { background: var(--fm-leaf-dark); }

/* the game picker along the bottom */
.picker { position: absolute; z-index: 5; left: 0; right: 0; bottom: clamp(18px, 4vh, 40px); display: flex; justify-content: center; gap: clamp(8px, 2vw, 28px); }
.picker button { position: relative; flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px 16px 10px; border-radius: 16px; opacity: .55; transition: opacity .3s; }
.picker button:hover, .picker [aria-selected="true"] { opacity: 1; }
.picker img { width: 46px; height: 46px; border-radius: 12px; box-shadow: 0 6px 14px -6px rgba(60, 40, 20, 0.45); transition: scale .4s var(--ease); }
.picker [aria-selected="true"] img { scale: 1.08; }
.picker span { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); }
.picker .bar { position: absolute; left: 10px; right: 14px; bottom: 6px; height: 3px; border-radius: 3px; background: rgba(44, 33, 25, 0.14); overflow: hidden; }
.picker .bar::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; scale: 0 1; }
.picker [aria-selected="true"] .bar::after { scale: 1 1; }
.show[data-playing] .picker [aria-selected="true"] .bar::after { animation: fill var(--slide-ms, 8000ms) linear forwards; }
.show[data-paused] .picker [aria-selected="true"] .bar::after { animation-play-state: paused; }
@keyframes fill { from { scale: 0 1; } to { scale: 1 1; } }

/* ------------------------------------------------------------------------------------------------ sections */

.reveal { transition: opacity .9s var(--ease), translate 1s var(--ease); }
.js .reveal:not(.in) { opacity: 0; translate: 0 28px; }

.intro { padding: clamp(56px, 9vw, 120px) var(--gutter) clamp(72px, 10vw, 140px); text-align: center; }
.intro h2 { max-width: 15ch; margin: 0 auto; font-weight: 800; font-size: clamp(44px, 7vw, 104px); line-height: .96; letter-spacing: -0.045em; font-variation-settings: "opsz" 96; color: var(--ink); text-wrap: balance; }
.intro p { max-width: 34em; margin: 26px auto 0; font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); text-wrap: pretty; transition-delay: .1s; }

.game { position: relative; overflow: hidden; }
.game-in {
  max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(80px, 10vw, 150px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 110px); align-items: center;
}
.game-copy > p:first-of-type { margin-top: 24px; max-width: 31em; font-size: 19px; text-wrap: pretty; }
.game-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 34px; }
.game-links span { font-size: 14px; }
.go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid currentColor; }
.go::after { content: "→"; transition: translate .25s var(--ease); }
.go:hover::after { translate: 4px 0; }

/* Terrazzo */
.tz { background: url(../img/terrazzo/chips.svg) 0 0 / 520px repeat, var(--tz-bg); color: var(--tz-ink); }
.tz .tz-word { font-size: clamp(44px, 4.6vw, 70px); }
.tz .game-copy > p:first-of-type { color: var(--tz-ink); }
.tz .go { color: var(--tz-brand); }
.tz .game-links span { color: var(--tz-muted); }
.worlds { display: grid; grid-template-columns: repeat(7, 52px); gap: 10px; margin-top: 34px; }
.worlds button { position: relative; width: 52px; height: 52px; border-radius: 15px; transition: translate .25s var(--ease); }
.worlds img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; box-shadow: 0 4px 10px -4px rgba(80, 45, 25, 0.4); }
.worlds button::after { content: ""; position: absolute; inset: -5px; border-radius: 19px; box-shadow: inset 0 0 0 2.5px var(--tz-brand); opacity: 0; scale: .9; transition: opacity .25s, scale .3s var(--ease); }
.worlds button:hover { translate: 0 -3px; }
.worlds [aria-selected="true"]::after { opacity: 1; scale: 1; }
.world-now { margin-top: 20px; min-height: 3.2em; font-size: 16px; color: var(--tz-muted); max-width: 30em; }
.world-now b { font: 700 19px var(--tz-serif); color: var(--tz-brand); margin-right: 6px; }
.world-stage { --h: clamp(520px, 50vw, 660px); position: relative; height: var(--h); display: grid; place-items: center; }
.world-glow { position: absolute; width: min(100%, calc(var(--h) * .98)); aspect-ratio: 1; border-radius: 50%; background: var(--tint, #e0ccac); opacity: .6; transition: background-color .8s var(--ease); }
.world-screen { position: relative; height: var(--h); width: auto; aspect-ratio: 540 / 1168; object-fit: cover; border-radius: 36px; background: #eadbc8; box-shadow: 0 50px 80px -36px rgba(80, 45, 25, 0.5), 0 0 0 1px rgba(80, 45, 25, 0.06); transition: opacity .35s; }
.world-screen.is-swapping { opacity: .35; }

/* Increfarma */
.tz .game-in { padding-bottom: calc(clamp(80px, 10vw, 150px) + var(--hill)); }
.fm { z-index: 1; margin-top: calc(var(--hill) * -1); border-radius: 50% 50% 0 0 / var(--hill) var(--hill) 0 0; background: radial-gradient(70% 60% at 85% 20%, #f7f9e4, rgba(247, 249, 228, 0) 70%), var(--fm-meadow); color: var(--fm-ink); }
.fm .game-in { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.fm .fm-word img { width: clamp(250px, 26vw, 400px); }
.fm .game-copy > p:first-of-type { margin-top: 14px; font-family: var(--fm-round); font-size: 19px; color: var(--fm-ink); }
.fm .go { color: var(--fm-leaf); font-family: var(--fm-round); }
.fm .game-links span { color: var(--fm-muted); font-family: var(--fm-round); }
.shots-stage { position: relative; }
.shots { margin: 0; }
.shot-pics { position: relative; aspect-ratio: 4 / 3; border-radius: 30px; overflow: hidden; background: #b9d58f; box-shadow: 0 50px 80px -40px rgba(35, 69, 45, 0.55); }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; scale: 1.04; transition: opacity 1s var(--ease), scale 6s linear; }
.shot.is-on { opacity: 1; scale: 1; }
.shots figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; font: 700 17px/1.3 var(--fm-round); color: var(--fm-ink); }
.dots { display: flex; gap: 8px; flex: none; }
.dots button { width: 9px; height: 9px; border-radius: 50%; background: rgba(36, 61, 45, 0.22); transition: background-color .3s, scale .3s; }
.dots button:hover { scale: 1.3; }
.dots [aria-pressed="true"] { background: var(--fm-leaf); scale: 1.25; }
.goods { position: absolute; inset: 0; pointer-events: none; }
.goods img {
  position: absolute; left: var(--x); top: var(--y); width: calc(var(--s) * clamp(56px, 7vw, 104px)); height: auto;
  filter: drop-shadow(0 12px 14px rgba(40, 60, 20, 0.25));
  translate: 0 calc(var(--sy, 0) * var(--d) * -60px);
  animation: float 5.5s ease-in-out infinite alternate; animation-delay: var(--t);
}
@keyframes float { from { transform: translateY(-8px) rotate(-6deg); } to { transform: translateY(8px) rotate(5deg); } }

/* the studio and its logos */
.studio {
  max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(90px, 11vw, 160px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 110px); align-items: center;
}
.family { display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 2vw, 32px); }
.badge { position: relative; display: block; width: clamp(150px, 20vw, 270px); text-decoration: none; transition: translate .4s var(--ease); }
.badge:hover { translate: 0 -8px; }
.badge img, .badge video { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; }
.badge video { position: absolute; inset: 0; opacity: 0; }
.badge video.on { opacity: 1; }
.badge.moving .logo-still { opacity: 0; }
.badge-name { display: block; margin-top: 6px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.studio-copy h2 { text-wrap: balance; font-weight: 800; font-size: clamp(40px, 4.8vw, 68px); line-height: 1; letter-spacing: -0.04em; font-variation-settings: "opsz" 96; color: var(--soil); }
.studio-copy p { margin-top: 24px; font-size: 19px; color: var(--ink); max-width: 30em; text-wrap: pretty; }

/* the way out */
.contact { background: var(--night); color: var(--on-night); text-align: center; }
.contact-in { max-width: 900px; margin: 0 auto; padding: clamp(90px, 11vw, 150px) var(--gutter) clamp(60px, 7vw, 90px); }
.contact h2 { font-weight: 800; font-size: clamp(44px, 6.6vw, 96px); line-height: .98; letter-spacing: -0.045em; font-variation-settings: "opsz" 96; text-wrap: balance; }
.contact p { margin-top: 20px; font-size: clamp(18px, 1.6vw, 21px); color: var(--on-night-muted); }
.mail { display: inline-block; margin-top: 36px; padding: 4px 10px; border-radius: 10px; font-weight: 700; font-size: clamp(24px, 3vw, 38px); letter-spacing: -0.02em; color: var(--sun); text-decoration: none; }
.social { list-style: none; margin: 38px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.social a { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--on-night); background: rgba(247, 236, 220, 0.08); transition: background-color .25s, color .25s, translate .25s var(--ease); }
.social a:hover { background: var(--sun); color: var(--night); translate: 0 -3px; }
.social svg { width: 22px; height: 22px; fill: currentColor; }

.foot {
  background: var(--night); color: var(--on-night-muted); font-size: 14px;
  padding: 26px var(--gutter) calc(30px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px;
  border-top: 1px solid rgba(247, 236, 220, 0.1);
}
.foot-games { display: flex; gap: 20px; }
.foot a { color: var(--on-night); text-decoration: none; padding: 1px 6px; border-radius: 6px; }
.foot a:hover { text-decoration: underline; }
.foot a.quiet { padding: 0; text-decoration: underline; color: inherit; }

/* the legal page: one quiet column under a plain header */
.page .top { position: sticky; background: var(--paper); box-shadow: 0 1px 0 rgba(91, 59, 37, 0.1); }
.doc { max-width: calc(680px + 2 * var(--gutter)); min-height: calc(100vh - var(--top-h) - 80px); min-height: calc(100svh - var(--top-h) - 80px); margin: 0 auto; padding: clamp(56px, 9vw, 110px) var(--gutter) clamp(80px, 11vw, 150px); }
.doc h1 { font-weight: 800; font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -0.04em; font-variation-settings: "opsz" 96; color: var(--soil); }
.doc .lead { margin-top: 18px; font-size: 20px; color: var(--muted); }
.doc h2 { margin: 48px 0 12px; font-weight: 700; font-size: 22px; letter-spacing: -0.015em; }
.doc p + p { margin-top: 14px; }
.doc a { color: var(--soil); font-weight: 600; }
.lost .go { margin-top: 22px; text-decoration: none; }

/* the Terrazzo trailer */
.trailer { padding: 0; border: 0; background: none; overflow: visible; max-width: none; max-height: none; }
.trailer::backdrop { background: rgba(28, 20, 14, 0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.trailer video:focus { outline: none; }
.trailer video { height: min(86vh, 860px); width: auto; aspect-ratio: 540 / 1170; border-radius: 26px; background: #000; }
.trailer .close { position: absolute; top: -6px; right: -60px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); color: #fff; }
.trailer .close:hover { background: rgba(255, 255, 255, 0.26); }
.trailer .close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }

/* ------------------------------------------------------------------------------------------------ smaller screens */

@media (max-width: 980px) {
  .game-in, .fm .game-in, .studio { grid-template-columns: minmax(0, 1fr); }
  .fm .shots-stage { order: 2; }
  .world-stage { --h: min(128vw, 580px); }
  .studio-copy { text-align: center; }
  /* Terrazzo on one column: the screen sits between the words and the worlds that change it */
  .tz .game-in { row-gap: 0; }
  .tz .game-copy { display: contents; }
  .tz .game-copy > * { order: 1; }
  .tz .world-stage { order: 2; margin-top: 40px; }
  .tz .worlds, .tz .world-now, .tz .game-links { order: 3; }
  .studio-copy p { margin-left: auto; margin-right: auto; }
}

@media (max-width: 760px) {
  :root { --top-h: 64px; }
  body { font-size: 17px; }
  .tiles { width: 42px; height: 48px; }
  .word { font-size: 20px; }
  .nav { gap: 16px; }
  .nav a { font-size: 15px; }
  .nav a[href$="#games"] { display: none; }

  .show { min-height: 600px; }
  .slide-in { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; gap: 18px; padding-top: calc(var(--top-h) + 16px); padding-bottom: 104px; text-align: center; }
  .copy { margin: 0 auto; }
  .tz-word { justify-content: center; font-size: clamp(40px, 12vw, 56px); }
  .tz-slide .tagline { font-size: 22px; margin-top: 10px; }
  .line { font-size: 16px; }
  .acts { justify-content: center; margin-top: 18px; }
  .btn { height: 46px; padding: 0 20px; font-size: 15px; }
  .soon { margin-top: 10px; font-size: 13px; }
  .screens { height: 100%; max-height: 46svh; aspect-ratio: auto; width: 100%; align-self: stretch; }
  .scr { height: 100%; max-height: 100%; border-radius: 22px; }
  .scr-l, .scr-r { height: 80%; }
  .scr-l { translate: -54% 6%; } .scr-r { translate: 54% 6%; }
  .pc { width: calc(var(--w) * 1.9vw); min-width: 0; }
  .pc:nth-child(-n+3) { display: none; }
  .pc:nth-child(4) { top: 9%; left: 86%; }
  .pc:nth-child(6) { top: 64%; left: -4%; }

  .fm-slide .slide-in { grid-template-rows: auto; }
  .fm-haze { background: linear-gradient(to bottom, rgba(255, 249, 233, 0.96) 0%, rgba(255, 249, 233, 0.9) 46%, rgba(255, 249, 233, 0) 72%); }
  .fm-word img { width: min(76vw, 340px); margin: 0 auto -2%; }
  /* the farm answers taps (hearts, puffs, sparkles) everywhere but on the words */
.fm-slide .slide-in { pointer-events: none; }
.fm-slide .copy { pointer-events: auto; }
.fm-slide .tagline { font-size: 25px; }

  .picker { gap: 4px; bottom: 14px; }
  .picker button { gap: 9px; padding: 8px 10px 14px 8px; }
  .picker img { width: 38px; height: 38px; border-radius: 10px; }
  .picker span { font-size: 15px; }

  .game-copy { text-align: left; }
  .worlds { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
  .worlds button { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; }
  .goods img { width: calc(var(--s) * 54px); }
  .shot-pics { border-radius: 22px; }
  .shots figcaption { font-size: 15px; }
  .badge { width: 42vw; }
  .trailer video { height: auto; width: min(88vw, 420px); max-height: 80vh; }
  .trailer .close { top: auto; bottom: -58px; right: 50%; translate: 50% 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal:not(.in) { opacity: 1; translate: none; }
}
