/*
 * Consequences — "Evidence of failure" case study.
 *
 * Standalone page (/consequences) and the document inside the homepage
 * "advisory contrast" modal. Inside the modal the iframe is a 1280×720 canvas
 * (magnified by the host above 720p), so the embedded composition is the
 * 901–1366 "tablet landscape" route below.
 *
 * Structure
 *   .consequences            page root (fixed, centres the shell)
 *   .consequences__shell     framed panel: masthead / gallery body / footer
 *   .case-gallery            the image morph (.case-stage) beside the copy
 *                            panel (.case-captions)
 *
 * Breakpoints (identical to the original):
 *   ≤900                          mobile: one stacked column, page scrolls
 *   ≤599 portrait                 phone: captions size to their copy
 *   600–1024 portrait             tablet portrait: compact 96px masthead
 *   ≤1000 × ≤600 landscape        phone landscape
 *   ≤480                          small phone controls
 *   901–1366 × ≤1024              tablet landscape / 720p / embedded canvas
 *   ≥901                          desktop
 *   ≥1921 × ≥1081                 high-resolution type for the masthead/footer
 */

:root {
  color-scheme: dark;
  --cq-gold: #d9a45e;
  --cq-pale-gold: #f1c77d;
  --cq-cream: #f4ead8;
  --cq-teal: #58afa5;
  --cq-ease: cubic-bezier(0.19, 1, 0.22, 1);
  --cq-accordion-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --cq-morph-duration: 1050ms; /* read by js/embeds/consequences.js */

  /* Fluid copy-panel sizes (1280 → 1920 anchors). */
  --cq-eyebrow-size: clamp(17px, calc(0.3125vw + 13px), 19px);
  --cq-body-size: clamp(17px, calc(0.46875vw + 11px), 20px);
  --cq-title-size: clamp(27px, 2.35vw, clamp(40px, calc(1.25vw + 24px), 48px));
}

/* Pseudo-elements keep content-box sizing, as in the approved build. */
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #080c0a;
  color: var(--cq-cream);
}

body {
  overflow: hidden;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 1px solid var(--cq-pale-gold);
  outline-offset: 4px;
}

/* ---------- Page root & shell ---------- */

.consequences {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: clamp(12px, 1.15vw, 20px);
}

.consequences__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(2 4 3 / 0.88);
  backdrop-filter: blur(20px) saturate(0.8);
}

.consequences__shell {
  position: relative;
  z-index: 1;
  width: min(1540px, calc(100vw - 40px));
  height: min(920px, calc(100dvh - 36px));
  overflow: visible;
  border: 1px solid rgb(217 164 94 / 0.42);
  background:
    radial-gradient(circle at 71% 32%, rgb(55 112 103 / 0.13), transparent 35%),
    radial-gradient(circle at 8% 9%, rgb(188 111 46 / 0.1), transparent 28%),
    linear-gradient(145deg, #111714 0%, #080c0a 57%, #060806 100%);
  box-shadow: 0 48px 140px rgb(0 0 0 / 0.72), inset 0 1px rgb(255 235 194 / 0.08);
  isolation: isolate;
}

/* Faint 80px drafting grid, fading out to the right. */
.consequences__shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.018) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 0.014) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(90deg, black, transparent 72%);
}

.consequences__close {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 1200;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(217 164 94 / 0.42);
  border-radius: 50%;
  background: rgb(9 12 10 / 0.92);
  color: rgb(244 234 216 / 0.72);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.35);
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.35s var(--cq-ease);
}

.consequences__close:hover {
  color: var(--cq-cream);
  border-color: rgb(241 199 125 / 0.7);
  background: rgb(18 23 20 / 0.98);
  transform: rotate(90deg);
}

.consequences__frame {
  display: grid;
  grid-template-rows: clamp(96px, 12.5vh, 110px) minmax(0, 1fr) clamp(58px, 8vh, 68px);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* ---------- Masthead ---------- */

.consequences__masthead {
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  border-bottom: 1px solid rgb(241 199 125 / 0.2);
}

.consequences__brand {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
  padding: 19px 34px 14px;
}

.consequences__brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  margin-right: -14px;
  transform: translate(-7px, -1px);
  filter: drop-shadow(0 9px 18px rgb(0 0 0 / 0.36)) drop-shadow(0 0 12px rgb(217 164 94 / 0.12));
}

