/* The workshop's public page (tools/site/page.html), in the deck's kids look: the tokens of slides/theme-kids.css (copied
   beside this file by the build and loaded before it), the kit's fonts, big type, white cards with a thick ink line and a
   coloured shadow. Made for a phone first. Orange and yellow are for shapes and big bold words only, as in the deck.
   The .og class is the link preview picture (1200 x 627): the header alone, rendered by tools/site/build.mjs. */
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 500 18px/1.45 var(--sans); -webkit-font-smoothing: antialiased;
  background: radial-gradient(460px 460px at 100% 0, var(--yellow-tint), transparent 70%),
              radial-gradient(520px 520px at 0 38%, var(--tint), transparent 70%),
              radial-gradient(520px 520px at 100% 82%, var(--orange-tint), transparent 70%), var(--paper); }
p { margin: 0; }
b { font-weight: 700; }
.em, .notes3 { font-family: var(--emoji); font-style: normal; line-height: 1; }
main { max-width: 44rem; margin: 0 auto; padding: 22px 18px 44px; display: grid; gap: 34px; }

/* ---------- The header: the event, the title, the robot ---------- */
header { display: grid; grid-template-columns: 1fr auto; gap: 16px 12px; align-items: center; }
.tag { grid-column: 1 / -1; justify-self: start; padding: 8px 14px; border-radius: 14px; background: var(--ink); color: #fff;
       font: 700 14px/1.3 var(--sans); letter-spacing: .02em; }
h1 { margin: 0; font: 700 clamp(40px, 11.5vw, 78px)/1 var(--sans); letter-spacing: -.03em; overflow-wrap: anywhere; }
h1 span { display: block; margin-top: 10px; font-size: .52em; letter-spacing: -.015em; color: var(--blue-dk); }
header .robot-slot { width: clamp(86px, 24vw, 150px); }
.ogline, .url { display: none; }

/* ---------- The robot (the deck's, slides/talk.js), blinking and waving only when motion is welcome ---------- */
svg.robot { display: block; width: 100%; height: auto; overflow: visible; }
svg.robot .eye-l, svg.robot .eye-r { transform-box: fill-box; transform-origin: center; }
svg.robot .ant { transform-box: view-box; transform-origin: 200px 96px; }
@media (prefers-reduced-motion: no-preference) {
  svg.robot .eye-l, svg.robot .eye-r { animation: blink 4.2s infinite; }
  svg.robot .ant { animation: wag 2.4s ease-in-out infinite; }
  .karaoke.playing svg.robot .mouth rect { animation: eq .9s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: bottom; }
  .karaoke.end .kend .robot-slot { animation: dance .9s ease-in-out infinite alternate; transform-origin: 50% 100%; }
}
svg.robot .mouth rect:nth-child(2) { animation-delay: -.3s; }
svg.robot .mouth rect:nth-child(3) { animation-delay: -.6s; }
svg.robot .mouth rect:nth-child(4) { animation-delay: -.15s; }
svg.robot .mouth rect:nth-child(5) { animation-delay: -.45s; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes wag { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes dance { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(6deg) translateY(-10px); } }

/* ---------- The karaoke card ---------- */
.karaoke { display: grid; gap: 14px; padding: 20px 18px 22px; background: #fff; border: 4px solid var(--ink); border-radius: 26px;
           box-shadow: 8px 8px 0 var(--purple); }
.player { display: flex; align-items: center; gap: 16px; }
.playbtn { flex: none; width: 78px; height: 78px; padding: 0; border-radius: 50%; border: 4px solid var(--ink); background: var(--purple);
           box-shadow: 0 5px 0 var(--ink); display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.playbtn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.playbtn:focus-visible, .seek:focus-visible, .cta:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.playbtn svg { width: 32px; height: 32px; fill: #fff; }
.playbtn .i-play { margin-left: 5px; }
.playbtn .i-pause, .playing .playbtn .i-play { display: none; }
.playing .playbtn .i-pause { display: block; }
.ct { font: 700 26px/1.1 var(--sans); letter-spacing: -.01em; }
.cs { margin-top: 4px; font-size: 16px; line-height: 1.3; color: var(--mut); }

.seekrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.time { font: 600 15px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--mut); white-space: nowrap; }
.seek { --p: 0; -webkit-appearance: none; appearance: none; width: 100%; height: 40px; margin: 0; background: transparent; cursor: pointer; }
.seek::-webkit-slider-runnable-track { height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--orange) calc(var(--p) * 100%), var(--hair) 0); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 30px; height: 30px; margin-top: -9px; border-radius: 50%;
  background: #fff; border: 4px solid var(--ink); }
.seek::-moz-range-track { height: 12px; border-radius: 6px; background: var(--hair); }
.seek::-moz-range-progress { height: 12px; border-radius: 6px; background: var(--orange); }
.seek::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); }

