/* Slow Bear Games. A seventies living room in the afternoon sun: a teal wall,
   walnut panelling, an orange wall at sunset, cut-paper art in frames, and the
   shadows the room casts. Fraunces (fonts/, served from this site) for headings
   and prose, monospace for labels and buttons. */

@font-face {
  font-family: 'Fraunces';
  src: url(fonts/fraunces-latin-full-normal.woff2) format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url(fonts/fraunces-latin-full-italic.woff2) format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --teal: #2a4f45;
  --teal-deep: #1d3a32;
  --orange: #dc6221;
  --mustard: #efa622;
  --brick: #b3432b;
  --red: #c8352b;
  --pink: #e8919c;
  --blue: #2d5c9e;
  --walnut: #5c3622;
  --walnut-dark: #24160d;
  --cream: #f2e6d4;
  --paper: #f0e4ca;
  --ink: #1d140e;
  --ink-soft: #5b4a3a;
  --mat: #f6ecd9;
  --frame: #120c08;
  --seam: #3a2114;

  --serif: 'Fraunces', 'Iowan Old Style', Palatino, Georgia, serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --width: 1040px;
  --cream-soft: rgba(242, 230, 212, 0.74);
  /* Afternoon sun on a wall. */
  --sun: rgba(255, 196, 120, 0.06);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--walnut-dark);
  color: var(--cream);
  font: 18px/1.55 var(--serif);
  font-variation-settings: 'SOFT' 50, 'opsz' 14;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2;
  padding: 8px 12px;
  background: var(--cream);
  color: var(--ink);
  font: 14px var(--mono);
}
.skip:focus { top: 12px; }

.inner { max-width: var(--width); margin: 0 auto; padding: 0 16px; position: relative; }

/* Afternoon sun through tall windows, slanting across whatever it falls on. */
.sunlit {
  background-image: linear-gradient(112deg,
    transparent 0 34%, var(--sun) 34% 46%, transparent 46% 50%,
    var(--sun) 50% 58%, transparent 58% 61%, var(--sun) 61% 66%, transparent 66%);
}

/* --- the wall: header and headline ----------------------------------------- */

.wall { position: relative; overflow: hidden; background-color: var(--teal); color: var(--cream); }

/* Shadows the room casts: flat, darker shapes on the walls (scripts/shadows.py).
   Content sits above them. */
.wall::before,
.room::after,
.contact::before {
  content: '';
  position: absolute;
  pointer-events: none;
  background: no-repeat center / contain;
}
:where(.wall, .room, .contact) > * { position: relative; z-index: 1; }
/* A palm by the window, off to the left. */
.wall::before {
  left: 0;
  bottom: 0;
  width: min(64vw, 620px);
  aspect-ratio: 1;
  background-image: url(img/shadow-palm.svg);
  background-position: left bottom;
}

.top {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  justify-content: flex-end;
}
.top nav { display: flex; gap: 22px; }
.top nav a {
  font: 13px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-soft);
  text-decoration: none;
}
.top nav a:hover { color: var(--cream); text-decoration: underline; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 104px;
}
h1 {
  margin: 0;
  font: 600 clamp(52px, 9vw, 104px)/0.96 var(--serif);
  font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144;
  letter-spacing: -0.025em;
}
/* The bear lies on the name, lined up with its left edge. */
.hero h1 img { display: block; width: clamp(200px, 28vw, 300px); height: auto; margin-bottom: 10px; }

/* --- the framed print on the wall ------------------------------------------- */

.print {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  margin-top: 40px;
  padding: 20px;
  background: var(--mat);
  border: 11px solid var(--walnut-dark);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    0 3px 6px rgba(0, 0, 0, 0.25),
    14px 30px 40px -16px rgba(0, 0, 0, 0.5);
  transform: rotate(-1.4deg);
}
/* The wire it hangs from, and the nail. */
.print::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -40px;
  width: 52px;
  height: 52px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  opacity: 0.35;
  transform: translateX(-50%) rotate(45deg);
  transform-origin: center;
}
.print::after {
  content: '';
  position: absolute;
  left: calc(50% - 4px);
  top: -48px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--walnut-dark);
}

/* A cut-paper picture: a bear asleep on a red bed under the sun. Flat colour,
   soft edges, nothing straight, like the logo. */
