/* Cozy Chaos: the cabin's colours (its soot, its logs, its stone, the fire, the window's blue) and the stream's red */

@font-face {
  font-family: 'Pixelify Sans';
  font-weight: 400;
  font-display: swap;
  src: url(../../fonts/pixelify-sans-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Pixelify Sans';
  font-weight: 600;
  font-display: swap;
  src: url(../../fonts/pixelify-sans-latin-600-normal.woff2) format('woff2');
}

:root {
  --soot: #120a07;
  --log: #1d100b;
  --seam: #0c0604;
  --wood: #2a1711;
  --wood-hi: #5c3629;
  --stone: #3a2a2c;
  --cream: #fff1d0;
  --text: #ead9bd;
  --muted: #b89d82;
  --ember: #e86a1e;
  --flame: #fbc04c;
  --red: #d8262e;
  --glass: #80c0ed;
  --black: #0a0a0e;
  --pixel: 'Pixelify Sans', ui-monospace, Consolas, monospace;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --glow: .3;
  --glow-rgb: 232, 106, 30;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--soot);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-text-size-adjust: 100%;
}
img, canvas { display: block; }
[hidden] { display: none !important; }
.pixel, canvas { image-rendering: pixelated; }
a { color: var(--glass); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 40px, 1008px); margin-inline: auto; }

