/* =====================================================================
   CASE STUDY PAGES  –  shared stylesheet (used by all 5 pages)
   File: assets/main_website/css/our-work-pages.css

   - Every class is prefixed "cs-" so nothing clashes with header/footer
     CSS, services.css or other page templates.
   - Do NOT edit colors here for another case study. Override only the
     variables inside the small <style> block of that page's view.
   - Breakpoints (desktop-first):
       1399.98 | 1199.98 | 991.98 | 767.98 | 575.98 | 399.98
   ===================================================================== */

/* =====================================================================
   1. VARIABLES + BASE
   ===================================================================== */
.cs-page {
  /* ---- colors (overridden per page) ---- */
  --cs-primary: #1f9389;
  --cs-secondary: #ff6157;
  --cs-tertiary: #a5d9a1;
  --cs-font-color: #151515;
  --cs-subtext: #5c5c5c;
  --cs-tag: #f1e6d9;
  --cs-stroke: #d7d7d7;
  --cs-bg: #fcfaf7;
  --cs-white: #ffffff;

  /* colors sampled from the Figma layout */
  --cs-hero-from: #60b1aa;
  --cs-hero-mid: #42938c;
  --cs-hero-to: #25766f;
  --cs-overview-bg: #e3f4e2;
  --cs-card-a: #e9f5f5; /* Requirement + Solution */
  --cs-card-b: #ffefef; /* Problem + Tools        */
  --cs-process-bg: #fbfaf6;
  --cs-cta-bg: #282d33;
  --cs-ring: rgba(31, 147, 137, 0.06); /* faded circles in details section */

  --cs-step-icon-color: var(--cs-white); /* icons inside the step boxes */
  --cs-arrow-color: var(--cs-primary); /* arrows between steps        */

  /* --cs-cta-img is optional: set it from the view (needs base_url) to use a
     different image. It is intentionally NOT declared here, so .cs-cta falls
     back to the default image path below. */

  /* ---- layout ---- 
  --cs-gutter: 60px;
  --cs-max: 1345px;  
*/

  font-family: "Inter", sans-serif;
  color: var(--cs-font-color);
  font-size: 16px;
  line-height: 1.5;
  background: var(--cs-white);
  overflow-x: hidden;
  overflow-x: clip; /* modern browsers: clips without creating a scroll container */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.cs-page *,
.cs-page *::before,
.cs-page *::after {
  box-sizing: border-box;
}

.cs-page h1,
.cs-page h2,
.cs-page h3,
.cs-page p {
  margin: 0;
  font-family: inherit;
  color: inherit;
}

.cs-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*.cs-wrap {
  max-width: var(--cs-max);
  margin-inline: auto;
  padding-inline: var(--cs-gutter);
} */

.cs-sec-head {
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
}

.cs-sec-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  line-height: 1.3;
}

.cs-sec-sub {
  font-size: 16px;
  line-height: 1.5;
  margin-top: 12px;
}

/* =====================================================================
   2. BUTTONS
   ===================================================================== */
.cs-page .cs-btn-coral {
  display: inline-block;
  background: var(--cs-secondary);
  border: 1px solid var(--cs-secondary);
  color: var(--cs-white);
  border-radius: 50px;
  padding: 10px 26px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: 0.25s;
}

.cs-page .cs-btn-coral:hover {
  background: transparent;
  border-color: var(--cs-white);
  color: var(--cs-white);
}

.cs-page .cs-btn-white {
  display: inline-block;
  background: var(--cs-white);
  border: 1px solid var(--cs-white);
  color: var(--cs-font-color);
  border-radius: 50px;
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: 0.25s;
}

.cs-page .cs-btn-white:hover {
  background: transparent;
  color: var(--cs-white);
}

/* =====================================================================
   3. HERO
   ===================================================================== */
.cs-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    105deg,
    var(--cs-hero-from) 0%,
    var(--cs-hero-mid) 50%,
    var(--cs-hero-to) 100%
  );
}

