/* tidalteacup.com. One page, read top to bottom as a dive into a teacup: every section is a depth in centimetres
   and a flat colour from the game's palette (Resurrect 64). Text is the game's own pixel font, Brisket (crisp at
   8 px and whole multiples; the bold at 16 px and multiples). Pixel art is enlarged with image-rendering: pixelated,
   never smoothed. Outlines are box-shadows without corner pixels, so every box has the game's stepped corners. */

@font-face { font-family: "Brisket"; src: url("/fonts/brisket.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Brisket Bold"; src: url("/fonts/brisket_bold.ttf") format("truetype"); font-display: swap; }

:root {
  --ink: #2e222f; --coal: #3e3546; --cream: #fdcbb0; --peach: #fca790; --white: #ffffff; --mist: #c7dcd0;
  --khaki: #ab947a; --purple: #6b3e75; --plum: #45293f; --violet: #905ea9;
  --turquoise: #0eaf9b; --shield: #30e1b9; --aqua: #8ff8e2; --teal: #0b8a8f; --deepteal: #0b5e65;
  --hotpink: #f04f78; --raspberry: #c32454; --pink: #ed8099; --salmon: #f68181;
  --gold: #fbb954; --yellow: #f9c22b; --amber: #f79617; --apricot: #e6904e; --lemon: #fbff86;
  --cobalt: #4d65b4; --blue: #4d9be6; --sky: #8fd3ff; --navy: #323353; --indigo: #484a77; --lavender: #a884f3;
  --lime: #91db69; --jade: #1ebc73;
  --p: 3px;                                  /* one art pixel of outlines and bevels */
  --body: 24px; --line: 36px; --head: 48px; --small: 16px;
}
@media (max-width: 760px) {
  :root { --p: 2px; --body: 16px; --line: 24px; --head: 32px; --small: 16px; }
}

* { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; }
body {
  position: relative; margin: 0; color: var(--cream); background: var(--ink);
  font: var(--body)/var(--line) "Brisket", ui-monospace, monospace;
  -webkit-font-smoothing: none; text-rendering: optimizeSpeed;
}
img, canvas, video { image-rendering: pixelated; display: block; }
h1, h2, h3 { font-family: "Brisket Bold", "Brisket", monospace; font-weight: normal; margin: 0 0 24px; }
h1, h2 { font-size: var(--head); line-height: calc(var(--head) * 1.25); }
h3 { font-size: 32px; line-height: 40px; margin-bottom: 12px; }
p { margin: 0 0 24px; }
a { color: inherit; text-decoration-thickness: var(--p); text-underline-offset: 6px; }
b, strong, em { font-family: "Brisket Bold", "Brisket", monospace; font-weight: normal; font-style: normal;
  font-size: 1em; }
small { font-size: var(--small); }
:focus-visible { outline: var(--p) dashed var(--lemon); outline-offset: 6px; }
@media (max-width: 760px) { h3 { font-size: 16px; line-height: 24px; } }

.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--lemon); color: var(--ink);
  padding: 6px 12px; }
.skip:focus { top: 12px; }

/* the stepped pixel outline: four shadows, no corners */
.btn, .tag::before, .stickers li, .telly, .channel, .features figure, .features figcaption, .mug, .shot img,
.receipt, .gauge, .keyart .badge, .about img, .lightbox img {
  --edge: var(--ink);
  box-shadow: 0 calc(-1 * var(--p)) 0 0 var(--edge), 0 var(--p) 0 0 var(--edge),
              calc(-1 * var(--p)) 0 0 0 var(--edge), var(--p) 0 0 0 var(--edge);
}

section, header, footer { padding: 48px 24px 72px; position: relative; }
section > *, header > *, footer > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

.tag { font-size: var(--small); line-height: 24px; text-transform: uppercase; margin-bottom: 24px; display: flex;
  align-items: center; gap: 12px; color: var(--accent, var(--cream)); }
.tag::before { content: ""; width: 36px; height: var(--p); background: currentColor; --edge: transparent; }

