/* ==========================================================================
   CASE STUDY DETAIL
   Sectioned, content-driven detail template. Layered on top of blog-detail.css
   so the hero gradient + column lines, share strip, newsletter, more-grid
   and resource-card vocabulary are inherited unchanged.
   ========================================================================== */

:root {
  --case-shell: 1100px;
  --case-card-shell: 980px;
  --case-gutter: 24px;
  --case-dark: #0e3c2d;
  --case-dark-deep: #052517;
  --case-mint: #d5f3e3;
  --case-mint-tint: #e8f7ef;
  --case-salmon: #fbcdb8;
  --case-salmon-deep: #f6a988;
  --case-cell-bg: #f4f6f3;
  --case-cell-border: rgba(11, 61, 46, 0.08);
}

/* Shared baseline (per AGENTS.md baseline rule). */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #ffffff; }
body {
  font-family: 'InterVariable', 'Inter', 'DM Sans', sans-serif;
  color: var(--text-dark, #0f2c25);
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
h1, h2, h3, h4, h5, h6 {
  font-family: 'InterVariable', 'Inter', sans-serif;
  color: var(--text-dark, #0f2c25);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

[data-animate] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity var(--motion-duration-reveal, 380ms) var(--motion-ease-standard, ease-out),
    transform var(--motion-duration-reveal, 380ms) var(--motion-ease-standard, ease-out);
  backface-visibility: hidden;
}
[data-animate].in-view { opacity: 1; transform: translate3d(0, 0, 0); }

/* ==========================================================================
   HERO LAYERS — same two-layer recipe as blog-detail.css
   ========================================================================== */

.case-study-detail-page { min-height: 100vh; position: relative; }

.case-study-detail-page::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 760px;
  background: linear-gradient(180deg, #7bd3ae 0%, #cfeee0 25%, #f7fff9 55%, rgba(255, 255, 255, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 95%);
          mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 95%);
  z-index: -1;
  pointer-events: none;
}

.case-study-detail-page::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 760px;
  background: linear-gradient(90deg, rgba(22, 171, 109, 0.18) 1px, transparent 1px);
  background-size: 72px 100%;
  background-repeat: repeat-x;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 120px, transparent 220px);
          mask-image: linear-gradient(180deg, #000 0%, #000 120px, transparent 220px);
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
   HERO WRAPPER — the .feature-card component (feature-card.css) renders the
   hero card itself. This block only controls the outer section shell.
   The old .case-hero-card / .case-hero-copy / .case-hero-eyebrow /
   .case-hero-title / .case-hero-title-accent rules have been removed;
   feature-card.css owns those styles now.
   ========================================================================== */

.case-hero {
  max-width: var(--case-card-shell);
  margin: 28px auto 28px;
  padding: 0 var(--case-gutter);
}

/* ==========================================================================
   META TILES STRIP (1–5 tiles auto-fit)
   ========================================================================== */

/* 5 independent rounded cards with gaps between them — not a joined strip. */
.case-meta-tiles {
  max-width: var(--case-card-shell);
  margin: 0 auto 32px;
  padding: 0 var(--case-gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.case-meta-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 12px;
  background: var(--case-cell-bg);
  border: 1px solid var(--case-cell-border);
  border-radius: 12px;
  text-align: center;
}

.case-meta-tile-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  color: var(--case-dark);
}

.case-meta-tile-icon img { width: 24px; height: 24px; }

.case-meta-tile-label {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(15, 44, 37, 0.55);
  font-weight: 600;
}

.case-meta-tile-value {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--case-dark);
  font-weight: 600;
}

/* ==========================================================================
   GENERIC SECTION SHELL
   ========================================================================== */

.case-sections {
  max-width: var(--case-card-shell);
  margin: 0 auto;
  padding: 0 var(--case-gutter);
  display: flex;
  flex-direction: column;
  gap: 44px;
  margin-bottom: 56px;
}

.case-section { display: flex; flex-direction: column; gap: 16px; }

.case-section-head { display: flex; flex-direction: column; gap: 10px; }

.case-section-title {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 700;
  color: var(--accent-2, #16ab6d);
  letter-spacing: -0.005em;
}

/* All section titles share the green accent — no per-type colour override. */

/* Section copy stretches the full content shell so paragraphs land at the
   same trailing edge as the meta tiles strip / hero card above. */
.case-section-summary {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(15, 44, 37, 0.72);
}

.case-prose {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #2a3532;
}

.case-prose p { margin: 0 0 12px; }
.case-prose p:last-child { margin-bottom: 0; }

/* ==========================================================================
   CARD GRID (Business Challenge)
   ========================================================================== */

.case-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.case-card-grid[data-count="1"] { grid-template-columns: 1fr; }
.case-card-grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.case-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: 14px;
  background: var(--case-cell-bg);
  border: 1px solid var(--case-cell-border);
}

.case-card-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--case-cell-border);
}

