/*
 * 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-.
 * Calm since 27 October 2026 (CASE-STUDY-STANDARD.md 3.5): no boxes, cards,
 * number tiles or extra labels; the composition changes from chapter to
 * chapter, "How it works" is the one sticky stage, the refrigerator text is
 * the one place where text sticks, the cooktop on the market is the one dark
 * band.
 */

:root {
  --sh-night: #101215;
}

.sh-page {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-sans);
  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: var(--content-width);
  margin-inline: auto;
}

/* ---------- 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: var(--radius-pill);
  font: var(--weight-semibold) 16px/1.3 var(--font-sans);
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-standard);
}

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

.sh-button--light:hover {
  background: var(--color-surface-alt);
}

/* 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: var(--color-ink-on-dark) !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: var(--color-ink-on-dark);
  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(--text-h1);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

.sh-hero__lead {
  max-width: 600px;
  margin: 28px 0 36px;
  color: var(--color-ink-on-dark);
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
}

.sh-hero .case-facts {
  color: var(--color-ink-on-dark);
}

.sh-hero__credit {
  margin: 20px 0 0;
  color: var(--color-ink-on-dark-muted);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
}

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

.sh-section {
  padding-block: var(--space-section);
}

.sh-section--white {
  background: var(--color-surface);
}

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

/* Chapter 03 ends in the dark band, edge to edge. */
.sh-section--band-end {
  padding-bottom: 0;
}

.sh-head {
  max-width: 940px;
  margin-bottom: var(--space-block);
}

.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(--text-h2);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-h2);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

.sh-h3 {
  margin: clamp(64px, 8vw, 112px) 0 12px;
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-h3);
  letter-spacing: var(--tracking-h3);
  text-wrap: balance;
}