h1, h2, dt, .bar, .btn, .tagline, footer { font-family: var(--pixel); }
h2 {
  margin: 0 0 22px;
  color: var(--cream);
  font-size: clamp(1.55rem, 3.4vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .01em;
}
/* The stream's red dot before each heading, its corners cut as the badge's are */
h2::before {
  content: '';
  display: inline-block;
  width: .5em; height: .5em;
  margin-right: .5em;
  background: var(--red);
  vertical-align: .12em;
  clip-path: polygon(25% 0, 75% 0, 75% 25%, 100% 25%, 100% 75%, 75% 75%, 75% 100%, 25% 100%, 25% 75%, 0 75%, 0 25%, 25% 25%);
}

/* The bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px;
  background: var(--seam);
  font-size: 1.05rem;
  white-space: nowrap;
}
.bar a { color: var(--text); text-decoration: none; }
.bar a:hover { color: var(--cream); text-decoration: underline; }
.chip {
  padding: 2px 10px;
  background: var(--red); color: #f4f1ea;
  font-size: .95rem; letter-spacing: .04em; text-transform: uppercase;
}

/* The top: the cabin's log wall, the TV on it, the fire's light under it */
.hero {
  padding: clamp(20px, 3vw, 32px) 0 clamp(32px, 5vw, 52px);
  background:
    radial-gradient(ellipse 70% 60% at 50% 38%, rgba(var(--glow-rgb), .13), transparent 70%),
    repeating-linear-gradient(var(--log) 0 44px, #170c08 44px 46px, var(--seam) 46px 48px);
  border-bottom: 2px solid var(--seam);
}
.tv {
  width: fit-content; max-width: 100%;
  margin-inline: auto;
  padding: clamp(5px, 1vw, 10px);
  background: var(--black);
  border-radius: 6px;
  box-shadow:
    0 0 0 2px #24140e,
    0 26px 110px -18px rgba(var(--glow-rgb), var(--glow)),
    0 2px 30px rgba(0, 0, 0, .7);
}
.screen {
  position: relative;
  width: min(100vw - 40px - 2 * clamp(5px, 1vw, 10px), 960px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.screen > img, .screen > .room { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The stream's badge: where the app has it, 8, 6 in the room's pixels; it's not the camera's, so it never tilts */
.screen > .badge { position: absolute; left: 2.5%; top: 3.3333%; width: 40%; height: 5%; }
.live .screen { cursor: pointer; touch-action: manipulation; }

.under {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 32px;
  width: min(100%, 980px);
  margin: clamp(22px, 3vw, 32px) auto 0;
}
h1 { margin: 0; }
h1 img { width: 316px; max-width: 100%; height: auto; }
.tagline { margin: 14px 0 0; color: var(--cream); font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.3; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--wood-hi);
  background: var(--wood);
  color: var(--cream);
  font-size: 1.05rem; line-height: 1.2; text-decoration: none;
  cursor: pointer;
}
a.btn:hover, button.btn:hover { border-color: var(--flame); color: #fff; }
.btn.chaos { border-color: var(--red); background: var(--red); color: #f4f1ea; }
.btn.chaos:hover { background: #ef3a42; border-color: #ef3a42; }
.btn.chaos:active { transform: translateY(1px); }
.btn.soon { border-style: dashed; background: none; color: var(--muted); cursor: default; }
.btn.quiet { background: none; }

/* The sections */
main > section { padding: clamp(48px, 8vw, 88px) 0 0; }
main > section:last-child { padding-bottom: clamp(56px, 9vw, 96px); }

.about { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 6vw, 72px); align-items: center; }
.about .text { max-width: 60ch; }
.if-live { display: none; color: var(--flame); }
.live .if-live { display: block; }

.phone {
  width: fit-content;
  padding: 8px 7px;
  background: var(--black);
  border-radius: 20px;
  box-shadow: 0 0 0 2px #24140e, 0 20px 60px -20px rgba(var(--glow-rgb), .35);
}
.phone img { border-radius: 12px; }

.gags {
  display: grid; grid-template-columns: repeat(auto-fill, 320px); justify-content: center; gap: 28px 24px;
}
figure { margin: 0; background: var(--wood); border: 2px solid var(--seam); box-shadow: 0 0 0 2px #24140e; }
figure img { width: 100%; height: auto; }
figcaption { padding: 12px 14px 14px; color: var(--cream); font-size: 1rem; line-height: 1.45; }
.after { margin: 28px 0 0; color: var(--muted); text-align: center; }

.where { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.shots { display: grid; grid-template-columns: auto auto; gap: 20px 16px; justify-items: center; }
.set {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 6px;
  background: var(--black);
  border-radius: 4px;
  box-shadow: 0 0 0 2px #24140e, 0 20px 60px -20px rgba(var(--glow-rgb), .35);
}
.shots .phone img { width: 162px; height: auto; }
.facts { display: grid; gap: 22px; margin: 0; }
dt { margin-bottom: 4px; color: var(--flame); font-size: 1.2rem; font-weight: 600; }
dd { margin: 0; max-width: 56ch; }

.status p { max-width: 60ch; }
.status .actions { margin-top: 24px; }

footer { margin-top: 0; padding: 22px 0 28px; background: var(--seam); color: var(--muted); font-size: 1rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--text); }
footer span { font-family: var(--body); font-size: .92rem; }

/* The privacy policy */
.policy { padding: clamp(28px, 6vw, 64px) 0; }
.doc {
  width: min(100% - 40px, 760px); margin-inline: auto;
  padding: clamp(22px, 5vw, 44px);
  background: var(--wood);
  border: 2px solid var(--seam);
  box-shadow: 0 0 0 2px #24140e;
}
.doc h1 { margin: 0 0 6px; color: var(--cream); font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 600; line-height: 1.1; }
.doc h2 { margin: 34px 0 10px; font-size: 1.35rem; }
.doc h2::before { display: none; }
.doc .date { color: var(--muted); }
.doc .short { margin: 22px 0; padding: 14px 16px; background: var(--log); border-left: 4px solid var(--red); color: var(--cream); }
.doc ul { margin: 0 0 1em; padding-left: 1.2em; }
.doc li { margin-bottom: .3em; }
.doc .btn { margin-top: 18px; }

@media (max-width: 860px) {
  .where { grid-template-columns: 1fr; }
  .shots { justify-content: center; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .about { grid-template-columns: 1fr; justify-items: center; }
  .about .phone { order: 2; }
  .under { justify-content: flex-start; }
  .chip { font-size: .85rem; }
  .shots .phone img { width: 144px; }
}

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