/*
 * 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 */
  --background-color: #0b0e14;
  --light-color: rgb(255 255 255 / 8%);
  --dark-color: #a8adb8;
  --text-color: #eaecef;
  --link-color: #6c9bff;
  --link-hover-color: #9cbcff;

  /* glass */
  --glass-bg: rgb(255 255 255 / 6%);
  --glass-border: rgb(255 255 255 / 12%);
  --glass-blur: 16px;

  /* fonts */
 --body-font-family: 'Lato', sans-serif;
  --heading-font-family: 'Lato', sans-serif;

  /* body sizes */
  --body-font-size-m: 22px;
  --body-font-size-s: 19px;
  --body-font-size-xs: 17px;

  /* heading sizes */
  --heading-font-size-xxl: 55px;
  --heading-font-size-xl: 44px;
  --heading-font-size-l: 34px;
  --heading-font-size-m: 27px;
  --heading-font-size-s: 24px;
  --heading-font-size-xs: 22px;

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

  /*
   * Hints native controls (select's options popup, scrollbars, etc.) to
   * use dark chrome — without this, a <select>'s dropdown list ignores
   * our color/background CSS and falls back to the browser's default
   * light popup, making light var(--text-color) unreadable on it.
   */
  color-scheme: dark;
}

/* light theme: toggled via [data-theme="light"] on <html> (see header.js) */
:root[data-theme="light"] {
  color-scheme: light;

  --background-color: #f7f2ea;
  --light-color: rgb(0 0 0 / 6%);
  --dark-color: #6b6155;
  --text-color: #211d17;
  --link-color: #b8863f;
  --link-hover-color: #96702f;
  --glass-bg: rgb(0 0 0 / 4%);
  --glass-border: rgb(0 0 0 / 10%);
}

:root[data-theme="light"] body {
  background-image:
    radial-gradient(circle at 15% 0%, rgb(240 201 135 / 18%), transparent 45%),
    radial-gradient(circle at 85% 20%, rgb(251 144 134 / 12%), transparent 40%),
    linear-gradient(
      rgb(0 0 0 / 3.5%) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgb(0 0 0 / 3.5%) 1px,
      transparent 1px
    );
}

/* 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 {
    /* body sizes */
    --body-font-size-m: 18px;
    --body-font-size-s: 16px;
    --body-font-size-xs: 14px;

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

/* the light theme is locked on, so paint its background before the body
   is revealed instead of flashing plain white while the page loads */
html {
  background-color: #f7f2ea;
   background-image:
    radial-gradient(circle at 15% 0%, rgb(108 155 255 / 12%), transparent 45%),
    radial-gradient(circle at 85% 20%, rgb(156 188 255 / 10%), transparent 40%),
    linear-gradient(
      rgb(255 255 255 / 3.5%) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgb(255 255 255 / 3.5%) 1px,
      transparent 1px
    );
}

/* once the page is shown, hand the background back to <body>: with no html
   background the body's background paints on the canvas underneath
   everything, which layers like the hero's z-index: -1 picture rely on */
html.appear {
  background: none;
}

body {
  display: none;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--background-color);
  background-image:
    radial-gradient(circle at 15% 0%, rgb(108 155 255 / 12%), transparent 45%),
    radial-gradient(circle at 85% 20%, rgb(156 188 255 / 10%), transparent 40%),
    linear-gradient(
      rgb(255 255 255 / 3.5%) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgb(255 255 255 / 3.5%) 1px,
      transparent 1px
    );
  background-size: auto, auto, 70px 70px, 70px 70px;
  background-attachment: fixed;

   /* gradient pins to viewport instead of scrolling with content */
  color: var(--text-color);
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-m);
  line-height: 1.6;
}

body.appear {
  display: block;
}

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

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.8em;
  margin-bottom: 0.25em;
  font-family: var(--heading-font-family);
  font-weight: 600;
  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.8em;
  margin-bottom: 0.25em;
}

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

pre {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background-color: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  overflow-x: auto;
  white-space: pre;
}

main > div {
  margin: 40px 16px;
}

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

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

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

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

a.button:any-link,
button.button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 2.4em;
  padding: 0.5em 1.2em;
  font: inherit;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

a.button.primary,
button.button.primary {
  border-color: var(--text-color);
  background-color: var(--text-color);
  color: var(--background-color);
}

a.button.primary:hover,
a.button.primary:focus-visible,
button.button.primary:hover,
button.button.primary:focus-visible {
  border-color: var(--dark-color);
  background-color: var(--dark-color);
  color: var(--light-color);
}

a.button.primary[aria-disabled="true"],
a.button.primary[aria-disabled="true"]:hover,
a.button.primary[aria-disabled="true"]:focus-visible,
button.button.primary:disabled,
button.button.primary:disabled:hover,
button.button.primary:disabled:focus-visible {
  background-color: var(--light-color);
  border-color: var(--light-color);
  color: var(--dark-color);
}

a.button.secondary,
button.button.secondary {
  border-color: var(--glass-border);
  background-color: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  color: var(--text-color);
}

a.button.secondary:hover,
a.button.secondary:focus-visible,
button.button.secondary:hover,
button.button.secondary:focus-visible {
  border-color: var(--link-color);
  background-color: rgb(255 255 255 / 12%);
  color: var(--text-color);
}

a.button.secondary[aria-disabled="true"],
a.button.secondary[aria-disabled="true"]:hover,
a.button.secondary[aria-disabled="true"]:focus-visible,
button.button.secondary:disabled,
button.button.secondary:disabled:hover,
button.button.secondary:disabled:focus-visible {
  background-color: var(--light-color);
  border-color: var(--light-color);
  color: var(--dark-color);
}

/* high-impact call-to-action */
a.button.accent,
button.button.accent {
  border-color: var(--link-color);
  background-color: var(--link-color);
  color: var(--background-color);
}

a.button.accent:hover,
a.button.accent:focus-visible,
button.button.accent:hover,
button.button.accent:focus-visible {
  border-color: var(--link-hover-color);
  background-color: var(--link-hover-color);
}

a.button.accent[aria-disabled="true"],
a.button.accent[aria-disabled="true"]:hover,
a.button.accent[aria-disabled="true"]:focus-visible,
button.button.accent:disabled,
button.button.accent:disabled:hover,
button.button.accent:disabled:focus-visible {
  background-color: var(--light-color);
  border-color: var(--light-color);
  color: var(--dark-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 {
  /* margin: 40px 0; */
    margin: 0;
}

main > .section > div {
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
}

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

@media (width >= 900px) {
  main > .section > div {
    padding: 0 32px;
  }
}

/* section metadata */
main .section.light,
main .section.highlight {
  border-block: 1px solid var(--glass-border);
  background-color: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  margin: 0;
  padding: 40px 0;
}