/* the lines: the one being sung, each word filling orange with its own share of the time (--p from 0 to 1), the next below */
.lines { min-height: 220px; display: flex; flex-direction: column; justify-content: center; gap: 14px; text-align: center; }
.kl { font-weight: 700; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.now { font-size: clamp(28px, 7.8vw, 46px); color: var(--ink); }
.next { min-height: 1.2em; font-size: clamp(19px, 5vw, 28px); color: var(--faint); }
.now .w { --p: 0; background: linear-gradient(90deg, var(--orange) calc(var(--p) * 100%), var(--ink) 0);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.now.wait, .now.wait .w { background: none; color: var(--faint); }
.notes3 { color: var(--purple); }

/* after the last sung line, while the music ends */
.kend { display: none; min-height: 220px; grid-template-columns: clamp(86px, 26vw, 140px) 1fr; gap: 18px; align-items: center; }
.karaoke.end .lines { display: none; }
.karaoke.end .kend { display: grid; }
.kt { font-size: clamp(22px, 6vw, 32px); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.kt b { display: block; margin-bottom: 8px; color: var(--orange-dk); }
.kt span { display: block; margin-top: 12px; color: var(--blue-dk); }

/* ---------- The team songs ---------- */
.cta { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 22px 20px; border-radius: 22px;
       border: 4px solid var(--ink); text-align: center; font-weight: 700; }
a.cta { background: var(--blue); color: #fff; font-size: clamp(24px, 6.4vw, 32px); line-height: 1.15; text-decoration: none;
        box-shadow: 8px 8px 0 var(--orange); }
a.cta:active { transform: translate(3px, 3px); box-shadow: 5px 5px 0 var(--orange); }
.cta .em { font-size: 1.3em; }
p.cta { background: var(--yellow-tint); border-style: dashed; color: var(--ink); font-size: clamp(20px, 5.4vw, 26px); line-height: 1.25; }
.listen .sub { margin-top: 14px; text-align: center; color: var(--mut); font-size: 16px; }
/* The teams' songs: one card each, in the team's colour; native players (simple and reliable on every phone) */
.listen { display: grid; gap: 22px; }
.listen h2 { font-size: clamp(26px, 7vw, 34px); line-height: 1.1; letter-spacing: -.02em; }
.listen h2 span { color: var(--blue); }
.song { background: #fff; border: 4px solid var(--ink); border-radius: 22px; padding: 18px 18px 16px; display: grid; gap: 10px; }
.song.b { box-shadow: 8px 8px 0 var(--blue); } .song.o { box-shadow: 8px 8px 0 var(--orange); }
.song > * { margin: 0; }
.song .team { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.song.b .team { color: var(--blue-dk); } .song.o .team { color: var(--orange-dk); }
.song h3 { font-size: clamp(24px, 6.6vw, 30px); line-height: 1.15; letter-spacing: -.01em; }
.song .about { color: var(--mut); font-size: 17px; }
.song audio { width: 100%; margin-top: 4px; }
.song details { margin-top: 2px; }
.song summary { cursor: pointer; font-weight: 700; font-size: 18px; color: var(--purple); padding: 4px 0; }
.song .lyr { padding: 6px 0 4px; font-size: 18px; line-height: 1.45; }
.song .lyr .sec { margin-top: 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }

/* ---------- The thesis and the rules ---------- */
.thesis p { font-size: clamp(28px, 7.6vw, 46px); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.thesis b { display: block; margin-top: 8px; color: var(--blue-dk); }
.rules { display: grid; gap: 22px; }
.rules h2 { margin: 0; font: 700 clamp(26px, 7vw, 40px)/1.1 var(--sans); letter-spacing: -.02em; }
.rules h2 span { color: var(--blue-dk); }
.rule { display: flex; gap: 16px; align-items: flex-start; padding: 18px 18px 20px; background: #fff; border: 4px solid var(--ink);
        border-radius: 22px; box-shadow: 7px 7px 0 var(--blue); }
.rule.orange { box-shadow: 7px 7px 0 var(--orange); }
.rule.purple { box-shadow: 7px 7px 0 var(--purple); }
.rule .n { flex: none; width: 50px; height: 50px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center;
           font-size: 26px; font-weight: 700; }
.rule .t { font-size: clamp(21px, 5.6vw, 26px); font-weight: 700; line-height: 1.2; }
.rule .d { margin-top: 6px; font-size: 17px; line-height: 1.35; color: var(--mut); }

footer { border-top: 2px solid var(--hair); padding-top: 18px; font-weight: 700; font-size: 18px; }

@media (min-width: 700px) {
  main { padding-top: 40px; gap: 44px; }
  .karaoke { padding: 26px 30px 28px; }
  .lines, .kend { min-height: 250px; }
}

/* ---------- The link preview picture: the header alone, large, the line and the address under it ---------- */
html.og, html.og body { width: 1200px; height: 627px; overflow: hidden; }
.og main { max-width: none; height: 627px; padding: 0 80px; align-content: center; }
.og main > :not(header) { display: none; }
.og header { grid-template-columns: 1fr 290px; gap: 24px 64px; }
.og .tag { font-size: 22px; padding: 10px 20px; border-radius: 16px; }
.og h1 { grid-column: 1; grid-row: 2; font-size: var(--og-size, 112px); }
.og header .robot-slot { width: 290px; grid-column: 2; grid-row: 2 / span 3; }
.og .ogline { display: block; grid-column: 1; grid-row: 3; font-size: 24px; line-height: 1.35; color: var(--mut); }
.og .url { display: block; grid-column: 1; grid-row: 4; font: 700 24px/1 var(--sans); color: var(--blue-dk); }
