body:is([data-view="home"], :not([data-view])) {
  --home-masthead-header-height: 64px;
  --home-masthead-gutter: clamp(12px, 2.5vw, 34px);
  --home-masthead-pale: #f5f9fd;
  --home-masthead-ink: #18233d;
  --home-masthead-blue: #2949ba;
}

body:is([data-view="home"], :not([data-view])) > header {
  height: var(--home-masthead-header-height);
  padding-inline: max(var(--home-masthead-gutter), calc((100% - 1400px) / 2));
}

body:is([data-view="home"], :not([data-view])) > header:not(.is-scrolled) {
  background: var(--home-masthead-pale);
  color: var(--home-masthead-ink);
  border-color: #e7eefa;
}

body:is([data-view="home"], :not([data-view])) > header .header-wordmark-label {
  fill: #fff;
}

body:is([data-view="home"], :not([data-view])) > header #company-channels .instagram-link {
  --letter-color: #793a72;
  --letter-glow: transparent;
}

body:is([data-view="home"], :not([data-view])) > header #company-channels .youtube-link {
  --letter-color: #913d48;
  --letter-glow: transparent;
}

@media (min-width: 1101px) {
  body:is([data-view="home"], :not([data-view])) > header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: clamp(14px, 2.6vw, 44px);
  }

  body:is([data-view="home"], :not([data-view])) > header > nav {
    justify-self: start;
    gap: clamp(10px, 2.1vw, 28px);
  }

  body:is([data-view="home"], :not([data-view])) > header .header-wordmark {
    width: 150px;
  }

  body:is([data-view="home"], :not([data-view])) > header > nav > a,
  body:is([data-view="home"], :not([data-view])) > header > nav > .nav-group > .nav-group-toggle {
    font-size: 14px;
  }
}

.home-masthead {
  --home-masthead-fade: 124px;
  padding-block: var(--home-masthead-header-height) var(--home-masthead-fade);
  /* Let the fade extend behind the start of the following section without moving it. */
  margin-block-end: calc(-1 * var(--home-masthead-fade));
  background: linear-gradient(
    to bottom,
    var(--home-masthead-pale) calc(100% - var(--home-masthead-fade) + 28px),
    #fff
  );
  color: var(--home-masthead-ink);
  font-family: "EV Pretendard", "Malgun Gothic", sans-serif;
}

.home-masthead-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(9px, 2vw, 22px);
  width: calc(100% - 2 * var(--home-masthead-gutter));
  max-width: 1200px;
  min-height: 345px;
  margin-inline: auto;
  padding: 28px clamp(15px, 5vw, 50px) 48px;
  background: radial-gradient(
    ellipse min(305px, 25vw) 160px at 73% 44%,
    #e5e4fc,
    rgb(236 242 255 / 70%) 44%,
    transparent
  );
}

.home-masthead-copy h1 {
  margin: 0;
  font-size: clamp(27px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.068em;
  word-break: keep-all;
}

.home-masthead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.home-masthead-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.home-masthead-actions .home-masthead-primary {
  border-color: var(--home-masthead-blue);
  background: var(--home-masthead-blue);
  color: #fff;
}

.home-masthead-actions .home-masthead-secondary {
  border-color: #c6d3ee;
  background: #fff;
  color: var(--home-masthead-ink);
}

.home-masthead-actions .home-masthead-primary:hover {
  border-color: #213c9b;
  background: #213c9b;
}

.home-masthead-actions .home-masthead-secondary:hover {
  background: #edf3ff;
}

.home-masthead-actions a:focus-visible {
  outline: 2px solid var(--home-masthead-blue);
  outline-offset: 2px;
}

.home-masthead-art {
  display: block;
  width: 100%;
  height: auto;
  max-height: 269px;
  object-fit: contain;
}

@media (max-width: 610px) {
  .home-masthead-inner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-block: 21px 28px;
  }

  .home-masthead-art {
    max-height: 178px;
  }
}

.home-highlights {
  position: relative;
  width: calc(100% - 2 * var(--home-masthead-gutter));
  max-width: 1200px;
  margin-inline: auto;
  padding: 26px clamp(14px, 4.5vw, 50px) 30px;
  border-radius: 26px;
  background: #fff;
  color: var(--home-masthead-ink);
  font-family: "EV Pretendard", "Malgun Gothic", sans-serif;
}

.home-notice-strip {
  display: grid;
  grid-template-columns: auto repeat(2, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
  font-size: 13px;
}

.home-notice-strip h2 {
  margin: 0;
  color: var(--home-masthead-blue);
  font-size: 14px;
}

.home-highlights a {
  color: inherit;
  text-decoration: none;
}

.home-highlights a:focus-visible {
  outline: 2px solid var(--home-masthead-blue);
  outline-offset: 2px;
}

.home-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.home-notice + .home-notice {
  padding-inline-start: 15px;
  border-inline-start: 1px solid #e0e8f4;
}

.home-notice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-notice small,
.home-case-banner small {
  color: #4e6282;
  font-size: 12px;
  white-space: nowrap;
}

.home-notice:hover,
.home-notice-more:hover {
  text-decoration: underline;
}

#home-case-banners {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-height: 90px;
}

