/* the game's palette, from lawfulevil/scripts/pal.gd */
:root {
  --tan: #e0b98e;
  --apricot: #fed8b1;
  --papaya: #ffefd5;
  --camel: #c19a6b;
  --coffee: #6f4e37;
  --coffeeUp: #5a3e2b;
  --tanDn: #d6ae80;
  --dim: #9c7a58;
  --soft: #7f5e45;
  --shadow: #5e3a003f;
  /* the game's drop: hard, down and to the right */
  --drop: 4px 4px 0 var(--shadow);
  --dropBig: 6px 6px 0 var(--shadow);

  /* one scale for everything: text, then space, then widths */
  --tSm: 0.9rem; /* meta: subtitles, notes, the footer */
  --tMd: 1.125rem; /* reading text and buttons */
  --tLg: 1.375rem; /* small headings */
  --tXl: clamp(1.75rem, 3vw, 2.25rem); /* section headings */
  --tXxl: clamp(2.25rem, 5vw, 3rem); /* the closing heading */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2.5rem;
  --s5: 4rem;
  --s6: 6rem;
  --wide: 1000px;
  --narrow: 760px;
  --round: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tan);
  color: var(--coffee);
  font: 400 var(--tMd) / 1.6 "Shantell Sans", system-ui, sans-serif;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Darumadrop One", "Shantell Sans", sans-serif;
  font-weight: 400;
  line-height: 1.15;
}

a {
  color: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* a boiling icon holds one layer per frame and shows one (site.js) */
.icon.boil {
  position: relative;
  background: none;
}

.icon.boil span {
  position: absolute;
  inset: 0;
  background: currentColor;
  mask: center / contain no-repeat;
  -webkit-mask: center / contain no-repeat;
  opacity: 0;
}

.icon.boil span.on {
  opacity: 1;
}

/* an icon is a mask, so its frames are drawn once in white and take any colour */
.icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  background: currentColor;
  mask: center / contain no-repeat;
  -webkit-mask: center / contain no-repeat;
}

/* cursor (site.js), only once a mouse has moved */

html.own,
html.own * {
  cursor: none !important;
}

.cur {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  pointer-events: none;
  will-change: transform;
}

.cur .art {
  position: absolute;
}

/* the art is baked papaya with its shadow, 140px for a 128px shape: 4x the 32px it shows at */
.cur img {
  position: absolute;
  width: 35px;
  height: 35px;
  max-width: none;
}

/* buttons */

.btn {
  display: inline-block;
  padding: 0.8rem 1.9rem;
  border-radius: 100px;
  font-size: var(--tMd);
  background: var(--apricot);
  color: var(--coffee);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--drop);
}

/* the game's rule: anything you can press goes papaya under the pointer, and a
   coffee one takes coffee type with it. a flip, never a move or a fade */
.btn:hover,
.btn:focus-visible,
.btn:active {
  background: var(--papaya);
  color: var(--coffee);
}

:focus-visible {
  outline: 3px solid var(--coffee);
  outline-offset: 3px;
}

.btn.main {
  background: var(--coffee);
  color: var(--apricot);
}

.btn.main:hover,
.btn.main:focus-visible,
.btn.main:active {
  background: var(--papaya);
  color: var(--coffee);
}

/* hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  padding: var(--s5) 16px var(--s6);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* the scene and its fade are layers, so site.js can slide the scene slower than the page; the words stay put */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero::before {
  inset: -12% -3% -3%;
  background: url("assets/hero.webp") center / cover;
  translate: var(--dx, 0px) calc(var(--deep, 0px) + var(--dy, 0px));
}

.hero::after {
  background: linear-gradient(
    #e0b98e26 0%,
    #e0b98e40 35%,
    #e0b98e80 65%,
    #e0b98ecc 82%,
    var(--tan) 94%
  );
}

.hero h1 img {
  width: min(560px, 86vw);
  filter: drop-shadow(6px 6px 0 var(--shadow));
}

.tag {
  max-width: 34rem;
  margin: 0;
}

.btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
}

.arrow {
  position: absolute;
  bottom: var(--s3);
  color: var(--coffee);
  animation: bob 1.6s ease-in-out infinite;
}

.arrow:hover {
  color: var(--papaya);
}

.arrow .icon {
  width: 2.5rem;
  height: 2.5rem;
}

@keyframes bob {
  50% {
    translate: 0 8px;
  }
}

