@import url('brand.css');

/*
 * 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 {
  --header-height: var(--nav-height);
}

/* fallback font: Arial tuned to Hitachi Sans metrics */
@font-face {
  font-family: hitachisans-fallback;
  size-adjust: 100%;
  src: local('Arial');
}

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

/* typography (source computed styles) */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 8px;
  font-family: var(--heading-font-family);
  font-weight: 700;
  line-height: 1.25;
  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);
  line-height: 1.5;
}

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: 24px;
}

strong,
b {
  font-weight: 700;
}

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

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

/* links */
a:any-link {
  color: var(--link-color);
  text-decoration: underline;
  word-break: break-word;
  transition: color 0.1s;
}

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

a:focus-visible {
  outline: var(--border-m) solid var(--color-focus-500);
  outline-offset: 2px;
}

/* buttons: EDS reset, then the source's pill buttons */
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: underline;
  white-space: normal;
}

main p.button-container {
  display: block;
  margin: 24px 0;
}

/* default (and secondary): white pill with red outline, like "See all" */
main a.button:any-link,
main a.button.secondary:any-link,
button.secondary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 42px;
  border: var(--border-xs) solid var(--color-primary-500);
  border-radius: var(--radius-pill);
  padding: 8px 24px;
  background-color: var(--color-white);
  color: var(--color-primary-500);
  font-family: var(--body-font-family);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

main a.button:hover,
main a.button.secondary:hover,
button.secondary:hover {
  background-color: var(--color-white);
  color: var(--color-primary-500);
  outline: var(--border-xs) solid var(--color-primary-500);
}

/* primary: solid red pill, like "Become a Partner today!" */
main a.button.primary:any-link,
button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 42px;
  border: var(--border-xs) solid var(--color-primary-500);
  border-radius: var(--radius-pill);
  padding: 8px 24px;
  background-color: var(--color-primary-500);
  color: var(--color-white);
  font-family: var(--body-font-family);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

main a.button.primary:hover,
button:hover {
  background-color: var(--color-primary-500);
  border-color: var(--color-black);
  color: var(--color-white);
}

main a.button:focus-visible,
button:focus-visible {
  outline: var(--border-m) solid var(--color-focus-500);
  outline-offset: 0;
}

button:disabled,
button:disabled:hover {
  border-color: var(--color-gray-100);
  background-color: var(--color-gray-100);
  color: var(--color-gray-500);
  cursor: unset;
}

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: var(--section-spacing) 0;
}

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

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

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

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

/* default content: section titles are centred on the source */
main .default-content-wrapper > h2 {
  /* source title box: 8px heading margin + 32px title padding */
  margin-bottom: 40px;
  text-align: center;
}

main .default-content-wrapper > h2:not(:first-child) {
  margin-top: 48px;
}

/* default-content pill buttons carry the source's chevron after the label */
main .default-content-wrapper a.button:not(.primary):any-link::after {
  content: '';
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background-color: currentcolor;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"/></svg>') center / 24px no-repeat;
}

/* webinars: source keeps 24px more space between the title and the cards */
main .section.cards-promo-container > .default-content-wrapper:first-child > h2 {
  margin-bottom: 64px;
}

/*
 * events: on the source the title sits on white, and the grey band holds the
 * right-aligned "All events" link above the carousel.
 */
main .section.light-grey.cards-event-carousel-container {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: var(--section-spacing) 0;
  background-color: transparent;
}

main .section.light-grey.cards-event-carousel-container > div {
  width: 100%;
  box-sizing: border-box;
}

main .section.light-grey.cards-event-carousel-container > .default-content-wrapper:first-child {
  order: 0;
  margin-bottom: 24px;
}

main .section.light-grey.cards-event-carousel-container > .default-content-wrapper:last-child,
main .section.light-grey.cards-event-carousel-container > .cards-event-carousel-wrapper {
  background-color: var(--color-gray-50);
  box-shadow: 0 0 0 100vmax var(--color-gray-50);
  clip-path: inset(0 -100vmax);
}

main .section.light-grey.cards-event-carousel-container > .default-content-wrapper:last-child {
  order: 1;
  padding-top: 32px;
  padding-bottom: 48px;
  text-align: right;
}

main .section.light-grey.cards-event-carousel-container > .cards-event-carousel-wrapper {
  order: 2;
}

main .section.light-grey.cards-event-carousel-container > .default-content-wrapper:last-child p.button-container {
  margin: 0;
}

main .section.light-grey.cards-event-carousel-container > .default-content-wrapper:last-child a.button:any-link {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--color-primary-500);
  font-weight: 400;
  outline: 0;
}

main .section.light-grey.cards-event-carousel-container > .default-content-wrapper:last-child a.button:hover {
  text-decoration: underline;
}

main .section.light-grey.cards-event-carousel-container > .default-content-wrapper:last-child a.button:any-link::after {
  flex-basis: 20px;
  width: 20px;
  height: 20px;
  mask-size: 20px;
}

/* section metadata styles */
main .section.light,
main .section.highlight,
main .section.light-grey {
  margin: 0;
  padding: var(--section-padding) 0;
  background-color: var(--color-gray-50);
}

/* decorative pink/white diagonal pattern behind the partner program */
main .section.pink-gradient {
  margin: 0;
  padding: var(--section-padding) 0;
  background-color: var(--color-white);
  background-image: url('images/pattern-pink.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

main .section.dark {
  margin: 0;
  padding: var(--section-padding) 0;
  background-color: var(--dark-color);
  color: var(--color-white);
}

main .section.dark a:any-link {
  color: var(--color-white);
}

/* about section: space between the image tiles and the follow-up text */
main .section.cards-peekaboo-container > .cards-peekaboo-wrapper + .default-content-wrapper:last-child {
  margin-top: 64px;
}

/* about section: the follow-up heading keeps the source's 22px look */
main .section.cards-peekaboo-container > .default-content-wrapper:last-child > h3 {
  font-size: var(--heading-font-size-m);
  line-height: 1.5;
}
