@charset "UTF-8";
/* ============================================================
   cases-and-nav.css
   Additive stylesheet. Load AFTER css/style.css.

   Covers:
   1. Navbar: stronger glassmorphism (desktop), sticky (already true
      in style.css, intensified here)
   2. Mobile bottom nav: ONE unified active-tab badge treatment shared
      by Home / Services / Cases / Talk — no partial styling, no stray
      indicators
   3. Category system: 4 fixed categories, each with one locked color
      + one locked icon, used identically on cards and detail pages
   4. Cases index: flagship block + card grid, each card categorized,
      with an "optimization achieved" stat block and an image slot
   5. Case detail page components
   6. Responsive: real breakpoints at 1024 / 768 / 480, tested widths,
      not assumed

   Uses variables already defined in :root by style.css:
   --blue --teal --plum --blue-hi --teal-hi --plum-hi --bg --panel
   --panel2 --line --ink --dim --white --grad-h --grad-v --display
   --display-x --sans --maxw --pad
   ============================================================ */

/* ============================================================
   1. NAVBAR (desktop) — stronger glassmorphism, still sticky
   ============================================================ */

header.site{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,11,15,.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 32px rgba(0,0,0,.28);
  isolation: isolate;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
header.site::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);
  pointer-events:none;
}

.nav-links a{
  position: relative;
  transition: color .2s ease, opacity .2s ease;
  padding: 6px 2px;
}
.nav-links a::after{
  content:"";
  position:absolute;
  left:2px; right:2px; bottom:-2px;
  height:2px;
  border-radius:2px;
  background: var(--grad-h);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a:hover{ opacity:1; }
.nav-links a:hover::after{ transform: scaleX(1); }
.nav-links a[aria-current="page"]{
  opacity:1;
  color: var(--teal-hi);
}
.nav-links a[aria-current="page"]::after{ transform: scaleX(1); }

.nav-cta{ transition: filter .2s ease, transform .2s ease, box-shadow .2s ease; }
.nav-cta:hover{
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(67,220,225,.28);
}

/* ============================================================
   2. MOBILE BOTTOM NAV — one unified active-tab badge
   ============================================================
   Every tab (Home / Services / Cases / Talk) gets the SAME raised
   gradient-circle badge when active. Talk keeps the badge permanently
   (primary CTA); the others get it only via .active, set once per
   page in the HTML. No floating dashes, no color-only half-states.
*/

@media (max-width: 860px){
  .bottomnav{
    background: rgba(14,15,20,.6);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -8px 28px rgba(0,0,0,.35);
    align-items: flex-end;
  }

  .bottomnav a{
    position: relative;
    transition: color .2s ease, transform .2s ease;
  }

  /* Base icon size for the three non-CTA tabs when NOT active.
     Talk/Inquiry is intentionally excluded from this reset — see below,
     it keeps its badge permanently regardless of .active. */
  .bottomnav a:not(.active):not(.cta) svg{
    width: 21px; height: 21px;
    stroke: currentColor;
    transition: stroke .2s ease, width .2s ease, height .2s ease;
  }

  /* Talk/Inquiry badge: only shown when this page IS Inquiry (.active
     set on this link). Previously unconditional — user wants it to
     behave like every other tab, not stay lit everywhere. */
  .bottomnav a.cta.active .ic{
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--grad-h);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -14px;
    box-shadow: 0 4px 14px rgba(67,220,225,.35);
  }
  .bottomnav a.cta.active .ic svg{
    width: 20px; height: 20px;
    stroke: #0A0B0F;
  }
  .bottomnav a.cta:not(.active) .ic{
    width: auto; height: auto;
    background: none;
    box-shadow: none;
    margin-top: 0;
    display: inline-flex;
  }
  .bottomnav a.cta:not(.active) .ic svg{
    width: 21px; height: 21px;
    stroke: currentColor;
  }

  /* ACTIVE state — identical raised gradient badge for ALL FOUR tabs.
     Only applied when .active is present on the current page's link.
     No tab is ever badged by default; every tab earns it the same way. */
  .bottomnav a.active{ color: var(--white); }
  .bottomnav a.active:not(.cta) svg{
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--grad-h);
    stroke: #0A0B0F;
    padding: 7px;
    box-sizing: border-box;
    margin-top: -14px;
    box-shadow: 0 4px 14px rgba(67,220,225,.35);
  }
  .bottomnav a:active{ transform: scale(.94); }
}