.art {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--orange);
}
.art > i { position: absolute; display: block; }
.art .sun { top: 8%; right: 9%; width: 36%; aspect-ratio: 1; border-radius: 50%; background: var(--mustard); }
.art .leaf {
  top: -8%; left: -12%; width: 46%; height: 52%;
  border-radius: 0 100% 0 100%;
  background: var(--teal-deep);
  transform: rotate(18deg);
}
.art .pink { top: 33%; left: 40%; width: 13%; height: 9%; border-radius: 58% 42% 50% 50% / 60% 55% 45% 40%; background: var(--pink); }
.art .bed {
  left: -8%; right: -8%; bottom: 0; height: 31%;
  border-radius: 46% 54% 0 0 / 34% 30% 0 0;
  background: var(--red);
}
.art .pebble { bottom: 7%; right: 10%; width: 24%; height: 10%; border-radius: 62% 38% 52% 48% / 58% 50% 50% 42%; background: var(--blue); }
.art .stone { bottom: 9%; left: 9%; width: 13%; height: 8%; border-radius: 50% 50% 46% 54% / 60% 60% 40% 40%; background: var(--mustard); }
/* The bear, in black paper: flat underneath where it lies on the bed. */
.art .tail { bottom: 43%; right: 12%; width: 10%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
.art .body {
  bottom: 28%; left: 30%; width: 58%; height: 25%;
  border-radius: 50% 50% 18% 18% / 78% 78% 22% 22%;
  background: var(--ink);
}
.art .ear-l { bottom: 44.5%; left: 11%; width: 11%; height: 8%; border-radius: 50%; background: var(--ink); transform: rotate(-40deg); }
.art .ear-r { bottom: 45.5%; left: 28%; width: 10%; height: 7.5%; border-radius: 50%; background: var(--ink); transform: rotate(40deg); }
.art .head {
  bottom: 28%; left: 11%; width: 29%; height: 22%;
  border-radius: 50% 50% 30% 30% / 62% 62% 38% 38%;
  background: var(--ink);
}
/* One closed eye, a cream crescent. */
.art .eye {
  bottom: 39%; left: 17%; width: 8%; height: 3%;
  border-bottom: 2.5px solid var(--cream);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

/* Rug stripes between the rooms. */
.stripes {
  height: 24px;
  background: linear-gradient(var(--mustard) 0 25%, var(--orange) 25% 50%, var(--brick) 50% 75%, var(--walnut-dark) 75%);
}

/* --- games: walnut panelling ------------------------------------------------ */

.room {
  position: relative;
  padding: 72px 0 96px;
  color: var(--cream);
  background-color: var(--walnut);
  background-image:
    linear-gradient(112deg, transparent 0 30%, rgba(255, 190, 110, 0.09) 30% 44%, transparent 44% 49%,
      rgba(255, 190, 110, 0.07) 49% 57%, transparent 57%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0 2px, rgba(255, 220, 180, 0.05) 2px 3px, transparent 3px 120px),
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(0, 0, 0, 0.05) 7px 8px, transparent 8px 19px, rgba(0, 0, 0, 0.04) 19px 20px),
    repeating-linear-gradient(90deg, #5e3823 0 120px, #6a412a 120px 240px, #57331f 240px 360px, #643d27 360px 480px);
}

h2 {
  margin: 0 0 40px;
  font: 600 clamp(36px, 5vw, 52px)/1 var(--serif);
  font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144;
  letter-spacing: -0.015em;
}

.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
}
.frame {
  display: block;
  padding: 20px;
  background: var(--mat);
  border: 9px solid var(--frame);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.15),
    0 3px 6px rgba(0, 0, 0, 0.3),
    12px 28px 40px -14px rgba(0, 0, 0, 0.6);
  transform: rotate(0.8deg);
}
.frame img { display: block; width: 100%; height: auto; }

/* The label beside the picture, as in a gallery. */
.placard {
  position: relative;
  padding: 28px 28px 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25), 6px 14px 22px -10px rgba(0, 0, 0, 0.45);
}
.placard p { margin: 0 0 14px; }
/* The bear, asleep on top of the label, in the dark brown of the panelling's
   seams: part of the wall more than a picture on it. */
.placard::before {
  content: '';
  position: absolute;
  right: 26px;
  bottom: 100%;
  margin-bottom: -2px;
  width: 124px;
  aspect-ratio: 198 / 58;
  background: var(--seam);
}
.game-title {
  margin: 0 0 2px;
  font: 600 26px var(--mono);
  letter-spacing: 0.35em;
}
.game-kicker {
  font: italic 500 20px/1.3 var(--serif);
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  color: var(--brick);
}
.facts {
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(29, 20, 14, 0.18);
}
.facts li {
  padding: 7px 0;
  border-bottom: 1px solid rgba(29, 20, 14, 0.18);
  font: 13px var(--mono);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}
