/* One typographic rhythm for all three businesses, independent of translation length. */
#reader-title, #unwall-title, #enterprise-title,
#contact-title, #intro-title {
  font-family: var(--display-serif, UnwallRoman, var(--serif));
  font-weight: 400;
  font-synthesis: none;
  text-wrap: balance;
}
html:not([data-script=cjk]) #reader-title,
html:not([data-script=cjk]) #unwall-title {
  font-family: var(--brand-serif, UnwallRoman, serif);
}
.site-shell .action {
  box-sizing: border-box;
  justify-content: space-between;
  border: 1px solid #ffffffc9;
  padding-inline: 20px;
  text-decoration: none;
}
.site-shell .action > span { min-width: 0; text-wrap: pretty; }
.site-shell .action > svg { width: 18px; height: 18px; flex: 0 0 18px; }
.site-shell .enterprise-action {
  box-shadow: 6px 8px 16px #53644e18, -4px -5px 13px #ffffffab,
    inset 0 1px 1px #fffffff5, inset 0 -1px 1px #8c9a8020;
}

@media (min-width: 901px) and (min-height: 521px) {
  .site-shell .businesses {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 30px minmax(110px, 1fr) 26px auto auto minmax(56px, auto);
    padding-block: 30px 34px;
  }
  .site-shell .business {
    grid-row: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    padding: 0 clamp(24px, 3.1vw, 54px);
    min-height: 0;
  }
  .site-shell .reader { grid-column: 1; }
  .site-shell .unwall { grid-column: 2; }
  .site-shell .enterprise { grid-column: 3; }
  .site-shell .section-meta { grid-row: 1; align-self: start; }
  .site-shell .visual { grid-row: 2; margin: 0; container: business-art / size; }
  .site-shell .visual .object {
    position: absolute;
    left: 50%; top: 50%; translate: -50% -50%;
    --art-height-scale: 1; --art-width-scale: 1;
    scale: min(var(--art-height-scale), var(--art-width-scale));
  }
  .site-shell .visual, .site-shell .business-copy, .site-shell .action { min-width: 0; }
  .site-shell .business-copy { display: contents; }
  .site-shell .product-latin { grid-row: 3; align-self: start; margin: 0; }
  #reader-title, #unwall-title, #enterprise-title {
    grid-row: 4;
    align-self: end;
    margin: 0;
    padding: 0 0 16px;
    line-height: 1.24;
    letter-spacing: -.025em;
    overflow-wrap: normal;
  }
  #reader-title { font-size: clamp(32px, 3.4vw, 51px); }
  #unwall-title { font-size: clamp(43px, 4.6vw, 69px); line-height: 1.12; }
  #enterprise-title { font-size: clamp(27px, 2.4vw, 35px); line-height: 1.3; }
  html[data-script=cjk] #reader-title { font-size: clamp(27px, 2.5vw, 41px); letter-spacing: .025em; }
  html[data-script=cjk] #unwall-title { font-size: clamp(31px, 3.1vw, 50px); letter-spacing: .025em; line-height: 1.24; }
  html[data-script=cjk] #enterprise-title { font-size: clamp(25px, 2.3vw, 37px); letter-spacing: .015em; }
  html[dir=rtl] #enterprise-title { letter-spacing: 0; line-height: 1.45; }
  html:not([data-script=latin]):not([data-script=cjk]) #enterprise-title { font-size: clamp(25px, 2.2vw, 33px); letter-spacing: 0; line-height: 1.45; }
  .site-shell .description {
    grid-row: 5;
    align-self: start;
    padding-bottom: 27px;
    font-size: 13px;
    line-height: 1.85;
    max-width: none;
    text-wrap: pretty;
  }
  .site-shell .action { grid-row: 6; align-self: stretch; min-height: 56px; height: 100%; font-size: 12px; }
  .site-shell .business + .business::before { top: 0; bottom: 0; }
}

/* Art scales to its available row instead of covering a longer translated heading. */
@container business-art (max-width: 320px) { .object { --art-width-scale: .88 !important; } }
@container business-art (max-width: 280px) { .object { --art-width-scale: .8 !important; } }
@container business-art (max-width: 245px) { .object { --art-width-scale: .7 !important; } }
@container business-art (max-height: 330px) { .object { --art-height-scale: .9 !important; } }
@container business-art (max-height: 290px) { .object { --art-height-scale: .78 !important; } }
@container business-art (max-height: 250px) { .object { --art-height-scale: .68 !important; } }
@container business-art (max-height: 210px) { .object { --art-height-scale: .55 !important; } }
@container business-art (max-height: 170px) { .object { --art-height-scale: .44 !important; } }
@container business-art (max-height: 130px) { .object { --art-height-scale: .32 !important; } }

