/* Reset  */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  font-size: 62.5%;
}

body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

body {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.5;
}

h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

h1, h2, h3, h4 {
  text-wrap: balance;
  margin: 4ex 0 2ex;
}

h1 {
  margin-top: 0;
  font-size: 3.4rem;
}
h2 {
  font-size: 2.6rem;
}
h3 {
  font-size: 2.2rem;
}
h4 {
  font-size: 2rem;
}

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

:target {
  scroll-margin-block: 5ex;
}


/* Axioms */

:root {
  --measure: 70ch;
}

* {
  max-inline-size: var(--measure);
}

html,
body,
div,
header,
nav,
main,
footer {
  max-inline-size: none;
}

.max-inline-size\:measure {
  max-inline-size: var(--measure);
}

.max-inline-size\:measure\/2 {
  max-inline-size: calc(var(--measure) / 2);
}


/* BASE STYLES */

:root {
  --accent: #38bea6;
  --accent2: #51d8cc;
  --light: #e8f5f2;
}

body {
  font-family: sans-serif;
  background: var(--light);
}

.page {
  margin: 4rem auto;
  padding: 2.5rem 4rem 4rem;
  background-color: #fff;
  border-radius: 2.5rem;
  border: .4rem solid var(--accent);
}

.page-title {
  margin-bottom: 8rem;
  text-align: center;
  .subtitle {
    font-weight: normal;
  }
}

h2, h3 {
  font-weight: bold;
  color: var(--accent);
  color: oklch(from var(--accent) calc(l * .9) c h);
}

a {
  color: var(--accent);
  color: oklch(from var(--accent) calc(l * .9) c h);
  &:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: .4rem;
  }
}

ol, ul {
  padding-left: 1.3em;
}
li::marker {
  color: var(--accent);
}

ul > li {
  list-style-type: disc;
}


/* language menu */

.languages {
  ul {
    margin: 0 0 6rem;
    padding: 0;
    list-style: none;
    text-transform: uppercase;
    font-weight: bold;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1em;
    li {
      list-style: none;
    }
  }
  a {
    display: block;
    text-decoration: none;
    font-size: 0.85em;
    &:hover,
    &:focus-visible {
      color: #000;
    }
  }
  .active {
    a {
      color: #000;
      border-bottom: 2px solid;
    }
  }
}

/* content (global) */

.page-content {
  hyphens: auto;
  p, ul, ol {
    margin-top: 2ex;
  }
}


/* "team" block */

.team {
  margin: 4rem 0;
}
.team-name {
  margin-left: 3rem;
  padding: 0 3rem;
  background: transparent url('../svg/users.svg') no-repeat 0 0 / 1em auto scroll;
}
.team-members {
  padding: 3rem;
  background-color: var(--light);
  border-radius: 1.5rem;
}
.team-member {
  clear: both;
}
.team-member + .team-member {
  margin-top: 6rem;
}
.team-member-photo {
  float: right;
  margin: -1.5rem -4.5rem 1rem 3rem;
  img {
    display: block;
    width: 18rem;
    border-radius: 1rem;
    box-shadow: 0 .5rem 2rem -.5rem rgba(0,0,0,.5);
    border-top: 1px solid #fff;
    border-left: 1px solid rgba(255,255,255,.25);
    border-right: 1px solid rgba(255,255,255,.25);
    border-bottom: 1px solid rgba(0,0,0,.35);
  }
}
.team-member-name {
  margin: 0;
}
.team-member-bio {
  text-align: justify;
  color: oklch(from var(--accent) calc(l * 0.5) c h);
  a {
    color: oklch(from var(--accent) calc(l * 0.85) c h);
  }
}


/* "partners" block */

