:root {
  /* Vertical ratio */
  --ratio: 1.5;
  /* Default font size in any browser */
  --s0:  1rem;
  /* Positive harmonic scale, s1 = 1.5 */
  --s1: calc(var(--s0) * var(--ratio));
  --s2: calc(var(--s1) * var(--ratio));
  --s3: calc(var(--s2) * var(--ratio));
  --s4: calc(var(--s3) * var(--ratio));
  /* Negative harmonic scale */
  --s-1: calc(var(--s0) / var(--ratio));
  --s-2: calc(var(--s-1) / var(--ratio));
  --s-3: calc(var(--s-2) / var(--ratio));
  --s-4: calc(var(--s-3) / var(--ratio));

  /* Colors */
  --white: hsl(0, 0%, 100%);
  --black: hsl(0, 0%, 0%);
  --gray: hsla(0, 0%, 82%, 0.4);
  --text: hsla(0, 0%, 97%, 0.7);
  --yellow: hsl(45, 99%, 60%);

  /* Max width measure */
  --max-measure: 135ch;

  /* Viewport dependent font size */
  /* font-size: calc(var(--s0) + 0.5vw); */

  font-family: "Roboto Condensed", sans-serif;
  font-weight: 500;
  color: var(--text);
  line-height: var(--ratio);
}

* {
  /* Count border inside box */
  box-sizing: border-box;
  /* Prevent wide text */
  max-inline-size: var(--max-measure);
}

/* Fix MacOS font smoothing. */
body {
  -webkit-font-smoothing: antialiased;
}

/* Override max measure */
html,
body,
div,
header,
nav,
main,
footer,
cluster {
  max-inline-size: none;
}

h1 {
  font-size: var(--s2);
  color: var(--white);
}

h2 {
  font-size: var(--s1);
  color: var(--white);
}

h3 {
  font-size: var(--s0);
  color: var(--white);
}

/* Vertical stack */
.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  
}

/* Reset vertical margins (> * stop recursion) */
.stack > * {
  margin-block: 0;
}

/* Add marging start fron 2nd element  (> * + * stop recursion) */
.stack > * + * {
  margin-block-start: var(--s2);
}

/* Shorter stack */
.stack.short > * + * {
  margin-block-start: var(--s-1);
}

/* Box */
.box {
  border: 1px solid var(--gray);
  border-radius: 5px;
}

/* Force colors on all elements */
.box * {
  color: inherit;
}

/* Invert colors */
.box.invert {
  filter: invert(100%);
}

/* Center */
center, .center {
  box-sixing: content-box;
  max-inline-size: var(--max-measure);
  margin-inline: auto;
  padding-inline-start: var(--s1);
  padding-inline-end: var(--s1);
}

/* Cluster */
cluster, .cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  justify-content: space-between;
  align-items: center;
}

/* Frame */
/* Supports single child, img or video */
/* Pick aspect ratio (16/9, 4/3, 1/1) */
.frame {
  --n: 4;
  --d: 3;
  aspect-ratio: var(--n) / var(--d);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.frame > img,
.frame > video,
.frame > iframe {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* Icon */
.icon {
  height: 2cap;
  width: 2cap;
  color: var (--white);

  &:hover {
    opacity: 0.8;
  }
}

/* --- */

/* Custom */
body {
  background-color: var(--black);
  padding: clamp(var(--s0), 2vw, var(--s2));
}

.center {
  padding: clamp(0, 2vw, var(--s1));
}

body.home {
  background-image: url('/img/background.webp');
  background-repeat: no-repeat;
  background-position: center calc(80% + var(--s1));
  background-size: cover;
}

body.narrow {
  --max-measure: 100ch;
}

a {
  color: var(--white);
  text-decoration: none;
}

a.button {
  display: block;
  background-color: var(--yellow);
  font-family: "Inter", sans-serif;
  font-weight: 700;
  color: var(--black);
  padding: var(--s0) var(--s1);
  border-radius: 5px;
  text-decoration: none;
  text-align: center;

  &:hover {
    text-decoration: none;
    opacity: 0.8;
  }
}

.cta {
  font-family: "Arial", sans-serif;
  text-align: center;
  color: var(--white);

  a {
    text-decoration: underline;

    &:hover {
      text-decoration: none;
    }
  }
}

.banner {
  text-align: center;
  background-color: var(--yellow);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;

  h3 {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    color: var(--black);
    margin: var(--s-1) auto;
  }

  a {
    color: var(--black);

    &:hover {
      opacity: 0.8;
    }
  }
}

header {
  .logo {
    width: 100%;
  }

  nav.cluster {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: clamp(var(--s0), 2vw, var(--s1));
    gap: clamp(var(--s-3), 1vw, var(--s1));
    justify-content: space-around;

    a {
      border-bottom: 2px solid transparent;
      transition: border-bottom-color 0.4s ease;
    }

    a:hover,
    .current {
      border-bottom-color: var(--yellow);
    }
  }
}

.home {
  .empty {
    height: calc(30 * var(--s0) + 30vw);
  }
}

.cards.cluster {
  justify-content: flex-start;
  align-items: center;

  /* Switch to center on smaller screens */
  @media (width < 1024px) {
    justify-content: center;
  }

  img {
    /* Src image is 400px at x2 */
    width: 200px;
    /* Cut embedded border out of image */
    object-fit: cover;
    clip-path: inset(2px);
  }

  h2 {
    line-height: var(--s1);
    /* margin-top: var(--s1); */
    color: var(--white);
    white-space: nowrap;
  }

  a:hover {
    opacity: 0.8;
  }

  ul, li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .icon {
    width: 1.2cap;
    height: 1.2cap;
    color: var(--white);
  }

  .button {
    margin-top: calc(2 * var(--s0));
  }

  .box {
    padding: var(--s1);
  }

  .social.cluster {
    align-items: center;

    h3 {
      line-height: 0;
      font-weight: 500;
      color: var(--white);
    }
  }

  .icons.cluster {
    gap: var(--s-2);
  }
}

.cards.fighters.cluster {
  & > * {
    flex: 0 0 250px;
    height: calc(22 * var(--s0));
  }

  /* Drop inset */
  .box img {
    object-fit: fill;
    clip-path: inset(0px);
  }

  /* Add margin to main profile pic */
  .box > img {
    margin-bottom: var(--s0);
  }
}

.cols {
  align-items: flex-start;

  & > * {
    max-inline-size: 60ch;
  }
}

footer {
  font-size: var(--s-1);
  font-family: "Arial", sans-serif;

  ul, li {
    all: unset;
  }

  nav.cluster {
    justify-content: space-around;
    align-items: center;
    gap: var(--s1) var(--s4);
  }

  nav ul:first-child li:first-child .icon {
    width: 2.5cap;
    height: 2.5cap;
  }

  nav ul:nth-child(2) li {
    padding: var(--s-3) var(--s-1);
  }

  nav ul:last-child a {
    color: var(--white);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;

    &:hover {
      border-bottom-color: var(--white);
    }
  }
}

