/* The telly and what is on its screen: the shop's junk, the tamed home screen, the sunset canvas
   and "That's all for today". Sizes use cqw, so the screen scales as one picture. */

/* ---------- the set ---------- */
.tv {
  position: relative;
  background: #0c0e15;
  border-radius: clamp(8px,1.2vw,16px);
  padding: clamp(5px,.9%,12px);
  box-shadow: 0 30px 60px -20px rgba(10,14,42,.55),0 0 0 1px rgba(255,255,255,.06) inset;
}
.tv:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 22%;
  height: 14px;
  transform: translateX(-50%);
  background: linear-gradient(#1a1d27,#0c0e15);
  clip-path: polygon(18% 0,82% 0,100% 100%,0 100%);
  border-radius: 0 0 4px 4px;
}
.screen {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 3px;
  background: #000;
  container-type: inline-size;
  isolation: isolate;
}
.screen>* {
  position: absolute;
  inset: 0;
}
.packets {
  position: absolute;
  right: 2%;
  top: 4%;
  width: 0;
  height: 0;
}
.packets b {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
  opacity: 0;
  animation: fly 2.6s linear infinite;
}
.packets b:nth-child(2) {
  animation-delay: .85s;
}
.packets b:nth-child(3) {
  animation-delay: 1.7s;
}
@keyframes fly {
  0% {
    transform: translate(0,0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate(18vw,-26vh);
    opacity: 0;
  }
}
.quiet .packets {
  display: none;
}

/* ---------- the shop's telly ---------- */
.junk,
.home,
.end {
  will-change: opacity;
}
.junk {
  background: radial-gradient(60% 80% at 80% 0,#5b1d8f 0,transparent 70%),linear-gradient(160deg,#170c33,#0b0920);
  color: #fff;
  font-size: 1.6cqw;
  padding: 3cqw 3.5cqw;
  --k: 0;
}
.f {
  --e: max(0,var(--k) - var(--d));
  transform: translateY(calc(var(--e) * 350cqw)) rotate(calc(var(--e) * var(--r,40deg)));
  opacity: calc(1 - var(--e) * 3.4);
}
.nav {
  display: flex;
  gap: 2.6cqw;
  align-items: center;
  font-weight: 600;
  opacity: .85;
}
.nav span:first-child {
  border-bottom: .3cqw solid #ff3fa4;
  padding-bottom: .3cqw;
}
.nav .bell {
  margin-left: auto;
  background: #ff3fa4;
  border-radius: 2cqw;
  padding: .2cqw 1cqw;
  font-size: 1.3cqw;
}
.ad {
  margin-top: 2.2cqw;
  height: 17cqw;
  border-radius: 1.4cqw;
  padding: 2.2cqw 3cqw;
  background: linear-gradient(110deg,#ff3fa4,#ff9b2f 55%,#ffe04a);
  color: #1b0730;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ad small {
  font-size: 1.2cqw;
  font-weight: 700;
  letter-spacing: .12em;
  background: #1b0730;
  color: #ffe04a;
  align-self: flex-start;
  padding: .2cqw .8cqw;
  border-radius: .6cqw;
}
.ad strong {
  font-size: 4.2cqw;
  line-height: 1;
  margin: .8cqw 0 .4cqw;
  font-weight: 800;
  letter-spacing: -.02em;
}
.ad em {
  font-size: 1.2cqw;
  font-style: normal;
  opacity: .7;
}
.row {
  margin-top: 2cqw;
  font-weight: 600;
  font-size: 1.5cqw;
  opacity: .75;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 1.2cqw;
  margin-top: 1cqw;
}
.tiles span {
  height: 7.4cqw;
  border-radius: 1cqw;
  display: flex;
  align-items: flex-end;
  padding: .8cqw;
  font-size: 1.25cqw;
  font-weight: 600;
  line-height: 1.1;
  background: var(--c);
}
.spin {
  position: absolute;
  inset: auto 3cqw 3cqw auto;
  display: flex;
  align-items: center;
  gap: 1cqw;
  background: rgba(0,0,0,.6);
  padding: 1cqw 1.6cqw;
  border-radius: 5cqw;
  font-size: 1.4cqw;
}
.spin i {
  width: 2.2cqw;
  height: 2.2cqw;
  border-radius: 50%;
  border: .4cqw solid rgba(255,255,255,.25);
  border-top-color: #fff;
  animation: sp 1s linear infinite;
}
@keyframes sp {
  to {
    transform: rotate(1turn);
  }
}
.pop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46cqw;
  transform: translate(-50%,-50%) scale(calc(.9 + var(--pop,0) * .1));
  opacity: var(--pop,0);
  background: #fff;
  color: #1b0730;
  border-radius: 1.4cqw;
  padding: 2.6cqw;
  box-shadow: 0 2cqw 6cqw rgba(0,0,0,.6);
  font-size: 1.6cqw;
}
.pop b {
  display: block;
  font-size: 2.4cqw;
  line-height: 1.1;
  margin-bottom: .8cqw;
}
.pop div {
  display: flex;
  gap: 1cqw;
  margin-top: 1.8cqw;
}
.pop span {
  flex: 1;
  text-align: center;
  padding: .9cqw;
  border-radius: .8cqw;
  background: #eee;
  font-weight: 600;
}
.pop span:first-child {
  background: #ff3fa4;
  color: #fff;
}

/* ---------- the tamed home screen ---------- */
.home {
  opacity: 0;
  background: radial-gradient(70% 90% at 15% 0,rgba(255,200,150,.22),transparent 60%),linear-gradient(170deg,#24315f,#141b3a 70%);
  color: #F3EEFF;
  padding: 4.5cqw 5cqw;
  font-size: 1.5cqw;
}
.hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.hello {
  font-size: 1.9cqw;
  opacity: .8;
}
.fam {
  font-size: 5.6cqw;
  line-height: 1;
  margin-top: .4cqw;
  max-width: 56cqw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.right {
  text-align: right;
}
.clock {
  font-size: 5cqw;
  font-weight: 200;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.meta {
  display: flex;
  gap: 2cqw;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1cqw;
  font-size: 1.5cqw;
  opacity: .9;
}
.meta svg {
  width: 2.4cqw;
  height: 2.4cqw;
  vertical-align: -.6cqw;
}
.bins {
  display: inline-flex;
  align-items: center;
  gap: .4cqw;
}
.bins svg {
  width: 2cqw;
  height: 2.6cqw;
}
.lbl {
  margin: 4.2cqw 0 1.2cqw;
  font-size: 1.3cqw;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .6;
}
.fav {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1.8cqw;
}
.fav span {
  position: relative;
  height: 11.5cqw;
  border-radius: 1.4cqw;
  background: var(--c);
  display: flex;
  align-items: flex-end;
  padding: 1.2cqw;
  font-weight: 600;
  font-size: 1.6cqw;
  overflow: hidden;
}
.fav .yt {
  background: linear-gradient(#5B9FE0,#FFE0A3);
  color: #2a1a10;
  box-shadow: 0 0 0 .35cqw #fff,0 0 4cqw rgba(255,214,140,.5);
}
.yt:before {
  content: "";
  position: absolute;
  width: 4cqw;
  height: 4cqw;
  border-radius: 50%;
  background: #FFC24A;
  box-shadow: 0 0 3cqw #FFE7A0;
  right: 3cqw;
  top: 2.4cqw;
}
.yt:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.6cqw;
  background: #5E9F50;
  border-radius: 60% 60% 0 0/100% 100% 0 0;
}
.yt em {
  position: absolute;
  left: 1.2cqw;
  top: 1.1cqw;
  font-style: normal;
  font-size: 1.1cqw;
  letter-spacing: .1em;
  font-weight: 700;
  background: rgba(255,255,255,.75);
  padding: .2cqw .7cqw;
  border-radius: 1cqw;
}
.yt i {
  position: relative;
  z-index: 1;
  color: #fff;
}
.apps {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 1.4cqw;
  opacity: .35;
}
.apps span {
  height: 6.4cqw;
  border-radius: 1cqw;
  background: rgba(255,255,255,.12);
}

/* ---------- the sunset, and the end of the day ---------- */
canvas.scene {
  width: 100%;
  height: 100%;
  opacity: 0;
  display: block;
}
.end {
  background: #020308;
  opacity: 0;
  display: grid;
  place-items: center;
}
.end p {
  color: var(--moon);
  font-size: 5cqw;
  opacity: 0;
  margin: 0;
}
@media (max-width:860px) {
  .packets {
    display: none;
  }
}