.consequences__brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.consequences__eyebrow {
  margin: 0 0 5px;
  color: rgb(241 199 125 / 0.76);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.consequences__title {
  margin: 0;
  color: rgb(244 234 216 / 0.96);
  font: 500 clamp(28px, 2.05vw, 36px) / 0.96 "Playfair Display", Georgia, serif;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.consequences__title-main {
  color: var(--cq-pale-gold);
}

.consequences__subtitle {
  margin: 4px 0 0;
  color: var(--cq-teal);
  font: 500 clamp(14px, 1.05vw, 17px) / 1.15 "Playfair Display", Georgia, serif;
  letter-spacing: -0.01em;
}

.consequences__mobile-break {
  display: none;
}

.consequences__overview {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 100%;
  padding: 14px 42px 14px 36px;
  border-left: 1px solid rgb(217 164 94 / 0.15);
}

.consequences__subline {
  position: relative;
  max-width: 680px;
  margin: 0;
  padding-left: 22px;
  color: rgb(244 234 216 / 0.92);
  font: 500 clamp(14px, 0.96vw, 17px) / 1.34 "Playfair Display", Georgia, serif;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.consequences__subline::before {
  content: "";
  position: absolute;
  top: 0.15em;
  bottom: 0.15em;
  left: 0;
  width: 2px;
  background: linear-gradient(var(--cq-cream), var(--cq-pale-gold), var(--cq-gold));
  box-shadow: 0 0 14px rgb(241 199 125 / 0.35);
}

/* ---------- Gallery body ---------- */

.consequences__body {
  position: relative;
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px 16px 14px;
  overflow: hidden;
}

/* Rounded, clipped plate behind the gallery with a soft inner vignette and a
   faint film-grain texture (visible in the gutter between image and copy). */
.case-gallery {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 3px;
  isolation: isolate;
}

.case-gallery::before,
.case-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.case-gallery::before {
  z-index: 1;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.1),
    inset 0 56px 120px rgb(0 0 0 / 0.12),
    inset 0 -48px 96px rgb(0 0 0 / 0.2);
}

.case-gallery::after {
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='96' height='96' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  background-size: 96px 96px;
  mix-blend-mode: soft-light;
  opacity: 0.18;
}

.case-gallery__grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: stretch;
  gap: 10px;
  width: 100%;
  height: 100%;
}

.case-gallery__grid > * {
  min-width: 0;
  min-height: 0;
}

/* ---------- Image stage ---------- */

.case-stage {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgb(241 199 125 / 0.16);
  border-radius: 2px;
  background: #090d0b;
  box-shadow: 0 24px 54px rgb(0 0 0 / 0.24);
  outline: none;
  cursor: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.case-stage * {
  cursor: none;
}

.case-stage__slides,
.case-stage__slide {
  position: absolute;
  inset: 0;
}

.case-stage__slides {
  overflow: hidden;
}

.case-stage__slide {
  z-index: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.case-stage__slide.is-current {
  z-index: 2;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.case-stage__slide.is-leaving {
  z-index: 3;
  visibility: visible;
  opacity: 1;
}

.case-stage__slide.is-entering {
  z-index: 4;
  visibility: visible;
  opacity: 1;
}

.case-stage__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  transform-origin: center center;
  backface-visibility: hidden;
  user-select: none;
  -webkit-user-drag: none;
}

.case-stage__slide:is(.is-current, .is-leaving, .is-entering) .case-stage__image {
  will-change: transform, opacity;
}

.case-stage__slide.is-current .case-stage__image {
  transform: translate3d(0, 0, 0);
}

.case-stage__image--top {
  object-position: top center;
}

.case-stage__image--bottom {
  object-position: bottom center;
}

.case-stage__image--right {
  object-position: right center;
}

/* "View more" bubble following the pointer (fine pointers only). */
.case-stage__cue {
  position: absolute;
  top: var(--cue-y, 0px);
  left: var(--cue-x, 0px);
  z-index: 2147482000;
  display: none;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: -35px 0 0 -35px;
  border: 1px solid rgb(255 246 224 / 0.42);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgb(255 248 232 / 0.24), rgb(105 174 165 / 0.18)),
    rgb(12 15 14 / 0.46);
  backdrop-filter: blur(14px) saturate(1.16);
  box-shadow:
    0 28px 74px rgb(0 0 0 / 0.44),
    0 0 34px rgb(105 174 165 / 0.15),
    inset 0 1px 0 rgb(255 255 255 / 0.38);
  color: var(--cq-pale-gold);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0) scale(0.88);
  transition:
    opacity 0.1s ease,
    transform 0.12s ease,
    visibility 0s linear 0.1s;
}

.case-stage__cue::after {
  content: "";
  position: absolute;
  inset: -4.5px;
  border: 3px solid rgb(255 255 255 / 0.55);
  border-radius: 32.5px;
  pointer-events: none;
}

.case-stage__cue span {
  color: rgb(255 255 255 / 0.94);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 14px rgb(0 0 0 / 0.48);
}

.case-stage__cue.is-active {
  visibility: visible;
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
  transition:
    opacity 0.1s ease,
    transform 0.12s ease,
    visibility 0s linear 0s;
}

/* Thumbnail rail, centred along the bottom of the image. */
.case-stage__thumbs {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: max-content;
  min-width: max-content;
  max-width: calc(100% - 20px);
  min-height: 43px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgb(18 18 18 / 0.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.34), inset 0 1px rgb(255 255 255 / 0.08);
  transform: translateX(-50%);
}

.case-stage__thumb {
  position: relative;
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 29px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 4px;
  background: #18201e;
  opacity: 0.64;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease,
    box-shadow 0.24s ease,
    filter 0.24s ease;
}

.case-stage__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  pointer-events: none;
}

