:root {
  --case-red: #e1252c;
  --case-red-dark: #b8171e;
  --case-yellow: #f6c344;
  --case-ink: #171b24;
  --case-muted: #687083;
  --case-line: #e5e8ee;
  --case-soft: #f7f8fb;
}

html { scroll-behavior: smooth; }
body.bk-case-page { overflow-x: hidden; color: var(--case-ink); background: #fff; }
.bk-case-page .site-header { background: rgba(255,255,255,.97); }
.bk-case-page .buckapi-navbar .navbar-collapse { background: rgba(255,255,255,.98); }
.bk-case-page img { max-width: 100%; }

.case-breadcrumbs { padding: 24px 0 0; }
.case-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; color: #8a92a0; font-size: 12px; }
.case-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #c4c9d1; }
.case-breadcrumbs a { color: #586276; }
.case-breadcrumbs a:hover { color: #2563eb; text-decoration: none; }

.case-eyebrow { display: block; margin-bottom: 13px; color: #2563eb; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.case-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: max-content; min-height: 49px; padding: 13px 19px; color: #fff; background: #2563eb; border: 1px solid #2563eb; border-radius: 11px; font-size: 12px; font-weight: 800; transition: .2s ease; }
.mercagan-hero-copy .case-button { margin-top: 20px; }
.case-button:hover { color: #fff; background: #1d4ed8; text-decoration: none; transform: translateY(-2px); }

.mercagan-hero { position: relative; padding: 52px 0 86px; overflow: hidden; color: #fff; background: #101114; }
.mercagan-hero::before { position: absolute; inset: 0; content: ""; background: radial-gradient(circle at 76% 15%,rgba(225,37,44,.34),transparent 30%),radial-gradient(circle at 90% 90%,rgba(246,195,68,.12),transparent 28%); }
.mercagan-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0,.9fr) minmax(430px,1.1fr); gap: clamp(42px,7vw,86px); align-items: center; }
.mercagan-hero .case-eyebrow { color: var(--case-yellow); }
.mercagan-hero h1 { margin: 0 0 18px; color: #fff; font-size: clamp(54px,7vw,92px); font-weight: 800; line-height: .95; letter-spacing: -4px; }
.mercagan-hero h2 { margin: 0 0 22px; color: #fff; font-size: clamp(24px,3vw,37px); font-weight: 600; line-height: 1.25; letter-spacing: -1px; }
.mercagan-hero-copy > p { color: rgba(255,255,255,.72); font-size: 16px; line-height: 1.8; }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 27px 0 0; padding: 0; list-style: none; }
.case-tags li { padding: 8px 11px; color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; font-size: 11px; font-weight: 700; }
.mercagan-visual { position: relative; min-height: 520px; }
.mercagan-browser { position: absolute; inset: 20px 0 50px 40px; overflow: hidden; background: #1a1b1f; border: 1px solid rgba(255,255,255,.14); border-radius: 22px; box-shadow: 0 35px 80px rgba(0,0,0,.45); transform: rotate(2deg); }
.mercagan-browser-bar { display: flex; gap: 7px; height: 40px; padding: 15px; background: #26272c; }
.mercagan-browser-bar i { width: 9px; height: 9px; background: #60636b; border-radius: 50%; }
.mercagan-scene { position: relative; display: grid; place-items: center; height: calc(100% - 40px); overflow: hidden; text-align: center; background: radial-gradient(circle at center,#4a181b 0%,#190f10 64%); }
.mercagan-scene::before,.mercagan-scene::after { position: absolute; content: ""; border-radius: 50%; }
.mercagan-scene::before { width: 290px; height: 290px; border: 46px solid rgba(246,195,68,.12); }
.mercagan-scene::after { right: -50px; bottom: -80px; width: 230px; height: 230px; background: var(--case-red); opacity: .28; }
.mercagan-scene div { position: relative; z-index: 1; }
.mercagan-scene span { display: block; margin-bottom: 12px; color: var(--case-yellow); font-size: 12px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; }
.mercagan-scene strong { font: 800 clamp(38px,5vw,68px)/1 Poppins,sans-serif; }
.mercagan-phone { position: absolute; z-index: 2; right: -12px; bottom: 0; width: 175px; padding: 9px; background: #08090b; border: 1px solid #4a4d54; border-radius: 30px; box-shadow: 0 24px 50px rgba(0,0,0,.55); }
.mercagan-phone-screen { display: grid; place-items: center; min-height: 330px; overflow: hidden; color: #fff; text-align: center; background: linear-gradient(180deg,#9a181e,#211011 70%); border-radius: 23px; }
.mercagan-phone-screen i { display: block; margin-bottom: 12px; color: var(--case-yellow); font-size: 32px; }
.mercagan-phone-screen strong { font-size: 18px; }

.case-section { padding: 92px 0; }
.case-section-soft { background: var(--case-soft); }
.case-section-dark { color: #fff; background: #15171c; }
.case-section-heading { max-width: 790px; margin-bottom: 40px; }
.case-section-heading h2,.case-editorial h2 { margin: 0 0 18px; color: inherit; font-size: clamp(34px,4.8vw,58px); font-weight: 800; line-height: 1.08; letter-spacing: -2px; }
.case-section-heading p,.case-editorial p { color: var(--case-muted); font-size: 16px; line-height: 1.85; }
.case-section-dark .case-section-heading p { color: rgba(255,255,255,.68); }
.case-editorial { display: grid; grid-template-columns: minmax(220px,.44fr) minmax(0,.8fr); gap: clamp(40px,7vw,90px); }
.case-editorial-copy p { margin: 0 0 20px; }
.case-editorial-copy p:last-child { margin-bottom: 0; }
.case-challenge-grid,.case-pillar-grid,.case-future-grid,.case-result-grid { display: grid; gap: 18px; }
.case-challenge-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.case-mini-card,.case-pillar,.case-future-item,.case-result { padding: 24px; background: #fff; border: 1px solid var(--case-line); border-radius: 16px; }
.case-mini-card i { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 17px; color: var(--case-red); background: #fff1f2; border-radius: 10px; }
.case-mini-card h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.5; }
.case-value-highlight { margin: 36px 0 42px; padding: clamp(25px,4vw,43px); color: #fff; background: linear-gradient(135deg,#bd1c23,#e1252c); border-radius: 22px; box-shadow: 0 22px 50px rgba(225,37,44,.2); }
.case-value-highlight span { color: var(--case-yellow); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.case-value-highlight p { max-width: 900px; margin: 12px 0 0; color: #fff; font: 600 clamp(22px,3vw,34px)/1.45 Poppins,sans-serif; }
.case-pillar-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.case-pillar-number { display: block; margin-bottom: 18px; color: var(--case-red); font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.case-pillar h3 { margin: 0 0 11px; font-size: 18px; font-weight: 800; }
.case-pillar p,.case-future-item p,.case-result p { margin: 0; color: var(--case-muted); font-size: 13px; line-height: 1.75; }
.case-ecosystem { display: grid; grid-template-columns: 190px 65px 220px 65px 1fr; align-items: center; gap: 14px; margin-top: 44px; }
.case-ecosystem-node { display: grid; place-items: center; min-height: 120px; padding: 22px; color: #fff; text-align: center; background: #252831; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; font-weight: 800; }
.case-ecosystem-node.is-brand { color: #171717; background: var(--case-yellow); }
.case-ecosystem-node.is-core { background: var(--case-red); }
.case-ecosystem-arrow { color: var(--case-yellow); text-align: center; font-size: 27px; }
.case-ecosystem-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.case-ecosystem-links span { padding: 13px 8px; text-align: center; background: #252831; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; font-size: 11px; font-weight: 700; }
.case-experience-shell { display: grid; grid-template-columns: 1.2fr .65fr; gap: 28px; align-items: end; margin-top: 40px; padding: clamp(20px,4vw,50px); background: linear-gradient(135deg,#15171c,#3a1114); border-radius: 26px; }
.case-experience-browser { overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 17px; box-shadow: 0 25px 55px rgba(0,0,0,.25); }
.case-experience-canvas { display: grid; place-items: center; min-height: 360px; color: #fff; text-align: center; background: radial-gradient(circle,#7e171c,#190f10 68%); }
.case-experience-canvas i { display: block; margin-bottom: 14px; color: var(--case-yellow); font-size: 44px; }
.case-experience-canvas strong { font-size: clamp(24px,4vw,42px); }
.case-experience-note { color: rgba(255,255,255,.75); font-size: 13px; line-height: 1.7; }
.case-mobile-layout { display: grid; grid-template-columns: minmax(280px,.75fr) minmax(0,1fr); gap: clamp(45px,8vw,100px); align-items: center; }
.case-mobile-mockup { width: min(100%,280px); margin: auto; padding: 11px; background: #101114; border: 1px solid #444851; border-radius: 38px; box-shadow: 0 30px 60px rgba(23,27,36,.25); }
.case-mobile-mockup .mercagan-phone-screen { min-height: 520px; border-radius: 29px; }
.case-mobile-points { display: grid; gap: 12px; margin-top: 25px; }
.case-mobile-points span { display: flex; align-items: center; gap: 11px; color: #3d4657; font-size: 13px; font-weight: 700; }
.case-mobile-points i { color: var(--case-red); }
.case-future-note { display: inline-flex; gap: 9px; align-items: center; margin-bottom: 28px; padding: 10px 14px; color: #8a5b00; background: #fff8dd; border: 1px solid #f4df98; border-radius: 999px; font-size: 11px; font-weight: 800; }
.case-future-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.case-future-item { display: flex; align-items: center; gap: 12px; padding: 18px; }
.case-future-item i { color: var(--case-red); }
.case-future-item h3 { margin: 0; font-size: 13px; font-weight: 700; }
.case-result-grid { grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 35px; }
.case-result { border-top: 4px solid var(--case-red); }
.case-result h3 { margin: 0 0 9px; font-size: 18px; font-weight: 800; }
.case-back { padding: 38px 0; border-top: 1px solid var(--case-line); }
.case-back .container { display: flex; justify-content: center; }
.bk-case-page .bk-final-cta { padding-top: 75px; }

.mercagan-hero-real { min-width: 0; }
.case-production-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px 16px; color: rgba(255,255,255,.75); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.case-production-badge i { color: #35d079; font-size: 7px; }
.case-real-browser { overflow: hidden; background: #fff; border: 1px solid #dfe3ea; border-radius: 18px; box-shadow: 0 26px 65px rgba(19,27,43,.2); }
.case-real-browser-bar { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; color: #727b8c; background: #f2f4f7; border-bottom: 1px solid #e1e5eb; font-size: 10px; font-weight: 700; }
.case-real-browser-bar i { width: 9px; height: 9px; background: #c5cbd4; border-radius: 50%; }
.case-real-browser-bar span { margin: auto; padding-right: 42px; }
.case-real-browser img { display: block; width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; object-position: top; }
.mercagan-hero-real .case-real-browser { border-color: rgba(255,255,255,.17); transform: rotate(1deg); }

.case-showcase-section { overflow: hidden; }
.case-showcase-intro { display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.case-showcase-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 0; padding: 0; list-style: none; }
.case-showcase-tags li { padding: 8px 12px; color: #4b5567; background: var(--case-soft); border: 1px solid var(--case-line); border-radius: 999px; font-size: 10px; font-weight: 800; }
.case-live-link { display: flex; flex: 0 0 auto; align-items: center; gap: 22px; margin-bottom: 42px; padding: 16px 18px; color: #fff; background: #171b24; border-radius: 14px; box-shadow: 0 15px 30px rgba(23,27,36,.14); }
.case-live-link:hover { color: #fff; text-decoration: none; transform: translateY(-2px); }
.case-live-link span { font-size: 12px; font-weight: 700; }
.case-live-link small { display: block; margin-bottom: 3px; color: #35d079; font-size: 8px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.case-study-showcase { margin-top: 30px; padding: clamp(18px,3.5vw,42px); background: #f2f4f8; border: 1px solid var(--case-line); border-radius: 26px; }
.case-showcase-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.case-device-switch { display: inline-flex; padding: 4px; background: #e3e7ed; border-radius: 12px; }
.case-device-switch button { min-height: 42px; padding: 9px 16px; color: #667085; background: transparent; border: 0; border-radius: 9px; font-size: 11px; font-weight: 800; cursor: pointer; }
.case-device-switch button.is-active { color: #fff; background: #2563eb; box-shadow: 0 7px 16px rgba(37,99,235,.2); }
.case-device-switch i { margin-right: 7px; }
.case-showcase-route { color: #768092; font-size: 10px; font-weight: 700; }
.case-showcase-stage { position: relative; outline: none; touch-action: pan-y; }
.case-showcase-stage:focus-visible { border-radius: 18px; box-shadow: 0 0 0 4px rgba(37,99,235,.2); }
.case-showcase-media { display: grid; min-height: 300px; place-items: center; transition: opacity .2s ease; }
.case-showcase-media .case-real-browser { width: 100%; }
.case-showcase-media.is-mobile { padding: 10px 70px; }
.case-real-phone { position: relative; width: min(100%,340px); padding: 13px; overflow: hidden; background: #11151d; border: 1px solid #3d4451; border-radius: 42px; box-shadow: 0 30px 65px rgba(16,24,40,.28); }
.case-real-phone > span { position: absolute; z-index: 2; top: 18px; left: 50%; width: 70px; height: 5px; background: #272d37; border-radius: 999px; transform: translateX(-50%); }
.case-real-phone img { display: block; width: 100%; height: auto; border-radius: 31px; }
.case-showcase-arrow { position: absolute; z-index: 3; top: 50%; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: #243044; background: rgba(255,255,255,.94); border: 1px solid #dce2ea; border-radius: 50%; box-shadow: 0 10px 25px rgba(23,32,51,.13); cursor: pointer; transform: translateY(-50%); }
.case-showcase-arrow:hover { color: #fff; background: #2563eb; border-color: #2563eb; }
.case-showcase-arrow.is-prev { left: -24px; }
.case-showcase-arrow.is-next { right: -24px; }
.case-showcase-footer { display: grid; grid-template-columns: 1fr auto; gap: 35px; align-items: end; margin-top: 28px; }
.case-showcase-caption span { color: #2563eb; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.case-showcase-caption h3 { margin: 8px 0 7px; color: var(--case-ink); font-size: 21px; font-weight: 800; }
.case-showcase-caption p { max-width: 650px; margin: 0; color: var(--case-muted); font-size: 13px; line-height: 1.7; }
.case-showcase-dots { display: flex; gap: 8px; padding-bottom: 5px; }
.case-showcase-dots button { width: 9px; height: 9px; padding: 0; background: #bdc4cf; border: 0; border-radius: 999px; cursor: pointer; transition: width .2s ease,background .2s ease; }
.case-showcase-dots button.is-active { width: 25px; background: #2563eb; }
.case-device-switch button:focus-visible,.case-showcase-arrow:focus-visible,.case-showcase-dots button:focus-visible,.case-live-link:focus-visible { outline: 3px solid rgba(37,99,235,.35); outline-offset: 3px; }
.case-showcase-fallback .case-showcase-caption { margin-top: 25px; }
.case-mobile-mockup { position: relative; overflow: hidden; }
.case-mobile-mockup img { display: block; width: 100%; height: auto; border-radius: 29px; }
.case-mobile-speaker { position: absolute; z-index: 2; top: 17px; left: 50%; width: 60px; height: 5px; background: #272d37; border-radius: 999px; transform: translateX(-50%); }

@media (max-width: 991px) {
  .mercagan-hero-grid { grid-template-columns: 1fr; }
  .mercagan-visual { width: min(100%,760px); }
  .case-challenge-grid,.case-future-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-pillar-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-ecosystem { grid-template-columns: 1fr; max-width: 720px; }
  .case-ecosystem-arrow { transform: rotate(90deg); }
  .case-result-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-showcase-intro { align-items: start; flex-direction: column; }
  .case-live-link { margin-bottom: 10px; }
}

@media (max-width: 767px) {
  .case-editorial { display: grid; grid-template-columns: 1fr; gap: 22px; }
  .mercagan-hero { padding: 42px 0 65px; }
  .mercagan-hero h1 { letter-spacing: -2.5px; }
  .mercagan-visual { min-height: 420px; }
  .mercagan-browser { inset: 10px 28px 45px 0; }
  .mercagan-phone { right: 0; width: 135px; }
  .mercagan-phone-screen { min-height: 260px; }
  .case-section { padding: 66px 0; }
  .case-pillar-grid,.case-mobile-layout { grid-template-columns: 1fr; }
  .case-experience-shell { grid-template-columns: 1fr; }
  .case-mobile-layout { gap: 42px; }
  .case-showcase-toolbar { align-items: start; flex-direction: column; }
  .case-showcase-route { overflow: hidden; width: 100%; text-overflow: ellipsis; white-space: nowrap; }
  .case-showcase-media.is-mobile { padding: 6px 20px; }
  .case-showcase-footer { grid-template-columns: 1fr; gap: 18px; }
  .case-showcase-arrow { top: auto; bottom: -68px; width: 42px; height: 42px; }
  .case-showcase-arrow.is-prev { right: 52px; left: auto; }
  .case-showcase-arrow.is-next { right: 0; }
  .case-showcase-dots { padding-right: 110px; }
}

@media (max-width: 480px) {
  .case-button { width: 100%; }
  .case-challenge-grid,.case-future-grid,.case-result-grid { grid-template-columns: 1fr; }
  .case-ecosystem-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-section-heading h2,.case-editorial h2 { letter-spacing: -1.3px; }
  .mercagan-visual { min-height: 340px; }
  .mercagan-browser { right: 15px; bottom: 25px; }
  .mercagan-phone { width: 105px; border-radius: 22px; }
  .mercagan-phone-screen { min-height: 205px; border-radius: 15px; }
  .mercagan-phone-screen i { font-size: 22px; }
  .mercagan-phone-screen strong { font-size: 11px; }
  .case-study-showcase { margin-right: -5px; margin-left: -5px; padding: 15px; border-radius: 18px; }
  .case-device-switch { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .case-real-browser { border-radius: 12px; }
  .case-real-browser-bar { height: 34px; padding: 0 10px; }
  .case-real-browser-bar span { padding-right: 25px; }
  .case-real-phone { padding: 9px; border-radius: 34px; }
  .case-real-phone img { border-radius: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .case-button,.case-showcase-media,.case-showcase-dots button { transition: none; }
}