.cs-hero-inner {
  position: relative;
  z-index: 1;
  min-height: 676px;
}


.cs-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 440px;
  padding-top: 200px;
}

.cs-hero-title {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--cs-white);
  overflow-wrap: break-word;
}

.cs-hero-btn-wrap {
  margin-top: 82px;
}

.cs-hero-img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 71.5%;
  max-width: 1027px;
  z-index: 1;
}


/* =====================================================================
   4. OVERVIEW
   ===================================================================== */
.cs-overview {
  background: var(--cs-overview-bg);
}

.cs-overview-inner {
  display: flex;
  align-items: center;
  min-height: 134px;
  padding: 32px 0 32px 40px;
}

.cs-overview-title {
  flex: 0 0 233px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.cs-overview-text {
  flex: 0 0 400px;
  font-size: 16px;
  line-height: 1.5;
}

.cs-overview-meta {
  display: flex;
  flex: 1 1 auto;
  margin-left: 77px;
}

.cs-meta-item {
  flex: 0 0 153px;
  border-left: 1px solid var(--cs-font-color);
  padding-left: 16px;
  line-height: 1.4;
}

.cs-meta-item small {
  display: block;
  font-size: 14px;
  color: var(--cs-subtext);
}

.cs-meta-item strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
}

/* =====================================================================
   5. DETAILS  (Requirement / Problem / Solution / Tools + phone)
   ===================================================================== */
.cs-details {
  position: relative;
  overflow: hidden;
  padding: 40px 0 60px;
}

/* faded ring – bottom left */
.cs-details::before {
  content: "";
  position: absolute;
  left: -190px;
  bottom: -60px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 70px solid var(--cs-ring);
  pointer-events: none;
}

/* faded ring – top right */
.cs-details::after {
  content: "";
  position: absolute;
  right: -273px;
  top: -338px;
  width: 636px;
  height: 636px;
  border-radius: 50%;
  border: 60px solid var(--cs-ring);
  pointer-events: none;
}

.cs-details-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 702px) minmax(0, 1fr);
  column-gap: 40px;
  align-items: center;
}

.cs-info-card {
  border-radius: 12px;
  padding: 27px 40px 30px;
}

.cs-info-card + .cs-info-card {
  margin-top: 22px;
}

.cs-info-card.cs-a {
  background: var(--cs-card-a);
}

.cs-info-card.cs-b {
  background: var(--cs-card-b);
}

.cs-info-card h2 {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 12px;
}

.cs-info-card p {
  max-width: 620px;
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.cs-info-card p:last-child {
  margin-bottom: 0;
}

.cs-info-card strong {
  font-weight: 600;
}

.cs-tool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 20px;
}

.cs-tool-row img {
  height: 44px;
  width: auto;
}

.cs-tool-row img.cs-tool-mysql {
  height: 36px;
}

/* phone – the ellipse and sparkle are already inside the image */
.cs-phone-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cs-phone-stage {
  width: 100%;
  max-width: 436px;
}

.cs-phone-stage img {
  width: 100%;
  height: auto;
  margin-inline: auto;
}

/* =====================================================================
   6. PROCESS
   ===================================================================== */
.cs-process {
  background: var(--cs-process-bg);
  padding: 52px 0 80px;
}

.cs-process-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 64px;
}

.cs-step {
  flex: 0 0 200px;
  text-align: center;
}

.cs-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  margin: 0 auto;
  border-radius: 26px;
  background: var(--cs-primary);
}

/* SVG icons are painted through a mask so they take the color below */
.cs-icon,
.cs-arrow {
  display: block;
  background-image: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  -webkit-mask: var(--cs-icon-url) center/contain no-repeat;
  mask: var(--cs-icon-url) center/contain no-repeat;
}

.cs-icon {
  width: 48px;
  height: 48px;
  background-color: var(--cs-step-icon-color);
}

.cs-arrow {
  width: 64px;
  height: 24px;
  background-color: var(--cs-arrow-color);
}

