/* ==========================================================================
   10xDevs / Midday Exact Pixel Reverse-Engineered Design System
   Source: https://ccript.com/magic-work/midday
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --hero-header-background: rgba(42, 42, 42, 0.11);
  --orange: #ff6701;
  --black: #2a2a2a;
  --font-space-grotesk: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base typography enforcement across all Midday case study elements */
.midday-page,
.midday-page * {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  box-sizing: border-box;
}

.midday-page {
  color: #2a2a2a;
  background-color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --------------------------------------------------------------------------
   1. HERO CONTAINER & HEADER
   -------------------------------------------------------------------------- */
.project-hero-container {
  width: 100vw;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 1440px) {
  .project-hero-container {
    padding-top: 160px;
  }
}

@media (max-width: 768px) {
  .project-hero-container {
    padding-top: 100px;
  }
}

.project-hero-top-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 92%;
  margin-left: auto;
  margin-right: auto;
}

/* Top "Projects" Tag Badge */
.tags-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.tag-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-wrapper {
  background-color: rgba(42, 42, 42, 0.11);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: 120px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tag-wrapper.orange {
  background-color: #ff6701;
  color: #ffffff;
}

.tag-text.screen-header.company {
  color: #2a2a2a;
  font-size: 18px;
  line-height: 20px;
  font-weight: 400;
  text-align: center;
  letter-spacing: normal;
}

@media (max-width: 768px) {
  .tag-text.screen-header.company {
    font-size: 14px;
    line-height: 16px;
  }
  .tag-wrapper {
    padding: 6px 14px;
  }
}

/* Hero Header Text & Subtext */
.project-hero-header-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 12px;
  margin-bottom: 24px;
  gap: 20px;
  width: 100%;
}

.project-hero-header-text-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.project-hero-header-text {
  color: #2a2a2a;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 64px;
  font-weight: 400;
  line-height: 69px;
  letter-spacing: -0.02em;
}

@media (min-width: 1440px) {
  .project-hero-header-text {
    font-size: 80px;
    line-height: 88px;
  }
}

@media (max-width: 768px) {
  .project-hero-header-text {
    font-size: 44px;
    line-height: 52px;
  }
}

@media (max-width: 479px) {
  .project-hero-header-text {
    font-size: 36px;
    line-height: 44px;
  }
}