.partners-wrapper {
  --logo-max-width: 16rem;
  --logo-max-height: 8rem;

  margin: 6em 0 0;
}
.partners-heading {
  text-align: center;
  margin-bottom: 2em;
  position: relative;
  span {
    position: relative;
    display: inline-block;
    padding: 0 .5em;
    &::before,
    &::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 100%;
      height: 0.4rem;
      width: 20%;
      background-color: var(--accent);
      border-radius: 1rem;
    }
    &::after {
      left: auto;
      right: 100%;
    }
  }
}
.partners-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: space-around;
}
.partner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  list-style: none;
  max-width: var(--logo-max-width);
  max-height: var(--logo-max-height);
  line-height: 1.2;
  position: relative;
  cursor: default;

  &:has(.partner-logo) {
    a.partner-name {
      position: absolute;
      inset: 0;
      z-index: 1;
      text-decoration: none;
      color: oklch(from var(--accent) calc(l * .9) c h);
    }
    .partner-name em {
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      clip-path: inset(50%);
      position: absolute;
      white-space: nowrap;
    }
  }

  &:not(:has(.partner-logo)) {
    color: #fff;
    background-color: oklch(from var(--accent) calc(l * 0.75) c h);
    border-radius: .5em;
    .partner-name {
      padding: 0 .5em;
      line-height: 1;
    }
  }

  a.partner-name {
    color: #fff;
  }
  .partner-name em {
    font-style: normal;
  }
}
.partner-logo {
  img {
    display: block;
    max-width: var(--logo-max-width);
    max-height: var(--logo-max-height);
  }
}


/* "resource" blocks */

.resource {
  margin-top: 4rem;
  padding: 2rem 3rem 3rem 6rem;
  background-color: var(--light);
  border-radius: 1.5rem;
  position: relative;
}
.resource-icon {
  position: absolute;
  left: 2rem;
  top: 1.9rem;
  z-index: 1;
  svg {
    display: block;
    width: 2.8rem;
    aspect-ratio: 1;
    stroke: oklch(from var(--accent) l calc(c * 0.6) h);
  }
}
.resource-name {
  margin: 0 0 2rem;
}
.resource-description {
  margin: 0 0 2rem;
}
.resource-icon + .resource-description p:first-child {
  margin-top: 0;
}
.resource-player {
  iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 .5rem 2rem -.5rem rgba(0,0,0,.35);
    border-top: 1px solid #fff;
    border-left: 1px solid rgba(255,255,255,.25);
    border-right: 1px solid rgba(255,255,255,.25);
    border-bottom: 1px solid rgba(0,0,0,.35);
  }
}
.resource-files {
  margin: 0;
  list-style: none;
  li + li {
    margin-top: 2rem;
  }
}
.resource.has-deco {
  padding-right: calc(3rem + 25%);
}
.resource-deco {
  position: absolute;
  inset: 1rem;
  left: auto;
  z-index: 1;
  width: 25%;
  img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: .75rem;
    overflow: hidden;
  }
}


/* responsive */

@media screen and (width < 800px) {
  .page {
    max-inline-size: none;
    margin: 4rem;
  }
}

@media screen and (width < 660px) {
  body {
    background-color: var(--accent);
    background-image: linear-gradient(to top, var(--accent2), var(--accent));
  }
  .page {
    margin: 1rem;
    border: none;
  }
}

@media screen and (width < 500px) {
  html {
    font-size: 58%;
  }
  .page {
    padding: 2rem 2rem 4rem;
  }
  .team-member-photo {
    margin: 0 0 3rem;
    float: none;
    img {
      margin: 0 auto;
    }
  }
  .team-member-bio {
    text-align: left;
  }
  .resource,
  .resource.has-deco {
    padding-right: 2rem;
  }
  .resource.has-deco {
    padding-bottom: 2rem;
  }
  .resource-deco {
    position: static;
    width: auto;
    margin-top: 2rem;
    text-align: right;
    line-height: 0;
    img {
      display: inline;
      width: 45%;
      position: static;
    }
  }
}
@media screen and (width < 360px) {

  .languages {
    ul {
      display: block;
      text-align: right;
    }
    li a {
      display: inline-block;
      margin-bottom: 1rem;
    }
  }
  .resource {
    padding-left: 2rem;
  }
  .resource-icon {
    display: none;
  }
  .resource-deco {
    img {
      width: 50%;
    }
  }
}
