/* Small animated details along the landing page (behaviour in /js/landing.js) */

.c3-blink {
  animation: c3-blink 1s steps(1) infinite;
}

@keyframes c3-blink {
  50% {
    opacity: 0;
  }
}

.c3-caption {
  margin-top: 0.6rem;
  font-size: 11px;
  line-height: 1.7;
  color: #9791ad;
}

/* ---- key facts ticker, right under the hero ---- */
.c3-ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 13px 0;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  background: #0a0a0a;
  border-top: 3px solid #d6579a;
  border-bottom: 3px solid #d6579a;
}

.c3-ticker-track {
  display: inline-flex;
  align-items: center;
  animation: c3-marquee 70s linear infinite;
}

.c3-ticker:hover .c3-ticker-track {
  animation-play-state: paused;
}

.c3-ticker-track i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 24px;
  background: #ff69f6;
  box-shadow: 0 0 6px #ff69f6;
}

.c3-ticker-track b {
  font-weight: 400;
  color: #ffd84a;
}

@keyframes c3-marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---- programme of the day ---- */
.c3-prog-date {
  margin: -1.5rem 0 2rem;
  font-size: 13px;
  line-height: 1.8;
  color: #ff86c8;
}

.c3-prog {
  --rail: 132px;
  --gap: 14px;
  margin-bottom: 2rem;
}

.c3-prog-part {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 1.1rem;
  font-size: 12px;
  line-height: 1.6;
  color: #c3bed3;
}

