/* Final layout refinements, shared by the homepage and portfolio. */
:root { --content-width: 86rem; }
img { height: auto; }
html { scroll-padding-top: 6.5rem; }
main, section, article, figure { min-width: 0; }
section[id] { scroll-margin-top: 1rem; }
.section-pad > * { max-width: var(--content-width); margin-inline: auto; }
.hero { max-width: 104rem; margin-inline: auto; gap: clamp(2.5rem, 4vw, 5rem); }
.hero h1 em { color: var(--olive-deep); }
.hero-deck { max-width: 30rem; font-size: 1.08rem; line-height: 1.6; }
.hero .eyebrow { max-width: 30rem; font-size: 0.66rem; letter-spacing: 0.12em; }
.hero-art { width: 100%; }
/* Preserve the chosen car, rising route graph, and mid-century poster. */
.hero-poster.visible { transform-style: flat; }
.service-strip > div { animation: none; width: 100%; justify-content: center; gap: clamp(1rem, 2.8vw, 3rem); }
.service-strip > div > :nth-child(n + 11) { display: none; }
.service-strip span { white-space: nowrap; }
.problem .section-heading { margin-bottom: 2.5rem; }
.pain-grid article { min-height: 10.5rem; }
.pain-grid h3 { margin-bottom: 0; }
.reframe-grid { gap: clamp(2.5rem, 7vw, 7rem); }
.reframe > .section-label { margin-bottom: 1.5rem; }
.reframe h2 { max-width: 11ch; }
.reframe-visual { min-height: 24rem; }
.reframe-visual img { width: min(82%, 25rem); }
.reframe-visual figcaption { left: 1rem; right: 1rem; text-align: center; font-size: .58rem; letter-spacing: .09em; }
.direction-panel { min-height: 24rem; }
.direction-panel h3 { margin-top: 4rem; max-width: 12ch; font-size: clamp(2.4rem, 3.7vw, 3.7rem); }
.direction-panel ul { grid-template-columns: 1fr; padding-top: 1.5rem; }
.direction-panel li { padding-block: .6rem; }
.direction-panel .panel-number { font-size: 5rem; }
.service-explorer { grid-template-columns: minmax(15rem, .8fr) minmax(0, 1.2fr); }
.service-detail { min-height: 27rem; padding: clamp(1.6rem, 3.5vw, 3.3rem); }
.service-detail h3 { margin-top: 2rem; font-size: clamp(2.7rem, 4vw, 4.4rem); }
.service-detail ul { grid-template-columns: 1fr; margin: 1.3rem 0 2rem; }
.service-detail li { padding-block: .6rem; }
.service-detail li::before { top: 1.2rem; }
.service-tab { font-size: .95rem; }
.service-detail > p:not(.mini-label) { line-height: 1.55; }
/* Road and controls share one compact composition. */
.home-page .method { padding-block: clamp(3.25rem, 5vw, 5rem); }
.method-heading { margin-bottom: 2rem; }
.method-heading .section-label { margin-bottom: 1.3rem; }
.method-heading h2 { font-size: clamp(2.7rem, 4.6vw, 4.8rem); }
.journey-console { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); border: 1px solid var(--ivory-line); background: rgba(243, 235, 221, .025); }
.journey-art { position: relative; margin: 0; min-height: 25rem; overflow: hidden; display: grid; place-items: center; isolation: isolate; }
.journey-art::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(180,94,48,.14), transparent 65%); }
.journey-art .journey-road-illustration { position: static; width: auto; max-width: 90%; height: 23rem; object-fit: contain; margin: 0 auto 1rem; transform: none; filter: none; opacity: 1; }
.journey-art figcaption { position: absolute; bottom: 1rem; left: 0; right: 0; color: rgba(243,235,221,.72); text-align: center; font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; }
.journey-controls { padding: clamp(1.4rem, 3vw, 2.7rem); border-left: 1px solid var(--ivory-line); min-width: 0; }
.journey-hint { display: flex; align-items: center; justify-content: space-between; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: #d8cbb8; margin-bottom: 1rem; }
.journey-controls .journey-nodes { position: static; inset: auto; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 0; gap: .4rem; background: transparent; backdrop-filter: none; }
.journey-controls .journey-node:nth-child(n) { position: static; width: auto; min-height: 3.6rem; padding: .65rem .7rem; display: flex; flex-direction: row; gap: .6rem; justify-content: flex-start; align-items: center; color: #e0d4c2; border: 1px solid var(--ivory-line); background: transparent; transition: color 180ms ease, background 180ms ease; }
.journey-controls .journey-node::before { display: none; }
.journey-node strong { font-family: var(--sans); font-weight: 400; font-size: .88rem; }
.journey-node span { color: #c7b89f; font-size: .6rem; letter-spacing: .04em; }
.journey-controls .journey-node.active { background: var(--ivory); color: var(--tobacco); border-color: var(--ivory); }
.journey-controls .journey-node.active span { color: var(--olive-deep); }
.journey-controls .journey-node:hover:not(.active) { background: rgba(243,235,221,.09); color: var(--ivory-bright); }
.journey-controls .journey-detail { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: 12.3rem; margin: 1.2rem 0 0; padding: 0; background: transparent; color: var(--ivory); }
.journey-detail > div { align-items: center; gap: .6rem; margin-bottom: .6rem; }
.journey-detail > div span { font-family: var(--sans); font-size: .65rem; color: #d9c0a3; }
.journey-detail > div p { color: #d9c0a3; font-size: .6rem; }
.journey-detail h3 { font-size: clamp(1.9rem, 2.8vw, 3rem); line-height: 1.02; margin-bottom: .7rem; max-width: 19ch; }
.journey-detail > p { color: #d8cbb8; font-size: .94rem; line-height: 1.6; max-width: 38ch; }
.journey-progress { height: 2px; width: 100%; background: var(--ivory-line); margin-top: 1rem; }
.journey-progress span { display: block; width: calc(100% / 6); height: 100%; background: #d28a51; transition: width 300ms ease; }
/* Case files are the invitation; outcomes give them weight. */
.portfolio-invite { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(2rem,5vw,5rem); }
.portfolio-invite-copy > p:not(.section-label) { max-width: 26rem; }
.portfolio-invite-copy .section-label { color: var(--tobacco); }
.portfolio-case-stack { min-height: 34rem; width: 100%; }
.portfolio-case-route path { animation: none; }
.case-slip { min-height: 10rem; }
.case-slip i { color: var(--tobacco); font-size: .63rem; letter-spacing: .05em; }
.case-slip b { font-weight: 700; font-size: .82rem; }
.portfolio-route-car { position: absolute; z-index: 4; right: -2%; bottom: 5%; width: 38%; height: auto; transform: rotate(-8deg); filter: drop-shadow(0 .5rem .3rem rgba(48,18,0,.15)); transition: transform 250ms ease; }
.portfolio-case-stack:hover .portfolio-route-car { transform: rotate(-8deg) translate(.5rem,-.2rem); }
.portfolio-case-stamp { bottom: 0; }
.home-page .fit { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: clamp(2rem,7vw,7rem); align-items: center; }
.home-page .fit-heading { display: block; margin-bottom: 0; }
.fit-heading h2 { margin-top: 1.5rem; }
.home-page .fit-grid { display: block; width: 100%; border: 0; }
.home-page .fit-list { padding: 0; border: 0; }
.home-page .fit-list li { font-size: clamp(1.6rem,2.5vw,2.6rem); padding-block: 1.1rem; }
.home-page .fit-list .mini-label { display: none; }
.closing { min-height: 38rem; padding-top: 2rem; }
.closing-copy { padding-block: 4rem; }
.closing-copy h2 { font-size: clamp(3rem,4.6vw,5rem); max-width: 21ch; }
.closing-route { top: 42%; left: 50%; width: min(70vw,60rem); transform: translate(-50%,-50%); }
footer { gap: 2rem; }
footer small { white-space: nowrap; }
/* Let content remain readable when scripts or motion are unavailable. */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(1rem); }
.js .reveal.visible { opacity: 1; transform: none; }
.js .hero-poster.visible { transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); }
/* Portfolio: immediately legible evidence and direct case navigation. */
.portfolio-page .work-hero { min-height: auto; padding-block: 10rem 4rem; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(3rem,6vw,6rem); align-items: center; }
.portfolio-page .work-hero h1 { font-size: clamp(3.7rem,6.2vw,6.5rem); max-width: 11ch; }
.portfolio-page .work-hero-summary p { font-weight: 400; }
.portfolio-proof { padding: clamp(1rem,2.4vw,2rem); border: 1px solid var(--tobacco); background: var(--ivory-bright); }
.portfolio-proof > .mini-label { margin-bottom: 1.5rem; font-size: .65rem; }
.proof-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; }
.proof-grid a { display: flex; flex-direction: column; min-height: 10rem; padding: 1rem 0; border-top: 1px solid var(--tobacco-line); transition: background 180ms; }
.proof-grid a:nth-child(odd) { padding-right: 1rem; border-right: 1px solid var(--tobacco-line); }
.proof-grid a:nth-child(even) { padding-left: 1rem; }
.proof-grid a:hover { background: rgba(107,106,78,.07); }
.proof-grid span { color: var(--olive-deep); font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; }
.proof-grid strong { margin: 1rem 0 .8rem; color: var(--tobacco); font-family: var(--serif); font-size: clamp(2.4rem,3.8vw,4rem); font-weight: 400; line-height: 1; letter-spacing: -.04em; }
.proof-grid small { font-size: .72rem; line-height: 1.4; }
.proof-grid i { font-style: normal; color: var(--terracotta); }
.proof-footnote { border-top: 1px solid var(--tobacco-line); padding-top: 1rem; margin: 0; font-size: .72rem; color: var(--olive-deep); line-height: 1.5; }
.case-index { display: flex; gap: 1rem 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 1.4rem var(--page-x); border-block: 1px solid var(--tobacco-line); font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; }
.case-index > span { font-weight: 700; }
.case-index a { padding-block: .5rem; border-bottom: 1px solid transparent; }
.case-index a:hover { border-bottom-color: var(--tobacco); }
@media (min-width: 841px) {
  .nav { gap: clamp(.6rem,1.3vw,1.8rem); white-space: nowrap; }
  .nav a { font-size: .65rem; letter-spacing: .06em; }
}
@media (max-width: 1100px) {
  .hero-actions { gap: 1rem; }
  footer { grid-template-columns: auto 1fr; }
  .footer-links { flex-wrap: wrap; }
  .journey-controls { padding: 1.4rem; }
  .journey-node strong { font-size: .78rem; }
}
@media (max-width: 840px) {
  .nav { height: 100dvh; overflow-y: auto; }
  .nav .nav-cta { flex-shrink: 0; }
  .hero { grid-template-columns: 1fr; padding-top: 8rem; gap: 3rem; }
  .hero-copy { max-width: 42rem; }
  .hero-poster { min-height: 32rem; max-width: 42rem; justify-self: center; }
  .hero h1 { max-width: 13ch; }
  .reframe-visual { min-height: 24rem; }
  .direction-split { grid-template-columns: 1fr 1fr; }
  .direction-panel { min-height: 23rem; padding: 1.5rem; }
  .direction-panel h3 { font-size: 2.5rem; }
  .service-explorer { grid-template-columns: 1fr; }
  .service-list { grid-template-columns: 1fr 1fr; }
  .service-tab:nth-child(n) { min-height: 3.7rem; border-right: 1px solid var(--tobacco-line); }
  .service-tab:nth-child(even) { border-right: 0; }
  .service-tab:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .service-detail { min-height: 23rem; }
  .service-detail h3 { font-size: 3rem; margin-top: 1rem; }
  .journey-console { grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); }
  .journey-art .journey-road-illustration { max-width: 100%; }
  .journey-controls .journey-node:nth-child(n) { padding-inline: .4rem; gap: .35rem; }
  .portfolio-invite { grid-template-columns: 1fr; }
  .portfolio-case-stack { max-width: 40rem; justify-self: center; }
  .home-page .fit { grid-template-columns: 1fr; gap: 2.2rem; }
  .fit-heading h2 { max-width: 15ch; }
  .portfolio-page .work-hero { grid-template-columns: 1fr; padding-top: 8rem; }
  .portfolio-page .work-hero h1 { max-width: 13ch; }
  .portfolio-proof { max-width: 44rem; width: 100%; }
  .proof-grid strong { font-size: 3.2rem; }
}
@media (max-width: 600px) {
  :root { --page-x: 1.3rem; }
  html { scroll-padding-top: 5.5rem; }
  .home-page { --section-y: 3.6rem; }
  .hero { padding-top: 7rem; padding-bottom: 4rem; gap: 2.4rem; }
  .hero .eyebrow { line-height: 1.6; font-size: .6rem; gap: .6rem; margin-bottom: 1.2rem; }
  .hero h1 { font-size: clamp(2.8rem,12vw,4.2rem); max-width: 13ch; }
  .hero-deck { font-size: 1rem; }
  .hero-actions { margin-top: 1.6rem; }
  .hero-actions .button { width: 100%; }
  .hero-actions .text-link { font-size: .7rem; }
  .hero-poster { min-height: 28rem; width: calc(100% - .55rem); justify-self: start; }
  .service-strip > div { gap: .8rem; }
  .service-strip > div > :nth-child(n + 7) { display: none; }
  .service-strip span { font-size: .53rem; letter-spacing: .1em; }
  .section-label { font-size: .63rem; letter-spacing: .12em; }
  .pain-grid { grid-template-columns: 1fr 1fr; }
  .pain-grid article { min-height: 8.5rem; padding: 1.2rem .9rem; }
  .pain-grid article:nth-child(2) { border-right: 0; }
  .pain-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--ivory-line); }
  .pain-grid h3 { font-size: 1.65rem; }
  .reframe-grid { gap: 2rem; }
  .reframe-visual { min-height: 21rem; }
  .reframe-visual img { width: 85%; }
  .direction-split { grid-template-columns: 1fr; }
  .direction-panel { min-height: 21rem; padding: 1.5rem; }
  .direction-panel h3 { font-size: 2.5rem; margin-top: 3.5rem; }
  .service-tab { font-size: .84rem; padding: .75rem .65rem; grid-template-columns: 1.3rem 1fr; gap: .4rem; }
  .service-detail { min-height: 23rem; padding: 1.4rem; }
  .service-detail h3 { font-size: 2.65rem; }
  .service-detail > a { font-size: .65rem; }
  .home-page .method { padding-block: 3rem; }
  .method-heading { margin-bottom: 1.4rem; }
  .method-heading h2 { font-size: 2.7rem; max-width: 13ch; }
  .journey-console { position: relative; display: block; isolation: isolate; }
  .journey-art { position: absolute; inset: 0; z-index: -1; min-height: 0; opacity: .13; }
  .journey-art .journey-road-illustration { height: 95%; max-width: 85%; margin: 0; }
  .journey-art figcaption { display: none; }
  .journey-controls { padding: 1.1rem; border-left: 0; }
  .journey-controls .journey-nodes { gap: .35rem; }
  .journey-controls .journey-node:nth-child(n) { min-height: 3.1rem; padding: .5rem .4rem; }
  .journey-node strong { font-size: .75rem; }
  .journey-node span { font-size: .55rem; }
  .journey-hint { font-size: .6rem; margin-bottom: .8rem; }
  .journey-controls .journey-detail { min-height: 10.2rem; margin-top: 1.3rem; }
  .journey-detail h3 { font-size: 2rem; }
  .journey-detail > p { font-size: .87rem; }
  .journey-progress { margin-top: .6rem; }
  .portfolio-invite { gap: 1.8rem; }
  .portfolio-invite-copy h2 { font-size: 3.2rem; max-width: 10ch; }
  .portfolio-invite-copy .button { width: 100%; }
  .portfolio-case-stack { min-height: 29rem; }
  .case-slip { min-height: 9rem; width: 86%; }
  .case-slip strong { font-size: 2.1rem; }
  .case-slip small { font-size: .55rem; }
  .case-slip i { font-size: .55rem; }
  .case-slip b { font-size: .73rem; }
  .portfolio-route-car { right: 0; bottom: 4%; width: 42%; }
  .home-page .fit-list li { font-size: 1.7rem; line-height: 1.2; }
  .closing { min-height: auto; padding-top: 1.5rem; }
  .closing-copy { padding: 2rem 0 3.5rem; }
  .closing-copy h2 { font-size: 2.8rem; max-width: 15ch; }
  .closing-route { left: 50%; top: 35%; width: 120vw; }
  footer { grid-template-columns: 1fr; gap: 1.25rem; padding-top: 2rem; }
  .footer-links { gap: .7rem 1.2rem; font-size: .61rem; }
  .portfolio-page .work-hero { padding: 7rem var(--page-x) 3rem; gap: 2rem; }
  .portfolio-page .work-hero h1 { font-size: 3.5rem; }
  .portfolio-proof { padding: 1rem; }
  .proof-grid a { min-height: 9.5rem; }
  .proof-grid strong { font-size: clamp(2.35rem,10vw,3.5rem); }
  .proof-grid small { font-size: .65rem; }
  .case-index { gap: .25rem 1rem; justify-content: flex-start; }
  .case-index > span { width: 100%; margin-bottom: .35rem; }
}
@media (max-width: 360px) {
  .journey-controls { padding: .8rem; }
  .journey-node span { display: none; }
  .journey-controls .journey-node:nth-child(n) { justify-content: center; }
  .poster-ticket { min-width: 7.6rem; right: 4%; padding: .6rem; }
  .poster-ticket strong { font-size: .8rem; }
}
/* Motion follows the existing illustration without changing its composition. */
.motion-toggle { display: none; }
.js .motion-toggle { position: absolute; z-index: 10; top: 3.5rem; right: 1.7rem; min-height: 2.1rem; padding: .4rem .6rem; display: inline-flex; align-items: center; gap: .4rem; border: 1px solid rgba(243,235,221,.55); border-radius: 0; background: var(--olive-deep); color: var(--ivory); font: 700 .55rem var(--sans); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.motion-toggle svg { width: .75rem; height: .75rem; flex: none; }
.motion-toggle:hover { background: var(--tobacco); }
.motion-toggle .motion-play-icon { display: none; }
.motion-toggle[aria-pressed="true"] .motion-play-icon { display: block; }
.motion-toggle[aria-pressed="true"] .motion-pause-icon { display: none; }
html.motion-paused, html.motion-suspended, .hero-poster.motion-out-of-view { --art-play-state: paused; }
@media (prefers-reduced-motion: no-preference) {
  .poster-car-wrap { animation: hero-car-drive 7s ease-in-out infinite; }
  .poster-car-image { transform-origin: 50% 78%; animation: hero-car-suspension 1.8s ease-in-out infinite; }
  .poster-car-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255,239,202,.24) 45%, transparent 55%); background-size: 280% 100%; mask: url('assets/rihla-vintage-car.webp') center / contain no-repeat; -webkit-mask: url('assets/rihla-vintage-car.webp') center / contain no-repeat; animation: hero-car-glint 8s ease-in-out infinite; }
  .poster-route path { animation: hero-route-drive 16s linear infinite; }
  .poster-route circle { transform-box: fill-box; transform-origin: center; animation: hero-route-marker 4.5s ease-in-out infinite; }
  .poster-route circle:nth-of-type(2) { animation-delay: 1.1s; }
  .poster-route circle:nth-of-type(3) { animation-delay: 2.2s; }
  .portfolio-case-route path { animation: route-flow 22s linear infinite; }
  .closing-route .route-center { animation: route-flow 25s linear infinite; }
}
.poster-car-wrap, .poster-car-image, .poster-car-wrap::after, .poster-route path, .poster-route circle, .portfolio-case-route path, .closing-route .route-center { animation-play-state: var(--art-play-state, running); }
@keyframes hero-car-drive {
  0%, 100% { transform: translate3d(-.65rem, var(--parallax-y), 0) rotate(-1deg); }
  50% { transform: translate3d(.9rem, calc(var(--parallax-y) - .15rem), 0) rotate(-.5deg); }
}
@keyframes hero-car-suspension {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-1.5px) rotate(.18deg); }
}
@keyframes hero-car-glint {
  0%, 40% { background-position: 160% 0; opacity: 0; }
  46% { opacity: .7; }
  66% { background-position: -60% 0; opacity: .7; }
  73%, 100% { background-position: -60% 0; opacity: 0; }
}
@keyframes hero-route-drive { to { stroke-dashoffset: -200; } }
@keyframes hero-route-marker {
  0%, 45%, 100% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1.25); opacity: .75; }
}
@media (max-width: 600px) {
  .js .motion-toggle { top: 3rem; right: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .motion-toggle { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .hero-poster.visible, .portfolio-case-stack:hover .portfolio-route-car { transform: none; }
}

/* Attributed GFI campaign evidence. */
.gfi-reference { margin: 1.5rem 0 3rem; padding: 1.5rem 0; border-top: 1px solid var(--ivory-line); border-bottom: 1px solid var(--ivory-line); }
.gfi-reference blockquote { margin: 0 0 1rem; width: 100%; max-width: none; font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.2; }
.gfi-reference figcaption, .gfi-reference p { font-size: .8rem; line-height: 1.5; }
.gfi-reference p { max-width: 48rem; margin: .75rem 0 0; opacity: .72; }

/* A flowing editorial narrative for the Headliner case study. */
.portfolio-page .case-story > p { margin: 0 0 1.5rem; max-width: 40rem; font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.7; }
.portfolio-page .case-story > p:last-child { margin-bottom: 0; }
.portfolio-page .case-story strong { color: inherit; font-weight: 700; }

/* GFI comment-to-message automation and its campaign evidence. */
.gfi-automation { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--ivory-line); }
.gfi-automation h3 { margin: 1rem 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.4vw, 3.5rem); line-height: 1.05; letter-spacing: -.035em; }
.gfi-automation-copy > p:not(.mini-label) { max-width: 35rem; color: rgba(243,235,221,.75); }
.gfi-automation-results { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 2rem 0 1rem; }
.gfi-automation-results > div { display: flex; flex-direction: column-reverse; gap: .4rem; }
.gfi-automation-results dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.gfi-automation-results dd { margin: 0; font-family: var(--serif); font-size: clamp(2.5rem, 4vw, 4rem); line-height: 1; }
.gfi-automation-note { font-size: .78rem; }
.gfi-automation-proof { display: grid; gap: 1.5rem; align-content: center; min-width: 0; }
.gfi-automation-proof figure { margin: 0; min-width: 0; }
.gfi-automation-proof img { display: block; width: 100%; height: auto; border-radius: .4rem; }
.gfi-automation-proof figcaption { margin-top: .6rem; font-size: .72rem; color: rgba(243,235,221,.65); }
@media (max-width: 800px) { .gfi-automation { grid-template-columns: 1fr; } }

