/* ==========================================================
   PROJECT DETAIL / OZ BURGER
   Pixel Estudio supplies the frame; OZ supplies the content.
   ========================================================== */

.case-page {
  --case-line: rgba(14, 14, 14, .12);
  --case-title-size: clamp(2.55rem, 3.45vw, 4.15rem);
  --case-chapter-top: clamp(42px, 4.6vw, 68px);
  --case-chapter-bottom: clamp(48px, 5.2vw, 76px);
  background: var(--color-bg);
}

.case-main {
  min-width: 0;
}

.case-page .site-nav__link.is-active::after {
  right: 0;
}

/* Internal project pages keep the exact compact desktop/tablet header used
   by /proyectos/. Mobile intentionally keeps the shared Home behaviour. */
@media (min-width: 781px) {
  .case-page .site-header[data-header-static-desktop] .site-header__inner {
    min-height: var(--header-height) !important;
    padding-top: 0 !important;
    align-items: center !important;
  }

  .case-page .site-header[data-header-static-desktop] .header-brand,
  .case-page .site-header[data-header-static-desktop]:not(.is-symbol) .header-brand {
    width: 138px !important;
    height: 44px !important;
    align-self: center !important;
  }

  .case-page .site-header[data-header-static-desktop] .header-brand__full,
  .case-page .site-header[data-header-static-desktop]:not(.is-symbol) .header-brand__full,
  .case-page .site-header[data-header-static-desktop].is-compact:not(.is-symbol) .header-brand__full {
    width: 132px !important;
    height: 52px !important;
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
  }

  .case-page .site-header[data-header-static-desktop] .header-brand__iso,
  .case-page .site-header[data-header-static-desktop]:not(.is-symbol) .header-brand__iso,
  .case-page .site-header[data-header-static-desktop].is-compact:not(.is-symbol) .header-brand__iso {
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (min-width: 781px) and (max-width: 920px) {
  .case-page .site-header[data-header-static-desktop] .header-brand,
  .case-page .site-header[data-header-static-desktop]:not(.is-symbol) .header-brand {
    width: 116px !important;
  }

  .case-page .site-header[data-header-static-desktop] .header-brand__full,
  .case-page .site-header[data-header-static-desktop]:not(.is-symbol) .header-brand__full {
    width: 112px !important;
  }
}

/* Intro */
.case-intro {
  padding-top: calc(var(--header-height) + clamp(24px, 2.4vw, 36px));
  padding-bottom: 0;
}

.case-intro > .container {
  position: relative;
  padding-bottom: clamp(28px, 3vw, 42px);
}

.case-intro > .container::after {
  content: "";
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  bottom: 0;
  height: 1px;
  background: var(--case-line);
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(22px, 2vw, 30px);
  border-bottom: 1px solid transparent;
  font-size: .88rem;
  font-weight: 600;
  transition: color 180ms ease, border-color 180ms ease;
}

.case-back:hover,
.case-back:focus-visible {
  color: var(--color-accent);
  border-color: currentColor;
}

.case-intro__grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(44px, 6vw, 96px);
}

.case-intro__main {
  flex: 1 1 720px;
  min-width: 0;
}

.case-kicker,
.case-intro__meta .meta {
  color: var(--color-text-muted);
}

.case-kicker {
  display: block;
  margin-bottom: 12px;
}

.case-intro h1 {
  max-width: 9ch;
  font-size: clamp(3.55rem, 5.65vw, 6.1rem);
  font-weight: 650;
  line-height: .9;
  letter-spacing: -.058em;
}

.case-intro__lede {
  max-width: 32ch;
  margin-top: clamp(14px, 1.5vw, 20px);
  font-size: clamp(1.08rem, 1.28vw, 1.34rem);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -.024em;
  text-wrap: balance;
}

.case-intro__meta {
  flex: 0 0 min(31%, 420px);
  display: grid;
  justify-items: end;
  gap: 8px;
  margin-left: auto;
  padding-bottom: 3px;
  text-align: right;
}

.case-intro__meta .meta {
  display: block;
  line-height: 1.5;
}

/* Hero */
.case-hero {
  padding-top: clamp(24px, 2.5vw, 34px);
  padding-bottom: clamp(34px, 3.6vw, 52px);
}

.case-hero__frame {
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  background: #080808;
}

.case-hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* Shared section rhythm. Dividers live inside the page container, matching
   the project rows on /proyectos/ instead of spanning the viewport. */
.case-story,
.identity-section,
.digital-section {
  background: var(--color-bg);
}

.case-story__inner,
.identity-layout {
  position: relative;
  padding-top: var(--case-chapter-top);
}

.case-story__inner::before,
.identity-layout::before,
.digital-story::before {
  content: "";
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  top: 0;
  height: 1px;
  background: var(--case-line);
}

.case-story__inner {
  padding-bottom: var(--case-chapter-bottom);
}

.case-index {
  display: block;
  margin-bottom: clamp(22px, 2.1vw, 30px);
  color: var(--color-accent);
}

.case-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(54px, 7vw, 112px);
}