.c3-prog-part::after {
  content: "";
  flex: 1;
  height: 3px;
  background: repeating-linear-gradient(90deg, #51486a 0 9px, transparent 9px 15px);
}

.c3-prog ol + .c3-prog-part {
  margin-top: 2.2rem;
}

.c3-prog ol {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.c3-sched {
  --accent: #ff86c8;
  position: relative;
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  align-items: start;
}

.c3-sched + .c3-sched {
  margin-top: var(--gap);
}

/* rail from each node down to the next one */
.c3-sched:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: calc(-24px - var(--gap));
  left: calc(var(--rail) - 2px);
  width: 3px;
  background: #51486a;
}

.c3-sched[data-kind="keynote"] { --accent: #b18cff; }
.c3-sched[data-kind="mesa"] { --accent: #5fd7ff; }
.c3-sched[data-kind="pausa"] { --accent: #4dff88; }
.c3-sched[data-kind="ctf"] { --accent: #ffd84a; }

/* node on the rail */
.c3-sched::before {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(var(--rail) - 7px);
  width: 13px;
  z-index: 1;
  height: 13px;
  background: var(--accent);
  box-shadow: 0 0 0 3px #0a0a0a;
}

.c3-sched-time {
  margin: 0;
  padding: 14px 26px 0 0;
  text-align: right;
}

.c3-sched-time time {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  color: #fff;
}

.c3-sched-time span {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.4;
  color: #c3bed3;
}

.c3-sched-card {
  margin-left: 26px;
  padding: 16px 18px 17px;
  background: #15111f;
  border: 3px solid #2e2742;
  border-left: 6px solid var(--accent);
  transition: border-color 0.15s, transform 0.15s;
}

.c3-sched:hover .c3-sched-card {
  border-color: var(--accent);
  transform: translateX(4px);
}

.c3-sched-tag {
  display: inline-block;
  padding: 5px 7px 4px;
  font-size: 10px;
  line-height: 1;
  color: #0a0a0a;
  text-transform: uppercase;
  background: var(--accent);
}

.c3-sched-title {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: #fff;
}

.c3-sched-who {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.8;
  color: #c3bed3;
}

.c3-sched-who::before {
  content: "> ";
  color: var(--accent);
}

/* the competition is the main event */
.c3-sched[data-kind="ctf"] .c3-sched-card {
  background: #1f1a10;
  border-color: #ffd84a;
  box-shadow: 6px 6px 0 #d6579a;
}

.c3-sched[data-kind="ctf"] .c3-sched-title {
  font-size: 18px;
  color: #ffd84a;
}

/* ---- "how does it work" terminal ---- */
.c3-term {
  max-width: 460px;
  margin: 2rem 0 1.5rem;
  background: rgba(10, 10, 10, 0.92);
  border: 3px solid #fff;
  box-shadow: 6px 6px 0 #d6579a;
}

.c3-term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: #d6579a;
  border-bottom: 3px solid #fff;
}

.c3-term-bar .c3-dots {
  display: inline-flex;
  gap: 4px;
}

.c3-term-bar .c3-dots i {
  display: block;
  width: 8px;
  height: 8px;
  background: #fff;
}

.c3-term-body {
  padding: 14px 16px 12px;
  font-size: 11px;
  line-height: 2;
  color: #e4e1ee;
}

.c3-term-body .ln {
  margin: 0;
  overflow: hidden;
  white-space: pre;
}

.c3-term-body .p {
  color: #ff86c8;
}

.c3-term-body .n {
  color: #4dff88;
}

.c3-term-body .f {
  color: #ffd84a;
}

/* typed line by line once visible (only when JS is on) */
.c3-term.js-anim .ln {
  width: 0;
}

.c3-term.js-anim.is-visible .ln {
  animation: c3-type calc(var(--n) * 40ms) steps(var(--n), end) forwards;
  animation-delay: var(--d);
}

@keyframes c3-type {
  to {
    width: calc(var(--n) * 1ch + 2px);
  }
}

/* ---- countdown boxes ---- */
.c3-count {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 2vw, 26px);
  margin: 0.5rem 0 2rem;
}

.c3-count-box {
  min-width: clamp(78px, 12vw, 156px);
  padding: 18px 10px 14px;
  text-align: center;
  background: rgba(10, 10, 10, 0.85);
  border: 3px solid #fff;
  box-shadow: 6px 6px 0 #d6579a;
}

.c3-count-box b {
  display: block;
  font-weight: 400;
  font-size: clamp(26px, 4.4vw, 62px);
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 3px 0 rgba(255, 105, 246, 0.8);
}

.c3-count-box b.tick {
  animation: c3-tick 0.4s steps(2);
}

@keyframes c3-tick {
  from {
    color: #4dff88;
    transform: translateY(-5px);
  }
}

.c3-count-box span {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  color: #ff86c8;
}

.c3-count-note {
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
  color: #e4e1ee;
}

.c3-count-note .c3-blink {
  color: #4dff88;
}

.c3-count-note a {
  color: #ff86c8;
}

.c3-count-note a:hover {
  color: #fff;
}

/* ---- challenge board ---- */
.c3-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 540px;
  margin: 1.8rem 0 0.2rem;
}

.c3-tile {
  position: relative;
  padding: 12px 4px 10px;
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
  color: #fff;
  background: #2a1450;
  border: 2px solid #7b4dd8;
  box-shadow: 3px 3px 0 #130f1d;
  transition: background-color 0.2s steps(2), border-color 0.2s steps(2);
}

.c3-tile b {
  display: block;
  margin-top: 6px;
  font-weight: 400;
  color: #ffd84a;
}

.c3-tile.is-solved {
  background: #0f3a24;
  border-color: #4dff88;
}

.c3-tile.is-solved b {
  color: #4dff88;
}

.c3-tile.is-solved b::before {
  content: "\2713  ";
}

.c3-tile.is-solved::after {
  content: "+" attr(data-pts);
  position: absolute;
  top: -6px;
  left: 50%;
  font-size: 11px;
  color: #4dff88;
  pointer-events: none;
  animation: c3-float 1.1s steps(6) forwards;
}

@keyframes c3-float {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -26px);
  }
}

/* ---- prize podium ---- */
.c3-podium {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 178px;
  margin: 1.8rem 0 1.4rem;
}

.c3-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: clamp(72px, 8.5vw, 110px);
  height: 100%;
}