.cs-step h3 {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 26px;
}

.cs-step p {
  font-size: 14px;
  line-height: 1.65;
  margin-top: 22px;
}

.cs-step-arrow {
  display: flex;
  align-items: center;
  flex: 0 0 64px;
  height: 100px;
}

/* =====================================================================
   7. UI DESIGN
   ===================================================================== */
.cs-ui-design {
  padding-top: 24px;
}

.cs-ui-shots {
  margin-top: 56px;
}

.cs-ui-shots img {
  width: 100%;
  height: auto;
}

/* =====================================================================
   8. STYLE GUIDE
   ===================================================================== */
.cs-style-guide {
  padding: 90px 0 66px;
}

.cs-style-guide .cs-sg-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 83px;
}

.cs-sg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 419px;
  column-gap: 40px;
  margin-top: 42px;
  padding-right: 22px;
}

.cs-sg-type {
  min-width: 0;
  padding: 27px 0 0 52px;
}

/* "Aa" – keep both <tspan>s on ONE line in the HTML (no whitespace between them)
   and use viewBox="0 0 480 275" */
.cs-aa {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  overflow: visible;
}

.cs-aa text {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 362px;
  word-spacing: -0.3em; /* safety net: cancels the gap if a line break sneaks in */
}

.cs-font-name {
  font-size: clamp(56px, 10vw, 144px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: 32px;
  color: var(--cs-font-color);
}

.cs-font-src {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.2;
  color: var(--cs-subtext);
}

.cs-swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
  align-content: start;
}

.cs-swatch {
  min-width: 0;
  text-align: center;
}

.cs-swatch-box {
  display: block;
  width: 100%;
  max-width: 105px;
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 12px;
}

.cs-swatch-box.cs-has-border {
  box-shadow: inset 0 0 0 1px var(--cs-stroke);
}

.cs-swatch-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 12px;
}

.cs-swatch-hex {
  display: block;
  font-size: 16px;
  line-height: 1.4;
  color: var(--cs-subtext);
}

/* =====================================================================
   9. COMPONENTS (only used on pages that show the components block)
   ===================================================================== */
.cs-components {
  background: var(--cs-bg);
  padding: 56px 0 48px;
  font-family: "Poppins", "Inter", sans-serif;
  color: var(--cs-font-color);
}

.cs-components .cs-comp-title {
  font-family: "Inter", sans-serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
}

.cs-comp-grid {
  display: grid;
  grid-template-columns: 342px 292px 336px;
  column-gap: 57px;
  align-items: start;
}

.cs-comp-col {
  display: flex;
  flex-direction: column;
  gap: 57px;
}

.cs-comp-col-1 {
  display: block;
}

.cs-comp-col-2,
.cs-comp-col-3 {
  padding-top: 10px;
}

.cs-comp-col-1 .cs-comp-frame {
  width: 302px;
  margin: 29px 0 0 40px;
}

.cs-comp-frame {
  border: 1px solid var(--cs-subtext);
  border-radius: 20px;
  padding: 16px 16px 0;
}

.cs-comp-frame.cs-w-231 {
  width: 231px;
}

.cs-comp-caption {
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  padding: 9px 0;
}

/* year dropdown */
.cs-dd {
  border: 1px solid var(--cs-stroke);
  border-radius: 12px;
  padding: 16px 34px 20px;
}

.cs-dd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  padding: 6px 0 10px;
}

.cs-dd ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-dd li {
  font-size: 15px;
  line-height: 21px;
  padding: 12px 0;
}

.cs-dd li.is-active {
  font-weight: 600;
  color: var(--cs-primary);
}

/* arrow button (hover swaps pill and circle) */
.cs-arrow-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.cs-arrow-btn:hover,
.cs-arrow-btn.is-hover {
  flex-direction: row-reverse;
}

.cs-ab-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 50px;
  background: var(--cs-secondary);
  color: var(--cs-white);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