.case-stage__thumb.is-active {
  border-color: rgb(241 199 125 / 0.82);
  opacity: 1;
  box-shadow: 0 0 0 2px rgb(241 199 125 / 0.2);
}

.case-stage__thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition:
    filter 0.24s ease,
    transform 0.24s ease;
}

/* ---------- Copy panel ---------- */

.case-captions {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgb(241 199 125 / 0.14);
  border-radius: 2px;
  background: #101411;
  box-shadow: 0 24px 54px rgb(0 0 0 / 0.2);
}

.case-caption {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  transform: translateY(0); /* own layer: keeps the copy's text rendering */
}

.case-caption.is-active {
  display: block;
}

.case-caption__strip {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
}

.case-caption__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  padding: 22px;
  overflow: auto;
  border-radius: 4px;
  text-align: left;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.44), inset 0 1px 0 rgb(255 255 255 / 0.07);
}

.case-caption__panel--failure {
  background: linear-gradient(180deg, rgb(112 38 35 / 0.62) 0%, rgb(57 17 18 / 0.88) 100%);
}

.case-caption__panel--restored {
  background: linear-gradient(180deg, rgb(70 110 70 / 0.55) 0%, rgb(35 65 45 / 0.82) 100%);
}

/* Hairline highlight along the top edge. */
.case-caption__panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.22) 0%, rgb(255 255 255 / 0.04) 58%, rgb(255 255 255 / 0) 100%);
  pointer-events: none;
}

.case-caption__panel > * {
  position: relative;
}

.case-caption__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: rgb(255 255 255 / 0.58);
  font-family: var(--font-sans);
  font-size: var(--cq-eyebrow-size);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Status dot: amber for failures, green once the system is restored. */
.case-caption__eyebrow::before {
  content: "";
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b86b28;
  box-shadow: 0 0 10px rgb(184 107 40 / 0.35);
}

.case-caption__panel--restored .case-caption__eyebrow::before {
  background: #4f8f63;
  box-shadow: 0 0 10px rgb(79 143 99 / 0.3);
}