@media (min-width: 901px) and (max-height: 750px) and (min-height: 521px) {
  .site-shell .businesses { grid-template-rows: 24px minmax(105px, 1fr) 19px auto auto minmax(50px, auto); padding-block: 20px 24px; }
  .site-shell .description { font-size: 12px; line-height: 1.75; padding-bottom: 18px; }
  #reader-title, #unwall-title, #enterprise-title { padding-bottom: 10px; }
  .site-shell .action { min-height: 50px; padding-block: 12px; }
}

@media (min-width: 901px) and (max-width: 1100px) and (min-height: 521px) {
  .site-shell .business { padding-inline: 25px; }
  .site-shell .description { font-size: 12px; }
  .site-shell .action { padding-inline: 15px; font-size: 11px; }
  #enterprise-title { font-size: 26px; overflow-wrap: anywhere; }
  html:not([data-script=latin]):not([data-script=cjk]) #enterprise-title { font-size: 25px; }
}

/* Full-width mobile actions give all three entry points the same hit area and edge. */
@media (max-width: 900px) and (min-height: 521px) {
  .site-shell .businesses { grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .site-shell .business { grid-template-rows: 16px minmax(0, 1fr) 44px; row-gap: 5px; padding: 18px 20px 17px; }
  .site-shell .visual { grid-row: 1 / 3; height: 130px; top: 43%; }
  .site-shell .business-copy { padding: 0 0 7px; }
  .site-shell .action {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: stretch;
    width: 100%;
    min-height: 44px;
    height: 100%;
    padding: 10px 14px;
    font-size: 11px;
    border-radius: 12px;
  }
  .site-shell .action > svg { width: 15px; height: 15px; flex-basis: 15px; }
  #reader-title { font-size: 29px; line-height: 1.2; margin: 0 0 8px; }
  #unwall-title { font-size: 38px; line-height: 1.1; margin: 0 0 8px; }
  #enterprise-title { font-size: 24px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.02em; overflow-wrap: anywhere; }
  html[data-script=cjk] #reader-title { font-size: 25px; line-height: 1.35; }
  html[data-script=cjk] #unwall-title { font-size: 30px; line-height: 1.25; }
  html[data-script=cjk] #enterprise-title { font-size: 22px; line-height: 1.35; letter-spacing: 0; }
  html:not([data-script=latin]):not([data-script=cjk]) #enterprise-title { font-size: 22px; line-height: 1.4; letter-spacing: 0; }
  .site-shell .description { font-size: 11.5px; line-height: 1.7; text-wrap: pretty; }
}

@media (max-width: 900px) and (max-height: 750px) and (min-height: 521px) {
  .site-shell { min-height: 610px; }
  .site-shell .business { padding: 11px 18px 12px; grid-template-rows: 12px minmax(0, 1fr) 40px; row-gap: 4px; }
  .site-shell .business-copy { padding-bottom: 4px; }
  .site-shell .action { min-height: 40px; font-size: 10px; padding: 8px 12px; }
  #reader-title { font-size: 26px; margin-bottom: 5px; }
  #unwall-title { font-size: 33px; margin-bottom: 5px; }
  #enterprise-title { font-size: 22px; margin-bottom: 5px; }
  html[data-script=cjk] #reader-title { font-size: 23px; }
  html[data-script=cjk] #unwall-title { font-size: 28px; }
  html[data-script=cjk] #enterprise-title { font-size: 20px; }
  html:not([data-script=latin]):not([data-script=cjk]) #enterprise-title { font-size: 20px; line-height: 1.35; }
  .site-shell .description { font-size: 10.5px; line-height: 1.6; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .site-shell .businesses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-shell .action { min-height: 42px; height: 42px; margin-top: auto; padding: 8px 11px; font-size: 10px; }
  #reader-title { font-size: 28px; }
  #unwall-title { font-size: 35px; }
  #enterprise-title { font-size: 22px; line-height: 1.25; }
  html[data-script=cjk] #reader-title { font-size: 24px; }
  html[data-script=cjk] #unwall-title { font-size: 29px; }
  html[data-script=cjk] #enterprise-title { font-size: 21px; }
  html:not([data-script=latin]):not([data-script=cjk]) #enterprise-title { font-size: 20px; line-height: 1.4; }
}

/* Older browsers retain the existing, functional grid instead of losing the layout. */
@supports not (grid-template-rows: subgrid) {
  @media (min-width: 901px) and (min-height: 521px) {
    .site-shell .businesses { grid-template-rows: minmax(0, 1fr); padding-block: 0; }
    .site-shell .business { grid-row: 1; grid-template-rows: 30px minmax(110px, 1fr) auto minmax(56px, auto); padding-block: 30px 34px; }
    .site-shell .business-copy { display: block; }
    .site-shell .action { grid-row: 4; }
  }
}
