/* ==========================================================================
   reidEXA — case-study.css
   Styles for case study detail pages. Loaded after site.css.

   Used by:
     • case-studies/energy-ai-operations.html
     • case-studies/healthcare-patient-experience.html
     • case-studies/network-communications-at-scale.html
     • case-studies/b2b-sales-intelligence.html

   Pairs with: scripts/case-study-gallery.js (carousel + lightbox behavior).

   Sections:
      1. Breadcrumb
      2. Hero
      3. Section shells (light / paper / dark variants)
      4. Prose (long-form narrative)
      5. Approach — three-pillar EXA card grid
      6. Outcomes — metric cards
      7. Highlight quote
      8. Gallery — legacy short-form helpers (kept for future use)
      9. Image carousel — primary visual gallery
     10. Lightbox modal
     11. EXA application card (template-only, optional)
     12. Prev/next case study navigation
     13. Back to homepage
     14. Signature mark
     15. Mobile (≤900px)
     16. Reduced motion
   ========================================================================== */


/* ==========================================================================
   1. Breadcrumb
   ========================================================================== */

.breadcrumb {
  padding: 20px 0 0;
  background: var(--midnight);
}
.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--slate-light);
}
.breadcrumb-inner a {
  color: var(--slate-light);
  transition: color var(--dur-base) var(--ease-out);
}
.breadcrumb-inner a:hover { color: var(--white); }
.breadcrumb-sep { color: var(--slate); }
.breadcrumb-current {
  color: var(--electric);
  text-transform: uppercase;
}


/* ==========================================================================
   2. Hero — atmospheric Midnight with diagonal grid overlay
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 60px 0 100px;
  background:
    radial-gradient(1100px 720px at 8% 0%,
      hsl(var(--electric-hsl) / 0.10), transparent 60%),
    radial-gradient(900px 620px at 100% 100%,
      hsl(var(--midnight-3-hsl) / 0.82), transparent 55%),
    var(--midnight);
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image:
    linear-gradient(hsl(var(--electric-hsl) / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--electric-hsl) / 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
}
.hero-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--electric);
}
.hero-title {
  max-width: 900px;
  margin-bottom: 28px;
  font-family: var(--display);
  font-size: 58px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--white);
}
.hero-title em {
  font-style: normal;
  font-weight: 700;
  color: var(--electric);
}
.hero-sub {
  max-width: 720px;
  margin-bottom: 52px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--slate-dim);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--midnight-4);
}
/* Semantic wrapper for one label/value pair. The grid auto-places it; the
   only style it adds is a min-width: 0 to prevent long values from blowing
   out the column track. */
.hero-meta-item { min-width: 0; }
.hero-meta-label {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-light);
}
.hero-meta-value {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--white);
}


/* ==========================================================================
   3. Section shells — light (default) / paper / dark
   ========================================================================== */

.section {
  padding: 100px 0;
  border-bottom: 1px solid var(--cloud);
}
.section.paper {
  border-bottom: none;
  background:
    radial-gradient(800px 500px at 100% 0%,
      hsl(var(--electric-hsl) / 0.04), transparent 60%),
    radial-gradient(700px 460px at 0% 100%,
      hsl(var(--cloud-hsl) / 0.6), transparent 60%),
    var(--paper);
}
.section.dark {
  color: var(--white);
  border-bottom: none;
  background:
    radial-gradient(1000px 680px at 0% 0%,
      hsl(var(--electric-hsl) / 0.08), transparent 60%),
    radial-gradient(900px 620px at 100% 100%,
      hsl(var(--midnight-3-hsl) / 0.8), transparent 55%),
    var(--midnight);
}

.section-title {
  max-width: 760px;
  margin-bottom: 24px;
  font-family: var(--display);
  font-size: 44px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--midnight);
}
.section.dark .section-title { color: var(--white); }
.section-title em {
  font-style: normal;
  font-weight: 500;
  color: var(--slate);
}
.section.dark .section-title em {
  font-weight: 700;
  color: var(--electric);
}

