/*
 * Copyright 2020 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

:root {
  /* WARP Colors */
  --blue: #28485d;
  --green: #38807c;
  --light-blue: #b6ebfc;
  --light-gray: #e3e3e3;
  --red: #d61f1f;
  --red-dark: #8e0505;
  --yellow: #ebdd71;


  /* colors */
  --link-color: var(--green);
  --link-hover-color: #136ff6;
  --background-color: white;
  --light-color: #eee;
  --dark-color: #ccc;
  --text-color: black;

  /* fonts */
  --body-font-family: roboto, roboto-fallback;
  --heading-font-family: var(--body-font-family);
  --fixed-font-family: 'Roboto Mono', menlo, consolas, 'Liberation Mono', monospace;

  /* body sizes */
  --body-font-size-m: 22px;
  --body-font-size-s: 18px;
  --body-font-size-xs: 16px;

  /* heading sizes */
  --heading-font-size-xxl: 48px;
  --heading-font-size-xl: 40px;
  --heading-font-size-l: 32px;
  --heading-font-size-m: 24px;
  --heading-font-size-s: 20px;
  --heading-font-size-xs: 18px;

  /* nav height */
  --nav-height: 90px;
}

@font-face {
  font-family: roboto-fallback;
  size-adjust: 100.06%;
  ascent-override: 95%;
  src: local('Arial');
}

@media (width >= 900px) {
  :root {
    --heading-font-size-xxl: 60px;
    --heading-font-size-xl: 48px;
    --heading-font-size-l: 36px;
    --heading-font-size-m: 30px;
    --heading-font-size-s: 24px;
    --heading-font-size-xs: 22px;
  }
}

body {
  font-size: var(--body-font-size-m);
  margin: 0;
  font-family: var(--body-font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  display: none;
}

body.appear {
  display: block;
}

header {
  height: var(--nav-height);
}

h1, h2, h3,
h4, h5, h6 {
  font-family: var(--heading-font-family);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1em;
  margin-bottom: .5em;
  scroll-margin: calc(var(--nav-height) + 1em);
}

h1 { font-size: var(--heading-font-size-xxl) }
h2 { font-size: var(--heading-font-size-xl) }
h3 { font-size: var(--heading-font-size-l) }
h4 { font-size: var(--heading-font-size-m) }
h5 { font-size: var(--heading-font-size-s) }
h6 { font-size: var(--heading-font-size-xs) }

p, dl, ol, ul, pre, blockquote {
  margin-top: 1em;
  margin-bottom: 1em;
}

code, pre {
  font-family: var(--fixed-font-family);
  font-size: var(--body-font-size-s);
}

code {
  padding: .125em;
}

pre {
  overflow: scroll;
}

main pre {
  background-color: var(--light-color);
  padding: 1em;
  border-radius: .25em;
  overflow-x: auto;
  white-space: pre;
}

/* links */
a:any-link {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--link-hover-color);
}

/* buttons */
a.button:any-link, button {
  font-family: var(--body-font-family);
  display: inline-block;
  box-sizing: border-box;
  text-decoration: none;
  border: 2px solid transparent;
  padding: 5px 30px;
  text-align: center;
  font-style: normal;
  font-weight: 600;
  cursor: pointer;
  color: var(--background-color);
  background-color: var(--link-color);
  margin: 16px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 30px;
}

a.button:hover, a.button:focus, button:hover, button:focus  {
  background-color: var(--link-hover-color);
  cursor: pointer;
}

button:disabled, button:disabled:hover {
  background-color: var(--light-color);
  cursor: unset;
}

a.button.secondary, button.secondary {
  background-color: unset;
  border: 2px solid currentcolor;
  color: var(--text-color)
}

main img {
  max-width: 100%;
  width: auto;
  height: auto;
}

.icon {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.icon img {
  height: 100%;
  width: 100%;
}

/* sections */
main .section {
  padding: 64px 16px;
}

@media (width >= 600px) {
  main .section {
    padding: 64px 32px;
  }
}

@media (width >= 900px) {
  .section > div {
    max-width: 1200px;
    margin: auto;
  }
}

/* section metadata */
main .section.light,
main .section.highlight {
  background-color: var(--light-color);
}

body .section[data-userstate='logged-in'] {
  display: none;
}

body.logged-in .section[data-userstate='logged-in'] {
  display: block;
}


.section[data-modal='true'] {
  display: none;
  position: fixed;
  overflow: scroll;
  top: 0;
  left: 25%;
  width: 50%;
  height: 80vh;
  z-index: 30;
  padding: 50px;

  &.open {
    display: block;
  }

  button.close {
    position: absolute;
    top: 10px;
    right: -15px;
    background-color: var(--green);
    mask-image: url("/icons/close.svg");
    mask-repeat: no-repeat;
    mask-size: contain;
    cursor: pointer;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 0;
    text-overflow: unset;
  }
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 50%);
  z-index: 20;
}

/* Section Columns */
/*  stylelint-disable no-descending-specificity */

@media (width >= 900px ) {
  main .section[data-layout] .layout-wrapper {
    flex-direction: row;
    display: flex;
  }

  main .section[data-layout="50/50"] .layout-wrapper > div {
    flex: 0 1 calc(50% - 20px);
    margin-right: 20px;
  }
  
  main .section[data-layout="40/60"] .layout-wrapper > div {
    flex: 0 1 60%;

    &:first-of-type {
      flex: 0 1 calc(40% - 20px);
      margin-right: 20px;
    }
  }
  
  main .section[data-layout="60/40"] .layout-wrapper > div {
    flex: 0 1 40%;

    &:first-of-type {
      flex: 0 1 calc(60% - 20px);
      margin-right: 20px;
    }
  }

  main .section[data-layout="70/30"] .layout-wrapper > div {
    flex: 0 1 30%;

    &:first-of-type {
      flex: 0 1 calc(70% - 20px);
      margin-right: 20px;
    }
  }

  main .section[data-layout="30/70"] .layout-wrapper > div {
    flex: 0 1 70%;

    &:first-of-type {
      flex: 0 1 calc(30% - 20px);
      margin-right: 20px;
    }
  }
  
  main .section[data-layout="25/75"] .layout-wrapper > div {
    flex: 0 1 75%;

    &:first-of-type {
      flex: 0 1 calc(25% - 20px);
      margin-right: 20px;
    }
  }
  
  main .section[data-layout="75/25"] .layout-wrapper > div {
    flex: 0 1 25%;

    &:last-of-type {
      flex: 0 1 calc(75% - 20px);
      margin-right: 20px;
    }
  }

  main .section[data-layout="80/20"] .layout-wrapper > div {
    flex: 0 1 20%;

    &:first-of-type {
      flex: 0 1 calc(80% - 20px);
      margin-right: 20px;
    }
  }

  main .section[data-layout="20/80"] .layout-wrapper > div {
    flex: 0 1 80%;

    &:first-of-type {
      flex: 0 1 calc(20% - 20px);
      margin-right: 20px;
    }
  }
}