.btn {
  display: inline-block; font: 32px/32px "Brisket Bold", monospace; text-decoration: none; cursor: pointer;
  padding: 18px 24px 21px; margin: 0 18px 18px 0; color: var(--ink); background: var(--gold); border: 0;
  --hi: var(--lemon); --lo: var(--amber);
  box-shadow: inset 0 var(--p) 0 var(--hi), inset 0 calc(-2 * var(--p)) 0 var(--lo),
              0 calc(-1 * var(--p)) 0 0 var(--ink), 0 calc(3 * var(--p)) 0 0 var(--ink),
              calc(-1 * var(--p)) 0 0 0 var(--ink), var(--p) 0 0 0 var(--ink);
  transform: translateY(0);
}
.btn:hover { --hi: var(--white); }
.btn:active { transform: translateY(calc(2 * var(--p)));
  box-shadow: inset 0 var(--p) 0 var(--hi), inset 0 calc(-2 * var(--p)) 0 var(--lo),
              0 calc(-1 * var(--p)) 0 0 var(--ink), 0 var(--p) 0 0 var(--ink),
              calc(-1 * var(--p)) 0 0 0 var(--ink), var(--p) 0 0 0 var(--ink); }
.btn.hot { background: var(--hotpink); --hi: var(--pink); --lo: var(--raspberry); }
.btn.hot:hover { --hi: var(--peach); }
.btn.cream { background: var(--cream); --hi: var(--white); --lo: var(--peach); }
.btn small { font-family: "Brisket", monospace; margin-left: 9px; }
@media (max-width: 760px) { .btn { font-size: 16px; line-height: 16px; padding: 12px 16px 14px; margin: 0 12px 16px 0; } }
.actions { margin-top: 36px; }

/* 0 cm: the surface, the intro playing on ink */
.surface { padding-top: 24px; text-align: center; --accent: var(--sky); }
.stage { position: relative; max-width: 1280px; }
.stage canvas, .stage .still { width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); }
.replay { position: absolute; right: 12px; bottom: 12px; font: var(--small)/24px "Brisket", monospace;
  color: var(--cream); background: var(--coal); border: 0; padding: 6px 12px; cursor: pointer; }
.replay:hover { background: var(--purple); }
@media (max-width: 760px) { .replay { position: static; margin: 12px auto 0; display: block; } .replay[hidden] { display: none; } }
.surface h1 { max-width: 900px; margin-top: 12px; color: var(--white); }
.surface h1 em { color: var(--aqua); }
.surface .lede { color: var(--cream); }
.surface .actions { margin-top: 24px; }

/* the waves between depths, drawn by site.js */
.wave { width: 100%; height: 48px; margin: -1px 0; position: relative; z-index: 1; }
@media (max-width: 760px) { .wave { height: 32px; } }

/* 2 cm: the game */
.brewing { background: var(--purple); --accent: var(--gold); }
.brewing .keyart { position: relative; margin-bottom: 48px; }
.keyart .art { width: 100%; height: auto; box-shadow: 0 0 0 var(--p) var(--ink), 0 calc(4 * var(--p)) 0 var(--p) var(--plum); }
.keyart .logo { position: absolute; left: 3%; top: 5%; width: 45.8%; height: auto; }
.keyart .badge { position: absolute; right: 3%; bottom: 6%; margin: 0; background: var(--ink); color: var(--gold);
  font: var(--small)/24px "Brisket", monospace; text-transform: uppercase; padding: 6px 12px; }
@media (max-width: 760px) { .keyart .badge { display: none; } }
.pitch { max-width: 900px; margin-left: 0; }
.brewing .pitch { margin: 0 auto; }
.brewing h2 { color: var(--gold); }
.tagline { font-family: "Brisket Bold", monospace; color: var(--white); }
.stickers { list-style: none; padding: 0; margin-top: 24px; display: flex; flex-wrap: wrap; gap: 24px 18px; }
.stickers li { padding: 6px 15px; text-transform: uppercase; font-size: var(--body); line-height: var(--line);
  color: var(--ink); background: var(--cream); }
.stickers .k1 { background: var(--gold); transform: translateY(6px); }
.stickers .k2 { background: var(--aqua); }
.stickers .k3 { background: var(--pink); transform: translateY(9px); }
.stickers .k4 { background: var(--lime); transform: translateY(-3px); }
.stickers .k5 { background: var(--sky); transform: translateY(6px); }
.stickers .k6 { background: var(--cream); }

