/*
 * 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.
 */

@import url('brand.css');

:root {
  /* colors */
  --background-color: #fff;
  --light-color: #eee;
  --dark-color: #505050;
  --text-color: #000;
  --link-color: #eb0a1e;
  --link-hover-color: #eb0a1e;
  --highlight-gradient: linear-gradient(#eee, #fff);

  /* fonts */
  --body-font-family: "Helvetica Neue", helvetica-neue-fallback, helvetica, arial, sans-serif;
  --heading-font-family: "Helvetica Neue", helvetica-neue-fallback, helvetica, arial, sans-serif;
  --display-font-family: "Toyota Type", "Helvetica Neue", helvetica-neue-fallback, helvetica, arial, sans-serif;

  /* body sizes */
  --body-font-size-m: 16px;
  --body-font-size-s: 14px;
  --body-font-size-xs: 12px;
  --body-line-height: 1.88;

  /* heading sizes */
  --heading-font-size-xxl: 36px;
  --heading-font-size-xl: 35px;
  --heading-font-size-l: 24px;
  --heading-font-size-m: 20px;
  --heading-font-size-s: 18px;
  --heading-font-size-xs: 16px;

  /* buttons */
  --button-radius: 37px;
  --button-font-size: 14px;
  --button-padding: 3px 40px;

  /* layout */
  --content-max-width: 1300px;

  /* nav heights */
  --nav-height: 64px;
  --breadcrumbs-height: 34px;
  --header-height: var(--nav-height);
}

/* fallback fonts */
@font-face {
  font-family: helvetica-neue-fallback;
  size-adjust: 100%;
  src: local('Helvetica'), local('Arial');
}

@media (width >= 992px) {
  :root {
    --button-font-size: 24px;
  }
}

@media (width >= 1025px) {
  :root {
    --button-padding: 8px 52px;
  }
}

@media (width >= 1200px) {
  :root {
    /* heading sizes */
    --heading-font-size-xxl: 40px;
    --heading-font-size-xl: 40px;
  }
}

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: var(--body-line-height);
}

body.appear {
  display: block;
}

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

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

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

@media (width >= 900px) {
  body[data-breadcrumbs] {
    --header-height: calc(var(--nav-height) + var(--breadcrumbs-height));
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0.8em;
  margin-bottom: 0.25em;
  font-family: var(--heading-font-family);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-color);
  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;
  background-color: var(--light-color);
  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;
  word-break: break-word;
}

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

/* buttons: standalone links render as plain red links on the source */
main .button-container {
  display: inline;
}

main a.button:any-link {
  background: none;
  border: none;
  border-radius: 0;
  color: var(--link-color);
  font-size: inherit;
  font-weight: inherit;
  padding: 0;
  margin: 0;
  text-decoration: none;
  white-space: normal;
}

main a.button:hover,
main a.button:focus {
  text-decoration: underline;
}

/* primary (bold link) = red pill CTA used on the source carousel */
main a.button.primary:any-link,
button {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: var(--button-radius);
  padding: var(--button-padding);
  font-family: var(--display-font-family);
  font-size: var(--button-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: 1.88;
  text-align: center;
  text-decoration: none;
  background-color: var(--brand-red);
  color: #fff;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* the source keeps CTAs unchanged on hover */
main a.button.primary:hover,
button:hover {
  background-color: var(--brand-red);
  color: #fff;
  text-decoration: none;
}

main a.button.primary:focus-visible,
button:focus-visible {
  outline: 2px solid var(--text-color);
  outline-offset: 2px;
}

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

/* secondary (italic link) = outlined pill */
main a.button.secondary:any-link,
button.secondary {
  box-sizing: border-box;
  display: inline-block;
  border: 2px solid var(--brand-red);
  border-radius: var(--button-radius);
  padding: var(--button-padding);
  font-family: var(--display-font-family);
  font-size: var(--button-font-size);
  line-height: 1.88;
  background-color: transparent;
  color: var(--brand-red);
  text-decoration: none;
}

@media (width < 768px) {
  main a.button.primary:any-link,
  main a.button.secondary:any-link,
  button {
    border-radius: 25px;
    padding: 5px 25px;
  }
}

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;
}

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

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

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

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

/* source #fold-3: grey-to-white gradient band */
main .section.highlight {
  background-color: transparent;
  background-image: var(--highlight-gradient);
  margin: 0;
  padding: 0 0 40px;
}

/* default-content headings are centered section titles on the source */
main .default-content-wrapper h2 {
  margin: 0 0 10px;
  padding-top: 20px;
  text-align: center;
}

main .section.highlight .default-content-wrapper h2 {
  padding-top: 40px;
}

/* e.g. "Have Questions?" + centered FAQ link */
main .default-content-wrapper h2 + .button-container {
  display: block;
  margin: 0 0 40px;
  text-align: center;
}

main .section.dark {
  background-color: var(--dark-color);
  color: #fff;
}
