/**
 * @file
 * Landing sections: full-width rows and bands built from Text and Image Row
 * and Body Copy paragraphs (first used by the Open Kitchen page and the home
 * page banner, FLICWI-509).
 *
 * Mobile first. Breakpoints: 60em (960px) and 75em (1200px).
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-800-normal.woff2") format("woff2");
}

/* Shared section frame ------------------------------------------------ */

.landing-row,
.landing-band {
  --landing-ink: #252525;
  --landing-accent: #b8531a;
  --landing-accent-hover: #9a4515;
  --landing-line: #d9d9d9;
  --landing-surface: #f4f4f4;

  box-sizing: border-box;
  margin: 0 0 1.5rem;
  padding: 2.5rem 1.25rem;
  color: var(--landing-ink);
  background-color: #fff;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.6;
  /* A long word wraps instead of pushing the page sideways. */
  overflow-wrap: break-word;
}

.landing-row *,
.landing-row *::before,
.landing-row *::after,
.landing-band *,
.landing-band *::before,
.landing-band *::after {
  box-sizing: border-box;
}

.landing-band--gray {
  background-color: var(--landing-surface);
}

/* Body Copy paragraphs that hold a band add no spacing of their own. */
.paragraph--landing.paragraph--type--body-copy {
  margin: 0;
  padding: 0;
}

/* A band that continues the section above it (for example the case study
   under the ROI story) shares that section's frame: it starts 10px below the
   section content, inside the section's bottom padding. */
.landing-band--attached {
  margin-top: -3.375rem;
  padding-top: 0;
}

.landing-row__inner,
.landing-features,
.landing-downloads,
.landing-cta {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
}

.landing-row h1,
.landing-row h2,
.landing-row h3,
.landing-band h1,
.landing-band h2,
.landing-band h3 {
  max-width: 100%;
  margin: 0;
  padding: 0;
  color: var(--landing-ink);
  font-family: inherit;
  text-transform: none;
}

.landing-row h2::before,
.landing-band h2::before {
  content: none;
}

.landing-row p,
.landing-band p,
.landing-band ul {
  margin: 0;
}

.landing-row p,
.landing-band p,
.landing-band li {
  font-size: inherit;
  line-height: inherit;
}

.landing-band ul li::before,
.landing-band ol li::before {
  content: none;
  margin: 0;
}

.landing-row strong,
.landing-band strong {
  color: var(--landing-accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.0625rem;
  text-underline-offset: 0.15em;
}

/* Buttons --------------------------------------------------------------- */

.landing-row a.landing-button,
.landing-band a.landing-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 0;
  overflow-wrap: anywhere;
  color: #fff;
  background-color: var(--landing-accent);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  text-transform: none;
  transition: background-color 0.2s ease;
}

/* Only the hero and home page banner buttons are rounded in the design. */
.landing-row--logos a.landing-button {
  border-radius: 0.5rem;
}

.landing-row a.landing-button::after,
.landing-band a.landing-button::after {
  content: "";
  flex: 0 0 auto;
  /* The Figma icon is a Font Awesome 7 glyph with a 1em advance. */
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  -webkit-mask: url("../images/svg/landing-arrow-right.svg") center / contain no-repeat;
  mask: url("../images/svg/landing-arrow-right.svg") center / contain no-repeat;
}

.landing-row a.landing-button:hover,
.landing-band a.landing-button:hover {
  background-color: var(--landing-accent-hover);
}

.landing-row a.landing-button:focus-visible,
.landing-band a.landing-button:focus-visible,
.landing-band a.landing-downloads__link:focus-visible,
.landing-gallery__nav:focus-visible {
  outline: 0.1875rem solid var(--landing-ink);
  outline-offset: 0.125rem;
}

.landing-row a.landing-button--light,
.landing-band a.landing-button--light {
  color: #394052;
  background-color: #e0e0e0;
}

.landing-row a.landing-button--light:hover,
.landing-band a.landing-button--light:hover {
  background-color: #cfcfcf;
}

/* Text and image rows ------------------------------------------------- */

.landing-row__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.landing-row__media img {
  display: block;
  width: 100%;
  max-width: 36rem;
  height: auto;
  margin: 0 auto;
}

.landing-row__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  min-width: 0;
}

/* Let the text field's paragraphs join the column so the logos can sit
   above the heading and every item keeps the 24px rhythm. */