.case-story__heading {
  flex: 0 1 44%;
  min-width: 0;
}

.case-story h2,
.identity-copy h2,
.digital-intro h2 {
  font-size: var(--case-title-size);
  font-weight: 650;
  line-height: .96;
  letter-spacing: -.052em;
  text-wrap: balance;
}

.case-story h2 {
  max-width: 11ch;
}

/* The challenge headline uses its full column instead of the shared short-title measure. */
.case-story--challenge h2 {
  max-width: none;
}

.case-copy {
  flex: 1 1 56%;
  max-width: 620px;
  align-self: flex-start;
  padding-top: 2px;
}

.case-copy p,
.identity-copy p,
.digital-intro > p {
  font-size: clamp(1rem, .98vw, 1.12rem);
  line-height: 1.56;
  letter-spacing: -.018em;
}

.case-copy p + p {
  margin-top: 18px;
}

/* Direction visual */
.identity-section {
  padding-bottom: var(--case-chapter-bottom);
}

.identity-layout {
  display: grid;
  grid-template-columns: minmax(260px, .68fr) minmax(0, 1.55fr);
  gap: clamp(46px, 5.5vw, 88px);
  align-items: start;
}

.identity-copy {
  padding-top: 0;
}

.identity-copy h2 {
  max-width: 11ch;
}

.identity-copy p {
  max-width: 33ch;
  margin-top: 20px;
  color: var(--color-text);
}

.identity-board {
  display: grid;
  grid-template-columns: 1.05fr .76fr .66fr;
  grid-template-rows: repeat(2, minmax(160px, 1fr));
  min-height: clamp(330px, 27vw, 430px);
  overflow: hidden;
  background: #080808;
  border: 1px solid rgba(14, 14, 14, .16);
}

.identity-tile {
  min-width: 0;
  overflow: hidden;
}

.identity-tile--logo {
  display: grid;
  place-items: center;
  background: #080808;
  border-right: 1px solid rgba(255,255,255,.13);
  border-bottom: 1px solid rgba(255,255,255,.13);
}

.identity-tile--logo img {
  width: min(46%, 210px);
  height: auto;
  mix-blend-mode: screen;
}

.identity-tile--statement {
  display: flex;
  align-items: center;
  padding: clamp(20px, 2.2vw, 34px);
  background: #ffc107;
  color: #080808;
  border-right: 1px solid rgba(8,8,8,.14);
  border-bottom: 1px solid rgba(8,8,8,.14);
}

.identity-tile--statement span {
  font-family: Anton, sans-serif;
  font-size: clamp(1.35rem, 1.9vw, 2.35rem);
  font-weight: 400;
  line-height: 1.04;
  text-transform: uppercase;
}

.identity-tile--palette {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  border-bottom: 1px solid rgba(8,8,8,.14);
}