.case-caption__title {
  max-width: 22ch;
  margin: 0;
  color: rgb(255 255 255 / 0.9);
  font-family: var(--font-serif);
  font-size: var(--cq-title-size);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: 0.17em;
  text-align: left;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Two copy treatments, as in the approved design: the first case study is a
   paragraph stack (smaller, tighter cream copy); the others are single body
   paragraphs in the larger panel size. */
.case-caption__copy,
.case-caption__body {
  max-width: 37ch;
  margin: 16px 0 0;
  color: rgb(255 255 255 / 0.74);
  font-family: var(--font-sans);
  font-size: var(--cq-body-size);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: 0.01em;
  text-align: left;
}

.case-caption__copy p {
  margin: 0 0 13px;
  color: rgb(244 234 216 / 0.82);
  font-size: clamp(13px, 0.9vw, 15px);
  line-height: 1.5;
}

.case-caption__copy p:last-child {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.consequences__footer {
  grid-row: 3;
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr) auto;
  align-items: center;
  border-top: 1px solid rgb(241 199 125 / 0.2);
  background: rgb(6 9 8 / 0.88);
}

.consequences__stage-label {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 100%;
  padding: 0 30px;
  border-right: 1px solid rgb(217 164 94 / 0.15);
  color: rgb(244 234 216 / 0.38);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.consequences__stage-label strong {
  color: var(--cq-pale-gold);
  font: 500 19px / 1 "Playfair Display", serif;
}

.consequences__stage-label i {
  width: 38px;
  height: 1px;
  background: rgb(241 199 125 / 0.25);
}

.consequences__kicker {
  margin: 0;
  padding: 0 28px;
  overflow: hidden;
  color: rgb(217 164 94 / 0.68);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.consequences__enquire {
  display: block;
  width: auto;
  min-width: 250px;
  height: 42px;
  margin: 0 16px 0 0;
  border: 1px solid rgb(213 164 82 / 0.62);
  background: rgb(26 21 14 / 0.14);
  color: #e1b86e;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.consequences__enquire:hover {
  border-color: rgb(241 199 125 / 0.82);
  background: rgb(92 64 27 / 0.2);
  color: #f1c77d;
}

/* ---------- Embedded in the homepage modal ---------- */

.is-embedded .consequences {
  padding: 0;
}

.is-embedded .consequences__backdrop,
.is-embedded .consequences__close {
  display: none;
}

.is-embedded .consequences__shell {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ================= Mobile (≤900): one scrolling column ================= */

@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: clip;
    overflow-y: visible;
  }

  .consequences,
  .consequences__shell,
  .is-embedded .consequences__shell {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    max-height: none;
    padding: 0;
    overflow: visible;
  }

  .consequences__frame {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .consequences__masthead,
  .consequences__footer {
    flex: 0 0 auto;
  }

  .consequences__masthead {
    grid-template-columns: 1fr;
  }

  .consequences__brand {
    padding: 22px 68px 12px 22px;
  }

  .consequences__brand-mark,
  .consequences__eyebrow {
    display: none;
  }

  .consequences__title {
    font-size: clamp(38px, 10vw, 42px);
    line-height: 0.98;
  }

  .consequences__mobile-break {
    display: block;
  }

  .consequences__subtitle {
    margin-top: 7px;
    font-size: clamp(18px, 4.8vw, 21px);
    line-height: 1.2;
  }

  .consequences__overview {
    padding: 4px 22px 22px;
    border-left: 0;
  }

  .consequences__subline {
    font-size: clamp(18px, 4.8vw, 21px);
    line-height: 1.42;
  }

  .consequences__body,
  .case-gallery {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    padding: 0;
    overflow: visible;
  }

  .case-gallery {
    border-radius: 0;
  }

  .case-gallery__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: auto;
  }

  .case-stage {
    order: 1;
    display: block;
    flex: 0 0 auto;
    height: clamp(320px, 58dvh, 520px);
    min-height: clamp(320px, 58dvh, 520px);
    border-radius: 0;
  }

  .case-stage,
  .case-stage * {
    cursor: pointer;
  }

  .case-captions {
    order: 2;
    display: block;
    flex: 0 0 auto;
    height: auto;
    min-height: 330px;
    overflow: visible;
  }

  .case-caption,
  .case-caption__strip,
  .case-caption__panel {
    min-height: 330px;
  }

  .case-caption__panel {
    justify-content: flex-start;
    padding: 24px 22px 30px;
    overflow: visible;
    border-radius: 0;
  }

  .case-caption__title {
    max-width: none;
    font-size: clamp(22px, 6.2vw, 28px);
    letter-spacing: 0.1em;
  }

  .case-caption__copy,
  .case-caption__body {
    max-width: none;
    font-size: 17px;
    line-height: 1.45;
  }

  .consequences__footer {
    grid-template-columns: 1fr;
    align-self: end;
    z-index: 8;
    width: 100%;
    padding: 12px 14px max(16px, env(safe-area-inset-bottom, 0px));
    gap: 0;
    background: linear-gradient(180deg, rgb(6 9 8 / 0.88), rgb(6 9 8 / 0.98));
  }

  .consequences__stage-label,
  .consequences__kicker {
    display: none;
  }

  .consequences__enquire {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 56px;
    margin: 0;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 740;
    letter-spacing: 0.22em;
  }
}

/* Phone portrait: the copy panel takes the height of the active caption. */
@media (max-width: 599px) and (orientation: portrait) {
  .consequences,
  .consequences__shell,
  .is-embedded .consequences__shell,
  .consequences__frame {
    min-height: 100svh;
  }

  .case-captions {
    min-height: 0;
  }

  .case-caption.is-active {
    position: relative;
    inset: auto;
  }

  .case-caption.is-active,
  .case-caption.is-active .case-caption__strip,
  .case-caption.is-active .case-caption__panel {
    height: auto;
    min-height: 0;
  }

  .case-caption__copy,
  .case-caption__body,
  .case-caption__copy p {
    font-size: 18px;
    line-height: 1.5;
  }
}

/* Tablet portrait: a compact 96px masthead with the mark, title and subline. */
@media (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
  .consequences__frame {
    grid-template-rows: 96px minmax(0, 1fr) 58px;
  }

  .consequences__masthead {
    display: grid;
    grid-template-columns: minmax(0, 70%) minmax(0, 30%);
    width: 100%;
    height: 96px;
    min-height: 96px;
    overflow: hidden;
  }

  .consequences__brand {
    align-items: center;
    gap: 10px;
    height: 96px;
    padding: 8px 44px 8px 12px;
  }

  .consequences__brand-mark {
    display: grid;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    margin: 0;
    transform: none;
  }

  .consequences__brand-text {
    min-width: 0;
  }

  .consequences__eyebrow {
    display: none;
  }

  .consequences__title {
    font-size: clamp(28px, 4vw, 34px);
    line-height: 0.96;
  }

  .consequences__subtitle {
    margin-top: 3px;
    font-size: clamp(14px, 2vw, 17px);
    line-height: 1.12;
  }

  .consequences__overview {
    height: 96px;
    min-height: 0;
    padding: 8px 44px 8px 12px;
  }

  .consequences__subline {
    padding-left: 12px;
    font-size: clamp(12px, 1.75vw, 15px);
    line-height: 1.25;
    transform: translateX(-28px);
  }
}

/* Phone landscape. */
@media (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {
  .consequences__brand {
    padding: 12px 68px 10px 18px;
  }

  .consequences__brand-mark,
  .consequences__eyebrow,
  .consequences__overview,
  .consequences__mobile-break {
    display: none;
  }

  .consequences__title {
    font-size: clamp(27px, 4.2vw, 33px);
    line-height: 0.94;
  }

  .consequences__subtitle {
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.15;
  }

  .consequences__body {
    min-height: 340px;
  }

  .case-gallery__grid {
    min-height: 340px;
  }

  .case-stage {
    height: 100%;
    min-height: 340px;
  }

  .case-captions,
  .case-caption.is-active,
  .case-caption.is-active .case-caption__strip,
  .case-caption.is-active .case-caption__panel {
    min-height: 340px;
  }

  .case-caption.is-active {
    position: relative;
    inset: auto;
    height: auto;
  }

  .case-caption.is-active .case-caption__strip,
  .case-caption.is-active .case-caption__panel {
    height: auto;
  }

  .case-caption__panel {
    padding: 16px 15px 20px;
  }

  .case-caption__title {
    font-size: clamp(19px, 2.8vw, 25px);
    line-height: 1.08;
  }

  .case-caption__copy,
  .case-caption__body,
  .case-caption__copy p {
    font-size: 18px;
    line-height: 1.46;
  }

  .consequences__footer {
    padding: 8px 12px max(8px, env(safe-area-inset-bottom, 0px));
  }

  .consequences__enquire {
    height: 48px;
  }
}

@media (max-width: 480px) {
  .case-stage__thumbs {
    bottom: 12px;
    gap: 4px;
    min-height: 38px;
    padding: 6px 7px;
  }

  .case-stage__thumb {
    flex-basis: 34px;
    width: 34px;
    height: 26px;
  }

  .consequences__footer {
    padding: 12px 12px max(16px, env(safe-area-inset-bottom, 0px));
  }

  .consequences__enquire {
    height: 54px;
    font-size: 11.5px;
    letter-spacing: 0.2em;
  }
}

/* ======= Tablet landscape, 720p and the embedded 1280×720 canvas ======= */

@media (min-width: 901px) and (max-width: 1366px) and (max-height: 1024px) {
  html,
  body,
  .consequences,
  .consequences__shell,
  .consequences__frame {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .consequences {
    inset: 0;
    padding: 0;
  }

  .consequences__shell {
    height: 100dvh;
    max-height: 100dvh;
  }

  .is-embedded .consequences__shell {
    width: 100%;
    max-width: none;
  }

  .consequences__frame {
    grid-template-rows: clamp(96px, 10.75vh, 110px) minmax(0, 1fr);
  }

  .consequences__overview {
    padding-right: 78px;
    padding-left: 14px;
  }

  .consequences__body {
    width: 100vw;
    max-width: 100vw;
    padding: 0;
  }

  .case-gallery__grid {
    position: absolute;
    inset: 0 16px 16px;
    gap: 8px;
    width: auto;
    height: auto;
  }

  .case-captions {
    align-self: start;
    height: calc(100% - 62px);
    overflow-y: auto;
  }

  .case-caption__eyebrow {
    font-size: 14px;
    letter-spacing: 0.14em;
  }

  .case-caption__title {
    font-size: clamp(21px, 2.2vw, 27px);
    line-height: 1.06;
    letter-spacing: 0.1em;
  }

  .case-caption__copy,
  .case-caption__body,
  .case-caption__copy p {
    font-size: 15px;
    line-height: 1.4;
  }

  /* The enquiry button floats under the copy panel; the label and kicker go. */
  .consequences__footer {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 12;
    display: block;
    width: calc(40vw - 16px);
    height: 54px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .consequences__stage-label,
  .consequences__kicker {
    display: none;
  }

  .consequences__enquire {
    width: 100%;
    min-width: 0;
    height: 54px;
    margin: 0;
  }
}

/* ================= Desktop (≥901) ================= */

@media (min-width: 901px) {
  .consequences__overview {
    align-self: stretch;
    height: 100%;
  }

  .consequences__subline {
    transform: translateY(-10px);
  }
}

/* The pointer bubble exists only for real mouse / trackpad input. */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .case-stage__cue {
    display: flex;
  }

  .case-stage__thumb,
  .case-stage__thumb * {
    cursor: pointer;
  }
}

/* Entrance: the image and then the copy panel unfold from the left like an
   accordion; the footer settles last. Played by js/embeds/consequences.js. */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .case-stage,
  .case-captions {
    transform-origin: left center;
    pointer-events: none;
    will-change: clip-path, transform, opacity;
  }

  .case-stage {
    clip-path: inset(0 100% 0 0);
    opacity: 0.25;
    transform: translateX(-34px) scaleX(0.04);
    transition:
      clip-path 900ms var(--cq-accordion-ease),
      transform 900ms var(--cq-accordion-ease),
      opacity 320ms ease;
  }

  .consequences.reveal-image .case-stage {
    clip-path: inset(0);
    opacity: 1;
    transform: none;
  }

  .case-captions {
    clip-path: inset(0 100% 0 0);
    opacity: 0.2;
    transform: translateX(-30px) scaleX(0.055);
    transition:
      clip-path 820ms var(--cq-accordion-ease),
      transform 820ms var(--cq-accordion-ease),
      opacity 300ms ease;
  }

  .consequences.reveal-copy .case-captions {
    clip-path: inset(0);
    opacity: 1;
    transform: none;
  }

  .consequences__footer {
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity 420ms ease,
      transform 620ms var(--cq-accordion-ease);
  }

  .consequences.reveal-complete .consequences__footer {
    opacity: 1;
    transform: none;
  }

  .consequences.reveal-complete .case-stage,
  .consequences.reveal-complete .case-captions {
    pointer-events: auto;
    will-change: auto;
  }
}

/* In the tablet-landscape composition the floating enquiry button is never
   part of the entrance. */
@media (min-width: 901px) and (max-width: 1366px) and (max-height: 1024px) {
  .consequences__footer {
    opacity: 1;
    transform: none;
  }
}

/* High-resolution screens: masthead eyebrow and footer type grow with the
   viewport (from their 1920 size, capped at 1.55×). */
@media (min-width: 1921px) and (min-height: 1081px) {
  .consequences__eyebrow,
  .consequences__kicker {
    font-size: clamp(9px, min(0.46875vw, 0.833333vh), 13.95px);
  }

  .consequences__stage-label {
    font-size: clamp(8px, min(0.416667vw, 0.740741vh), 12.4px);
  }

  .consequences__stage-label strong {
    font-size: clamp(22px, min(1.145833vw, 2.037037vh), 33px);
  }

  .consequences__enquire {
    font-size: clamp(10px, min(0.520833vw, 0.925926vh), 15.5px);
  }
}
