/*
 * 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 {
  /* colors */
  --highlight-color: #ad0368;
  --highlight-color-dark: #850050;
  --highlight-color-alt-1: #6bcbca;
  --highlight-color-alt-2: #ffca3a;
  --link-color: var(--highlight-color);
  --link-hover-color: var(--highlight-color-dark);
  --background-color: #fff;
  --background-color-light: #f3f3f3;
  --background-color-inverted: #303030;
  --light-color: #eee;
  --dark-color: #ccc;
  --text-color: #404040;
  --text-color-inverted: #fff;

  /* fonts */
  --body-font-family: 'Josefin Slab', josefin-slab-fallback, serif;
  --heading-font-family: 'Josefin Sans', josefin-sans-fallback, sans-serif;
  --fixed-font-family: 'Roboto Mono', menlo, consolas, 'Liberation Mono', monospace;

  /* body sizes */
  --body-font-size-l: 24px;
  --body-font-size-m: 20px;
  --body-font-size-s: 18px;
  --body-font-size-xs: 16px;
  --body-font-size-xxs: 14px;

  /* heading sizes */
  --heading-font-size-xxl: 2.2em;
  --heading-font-size-xl: 1.7em;
  --heading-font-size-l: 1.4em;
  --heading-font-size-m: 1.2em;
  --heading-font-size-s: 1.1em;
  --heading-font-size-xs: 1em;

  /* graph colors */
  --graph-color-green: #80c9c5;
  --graph-color-forest: #80c9a1;
  --graph-color-lime: #a0c274;
  --graph-color-brown: #af9075;
  --graph-color-rose: #d77d8a;
  --graph-color-blue: #73b2cf;
  --graph-color-purple: #808ec9;
  --graph-color-pink: #c989a9;
  --graph-color-orange: #e79965;
  --graph-color-navy: #5d6977;
  --graph-color-red: #e96161;

  /* nav height */
  --nav-height: 74px;

  /* grid */
  --grid-gap: 1rem;

  /* animations */
  --animation-duration: 0.3s;
}

/* we have high contrast by default, and lower it if media query is supported. */
@media not all and (prefers-contrast: more) {
  :root {
    --highlight-color: #e40087;
    --highlight-color-dark: #b9006f;
  }

  main .section:nth-of-type(2n+1) {
    --highlight-color: #d7007f;
    --highlight-color-dark: #a90060;
    --link-color: var(--highlight-color);
    --link-hover-color: var(--highlight-color-dark);
  }
}

@font-face {
  font-family: josefin-slab-fallback;
  size-adjust: 105%;
  src: local("Times New Roman");
}

@font-face {
  font-family: josefin-sans-fallback;
  size-adjust: 100.94%;
  src: local("Helvetica");
}

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

@media (width >= 900px) {
  :root {
    --nav-height: 104px;
  }
}

@media (prefers-contrast: more) {
  :root {
      --highlight-color: #ad0068;
      --highlight-color-dark: #850050;
  }
}

.sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

html {
  scrollbar-gutter: stable;
}

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

body.appear {
  display: block;
}

body > header {
  position: relative;
  height: var(--nav-height);
  z-index: 999;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-font-family);
  font-weight: 400;
  line-height: 1.25;
  margin-top: 1em;
  margin-bottom: 0.5em;
  scroll-margin: calc(var(--nav-height) + 1em);
  text-wrap: pretty;
}

h1 {
  font-size: var(--heading-font-size-xxl);
  font-weight: 600;
}
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); }

h1 em,
h2 em,
h3 em,
h4 em,
h5 em,
h6 em {
  color: var(--highlight-color);
  font-style: normal;
}

h1 em:last-child,
h2 em:last-child,
h3 em:last-child,
h4 em:last-child,
h5 em:last-child,
h6 em:last-child {
  display: block;
  padding-left: .25em;
  font-style: normal;
  font-size: .5em;
  color: inherit;
}

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

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

code {
  padding: 0.125em;
}

pre {
  overflow: scroll;
}

p a:any-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.default-content-wrapper > p > figure {
  display: block;
  max-width: 80%;
  margin: 3rem auto;
}

picture img,
figure img {
  vertical-align: middle;
}

figcaption {
  margin-top: .5rem;
  font-style: italic;
  text-align: center;
  font-size: var(--body-font-size-s);
  font-weight: 400;
}

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

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

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

/* buttons */
a.button:any-link,
button {
  font-family: var(--heading-font-family);
  display: inline-block;
  box-sizing: border-box;
  text-decoration: none;
  border: 2px solid transparent;
  padding: 2px 1em;
  text-align: center;
  font-style: normal;
  font-weight: 400;
  cursor: pointer;
  color: var(--background-color);
  background-color: var(--link-color);
  margin: 16px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 30px;
  transition: background var(--animation-duration), color var(--animation-duration);
  vertical-align: middle;
}

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;
  color: var(--highlight-color);
}

a.button.secondary:hover,
button.secondary:hover {
  color: var(--highlight-color-dark);
}

:is(button, .button:any-link) + :is(button, .button:any-link) {
  margin-left: 1rem;
}

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

.icon,
.icon svg {
  display: inline-block;
  height: 24px;
  width: 24px;
  vertical-align: middle;
}

.icon img {
  height: 100%;
  width: 100%;
  vertical-align: middle;
}

/* sections */
main .section {
  box-sizing: border-box;
  padding: 64px 16px;
}

main .section:nth-of-type(2n) {
  background-color: var(--background-color);
}

main .section.grid {
  padding-left: 1rem;
  padding-right: 1rem;
}

.section.centered {
  text-align: center;
}

main .section .default-content-wrapper:first-child > :is(h2, h3, h4, h5, h6):first-child {
  margin-top: 0;
}

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

  main .section.grid {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  a.button:any-link,
  button {
    white-space: nowrap;
  }
}

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

  main .section.grid {
    padding-left: calc(50vw - 450px);
    padding-right: calc(50vw - 450px);
  }
}

@media (width >= 1200px) {
  body.appear {
    transition: all var(--animation-duration);
  }

  body > header {
    grid-area: header;
  }

  body > footer {
    grid-area: footer;
  }

  body > main {
    grid-area: main;
  }
}

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

@keyframes slide-in {
  0%{
    transform: translateY(-100%)
  }
}

.columns-wrapper:has(.cta) {
  border: 2px solid var(--highlight-color-alt-2);
  background-color: var(--background-color);
  max-width: max-content;
  margin: 0 auto;
  border-radius: 4px;
}

.columns.cta div > div {
  text-align: center;
}

.columns.cta p {
  margin: 1rem 1rem 0;
}

.columns.cta .button-container {
  margin: 0 1rem;
}

.columns.cta .button {
  vertical-align: middle;
}

@media (width >= 900px) {
  .columns.cta div > div {
    flex: auto;
  }

  .columns.cta p {
    margin: 1rem;
  }
}