.cs-ab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--cs-secondary);
  border-radius: 50%;
  color: var(--cs-secondary);
}

.cs-arrow-btn.cs-wide .cs-ab-label {
  padding: 0 34px;
}

.cs-btn-demo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 19px;
  border: 1.5px dashed var(--cs-subtext);
  border-radius: 6px;
  padding: 17px 16px 18px;
}

/* mini cards */
.cs-mini-card {
  background: var(--cs-white);
  border: 1px solid var(--cs-stroke);
  border-radius: 12px;
  padding: 26px 16px 16px 17px;
  transition: 0.25s;
}

.cs-mini-card:hover {
  border-color: var(--cs-secondary);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.25);
}

.cs-mini-logo {
  position: relative;
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--cs-card-b); /* fallback */
  background: color-mix(in srgb, var(--cs-secondary) 30%, #fff);
}

.cs-mini-logo::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  border: 5px solid var(--cs-white);
}

.cs-mini-logo::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--cs-secondary);
}

.cs-mini-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 24px;
}

.cs-mini-text {
  font-size: 10px;
  line-height: 12px;
  margin-top: 8px;
}

.cs-mini-card .cs-arrow-btn {
  margin-top: 13px;
}

.cs-mini-card--tab {
  border: 0;
  border-top: 10px solid var(--cs-secondary);
  border-radius: 14px;
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.25);
  text-align: center;
  padding: 26px 16px 28px;
}

.cs-mini-card--tab .cs-mini-title {
  font-size: 20px;
  margin: 0;
}

.cs-mini-card--tab .cs-arrow-btn {
  margin-top: 22px;
}

.cs-mini-card--bar {
  border: 0;
  border-left: 6px solid var(--cs-secondary);
  border-radius: 14px;
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.25);
  padding: 24px 26px 24px 30px;
}

.cs-mini-card--bar .cs-mini-title {
  font-size: 18px;
  line-height: 30px;
  margin: 0 0 14px;
}

.cs-mini-card--bar .cs-arrow-btn {
  margin-top: 16px;
}

.cs-mini-card--tab:hover,
.cs-mini-card--bar:hover {
  transform: translateY(-3px);
}

.cs-mini-rule {
  border: 0;
  border-top: 1px solid var(--cs-stroke);
  margin: 0;
  opacity: 1;
}

.cs-mini-meta {
  padding: 14px 0;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.cs-mini-label {
  display: block;
  color: var(--cs-secondary);
}

.cs-mini-value {
  display: block;
}

/* =====================================================================
   10. CTA
   ===================================================================== */
.cs-cta {
  min-height: 278px;
  padding: 30px 0 43px;
  background-color: var(--cs-cta-bg);
  /* page can override with --cs-cta-img; otherwise the default image is used
     (path is relative to assets/main_website/css/) */
  background-image: var(
    --cs-cta-img,
    url("../img/ourwork/contact-with-us-above-footer.png")
  );
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--cs-white);
}

.cs-cta-title {
  max-width: 540px;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.5;
  color: var(--cs-white);
}

.cs-page .cs-cta .cs-cta-text {
  font-size: 15px;
  line-height: 1.5;
  margin-top: 20px;
  color: var(--cs-white);
}

/* The button sits in normal flow BELOW the text. The spacing is given by the
   paragraph's margin-bottom, and the button is forced back into the flow with
   !important so no global .btn rule (absolute / negative margin / top / float /
   transform) can pull it up over the text. */
.cs-page .cs-cta .cs-cta-text {
  margin-bottom: 40px;
}

.cs-page .cs-cta .cs-btn-white {
  position: static !important;
  inset: auto !important;
  float: none !important;
  clear: both;
  transform: none !important;
  display: inline-block !important;
  height: auto !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  vertical-align: top;
}

/* =====================================================================
   11. RECENT PROJECTS
   ===================================================================== */
.cs-portfolio {
  padding: 73px 0 84px;
}

