/*
 * Siemens Home Appliances (/work/siemens-home-appliances/).
 * Shared building blocks come from case-base.css, the NDA gate from
 * nda-gate.css; this file holds the page layout, the exhibits and the
 * protected fragments in nda/siemens-home-appliances/ (loaded by
 * js/nda-unlock.js). Prefix sh-.
 */

:root {
  --sh-night: #101215;
  --sh-grey: #ececec;
  --sh-body: #44494d;
  --sh-card-line: var(--case-line);
}

.sh-page {
  margin: 0;
  background: #fff;
  color: var(--case-ink);
  font-family: var(--case-font);
  overflow-x: hidden;
}

.sh-page *,
.sh-page *::before,
.sh-page *::after {
  box-sizing: border-box;
}

.sh-page img,
.sh-page video {
  display: block;
  max-width: 100%;
}

.sh-page video {
  width: 100%;
  height: auto;
}

:where(.sh-page) figure {
  margin: 0;
}

.sh-wrap {
  width: min(100% - 96px, 1344px);
  margin-inline: auto;
}

@media (max-width: 1023px) {
  .sh-wrap {
    width: calc(100% - 48px);
  }
}

@media (max-width: 639px) {
  .sh-wrap {
    width: calc(100% - 32px);
  }
}

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

/* !important: the global link rule in custom.css sets display and colour on
   every link with a much higher specificity. */
.sh-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font: 600 16px/1.3 var(--case-font);
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.sh-button--light {
  background: #fff;
  color: var(--case-ink) !important;
}

.sh-button--light:hover {
  background: var(--sh-grey);
}

/* The trigger for the full case (js/nda-unlock.js turns the link into a
   <button> with these classes). */
button.sh-button {
  margin: 0;
  cursor: pointer;
}

.sh-button--ghost {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff !important;
}

.sh-button--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sh-button--ghost.is-unlocked {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.86) !important;
}

.sh-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Hero ---------- */

.sh-hero {
  position: relative;
  min-height: max(720px, 100svh);
  background: var(--sh-night);
  color: #fff;
  overflow: hidden;
}

/* The press photo sits on the right so the cookware and the display stay
   visible next to the title. */
.sh-hero .sh-hero__image {
  position: absolute;
  top: 0;
  right: 0;
  width: 64%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 50%;
}

.sh-hero__scrim {
  position: absolute;
  top: 0;
  right: 0;
  width: 64%;
  height: 100%;
  background:
    linear-gradient(90deg, var(--sh-night) 0%, rgba(16, 18, 21, 0.6) 14%, rgba(16, 18, 21, 0) 34%),
    linear-gradient(0deg, var(--sh-night) 0%, rgba(16, 18, 21, 0.72) 22%, rgba(16, 18, 21, 0) 46%),
    linear-gradient(180deg, rgba(16, 18, 21, 0.6) 0%, rgba(16, 18, 21, 0) 18%);
}

.sh-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: max(720px, 100svh);
  padding-block: 120px 24px;
}

.sh-hero__main {
  max-width: 46%;
  margin-bottom: clamp(32px, 6vh, 72px);
}

.sh-hero__title {
  margin: 0;
  font-size: var(--case-h1-size);
  font-weight: var(--case-heading-weight);
  line-height: var(--case-h1-leading);
  letter-spacing: var(--case-heading-tracking);
  text-wrap: balance;
}

.sh-hero__lead {
  max-width: 600px;
  margin: 28px 0 36px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.55;
}

.sh-hero .case-facts {
  color: #fff;
}