.c3-step.s1 {
  color: #ffd700;
}

.c3-step.s2 {
  color: #b8b8c8;
}

.c3-step.s3 {
  color: #cd7f32;
}

.c3-step em {
  margin-bottom: 8px;
  font-size: 14px;
  font-style: normal;
}

.c3-bar {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 0;
  padding-top: 10px;
  overflow: hidden;
  background: #1b1628;
  border: 3px solid currentColor;
  border-bottom: 0;
  box-shadow: 5px 0 0 #130f1d;
  transition: height 0.9s steps(9);
}

.c3-bar b {
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
}

.c3-podium.is-visible .s3 .c3-bar {
  height: 62px;
}

.c3-podium.is-visible .s2 .c3-bar {
  height: 94px;
  transition-delay: 0.7s;
}

.c3-podium.is-visible .s1 .c3-bar {
  height: 132px;
  transition-delay: 1.4s;
}

.c3-podium.is-visible .s1 em {
  animation: c3-crown 1.2s steps(2) 2.4s infinite;
}

@keyframes c3-crown {
  50% {
    transform: translateY(-4px);
  }
}

.c3-gift {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 12px;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  color: #ff86c8;
}

.c3-gift-box {
  position: relative;
  width: 44px;
  height: 36px;
  margin-bottom: 10px;
  background: #d6579a;
  border: 3px solid #fff;
  animation: c3-wiggle 3.2s steps(1) infinite;
}

.c3-gift-box::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 6px;
  margin-left: -3px;
  background: #fff;
}

.c3-gift-box::after {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 18px;
  height: 10px;
  margin-left: -9px;
  border: 3px solid #fff;
  border-bottom: 0;
}

@keyframes c3-wiggle {
  82% {
    transform: rotate(-6deg);
  }
  88% {
    transform: rotate(6deg) translateY(-2px);
  }
  94% {
    transform: rotate(-3deg);
  }
  100% {
    transform: none;
  }
}

/* narrow phones: podium and gifts don't fit side by side, drop the gifts below */
@media screen and (max-width: 480px) {
  .c3-podium {
    flex-wrap: wrap;
    height: auto;
    row-gap: 22px;
  }

  .c3-step {
    flex: 1 1 0;
    min-width: 0;
    max-width: 96px;
    height: 178px;
  }

  .c3-bar b {
    font-size: 10px;
  }

  .c3-gift {
    flex: 1 0 100%;
    flex-direction: row;
    gap: 16px;
    margin-left: 0;
    padding-top: 15px;
    text-align: left;
  }

  .c3-gift-box {
    flex: 0 0 auto;
    margin-bottom: 0;
  }
}

/* ---- two venues, one competition ---- */
.c3-link {
  display: flex;
  align-items: center;
  max-width: 520px;
  margin: 1.8rem 0 0.4rem;
}

.c3-node {
  flex: 0 0 auto;
  padding: 11px 12px;
  text-align: center;
  background: rgba(10, 10, 10, 0.85);
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 #d6579a;
}

.c3-node b {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: #fff;
}

.c3-node span {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  color: #ff86c8;
}