.cs-tag-pill {
  display: inline-block;
  border: 1px solid var(--cs-font-color);
  border-radius: 50px;
  padding: 10px 22px;
  font-size: 16px;
  line-height: 1.4;
  background: var(--cs-white);
  -webkit-text-fill-color: var(--cs-font-color) !important;
}

.cs-portfolio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.cs-view-all {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-right: 38px;
  font-size: 15px;
  color: var(--cs-font-color);
  text-decoration: none;
  white-space: nowrap;
}

.cs-view-all svg {
  width: 22px;
  height: 22px;
}

.cs-view-all:hover {
  color: var(--cs-primary);
}

.cs-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 40px -29px 0;
}

.cs-project-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cs-project-card:hover {
  color: inherit;
}

.cs-project-thumb {
  height: 336px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
}

.cs-project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.cs-project-card:hover .cs-project-thumb img {
  transform: scale(1.04);
}

.cs-project-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 28px;
}

.cs-project-text {
  font-size: 15px;
  line-height: 1.5;
  margin-top: 0;
}

/* =====================================================================
   12. RESPONSIVE
   ===================================================================== */

/* ---------- large laptops ---------- */
@media (max-width: 1399.98px) {
  .cs-page {
    --cs-gutter: 40px;
  }
}

/* ---------- small laptops / landscape tablets ---------- */
@media (max-width: 1199.98px) {
  /* hero */
  .cs-hero-inner {
    min-height: 560px;
  }
  .cs-hero-copy {
    max-width: 380px;
    padding-top: 150px;
  }
  .cs-hero-btn-wrap {
    margin-top: 50px;
  }

  /* overview */
  .cs-overview-inner {
    flex-wrap: wrap;
    gap: 20px 0;
    padding-left: 0;
  }
  .cs-overview-title {
    flex-basis: 180px;
  }
  .cs-overview-text {
    flex: 1 1 300px;
  }
  .cs-overview-meta {
    flex-basis: 100%;
    margin-left: 0;
  }

  /* details */
  .cs-details-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .cs-phone-stage {
    max-width: 300px;
  }

  /* process */
  .cs-step {
    flex-basis: 170px;
  }
  .cs-step-arrow {
    flex-basis: 44px;
  }
  .cs-arrow {
    width: 44px;
    height: 18px;
  }

  /* style guide */
  .cs-sg-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 24px;
    padding-right: 0;
  }
  .cs-sg-type {
    padding-left: 0;
  }
  .cs-swatches {
    gap: 28px 16px;
  }

  /* components */
  .cs-comp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
  }
  .cs-comp-col-1 .cs-comp-frame,
  .cs-comp-frame.cs-w-231 {
    width: 100%;
    margin-left: 0;
  }

  /* portfolio */
  .cs-cards {
    gap: 24px;
    margin-inline: 0;
  }
  .cs-project-thumb {
    height: 260px;
  }
}

/* ---------- tablets (portrait) ---------- */
@media (max-width: 991.98px) {
  /* hero: stack copy + image */
.cs-hero-inner {
    min-height: 0;
    padding-top: 56px;
  }
  .cs-hero-copy {
    max-width: none;
    padding-top: 0;
    text-align: center;
  }
  .cs-hero-btn-wrap {
    margin-top: 28px;
  }
  .cs-hero-img {
    position: relative;
    right: auto;
    width: 100%;
    max-width: 760px;
    margin: 40px auto 0;
  }

  /* details: single column */
  .cs-details-grid {
    grid-template-columns: 1fr;
    row-gap: 50px;
  }
  .cs-details::before {
    width: 360px;
    height: 360px;
    left: -150px;
    border-width: 50px;
  }
  .cs-details::after {
    display: none;
  }
  .cs-phone-stage {
    max-width: 340px;
  }

  /* process: 2 per row */
  .cs-process {
    padding: 48px 0 60px;
  }
  .cs-process-row {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 44px;
    margin-top: 44px;
  }
  .cs-step {
    flex: 0 0 50%;
    padding-inline: 12px;
  }
  .cs-step-arrow {
    display: none;
  }

  /* ui design */
  .cs-ui-shots {
    margin-top: 36px;
  }

  /* style guide: single column */
  .cs-style-guide {
    padding: 60px 0 50px;
  }
  .cs-style-guide .cs-sg-title {
    margin-top: 50px;
  }
  .cs-sg-grid {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }
  .cs-sg-type {
    max-width: 480px;
  }
  .cs-font-name {
    font-size: 96px;
  }
  .cs-swatches {
    grid-template-columns: repeat(3, minmax(0, 120px));
    justify-content: start;
    gap: 28px 32px;
  }

  /* components */
  .cs-comp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 40px;
  }
  .cs-comp-col-1 {
    grid-column: 1 / -1;
  }
  .cs-comp-col-1 .cs-comp-frame {
    max-width: 340px;
  }

  .cs-page .cs-cta .cs-cta-text {
    margin-bottom: 32px;
  }

  /* portfolio: 2 columns */
  .cs-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- large phones ---------- */