.identity-swatch--ink { background: #080808; }
.identity-swatch--paper { background: #edeae2; }
.identity-swatch--red { background: #c2332e; }
.identity-swatch--yellow { background: #ffc107; }

.identity-tile--type,
.identity-tile--slogan,
.identity-tile--principles {
  padding: clamp(20px, 2.2vw, 34px);
}

.identity-tile--type {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #edeae2;
  color: #080808;
  border-right: 1px solid rgba(8,8,8,.14);
}

.identity-tile--type .meta {
  color: rgba(8,8,8,.58);
}

.identity-tile--type strong {
  font-family: Anton, sans-serif;
  font-size: clamp(2.55rem, 3.9vw, 4.8rem);
  font-weight: 400;
  line-height: .88;
}

.identity-tile--type small {
  font-size: .72rem;
  color: rgba(8,8,8,.58);
}

.identity-tile--slogan {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #080808;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.13);
}

.identity-tile--slogan strong {
  font-family: Anton, sans-serif;
  font-size: clamp(2.1rem, 3vw, 3.7rem);
  font-weight: 400;
  line-height: .92;
}

.identity-tile--slogan span {
  margin-top: 14px;
  font-family: Anton, sans-serif;
  font-size: clamp(1.35rem, 1.8vw, 2.2rem);
  color: #ffc107;
}

.identity-tile--principles {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #111;
  color: #fff;
}

.identity-tile--principles .meta {
  color: #ffc107;
}

@media (min-width: 781px) {
  .identity-tile--principles {
    justify-content: flex-start;
    gap: clamp(18px, 1.7vw, 26px);
  }
}

/* Principios: tres decisiones visibles, no un segundo eslogan. */
.identity-direction {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: identity-principle;
}

.identity-direction li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: baseline;
  column-gap: 9px;
  padding-block: 8px;
  border-top: 1px solid rgba(255,255,255,.19);
  counter-increment: identity-principle;
}

.identity-direction li::before {
  content: "0" counter(identity-principle);
  font-family: "JetBrains Mono", monospace;
  font-size: .55rem;
  font-weight: 500;
  color: #ffc107;
}

.identity-direction li span {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(.69rem, .83vw, .92rem);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.identity-mark {
  position: absolute;
  right: -.08em;
  bottom: -.18em;
  font-family: Anton, sans-serif;
  font-size: clamp(4.4rem, 6.4vw, 7rem);
  line-height: 1;
  color: rgba(255,255,255,.06);
}

/* OZ / Experience: one story, from ordering flow to real product. */
.digital-section {
  padding-bottom: var(--case-chapter-bottom);
}

.digital-story {
  position: relative;
  padding-top: var(--case-chapter-top);
}

.digital-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(48px, 7vw, 112px);
}

.digital-intro {
  min-width: 0;
}

.digital-intro h2 {
  max-width: 12ch;
}

.digital-intro > p {
  max-width: 43ch;
  margin-top: clamp(20px, 2vw, 30px);
  color: var(--color-text);
}

.digital-subtitle {
  font-size: clamp(1.3rem, 1.7vw, 1.8rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.045em;
}

/* Horizontal journey beside the introduction on wide screens. */
.digital-journey {
  min-width: 0;
  align-self: end;
}

.journey-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.journey-flow li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 0;
  padding: 0 8px 0 0;
}

.journey-flow li::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 26px;
  right: 0;
  top: 12px;
  height: 1px;
  background: rgba(14,14,14,.22);
}

.journey-flow li:last-child::before { display: none; }

.journey-flow .meta {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(14,14,14,.55);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: .63rem;
}

.journey-flow strong {
  margin-top: 16px;
  font-size: clamp(.82rem, 1vw, 1rem);
  font-weight: 650;
}
.journey-flow strong span { color: var(--color-accent); }
.journey-flow small {
  margin-top: 5px;
  color: var(--color-text-muted);
  font-size: .79rem;
  line-height: 1.4;
}

.digital-screens {
  margin-top: clamp(34px, 3.4vw, 50px);
  padding-top: clamp(18px, 2vw, 26px);
  border-top: 1px solid var(--case-line);
}

.digital-subtitle--index {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: clamp(.65rem, .72vw, .78rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.digital-screens > .digital-subtitle {
  margin-bottom: clamp(15px, 1.8vw, 25px);
}

/* The case closes on the same surface and with the same chapter hierarchy. */
.case-close {
  padding-block: var(--case-chapter-top) var(--case-chapter-bottom);
  background: var(--color-bg);
}

.case-close__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(52px, 8vw, 128px);
  row-gap: clamp(32px, 3.5vw, 48px);
  position: relative;
}

.case-close__inner::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--case-chapter-top));
  left: var(--page-pad);
  right: var(--page-pad);
  height: 1px;
  background: var(--case-line);
}

.case-close__heading { min-width: 0; }
.case-close__heading h2 {
  max-width: 13ch;
  font-size: var(--case-title-size);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.052em;
  text-wrap: balance;
}
.case-close__lede {
  max-width: 46ch;
  margin-top: 22px;
  color: var(--color-text);
  font-size: clamp(1rem, .98vw, 1.12rem);
  line-height: 1.56;
  letter-spacing: -.018em;
}
.case-close__copy {
  min-width: 0;
  align-self: end;
}
.case-close__copy p {
  max-width: 58ch;
  color: var(--color-text);
  font-size: clamp(1rem, .98vw, 1.12rem);
  line-height: 1.56;
  letter-spacing: -.018em;
}
.case-close__copy p + p { margin-top: 14px; }

