/*
 * 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 {
  /* brand palette */
  --color-bg-primary: #fff;
  --color-bg-header: #242e39;
  --color-bg-header-dark: #182027;
  --color-bg-footer: #e8edf0;
  --color-text-primary: #777;
  --color-text-heading: #182027;
  --color-text-muted: #999;
  --color-accent-rose: #dba39a;
  --color-accent-pink: #f2295b;
  --color-accent-gold: #c29d62;
  --color-accent-blue: #4696e5;

  /* standard EDS aliases */
  --background-color: var(--color-bg-primary);
  --light-color: #ecf2f4;
  --dark-color: var(--color-bg-header-dark);
  --text-color: var(--color-text-primary);
  --link-color: var(--color-text-heading);
  --link-hover-color: var(--color-accent-rose);

  /* typography families */
  --font-family-sans: "Poppins", roboto, roboto-fallback, sans-serif;
  --font-family-serif: "Playfair Display", georgia, serif;
  --font-family-script: "Shadows Into Light", cursive;
  --font-family-display: "Oswald", roboto-condensed, roboto-condensed-fallback, sans-serif;
  --font-family-roboto: "Roboto", roboto, roboto-fallback, sans-serif;
  --font-family-slab: "Roboto Slab", georgia, serif;
  --body-font-family: var(--font-family-sans);
  --heading-font-family: var(--font-family-sans);

  /* body sizes */
  --body-font-size-m: 14px;
  --body-font-size-s: 13px;
  --body-font-size-xs: 12px;

  /* heading sizes */
  --heading-font-size-xxl: 36px;
  --heading-font-size-xl: 32px;
  --heading-font-size-l: 28px;
  --heading-font-size-m: 22px;
  --heading-font-size-s: 18px;
  --heading-font-size-xs: 16px;

  /* layout */
  --container-max-width: 1146px;
  --nav-height: 84px;
}

/* fallback fonts */
@font-face {
  font-family: roboto-condensed-fallback;
  size-adjust: 88.82%;
  src: local('Arial');
}

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

@media (width >= 900px) {
  :root {
    --nav-height: 111px;
    --heading-font-size-xxl: 42px;
    --heading-font-size-xl: 36px;
    --heading-font-size-l: 28px;
    --heading-font-size-m: 22px;
    --heading-font-size-s: 18px;
    --heading-font-size-xs: 16px;
  }
}

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

body.appear {
  display: block;
}

header {
  height: var(--nav-height);
  background-color: var(--color-bg-header);
}

header.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: transparent;
  z-index: 100;
}

header .header,
footer .footer {
  visibility: hidden;
}

header .header[data-block-status="loaded"],
footer .footer[data-block-status="loaded"] {
  visibility: visible;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--color-text-heading);
  font-family: var(--heading-font-family);
  font-weight: 700;
  line-height: 1.25;
  scroll-margin: 40px;
}

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: 0;
  margin-bottom: 16px;
}

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

pre {
  padding: 16px;
  border-radius: 8px;
  background-color: var(--light-color);
  overflow-x: auto;
  white-space: pre;
}

main > div {
  margin: 0;
}

input,
textarea,
select,
button {
  font: inherit;
}

/* links */
a:any-link {
  color: var(--link-color);
  text-decoration: none;
  overflow-wrap: break-word;
  transition: color 0.2s ease;
}

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

a .prosemirror-editor a:any-link {
  color: inherit;
  text-decoration: inherit;
}

/* buttons */
p.button-wrapper {
  margin: 12px 0;
}

a.button:any-link,
a.button:any-link .prosemirror-editor a:any-link,
button.button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: 3px;
  padding: 12px 24px;
  font-family: var(--font-family-roboto);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  background-color: var(--color-accent-rose);
  background-image: linear-gradient(180deg, var(--color-accent-rose) 0%, var(--color-accent-pink) 100%);
}

a.button[aria-disabled="true"],
button.button:disabled {
  cursor: not-allowed;
  pointer-events: none;
}

a.button.primary,
button.button.primary {
  color: #fff;
  background-color: var(--color-accent-rose);
  background-image: linear-gradient(180deg, var(--color-accent-rose) 0%, var(--color-accent-pink) 100%);
}

a.button.primary:hover,
a.button.primary:focus-visible,
button.button.primary:hover,
button.button.primary:focus-visible {
  color: #fff;
  opacity: 0.92;
}

a.button.secondary,
button.button.secondary {
  border: 1px solid var(--color-text-heading);
  background-color: transparent;
  background-image: none;
  color: var(--color-text-heading);
}

a.button.secondary:hover,
a.button.secondary:focus-visible,
button.button.secondary:hover,
button.button.secondary:focus-visible {
  background-color: var(--color-text-heading);
  color: #fff;
}

a.button.accent,
button.button.accent {
  background-color: var(--color-accent-gold);
  background-image: none;
  color: #fff;
}

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 {
  margin: 0;
}

main .section:empty {
  display: none;
}

main > .section > div {
  max-width: var(--container-max-width);
  margin: auto;
  padding: 0 15px;
}

main > .section:first-of-type {
  margin-top: 0;
}

@media (width >= 1200px) {
  main > .section > div {
    max-width: 1116px;
    padding: 0;
  }
}

/* section metadata */
main .section.light,
main .section.highlight {
  background-color: var(--light-color);
  margin: 0;
  padding: 40px 0;
}
