/* Page-specific styles for case-study detail pages
   (cyvl, embotech, fr4iav, hive, smart-delta, suburvan). */

/* ─── HERO ─── */
.case-hero {
  position: relative;
  height: 70vh; min-height: 480px;
  display: flex; align-items: flex-end;
  overflow: hidden; background: #060610;
}
.case-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 40%;
  opacity: 0.55;
}
/* Per-case background images — replaces inline style="background-image: url(...)".
   Where a WebP variant exists, the image-set() rule serves it to modern
   browsers; the url() above stays as the fallback for older agents. */
.case-hero-bg.is-embotech    { background-image: url('/assets/images/three_trucks-scaled.jpg');
                               background-image: image-set(url('/assets/images/three_trucks-scaled.webp') type('image/webp') 1x,
                                                            url('/assets/images/three_trucks-scaled.jpg') type('image/jpeg') 1x); }
.case-hero-bg.is-cyvl        { background-image: url('/assets/images/vignette2-1024x683.jpg'); }
.case-hero-bg.is-smart-delta { background-image: url('/assets/images/hooverdam01-lighter-1024x768.jpg'); }
.case-hero-bg.is-fr4iav      { background-image: url('/assets/images/car_on_circuit-scaled.jpg');
                               background-image: image-set(url('/assets/images/car_on_circuit-scaled.webp') type('image/webp') 1x,
                                                            url('/assets/images/car_on_circuit-scaled.jpg') type('image/jpeg') 1x); }
.case-hero-bg.is-hive        { background-image: url('/assets/images/hive-robotics.jpg'); }
.case-hero-bg.is-suburvan    { background-image: url('/assets/images/vignette-2-1024x576.jpg'); }
.case-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,6,16,0.92) 0%, rgba(6,6,16,0.4) 50%, rgba(6,6,16,0.15) 100%);
}
.case-hero-content {
  position: relative; z-index: 2;
  padding: 0 var(--px) 72px;
  max-width: calc(var(--w) + var(--px) * 2); width: 100%;
}
.case-hero-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.case-hero-breadcrumb a { color: rgba(255,255,255,0.5); transition: color .15s; }
.case-hero-breadcrumb a:hover { color: #fff; }
.case-hero-breadcrumb span { color: rgba(255,255,255,0.25); }
.case-hero-breadcrumb .is-current { color: rgba(255,255,255,0.7); }
/* Article video full-width block. */
.article-video-inline { width: 100%; display: block; border-radius: 6px; }
.case-hero-cat {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px;
}
.case-hero h1 {
  font-size: clamp(32px, 4.5vw, 58px);
  font-weight: 800; color: #fff;
  letter-spacing: -0.03em; line-height: 1.05;
  max-width: 760px; margin-bottom: 16px;
}
.case-hero-sub {
  font-size: 18px; color: rgba(255,255,255,0.6);
  max-width: 560px; line-height: 1.6;
}
.case-hero-logo {
  margin-bottom: 20px;
}
.case-hero-logo img {
  height: 30px; width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  display: block;
}

/* ─── ARTICLE LAYOUT ─── */
.article-wrap {
  max-width: calc(var(--content) + var(--px) * 2);
  margin: 0 auto;
  padding: 72px var(--px) 0;
}
.article-intro {
  display: flex; gap: 48px; align-items: flex-start;
  padding-bottom: 56px; border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.article-intro-text { flex: 1; }
.article-intro-text h2 { font-size: 22px; font-weight: 700; color: var(--black); letter-spacing: -0.4px; line-height: 1.25; margin-bottom: 18px; }
.article-intro-text p { font-size: 17px; color: var(--muted); line-height: 1.8; }
.article-client { flex-shrink: 0; width: 200px; display: flex; flex-direction: column; gap: 16px; }
.article-client-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.article-client-name { font-size: 22px; font-weight: 800; color: var(--black); letter-spacing: -0.3px; }
.article-client-cat { font-size: 13px; color: var(--muted); }
.article-client-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.article-client-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--blue);
  margin-top: 4px; transition: gap .18s;
}
.article-client-link:hover { gap: 10px; }
.article-section { margin-bottom: 56px; }
.article-section h2 {
  font-size: 22px; font-weight: 700; color: var(--black);
  letter-spacing: -0.4px; line-height: 1.25; margin-bottom: 18px;
}
.article-section h3 {
  font-size: 17px; font-weight: 700; color: var(--black);
  letter-spacing: -0.2px; line-height: 1.3; margin: 24px 0 10px;
}
.article-section p {
  font-size: 16px; color: var(--muted);
  line-height: 1.85; margin-bottom: 16px;
}
.article-section p:last-child { margin-bottom: 0; }
.article-section ul {
  margin: 0 0 16px 0; padding-left: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.article-section ul li {
  font-size: 16px; color: var(--muted); line-height: 1.75;
}
.article-section ul:last-child { margin-bottom: 0; }
.article-img-full { width: 100%; margin: 48px 0; border-radius: 12px; overflow: hidden; }
.article-img-full img { width: 100%; height: auto; display: block; filter: saturate(0.6) brightness(0.9); }
.article-img-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin: 48px 0;
}
.article-img-grid .article-img-full { margin: 0; aspect-ratio: 16/9; }
.article-img-grid .article-img-full img,
.article-img-grid .article-img-full video { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.article-stat {
  display: flex; gap: 32px; flex-wrap: wrap;
  background: var(--black); border-radius: 14px;
  padding: 36px 40px; margin: 48px 0;
}
.article-stat-item { display: flex; flex-direction: column; gap: 6px; }
.article-stat-val { font-size: 38px; font-weight: 800; color: #fff; letter-spacing: -0.5px; line-height: 1; }
.article-stat-label { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.4; }
.article-quote {
  padding: 32px 36px;
  background: var(--bg-alt);
  border-left: 3px solid var(--blue);
  border-radius: 0 12px 12px 0;
  margin: 48px 0;
}
.article-quote blockquote {
  font-size: 18px; font-style: italic; color: var(--black);
  line-height: 1.7; margin-bottom: 16px;
}
.article-quote cite { font-size: 14px; font-style: normal; color: var(--muted); font-weight: 600; }
.article-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--blue);
  margin-bottom: 72px; transition: gap .18s;
}
.article-cta:hover { gap: 12px; }