.section-intro {
  max-width: 700px;
  margin-bottom: 48px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--slate);
}
.section.dark .section-intro { color: var(--slate-dim); }


/* ==========================================================================
   4. Prose — long-form narrative content
   ========================================================================== */

.prose {
  max-width: 760px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--midnight);
}
.prose p { margin-bottom: 20px; }
.prose p:last-child { margin-bottom: 0; }
.prose p.lead {
  margin-bottom: 28px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--midnight);
}
.prose strong {
  font-weight: 500;
  color: var(--midnight);
}
.section.dark .prose         { color: var(--slate-dim); }
.section.dark .prose strong  { color: var(--white); }
.section.dark .prose p.lead  { color: var(--white); }


/* ==========================================================================
   5. Approach — three-pillar EXA card grid
   ========================================================================== */

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.approach-card {
  padding: 32px 28px;
  background: var(--white);
  border-top: 2px solid var(--electric);
  border-radius: 8px;
  box-shadow: var(--elev-2), var(--bevel-dark);
  transition:
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.approach-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--elev-3), var(--bevel-dark);
}
.approach-num {
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--electric);
}
.approach-title {
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--midnight);
}
.approach-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--slate);
}


/* ==========================================================================
   6. Outcomes — metric cards
   ========================================================================== */

.outcomes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.outcome-card {
  padding: 32px 28px;
  background: var(--white);
  border-left: 2px solid var(--electric);
  border-radius: 8px;
  box-shadow: var(--elev-2), var(--bevel-dark);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.outcome-card:hover { box-shadow: var(--elev-3), var(--bevel-dark); }
.outcome-num {
  margin-bottom: 14px;
  font-family: var(--display);
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--midnight);
}
.outcome-num em {
  font-style: normal;
  font-weight: 700;
  color: var(--electric);
}
.outcome-label {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}


/* ==========================================================================
   7. Highlight quote
   ========================================================================== */

.highlight-quote {
  max-width: 760px;
  margin: 40px 0;
  padding: 36px 40px;
  background: var(--midnight-3);
  border-left: 2px solid var(--electric);
  border-radius: 0 8px 8px 0;
  box-shadow: var(--elev-dark-3), var(--bevel-light-strong);
}
.highlight-quote-text {
  margin-bottom: 16px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--white);
}
.highlight-quote-attribution {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-dim);
}


/* ==========================================================================
   8. Gallery — legacy short-form helpers
   Preserved for potential future use; not currently referenced by any of
   the four shipped case studies (per project brief §10.1). The carousel
   below in section 9 is the active gallery pattern.
   ========================================================================== */

.gallery { margin-top: 56px; }

.gallery-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
}
.gallery-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--electric);
}

.gallery-hero {
  margin-bottom: 32px;
  overflow: hidden;
  background: var(--midnight-3);
  border: 1px solid hsl(var(--midnight-4-hsl) / 0.4);
  border-radius: 10px;
  box-shadow: var(--elev-4), var(--bevel-light);
}
.gallery-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.gallery-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.gallery-item {
  overflow: hidden;
  background: var(--midnight-3);
  border-radius: 10px;
  box-shadow: var(--elev-3), var(--bevel-light);
}
.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-caption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.gallery-placeholder {
  margin-bottom: 32px;
  padding: 56px 40px;
  background: var(--paper);
  border: 1px dashed var(--cloud);
  border-radius: 10px;
  text-align: center;
}
.gallery-placeholder-label {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-light);
}
.gallery-placeholder-text {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--slate);
}


/* ==========================================================================
   9. Image carousel — primary visual gallery (active across all 4 cases)
   CSS-only base: scroll-snap on the viewport, native overflow scroll.
   JS enhancement (case-study-gallery.js): prev/next buttons, dots,
   counter, ARIA live region, lightbox trigger. If JS fails the user can
   still swipe and arrow-key scroll.
   ========================================================================== */