@media (max-width: 767.98px) {
  .cs-page {
    --cs-gutter: 20px;
  }

  /* hero */
  .cs-hero-inner {
    padding-top: 44px;
  }
  .cs-hero-img {
    margin-top: 28px;
  }

  /* overview */
  .cs-overview-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-block: 28px;
  }
  .cs-overview-title,
  .cs-overview-text {
    flex: 0 0 auto;
  }
  .cs-overview-meta {
    flex-wrap: wrap;
    width: 100%;
    gap: 16px 0;
  }
  .cs-meta-item {
    flex: 0 0 50%;
  }

  /* details */
  .cs-details {
    padding: 30px 0 44px;
  }
  .cs-info-card {
    padding: 22px 20px 24px;
  }
  .cs-info-card h2 {
    font-size: 22px;
  }
  .cs-info-card p {
    font-size: 15px;
  }
  .cs-tool-row {
    gap: 16px 20px;
  }
  .cs-tool-row img {
    height: 36px;
  }
  .cs-tool-row img.cs-tool-mysql {
    height: 28px;
  }

  /* process: 1 per row */
  .cs-process {
    padding-top: 44px;
  }
  .cs-step {
    flex: 0 0 100%;
  }
  .cs-step h3 {
    font-size: 22px;
    margin-top: 20px;
  }
  .cs-step p {
    max-width: 320px;
    margin: 14px auto 0;
  }

  /* ui design */
  .cs-ui-design {
    padding-top: 44px;
  }

  /* style guide */
  .cs-style-guide .cs-sg-title,
  .cs-components .cs-comp-title {
    font-size: 26px;
  }
  .cs-sg-grid {
    margin-top: 28px;
  }
  .cs-sg-type {
    max-width: 360px;
  }
  .cs-font-name {
    font-size: 72px;
    margin-top: 20px;
  }
  .cs-swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    gap: 24px 16px;
  }
  .cs-swatch-name,
  .cs-swatch-hex {
    font-size: 14px;
  }

  /* components */
  .cs-comp-grid {
    grid-template-columns: 1fr;
  }
  .cs-comp-col-2,
  .cs-comp-col-3 {
    padding-top: 0;
  }
  .cs-comp-frame,
  .cs-comp-frame.cs-w-231,
  .cs-comp-col-1 .cs-comp-frame {
    max-width: 340px;
  }

  /* cta */
  .cs-cta {
    min-height: 0;
    padding-block: 40px;
  }
  .cs-page .cs-cta .cs-cta-text {
    margin-bottom: 24px;
  }

  /* portfolio: 1 column */
  .cs-portfolio {
    padding: 50px 0 60px;
  }
  .cs-portfolio-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .cs-view-all {
    margin-right: 0;
  }
  .cs-cards {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }
  .cs-project-thumb {
    height: auto;
    aspect-ratio: 400 / 336;
  }
  .cs-project-title {
    margin-top: 20px;
  }
}