/* 3 cm: the trailers in a telly */
.trailers { background: var(--turquoise); color: var(--ink); --accent: var(--ink); }
.trailers h2 { color: var(--ink); }
.telly { background: var(--ink); padding: 12px; max-width: 1100px; }
.telly video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); }
.channels { display: flex; gap: 18px; margin-top: 24px; flex-wrap: wrap; }
.channel { font: var(--body)/var(--line) "Brisket", monospace; color: var(--ink); background: var(--aqua); border: 0;
  padding: 6px 18px; cursor: pointer; }
.channel.on { background: var(--ink); color: var(--aqua); }
.channel small { opacity: .8; margin-left: 6px; }

/* 4 cm: how it plays */
.play { background: var(--hotpink); color: var(--ink); --accent: var(--ink); }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 48px; }
.features article { min-width: 0; }
.features figure { margin: 0 0 24px; position: relative; background: var(--ink); }
.features figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.features figcaption { position: absolute; left: 12px; bottom: -18px; background: var(--cream); color: var(--ink);
  padding: 3px 12px; font-size: var(--small); line-height: 24px; }
.features h3 { margin-top: 36px; }
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; }
.extras b { display: block; }
@media (max-width: 860px) { .features, .extras { grid-template-columns: 1fr; } }

/* 5 cm: the crew, in a line-up */
.crew { background: var(--gold); color: var(--ink); --accent: var(--ink); }
.mugs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.mug { margin: 0; background: var(--cream); padding: 24px; cursor: default; }
.mug canvas { width: 100%; max-width: 256px; height: auto; aspect-ratio: 1; margin: 0 auto 24px;
  background: repeating-linear-gradient(to bottom, var(--peach) 0 var(--p), var(--cream) var(--p) 24px); }
.mug figcaption b { display: block; font-size: 32px; line-height: 40px; margin-bottom: 6px; }
@media (max-width: 760px) { .mug figcaption b { font-size: 16px; line-height: 24px; } }
@media (max-width: 960px) { .mugs { grid-template-columns: 1fr; max-width: 560px; } }

/* 6 cm: screenshots */
.shots { background: var(--cobalt); color: var(--white); --accent: var(--sky); }
.gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 30px; }
.gallery p { margin: 15px 0 0; font-size: var(--small); line-height: 24px; color: var(--sky); }
.shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.shot:hover img, .shot:focus-visible img { --edge: var(--lemon); }
@media (max-width: 960px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

/* 7 cm: the studio */
.studio { background: var(--deepteal); color: var(--aqua); --accent: var(--shield); }
.studio h2 { color: var(--white); }
.about { display: grid; grid-template-columns: 256px 1fr; gap: 48px; align-items: center; }
.about img { width: 256px; height: 256px; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about img { width: 192px; height: 192px; } }

/* 8 cm: press, on a receipt */
.press { background: var(--indigo); --accent: var(--lavender); }
.press h2 { color: var(--white); }
.facts { background: var(--cream); color: var(--ink); max-width: 640px; margin: 0 0 36px; padding: 18px 24px 24px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 96% 100%, 92% calc(100% - 12px), 88% 100%, 84% calc(100% - 12px),
    80% 100%, 76% calc(100% - 12px), 72% 100%, 68% calc(100% - 12px), 64% 100%, 60% calc(100% - 12px), 56% 100%,
    52% calc(100% - 12px), 48% 100%, 44% calc(100% - 12px), 40% 100%, 36% calc(100% - 12px), 32% 100%,
    28% calc(100% - 12px), 24% 100%, 20% calc(100% - 12px), 16% 100%, 12% calc(100% - 12px), 8% 100%,
    4% calc(100% - 12px), 0 100%); }
.press .facts { margin-left: auto; margin-right: auto; }
.facts div { display: flex; justify-content: space-between; gap: 24px; padding: 9px 0;
  border-bottom: var(--p) dashed var(--khaki); }