.gallery-carousel {
  position: relative;
  margin-top: 32px;
}

.carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: var(--midnight-3);
  border: 1px solid hsl(var(--midnight-4-hsl) / 0.4);
  border-radius: 10px;
  box-shadow: var(--elev-3), var(--bevel-light);
}
.carousel-viewport::-webkit-scrollbar { display: none; }

.carousel-track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.carousel-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.carousel-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 620px;
  overflow: hidden;
  background: var(--midnight-3);
}
.carousel-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Tall artifact modifier — for slides whose source aspect ratio exceeds
   1:2. The slide pane keeps its fixed height but lets users scroll the
   tall image internally without breaking the carousel's horizontal
   scroll-snap behavior. */
.carousel-image.gallery-hero-scroll {
  align-items: flex-start;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--electric) var(--midnight-3);
}
.carousel-image.gallery-hero-scroll img {
  width: 100%;
  height: auto;
  max-height: none;
}
.carousel-image.gallery-hero-scroll::-webkit-scrollbar { width: 8px; }
.carousel-image.gallery-hero-scroll::-webkit-scrollbar-track { background: var(--midnight-3); }
.carousel-image.gallery-hero-scroll::-webkit-scrollbar-thumb {
  background: var(--electric);
  border-radius: 4px;
}
.carousel-image.gallery-hero-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--electric-soft);
}

/* Trigger button wraps the entire .carousel-image. Reset button styling. */
.carousel-image-trigger {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}
.carousel-image-trigger:focus-visible { outline-offset: -4px; }

/* Zoom-in indicator — appears in top-right of every slide. */
.carousel-image::after {
  content: '⤢';
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 16px;
  color: var(--white);
  background: hsl(var(--midnight-hsl) / 0.7);
  border-radius: 6px;
  opacity: 0.7;
  pointer-events: none;
  transition:
    opacity var(--dur-base) var(--ease-out),
    background var(--dur-base) var(--ease-out);
}
.carousel-image-trigger:hover .carousel-image::after,
.carousel-slide:hover .carousel-image::after {
  opacity: 1;
  background: var(--electric);
}

.carousel-slide .gallery-caption {
  margin: 14px 4px 0;
  text-align: left;
}

/* Prev/next arrow buttons — flank the viewport. JS toggles `disabled`
   at the ends of the track. */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 310px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--white);
  color: var(--midnight);
  border: 1px solid var(--cloud);
  border-radius: 50%;
  font: inherit;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: var(--elev-3), var(--bevel-dark);
  transition:
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }
.carousel-prev svg,
.carousel-next svg { width: 18px; height: 18px; }
.carousel-prev:hover,
.carousel-next:hover {
  background: var(--electric);
  color: var(--white);
  border-color: var(--electric);
  box-shadow: var(--elev-4), var(--bevel-dark);
}
.carousel-prev:disabled,
.carousel-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Dot navigation strip beneath the viewport. */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  background: var(--cloud);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.carousel-dot[aria-selected="true"] {
  background: var(--electric);
  transform: scale(1.4);
}
.carousel-dot:hover { background: var(--slate-light); }
.carousel-dot:focus-visible { outline-offset: 4px; }

/* Slide-position counter ("3 of 8"). */
.carousel-counter {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: var(--slate-light);
}

/* Visually-hidden ARIA live region announces slide changes. */
.carousel-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================================================
   10. Lightbox modal — opens when a carousel image is clicked
   JS toggles `[hidden]` on .lightbox and `body.lightbox-open` for scroll
   lock. Adds .is-tall to .lightbox-image-wrap for portrait artifacts.
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(40px, env(safe-area-inset-top, 0px) + 24px)
           max(40px, env(safe-area-inset-right, 0px) + 24px)
           max(40px, env(safe-area-inset-bottom, 0px) + 24px)
           max(40px, env(safe-area-inset-left, 0px) + 24px);
  background: hsl(var(--midnight-hsl) / 0.94);
  animation: lightbox-fade var(--dur-base) var(--ease-out);
}
.lightbox[hidden] { display: none; }

