/* Life Sucks in Africa
   Concept: satire. A tabloid headline about the "dark" continent, next to a phone whose
   notifications tell the real story of the day: morning, evening, night. */

html.theme-lifesucks {
  --fg: #111;
  --muted: #60605c;
  --accent: #e10600;
  --rule: #e6e4df;
  --surface: #f6f5f2;
  --selection: #ffd0cc;
  --font-display: 'Anton', 'Impact', sans-serif;
}

/* ---------------------------------------------------------------- hero */

.ls-hero {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}
@media (max-width: 50rem) { .ls-hero { grid-template-columns: 1fr; } .lock { justify-self: center; } }

.ls-strap {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin: 0 0 1rem;
  font: 600 0.8rem/1.2 var(--font-ui); color: var(--muted);
}
.ls-strap span {
  font: 400 0.95rem/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 0.4rem 0.6rem 0.3rem;
  animation: flash 1.2s steps(1) 3;
}
@keyframes flash { 50% { background: var(--fg); } }
.theme-lifesucks .hero-title {
  font: 400 clamp(3.6rem, 1.4rem + 8vw, 8rem)/0.88 var(--font-display);
  text-transform: uppercase; letter-spacing: 0.005em;
}
.theme-lifesucks .hero-dek { font-style: italic; color: var(--fg); }
.theme-lifesucks .hero-meta { margin: 1.2rem 0 0; }

/* The phone */
.lock {
  width: 17.5rem; padding: 0.7rem; border-radius: 2.6rem;
  background: #111; box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.6);
}
.lock-screen {
  position: relative; height: 31rem; overflow: hidden; border-radius: 2rem;
  padding: 3rem 0.8rem 1rem; color: #fff;
  background: linear-gradient(180deg, #f6b26b, #f7d58b 45%, #8fc3e8);
  transition: background 1.2s;
}
/* The wallpaper follows the time of day */
.lock-screen::before {
  content: ''; position: absolute; inset: 0; transition: opacity 1.2s;
  background: linear-gradient(180deg, #1d2b5a, #c4567a 60%, #f39c5a); opacity: 0;
}
.lock-screen::after {
  content: ''; position: absolute; inset: 0; transition: opacity 1.2s;
  background: radial-gradient(1px 1px at 20% 15%, #fff 99%, transparent), radial-gradient(1px 1px at 70% 25%, #fff 99%, transparent),
              radial-gradient(1px 1px at 40% 35%, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 85% 10%, #fff 99%, transparent),
              linear-gradient(180deg, #04060f, #101a3a 70%, #1c2a55);
  opacity: 0;
}
.lock-screen[data-act="1"]::before { opacity: 1; }
.lock-screen[data-act="2"]::after { opacity: 1; }
.lock-screen > * { position: relative; z-index: 1; }

.lock-time { margin: 0; text-align: center; font: 300 4rem/1 var(--font-ui); letter-spacing: -0.03em; display: grid; }
.lock-time span { grid-area: 1 / 1; opacity: 0; transition: opacity 0.6s; }
.lock-date { margin: 0.3rem 0 1.4rem; text-align: center; font: 500 0.85rem var(--font-ui); opacity: 0.85; }

.lock-notes { list-style: none; margin: 0; padding: 0; display: grid; }
.lock-notes li {
  grid-area: auto; display: none;
  margin: 0 0 0.45rem; padding: 0.6rem 0.75rem;
  border-radius: 1rem; background: rgb(255 255 255 / 0.72); color: #111;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font: 0.78rem/1.35 var(--font-ui);
}
.lock-notes b { display: block; font-weight: 650; font-size: 0.72rem; letter-spacing: 0.01em; margin-bottom: 0.1rem; }

/* Show only the current act's time and notifications, dropping in one by one */
.lock-screen[data-act="0"] [data-act="0"],
.lock-screen[data-act="1"] [data-act="1"],
.lock-screen[data-act="2"] [data-act="2"] { opacity: 1; }
.lock-screen[data-act="0"] li[data-act="0"],
.lock-screen[data-act="1"] li[data-act="1"],
.lock-screen[data-act="2"] li[data-act="2"] {
  display: block;
  animation: drop 0.5s cubic-bezier(.2,.9,.3,1.2) both;
  animation-delay: calc(0.5s + var(--i) * 0.9s);
}
@keyframes drop { from { opacity: 0; translate: 0 -0.8rem; scale: 0.96; } }

/* ---------------------------------------------------------------- prose */

.theme-lifesucks .prose > p:first-child::first-letter {
  float: left; font: 400 4.2em/0.8 var(--font-display); margin: 0.08em 0.1em 0 0; color: var(--accent);
}
/* Deadpan asides, said with a straight face */
.theme-lifesucks .prose blockquote {
  border-left: 0; padding: 0; text-align: center;
  font: 400 clamp(1.6rem, 1rem + 2vw, 2.3rem)/1.1 var(--font-display); text-transform: uppercase;
}
.theme-lifesucks .prose blockquote em { font-style: normal; }
.theme-lifesucks .prose blockquote::before { content: '“'; display: block; color: var(--accent); font-size: 1.6em; line-height: 0.6; }
.theme-lifesucks .prose figcaption { text-align: left; margin-left: 0; }