.facts div:last-child { border-bottom: 0; padding-bottom: 18px; }
.facts dt { text-transform: uppercase; }
.facts dd { margin: 0; text-align: right; font-family: "Brisket Bold", monospace; }
.press .actions, .press .note { max-width: 640px; }
.note { font-size: var(--small); line-height: 24px; color: var(--lavender); }
@media (max-width: 560px) { .facts div { flex-direction: column; gap: 0; } .facts dd { text-align: left; } }

/* 9 cm: the bottom of the cup, white porcelain and tea leaves */
.bottom { background: var(--white); color: var(--ink); text-align: center; --accent: var(--teal); padding-bottom: 96px; }
.bottom .tag { justify-content: center; }
.leaves { height: 168px; margin-bottom: 24px; }
.leaves canvas { height: 100%; width: auto; margin: 0 auto; }
.fortune { font-size: var(--body); }
.fortune em { color: var(--raspberry); }
.mail { margin-top: 24px; margin-bottom: 9px; }
.follow { margin: 0; }
.small { font-size: var(--small); color: var(--khaki); margin-top: 48px; }

/* the depth gauge */
.gauge { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 30; background: var(--ink);
  color: var(--cream); padding: 12px 15px 12px 12px; font-size: var(--small); line-height: 24px; width: 196px; }
.gauge-now { margin: 0 0 9px; font-family: "Brisket Bold", monospace; font-size: 32px; line-height: 32px;
  color: var(--aqua); }
.ruler { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; }
.ruler::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: var(--p);
  background: var(--slate, #625565); }
.ruler li { position: relative; }
.ruler li::before { content: ""; position: absolute; left: -24px; top: 11px; width: 12px; height: var(--p);
  background: var(--cream); }
.ruler a { text-decoration: none; display: block; color: var(--cream); white-space: nowrap; }
.ruler a b { display: inline-block; width: 18px; color: var(--gold); }
.ruler a:hover, .ruler a.here { color: var(--aqua); }
.boat { position: absolute; left: 6px; top: 0; width: 24px; height: 18px; pointer-events: none;
  background: linear-gradient(var(--white), var(--white)) 9px 0 / 3px 9px no-repeat,
              linear-gradient(var(--white), var(--white)) 12px 3px / 6px 6px no-repeat,
              linear-gradient(var(--hotpink), var(--hotpink)) 3px 9px / 18px 6px no-repeat,
              linear-gradient(var(--raspberry), var(--raspberry)) 6px 15px / 12px 3px no-repeat; }
.pests { margin: 9px 0 0; color: var(--lime); }
@media (max-width: 1699px) {
  .gauge { width: auto; padding: 12px; }
  .gauge-now { font-size: 16px; line-height: 24px; }
  .ruler a { font-size: 0; }
  .ruler a b { font-size: var(--small); width: auto; }
}
@media (max-width: 1280px) {
  .gauge { right: 12px; top: auto; bottom: 12px; transform: none; width: auto; padding: 6px 12px; }
  .ruler, .boat { display: none; }
  .gauge-now { margin: 0; font-size: 16px; line-height: 24px; }
  .pests { margin: 0; }
}

/* the pests: the game's beetles crawl along the waves; click one */
.pest-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 25; }
.pest { position: absolute; left: 0; width: 96px; height: 96px; background: url("/img/beetle.png") 0 0 / 384px 576px;
  image-rendering: pixelated; cursor: crosshair; pointer-events: auto; }
.pop { position: absolute; z-index: 26; color: var(--lime); font: 32px/32px "Brisket Bold", monospace;
  pointer-events: none; text-shadow: 3px 3px 0 var(--ink); }
@media (max-width: 760px) { .pest { width: 48px; height: 48px; background-size: 192px 288px; } .pop { font-size: 16px; } }

/* screenshots, large */
.lightbox { border: 0; padding: 24px; background: transparent; max-width: 96vw; max-height: 96vh; color: var(--cream); }
.lightbox::backdrop { background: rgb(46 34 47 / .92); }
.lightbox img { width: min(1280px, 90vw); height: auto; aspect-ratio: 16 / 9; --edge: var(--cream); }
.lightbox p { margin: 18px 0 0; text-align: center; }
.close { position: absolute; right: 0; top: 0; font: 32px/32px "Brisket Bold", monospace; color: var(--cream);
  background: var(--ink); border: 0; width: 48px; height: 48px; cursor: pointer; }

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