/* ==========================================================================
   flowio — CASE STUDIES PAGE
   File: css/case-studies.css        Loaded by: case-studies.html
   --------------------------------------------------------------------------
   · .cs-hero    compact split hero: copy left, stats card right. Replaces the
                 centred hero, which measured 756px and used 84% of a 900px
                 screen, leaving no case study visible above the fold.
   · .cs-row     numbered editorial rows: index numeral, story, image. Roughly
                 312px per case study against 467px for a full-bleed band.
   Uses its own .cs-* prefix so it never collides with the .hero / .case-study-*
   rules in the shared css/styles.css.
   ========================================================================== */

/* ==========================================================================
   HERO — split bar
   ========================================================================== */

/* .navbar is position:fixed (styles.css:60) and .navbar-container is 6.25rem
   tall, 6rem from 1024px up — the hero has to clear it or it slides underneath */
.cs-hero {
  padding: calc(6.25rem + 2rem) 0 2.5rem;
  background: linear-gradient(180deg, hsl(0 0% 99%) 0%, hsl(220 20% 97%) 100%);
  border-bottom: 1px solid hsl(220 20% 92%);
}
@media (min-width: 1024px) {
  .cs-hero { padding-top: calc(6rem + 2.5rem); }
}
.cs-hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }

.cs-hero-badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.85rem; border-radius: 999px;
  background: hsla(16, 100%, 50%, 0.1); color: hsl(16 100% 42%);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.cs-hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.1; letter-spacing: -0.03em;
  margin: 0.8rem 0 0.65rem;
  color: hsl(220 25% 12%);
}
.cs-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, hsl(16 100% 50%), hsl(30 100% 55%));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cs-hero-lead { font-size: 1rem; line-height: 1.65; color: hsl(220 10% 42%); max-width: 48ch; margin: 0; }

.cs-hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; border: 1px solid hsl(220 20% 90%);
  border-radius: 0.9rem; overflow: hidden;
  box-shadow: 0 4px 18px hsla(220, 30%, 20%, 0.05);
}
.cs-hero-stats > div { padding: 1.15rem 0.9rem; text-align: center; border-right: 1px solid hsl(220 20% 92%); }
.cs-hero-stats > div:last-child { border-right: none; }
.cs-hero-stats .v {
  font-size: 1.7rem; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, hsl(16 100% 50%), hsl(30 100% 55%));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cs-hero-stats .l { font-size: 0.7rem; font-weight: 600; color: hsl(220 10% 46%); margin-top: 0.32rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ==========================================================================
   CASE STUDY ROWS — numbered editorial
   ========================================================================== */

.cs-stack { display: flex; flex-direction: column; }

.cs-row {
  display: grid;
  grid-template-columns: 78px 1fr 340px;
  gap: 2.25rem;
  align-items: center;
  padding: 2.5rem 0;
  border-top: 1px solid hsl(220 20% 90%);
}
.cs-row:last-child { border-bottom: 1px solid hsl(220 20% 90%); }

.cs-row-n {
  font-size: 2.7rem; font-weight: 800; line-height: 1;
  letter-spacing: -0.04em; color: hsl(220 15% 86%);
  transition: color 0.3s ease;
}
.cs-row:hover .cs-row-n { color: hsl(16 100% 55%); }

.cs-ind { font-size: 0.72rem; font-weight: 700; color: hsl(16 100% 45%); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.5rem; }
.cs-row-body h2 { font-size: 1.45rem; line-height: 1.24; letter-spacing: -0.02em; margin: 0 0 0.55rem; color: hsl(220 25% 12%); }
.cs-row-body > p { font-size: 0.92rem; line-height: 1.65; color: hsl(220 10% 42%); margin: 0 0 0.95rem; max-width: 56ch; }

.cs-row-m { display: flex; gap: 2rem; margin-bottom: 0.95rem; }
.cs-row-m .v { font-size: 1.5rem; font-weight: 800; line-height: 1; color: hsl(16 100% 45%); }
.cs-row-m .l { font-size: 0.68rem; font-weight: 600; color: hsl(220 10% 46%); margin-top: 0.22rem; text-transform: uppercase; letter-spacing: 0.05em; }

.cs-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.cs-tag {
  display: inline-block; padding: 0.28rem 0.65rem; border-radius: 999px;
  background: hsl(220 20% 96%); border: 1px solid hsl(220 20% 90%);
  font-size: 0.72rem; font-weight: 600; color: hsl(220 15% 38%);
}

.cs-link { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.9rem; color: hsl(16 100% 45%); transition: gap 0.25s ease; }
.cs-link svg { flex-shrink: 0; }
.cs-row:hover .cs-link { gap: 0.8rem; }

/* a real <img> rather than a CSS background: background images carry no alt
   text and are not indexed by image search */
.cs-row-img {
  height: 200px; border-radius: 0.9rem; overflow: hidden;
  background-color: hsl(220 25% 12%);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.cs-row-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-row:hover .cs-row-img { transform: translateY(-4px); box-shadow: 0 20px 40px -22px hsla(220, 30%, 20%, 0.35); }
/* client logos are contained on a white plate rather than cropped like a photo */
.cs-row-img.is-logo { background-color: #fff; border: 1px solid hsl(220 20% 90%); }
.cs-row-img.is-logo img { object-fit: contain; padding: 0.85rem; }

/* entries whose case study page is not written yet */
.cs-row--soon .cs-row-body h2,
.cs-row--soon .cs-ind { opacity: 0.85; }
.cs-row--soon .cs-row-img { filter: saturate(0.5); opacity: 0.8; }
.cs-soon {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: hsl(220 10% 52%);
}
.cs-soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: hsl(30 100% 55%); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .cs-row { grid-template-columns: 60px 1fr 260px; gap: 1.5rem; }
  .cs-row-n { font-size: 2.1rem; }
  .cs-row-img { height: 170px; }
}
@media (max-width: 860px) {
  .cs-hero-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .cs-row { grid-template-columns: 48px 1fr; gap: 1.25rem; padding: 2rem 0; }
  .cs-row-img { grid-column: 1 / -1; height: 200px; order: -1; margin-bottom: 0.5rem; }
  .cs-row-n { font-size: 1.9rem; }
}
@media (max-width: 640px) {
  /* keep the fixed-navbar clearance; only the lower padding tightens */
  .cs-hero { padding: calc(6.25rem + 1.25rem) 0 1.75rem; }
  .cs-hero-stats > div { padding: 0.9rem 0.5rem; }
  .cs-hero-stats .v { font-size: 1.35rem; }
  .cs-hero-stats .l { font-size: 0.62rem; }
  .cs-row { grid-template-columns: 1fr; gap: 0; }
  .cs-row-n { font-size: 1.6rem; margin-bottom: 0.5rem; }
  .cs-row-body h2 { font-size: 1.25rem; }
  .cs-row-m { gap: 1.5rem; }
}