.home-case-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid #dfe8f7;
  border-radius: 12px;
  background: #f7faff;
  box-shadow: 0 2px 6px #16376a12;
}

.home-case-banner:hover {
  border-color: #a6b9e6;
}

.home-case-banner-copy {
  grid-row: 2;
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 68px;
  padding-inline: 10px;
}

.home-case-banner strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.home-case-banner img {
  grid-row: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  border-radius: 8px;
  object-fit: cover;
}

.home-case-fallback {
  grid-column: 1 / -1;
  align-self: center;
  font-size: 14px;
}

@media (max-width: 760px) {
  .home-notice-strip {
    grid-template-columns: 1fr auto;
    gap: 9px 14px;
    margin-bottom: 16px;
  }

  .home-notice {
    grid-column: 1 / -1;
  }

  .home-notice + .home-notice {
    padding-inline-start: 0;
    border: 0;
  }

  .home-notice-more {
    grid-area: 1 / 2;
  }
}

@media (max-width: 680px) {
  .home-highlights {
    padding-block: 20px 24px;
  }

  #home-case-banners {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
}

body[data-view="home"] {
  --home-section-width: min(1200px, calc(100vw - 2 * var(--home-masthead-gutter)));
  --home-section-inset: clamp(16px, 4vw, 50px);

  & #main > :is(.home-reference, #solutions, #projects, #about, #support, #clients, #contact) {
    width: min(1200px, calc(100% - 2 * var(--home-masthead-gutter)));
    margin-inline: auto;
  }

  & #main > :is(#projects, #about, #clients, #contact) > .wrap,
  & #main > #support > .service-faq-content,
  & #main .home-video-grid {
    width: calc(100% - 2 * var(--home-section-inset));
  }

  & #main > :is(.home-partner, .home-videos, .home-products) {
    padding-block-start: calc(var(--home-section-width) * .06);
  }

  & #main > .home-partner {
    padding-block-end: calc(var(--home-section-width) * .06);
  }

  & #main .home-partner .partner-images {
    height: auto;
    aspect-ratio: 1;
    max-height: 620px;
  }

  & #main .home-partner .partner-images img:first-child { height: 100%; }
  & #main .home-partner .partner-images img:nth-child(2) { top: 22%; height: 56%; }
  & #main .home-video-grid { padding-bottom: clamp(40px, calc(var(--home-section-width) * .05), 60px); }
  & #main .home-product-track { padding-inline: var(--home-section-inset); }
  & #main .home-product-track article { flex-basis: calc(var(--home-section-width) * .29); }
  & #main .home-slider-controls { margin-bottom: 0; }
  & #main > .home-portfolio { padding-block: calc(var(--home-section-width) * .1); }
  & #main > .home-ending { padding-top: calc(var(--home-section-width) * .15); }
  & #main .home-building { margin-top: calc(var(--home-section-width) * -.25); }

  & #main :is(.home-outline, .home-blue, .home-yellow, .home-ending .home-marquee) {
    padding-block: calc(var(--home-section-width) * .02);
  }

  & #main .home-blue { margin-top: calc(var(--home-section-width) * .05); }
  & #main .home-yellow { margin-bottom: calc(var(--home-section-width) * .05); }

  & > footer.wrap {
    padding-inline: max(var(--home-section-inset), calc((100% - 1200px) / 2 + var(--home-section-inset)));
    padding-block: 64px;
  }

  @media (min-width: 1001px) {
    & #main .partner-copy,
    & #main .portfolio-heading { padding-inline: var(--home-section-inset); }
    & #main .portfolio-items { padding-inline-end: var(--home-section-inset); }
    & #contact .contact-inner { column-gap: 64px; }
    & #contact .contact-inner > .product-inquiry-info { padding-inline: 48px; }
    & #main :is(.home-partner, .portfolio-heading) h2 { font-size: 42px; }
    & #main .home-partner :is(.home-kicker, .partner-description, .partner-stats span) { font-size: 17px; }
    & #main .partner-stats strong { font-size: 38px; }
    & #main .home-videos > h2 { margin-bottom: 28px; }
    & #main :is(.home-outline, .home-ending) span { font-size: 120px; }
    & #main :is(.home-blue, .home-yellow) span { font-size: 60px; }
  }

  @media (max-width: 1000px) {
    & #main > :is(.home-partner, .home-portfolio) { padding-inline: var(--home-section-inset); }
    & #main .home-partner .partner-images { aspect-ratio: 6 / 5; }
    & #main .home-product-track article { flex-basis: calc(var(--home-section-width) * .43); }
    & > footer.wrap { padding-block: 50px 96px; }
  }

  @media (max-width: 650px) {
    & #main > :is(.home-videos, .home-products) { padding-top: 56px; }
    & #main .home-partner .partner-images { aspect-ratio: 4 / 5; }
    & #main .home-product-track article { flex-basis: calc(var(--home-section-width) * .82); }
  }
}