/* ─── MORE CASES ─── */
.more-cases {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 72px var(--px);
}
.more-cases h2 { font-size: 20px; font-weight: 700; color: var(--black); letter-spacing: -0.3px; margin-bottom: 32px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.more-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column;
}
.more-card:hover { box-shadow: 0 6px 32px rgba(0,0,0,0.09); transform: translateY(-3px); }
.more-card-img { aspect-ratio: 16/9; overflow: hidden; background: #eee; }
.more-card-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.6) brightness(0.9); transition: transform .4s; }
.more-card:hover .more-card-img img { transform: scale(1.04); }
.more-card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.more-card-cat { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.more-card-title { font-size: 16px; font-weight: 700; color: var(--black); letter-spacing: -0.3px; line-height: 1.3; flex: 1; }
.more-card-link { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 8px; display: inline-flex; align-items: center; gap: 5px; transition: color .15s, gap .18s; }
.more-card:hover .more-card-link { color: var(--black); gap: 8px; }

/* ─── CTA BAND ─── */
.cs-cta {
  background: var(--black); border-top: 1px solid #1a1a1a;
  padding: 72px var(--px); text-align: center;
}
.cs-cta h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 800; color: #fff; letter-spacing: -0.03em; margin-bottom: 12px; }
.cs-cta p { font-size: 16px; color: rgba(255,255,255,0.45); margin-bottom: 32px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .article-intro { flex-direction: column; gap: 32px; }
  .article-client { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
  .more-grid { grid-template-columns: repeat(2, 1fr); }
  .article-img-grid { grid-template-columns: 1fr; }
  .case-hero { height: 60vh; min-height: 420px; }
  .case-hero-content { padding: 0 var(--px) 48px; }
  .article-wrap { padding-top: 56px; }
  .more-cases, .cs-cta { padding: 56px var(--px); }
}
@media (max-width: 640px) {
  .more-grid { grid-template-columns: 1fr; }
  .article-stat { padding: 26px 22px; gap: 22px; }
  .article-stat-val { font-size: 28px; }
  .article-quote { padding: 24px 22px; }
  .article-quote blockquote { font-size: 16px; }
  .article-intro-text p { font-size: 16px; }
  .article-section h2 { font-size: 20px; }
  .case-hero { min-height: 380px; }
  .case-hero-sub { font-size: 16px; }
  .article-img-full { margin: 32px 0; }
  .article-stat, .article-quote { margin: 32px 0; }
}
@media (max-width: 360px) {
  .article-stat { padding: 22px 18px; gap: 18px; }
  .article-stat-val { font-size: 24px; }
  .article-stat-label { font-size: 12px; }
  .article-quote { padding: 20px 18px; }
  .case-hero-content { padding: 0 var(--px) 40px; }
}

/* ─── EMBEDDED VIDEO (YouTube 16:9) ─── */
.article-video {
  margin: 48px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a14;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 4px 32px rgba(0,0,0,0.35);
}
.article-video-inner {
  position: relative; width: 100%; padding-bottom: 56.25%;
}
.article-video iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: none; display: block;
}
@media (max-width: 600px) {
  .article-video { margin: 32px 0; border-radius: 8px; }
}