.case-close__details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: inherit;
  column-gap: inherit;
  align-items: center;
  /* Match the columns above so the status aligns with the technical copy. */
}
.case-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--color-text-muted);
  font: 500 .72rem/1.3 var(--font-mono);
  letter-spacing: .035em;
  text-transform: uppercase;
}
.case-stack li + li::before {
  content: "·";
  padding-inline: 10px;
  color: var(--color-accent);
}
.case-close__production {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: clamp(16px, 1.6vw, 20px) clamp(18px, 2vw, 24px);
  background: #F4F3F0;
  border: 1px solid #DEDCD7;
  border-radius: 6px;
}
.case-production-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--case-line);
  border-radius: 999px;
  font: 500 .68rem/1.2 var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.case-status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4d7e50;
}
.case-close__production p {
  color: var(--color-text-muted);
  font-size: .875rem;
  line-height: 1.45;
}

.case-digital-showcase {
  width: 100%;
  max-width: 990px;
  min-height: clamp(400px, 38vw, 520px);
  margin: 0 auto;
}

.case-digital-showcase .oz-device--desktop {
  left: 0;
  top: 1%;
  width: 79%;
}

.case-digital-showcase .oz-device--desktop .oz-device__screen img {
  object-fit: contain;
  object-position: center;
  background: #050505;
}

.case-digital-showcase .oz-device--tablet {
  right: 0;
  top: 15%;
  width: 30%;
}

.case-digital-showcase .oz-device--phone {
  right: 29%;
  bottom: 0;
  width: 19%;
}

/* Design decisions explain why the flow works, not the same steps again. */
.digital-decisions {
  margin-top: clamp(16px, 1.8vw, 26px);
  padding-top: clamp(20px, 2vw, 28px);
  border-top: 1px solid var(--case-line);
}

.digital-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 0;
}

.digital-feature {
  min-width: 0;
  padding-right: clamp(18px, 2.3vw, 36px);
}

.digital-feature + .digital-feature {
  padding-left: clamp(18px, 2.3vw, 36px);
  border-left: 1px solid var(--case-line);
}

.digital-feature__icon {
  display: block;
  width: 29px;
  height: 29px;
  margin-bottom: clamp(12px, 1.2vw, 17px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.digital-feature__icon--whatsapp {
  object-fit: contain;
  filter: invert(1);
}

.digital-feature h4 {
  font-size: clamp(1rem, 1.08vw, 1.18rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.digital-feature p {
  max-width: 36ch;
  margin-top: 8px;
  font-size: clamp(.86rem, .94vw, .96rem);
  line-height: 1.55;
  color: var(--color-text-muted);
}

.digital-products {
  margin-top: clamp(24px, 2.8vw, 40px);
  padding-top: clamp(18px, 2vw, 26px);
  border-top: 1px solid var(--case-line);
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(8px, .85vw, 14px);
  margin-top: clamp(22px, 3vw, 36px);
}

.product-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.48 / 1;
  overflow: hidden;
  background: #0b0b0b;
}


.product-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 48%;
  transition: transform 420ms var(--ease), filter 420ms var(--ease);
}

.product-card--fries img {
  object-position: center 60%;
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.68));
  pointer-events: none;
}

.product-card figcaption {
  position: absolute;
  z-index: 2;
  left: clamp(16px, 1.6vw, 24px);
  right: clamp(16px, 1.6vw, 24px);
  bottom: clamp(15px, 1.5vw, 22px);
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 16px;
  color: #fff;
}

.product-card figcaption strong {
  font-size: clamp(.9rem, .95vw, 1.08rem);
  font-weight: 600;
}

@media (hover: hover) {
  .product-card:hover img {
    transform: scale(1.025);
    filter: saturate(1.04);
  }
}

.digital-end {
  padding-top: clamp(24px, 2.6vw, 36px);
  padding-bottom: clamp(32px, 3.2vw, 44px);
}

.case-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: auto;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(14, 14, 14, .72);
  font-size: clamp(.92rem, .95vw, 1rem);
  font-weight: 650;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.case-visit span {
  font-size: 1.08em;
  line-height: 1;
  transition: transform 180ms var(--ease);
}

.case-visit:hover,
.case-visit:focus-visible {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}