/* A mustard cushion; pressing it sinks it in. */
.button {
  display: inline-block;
  padding: 12px 26px 13px;
  border-radius: 999px;
  background: var(--mustard);
  color: var(--ink);
  font: 600 14px var(--mono);
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 2px 0 rgba(0, 0, 0, 0.22);
}
.button:hover {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28), 0 1px 0 rgba(0, 0, 0, 0.22);
}
.policies { display: flex; gap: 14px; font: 13px var(--mono); }
.policies a { color: var(--ink-soft); }
.policies a:hover { color: var(--ink); }

/* A sofa against the panelling, under the pictures. */
.room::after {
  right: 3%;
  bottom: 0;
  width: min(66%, 660px);
  aspect-ratio: 1000 / 220;
  background-image: url(img/shadow-sofa.svg);
  background-position: center bottom;
}

/* The next game: the unfaded patch where a picture will hang, nail already in. */
.next {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 80px;
}
.ghost {
  position: relative;
  flex: none;
  width: 168px;
  aspect-ratio: 1;
  background: rgba(255, 226, 186, 0.1);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.12);
}
.ghost::before {
  content: '';
  position: absolute;
  left: calc(50% - 4px);
  top: -14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--frame);
  box-shadow: 1px 1px 0 rgba(255, 220, 180, 0.25);
}
.next p { margin: 0; max-width: 26em; font-size: 20px; line-height: 1.4; }
.next .tag {
  display: block;
  margin-bottom: 6px;
  font: 600 12px var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mustard);
}

/* --- contact: an orange wall with the sun going down ------------------------ */

.contact {
  position: relative;
  overflow: hidden;
  padding: 80px 0 96px;
  background: var(--orange);
  color: var(--ink);
}
.contact::after {
  content: '';
  position: absolute;
  right: -90px;
  bottom: -190px;
  width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--mustard);
}
/* A hanging plant, and the bear asleep in front of the sun: big, in a deeper
   orange than the wall, its body off the edge so mostly its head shows. */
.contact::before {
  top: 0;
  left: 54%;
  width: 270px;
  aspect-ratio: 480 / 520;
  background-image: url(img/shadow-leaves.svg);
  background-position: center top;
}
.sleeper {
  position: absolute;
  right: -300px;
  bottom: -7px;
  z-index: 1;
  width: 560px;
  aspect-ratio: 198 / 58;
  background: #b9461c;
}
.contact h2 { margin-bottom: 20px; }
.contact p { max-width: 30em; margin: 0; font-size: 20px; }
.email {
  display: inline-block;
  margin-top: 10px;
  font: 600 clamp(24px, 4vw, 38px)/1.15 var(--serif);
  font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.email:hover { color: var(--teal-deep); }

/* The logo as a stencil, so a bear can take any colour. */
.placard::before,
.sleeper {
  -webkit-mask: url(img/bear.svg) no-repeat center / contain;
  mask: url(img/bear.svg) no-repeat center / contain;
}

/* --- footer ----------------------------------------------------------------- */

.foot { background: var(--walnut-dark); }
.foot .inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 32px;
  padding-bottom: 52px;
  font: 13px var(--mono);
  color: rgba(242, 230, 212, 0.68);
}
.foot img { opacity: 0.8; }

/* --- the missing page ------------------------------------------------------- */

.lost {
  padding-top: 72px;
  padding-bottom: 112px;
  text-align: center;
}
.lost img { width: 240px; height: auto; margin-bottom: 28px; }
.lost h1 { margin: 0 auto 18px; max-width: 12em; font-size: clamp(38px, 6.4vw, 64px); }
.lost p { margin: 0 0 32px; color: var(--cream-soft); font-size: 20px; }

/* --- phones ----------------------------------------------------------------- */

@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero { grid-template-columns: 1fr; gap: 64px; padding-top: 36px; padding-bottom: 88px; }
  .print { width: min(78%, 300px); }
  .room { padding: 56px 0 80px; }
  .game { grid-template-columns: 1fr; gap: 60px; }
  .frame { width: 94%; margin: 0 auto; padding: 14px; }
  .placard { padding: 22px 20px 20px; }
  .game-title { font-size: 22px; }
  .next { flex-direction: column; align-items: flex-start; gap: 36px; margin-top: 64px; }
  .ghost { width: 120px; }
  .contact { padding: 60px 0 200px; }
  .contact::after { width: 300px; right: -60px; bottom: -170px; }
  .contact::before { left: auto; right: -30px; width: 170px; }
  .sleeper { width: 400px; right: -220px; bottom: -5px; }
}
@media (max-width: 420px) {
  .top nav { gap: 16px; }
}