.c3-wire {
  position: relative;
  flex: 1 1 auto;
  min-width: 48px;
  height: 3px;
  margin: 0 8px;
  background: repeating-linear-gradient(90deg, #6f6887 0 6px, transparent 6px 10px);
}

.c3-wire i {
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  background: #4dff88;
  box-shadow: 0 0 6px #4dff88;
  animation: c3-packet 2.6s linear infinite;
}

.c3-wire i:nth-child(2) {
  background: #63f5ff;
  box-shadow: 0 0 6px #63f5ff;
  animation-direction: reverse;
  animation-delay: -1.2s;
}

.c3-wire i:nth-child(3) {
  background: #ff86c8;
  box-shadow: 0 0 6px #ff86c8;
  animation-delay: -0.8s;
  animation-duration: 3.4s;
}

@keyframes c3-packet {
  from {
    left: 0;
  }
  to {
    left: calc(100% - 8px);
  }
}

@keyframes c3-packet-v {
  from {
    top: 0;
  }
  to {
    top: calc(100% - 8px);
  }
}

/* narrow phones: the horizontal link overflows, stack the venues */
@media screen and (max-width: 480px) {
  .c3-link {
    flex-direction: column;
    align-items: stretch;
    width: max-content;
    max-width: 100%;
  }

  .c3-wire {
    align-self: center;
    flex: 0 0 auto;
    width: 3px;
    min-width: 0;
    height: 56px;
    margin: 8px 0;
    background: repeating-linear-gradient(180deg, #6f6887 0 6px, transparent 6px 10px);
  }

  .c3-wire i {
    top: auto;
    left: -3px;
    animation-name: c3-packet-v;
  }
}

/* ---- arcade call to action: the circular logo is the coin ---- */
.c3-arcade {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.2rem;
  cursor: pointer;
}

.c3-coin {
  width: 140px;
  height: 140px;
  perspective: 700px;
  animation: c3-bob 2.4s steps(4) infinite;
}

.c3-coin-face {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #1b1628 0 61%, #d6579a 62% 69%, #fff 70% 100%);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(255, 105, 246, 0.45);
  animation: c3-spin 3.6s linear infinite;
}

.c3-coin-face img {
  width: 74%;
  height: auto;
}

@keyframes c3-spin {
  0% {
    transform: rotateY(0);
  }
  55%, 100% {
    transform: rotateY(360deg);
  }
}

@keyframes c3-bob {
  50% {
    transform: translateY(-6px);
  }
}

.c3-slot {
  position: relative;
  width: 96px;
  height: 14px;
  margin-top: 16px;
  background: #0a0a0a;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #d6579a;
}

.c3-slot::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: #ff69f6;
  box-shadow: 0 0 6px #ff69f6;
}

.c3-insert {
  min-height: 1.6em;
  margin-top: 16px;
  font-size: 14px;
  color: #ffd84a;
}

.c3-arcade.is-inserted .c3-coin {
  animation: c3-drop 0.8s steps(8) forwards;
}

@keyframes c3-drop {
  60% {
    opacity: 1;
    transform: translateY(96px) scale(0.8, 0.8);
  }
  100% {
    opacity: 0;
    transform: translateY(128px) scale(0.6, 0.15);
  }
}

.c3-credit {
  margin-top: 1.2rem;
  font-size: 11px;
  color: #9791ad;
}

.c3-credit b {
  font-weight: 400;
  color: #4dff88;
}

/* ---- small screens ---- */
@media screen and (max-width: 768px) {
  .c3-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .c3-prog {
    --rail: 18px;
    --gap: 22px;
  }

  .c3-sched {
    grid-template-columns: var(--rail) 1fr;
  }

  .c3-sched::before {
    top: 4px;
  }

  .c3-sched:not(:last-child)::after {
    top: 10px;
    bottom: calc(-10px - var(--gap));
  }

  .c3-sched-time {
    grid-column: 2;
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 10px 18px;
    padding: 0;
    text-align: left;
  }

  .c3-sched-time time {
    font-size: 15px;
  }

  .c3-sched-time span {
    margin: 0;
  }

  .c3-sched-card {
    grid-column: 2;
    margin-left: 18px;
    padding: 14px 14px 15px;
  }

  .c3-sched-title,
  .c3-sched[data-kind="ctf"] .c3-sched-title {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c3-blink,
  .c3-ticker-track,
  .c3-coin,
  .c3-coin-face,
  .c3-gift-box,
  .c3-wire i {
    animation: none !important;
  }

  .c3-sched-card {
    transition: none;
  }

  .c3-ticker {
    white-space: normal;
  }

  .c3-ticker-track {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 12px;
  }

  .c3-bar {
    transition: none;
  }

  .c3-wire i:not(:first-child) {
    display: none;
  }
}
