
/* ===== Case study pages (v2) ===== */
.cs-page { --cs-dark: var(--dark); --cs-grey: #F2F2F0; --cs-line: var(--line); }
.cs-page .eyebrow { margin-bottom: 14px; }

/* Hero: dark band, the website breaks out of it below */
.cs-hero { position: relative; background: var(--cs-dark); color: #fff; padding: 36px 0 0; overflow: visible; }
.cs-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 100%; background: radial-gradient(120% 70% at 85% 0%, rgba(4,234,134,.16) 0%, rgba(4,234,134,0) 55%); pointer-events: none; }
.cs-hero > .frame { position: relative; z-index: 1; }
.cs-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 40px; font-size: 14px; color: rgba(255,255,255,.62); }
.cs-crumbs a { color: #fff; font-weight: 600; text-decoration: none; background: linear-gradient(var(--green), var(--green)) no-repeat 0 100% / 0 2px; transition: background-size .2s ease; }
.cs-crumbs a:hover, .cs-crumbs a:focus-visible { background-size: 100% 2px; }
.cs-crumbs svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .6; }
.cs-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 48px; align-items: end; }
.cs-hero .eyebrow { color: #fff; }
.cs-hero h1 { margin: 0; color: #fff; font-size: clamp(40px, 5vw, 72px); line-height: .98; letter-spacing: -.02em; }
.cs-hero .support { max-width: 48ch; margin-top: 22px; color: rgba(255,255,255,.78); font-size: 19px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.cs-chips li { padding: 6px 14px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: #fff; }
.cs-chips li.is-green { border-color: var(--green); color: var(--green); }
.cs-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
.cs-actions .tde-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cs-hero .pill-outline { background: transparent !important; border: 2px solid rgba(255,255,255,.4) !important; color: #fff !important; }
.cs-hero .pill-outline:hover, .cs-hero .pill-outline:focus-visible { border-color: var(--green) !important; color: var(--ink) !important; background: var(--green) !important; }
.cs-showcase { position: relative; margin-top: 56px; padding-bottom: 0; }
.cs-showcase::after { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.cs-showcase .frame { position: relative; z-index: 2; }
.cs-showcase .cs-browser { box-shadow: 0 60px 120px -50px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06); transform: translateY(0); }
.cs-showcase .tde-browser__shot { aspect-ratio: 16 / 9.5; background: #e9e9e6; }
.cs-showcase .tde-browser__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cs-hero-wrap { position: relative; background: linear-gradient(var(--cs-dark) 0, var(--cs-dark) calc(100% - 230px), #fff calc(100% - 230px), #fff 100%); }

/* Spec strip */
.cs-strip { padding: 44px 0 0; }
.cs-facts { display: grid; grid-template-columns: repeat(var(--cs-cols, 5), minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--cs-line); border-bottom: 1px solid var(--cs-line); }
.cs-facts div { padding: 22px 24px 22px 0; border-left: 1px solid var(--cs-line); padding-left: 24px; min-width: 0; }
.cs-facts div:first-child { border-left: 0; padding-left: 0; }
.cs-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--muted); margin-bottom: 6px; }
.cs-facts dd { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.cs-facts a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--green), var(--green)) no-repeat 0 100% / 100% 2px; padding-bottom: 2px; }
.cs-facts a:hover, .cs-facts a:focus-visible { background-size: 100% 100%; background-image: linear-gradient(var(--green-soft, #E6FDF3), var(--green-soft, #E6FDF3)); }

/* About + site map */
.cs-section { padding: 96px 0; }
.cs-section--grey { background: var(--cs-grey); }
.cs-section--dark { background: var(--cs-dark); color: #fff; }
.cs-about { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 72px; align-items: start; }
.cs-about h2, .cs-h2 { margin: 0 0 22px; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.02; }
.cs-copy p { margin: 0 0 18px; font-size: 19px; line-height: 1.6; color: var(--text); max-width: 60ch; }
.cs-copy p:last-child { margin-bottom: 0; }
.cs-copy .cs-purpose { margin-top: 28px; padding: 22px 26px; border-left: 4px solid var(--green); background: var(--cs-grey); border-radius: 0 14px 14px 0; }
.cs-copy .cs-purpose strong { display: block; margin-bottom: 6px; font-size: 14px; color: var(--ink); }
.cs-copy .cs-purpose p { font-size: 17px; margin: 0; }
.cs-map { position: sticky; top: calc(var(--header-h, 92px) + 28px); border: 1px solid var(--cs-line); border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -45px rgba(0,0,0,.4); }
.cs-map__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: var(--cs-grey); border-bottom: 1px solid var(--cs-line); }
.cs-map__bar i { width: 10px; height: 10px; border-radius: 50%; background: #D6D6D1; }
.cs-map__bar i:first-child { background: var(--green); }
.cs-map__url { margin-left: 10px; padding: 4px 12px; border-radius: 999px; background: #fff; font-size: 12px; color: var(--muted); }
.cs-map__body { padding: 24px 26px 26px; }
.cs-map__title { margin: 0 0 14px; font-size: 13px; font-weight: 700; color: var(--muted); }
.cs-map__nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cs-map__nav li { padding: 8px 14px; border-radius: 10px; background: var(--cs-dark); color: #fff; font-size: 14px; font-weight: 700; }
.cs-map__nav li:first-child { background: var(--green); color: var(--ink); }
.cs-map__cta { margin: 22px 0 0; padding-top: 18px; border-top: 1px dashed var(--cs-line); font-size: 14px; color: var(--muted); }
.cs-map__cta b { display: inline-block; margin-left: 6px; padding: 8px 16px; border-radius: 999px; background: var(--green); color: var(--ink); font-weight: 800; }

/* Features: definition list, no numbering */
.cs-feat-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 44px; }
.cs-feat-head .support { margin: 0; max-width: 46ch; }
.cs-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 0; padding: 0; list-style: none; border-top: 1px solid #DEDED9; }
.cs-feature { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding: 26px 0; border-bottom: 1px solid #DEDED9; }
.cs-feature__mark { width: 28px; height: 28px; border-radius: 8px; background: var(--cs-dark); display: grid; place-items: center; color: var(--green); margin-top: 2px; }
.cs-feature__mark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cs-feature h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.25; }
.cs-feature p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--text); }

/* Gallery on dark */
.cs-gallery-wrap .eyebrow { color: #fff; }
.cs-gallery-wrap .cs-h2 { color: #fff; }
.cs-gallery { display: grid; gap: 22px; margin-top: 36px; }
.cs-gallery--1 { grid-template-columns: minmax(0, 1fr); }
.cs-gallery--1 .cs-shot { aspect-ratio: 16 / 8; }
.cs-gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-shot { margin: 0; overflow: hidden; border-radius: 18px; background: #3A3A3A; aspect-ratio: 4 / 3; border: 1px solid rgba(255,255,255,.1); }
.cs-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* Quote */
.cs-quote { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 28px; max-width: 920px; margin: 0 auto; }
.cs-quote__mark { width: 72px; height: 72px; border-radius: 20px; background: var(--green); display: grid; place-items: center; color: var(--ink); font-size: 44px; font-weight: 800; line-height: 1; padding-top: 10px; }
.cs-quote blockquote { margin: 0 0 18px; }
.cs-quote blockquote p { margin: 0; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.cs-quote figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 15px; color: var(--muted); }
.cs-quote figcaption strong { color: var(--ink); font-size: 16px; }
.cs-quote .tde-stars { margin-bottom: 18px; }

/* More projects */
.cs-next-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 36px; }
.cs-next-head .cs-h2 { margin: 0; }
.cs-pager { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.cs-pager .link svg { width: 18px; height: 18px; }
.cs-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.cs-more .tde-project { width: auto; }
.cs-more .cs-browser { box-shadow: none; }
.cs-more .tde-browser__shot { aspect-ratio: 16 / 10; }
.cs-more .tde-browser__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cs-more .tde-project__title { font-size: 22px; }

@media (max-width: 980px) {
  .cs-hero-grid, .cs-about, .cs-feat-head { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cs-actions { justify-content: flex-start; }
  .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .cs-facts div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .cs-features { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cs-map { position: static; }
  .cs-section { padding: 68px 0; }
  .cs-more { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .cs-hero-wrap { background: linear-gradient(var(--cs-dark) 0, var(--cs-dark) calc(100% - 140px), #fff calc(100% - 140px), #fff 100%); }
}
@media (max-width: 640px) {
  .cs-hero { padding-top: 24px; }
  .cs-crumbs { margin-bottom: 26px; }
  .cs-actions .pill { width: 100%; justify-content: center; }
  .cs-facts { grid-template-columns: minmax(0, 1fr) !important; }
  .cs-facts div { border-left: 0; padding: 16px 0; border-top: 1px solid var(--cs-line); }
  .cs-facts div:first-child { border-top: 0; }
  .cs-gallery--2, .cs-gallery--3 { grid-template-columns: minmax(0, 1fr); }
  .cs-quote { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cs-quote__mark { width: 56px; height: 56px; font-size: 34px; border-radius: 16px; }
  .cs-section { padding: 56px 0; }
  .cs-showcase { margin-top: 36px; }
  .cs-hero-wrap { background: linear-gradient(var(--cs-dark) 0, var(--cs-dark) calc(100% - 80px), #fff calc(100% - 80px), #fff 100%); }
  .cs-more { grid-template-columns: minmax(0, 1fr); }
}

/* Case pages: solid white header from the top (the overlay header is designed for light heroes) */
html.hdr-overlay body.cs-body .site-header, html.hdr-overlay body .site-header { background: #fff; border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.08); }
html.hdr-overlay body.cs-body .site-header .header-phone .num { text-shadow: none; }

/* ===== Live site inside the showcase browser (sites that allow embedding) ===== */
.cs-live .tde-browser__bar { display: flex; align-items: center; gap: 8px; }
.cs-live__tag { display: inline-flex; align-items: center; gap: 7px; margin-left: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(4,234,134,.14); color: var(--green-line, #189E73); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cs-live__tag b { width: 7px; height: 7px; border-radius: 50%; background: var(--green, #04EA86); box-shadow: 0 0 0 3px rgba(4,234,134,.25); animation: cs-live-pulse 1.8s ease-in-out infinite; }
@keyframes cs-live-pulse { 50% { box-shadow: 0 0 0 6px rgba(4,234,134,0); } }
.cs-live__open { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted, #6B6861); text-decoration: none; white-space: nowrap; }
.cs-live__open:hover { color: var(--ink, #111); }
.cs-live__open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cs-showcase .cs-live .tde-browser__shot { position: relative; aspect-ratio: 16 / 9.5; max-height: 86vh; width: 100%; overflow: hidden; background: #fff; }
.cs-live iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.cs-live.is-loaded iframe { opacity: 1; }
.cs-live.is-active iframe { pointer-events: auto; }
.cs-live__shield { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.cs-live.is-active .cs-live__shield { display: none; }
.cs-live__go { position: absolute; left: 50%; bottom: 28px; z-index: 2; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: rgba(17,17,17,.9); color: #fff; font-family: var(--font); font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; cursor: pointer; box-shadow: 0 16px 40px -14px rgba(0,0,0,.6); transition: background .2s ease, color .2s ease, opacity .25s ease, transform .25s ease; }
.cs-live__go svg { width: 18px; height: 18px; fill: currentColor; }
.cs-live__go:hover, .cs-live__go:focus-visible { background: var(--green, #04EA86); color: var(--ink, #111); }
.cs-live.is-active .cs-live__go { opacity: 0; pointer-events: none; transform: translate(-50%, 8px); }
@media (max-width: 640px) {
  .cs-showcase .cs-live .tde-browser__shot { aspect-ratio: 9 / 15; max-height: 78vh; }
  .cs-live__open { display: none; }
  .cs-live__go { bottom: 18px; height: 46px; padding: 0 18px; font-size: 12px; }
}