.landing-row__text,
.landing-row__text > div,
.landing-row__text > div > div {
  display: contents;
}

.landing-row__heading {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

/* Rows without logos (for example the ROI story) use the section heading size. */
.landing-row:not(.landing-row--logos) .landing-row__heading {
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

.landing-row__body p:not(.landing-logos):not(:has(> .landing-button)) + p:not(.landing-logos):not(:has(> .landing-button)) {
  margin-top: 0.5rem;
}

.landing-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  order: -1;
}

/* Both logos stay on one line and shrink together on narrow screens. */
.landing-logos img {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  height: auto;
  max-height: 3.125rem;
}

/* A solid plus sign between the two logos. */
.landing-logos__plus {
  position: relative;
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--landing-ink);
  font-size: 0;
  line-height: 0;
}

.landing-logos__plus::before,
.landing-logos__plus::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 0.0625rem;
  background-color: currentColor;
}

.landing-logos__plus::before {
  width: 100%;
  height: 0.25rem;
}

.landing-logos__plus::after {
  width: 0.25rem;
  height: 100%;
}

/* Home page banner: lighter body line height and a fixed image column. */
.landing-row--banner .landing-row__body {
  line-height: 1.3;
}

.landing-row--banner .landing-row__media img {
  aspect-ratio: 553 / 445;
  object-fit: cover;
}

/* Features band with the product gallery ----------------------------- */

.landing-features {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.landing-features__text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.landing-band h2 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.landing-features__text ul {
  padding-left: 1.875rem;
  list-style: disc;
}

.landing-features__text li {
  margin: 0;
  padding: 0;
}

.landing-features__text li + li {
  margin-top: 1.6em;
}

.landing-gallery {
  position: relative;
  min-width: 0;
}

/* The band prefix outranks the theme's body copy list padding, which would
   indent the first card. */
.landing-band .landing-gallery__track {
  position: relative;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.landing-gallery__track::-webkit-scrollbar {
  display: none;
}

.landing-card {
  display: flex;
  flex: 0 0 min(25rem, 85%);
  flex-direction: column;
  gap: 1.5rem;
  margin: 0;
  padding: 1.5rem;
  border: 0.0625rem solid var(--landing-line);
  border-radius: 1rem;
  background-color: #fff;
  scroll-snap-align: center;
}

.landing-card::before {
  content: none;
}

.landing-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 350 / 292.8;
  border-radius: 0.5rem;
  background-color: var(--landing-line);
  object-fit: cover;
}

.landing-band .landing-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.landing-card p:last-child {
  margin-top: auto;
}

.landing-gallery__nav {
  position: absolute;
  top: 14.3325rem;
  z-index: 1;
  display: none;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 6.25rem;
  color: #fff;
  background-color: var(--landing-ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.landing-gallery__nav::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.9375rem;
  height: 1.5rem;
  background-color: currentColor;
  -webkit-mask: url("../images/svg/landing-chevron-right.svg") center / contain no-repeat;
  mask: url("../images/svg/landing-chevron-right.svg") center / contain no-repeat;
}

.landing-gallery__nav--prev {
  left: -0.4375rem;
}

.landing-gallery__nav--prev::before {
  transform: scaleX(-1);
}

.landing-gallery__nav--next {
  right: -0.4375rem;
}

.landing-gallery__nav[aria-disabled="true"] {
  cursor: default;
  opacity: 0;
}

.landing-gallery__nav[aria-disabled="true"]:focus-visible {
  opacity: 0.4;
}

/* The arrows appear on hover, as in the design, and for keyboard users. */
@media (hover: hover) and (pointer: fine) {
  .landing-gallery__nav {
    display: block;
  }

  .landing-gallery:hover .landing-gallery__nav:not([aria-disabled="true"]),
  .landing-gallery:focus-within .landing-gallery__nav:not([aria-disabled="true"]) {
    opacity: 1;
  }
}

/* Case study downloads -------------------------------------------------- */

.landing-downloads {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem 1.25rem;
  border-radius: 1rem;
  background-color: var(--landing-surface);
}

.landing-downloads__lists {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.landing-band .landing-downloads__list {
  margin: 0;
  padding: 1.25rem 0;
  border-radius: 0.5rem;
  background-color: #fff;
  /* Figma strokes sit inside the frame, so they add no height. */
  box-shadow: inset 0 0 0 0.0625rem var(--landing-line);
  list-style: none;
}

.landing-downloads__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 1.25rem;
  box-shadow: inset 0 -0.0625rem 0 var(--landing-line);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.26;
}

.landing-downloads__list li::before {
  content: none;
}

.landing-downloads__list li:first-child {
  padding-top: 0;
}

.landing-downloads__list li:last-child {
  padding-bottom: 0;
  box-shadow: none;
}

.landing-band a.landing-downloads__link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--landing-accent);
  font-weight: 600;
  text-decoration: none;
}