.project-subtext-wrapper {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.page-hero-header-subtext.black-hero-subtext {
  color: #2a2a2a;
  text-align: center;
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .page-hero-header-subtext.black-hero-subtext {
    font-size: 16px;
    line-height: 24px;
  }
}

/* Category Badges under Subtext */
.tag-content-wrapper.project {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 48px;
}

/* --------------------------------------------------------------------------
   2. HERO THUMBNAIL & INSET DETAILS CARD
   -------------------------------------------------------------------------- */
.project-hero-image-wrapper {
  width: 92%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 28px;
  position: relative;
  background-color: #f7f7f7;
}

.project-hero-image {
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 28px;
  width: 100%;
  height: auto;
  max-height: 680px;
  object-fit: cover;
  object-position: top;
  display: block;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.project-details-text-content-wrapper {
  background-color: #f6f7f9;
  border-radius: 24px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  padding: 24px 36px;
  position: relative;
  top: -60px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.04);
  z-index: 5;
}

@media (max-width: 768px) {
  .project-details-text-content-wrapper {
    width: 94%;
    top: -30px;
    padding: 20px;
  }
}

.project-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-column-gap: 24px;
  grid-row-gap: 20px;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .project-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-info-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-info-header {
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
  color: #2a2a2a;
  margin-top: 0;
  margin-bottom: 0;
}

.project-info-details-text {
  font-size: 17px;
  line-height: 24px;
  font-weight: 400;
  color: #2a2a2a;
}

@media (max-width: 768px) {
  .project-info-header {
    font-size: 18px;
    line-height: 22px;
  }
  .project-info-details-text {
    font-size: 15px;
    line-height: 20px;
  }
}

/* --------------------------------------------------------------------------
   3. CONTENT SECTIONS (OVERVIEW, PAIN POINTS, RESEARCH, RESULTS)
   -------------------------------------------------------------------------- */
.overview-section,
.pain-points-section,
.results-section {
  position: relative;
  overflow: hidden;
  margin-top: 72px;
  margin-bottom: 72px;
  width: 100%;
}

@media (max-width: 768px) {
  .overview-section,
  .pain-points-section {
    margin-top: 48px;
    margin-bottom: 48px;
  }
}

.overview-container,
.pain-points-container,
.results-container {
  width: 100%;
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
}

.overview-content-wrapper,
.pain-points-content-wrapper,
.results-content-wrapper {
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

@media (max-width: 1024px) {
  .overview-content-wrapper,
  .pain-points-content-wrapper,
  .results-content-wrapper {
    width: 90%;
  }
}

@media (max-width: 768px) {
  .overview-content-wrapper,
  .pain-points-content-wrapper,
  .results-content-wrapper {
    width: 96%;
  }
}

.overview-header-text,
.pain-points-header-text,
.results-header-text {
  font-size: 48px;
  font-weight: 500;
  line-height: 56px;
  color: #2a2a2a;
  margin-top: 0;
  margin-bottom: 0;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  .overview-header-text,
  .pain-points-header-text,
  .results-header-text {
    font-size: 36px;
    line-height: 44px;
  }
}

.overview-description-text-wrapper,
.pain-points-description-text-wrapper,
.results-description-text-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 200px;
}

/* --------------------------------------------------------------------------
   ENHANCED HIGH-READABILITY TYPOGRAPHY (MATCHING CCRIPT / MIDDAY SITE)
   -------------------------------------------------------------------------- */
.w-richtext {
  position: relative;
  z-index: 2;
  max-width: 72%;
  width: 100%;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 20px;
  line-height: 34px;
  color: #2a2a2a;
  font-weight: 400;
  letter-spacing: -0.012em;
}

@media (max-width: 1024px) {
  .w-richtext {
    max-width: 85%;
  }
}

@media (max-width: 768px) {
  .w-richtext {
    max-width: 100%;
    font-size: 17px;
    line-height: 28px;
  }
}

.w-richtext p {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  line-height: 34px;
  color: #2a2a2a;
  font-weight: 400;
  letter-spacing: -0.012em;
}

.w-richtext p:last-child {
  margin-bottom: 0;
}

.w-richtext p.font-medium,
.w-richtext p.font-semibold {
  font-weight: 500;
  margin-bottom: 12px;
}

.w-richtext ul {
  margin-top: 8px;
  margin-bottom: 24px;
  padding-left: 28px;
  list-style-type: disc;
}

.w-richtext li {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 34px;
  color: #2a2a2a;
  font-weight: 400;
  letter-spacing: -0.012em;
}

@media (max-width: 768px) {
  .w-richtext p,
  .w-richtext li {
    font-size: 17px;
    line-height: 28px;
  }
}

/* Decorative Watermark Vectors with Subtle Contrast */
.overview-bg-image-wrapper,
.pain-points-bg-image-wrapper,
.results-bg-image-wrapper {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}

.bg-image {
  max-width: 320px;
  width: 100%;
  height: auto;
  opacity: 0.22;
  display: block;
}

@media (max-width: 1024px) {
  .bg-image {
    max-width: 240px;
    opacity: 0.18;
  }
}

@media (max-width: 768px) {
  .bg-image {
    max-width: 160px;
    opacity: 0.12;
  }
}

/* --------------------------------------------------------------------------
   4. SHOWCASE MOCKUPS & 1+2 COMPOUND GRID
   -------------------------------------------------------------------------- */
.project-image-wrapper {
  width: 92%;
  margin: 120px auto;
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .project-image-wrapper {
    margin: 64px auto;
  }
}

.project-image {
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 28px;
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  object-fit: cover;
}

.project-image-wrapper.research {
  flex-direction: column;
  align-items: center;
}

.project-image-wrapper.row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 24px;
  gap: 24px;
}