.case-visit:hover span,
.case-visit:focus-visible span {
  transform: translate(2px, -2px);
}

/* Project navigation + Pixel closing */
.case-pagination {
  background: var(--color-bg);
}

.case-pagination__inner {
  position: relative;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.case-pagination__inner::before {
  content: "";
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  top: 0;
  height: 1px;
  background: var(--case-line);
}

.case-pagination a {
  color: var(--color-text);
  font-weight: 600;
}

.case-pagination a:hover,
.case-pagination a:focus-visible {
  color: var(--color-accent);
}

/* A real case link stays available on mobile; older detail pages used this
   slot for a non-interactive placeholder that the mobile rule hides. */
.case-pagination a.case-pagination__next {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.portfolio-contact {
  background: #172026;
  color: var(--color-bg);
}

.portfolio-contact__inner {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding-block: clamp(34px, 5vw, 64px);
}

.portfolio-contact__title {
  max-width: 24ch;
  font-size: clamp(1.7rem, 2.5vw, 2.65rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.portfolio-contact a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, 230px);
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.045em;
  transition: color 180ms ease, border-color 180ms ease;
}

.portfolio-contact a:hover,
.portfolio-contact a:focus-visible {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

@media (max-width: 1100px) {
  .identity-layout {
    grid-template-columns: minmax(230px, .7fr) minmax(0, 1.35fr);
    gap: 42px;
  }

  .identity-board {
    grid-template-rows: repeat(2, minmax(150px, 1fr));
  }

  .case-digital-showcase {
    min-height: clamp(400px, 47vw, 530px);
  }
}

@media (max-width: 920px) {
  .case-intro__grid {
    align-items: flex-start;
  }

  .case-intro__meta {
    flex-basis: 36%;
  }

  .case-split {
    gap: 36px;
  }

  .identity-layout {
    grid-template-columns: 1fr;
  }

  .identity-copy {
    max-width: 640px;
  }

  .identity-copy p {
    max-width: 44ch;
  }

  .identity-board {
    min-height: 390px;
  }

  .case-digital-showcase {
    min-height: clamp(430px, 61vw, 600px);
  }

    .digital-feature { padding-right: 22px; }
  .digital-feature + .digital-feature { padding-left: 22px; }
}

@media (min-width: 781px) and (max-width: 1100px) {
  .digital-overview { grid-template-columns: 1fr; gap: 36px; }
  .digital-journey { align-self: stretch; }
}

@media (max-width: 780px) {
  .case-page {
    --case-title-size: clamp(2.35rem, 11vw, 3.5rem);
    --case-chapter-top: 36px;
    --case-chapter-bottom: 44px;
  }

  .case-intro {
    padding-top: calc(var(--header-height) + 22px);
  }

  .case-intro > .container {
    padding-bottom: 28px;
  }

  .case-back {
    margin-bottom: 24px;
  }

  .case-intro__grid,
  .case-split {
    flex-direction: column;
    gap: 26px;
  }

  .case-intro__main,
  .case-intro__meta,
  .case-story__heading,
  .case-copy {
    width: 100%;
    max-width: 640px;
    flex-basis: auto;
  }

  .case-intro h1 {
    font-size: clamp(3rem, 14vw, 4.7rem);
  }

  .case-intro__lede {
    max-width: 31ch;
    margin-top: 14px;
  }

  .case-intro__meta {
    gap: 7px;
  }

  .case-hero {
    padding-top: 22px;
    padding-bottom: 34px;
  }

  .case-hero__frame {
    width: 100%;
  }

  .case-intro__meta {
    justify-items: start;
    margin-left: 0;
    text-align: left;
  }


  .case-index {
    margin-bottom: 20px;
  }

  .case-copy {
    align-self: auto;
  }

  .digital-overview { grid-template-columns: 1fr; gap: 44px; }
  .digital-intro > p { max-width: 46ch; margin-top: 20px; }
  .journey-flow { display: flex; flex-direction: column; }
  .journey-flow li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 16px;
    min-height: 70px;
    padding: 0 0 12px;
  }
  .journey-flow li::before {
    left: 12px;
    right: auto;
    top: 26px;
    bottom: 0;
    width: 1px;
    height: auto;
  }
  .journey-flow .meta { grid-column: 1; grid-row: 1 / span 2; }
  .journey-flow strong { grid-column: 2; margin-top: 0; font-size: clamp(.94rem, 1.15vw, 1.08rem); }
  .journey-flow small { grid-column: 2; margin-top: 3px; }

  .digital-screens { margin-top: 38px; }
  .digital-decisions { margin-top: 22px; }
  .digital-products { margin-top: 30px; }
  .case-close__inner { grid-template-columns: 1fr; row-gap: 24px; }
  .case-close__copy { align-self: auto; }
  .case-close__details { flex-direction: column; align-items: flex-start; gap: 18px; }

  .identity-board {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, minmax(155px, auto));
    min-height: 0;
  }

  .identity-tile--logo,
  .identity-tile--statement,
  .identity-tile--palette,
  .identity-tile--type,
  .identity-tile--slogan,
  .identity-tile--principles {
    border-right: 1px solid rgba(14,14,14,.12);
    border-bottom: 1px solid rgba(14,14,14,.12);
  }

  .identity-tile--palette {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
  }

  .case-digital-showcase {
    width: 100%;
    max-width: 560px;
    min-height: 0;
    margin: 4px auto 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .case-digital-showcase .oz-device {
    position: relative;
    inset: auto;
    width: auto;
  }

  .case-digital-showcase .oz-device--desktop {
    width: 94%;
    align-self: flex-start;
    aspect-ratio: 1.48 / 1;
    border-radius: 14px;
    transform: translateY(24px) rotate(-1deg) scale(.985);
  }

  .case-digital-showcase .oz-device--tablet {
    width: 68%;
    align-self: flex-end;
    aspect-ratio: .88 / 1;
    margin-top: -24px;
    border-radius: 20px;
    transform: translateY(26px) rotate(1.8deg) scale(.985);
  }

  .case-digital-showcase .oz-device--phone {
    width: 43%;
    align-self: flex-start;
    aspect-ratio: .46 / 1;
    margin-top: -116px;
    margin-left: 7%;
    border-radius: 24px;
    transform: translateY(28px) rotate(-2.2deg) scale(.98);
  }

  .case-digital-showcase.is-visible .oz-device--desktop {
    transform: rotate(-1deg) scale(1);
  }

  .case-digital-showcase.is-visible .oz-device--tablet {
    transform: rotate(1.8deg) scale(1);
  }

  .case-digital-showcase.is-visible .oz-device--phone {
    transform: rotate(-2.2deg) scale(1);
  }

  .digital-features {
    grid-template-columns: 1fr;
    margin-top: 0;
  }
  .digital-feature,
  .digital-feature + .digital-feature {
    padding: 15px 0;
    border-left: 0;
  }
  .digital-feature + .digital-feature { border-top: 1px solid var(--case-line); }

  .product-gallery {
    display: flex;
    gap: 8px;
    margin-top: 22px;
    margin-right: calc(-1 * var(--page-pad));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-right: var(--page-pad);
    padding-bottom: 2px;
  }

  .product-gallery::-webkit-scrollbar {
    display: none;
  }

  .product-card {
    flex: 0 0 84%;
    aspect-ratio: 1.45 / 1;
    scroll-snap-align: start;
  }

  .product-card--fries {
    aspect-ratio: 1.45 / 1;
  }

  .case-pagination__next {
    display: none;
  }

  .portfolio-contact__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
    padding-block: 30px;
  }

  .portfolio-contact__title {
    max-width: 25ch;
    font-size: clamp(1.55rem, 6vw, 2.1rem);
  }

  .portfolio-contact a {
    width: min(100%, 210px);
    font-size: 1.35rem;
  }
}

/* Shared capture viewer */
.lightbox-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.lightbox-trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.lightbox {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
  background: rgba(9, 10, 11, .88);
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox__image {
  display: block;
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: default;
}

.lightbox__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  background: rgba(20,22,24,.55);
  color: #fff;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 560px) {
  .case-story--challenge h2 {
    max-width: 11ch;
  }

  .identity-board {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, minmax(138px, auto));
  }

  .identity-tile {
    min-height: 138px;
  }

  .identity-tile--logo {
    min-height: 138px;
  }

  .identity-tile--palette {
    min-height: 56px;
  }

  .identity-tile--type strong {
    margin-block: 18px;
  }

  .digital-end {
    padding-top: 22px;
  }

  .case-visit {
    width: 100%;
    min-height: 54px;
    justify-content: space-between;
    padding-inline: 18px;
  }

  .case-pagination__inner {
    min-height: 92px;
  }

  .case-pagination__inner > .meta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card img,
  .case-visit {
    transition: none !important;
  }
}