.sh-hero__credit {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- Sections and headings ---------- */

.sh-section {
  padding-block: clamp(88px, 10vw, 160px);
  scroll-margin-top: 72px;
}

.sh-section--white {
  background: #fff;
}

.sh-section--grey {
  background: var(--sh-grey);
}

.sh-head {
  max-width: 940px;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.sh-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: end;
  max-width: none;
}

.sh-h2 {
  margin: 0;
  font-size: var(--case-h2-size);
  font-weight: var(--case-heading-weight);
  line-height: var(--case-h2-leading);
  letter-spacing: var(--case-heading-tracking);
  text-wrap: balance;
}

.sh-h3 {
  margin: clamp(64px, 8vw, 112px) 0 12px;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.sh-h3__text {
  max-width: 640px;
  margin: 0 0 32px;
  color: var(--sh-body);
  font-size: 17px;
  line-height: 1.65;
}

.sh-head__text,
.sh-copy p {
  margin: 0;
  color: var(--sh-body);
  font-size: 17px;
  line-height: 1.65;
}

.sh-copy p + p {
  margin-top: 1.1em;
}

.sh-copy .sh-copy__lead {
  color: var(--case-ink);
  font-size: clamp(19px, 1.6vw, 22px);
  font-weight: 500;
  line-height: 1.55;
}

.sh-label {
  margin: 0 0 14px;
  color: var(--portfolio-blue);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (min-width: 1024px) {
  .sh-head__text,
  .sh-copy p {
    font-size: 18px;
  }
}

/* ---------- Two columns ---------- */

.sh-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
  margin: clamp(40px, 5vw, 72px) 0 0;
}

.sh-split:first-child,
.sh-head + .sh-split {
  margin-top: 0;
}

.sh-split--reverse {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

/* ---------- Who decided what (chapter 01) ---------- */

.sh-parties {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sh-parties li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 20px 22px;
  border: 1px solid var(--sh-card-line);
  border-radius: 16px;
  background: #fff;
}

.sh-parties li.is-mine {
  border-color: var(--portfolio-blue);
  box-shadow: inset 0 0 0 1px var(--portfolio-blue);
}

.sh-parties__number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--portfolio-blue);
  border-radius: 50%;
  color: var(--portfolio-blue);
  font-size: 14px;
  font-weight: 700;
}

.sh-parties li.is-mine .sh-parties__number {
  background: var(--portfolio-blue);
  color: #fff;
}

.sh-parties strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.sh-parties p {
  margin: 4px 0 0;
  color: var(--sh-body);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Figures ---------- */

.sh-figure {
  margin: clamp(48px, 6vw, 88px) 0 0;
}

.sh-figure__media,
.sh-figure > img,
.sh-photos img,
.sh-how img,
.sh-photo-tall img {
  width: 100%;
  height: auto;
  border: 1px solid var(--sh-card-line);
  border-radius: 16px;
  background: var(--sh-grey);
}

.sh-section--grey .sh-figure__media {
  background: #fff;
}

.sh-page figcaption {
  margin: 14px 0 0;
  color: var(--case-muted);
  font-size: 13px;
  line-height: 1.5;
}

.sh-page figcaption strong {
  color: var(--case-ink);
  font-weight: 600;
}

.sh-figure--wide figcaption {
  max-width: 820px;
}

.sh-head + .sh-figure {
  margin-top: 0;
}

/* Loops become play/pause controls via main.js (initLoopingVideos). */
.sh-page video[loop] {
  cursor: pointer;
}

/* ---------- Photo rows ---------- */

.sh-photos {
  display: grid;
  gap: 24px;
}

.sh-photos--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.sh-photos--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(40px, 5vw, 64px) 0 0;
  align-items: start;
}

/* ---------- Stats and principles (chapter 02) ---------- */

.sh-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sh-stats li {
  padding: 24px;
  border: 1px solid var(--sh-card-line);
  border-radius: 16px;
  background: #fff;
}

.sh-stats strong {
  display: block;
  color: var(--portfolio-blue);
  font-size: clamp(40px, 4.4vw, 60px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.sh-stats span {
  display: block;
  margin-top: 10px;
  color: var(--sh-body);
  font-size: 15px;
  line-height: 1.45;
}

.sh-principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  border-top: 1px solid rgba(35, 35, 35, 0.2);
  list-style: none;
}

.sh-principles li {
  padding: 20px 24px 0 0;
}

.sh-principles strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.sh-principles p {
  margin: 6px 0 0;
  color: var(--sh-body);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- How it works (cooktop, refrigerator) ---------- */

.sh-how {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px) 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sh-how--two {
  margin-top: clamp(48px, 6vw, 80px);
}

.sh-photo-tall figcaption {
  max-width: 520px;
}

/* ---------- Outcome (chapter 06) ---------- */

.sh-outcomes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sh-outcomes li {
  padding: 24px;
  border: 1px solid var(--sh-card-line);
  border-radius: 16px;
  background: #fff;
}

.sh-outcomes strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.sh-award {
  display: block;
  width: 108px;
  height: auto;
  margin: 0 0 16px;
}

.sh-outcomes p {
  margin: 8px 0 0;
  color: var(--sh-body);
  font-size: 15px;
  line-height: 1.55;
}

/* !important: the global link rule in custom.css removes colour and
   underline with a much higher specificity. */
.sh-outcomes a {
  color: var(--portfolio-blue) !important;
  font-weight: 600;
  text-decoration: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sh-figure--photo {
  margin-top: clamp(48px, 6vw, 80px);
}

/* ---------- Protected fragments (nda/siemens-home-appliances/*.html) ---------- */

.sh-nda .sh-h3 {
  margin-top: 0;
}

.sh-h3--small {
  font-size: clamp(20px, 2vw, 24px);
}

.sh-nda__lead,
.sh-nda__text {
  max-width: 820px;
  margin: 0;
  color: var(--sh-body);
  font-size: 17px;
  line-height: 1.65;
}

.sh-h4 {
  margin: clamp(48px, 6vw, 72px) 0 20px;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sh-h4 + .sh-nda__text {
  margin-bottom: 24px;
}

.sh-h5 {
  margin: 0 0 14px;
  color: var(--portfolio-blue);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sh-gallery {
  display: grid;
  gap: 28px 24px;
  margin: 24px 0 0;
}

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

.sh-gallery--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sh-gallery--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sh-shot a {
  display: block !important;
  border-radius: 12px;
}

.sh-shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--sh-card-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s ease;
}

.sh-shot a:hover img {
  border-color: var(--portfolio-blue);
}

.sh-gallery--renderings .sh-shot img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  padding: 16px;
  background: #fff;
}

.sh-film {
  margin: 32px 0 0;
}

.sh-film video,
.sh-anim video {
  border: 1px solid var(--sh-card-line);
  border-radius: 12px;
  background: #e2e2e2;
}

.sh-anim-group + .sh-anim-group {
  margin-top: 40px;
}

.sh-anims {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
}

.sh-nda__credits {
  margin-top: 16px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
  .sh-outcomes,
  .sh-principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sh-principles {
    row-gap: 8px;
  }

  .sh-anims,
  .sh-gallery--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .sh-hero .sh-hero__image,
  .sh-hero__scrim {
    width: 100%;
    height: min(58svh, 560px);
  }

  .sh-hero .sh-hero__image {
    object-position: 35% 40%;
  }

  .sh-hero__scrim {
    background:
      linear-gradient(0deg, var(--sh-night) 0%, rgba(16, 18, 21, 0.6) 30%, rgba(16, 18, 21, 0) 62%),
      linear-gradient(180deg, rgba(16, 18, 21, 0.6) 0%, rgba(16, 18, 21, 0) 22%);
  }

  .sh-hero__content {
    padding-top: calc(min(58svh, 560px) - 96px);
  }

  .sh-hero__main {
    max-width: 720px;
  }

  .sh-head--split,
  .sh-split,
  .sh-split--reverse {
    grid-template-columns: minmax(0, 1fr);
  }

  .sh-head--split {
    align-items: start;
  }

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

  .sh-gallery--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .sh-how,
  .sh-photos--three,
  .sh-outcomes,
  .sh-principles,
  .sh-anims,
  .sh-gallery--2,
  .sh-gallery--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .sh-principles li {
    padding-right: 0;
  }
}

@media (max-width: 479px) {
  .sh-photos--pair,
  .sh-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .sh-stats li {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 18px 20px;
  }

  .sh-stats span {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-button,
  .sh-shot img {
    transition: none;
  }
}