@keyframes lightbox-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: min(1200px, 92vw);
  max-height: 90vh;
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border-radius: 10px;
  box-shadow:
    0 32px 96px hsl(0 0% 0% / 0.55),
    var(--bevel-light);
}

.lightbox-image-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: auto;
  background: var(--midnight-3);
  -webkit-overflow-scrolling: touch;
}
.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
/* JS-applied modifier for tall (portrait-aspect) artifacts so they scroll
   from the top instead of being vertically clipped. */
.lightbox-image-wrap.is-tall {
  align-items: flex-start;
  justify-content: center;
}
.lightbox-image-wrap.is-tall .lightbox-image {
  width: auto;
  max-height: none;
}

.lightbox-caption {
  flex-shrink: 0;
  padding: 18px 24px;
  background: var(--white);
  border-top: 1px solid var(--cloud);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--slate);
}

/* Lightbox controls — close, prev, next. All 48×48 floating buttons. */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--white);
  color: var(--midnight);
  border: 0;
  border-radius: 50%;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px hsl(0 0% 0% / 0.4);
  transition:
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}
.lightbox-close { top: 24px; right: 24px; font-size: 22px; line-height: 1; }
.lightbox-prev  { top: 50%; left:  24px; transform: translateY(-50%); }
.lightbox-next  { top: 50%; right: 24px; transform: translateY(-50%); }
.lightbox-prev svg,
.lightbox-next svg { width: 20px; height: 20px; }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--electric);
  color: var(--white);
}
.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lightbox-counter {
  position: absolute;
  top: 32px;
  left: 50%;
  z-index: 10000;
  padding: 8px 14px;
  background: hsl(var(--midnight-hsl) / 0.7);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  transform: translateX(-50%);
}

/* Body class added by JS while a lightbox is open — locks scroll. */
body.lightbox-open { overflow: hidden; }


/* ==========================================================================
   11. EXA application card (template-only, optional)
   Reserved for case studies that explicitly map their solution back to
   the three EXA pillars. Not used by any of the four current cases.
   ========================================================================== */

.exa-application {
  margin-top: 40px;
  padding: 36px 40px;
  background: var(--paper);
  border-top: 2px solid var(--electric);
  border-radius: 10px;
  box-shadow: var(--elev-2), var(--bevel-dark);
}
.exa-application-label {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
}
.exa-application-title {
  margin-bottom: 20px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--midnight);
}
.exa-pillar-mapping {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.exa-pillar-name {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--electric);
}
.exa-pillar-applied {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--midnight);
}


/* ==========================================================================
   12. Prev/next case study navigation
   ========================================================================== */

.nav-between {
  padding: 60px 0;
  background: var(--midnight);
}
.nav-between-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.nav-between-card {
  display: block;
  padding: 28px 32px;
  background: var(--midnight-3);
  border-radius: 8px;
  box-shadow: var(--elev-dark-1), var(--bevel-light);
  transition:
    background-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.nav-between-card:hover:not(.disabled) {
  transform: translateY(-2px);
  background: var(--midnight-4);
  box-shadow: var(--elev-dark-2), var(--bevel-light-strong);
}
.nav-between-card.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.nav-between-card:focus-visible { outline-offset: 6px; }
.nav-between-card.next { text-align: right; }

.nav-between-direction {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--electric);
}
.nav-between-industry {
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-dim);
}
.nav-between-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--white);
}


/* ==========================================================================
   13. Back to homepage link
   ========================================================================== */

.back-home {
  padding: 0 0 60px;
  background: var(--midnight);
  text-align: center;
}
.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: transparent;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--slate);
  border-radius: 6px;
  transition: border-color var(--dur-base) var(--ease-out);
}
.back-home-link:hover { border-color: var(--white); }