/* ---------- small phones ---------- */
@media (max-width: 575.98px) {
  .cs-btn-coral,
  .cs-page .cs-btn-coral {
    padding: 9px 22px;
    font-size: 15px;
  }
  .cs-sec-sub {
    font-size: 15px;
  }
  .cs-font-name {
    font-size: 64px;
  }
  .cs-swatch-box {
    max-width: 90px;
  }
  .cs-mini-card--bar {
    padding: 20px 18px 20px 22px;
  }
}

/* ---------- very small phones (320–400px) ---------- */
@media (max-width: 399.98px) {
  .cs-page {
    --cs-gutter: 16px;
  }
  .cs-hero-title {
    font-size: 26px;
  }
  .cs-meta-item {
    flex-basis: 100%;
  }
  .cs-info-card {
    padding: 20px 16px 22px;
  }
  .cs-font-name {
    font-size: 56px;
  }
  .cs-swatches {
    gap: 20px 10px;
  }
  .cs-swatch-name,
  .cs-swatch-hex {
    font-size: 12px;
  }
  .cs-cta-text {
    font-size: 14px;
  }
}
/* ===== EQUAL SPACING SYSTEM (overrides earlier offsets) ===== */
.cs-page { --section-y: 80px; }
@media (max-width: 767.98px) { .cs-page { --section-y: 48px; } }

/* 1. Remove the odd one-off offsets so everything sits on the same grid */
.cs-overview-inner       { padding-left: 0; padding-right: 0; }
.cs-sg-type              { padding-left: 0; }
.cs-sg-grid              { padding-right: 0; }
.cs-comp-col-1 .cs-comp-frame { margin-left: 0; }
.cs-cards                { margin-inline: 0; gap: 24px; }
.cs-view-all             { margin-right: 0; }



/* 3. Same vertical space for every section */
.cs-details,
.cs-process,
.cs-style-guide,
.cs-components,
.cs-portfolio            { padding-block: var(--section-y); }
.cs-ui-design            { padding-top: var(--section-y); }
.cs-cta                  { padding-block: calc(var(--section-y) * 0.7); }

/* 4. Keep phones equal too */
@media (max-width: 767.98px) {
  .cs-cards { gap: 20px; }
}

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  .cs-page *,
  .cs-page *::before,
  .cs-page *::after {
    transition: none !important;
    animation: none !important;
  }
}
/* Final mobile fix: Colors & Typography + SCON style guide */
@media (max-width: 767.98px) {
  .cs-style-guide .cs-sg-title {
    width: 100% !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
 
  .cs-style-guide .cs-sg-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center !important;
    width: 100% !important;
    margin-inline: auto !important;
  }
 
  .cs-style-guide .cs-sg-type {
    width: 100% !important;
    max-width: 480px !important;
    margin-inline: auto !important;
    padding: 0 !important;
    text-align: center !important;
  }
 
  .cs-style-guide .cs-aa {
    width: 100% !important;
    max-width: 480px !important;
    margin-inline: auto !important;
  }
 
  .cs-style-guide .cs-font-name,
  .cs-style-guide .cs-font-src {
    width: 100% !important;
    text-align: center !important;
  }
 
  .cs-style-guide .cs-swatches {
    width: 100% !important;
    max-width: 480px !important;
    margin-inline: auto !important;
    justify-items: center !important;
  }
 
  .cs-style-guide .cs-swatch {
    width: 100% !important;
    text-align: center !important;
  }
}
/* Fix case study hero title overlapping banner image */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .cs-hero-inner {
        min-height: 560px;
        padding-inline: 30px;
    }

    .cs-hero-copy {
        max-width: 42%;
        padding-top: 150px;
    }

    .cs-hero-title {
        font-size: clamp(28px, 3vw, 36px);
        overflow-wrap: break-word;
    }

    .cs-hero-img {
        width: 58%;
        max-width: 700px;
        right: 0;
        bottom: 0;
    }
}