.case-card-icon img { width: 20px; height: 20px; }

.case-card-title {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--case-dark);
}

.case-card-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(15, 44, 37, 0.7);
}

/* ==========================================================================
   PILLAR GRID (Solution Brief)
   ========================================================================== */

.case-pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.case-pillar-grid[data-count="1"] { grid-template-columns: 1fr; }
.case-pillar-grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.case-pillar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border-radius: 14px;
  background: var(--case-cell-bg);
  border: 1px solid var(--case-cell-border);
}

/* PILLAR XX label: plain uppercase grey eyebrow text (no pill background). */
.case-pillar-label {
  display: inline-block;
  align-self: flex-start;
  color: rgba(15, 44, 37, 0.45);
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.case-pillar-title {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--case-dark);
}

.case-pillar-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(15, 44, 37, 0.7);
}

/* ==========================================================================
   CALLOUTS (mint with CTA, salmon without)
   ========================================================================== */

.case-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: 12px;
}

.case-callout-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.case-callout-title {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0e2d22;
  line-height: 1.3;
}

.case-callout-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #3c4c47;
}

.case-callout--mint {
  background: linear-gradient(180deg, var(--case-mint-tint) 0%, var(--case-mint) 100%);
  border: 1px solid rgba(22, 171, 109, 0.18);
}

.case-callout--salmon {
  background: linear-gradient(180deg, var(--case-salmon) 0%, var(--case-salmon-deep) 100%);
  border: 1px solid rgba(214, 117, 71, 0.25);
  justify-content: flex-start;
}

.case-callout--salmon .case-callout-title { color: #5a2210; }
.case-callout--salmon .case-callout-text { color: #6c3924; }

.case-callout-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.case-callout-cta--dark {
  background: #0f2c25;
  color: #fff;
  border: 1px solid #0f2c25;
}
.case-callout-cta--dark:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(6, 32, 25, 0.2);
}

.case-callout-cta--ghost {
  background: transparent;
  color: #0f2c25;
  border: 1px solid #0f2c25;
}
.case-callout-cta--ghost:hover { background: #0f2c25; color: #fff; transform: translateY(-1px); }

.case-callout-cta-icon { width: 16px; height: 16px; display: block; flex: 0 0 auto; }

/* ==========================================================================
   APPROACH (steps card OR bento — same wrapper, two render modes)
   ========================================================================== */

.case-approach-card {
  background: linear-gradient(160deg, #0e3c2d 0%, #052517 100%);
  color: #fff;
  border-radius: 18px;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.case-approach-card-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-approach-card-eyebrow {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.case-approach-card-summary {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.case-approach-flow {
  display: grid;
  grid-template-columns: repeat(var(--approach-cols, 6), minmax(0, 1fr));
  gap: 0;
  /* Reserve column gutters via padding instead of grid gap so the dashed
     connector lines on each step can extend cleanly into the gutter. */
  column-gap: 0;
}

.case-approach-flow[data-count="3"] { --approach-cols: 3; }
.case-approach-flow[data-count="4"] { --approach-cols: 4; }
.case-approach-flow[data-count="5"] { --approach-cols: 5; }
.case-approach-flow[data-count="6"] { --approach-cols: 6; }

.case-approach-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0 12px;
}

/* Dashed connector between adjacent circles, vertically centred on the
   number circle (~14px from the step's top). The line starts at the right
   edge of the current bubble and extends to the left edge of the next.
   Hidden on the last step. */
.case-approach-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 44px;
  right: -8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.case-approach-step-num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-2, #16ab6d);
  color: #fff;
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  align-self: flex-start;
  margin-bottom: 4px;
  box-shadow: 0 0 0 4px rgba(22, 171, 109, 0.18);
}

.case-approach-step-title {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-align: left;
  align-self: stretch;
}

.case-approach-step-body {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
  align-self: stretch;
}

/* ==========================================================================
   TECH STACK (grouped logo rows; static, no marquee)
   ========================================================================== */

.case-tech-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Text-mode tech stack (e.g. 3D Secure): two-column layout so paired
   description cards line up at a comfortable reading width. */
.case-tech-groups[data-mode="text"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-tech-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 14px;
  background: var(--case-cell-bg);
  border: 1px solid var(--case-cell-border);
}

.case-tech-group-label {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(15, 44, 37, 0.55);
  font-weight: 600;
}

.case-tech-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.case-tech-logo { display: inline-flex; align-items: center; }

.case-tech-logo img {
  height: 28px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  opacity: 0.85;
}

/* Text-only mode: shown when a tech-stack group provides `description` but
   no `logos`. Sits in the same column slot as `.case-tech-logos`. */
.case-tech-description {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(15, 44, 37, 0.78);
  max-width: 60ch;
}

/* ==========================================================================
   IMPACT GRID (3x2 default, 1–6 supported)
   ========================================================================== */

.case-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.case-impact-grid[data-count="1"] { grid-template-columns: 1fr; }
.case-impact-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-impact-grid[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.case-impact-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border-radius: 14px;
  background: var(--case-cell-bg);
  border: 1px solid var(--case-cell-border);
  position: relative;
  min-height: 132px;
}

.case-impact-card-title {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--case-dark);
}

.case-impact-card-metric {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-2, #16ab6d);
  letter-spacing: -0.01em;
}

.case-impact-card-label {
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(15, 44, 37, 0.7);
}

/* Plain green eyebrow text (no pill). Reference design uses a flat coloured
   tag rather than a coloured chip. */
.case-impact-card-tag {
  align-self: flex-start;
  display: inline-block;
  margin-top: auto;
  padding: 0;
  background: transparent;
  color: var(--accent-2, #16ab6d);
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ==========================================================================
   BENTO GRID (1–5 mixed-media tiles — Differentiators + Approach bento)
   Layout strategy: grid-template-areas, switched by data-count.
   ========================================================================== */

.bento-grid {
  display: grid;
  gap: 14px;
}

.bento-grid[data-count="1"] {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(220px, auto);
  grid-template-areas: "a";
}
.bento-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(220px, auto);
  grid-template-areas: "a b";
}
.bento-grid[data-count="3"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(180px, auto));
  grid-template-areas:
    "a a"
    "b c";
}
.bento-grid[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(200px, auto));
  grid-template-areas:
    "a b"
    "c d";
}
/* count=5: top row 2 equal cards (a b), bottom row 3 equal cards (c d e).
   Use a 6-column track so 2 over 3 splits cleanly without fractional gaps. */
.bento-grid[data-count="5"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  grid-template-areas:
    "a a a b b b"
    "c c d d e e";
}

.bento-tile[data-slot="a"] { grid-area: a; }
.bento-tile[data-slot="b"] { grid-area: b; }
.bento-tile[data-slot="c"] { grid-area: c; }
.bento-tile[data-slot="d"] { grid-area: d; }
.bento-tile[data-slot="e"] { grid-area: e; }

.bento-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 22px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--case-cell-border);
  min-height: 0;
}