/* ==========================================================================
   14. Signature mark — closing logomark above the takeaway section label
   ========================================================================== */

.signature-mark {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  opacity: 0.9;
}
.signature-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* When the signature mark precedes the section label, the label centers
   and drops its accent line — the mark carries the rhythm role. */
.section.dark .signature-mark + .section-label {
  justify-content: center;
  text-align: center;
}
.section.dark .signature-mark + .section-label::before {
  display: none;
}
.section.dark .signature-mark ~ .section-title {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}


/* ==========================================================================
   15. Mobile — single consolidated breakpoint (≤900px)
   ========================================================================== */

@media (max-width: 900px) {
  /* Hero */
  .hero-title { font-size: 36px; }
  .hero-meta  { grid-template-columns: 1fr 1fr; gap: 24px; }

  /* Section titles */
  .section-title { font-size: 30px; }

  /* Approach + outcomes + EXA pillar grid + nav-between collapse to single column */
  .approach-grid,
  .outcomes,
  .exa-pillar-mapping,
  .nav-between-inner {
    grid-template-columns: 1fr;
  }
  .nav-between-card.next { text-align: left; }

  /* Legacy gallery grids stack */
  .gallery-grid-2,
  .gallery-grid-3 { grid-template-columns: 1fr; }
  .gallery-placeholder { padding: 40px 24px; }

  /* Carousel — tighter slide pane, smaller floating buttons */
  .carousel-image,
  .carousel-image.gallery-hero-scroll { height: 360px; }
  .carousel-prev,
  .carousel-next {
    top: 180px;
    width: 40px;
    height: 40px;
  }
  .carousel-prev { left:  6px; }
  .carousel-next { right: 6px; }

  /* Lightbox — tighter padding, smaller controls, near-edge layout */
  .lightbox {
    padding: max(12px, env(safe-area-inset-top, 0px) + 12px)
             max(12px, env(safe-area-inset-right, 0px) + 12px)
             max(12px, env(safe-area-inset-bottom, 0px) + 12px)
             max(12px, env(safe-area-inset-left, 0px) + 12px);
  }
  .lightbox-content {
    max-width: 96vw;
    max-height: 92vh;
  }
  .lightbox-close { top: 16px; right: 16px; width: 40px; height: 40px; }
  .lightbox-prev  { left:  12px;            width: 40px; height: 40px; }
  .lightbox-next  { right: 12px;            width: 40px; height: 40px; }
  .lightbox-counter { top: 22px; }

  /* Signature mark */
  .signature-mark { width: 32px; height: 32px; margin-bottom: 16px; }
}


/* ==========================================================================
   16. Reduced motion — disable transforms, smooth scroll, and the
   lightbox fade animation for users who set
   prefers-reduced-motion: reduce.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .carousel-viewport { scroll-behavior: auto; }

  .lightbox { animation: none; }

  .approach-card,
  .approach-card:hover,
  .outcome-card,
  .outcome-card:hover,
  .nav-between-card,
  .nav-between-card:hover:not(.disabled),
  .carousel-prev,
  .carousel-next,
  .carousel-prev:hover,
  .carousel-next:hover,
  .carousel-dot,
  .carousel-dot[aria-selected="true"],
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next,
  .breadcrumb-inner a,
  .back-home-link {
    transform: none;
    transition-duration: 0.01ms;
  }

  /* Lightbox prev/next still need their vertical centering transform
     (the rule above flattens it). Re-apply with no transition. */
  .lightbox-prev { transform: translateY(-50%); }
  .lightbox-next { transform: translateY(-50%); }
  .lightbox-counter { transform: translateX(-50%); }

  /* Selected dot scaling is informational, not motion — keep it. */
  .carousel-dot[aria-selected="true"] { transform: scale(1.4); }
}
