/* The work itself leads each case. Shared chrome and world tokens stay intact. */
.page-interior .case-presentation .case-hero { padding-block: 34px 46px; }
.case-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr);
  grid-template-areas: "title visual" "details visual";
  gap: 0 46px;
  align-items: center;
}
.case-hero-grid > * { min-width: 0; }
.case-hero-grid > .content-hero-copy { grid-area: title; align-self: end; }
.case-hero-grid > .case-visual { grid-area: visual; }
.case-hero-grid > .case-hero-details { grid-area: details; align-self: start; }
.page-interior .case-presentation .case-hero h1 { max-width: 17ch; font-size: clamp(2.3rem, 3.6vw, 3.45rem); line-height: 1.12; }
.page-interior .case-presentation .case-hero .content-intro { max-width: 47ch; margin-top: 20px; }
.case-presentation .ux-hero-actions { gap: 18px 24px; }
.case-visual.project-media { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.case-visual > a { display: block; border: 1px solid var(--border-color); border-radius: var(--world-radius, 12px); background: var(--bg-alt); overflow: hidden; cursor: zoom-in; }
.case-visual img { display: block; width: 100%; height: auto; max-height: 490px; object-fit: contain; object-position: center; background: #e7edf0; }
.case-visual[data-material="screenshot"] img { background: #fff; }
.case-visual.project-media--portrait { width: 100%; max-width: 400px; justify-self: center; }
.case-visual.project-media--portrait img { height: auto; width: 100%; max-height: none; }
.case-visual .media-open { display: flex; justify-content: flex-end; align-items: center; gap: 10px; min-height: 44px; padding: 9px 16px; color: var(--accent); background: var(--bg-card); border-top: 1px solid var(--border-color); font-size: .84rem; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.case-visual figcaption { padding-top: 16px; }
.case-visual .media-title { display: block; color: var(--ink); font-size: 1rem; font-family: var(--font-heading); font-weight: 650; }
.case-visual figcaption p { margin: 7px 0 0; color: var(--text-secondary); font-size: .88rem; line-height: 1.6; }
.case-visual figcaption .media-caption { font-size: .78rem; }
.case-presentation [data-project-image]:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.case-presentation [data-project-image] .media-open > span { display: inline-block; transition: transform 150ms ease; }
.case-presentation [data-project-image]:focus-visible .media-open { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .case-presentation [data-project-image]:hover { border-color: var(--accent); }
  .case-presentation [data-project-image]:hover .media-open > span { transform: translate(2px, -2px); }
}
.page-interior .case-presentation .case-story { border-top: 1px solid var(--border-color); padding-block: 42px 50px; }
.case-story .section-heading { max-width: 830px; }
.case-story .section-heading p { max-width: 68ch; }
.case-story-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; list-style: none; margin: 0; padding: 0; counter-reset: case-stage; }
.case-story-steps > li { position: relative; min-width: 0; border-top: 1px solid var(--border-color); padding: 24px 0 0; counter-increment: case-stage; }
.case-story-steps > li::before { content: "0" counter(case-stage); display: block; margin-bottom: 16px; font-size: .82rem; font-weight: 650; color: var(--accent); }
.case-story-steps h3 { margin: 0 0 14px; font-size: 1.13rem; line-height: 1.4; }
.case-story-steps p, .case-story-steps ul { margin: 0; color: var(--text-secondary); font-size: .95rem; line-height: 1.75; }
.case-story-steps ul { margin-top: 14px; padding-left: 18px; list-style: disc; }
.case-presentation .case-complementary-media > .container { max-width: var(--container-max, 1280px); }
.case-complementary-media .media-grid { gap: 34px; }
.case-complementary-media .project-media:first-child,
.case-complementary-media .project-media:nth-child(2):last-child { grid-column: auto; max-width: none; }
.case-complementary-media .project-media:only-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 40px; align-items: center; }
.case-complementary-media .project-media:only-child figcaption { padding-top: 0; }
.case-complementary-media .project-media figcaption h3 { font-size: clamp(1.12rem, 1.7vw, 1.5rem); }
.case-complementary-media .project-media img { background: #e7edf0; }
.case-complementary-media .project-media[data-material="screenshot"] img { background: #fff; }
.case-presentation .case-depth-section { padding-block: 20px 42px; }
@media (max-width: 1100px) {
  .case-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 30px; }
  .page-interior .case-presentation .case-hero h1 { font-size: clamp(2.1rem, 3.7vw, 3rem); }
  .case-story-steps { gap: 26px; }
}
@media (max-width: 900px) {
  .case-hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "visual" "details"; gap: 24px; }
  .case-hero-grid > .content-hero-copy,
  .case-hero-grid > .case-hero-details { align-self: stretch; }
  .page-interior .case-presentation .case-hero h1 { max-width: 24ch; }
  .page-interior .case-presentation .case-hero .content-intro { max-width: 68ch; margin-top: 0; }
  .case-visual img { max-height: 480px; }
}
@media (max-width: 800px) {
  .case-hero-grid { gap: 24px; }
  .case-story-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .case-story-steps > li { padding: 20px 0 22px 40px; }
  .case-story-steps > li::before { position: absolute; left: 0; top: 22px; margin: 0; }
  .case-story-steps > li:last-child { padding-bottom: 0; }
  .case-story-steps h3 { margin-bottom: 8px; }
  .case-story-steps p, .case-story-steps ul { line-height: 1.6; }
  .case-complementary-media .project-media:only-child { display: block; }
  .case-complementary-media .project-media:only-child figcaption { padding-top: 16px; }
}
@media (max-width: 600px) {
  .page-interior .case-presentation .case-hero { padding-block: 20px 28px; }
  .case-hero-grid { gap: 22px; }
  .page-interior .case-presentation .case-hero h1 {
    max-width: 22ch;
    font-size: clamp(1.9rem, 7.8vw, 2.65rem);
    line-height: 1.14;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }
  .page-interior .case-presentation .case-hero .section-subtitle { margin-bottom: 12px; }
  .page-interior .case-presentation .case-hero .content-intro { margin-top: 0; font-size: 1rem; line-height: 1.6; }
  .case-presentation .ux-hero-actions { gap: 8px; margin-top: 20px; }
  .case-presentation .ux-hero-actions .btn-secondary {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    padding: 12px 18px;
    border-color: var(--accent);
    background: var(--accent);
    color: var(--button-text, var(--brand-navy));
    font-size: .94rem;
  }
  .case-presentation .ux-hero-actions .text-link { min-height: 44px; }
  .case-visual img { max-height: min(64svh, 520px); }
  .case-visual.project-media--portrait { max-width: 360px; }
  .case-visual.project-media--portrait img { max-height: min(64svh, 520px); }
  .case-visual .media-open { min-height: 48px; padding-inline: 14px; font-size: .875rem; }
  .case-visual figcaption { padding-top: 12px; }
  .case-visual .media-title { font-size: 1rem; line-height: 1.4; }
  .case-visual figcaption p { margin-top: 6px; font-size: .9375rem; line-height: 1.55; }
  .case-visual figcaption .media-caption { font-size: .875rem; line-height: 1.55; }
  .page-interior .case-presentation .case-story { padding-block: 28px 32px; }
  .case-story .section-heading { margin-bottom: 20px; }
  .case-story-steps > li { padding-left: 34px; }
  .case-story-steps h3 { font-size: 1.06rem; line-height: 1.4; }
  .case-story-steps p, .case-story-steps ul { font-size: .9375rem; }
  .case-complementary-media .media-grid { gap: 28px; }
  .case-presentation .case-depth-section { padding-block: 12px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .case-presentation [data-project-image] .media-open > span { transition: none; transform: none; }
}
@media print {
  .case-hero-grid, .case-complementary-media .project-media:only-child { display: block; }
  .case-visual { margin-top: 24px; break-inside: avoid; }
  .case-visual img { max-height: 350px; }
  .case-story-steps { display: block; }
  .case-story-steps > li { break-inside: avoid; padding-bottom: 18px; }
  .case-presentation .media-open, .case-presentation .ux-hero-actions { display: none; }
}
