@import url(
  "https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap"
);


/* =================================================
   CONTROLS
================================================= */

:root {
  --green: #195c33;
  --orange: #de7628;
  --white: #ffffff;
  --grey: #b7b7b7;
  --yellow: #f0c52e;

  --font-family:
    "Space Grotesk",
    Arial,
    sans-serif;

  /* Main column */
  --column-width: 760px;
  --page-gutter: 36px;

  /* Page spacing */
  --content-top: 70px;
  --content-bottom: 120px;

  /* ARGE FC title */
  --main-title-size: clamp(72px, 8vw, 118px);

  /* Edition title */
  --edition-title-size: clamp(18px, 2.1vw, 28px);
  --edition-title-line-height: 1;

  /* Edition note */
  --note-size: clamp(19px, 2vw, 25px);
  --note-line-height: 1.45;

  /* Footer */
  --footer-size: 13px;
  --footer-padding: 9px;

  /* Confetti */
  --confetti-opacity: 0.75;
  --confetti-width: 8px;
  --confetti-height: 15px;
}


/* =================================================
   BASE
================================================= */

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background-color: var(--white);
}

body {
  position: relative;

  display: flex;
  flex-direction: column;

  min-height: 100vh;
  min-height: 100svh;
  margin: 0;

  overflow-x: hidden;

  color: var(--green);
  background-color: var(--white);

  font-family: var(--font-family);
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}


/* =================================================
   CONFETTI
================================================= */

.confetti {
  display: none;
}

body.is-winner .confetti {
  position: fixed;
  z-index: 0;
  inset: 0;

  display: block;

  overflow: hidden;
  pointer-events: none;
}

.confetti span {
  position: absolute;

  top: -40px;
  left: var(--x);

  width: var(--confetti-width);
  height: var(--confetti-height);

  opacity: var(--confetti-opacity);
  background-color: var(--orange);

  animation:
    confetti-fall
    var(--duration)
    linear
    var(--delay)
    infinite;

  will-change: transform;
}


/* Confetti colors */

.confetti span:nth-child(3n) {
  background-color: var(--green);
}

.confetti span:nth-child(5n) {
  background-color: var(--grey);
}

.confetti span:nth-child(7n) {
  background-color: var(--yellow);
}


/* Confetti shapes */

.confetti span:nth-child(2n) {
  width: 13px;
  height: 6px;
}

.confetti span:nth-child(4n) {
  width: 5px;
  height: 18px;
}

.confetti span:nth-child(6n) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.confetti span:nth-child(9n) {
  border-radius: 999px;
}


@keyframes confetti-fall {
  0% {
    transform:
      translate3d(0, -8vh, 0)
      rotate(0deg);
  }

  20% {
    transform:
      translate3d(28px, 20vh, 0)
      rotate(calc(var(--rotation) * 0.2));
  }

  40% {
    transform:
      translate3d(-20px, 44vh, 0)
      rotate(calc(var(--rotation) * 0.4));
  }

  60% {
    transform:
      translate3d(24px, 68vh, 0)
      rotate(calc(var(--rotation) * 0.6));
  }

  80% {
    transform:
      translate3d(-16px, 91vh, 0)
      rotate(calc(var(--rotation) * 0.8));
  }

  100% {
    transform:
      translate3d(12px, 115vh, 0)
      rotate(var(--rotation));
  }
}


/* =================================================
   CONTENT
================================================= */

.content {
  position: relative;
  z-index: 2;

  flex: 1;

  width: min(
    calc(100% - (var(--page-gutter) * 2)),
    var(--column-width)
  );

  margin-inline: auto;

  padding:
    var(--content-top)
    0
    var(--content-bottom);
}


/* =================================================
   ARGE FC TITLE
================================================= */

h1 {
  margin:
    0
    0
    clamp(90px, 13vw, 170px);

  font-size: var(--main-title-size);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.055em;
}

.back-link {
  display: inline-block;

  transition:
    color 180ms ease,
    transform 380ms cubic-bezier(.22, 1, .36, 1);
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--orange);
  transform: translateX(6px);
}