.project-image.horizontal {
  width: calc(50% - 12px);
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .project-image-wrapper.row {
    flex-direction: column;
    gap: 16px;
  }
  .project-image.horizontal {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   5. RESULTS & 3-COLUMN METRICS GRID (END OF CASE STUDY CONTENT)
   -------------------------------------------------------------------------- */
.results-section {
  position: relative;
  overflow: hidden;
  margin-top: 72px;
  margin-bottom: 120px;
  width: 100%;
}

@media (max-width: 768px) {
  .results-section {
    margin-top: 48px;
    margin-bottom: 80px;
  }
}

.result-stats-grid-wrapper {
  width: 100%;
  margin-top: 48px;
}

.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-column-gap: 24px;
  grid-row-gap: 24px;
  align-items: flex-start;
  padding-top: 36px;
  border-top: 1px solid rgba(42, 42, 42, 0.15);
}

@media (max-width: 768px) {
  .result-stats-grid {
    grid-template-columns: 1fr;
    grid-row-gap: 28px;
  }
}

.result-stat-text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.result-stat-figure-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.counter-text.projects {
  color: #ff6701 !important;
  font-size: 64px;
  font-weight: 500;
  line-height: 72px;
  margin: 0;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .counter-text.projects {
    font-size: 48px;
    line-height: 54px;
  }
}

.stat-figure-description-text {
  color: #2a2a2a;
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  margin-top: 6px;
}

@media (max-width: 768px) {
  .stat-figure-description-text {
    font-size: 16px;
    line-height: 22px;
  }
}

/* ==========================================================================
   CCRIPT Magic Work Card System (ccript.com/magic-work)
   Pixel-Perfect REA Extraction
   ========================================================================== */

.our-work-collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 991px) {
  .our-work-collection-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.our-work-cards-row-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
  box-sizing: border-box;
}

.our-work-cards-row-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.14);
}

@media (max-width: 768px) {
  .our-work-cards-row-wrapper {
    height: auto;
    border-radius: 20px;
  }
}

/* Specific Card Themes */
.card-theme-omni {
  background-color: #f6f8fb;
  border: 1px solid rgba(79, 70, 229, 0.12);
}

.card-theme-expedient {
  background-color: #102a2d;
  border: 1px solid rgba(45, 212, 191, 0.15);
}

.card-theme-motoverse {
  background-color: #0f1115;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-theme-cafepromo {
  background-color: #151022;
  border: 1px solid rgba(255, 103, 1, 0.15);
}

/* Card Brand Canvas */
.card-brand-canvas {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 32px 56px 32px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  pointer-events: none;
  box-sizing: border-box;
}

.our-work-cards-row-wrapper:hover .card-brand-canvas {
  transform: scale(1.02);
}

.card-brand-center-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: auto;
  margin-bottom: auto;
}

.card-brand-tagline {
  margin-top: auto;
  margin-bottom: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .card-brand-tagline {
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 60px;
  }
}

/* Bottom Floating Pill Bar */
.project-details-content-wrapper {
  position: absolute;
  bottom: 24px;
  left: 4%;
  width: 92%;
  background-color: #ffffff;
  border: 1px solid rgba(42, 42, 42, 0.15);
  border-radius: 100px;
  padding: 12px 14px 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  z-index: 20;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.our-work-cards-row-wrapper:hover .project-details-content-wrapper,
.our-work-cards-row-wrapper:focus .project-details-content-wrapper {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991px) {
  .project-details-content-wrapper {
    opacity: 1;
    transform: translateY(0);
    border-radius: 20px;
    bottom: 16px;
    padding: 10px 14px;
  }
}

.project-info-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.project-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.project-logo {
  height: 36px;
  width: auto;
  max-width: 44px;
  object-fit: contain;
}

.project-heading-text {
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .project-heading-text {
    font-size: 16px;
  }
}

/* Signature CCRIPT View Details Button */
.view-details-button-wrapper {
  position: relative;
  background-color: #2a2a2a;
  border-radius: 100px;
  height: 48px;
  padding: 0 26px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.view-details-button-text {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.view-details-button-text svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.our-work-cards-row-wrapper:hover .view-details-button-text svg {
  transform: translateX(4px);
}

.rippler {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background-color: #ff6701;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.45s cubic-bezier(0.075, 0.82, 0.165, 1);
  pointer-events: none;
}

.view-details-button-wrapper:hover .rippler,
.our-work-cards-row-wrapper:hover .view-details-button-wrapper .rippler {
  transform: translate(-50%, -50%) scale(1);
}
