:root {
  --cs-ink: #13243a;
  --cs-muted: #56667a;
  --cs-blue: #075aa8;
  --cs-blue-deep: #063665;
  --cs-cyan: #00a7c8;
  --cs-accent: #f39a20;
  --cs-paper: #ffffff;
  --cs-soft: #f3f7fb;
  --cs-line: #dbe5ef;
  --cs-shadow: 0 22px 60px rgba(10, 48, 83, .12);
  --cs-shadow-soft: 0 10px 30px rgba(10, 48, 83, .09);
  --cs-radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--cs-ink);
  background:
    radial-gradient(circle at 100% 4%, rgba(0, 167, 200, .09), transparent 27rem),
    linear-gradient(180deg, #fff 0, #f8fbfe 52rem, #fff 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  overflow: clip;
}

main :where(h1, h2, h3, h4) {
  color: var(--cs-ink);
  letter-spacing: -.025em;
  text-wrap: balance;
}

main h1 {
  font-size: clamp(2.25rem, 5vw, 4.75rem);
  line-height: 1.06;
  max-width: 18ch;
}

main h2 {
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  line-height: 1.15;
}

main h3 {
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.28;
}

main :where(p, li) {
  color: var(--cs-muted);
  font-size: clamp(1rem, .28vw + .94rem, 1.12rem);
  line-height: 1.78;
}

main :where(p, li, h1, h2, h3, h4) {
  overflow-wrap: anywhere;
}