/* ============================================================
   3. CATEGORY SYSTEM — 4 fixed categories, locked color + icon
   ============================================================
   cat-factory    #6D93F5  Industrial Optimization
   cat-digital    #E06CDC  Digital Systems Optimization
   cat-decision   #43DCE1  Decision & Commercial Optimization
   cat-commercial #F5B450  Product & Commercial Systems

   These classes are the single source of truth for category color.
   Reused on: card badge, card background tint + hover border,
   detail-page hero pill.
*/

.case-cat-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 5px 12px 5px 8px;
  border-radius: 99px;
  border: 1px solid transparent;
  margin-bottom: 12px;
}
.case-cat-pill svg{ width: 13px; height: 13px; flex-shrink: 0; }
.case-cat-pill.sm{ font-size: .62rem; padding: 4px 10px 4px 7px; margin-bottom: 10px; }

.case-arena-pill{ margin-bottom: 14px; } /* legacy alias, harmless if unused */

.cat-factory{ color:#6D93F5; background:rgba(109,147,245,.12); border-color:rgba(109,147,245,.35); }
.cat-digital{ color:#E06CDC; background:rgba(224,108,220,.12); border-color:rgba(224,108,220,.35); }
.cat-decision{ color:#43DCE1; background:rgba(67,220,225,.12); border-color:rgba(67,220,225,.35); }
.cat-commercial{ color:#F5B450; background:rgba(245,180,80,.12); border-color:rgba(245,180,80,.35); }

/* card background tint per category — same gradient-tint pattern used
   by the existing .svc service cards, so it matches the theme */
.cc-card.cat-factory{ background: linear-gradient(170deg,rgba(109,147,245,.13),var(--panel) 62%); }
.cc-card.cat-factory:hover{ border-color: rgba(109,147,245,.55); }
.cc-card.cat-digital{ background: linear-gradient(170deg,rgba(224,108,220,.12),var(--panel) 62%); }
.cc-card.cat-digital:hover{ border-color: rgba(224,108,220,.55); }
.cc-card.cat-decision{ background: linear-gradient(170deg,rgba(67,220,225,.12),var(--panel) 62%); }
.cc-card.cat-decision:hover{ border-color: rgba(67,220,225,.55); }
.cc-card.cat-commercial{ background: linear-gradient(170deg,rgba(245,180,80,.13),var(--panel) 62%); }
.cc-card.cat-commercial:hover{ border-color: rgba(245,180,80,.55); }

/* ============================================================
   4. CASES INDEX PAGE
   ============================================================ */

/* Fixed 60px top padding to match .hero.subhero (services/contact) at
   every breakpoint — a clamp() here let mobile shrink it to ~20px,
   which is what made these pages feel cramped up top vs. the rest of
   the site. */
.cases-hero{ padding-top: 60px; padding-bottom: 8px; position: relative; }
.cases-hero::before{content:'';position:absolute;left:50%;top:-14%;transform:translateX(-50%);width:130%;height:145%;background:radial-gradient(ellipse at 50% 22%,rgba(20,53,138,.34),rgba(17,169,174,.11) 45%,transparent 72%);pointer-events:none;z-index:-1}

/* intro paragraph matches the H1's width (no independent max-width),
   and inline category chips reuse the card-tag pill look inside text flow */
.cases-hero-lede{ max-width: none; }
.cases-hero-lede .case-cat-pill{ margin-bottom: 0; vertical-align: -3px; }

/* ---- Flagship ---- */

.flagship{
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(24px,4vw,44px);
  margin: 20px 0 28px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(224,108,220,.16), transparent 55%),
    radial-gradient(120% 140% at 0% 100%, rgba(67,220,225,.14), transparent 55%),
    var(--panel);
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.flagship::before{
  content:"";
  position:absolute;
  inset:0;
  padding:1px;
  border-radius:14px;
  background: var(--grad-h);
  opacity:.55;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
  z-index:-1;
}
.flagship:hover{
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  border-color: rgba(224,108,220,.5);
}
.flagship-body{
  min-width: 0; /* prevents grid overflow on long words */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.flagship-tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.7rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-weight:700;
  color:#0A0B0F;
  background: var(--grad-h);
  padding:6px 14px;
  border-radius:99px;
  margin-bottom:14px;
}
.flagship h2{
  font-size: clamp(1.35rem,3vw,2rem);
  margin-bottom: 12px;
  word-break: break-word;
}
.flagship p.dek{
  color: var(--dim);
  font-size: 1rem;
  max-width: 46ch;
  margin-bottom: 20px;
}
.flagship .flagship-kpis{
  display:flex;
  flex-wrap:wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-bottom: 22px;
}
.flagship .flagship-kpis div{ min-width: 110px; text-align: center; }
.flagship .flagship-kpis .fv{
  font-family: var(--display);
  font-weight:700;
  font-size:1.25rem;
  color: var(--white);
  white-space: nowrap;
}
.flagship .flagship-kpis .fk{
  font-size:.66rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color: var(--dim);
}
.flagship .flagship-cta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:600;
  font-size:.9rem;
  color: var(--teal-hi);
  border:1px solid rgba(67,220,225,.35);
  background:rgba(67,220,225,.06);
  border-radius:4px;
  padding:11px 20px;
  transition:border-color .2s ease,background .2s ease;
}
.flagship:hover .flagship-cta{
  border-color: var(--teal-hi);
  background:rgba(67,220,225,.14);
}
.flagship-visual{
  position:relative;
  border-radius:14px;
  aspect-ratio: 4/3;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  min-width: 0;
  box-shadow: 0 16px 34px rgba(0,0,0,.35);
}
.flagship-visual svg{ width:100%; height:100%; }
.cases-subhead{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
  margin: 32px 0 20px;
  flex-wrap: wrap;
}
@media(max-width:640px){
  .cases-subhead{ margin: 24px 0 16px; }
}
.cases-subhead h3{
  font-family: var(--display-x);
  font-size: 1.05rem;
  letter-spacing:.02em;
  color: var(--white);
  text-transform: uppercase;
  font-weight:700;
}

/* ---- Card grid ---- */

.cc-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.cc-card{
  position:relative;
  display:grid;
  grid-template-columns: .85fr 1.15fr;
  align-items: center;
  gap: 36px;
  text-align: left;
  border:1px solid var(--line);
  border-radius:14px;
  padding: clamp(22px,3vw,34px);
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  min-width: 0;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.cc-card:hover{
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(0,0,0,.35);
}

.cc-body{
  min-width: 0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  text-align:left;
}

.cc-image-slot{
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 14px;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--dim);
  box-shadow: 0 12px 28px rgba(0,0,0,.3);
}
.cc-image-slot svg{ width: 100%; height: 100%; display:block; }

.cc-card h3{
  font-size: 1.15rem;
  margin-bottom:8px;
  line-height:1.3;
}
.cc-card p{
  color: var(--dim);
  font-size:.92rem;
  margin-bottom:16px;
  max-width: 46ch;
}

.cc-impact{
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-bottom: 14px;
}
.cc-impact-label{
  font-size:.62rem;
  letter-spacing:.07em;
  text-transform:uppercase;
  color: var(--dim);
  margin-bottom: 8px;
  text-align: left;
}
.cc-stat-row{
  display:flex;
  flex-direction:column;
  gap:9px;
}
.cc-stat-row div{ min-width:0; text-align:left; display:flex; align-items:baseline; gap:9px; }
.cc-stat-row .sv{
  font-family: var(--display);
  font-weight:700;
  font-size:1.05rem;
  color: var(--white);
  flex-shrink:0;
  min-width:58px;
}
.cc-stat-row .sk{
  font-size:.68rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  color: var(--dim);
  line-height:1.35;
}
.cc-mini-stats{ display:flex; flex-direction:column; gap:6px; margin:2px 0 14px; font-size:.72rem; color:var(--dim); }
.cc-mini-stats b{ font-family:var(--display); font-weight:700; font-size:.85rem; color:var(--white); margin-right:5px; }
.cc-read{
  font-size:.86rem;
  font-weight:600;
  color: var(--teal-hi);
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(67,220,225,.35);
  background:rgba(67,220,225,.06);
  border-radius:4px;
  padding:10px 18px;
  transition:border-color .2s ease,background .2s ease;
}
.cc-read svg{ width:14px; height:14px; transition: transform .2s ease; }
.cc-card:hover .cc-read{ border-color: var(--teal-hi); background:rgba(67,220,225,.14); }
.cc-card:hover .cc-read svg{ transform: translateX(3px); }

/* ============================================================
   5. CASE DETAIL PAGE
   ============================================================
   Shared template for all six case-study pages. One structure,
   different inner content. Keeps the site's existing gradient
   eyebrow (.case-cat-pill), gradient CTAs (.btn-primary /
   .nav-cta-v2) and the per-case custom SVG mockups
   (.case-image-placeholder) as the deliberate visual through-line;
   everything else here is new.
*/

.case-hero{
  padding-top: 60px;
  padding-bottom: clamp(28px,4vw,44px);
  border-bottom: none;
  position: relative;
}
.case-hero::before{content:'';position:absolute;left:50%;top:-14%;transform:translateX(-50%);width:130%;height:145%;background:radial-gradient(ellipse at 50% 22%,rgba(20,53,138,.34),rgba(17,169,174,.11) 45%,transparent 72%);pointer-events:none;z-index:-1}
.case-breadcrumb{
  font-size:.8rem;
  color: var(--dim);
  margin-bottom:18px;
}
.case-breadcrumb a{ color: var(--dim); text-decoration:none; }
.case-breadcrumb a:hover{ color: var(--teal-hi); }

/* two-column hero: narrative left, command-center mockup right */
.case-hero-grid{
  display:grid;
  grid-template-columns: minmax(0,.94fr) minmax(420px,1.06fr);
  gap: clamp(32px,5vw,64px);
  align-items:center;
  margin-top: 22px;
}
.case-hero-copy{ min-width:0; }

.case-hero-copy h1{
  font-size: clamp(1.7rem,3.6vw,2.6rem);
  max-width: 20ch;
  margin-bottom:14px;
  line-height:1.08;
}
.case-hero-copy .dek{
  font-size:1.02rem;
  color: var(--dim);
  max-width: 56ch;
  margin-bottom:22px;
}

.case-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.case-meta-chip{
  font-size:.76rem;
  border:1px solid var(--line);
  border-radius:99px;
  padding:6px 14px;
  color: var(--dim);
}

.case-hero-visual{ min-width:0; }
.case-hero-visual .case-image-placeholder{ margin:0; box-shadow: 0 20px 50px rgba(0,0,0,.4); }

.case-image-slot{ margin-bottom: 32px; }
.case-image-placeholder{
  border-radius: 20px;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--dim);
  box-shadow: 0 16px 34px rgba(0,0,0,.3);
  background: var(--panel2);
  border: 1px solid var(--line);
}
.case-image-placeholder svg{ width: 100%; height: 100%; display:block; }

/* narrative column */
.case-main{ min-width: 0; }
.case-section{ scroll-margin-top: 110px; margin-top: clamp(56px,7vw,92px); }
.case-section:first-child{ margin-top:0; }
.case-intro{
  max-width: 74ch;
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 1.03rem;
  line-height: 1.7;
}

.case-quote{
  border-left: 3px solid var(--teal-hi);
  padding: 4px 0 4px 20px;
  margin: 26px 0 0;
  font-size: 1.06rem;
  font-style: italic;
  color: var(--ink);
  max-width: 68ch;
}

/* 01 — decision problem: three failure-mode cards */
.problem-grid{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
  margin-top: 28px;
}
.problem-card{
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
}
.problem-card i{
  display:grid;
  place-items:center;
  width:34px; height:34px;
  border-radius:10px;
  border: 1px solid rgba(245,180,80,.3);
  background: rgba(245,180,80,.09);
  color:#F5B450;
  font-style:normal;
  font-weight:900;
  font-size:.8rem;
}
.problem-card h3{ margin: 14px 0 8px; font-size:1rem; }
.problem-card p{ margin:0; color: var(--dim); font-size:.88rem; line-height:1.55; }

/* 02 — system design: numbered architecture steps */
.architecture{
  position:relative;
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
  margin-top: 28px;
}
.architecture::before{
  content:"";
  position:absolute;
  left:16%; right:16%; top:26px;
  height:1px;
  background: var(--grad-h);
  opacity:.5;
}
.arch-step{
  position:relative;
  padding: 18px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
  text-align:left;
}
.step-no{
  position:relative; z-index:2;
  display:grid;
  place-items:center;
  width:44px; height:44px;
  margin: 0 0 4px;
  border: 1px solid rgba(67,220,225,.35);
  border-radius:50%;
  background: #101722;
  color: var(--teal-hi);
  font-family: var(--display);
  font-weight:900;
}
.arch-step h3{ margin:14px 0 8px; font-size:.98rem; }
.arch-step p{ margin:0; color: var(--dim); font-size:.88rem; line-height:1.55; }

/* 03 — what changed: compact build cards, replaces the old bullet list */
.build-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}
.build-card{
  display:grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
}
.build-icon{
  display:grid;
  place-items:center;
  width:40px; height:40px;
  border-radius:10px;
  background: rgba(67,220,225,.1);
  color: var(--teal-hi);
  font-family: var(--display);
  font-weight:900;
  font-size:.68rem;
}
.build-card h3{ grid-column:2; margin:0 0 6px; font-size:.95rem; }
.build-card p{ grid-column:2; margin:0; color: var(--dim); font-size:.86rem; line-height:1.55; }

/* 04 — outcomes: before/after comparison cards */
.results-grid{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
  margin-top: 22px;
}
.result-card{
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
  text-align: center;
}
.result-label{
  font-size:.68rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color: var(--dim);
  font-weight:700;
}
.compare{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap: 8px;
  margin-top: 10px;
}
.compare>div{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 12px;
  border-radius:999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.compare span{
  font-size:.6rem;
  letter-spacing:.05em;
  text-transform:uppercase;
  color: var(--dim);
  font-weight:700;
}
.compare b{ font-size:.9rem; font-weight:700; word-break:break-word; }
.compare .before b{ color: var(--dim); }
.compare .after b{ color: var(--teal-hi); }
.compare .arrow{ color: var(--dim); font-size:1rem; }
.kpi-disclaimer{
  font-size:.76rem;
  color: var(--dim);
  margin: 16px 0 0;
  max-width: 74ch;
}

/* 05 — why it matters: statement + best-fit side panel */
.why-panel{
  display:grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items:center;
  margin-top: 28px;
  padding: 26px;
  border: 1px solid rgba(67,220,225,.24);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(67,220,225,.08), rgba(224,108,220,.05));
}
.why-panel p{ margin:0; color: var(--ink); font-size:1.02rem; line-height:1.6; }
.why-side{
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10,11,15,.4);
}
.why-side span{
  display:block;
  font-size:.66rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color: var(--dim);
  font-weight:700;
}
.why-side b{ display:block; margin-top:8px; color: var(--teal-hi); font-size:1.1rem; line-height:1.4; }