.back-link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}


/* =================================================
   EDITION TITLE
================================================= */

.edition-header {
  margin-bottom: clamp(30px, 4vw, 48px);
}

h2 {
  max-width: 100%;
  margin: 0;

  font-size: var(--edition-title-size);
  font-weight: 700;
  line-height: var(--edition-title-line-height);
  letter-spacing: -0.025em;

  white-space: nowrap;
}


/* =================================================
   TEAM IMAGES
================================================= */

.edition-image {
  margin: 0;
}

.edition-image + .edition-image {
  margin-top: clamp(30px, 5vw, 60px);
}

.image-frame {
  position: relative;
  overflow: hidden;

  background-color: var(--grey);
}

.team-image {
  display: block;

  width: 100%;
  height: auto;
}


/* =================================================
   EDITION NOTE
================================================= */

.edition-note {
  max-width: 700px;

  margin-top: clamp(30px, 4vw, 48px);
  margin-bottom: clamp(42px, 6vw, 72px);
}

.edition-note p {
  margin: 0;

  color: var(--grey);

  font-size: var(--note-size);
  font-weight: 600;
  line-height: var(--note-line-height);
  letter-spacing: -0.02em;

  text-wrap: pretty;
}

.trikot {
  color: var(--green);
}

.trikot:hover,
.trikot:focus-visible {
  color: var(--orange);
}

.trikot:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}


/* =================================================
   FOOTER
================================================= */

.site-footer {
  position: relative;
  z-index: 3;

  width: 100%;

  padding:
    var(--footer-padding)
    0;

  color: var(--white);
  background-color: var(--grey);
}

.site-footer p {
  width: min(
    calc(100% - (var(--page-gutter) * 2)),
    var(--column-width)
  );

  margin: 0 auto;

  color: inherit;

  font-size: var(--footer-size);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;

  text-align: center;
}

.footer-link {
  color: var(--white);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--green);
}

.footer-link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}


/* =================================================
   TABLET
================================================= */

@media (max-width: 1000px) and (min-width: 701px) {
  :root {
    --column-width: 680px;
    --page-gutter: clamp(40px, 7vw, 70px);

    --main-title-size: clamp(70px, 10vw, 105px);

    --edition-title-size: clamp(18px, 2.7vw, 26px);
    --note-size: clamp(19px, 2.7vw, 23px);

    --confetti-width: 7px;
    --confetti-height: 13px;
  }
}


/* =================================================
   MOBILE
================================================= */

@media (max-width: 700px) {
  :root {
    --column-width: 560px;
    --page-gutter: clamp(26px, 7vw, 40px);

    --content-top: 52px;
    --content-bottom: 100px;

    --main-title-size: clamp(62px, 18vw, 84px);

    /* Keeps the complete edition name on one line */
    --edition-title-size: clamp(15px, 4.4vw, 19px);
    --edition-title-line-height: 1;

    --note-size: clamp(18px, 5vw, 20px);
    --note-line-height: 1.42;

    --footer-size: clamp(10px, 3vw, 12px);
    --footer-padding: 11px;

    --confetti-opacity: 0.58;
    --confetti-width: 5px;
    --confetti-height: 11px;
  }

  h1 {
    margin-bottom: 90px;
  }

  .edition-header {
    margin-bottom: 28px;
  }

  .edition-note {
    margin-top: 30px;
    margin-bottom: 42px;
  }

  .site-footer {
    padding:
      var(--footer-padding)
      0
      calc(
        var(--footer-padding) +
        env(safe-area-inset-bottom)
      );
  }

  .site-footer p {
    text-wrap: balance;
  }
}


/* =================================================
   VERY NARROW PHONES
================================================= */

@media (max-width: 360px) {
  :root {
    --edition-title-size: 14px;
  }
}


/* =================================================
   REDUCED MOTION
================================================= */

@media (prefers-reduced-motion: reduce) {
  .back-link {
    transition: none;
  }
}