.sh-h3__text {
  max-width: 640px;
  margin: 0;
  color: var(--color-ink-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.sh-copy p {
  margin: 0;
  color: var(--color-ink-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

/* Chapter intro next to the H2. */
.sh-head__text {
  margin: 0;
  color: var(--color-ink-body);
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
}

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

.sh-copy .sh-copy__lead {
  color: var(--color-ink);
  font-size: var(--text-lead);
  font-weight: var(--weight-medium);
  line-height: var(--leading-lead);
}

/* ---------- 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: var(--space-block) 0 0;
}

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

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

/* Chapter 02: the specification page first, the numbers beside it. */
.sh-split--media-first {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
}

.sh-split > .sh-figure {
  margin-top: 0;
}

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

.sh-figure {
  margin: var(--space-block) 0 0;
}

.sh-figure > img,
.sh-photo img,
.sh-photos img,
.sh-pin__media img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

.sh-page figcaption {
  max-width: var(--measure);
  margin: 14px 0 0;
  color: var(--color-ink-muted);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
}

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

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

/* Graphics stand on the chapter surface; their caption keeps a little more air. */
.sh-figure > .shg-fig + figcaption,
.sh-figure > .shd + figcaption,
.sh-pin__media .shg-fig + figcaption {
  margin-top: var(--space-6);
}

/* Bildreihe (.case-strip aus case-base.css): Abstand zur Unterschrift kommt vom Raster */
.sh-page .case-strip figcaption {
  margin: 0;
}

/* ---------- Caption with the pause control at its end ---------- */
/* Same pattern as Moving Types: the control appears with JavaScript, only
   when motion is allowed, pauses the run and plays it again afterwards. */

.sh-caption-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: var(--space-4);
}

.sh-page .sh-caption-row {
  max-width: none;
}

.sh-caption-row > span {
  max-width: var(--measure);
}

.sh-control {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  /* The same width for "Pause" and "Play", so the caption never reflows. */
  min-width: 76px;
  min-height: var(--tap-min);
  /* Centre the 44 px target on the first caption line. */
  margin: -12px calc(-1 * var(--space-2)) -12px 0;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink-muted);
  font: var(--weight-semibold) var(--text-caption)/var(--leading-caption) var(--font-sans);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-standard);
}

.sh-control[hidden] {
  display: none;
}

.sh-control:hover {
  color: var(--color-accent);
}

/* Two bars for "Pause", a triangle for "Play". */
.sh-control__icon {
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.sh-control[data-action="play"] .sh-control__icon {
  border: 0;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* ---------- 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: var(--space-block) 0 0;
  align-items: start;
}

/* ---------- 03 Cooktop: the stage "How it works" ---------- */
/* js/case-stage.js turns the list into a sticky stage from 1024 px. The
   frame takes two thirds of the width; the graphics are wider than video,
   so the screen is 2 : 1 and each graphic sits inside it, whole. */

.sh-stage {
  margin-top: var(--space-block);
}

.sh-page .sh-stage.is-staged {
  --sh-gap: var(--space-8);
  container-type: inline-size;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  column-gap: var(--sh-gap);
}

.sh-page .sh-stage.is-staged > .case-stage__frame {
  --sh-frame-w: min((100cqi - var(--sh-gap)) * 2 / 3, (100vh - var(--scroll-offset) - var(--space-24)) * 2);
  width: var(--sh-frame-w);
  top: calc(var(--scroll-offset) + max(var(--space-6), (100vh - var(--scroll-offset) - var(--sh-frame-w) / 2 - var(--space-12)) / 2));
}

@media (min-width: 1280px) {
  .sh-page .sh-stage.is-staged {
    --sh-gap: var(--space-12);
  }
}

.sh-page .sh-stage .case-stage__screen {
  aspect-ratio: 2 / 1;
}

.sh-page .sh-stage .case-stage__screen .case-stage__media {
  padding: var(--space-6);
}

.sh-page .sh-stage .case-stage__screen .shg-fig,
.sh-page .sh-stage .case-stage__screen .shg-art,
.sh-page .sh-stage .case-stage__screen .shg-svg--wide {
  width: 100%;
  height: 100%;
}

/* The bars under the frame show the position; the "02 / 07" counter is
   left out (3.5). */
.sh-page .sh-stage .case-stage__count {
  display: none;
}

/* As a list the intro already says where the graphics come from. */
.sh-page .sh-stage:not(.is-staged) .case-stage__origin {
  display: none;
}

.sh-stage .sh-control {
  justify-self: start;
  margin: 0 0 0 calc(-1 * var(--space-2));
}

/* On the stage only the active step offers its pause. */
.sh-stage.is-staged .case-stage__step:not(.is-active) .sh-control {
  visibility: hidden;
}

/* ---------- 03 Cooktop: the dark band ---------- */

.sh-band {
  margin-top: var(--space-section);
  padding-block: var(--space-section);
  background: var(--color-surface-dark);
  color: var(--color-ink-on-dark);
}

.sh-band figcaption {
  color: var(--color-ink-on-dark-muted);
}

.sh-band img {
  border-color: var(--color-line-on-dark);
  background: #0c0f12;
}

/* ---------- 04 Refrigerator: the text stays while the media pass ---------- */
/* From 1024 px on windows tall enough for the whole text. */

.sh-pin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, min(720px, 58%));
  gap: var(--space-10) clamp(32px, 5vw, 88px);
  align-items: start;
  margin-top: var(--space-block);
}

.sh-pin__media {
  display: grid;
  gap: var(--space-block);
}

@media (min-width: 1024px) and (min-height: 720px) {
  .sh-pin__text {
    position: sticky;
    top: calc(var(--scroll-offset) + var(--space-6));
  }
}

/* ---------- What remains (chapter 06) ---------- */

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

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

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

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

.sh-h3--small {
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
}

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

.sh-h4 {
  margin: clamp(48px, 6vw, 72px) 0 20px;
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-h4);
  letter-spacing: var(--tracking-h3);
}

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

.sh-h5 {
  margin: 0 0 14px;
  color: var(--color-accent);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  line-height: var(--leading-label);
  letter-spacing: var(--tracking-label);
  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: var(--radius-md);
}

.sh-shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: border-color var(--dur-fast) var(--ease-standard);
}

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

.sh-gallery--renderings .sh-shot img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  padding: 16px;
  background: var(--color-surface);
}

.sh-anim video {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

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

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

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

@media (max-width: 1279.98px) {
  .sh-anims,
  .sh-gallery--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023.98px) {
  .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,
  .sh-split--media-first,
  .sh-pin {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

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

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

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