.case-sources{
  font-size:.8rem;
  color: var(--dim);
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top: 32px;
}
.case-sources ul{ margin-top:10px; padding-left:18px; }
.case-sources li{ margin-bottom:6px; }

.case-disclaimer{
  font-size:.74rem;
  color: var(--dim);
  opacity:.75;
  margin-top: 24px;
  font-style: italic;
}

/* final case CTA */
.case-final-cta{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items:center;
  margin-top: clamp(56px,7vw,96px);
  padding: 30px clamp(22px,4vw,34px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(420px 220px at 0% 100%, rgba(109,147,245,.12), transparent 70%),
    radial-gradient(360px 200px at 100% 0%, rgba(224,108,220,.1), transparent 70%),
    var(--panel);
}
.case-final-cta h2{ margin:0; font-size: clamp(1.3rem,2.4vw,1.7rem); }
.case-final-cta p{ margin:8px 0 0; color: var(--dim); max-width:56ch; }

.case-nextprev{
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  border-top:1px solid var(--line);
  padding-top:28px;
  margin-top:32px;
}
.case-nextprev a{
  color: var(--dim);
  text-decoration:none;
  font-size:.86rem;
  transition: color .2s ease;
  max-width: 32ch;
}
.case-nextprev a:hover{ color: var(--teal-hi); }

/* sticky case-index active-section highlight (JS-driven, see main.js) */
.case-index a.active{
  color: var(--teal-hi);
  background: rgba(67,220,225,.08);
  border-left-color: var(--teal-hi);
}

/* ============================================================
   6. RESPONSIVE — real breakpoints
   ============================================================ */

/* Tablet: flagship keeps 2 columns down to 1024, tightens padding */
@media (max-width: 1024px){
  .flagship{ gap: 24px; }
  .cc-card{ gap: 26px; }
  .cc-grid{ gap: 28px; }
}

/* Case-detail hero + narrative grids: mockup moves above the title,
   sticky index (case-index-grid, handled above) already drops to a
   single column below 1100px. */
@media (max-width: 1100px){
  .case-hero-grid{ grid-template-columns: 1fr; gap: 24px; margin-top:16px; }
  .case-hero-visual{ order:-1; }
  .case-hero-copy h1,
  .case-hero-copy .dek{ max-width: none; }
}
@media (max-width: 760px){
  .problem-grid,
  .architecture,
  .build-grid,
  .results-grid{ grid-template-columns: 1fr; }
  .architecture::before{ display:none; }
  .why-panel{ grid-template-columns: 1fr; padding: 20px; }
  .case-final-cta{ grid-template-columns: 1fr; text-align:left; }
  .case-final-cta .btn{ width:100%; justify-content:center; }
  /* icon + title on one line instead of stacked, on mobile card layouts */
  .problem-card,.arch-step{ display:flex; flex-wrap:wrap; align-items:center; column-gap:14px; }
  .problem-card i,.arch-step .step-no{ margin:0; flex:0 0 auto; }
  .problem-card h3,.arch-step h3{ margin:0; flex:1 1 auto; }
  .problem-card p,.arch-step p{ flex:1 1 100%; margin-top:10px; }
}

/* Below 860px the bottomnav appears (existing site breakpoint) and the
   header's desktop nav-links are already hidden by style.css. Add
   bottom padding to <main> so content doesn't sit under the fixed nav. */
@media (max-width: 860px){
  main{ padding-bottom: 84px; }
}

/* Small tablet / large phone: flagship goes single column, image on top,
   but capped in height so it doesn't dominate the screen before any
   text is visible */
@media (max-width: 760px){
  .flagship{
    grid-template-columns: 1fr;
    padding: 20px 20px 26px;
    gap: 20px;
  }
  .flagship-body{ display:contents; }
  .flagship-tag{ order:1; margin-bottom: 10px; justify-self:start; width:fit-content; }
  .flagship-body>.case-cat-pill{ order:2; justify-self:start; width:fit-content; }
  .flagship-visual{
    order: 3;
    aspect-ratio: auto;
    height: 170px;
    margin-bottom: 6px;
  }
  .flagship-body>h2{ order:4; }
  .flagship-body>p.dek{ order:4; }
  .flagship-body>.flagship-kpis{ order:4; }
  .flagship-body>.flagship-cta{ order:4; justify-self:start; width:fit-content; }
  .flagship .flagship-kpis{ gap: 6px 18px; margin-bottom: 14px; }
  .flagship .flagship-kpis div{ min-width: 90px; }
  .flagship h2{ margin-bottom: 8px; }
  .flagship p.dek{ margin-bottom: 14px; }
  .case-cat-pill.sm{ margin-bottom: 8px; }

  .cc-grid{ gap: 24px; }
  .cc-card{
    grid-template-columns: 1fr;
    padding: 20px 20px 26px;
    gap: 20px;
  }
  .cc-body{ align-items:flex-start; text-align:left; display:contents; }
  .cc-body>.case-cat-pill{ order:1; justify-self:start; width:fit-content; }
  .cc-image-slot{
    order: 2;
    aspect-ratio: auto;
    height: 170px;
    margin-bottom: 6px;
  }
  .cc-body>h3{ order:3; }
  .cc-body>p{ order:3; }
  .cc-body>.cc-mini-stats{ order:3; }
  .cc-body>.cc-read{ order:3; justify-self:start; width:fit-content; }
}

/* Phone */
@media (max-width: 480px){
  .flagship h2{ font-size: 1.3rem; }
  .flagship-tag{ margin-bottom: 10px; }
  .case-hero-copy h1{ font-size: 1.5rem; }
  .case-nextprev{ flex-direction: column; gap: 12px; }
  .case-nextprev a{ max-width: none; }
  .cc-card{ padding: 16px; }
  /* keep the two flagship stats side by side — stacking them wasted a
     lot of vertical space and pushed the CTA below the fold */
  .flagship .flagship-kpis{
    flex-direction: row;
    justify-content: center;
    gap: 14px 24px !important;
  }
  .flagship .flagship-kpis div{ min-width: 0; flex: 0 1 auto; }
  .flagship-visual{ height: 140px; }
  .cases-hero h1{ font-size: 2rem; }
}

/* Very small phones: tighten meta chip spacing only, kpis already
   stacked by the 480px rule above */
@media (max-width: 360px){
  .case-meta-row{ gap: 8px; }
  .case-meta-chip{ padding: 5px 11px; font-size: .72rem; }
}
