@import url("https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap");

// TODO: consider removing Roboto and using Google Sans everywhere
@import url("//fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

@import "_variables.scss";

@import "normalize.scss";
@import "nav.scss";
@import "headings.scss";
@import "forms.scss";
@import "grid.scss";
@import "widgets.scss";
@import "sidebar.scss";
@import "footer.scss";
@import "syntax-dora.scss";
@import "search-input.scss";
@import "sponsors.scss";
@import "awards.scss";

:root {
  font-family: "Google Sans Flex", Arial, Helvetica, sans-serif;
  font-weight: 300;
  font-style: normal;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-padding-top: var(--header-height);
  scrollbar-gutter: stable;
}

body {
  color: var(--dora-black);
  min-height: 100vh;
  margin: 0;
  padding: 0;

  // use flex so footer sticks to bottom of page
  display: flex;
  flex-direction: column;

  main {
    flex-grow: 1;
    max-width: $layout-breakpoint-max;
    padding: 1.5rem 4rem 0.5rem 4rem;
    margin: auto;

    li {
      font-family: $font-roboto;
      font-weight: 300;

      strong,
      b,
      a {
        font-family: $font-google-sans;
        font-weight: 500;
      }
    }

    @include media-medium {
      padding: 0.75em;
      width:100%;
      margin:0;
    }

    @include media-small {
      padding: 0.5em;
      width:100%;
      margin:0;
    }
  }
}

p,
.paragraph,
select {
  font-family: $font-roboto;
  font-weight: 300;
  margin: 0;
  margin-bottom: 0.5rem;
  font-size: 1em;

  @include media-medium {
    line-height: 1.35;
  }
}

p > strong {
  font-weight: 500;
}

a {
  color: $color-link;

  &:hover {
    color: $color-link-hover;
  }
  &:focus {
    color: $color-link-focus;
  }
}

.navContainer {
  display: flex;
  align-items: center;
  height: var(--header-height);
  z-index: 100;

  .dora-logo {
    margin: 2px 8px;
  }
}

.capitalize {
  text-transform: capitalize;
}

section.banner {
  background-color: var(--dora-primary-light);

  &.yellow {
    background-color: var(--dora-spotlight-yellow);
  }

  &.blue {
    background-color: var(--dora-sky-blue);
  }

  &.red {
    background-color: var(--dora-vermillion);
  }

  &.purple {
    background-color: var(--dora-mauve);
  }

  a {
    color: var(--dora-primary-dark);
    &:hover {
      color: var(--dora-primary-light);
    }
  }

  .content {
    display: flex;
    max-width: $layout-breakpoint-max;
    margin: 2em auto 1em auto;
    line-height: 1.75;
    padding: 1em 0;

    article {
      padding: 1em 0.5em;
      margin: auto 0;
      h1 {
        font-size: calc(min(72px,12vw));
        font-weight: 600;
      }

      p {
        font-family: $font-google-sans;
        line-height: 1.35;
        font-weight: 500;
        font-size: calc(clamp(12px, 5vw, 16px));
      }
    }

    div.highlightImageContainer {
      margin-left: 2em;
      margin-top: 2em;
    }

    img.highlight {
      max-width: 24em;
      max-height: 18em;
      margin-right: -6em;

      @include media-large {
        display: none;
      }
    }
  }
}

.pagefooter {
  display: flex;
  flex-direction: row;
  margin-top: 3em;
  border-top: 1px solid $border-light;

  @include media-medium {
    flex-direction: column;
  }

  div {
    margin: 2rem;

    @include media-medium {
      margin: 0.5rem 1rem;
    }

    &:has(h2) {
      min-width: 25%;
      flex-grow: 1;
    }
  }
}

.google-material-icons {
  font-family: "Google Material Icons";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  cursor: pointer;
}

.source-available-repo {
  text-decoration: none;
  color: #5b5e66;
}

.source-available-project {
  a {
    text-decoration: none;
    color: #202124;
  }

  .google-material-icons {
    font-size: 14px;
    text-decoration: none;
  }
}

.updated {
  font-size: 12px;
  color: $color-text-light;
  font-weight: 200;
}

figcaption {
  text-align: center;
  font-size: 0.8em;
  margin-top: 0.2rem;
  color: var(--grey-50);
  margin-bottom: 0.8rem;
}
