/* Cases use shared tokens and type from public/site.css. */
.casePage { padding-top: calc(var(--header-height) + 36px); padding-bottom: 72px; }
.back { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 32px; color: var(--blue); font-size: 14px; }
.iconArrow::before { content: "→"; }
.arrowLeft::before { content: "←"; }
.arrowUpRight::before { content: "↗"; }
.caseIntro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: stretch; }
.caseCopy { min-width: 0; display: flex; flex-direction: column; padding-block: 20px; }
.caseCopy h1 { font-size: clamp(36px, 4.4vw, 68px); line-height: 1.08; overflow-wrap: anywhere; hyphens: auto; }
.subtitle { margin-top: 24px; font-size: 20px; line-height: 1.5; }
.summary { margin-top: 28px; color: var(--muted); }
.heroMedia { min-width: 0; overflow: hidden; border-radius: 20px; background: #e4e8ef; }
.heroMedia img { width: 100%; height: 100%; min-height: 440px; max-height: 620px; object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 40px; }
.stats-title { margin: 40px 0 0; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stats-title + .stats { margin-top: 16px; }
.stat { padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.stat strong { display: block; font-size: 32px; font-weight: 500; line-height: 1.2; color: var(--blue); }
.stat span { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); }
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; margin-top: 48px; padding-block: 36px; border-block: 1px solid var(--line); }
.detail { min-width: 0; }
.detail h2 { margin-bottom: 16px; font-size: 24px; }
.detail p { color: var(--muted); font-size: 16px; }
.detail .detail-followup { margin-top: 32px; }
.scope-list { list-style: none; margin: 0; padding: 0; color: var(--muted); }
.scope-list li { padding-block: 12px; border-bottom: 1px solid var(--line); }
.scope-list li:first-child { padding-top: 0; }
.detail .text-link { margin-top: 20px; font-size: 14px; }
.gallery-hint { margin-top: 44px; margin-bottom: 16px; color: var(--muted); font-size: 14px; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; overflow-x: auto; padding: 6px 6px 20px; margin: -6px; scroll-snap-type: x mandatory; scrollbar-color: var(--blue) #e3e7ef; }
.gallery[data-count="2"] { grid-auto-columns: calc((100% - 16px) / 2); }
.galleryItem { position: relative; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #e4e8ef; scroll-snap-align: start; cursor: zoom-in; }
.galleryItem img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.galleryItem:hover img { transform: scale(1.025); }
.galleryItem span { position: absolute; right: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(5,14,32,.85); color: white; font-size: 12px; }
.lightbox { width: 100%; height: 100dvh; max-width: 100%; max-height: 100dvh; margin: 0; padding: 64px 20px 24px; border: 0; background: #081225; color: white; }
.lightbox[open] { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 16px; }
.lightbox figure { display: grid; justify-items: center; margin: 0; min-width: 0; }
.lightbox figure img { width: auto; max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; }
.lightbox figcaption { margin-top: 12px; font-size: 14px; }
.lightboxClose, .lightboxArrow { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #778399; border-radius: 50%; background: #17253f; color: white; font-size: 22px; }
.lightboxClose { position: absolute; right: 20px; top: 16px; font-size: 28px; }
.testimonial { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 32px; margin-top: 48px; padding: 36px; border-radius: 20px; background: #eef1f7; }
.testimonialPhoto { border-radius: 14px; overflow: hidden; }
.testimonialPhoto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.quoteMark { display: none; }
.quoteBody .project-note { margin: 0; font: 400 clamp(20px, 2vw, 26px)/1.65 Inter, Arial, sans-serif; letter-spacing: .01em; }
.quoteBody footer { margin-top: 22px; font-size: 14px; font-weight: 600; }
.quoteBody footer span { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
.caseCta { display: flex; justify-content: space-between; align-items: center; gap: 36px; margin-top: 48px; padding: 40px; border-radius: 20px; background: linear-gradient(120deg,#e9efff,#f1eafb 65%,#faeef5); }
.caseCta h2 { max-width: 700px; font-size: clamp(28px, 3vw, 40px); }
.caseCta p { margin-top: 16px; color: var(--muted); }
.caseCta > a { display: inline-flex; justify-content: center; align-items: center; gap: 24px; flex-shrink: 0; padding: 16px 26px; border-radius: 999px; background: var(--blue); color: white; }
.caseCta > span { display: none; }
.caseNav { display: flex; justify-content: space-between; gap: 32px; margin-top: 40px; }
.caseNav a { display: flex; align-items: center; gap: 10px; max-width: 48%; font-size: 14px; color: var(--blue); }
.siteFooter { padding-block: 40px; background: var(--night); color: #ced8e8; font-size: 14px; }
.footerMain { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footerMain > div { display: flex; flex-direction: column; align-items: start; gap: 12px; min-width: 0; }
.footerMain a { text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.footerMain strong { color: white; font-weight: 500; }
.footerRow { display: flex; justify-content: space-between; gap: 24px; margin-top: 32px; padding-top: 24px; border-top: 1px solid #465267; }
@media (max-width: 980px) {
  .caseIntro { gap: 28px; }
  .caseCopy h1 { font-size: clamp(32px, 4.2vw, 44px); }
  .subtitle { font-size: 18px; }
  .heroMedia img { min-height: 380px; }
  .caseCta { flex-direction: column; align-items: start; }
}
@media (max-width: 640px) {
  .casePage { padding-top: calc(var(--header-height) + 24px); }
  .caseIntro, .details { grid-template-columns: 1fr; }
  .caseCopy { padding-top: 0; }
  .caseCopy h1 { font-size: clamp(28px, 8vw, 48px); overflow-wrap: normal; }
  .heroMedia img { min-height: 0; max-height: none; aspect-ratio: 4 / 3; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 20px 16px; }
  .stat strong { font-size: 26px; }
  .details { gap: 28px; padding-block: 28px; }
  .gallery, .gallery[data-count="2"] { grid-auto-columns: 86%; }
  .lightbox[open] { grid-template-columns: 1fr 1fr; align-content: center; padding-inline: 12px; }
  .lightbox figure { grid-column: 1 / -1; grid-row: 1; }
  .lightboxArrow { justify-self: center; }
  .lightbox figure img { max-height: calc(100dvh - 210px); }
  .testimonial { grid-template-columns: 1fr; padding: 26px; gap: 24px; }
  .testimonialPhoto { width: 100px; }
  .caseCta { padding: 28px 24px; }
  .caseCta > a { width: 100%; }
  .caseNav, .footerRow { flex-direction: column; }
  .caseNav a { max-width: 100%; }
  .footerMain { grid-template-columns: 1fr; }
}
