/* ==========================================================================
   Layout System — layout.css
   Container, spacing scale, grid system, and section styles.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */

.container {
  max-width: 1280px;
  padding: 0px 60px;
  margin: 0px auto;
}

@media screen and (max-width: 767px) {
  .container {
    padding: 0px 30px;
  }
}

/* --------------------------------------------------------------------------
   Spacing Scale
   Measured from production computed values at 1440px viewport.
   -------------------------------------------------------------------------- */

:root {
  --space-xs: 1.5rem;   /* 24px — tight gaps */
  --space-sm: 2.75rem;  /* 44px — small section padding */
  --space-md: 4rem;     /* 64px — medium section padding */
  --space-lg: 6rem;     /* 96px — large section padding, CTA margins */
  --space-xl: 8rem;     /* 128px — XL bottom spacing */
}

@media (max-width: 768px) {
  :root {
    --space-xs: 1rem;
    --space-sm: 2rem;
    --space-md: 3rem;
    --space-lg: 4rem;
    --space-xl: 5rem;
  }
}

/* Spacing utilities */
.pad-sm  { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.pad-md  { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.pad-lg  { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }

.pad-top-sm { padding-top: var(--space-sm); }
.pad-top-md { padding-top: var(--space-md); }
.pad-bot-sm { padding-bottom: var(--space-sm); }
.pad-bot-md { padding-bottom: var(--space-md); }
.pad-bot-0  { padding-bottom: 0; }

.mb-lg   { margin-bottom: var(--space-lg); }
.mb-xl   { margin-bottom: var(--space-xl); }

/* Background utilities */
.bg-light { background-color: #f8f9fe; }

/* Layout utilities */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-form { max-width: 580px; }
.default-page-content { max-width: 720px; min-height: 50vh; display: flex; align-items: center; justify-content: center; }
.default-page-content .entry-content { text-align: center; font-size: 1.5rem; }

/* --------------------------------------------------------------------------
   Grid System
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 50px;
}

.process-image {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 1.5em;
  aspect-ratio: 2000 / 2036;
}

/* Equal columns */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* Uneven splits */
.grid-1-2 { grid-template-columns: 1fr 2fr; }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-1-3 { grid-template-columns: 1fr 3fr; }
.grid-3-1 { grid-template-columns: 3fr 1fr; }
.grid-2-3 { grid-template-columns: 2fr 3fr; }
.grid-3-2 { grid-template-columns: 3fr 2fr; }

@media (max-width: 1024px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-1-2,
  .grid-2-1,
  .grid-1-3,
  .grid-3-1,
  .grid-2-3,
  .grid-3-2 {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Section Spacing — applied via utility classes on template parts
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Arrow links — apply arrowlink styling to markdown links in sections
   -------------------------------------------------------------------------- */

.home-case-studies .hero-max a,
.home-faq .grid > div:first-child a {
  text-underline-offset: 4px;
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
  text-decoration-color: #006efa;
}

/* --------------------------------------------------------------------------
   FAQ Accordion
   -------------------------------------------------------------------------- */

.faq-accordion {
  width: 100%;
}

.faq-item {
  border-bottom: 1px solid #e5e6ec;
}

.faq-item summary {
  padding: 24px 30px 24px 0;
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Mona Sans", sans-serif;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item .faq-icon {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item .faq-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #041b4a;
  border-bottom: 2px solid #041b4a;
  transform: translate(-50%, -60%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-icon::before {
  transform: translate(-50%, -40%) rotate(-135deg);
}

.faq-item .faq-answer {
  padding: 0 30px 24px 0;
  line-height: 1.7;
}


.home-case-studies .hero-max a::after,
.home-faq .grid > div:first-child a::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  background-color: #171718;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M636.89-610.61 290.22-263.93q-12.92 12.91-31.83 12.79-18.91-.12-31.82-13.03-12.92-12.92-12.92-31.95t12.92-31.95L573-674.5H282.39q-19.15 0-32.32-13.17-13.18-13.18-13.18-32.33t13.18-32.33q13.17-13.17 32.32-13.17h400q19.15 0 32.33 13.17 13.17 13.18 13.17 32.33v400q0 19.15-13.17 32.33-13.18 13.17-32.33 13.17t-32.32-13.17q-13.18-13.18-13.18-32.33v-290.61Z'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M636.89-610.61 290.22-263.93q-12.92 12.91-31.83 12.79-18.91-.12-31.82-13.03-12.92-12.92-12.92-31.95t12.92-31.95L573-674.5H282.39q-19.15 0-32.32-13.17-13.18-13.18-13.18-32.33t13.18-32.33q13.17-13.17 32.32-13.17h400q19.15 0 32.33 13.17 13.17 13.18 13.17 32.33v400q0 19.15-13.17 32.33-13.18 13.17-32.33 13.17t-32.32-13.17q-13.18-13.18-13.18-32.33v-290.61Z'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Process section image
   -------------------------------------------------------------------------- */

.process-image {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 1.5em;
}

@media (max-width: 1024px) {
  .process-image {
    max-width: 600px;
    margin: 0 auto;
  }
}

/* ==========================================================================
   Case Study Mini Cards (used on service pages)
   ========================================================================== */

.case-mini-row {
  display: flex;
  gap: 30px;
}

.case-mini-content {
  padding: 15px;
}

.case-mini-card {
  flex: 1;
  border-radius: 8px;
  box-shadow: 4px 4px 0px rgba(91,105,135,0.2);
  border: 1.5px solid #c0c2d3;
  margin-bottom: 3em;
  padding: 10px;
}

.case-mini-img img {
  width: 100%;
  height: auto;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.case-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1em;
  margin-bottom: 1em;
  border-top: 1px solid #dee1e7;
  padding-top: 1em;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.5em;
  font-weight: 700;
}

.stat-num.green { color: #04A635; }
.stat-num.blue { color: #006efa; }
.stat-num.dark { color: #ff5e15; }

.stat-label {
  font-size: 0.85em;
}

@media (max-width: 1024px) {
  .case-mini-row {
    flex-direction: column;
  }
}

/* ==========================================================================
   Case Study Styles
   ========================================================================== */

/* Hero */
.casestudy-main {
  padding: 70px 0 270px;
}

.casestudy-hero-title {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 1em;
  font-size: 4rem;
  line-height: 1.15;
}

.casestudy-hero-title em {
  display: block;
  font-style: normal;
  letter-spacing: 2px;
  font-size: 2em;
  color: #006efa;
  font-weight: 700;
}

/* Separator image — overlaps between hero and quote sections */
.casestudy-image-separator {
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: -270px;
  margin-bottom: -270px;
}

.casestudy-separator-img {
  max-width: 960px;
  width: 100%;
  height: auto;
}

/* Main quote */
.casestudy-main-quote {
  padding: 280px 0 40px;
}

.casestudy-main-quote .container {
  max-width: 1000px;
  text-align: center;
  font-size: 22px;
}


.casestudy-main-quote .author {
  color: #041b4a;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 30px;
}

/* Overview — two-column stats + client/challenge */
.casestudy-twocol {
  margin-bottom: 0;
}

.casestudy-twocol h2 {
  margin: 0;
  color: #041b4a;
}

.casestudy-twocol h3 {
  color: #006efa;
  font-weight: 700;
}

/* Overview grid — sidebar + main */
.cs-overview-grid {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 30px;
}

/* Sidebar — stats + services provided */
.cs-sidebar {
  overflow: hidden;
  color: #041b4a;
  line-height: 1.2;
  text-align: center;
  padding: 40px;
  border-radius: 8px;
}

.casestudy-stat {
  margin-bottom: 25px;
  font-weight: 700;
}

.casestudy-stat em {
  display: block;
  font-style: normal;
  font-size: 46px;
  font-weight: 700;
  color: #006efa;
  letter-spacing: 2px;
}

.cs-sidebar .separator {
  border-bottom: 2px dotted;
  width: 140px;
  margin: 48px auto 50px;
}

.cs-sidebar h5 {
  color: #006efa;
  letter-spacing: 0;
  margin: 0;
}

.cs-sidebar h4 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.cs-sidebar ul {
  list-style: disc;
  text-align: left;
  padding: 0 0 0 40px;
  margin: 30px 0 0;
  font-weight: 400;
  line-height: 1.4;
}

/* Main column — client info + challenge */
.cs-main {
  min-width: 0;
}

.casestudy-twocol-color {
  margin-bottom: 2em;
  padding: 60px 60px 40px 60px;
  border-radius: 8px;
}

.casestudy-client-meta {
  display: flex;
  gap: 40px;
  margin: 20px 0 30px;
}

.casestudy-twocol-white {
  padding: 30px 60px 60px 60px;
}

.casestudy-twocol-white h3 {
  margin-top: 10px;
}

/* Mid pull quote — overlaps the solution section above */
.casestudy-mid-quote {
  position: relative;
  z-index: 1;
  margin-top: -60px;
  padding: 0 60px;
}

.casestudy-mid-quote blockquote {
  background: #fff;
  padding: 50px 70px;
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  position: relative;
  margin-top: 0;
}

.casestudy-mid-quote blockquote::before {
  top: 0;
}

.casestudy-mid-quote blockquote::after {
  bottom: 10px;
}

/* Final quote — overlaps bottom CTA */
.casestudy-final-quote {
  position: relative;
  z-index: 1;
  padding: 0 60px;
  margin-bottom: -60px;
}

.casestudy-final-quote blockquote {
  background: #fff;
  padding: 50px 70px;
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  position: relative;
  margin-bottom: 0;
}

.casestudy-final-quote blockquote::before {
  top: 0;
}

.casestudy-final-quote blockquote::after {
  bottom: 10px;
}

/* Solution narrative */
.casestudy-solution {
  background-color: #f8f9fe;
  margin-top: 60px;
  padding: 60px 100px 120px;
  border-radius: 8px;
}

/* Results narrative */
.casestudy-results {
  padding: 50px 0;
}

.casestudy-results .container {
  max-width: 1280px;
  padding: 0 100px;
  margin: 0 auto;
}

.casestudy-solution h2,
.casestudy-results h2 {
  margin: 0;
  color: #041b4a;
}

.casestudy-solution h3,
.casestudy-results h3 {
  color: #006efa;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 30px;
}

.casestudy-results ol {
  list-style: none;
  padding: 30px 0;
  margin: 0;
}

.casestudy-results ol li {
  margin-bottom: 30px;
  padding-left: 50px;
  position: relative;
}

.casestudy-results ol li p {
  margin: 0;
}

.casestudy-results ol li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 30px;
  height: 30px;
  background: #006efa;
  border-radius: 8px;
  box-shadow: 2px 2px 0px #272728;
}

.casestudy-results ol li::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  width: 24px;
  height: 24px;
  background-color: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px'%3E%3Cpath d='m382-388 321-321q19-19 45-19t45 19q19 19 19 45t-19 45L427-253q-19 19-45 19t-45-19L167-423q-19-19-19-45t19-45q19-19 45-19t45 19l125 125Z'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px'%3E%3Cpath d='m382-388 321-321q19-19 45-19t45 19q19 19 19 45t-19 45L427-253q-19 19-45 19t-45-19L167-423q-19-19-19-45t19-45q19-19 45-19t45 19l125 125Z'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* CTA */
.casestudy-consult {
  padding: 60px 0 160px 0;
  text-align: center;
}

.casestudy-consult h2 {
  margin-top: 100px;
  margin-bottom: 60px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  color: #041b4a;
}

/* Responsive */
@media (max-width: 1024px) {
  .casestudy-hero-title {
    font-size: 2.5rem;
    padding: 0 15px;
  }

  .casestudy-main {
    padding: 30px 0 25%;
  }

  .casestudy-image-separator {
    margin-top: -25%;
    margin-bottom: -25%;
  }

  .casestudy-main-quote {
    padding: 25% 0 30px;
  }

  .casestudy-mid-quote,
  .casestudy-final-quote {
    padding: 0 15px;
    margin-top: 0;
  }

  .casestudy-main-quote .container {
    font-size: 18px;
  }

  .cs-overview-grid {
    grid-template-columns: 1fr;
  }

  .cs-sidebar {
    text-align: left;
    padding: 30px;
  }

  .casestudy-stat em {
    font-size: 30px;
  }

  .cs-sidebar h4 {
    font-size: 16px;
  }

  .cs-sidebar ul {
    padding-left: 20px;
  }

  .casestudy-twocol-color {
    padding: 30px 15px;
  }

  .casestudy-twocol-white {
    padding: 0;
  }

  .casestudy-solution,
  .casestudy-results {
    padding: 30px 15px;
  }

  .casestudy-consult {
    padding: 30px 15px;
  }

  .casestudy-solution {
    margin-top: 30px;
  }

  .casestudy-results {
    margin: 0;
  }

  .casestudy-client-meta {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .casestudy-hero-title {
    font-size: 2rem;
  }
}
