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

/* design tokens live in brand.css */

/* fallback fonts */

/* display face for large headings: declared here (not in the lazy fonts.css) and preloaded in
   head.html, so headings render in it from the first paint instead of reflowing later */
@font-face {
  font-family: roboto-condensed;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/roboto-condensed-bold.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: proxima-nova-fallback;
  size-adjust: 103%;
  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-s);
  line-height: 1.5;
}

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

/* headings: proxima-nova bold, black, tight margins (source spacing comes from containers) */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0.5em;
  margin-bottom: 0.25em;
  font-family: var(--heading-font-family);
  font-weight: 700;
  line-height: 1.5;
  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);
  line-height: 1.3;
}

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.5em;
  margin-bottom: 0.25em;
}

p {
  font-size: var(--body-font-size-m);
  line-height: var(--body-line-height);
}

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 {
  color: var(--link-hover-color);
}

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

/* buttons: EDS reset, then the source's single CTA style (cardinal red, solid, square) */
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 .button-container a.button:any-link,
button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 20px 0 0;
  border: 2px solid var(--brand-red);
  border-radius: 0;
  padding: var(--button-padding);
  background-color: var(--brand-red);
  color: #fff;
  font-family: var(--button-font-family);
  font-size: var(--button-font-size);
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: normal;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, filter 0.15s;
}

main .button-container a.button:hover,
button:hover {
  color: #fff;
  filter: brightness(0.88);
}

main .button-container a.button:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 0;
  filter: brightness(0.88);
}

button:disabled,
button:disabled:hover {
  border-color: var(--light-color);
  background-color: var(--light-color);
  color: var(--text-muted-color);
  filter: none;
  cursor: unset;
}

/* secondary (em-wrapped link): outline variant on the same red */
main .button-container a.button.secondary:any-link,
button.secondary {
  background-color: transparent;
  color: var(--brand-red);
}

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: 1200px;
  margin: auto;
  padding: 0 24px;
}

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

/* default content is centered on the source (titles, intro text, CTAs) */
main > .section > .default-content-wrapper {
  text-align: center;
}

/* default-content CTAs sit on their own row: 40px above, 80px before the next heading */
main > .section > .default-content-wrapper > p.button-container {
  display: block;
  margin: 40px 0 0;
}

main > .section > .default-content-wrapper > p.button-container a.button:any-link {
  margin: 0;
}

main > .section > .default-content-wrapper > p.button-container + :is(h2, h3) {
  margin-top: 80px;
}

/* standalone banner images in default content run full-bleed up to the 1440px source width */
main > .section > .default-content-wrapper > picture,
main > .section > .default-content-wrapper > p > picture:only-child {
  display: block;
  position: relative;
  left: 50%;
  width: min(100vw, var(--content-max-width));
  margin: 20px 0 0;
  transform: translateX(-50%);
}

main > .section > .default-content-wrapper > picture img,
main > .section > .default-content-wrapper > p > picture:only-child img {
  display: block;
  width: 100%;
}

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

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

main .section.glow {
  background:
    radial-gradient(
      ellipse 50% 60% at 25% 40%,
      var(--light-color) 0%,
      var(--background-color) 70%
    );
  margin: 0;
  padding: 64px 0;
}

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

main .section.dark h1,
main .section.dark h2,
main .section.dark h3,
main .section.dark h4,
main .section.dark h5,
main .section.dark h6,
main .section.dark a:any-link {
  color: var(--background-color);
}

/* centered: the source's display headline (SS Nickson Six, red, uppercase) over centred content */
main .section.centered > .default-content-wrapper h1 {
  color: var(--brand-red);
  font-family: var(--display-font-family);
  font-size: 65px;
  font-weight: 400;
  line-height: 0.9;
  text-transform: uppercase;
}

main .section.centered > .default-content-wrapper h2 {
  font-family: var(--display-font-family);
  font-size: 32px;
  font-weight: 400;
  line-height: 0.9;
  text-transform: uppercase;
}

/* split: text beside a media block (model brand story); stacked on mobile */
main .section.split > .default-content-wrapper {
  color: #333;
  text-align: left;
}

/* headings above the construction, specification and review blocks sit left, in brand red */
main .section:is(.tabs-vertical-container, .table-specs-container) > .default-content-wrapper {
  text-align: left;
}

main .section:is(.tabs-vertical-container, .table-specs-container) > .default-content-wrapper h2 {
  color: var(--brand-red);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

/* model pages: the review heading after the specs table is left-aligned (centred on the homepage) */
main .section.table-specs-container + .section.quote-rating-container > .default-content-wrapper {
  text-align: left;
}

/* promo band headline (model pages) */
main .section.dark > .default-content-wrapper h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.5;
}

/* model pages: promo band under the hero has 60px below its button, like the source */
main .section.hero-model-container + .section.dark {
  padding-bottom: 60px;
}

/* model pages: the exterior (360 spin) section after the hero / promo band: 120px above the
   headline, 40px between headline and image, room below for the source's spin controls */
main .section.hero-model-container + .section.centered,
main .section.hero-model-container + .section.dark + .section.centered {
  margin: 120px 0 100px;
}

main .section.hero-model-container + .section.centered > .default-content-wrapper > h1 + p > picture,
main .section.hero-model-container + .section.dark + .section.centered > .default-content-wrapper > h1 + p > picture {
  margin-top: 40px;
}

@media (width >= 900px) {
  /* split: text column (456px at 1440) beside the media column (798px), 114px apart */
  main > .section.split {
    display: grid;
    grid-template-columns: minmax(0, 456fr) minmax(0, 798fr);
    column-gap: 114px;
    align-items: start;
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0 36px;
  }

  main > .section.split > div {
    max-width: none;
    margin: 0;
    padding: 0;
  }
}