/* Top: text block (eyebrow → title → description). */
.bento-tile-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bento-tile-eyebrow {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2, #16ab6d);
  font-weight: 700;
}

.bento-tile-title {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--case-dark);
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.bento-tile-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(15, 44, 37, 0.68);
}

/* Bottom: image fills the remaining vertical space, with breathing room. */
.bento-tile-img-wrap {
  position: relative;
  flex: 1;
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}

.bento-tile-img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: contain;
  object-position: center bottom;
}

/* Stat-tile is text-only, so it doesn't need the image-wrap gap. */
.bento-tile--stat {
  align-items: flex-start;
  background: #fff;
  gap: 8px;
}

.bento-tile-stat-title {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--case-dark);
  line-height: 1.25;
}

.bento-tile-stat-metric {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-2, #16ab6d);
  letter-spacing: -0.01em;
  margin-top: auto;
}

.bento-tile-stat-label {
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(15, 44, 37, 0.7);
}

/* Bento variant inside the approach section sits on the dark green card. */
.case-section--approach[data-render-mode="bento"] .bento-grid {
  background: linear-gradient(160deg, #0e3c2d 0%, #052517 100%);
  padding: 18px;
  border-radius: 18px;
}

.case-section--approach[data-render-mode="bento"] .bento-tile {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.case-section--approach[data-render-mode="bento"] .bento-tile--stat {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.case-section--approach[data-render-mode="bento"] .bento-tile--stat .bento-tile-stat-title { color: #fff; }
.case-section--approach[data-render-mode="bento"] .bento-tile--stat .bento-tile-stat-label { color: rgba(255, 255, 255, 0.72); }
.case-section--approach[data-render-mode="bento"] .bento-tile--stat .bento-tile-eyebrow { color: rgba(213, 243, 227, 0.7); }

/* ==========================================================================
   NEWSLETTER (case-study variant — dark band with eyebrow + 2-line accent
   title + grey description on the left, light note + pill input + green
   submit on the right).
   ========================================================================== */

.case-newsletter {
  position: relative;
  max-width: var(--case-card-shell);
  margin: 0 auto 64px;
  padding: 36px 40px;
  border-radius: 18px;
  background: #141414 url('../assets/newsletter-bg.svg') right top / cover no-repeat;
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  align-items: center;
  gap: 28px;
  overflow: hidden;
}

.case-newsletter-copy,
.case-newsletter-form-wrap {
  position: relative;
  z-index: 1;
}

.case-newsletter-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}

.case-newsletter-eyebrow {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
}

.case-newsletter-title {
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  color: #fff;
}

.case-newsletter-title-accent { color: var(--accent-2, #16ab6d); }

.case-newsletter-description {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 4px;
  max-width: 460px;
}

.case-newsletter-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: center;
}

.case-newsletter-note {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.01em;
}

.case-newsletter-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 6px;
  gap: 6px;
  transition: border-color 180ms ease;
}

.case-newsletter-form:focus-within {
  border-color: rgba(57, 209, 127, 0.55);
}

.case-newsletter-form input[type="email"] {
  flex: 1;
  appearance: none;
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  padding: 10px 12px;
  outline: none;
  min-width: 0;
}

.case-newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.42); }

.case-newsletter-submit {
  appearance: none;
  background: #ffffff;
  color: var(--accent-2, #16ab6d);
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 22px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.case-newsletter-submit:hover {
  background: #f0f2f0;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.case-newsletter-submit:disabled { opacity: 0.55; cursor: wait; transform: none; }

.case-newsletter-status {
  margin-top: 8px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
}
.case-newsletter-status.is-error { color: #ffb0a8; }
.case-newsletter-status.is-success { color: #a6f5c9; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
  .case-hero,
  .case-meta-tiles,
  .case-sections,
  .blog-newsletter,
  .more-blogs { max-width: none; }
}

@media (max-width: 900px) {
  .case-meta-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .case-meta-tile { border-right-width: 1px; }

  .case-card-grid,
  .case-pillar-grid { grid-template-columns: 1fr; }
  .case-card-grid[data-count="3"],
  .case-pillar-grid[data-count="3"] { grid-template-columns: 1fr; }

  .case-approach-flow,
  .case-approach-flow[data-count="3"],
  .case-approach-flow[data-count="4"],
  .case-approach-flow[data-count="5"],
  .case-approach-flow[data-count="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-tech-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .case-impact-grid,
  .case-impact-grid[data-count="4"],
  .case-impact-grid[data-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-impact-grid[data-count="1"] { grid-template-columns: 1fr; }

  /* Bento collapses to 2 columns regardless of count, in source order. */
  .bento-grid,
  .bento-grid[data-count="1"],
  .bento-grid[data-count="2"],
  .bento-grid[data-count="3"],
  .bento-grid[data-count="4"],
  .bento-grid[data-count="5"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    grid-template-areas: none;
  }
  .bento-grid[data-count="1"] { grid-template-columns: 1fr; }
  .bento-tile { grid-area: auto !important; min-height: 200px; }

  .case-callout {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .case-callout-cta { align-self: stretch; justify-content: center; }
}

@media (max-width: 640px) {
  .case-hero { margin: 16px auto 24px; padding: 0 16px; }

  .case-meta-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 16px;
  }

  .case-sections { padding: 0 16px; gap: 28px; }

  .case-approach-card { padding: 22px 18px; }
  .case-approach-flow,
  .case-approach-flow[data-count="3"],
  .case-approach-flow[data-count="4"],
  .case-approach-flow[data-count="5"],
  .case-approach-flow[data-count="6"] {
    grid-template-columns: 1fr;
    row-gap: 22px;
  }

  /* Vertical timeline layout: number circle on the left, title + body on the
     right, with a continuous line connecting each step's circle to the next. */
  .case-approach-step {
    display: grid;
    grid-template-columns: 28px 1fr;
    column-gap: 14px;
    row-gap: 4px;
    padding: 0;
    align-items: start;
  }
  .case-approach-step-num {
    grid-row: 1 / span 2;
    align-self: start;
    margin-bottom: 0;
  }
  .case-approach-step-title,
  .case-approach-step-body {
    grid-column: 2;
  }
  .case-approach-step:not(:last-child)::after {
    top: 32px;
    left: 13px;
    right: auto;
    bottom: -22px;
    width: 1px;
    height: auto;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
  }

  .case-tech-groups,
  .case-tech-groups[data-mode="text"],
  .case-impact-grid,
  .case-impact-grid[data-count="4"],
  .case-impact-grid[data-count="2"],
  .bento-grid,
  .bento-grid[data-count="1"],
  .bento-grid[data-count="2"],
  .bento-grid[data-count="3"],
  .bento-grid[data-count="4"],
  .bento-grid[data-count="5"] {
    grid-template-columns: 1fr;
  }
  .bento-tile { min-height: 180px; }

  /* Newsletter: collapse the 2-column layout to a single stacked column on
     narrow viewports so the form doesn't overflow into the copy. */
  .case-newsletter {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 18px;
    margin: 0 16px 48px;
  }
  .case-newsletter-form-wrap { align-self: stretch; }
}