/* description: one strip of film after another, swapping sides */

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: var(--s5) 16px 0;
}

h2 small {
  display: block;
  margin-top: 0.25rem;
  font-family: "Shantell Sans", sans-serif;
  font-size: var(--tSm);
  color: var(--soft);
}

/* each clip leans a little, with the drop */
.feat video,
.end video {
  width: 100%;
  height: auto;
  aspect-ratio: 936 / 390;
  /* fill the box: some clips are 388 tall, and a letterbox shows a light hairline above the drop */
  object-fit: cover;
  border-radius: var(--round);
  box-shadow: var(--dropBig);
  rotate: -1.2deg;
}

.feat {
  display: grid;
  grid-template-columns: 11fr 13fr;
  align-items: center;
  gap: var(--s4);
  margin-bottom: var(--s6);
}

.feat:nth-of-type(even) {
  grid-template-columns: 13fr 11fr;
}

.feat:nth-of-type(even) video {
  order: 1;
  rotate: 1.2deg;
}

.feat h2 {
  font-size: var(--tXl);
}

.feat p {
  margin: var(--s2) 0 0;
}

.end {
  max-width: var(--narrow);
  margin: 0 auto var(--s5);
  text-align: center;
}

.end video {
  rotate: 0.8deg;
}

/* the note takes no width of its own either */
.end .note {
  contain: inline-size;
  margin-top: var(--s4);
  text-align: left;
}

/* as wide as the heading: the line under it takes no width of its own */
.end .fit {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.end h2 {
  margin: var(--s5) 0 var(--s3);
  font-size: var(--tXxl);
}

.end .fit > p {
  contain: inline-size;
  margin: var(--s3) 0 0;
  text-align: justify;
  text-align-last: center;
  font-size: var(--tSm);
  color: var(--soft);
}

@media (max-width: 760px) {
  .feat,
  .feat:nth-of-type(even) {
    grid-template-columns: 1fr;
    gap: var(--s3);
    margin-bottom: var(--s5);
  }
  .feat:nth-of-type(even) video {
    order: 0;
  }
}

.note {
  padding: var(--s3);
  border: 2px dashed var(--camel);
  border-radius: var(--round);
  font-size: var(--tSm);
  color: var(--soft);
}

.note h3 {
  font-size: var(--tLg);
  color: var(--coffee);
}

.note p {
  margin: var(--s1) 0 0;
}

/* footer */

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  max-width: calc(var(--wide) - 32px);
  margin: 0 auto;
  padding: var(--s3) 0 var(--s4);
  border-top: 2px solid var(--tanDn);
  font-size: var(--tSm);
}

footer p {
  margin: 0;
}

footer p a {
  display: inline-block;
  margin: -0.6rem -0.4rem;
  padding: 0.6rem 0.4rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

footer p a:hover {
  background: var(--papaya);
}

.socials {
  display: flex;
  gap: 0.5rem;
}

.socials a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  color: var(--coffee);
}

.socials a:hover,
.socials a:focus-visible {
  background: var(--papaya);
}

.socials .icon {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 560px) {
  footer {
    flex-direction: column;
  }
  /* justified lines this narrow open up rivers between the words */
  .end .fit > p {
    text-align: center;
  }
}

/* 404: every path that is not a page lands here, so everything it loads is absolute */

.lost {
  min-height: 70svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
}

.lost h1 {
  font-size: clamp(5rem, 18vw, 9rem);
}

/* press kit: same paper, nothing moving */

.kit {
  max-width: var(--wide);
}

.kit .top {
  margin-bottom: var(--s5);
  text-align: center;
}

.kit .top h1 {
  font-size: var(--tXxl);
}

.kit .top p {
  margin: var(--s1) 0 0;
  color: var(--soft);
}

.kit .me {
  max-width: 40rem;
  margin: var(--s5) auto;
  text-align: center;
}

.kit .me p {
  margin: 0 0 var(--s3);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s3);
}

.grid a {
  display: block;
  text-decoration: none;
  font-size: var(--tSm);
  color: var(--soft);
}

.grid b {
  color: var(--coffee);
}

.grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: var(--s1);
  border-radius: 12px;
  box-shadow: var(--drop);
}

.grid img.fit {
  object-fit: contain;
  background: var(--coffee);
}

.grid a:hover img {
  outline: 4px solid var(--papaya);
}

.grid a:hover,
.grid a:hover b {
  color: var(--coffee);
}


@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .arrow {
    animation: none;
  }
}