.landing-band a.landing-downloads__link::before {
  content: "";
  flex: 0 0 auto;
  width: 1.1875rem;
  height: 1.25rem;
  background-color: currentColor;
  -webkit-mask: url("../images/svg/landing-download.svg") center / contain no-repeat;
  mask: url("../images/svg/landing-download.svg") center / contain no-repeat;
}

.landing-band a.landing-downloads__link:hover {
  text-decoration: underline;
}

/* Final call to action ------------------------------------------------- */

.landing-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

/* Tablet and desktop ------------------------------------------------- */

@media (min-width: 60em) {
  .landing-row,
  .landing-band {
    padding: 3.5rem 2.5rem;
    font-size: 1.25rem;
  }

  .landing-band--attached {
    margin-top: -4.375rem;
    padding-top: 0;
  }

  .landing-row__inner {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }

  .landing-row--logos .landing-row__inner {
    gap: 4rem;
  }

  .landing-row__media,
  .landing-row__body {
    flex: 1 1 0;
  }

  .landing-row__media img {
    max-width: none;
    aspect-ratio: 720 / 579.43;
    object-fit: cover;
  }

  /* A full-bleed photo keeps clear of the text beside it, as the white
     space around the design's product image did. */
  .landing-row--row:not(.landing-row--logos) .landing-row__media img {
    width: calc(100% - 4rem);
    margin: 0;
  }

  .landing-row--logos .landing-row__media img {
    aspect-ratio: 688 / 553.68;
    object-fit: cover;
  }

  .landing-row__heading {
    font-size: 2.5rem;
  }

  .landing-row:not(.landing-row--logos) .landing-row__heading {
    font-size: 2rem;
  }

  .landing-logos {
    gap: 1.5rem;
  }

  .landing-logos__plus {
    width: 1.75rem;
    height: 1.75rem;
  }

  .landing-row--banner {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .landing-row--banner .landing-row__inner {
    align-items: stretch;
    gap: 4rem;
  }

  .landing-row--banner .landing-row__media {
    flex: 0 0 42.68%;
  }

  .landing-row--banner .landing-row__media img {
    height: 100%;
    /* Figma's 553.13 x 445 image, using the 553.125px width the layout produces at 1440px. */
    aspect-ratio: 553.125 / 445;
  }

  .landing-features {
    flex-direction: row;
    align-items: stretch;
    gap: 4rem;
  }

  .landing-features__text,
  .landing-gallery {
    flex: 1 1 0;
  }

  .landing-band h2 {
    font-size: 2rem;
  }

  .landing-band .landing-card h3 {
    font-size: 1.75rem;
  }

  .landing-gallery__track {
    height: 100%;
  }

  .landing-downloads {
    padding: 3.5rem 2.5rem;
  }

  .landing-downloads__lists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-downloads__list li {
    flex-wrap: nowrap;
    font-size: 1.25rem;
  }

  .landing-cta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 4rem;
  }
}

@media (min-width: 75em) {
  .landing-row,
  .landing-band {
    padding-right: 4.5rem;
    padding-left: 4.5rem;
  }

  /* As in Figma: a centred 1456px area inside the 72px padding, with 1440px
     content on its left and the case study panel filling it. */
  .landing-row__inner,
  .landing-features,
  .landing-cta {
    margin-right: auto;
    margin-left: max(0px, (100% - 91rem) / 2);
  }

  .landing-downloads {
    max-width: 91rem;
    padding-right: 4.5rem;
    padding-left: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-row a.landing-button,
  .landing-band a.landing-button,
  .landing-gallery__nav {
    transition: none;
  }

  .landing-gallery__track {
    scroll-behavior: auto;
  }
}