/* Keep long engagement labels clear of their values. */
.gfi-facts div { grid-template-columns: 8.5rem minmax(0, 1fr); column-gap: 1rem; }
.gfi-facts dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .gfi-facts div { grid-template-columns: 1fr; gap: .4rem; }
}

/* Before-and-after comparisons use the current case study palette. */
.case-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: clamp(2.5rem, 5vw, 4rem) 0; border: 1px solid rgba(243,235,221,.25); }
.case-comparison article { min-width: 0; padding: clamp(1.4rem, 3vw, 2.5rem); }
.case-comparison article + article { border-left: 1px solid rgba(243,235,221,.25); background: rgba(243,235,221,.04); }
.case-comparison h3 { margin: .75rem 0 1rem; max-width: 28rem; font-family: var(--serif); font-size: clamp(1.7rem, 2.5vw, 2.6rem); font-weight: 400; letter-spacing: -.03em; line-height: 1.1; }
.case-comparison article > p:last-child { margin: 0; max-width: 38rem; font-size: 1rem; line-height: 1.65; opacity: .8; }
.sportspatio-case .case-comparison { border-color: rgba(48,18,0,.25); }
.sportspatio-case .case-comparison article + article { border-color: rgba(48,18,0,.25); background: rgba(48,18,0,.035); }
@media (max-width: 640px) {
  .case-comparison { grid-template-columns: 1fr; }
  .case-comparison article + article { border-left: 0; border-top: 1px solid rgba(243,235,221,.25); }
}

/* Plain before/after labels, matched to each case palette. */
.portfolio-page .case-comparison .mini-label {
  display: inline-block;
  width: fit-content;
  margin: 0 0 .75rem;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .1em;
  opacity: 1;
}

.portfolio-page .case-study-headliner .case-comparison .mini-label { color: #f3ebdd; }