main :where(a, button) {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

main :where(a, button):focus-visible {
  outline: 3px solid rgba(0, 167, 200, .42);
  outline-offset: 4px;
}

main :where(.container, .wrap, .inner, .content-width, .section-inner) {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

main :where(section, .section) {
  position: relative;
  padding-block: clamp(64px, 8vw, 112px);
}

main :where(.hero, .case-hero, .page-hero, .study-hero) {
  isolation: isolate;
  min-height: min(760px, 86vh);
  display: grid;
  align-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 83% 22%, rgba(0, 196, 224, .34), transparent 24rem),
    linear-gradient(128deg, #052b53 0%, #075aa8 58%, #008eae 100%);
}

main :where(.hero, .case-hero, .page-hero, .study-hero)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

main :where(.hero, .case-hero, .page-hero, .study-hero) :where(h1, h2, h3, p, li) {
  color: #fff;
}

main :where(.hero, .case-hero, .page-hero, .study-hero) p {
  max-width: 66ch;
  color: rgba(255,255,255,.84);
}

main :where(.eyebrow, .kicker, .overline, .label, .badge, .tag) {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  width: fit-content;
  margin-bottom: 1rem;
  color: var(--cs-blue);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .12em;
  text-transform: uppercase;
}

main :where(.hero, .case-hero, .page-hero, .study-hero) :where(.eyebrow, .kicker, .overline, .label, .badge, .tag) {
  padding: .55rem .82rem;
  color: #fff;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  background: rgba(255,255,255,.11);
  backdrop-filter: blur(10px);
}

main :where(.grid, .cards, .case-grid, .studies-grid, .results-grid, .stats-grid, .challenge-grid, .solution-grid, .content-grid) {
  gap: clamp(18px, 3vw, 32px);
}

main :where(.card, .case-card, .study-card, .result-card, .stat-card, .challenge-card, .solution-card, .content-card) {
  position: relative;
  border: 1px solid var(--cs-line);
  border-radius: var(--cs-radius);
  background: rgba(255,255,255,.94);
  box-shadow: var(--cs-shadow-soft);
}

main :where(.card, .case-card, .study-card, .result-card, .stat-card, .challenge-card, .solution-card, .content-card):hover {
  border-color: rgba(7, 90, 168, .28);
  box-shadow: var(--cs-shadow);
  transform: translateY(-4px);
}

main :where(.card, .case-card, .study-card, .result-card, .stat-card, .challenge-card, .solution-card, .content-card) :where(img, picture) {
  border-radius: calc(var(--cs-radius) - 2px);
}

main img {
  max-width: 100%;
  height: auto;
}

main :where(.metric, .stat, .result-number, .number, [class*="metric"], [class*="stat-value"]) {
  color: var(--cs-blue);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

main :where(.challenge, .problem, .before, .challenge-card, .problem-card, .challenge-block, .problem-block) {
  --cs-panel-accent: #dc6b36;
}

main :where(.solution, .approach, .after, .solution-card, .approach-card, .solution-block, .approach-block) {
  --cs-panel-accent: var(--cs-cyan);
}

main :where(.challenge, .problem, .solution, .approach, .before, .after, .challenge-card, .problem-card, .solution-card, .approach-card, .challenge-block, .problem-block, .solution-block, .approach-block) {
  border-top: 4px solid var(--cs-panel-accent, var(--cs-blue));
}

main :where(ul, ol) {
  padding-left: 1.3em;
}

main li + li {
  margin-top: .55rem;
}

main :where(.cta, .cta-section, .contact-cta, .final-cta) {
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(24px, 4vw, 38px);
  color: #fff;
  background:
    radial-gradient(circle at 92% 10%, rgba(243, 154, 32, .3), transparent 18rem),
    linear-gradient(130deg, var(--cs-blue-deep), var(--cs-blue) 68%, #007f9d);
  box-shadow: var(--cs-shadow);
}

main :where(.cta, .cta-section, .contact-cta, .final-cta) :where(h2, h3, p, li) {
  color: #fff;
}

main :where(.btn, .button, [class*="cta-button"], a[role="button"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .82rem 1.28rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

main :where(.btn, .button, [class*="cta-button"], a[role="button"]):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(4, 43, 79, .18);
}

main :where(table) {
  width: 100%;
  overflow: hidden;
  border-spacing: 0;
  border: 1px solid var(--cs-line);
  border-radius: 16px;
  background: var(--cs-paper);
  box-shadow: var(--cs-shadow-soft);
}

main :where(th, td) {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--cs-line);
  text-align: left;
}

main th {
  color: #fff;
  background: var(--cs-blue-deep);
}

@media (max-width: 767px) {
  main :where(.container, .wrap, .inner, .content-width, .section-inner) {
    width: min(100% - 28px, 1180px);
  }

  main :where(section, .section) {
    padding-block: 56px;
  }

  main :where(.hero, .case-hero, .page-hero, .study-hero) {
    min-height: auto;
    padding-block: 72px 64px;
  }

  main :where(.grid, .cards, .case-grid, .studies-grid, .results-grid, .stats-grid, .challenge-grid, .solution-grid, .content-grid) {
    grid-template-columns: 1fr !important;
  }

  main :where(.cta, .cta-section, .contact-cta, .final-cta) {
    border-radius: 22px;
  }

  main :where(.btn, .button, [class*="cta-button"], a[role="button"]) {
    width: 100%;
  }

  main table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Scoped conversion-focused layer for the actual Case Studies markup. */
body.case-studies-hub,
body.case-study-detail {
  --case-ink: #111d30;
  --case-deep: #07182c;
  --case-blue: #164f86;
  --case-cyan: #27a9ad;
  --case-orange: #ff7a00;
  --case-line: #d8e2ee;
  --case-shadow: 0 24px 64px -34px rgba(5,25,49,.55);
  color: var(--case-ink);
  background: radial-gradient(circle at 100% 0,rgba(39,169,173,.1),transparent 30rem),#fff;
}

body.case-studies-hub .art-hero,
body.case-study-detail .art-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 16%,rgba(39,169,173,.34),transparent 25rem),
    radial-gradient(circle at 12% 90%,rgba(255,122,0,.13),transparent 22rem),
    linear-gradient(128deg,#07182c 0%,#102f54 56%,#0b5f76 100%);
}

body.case-studies-hub .art-hero::before,
body.case-study-detail .art-hero::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  opacity:.28;
  background-image:linear-gradient(rgba(255,255,255,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.1) 1px,transparent 1px);
  background-size:56px 56px;
  mask-image:linear-gradient(to bottom,#000,rgba(0,0,0,.78) 62%,transparent);
}

body.case-studies-hub .art-hero::after,
body.case-study-detail .art-hero::after {
  content:"";
  position:absolute;
  z-index:-1;
  width:420px;
  height:420px;
  right:-170px;
  bottom:-220px;
  border:58px solid rgba(255,255,255,.07);
  border-radius:50%;
  box-shadow:0 0 0 44px rgba(255,255,255,.035);
}

body.case-studies-hub .art-hero .meta,
body.case-study-detail .art-hero .meta { color:rgba(255,255,255,.74); }
body.case-studies-hub .art-hero .meta a,
body.case-study-detail .art-hero .meta a { color:#fff; }

body.case-studies-hub .art-hero { padding:clamp(52px,6vw,84px) 0 58px; }
body.case-studies-hub .art-hero .wrap-narrow,
body.case-studies-hub .art-body .wrap-narrow,
body.case-studies-hub .related .wrap-narrow { max-width:1120px; }

body.case-studies-hub .cs-hero {
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr);
  column-gap:clamp(30px,5vw,64px);
  align-items:start;
  min-width:0;
}

body.case-studies-hub .cs-hero>* { min-width:0; }

body.case-studies-hub .cs-hero>.badge,
body.case-studies-hub .cs-hero>h1,
body.case-studies-hub .cs-hero>.sub,
body.case-studies-hub .cs-hero>.meta { grid-column:1; }

body.case-studies-hub .cs-hero>.badge {
  justify-self:start;
  margin-bottom:18px;
  padding:8px 14px;
  color:#fff;
  border-color:rgba(255,255,255,.32);
  background:rgba(255,255,255,.1);
  backdrop-filter:blur(10px);
}

body.case-studies-hub .cs-hero>h1 {
  max-width:13ch;
  margin:0 0 20px;
  color:#fff;
  font-size:clamp(2.75rem,5.15vw,4.7rem);
  line-height:1.07;
  letter-spacing:-.025em;
  text-wrap:balance;
}

body.case-studies-hub .cs-hero>h1 em {
  display:block;
  margin-top:.12em;
  color:#ffb45e;
}

body.case-studies-hub .cs-hero>.sub {
  max-width:61ch;
  margin:0 0 22px;
  color:rgba(255,255,255,.82);
  font-size:1.04rem;
  line-height:1.78;
}

body.case-studies-hub .cs-sumbox {
  grid-column:2;
  grid-row:1/span 4;
  margin:0;
  padding:27px 28px 25px;
  border:1px solid rgba(255,255,255,.22);
  border-top:5px solid var(--case-orange);
  border-radius:22px;
  background:linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.075));
  box-shadow:0 34px 80px -38px rgba(0,0,0,.75);
  backdrop-filter:blur(16px);
  box-sizing:border-box;
  max-width:100%;
}

body.case-studies-hub .cs-sumbox h2 { margin-bottom:16px;font-size:1.2rem; }
body.case-studies-hub .cs-sumbox li { padding-left:23px;color:rgba(255,255,255,.88);font-size:.92rem;line-height:1.7; }
body.case-studies-hub .cs-sumbox li+li { padding-top:10px;border-top:1px solid rgba(255,255,255,.12); }
body.case-studies-hub .cs-sumbox li::before { top:1.15em; }

body.case-studies-hub .cs-tiles { grid-column:1/-1;gap:16px;margin-top:38px; }
body.case-studies-hub .cs-tile,
body.case-study-detail .cs-tile {
  position:relative;
  overflow:hidden;
  min-height:132px;
  padding:21px 20px 19px;
  border:1px solid rgba(255,255,255,.36);
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 22px 46px -30px rgba(0,0,0,.72);
}

body.case-studies-hub .cs-tile::before,
body.case-study-detail .cs-tile::before { content:"";position:absolute;inset:0 auto 0 0;width:5px;background:var(--case-blue); }
body.case-studies-hub .cs-tile:nth-child(2)::before,
body.case-study-detail .cs-tile:nth-child(2)::before { background:var(--case-orange); }
body.case-studies-hub .cs-tile:nth-child(3)::before,
body.case-study-detail .cs-tile:nth-child(3)::before { background:var(--case-cyan); }
body.case-studies-hub .cs-tile .cs-v,
body.case-study-detail .cs-tile .cs-v { color:var(--case-ink);font-size:clamp(1.55rem,2.5vw,2.05rem);line-height:1.22;letter-spacing:-.02em; }
body.case-studies-hub .cs-tile .cs-c,
body.case-study-detail .cs-tile .cs-c { margin-top:8px;color:#41516a;font-size:.82rem;line-height:1.6; }

body.case-studies-hub .art-body {
  padding:58px 0 80px;
  background:linear-gradient(180deg,#fff,#f7fafd 46%,#fff);
}

body.case-studies-hub .cs-page>h2 {
  max-width:28ch;
  margin-top:58px;
  padding-bottom:14px;
  font-size:clamp(1.65rem,3vw,2.4rem);
  line-height:1.22;
  background-size:82px 4px;
}

body.case-studies-hub .cs-page>p,
body.case-studies-hub .cs-page>ul { max-width:78ch;font-size:1.02rem;line-height:1.82; }

body.case-studies-hub .toc {
  display:grid;
  grid-template-columns:190px 1fr;
  gap:22px;
  margin:0 0 44px;
  padding:22px 24px;
  border-radius:18px;
  background:rgba(255,255,255,.9);
  box-shadow:var(--case-shadow);
}

body.case-studies-hub .toc h4 { margin:2px 0 0; }
body.case-studies-hub .toc ol { columns:2;column-gap:34px; }
body.case-studies-hub .toc li { break-inside:avoid;margin-bottom:8px; }
body.case-studies-hub .stats { gap:18px; }
body.case-studies-hub .stat { min-height:150px;display:flex;flex-direction:column;justify-content:center;padding:22px 20px;border-radius:18px;box-shadow:var(--case-shadow); }
body.case-studies-hub .stat .n { font-size:clamp(1.8rem,3vw,2.45rem); }
body.case-studies-hub .stat .l { margin-top:9px;font-size:.82rem;line-height:1.6; }

body.case-studies-hub .cs-cards { grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:26px; }
body.case-studies-hub .cs-card {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  gap:13px;
  padding:31px 30px 27px;
  border-radius:22px;
  box-shadow:var(--case-shadow);
}

body.case-studies-hub .cs-card::before { content:"";position:absolute;inset:0 0 auto;height:7px;background:linear-gradient(90deg,#a40008,var(--case-orange)); }
body.case-studies-hub .cs-card:nth-child(2)::before { background:linear-gradient(90deg,var(--case-blue),var(--case-cyan)); }
body.case-studies-hub .cs-card::after { content:"01";position:absolute;z-index:-1;top:18px;right:22px;color:rgba(16,38,66,.055);font:700 5rem/1 'Noto Sans Thai',system-ui,sans-serif; }
body.case-studies-hub .cs-card:nth-child(2)::after { content:"02"; }
body.case-studies-hub .cs-card--soon::after { content:"…"; }
body.case-studies-hub a.cs-card:hover { transform:translateY(-7px);border-color:rgba(22,79,134,.32);box-shadow:0 32px 70px -34px rgba(5,25,49,.62); }
body.case-studies-hub .cs-card .cs-k { width:fit-content;padding:6px 11px;border:1px solid #b9dfe0;border-radius:999px;background:#edf8f8; }
body.case-studies-hub .cs-card h3 { max-width:26ch;font-size:clamp(1.3rem,2.1vw,1.65rem);line-height:1.35; }
body.case-studies-hub .cs-card .cs-go { display:inline-flex;align-items:center;width:fit-content;min-height:44px;padding:10px 15px;border-radius:11px;color:#fff;background:linear-gradient(120deg,#a40008,#cf2530); }
body.case-studies-hub .cs-card:nth-child(2) .cs-go { background:linear-gradient(120deg,var(--case-blue),#147a91); }
body.case-studies-hub .cs-card--soon { grid-column:1/-1;background:linear-gradient(115deg,#f7fafd,#edf3f9); }

body.case-study-detail .art-hero { padding:38px 0 42px; }
body.case-study-detail :where(.cs4-panel,.cs5-panel,.cs4-sumcard,.cs5-sumcard) { border-color:rgba(255,255,255,.48);box-shadow:0 30px 72px -34px rgba(0,0,0,.82); }
body.case-study-detail :where(.cs4-shot-cap,.cs5-shot-cap) { color:rgba(255,255,255,.78); }
body.case-study-detail :where(.cs4-shot-cap,.cs5-shot-cap) strong { color:#fff; }
body.case-study-detail :where(.cs4-legend,.cs5-legend) { color:rgba(255,255,255,.88);border-color:rgba(255,255,255,.28);background:rgba(255,255,255,.1);backdrop-filter:blur(10px); }
body.case-study-detail .cs-tiles { gap:14px;margin-top:18px; }
body.case-study-detail .art-body { padding-top:52px;background:radial-gradient(circle at 4% 12%,rgba(39,169,173,.07),transparent 24rem),linear-gradient(180deg,#fff,#f6f9fc 55%,#fff); }
body.case-study-detail .cs-page>h2 { margin-top:54px;padding:16px 0 15px;border-top:1px solid var(--case-line);font-size:clamp(1.45rem,2.6vw,2rem);line-height:1.3;background-position:44px 100%;background-size:72px 4px; }
body.case-study-detail .cs-page>h2:first-child { margin-top:0; }

body.case-studies-hub .cta-inline,
body.case-study-detail .cta-inline {
  margin-top:48px;
  padding:30px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:22px;
  background:radial-gradient(circle at 92% 12%,rgba(255,122,0,.3),transparent 16rem),linear-gradient(130deg,var(--case-deep),#174d80 72%,#0e7788);
  box-shadow:0 28px 64px -34px rgba(5,25,49,.7);
}

body.case-studies-hub .related,
body.case-study-detail .related { border-top:1px solid var(--case-line);background:radial-gradient(circle at 90% 20%,rgba(39,169,173,.08),transparent 22rem),linear-gradient(180deg,#fff,#f1f6fa); }

@media(max-width:900px){
  body.case-studies-hub .cs-hero{grid-template-columns:minmax(0,1fr)}
  body.case-studies-hub .cs-hero>.badge,body.case-studies-hub .cs-hero>h1,body.case-studies-hub .cs-hero>.sub,body.case-studies-hub .cs-hero>.meta,body.case-studies-hub .cs-sumbox,body.case-studies-hub .cs-tiles{grid-column:1;grid-row:auto}
  body.case-studies-hub .cs-sumbox{margin-top:30px}
  body.case-studies-hub .cs-tiles{margin-top:18px}
}

@media(max-width:700px){
  body.case-studies-hub .art-hero,body.case-study-detail .art-hero{padding:38px 0 34px}
  body.case-studies-hub .cs-hero>h1{font-size:clamp(2.15rem,11.5vw,3.15rem);line-height:1.12}
  body.case-studies-hub .cs-sumbox{padding:22px 19px 20px}
  body.case-studies-hub .cs-hero>.sub,body.case-studies-hub .cs-hero>.meta,body.case-studies-hub .cs-sumbox li{overflow-wrap:anywhere}
  body.case-studies-hub .cs-tiles,body.case-study-detail .cs-tiles{grid-template-columns:1fr}
  body.case-studies-hub .cs-tile,body.case-study-detail .cs-tile{min-height:0;padding:18px;text-align:left}
  body.case-studies-hub .toc{display:block;padding:19px}
  body.case-studies-hub .toc ol{columns:1}
  body.case-studies-hub .cs-cards{grid-template-columns:1fr}
  body.case-studies-hub .cs-card--soon{grid-column:auto}
  body.case-studies-hub .cs-card{padding:27px 21px 23px}
  body.case-study-detail .art-body{padding-top:36px}
  body.case-studies-hub .cta-inline,body.case-study-detail .cta-inline{padding:24px 20px}
}
