/* ======================================================================
   Case Studies (overview.html)
   - Mobile-first, no horizontal overflow
   - Simple grid: text (left) • media (right) on ≥768px
   - Three themed variants: AlterEco / Rook / Blendr
   ----------------------------------------------------------------------
   Structure expected by overview.html:
     <section class="cs cs--altereco|cs--rook|cs--blendr">
       <div class="cs__inner">
         <div class="cs__text">…</div>
         <div class="cs__media">…</div>
       </div>
     </section>
   ====================================================================== */

/* 0) Base guards — prevent any horizontal scroll on small screens */
html,
body {
  overflow-x: hidden; /* fixes the mobile bleed on overview.html */
  margin: 0;
}

/* Opt-in box sizing and fluid imagery */
*,
*::before,
*::after {
  box-sizing: border-box;
}
img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 1) Local nav above the case studies (sticky mini-nav) */
.local-nav {
  position: sticky;
  top: 0;
  background: #0f0f0f;
  color: #eaeaea;
  border-bottom: 1px solid #222;
  z-index: 10;
}
.local-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.local-nav a {
  color: #eaeaea;
  text-decoration: none;
  opacity: 0.8;
}
.local-nav a:hover,
.local-nav a:focus-visible {
  opacity: 1;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* 2) Section wrapper */
.cs {
  padding: 72px 0;
}
.cs__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 32px;
  padding: 0 20px;
  grid-template-columns: 1fr; /* mobile: single column */
}
@media (min-width: 768px) {
  .cs__inner {
    grid-template-columns: minmax(320px, 520px) 1fr; /* text/media */
    align-items: center;
  }
}

/* 3) Text column */
.cs__text h2 {
  margin: 0 0 12px;
}
.cs__summary {
  margin: 0 0 20px;
  max-width: 60ch;
}
.cs__cta {
  display: inline-block;
  text-decoration: none;
  background: #fff;
  color: #111;
  border: 1px solid #ccc;
  border-radius: 9999px;
  padding: 12px 20px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.cs__cta:hover {
  transform: translateY(-1px);
}
.cs__cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* 4) Media column (carousel or placeholders) */
.cs__media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Generic image placeholder (used for projects without assets yet) */
.img-box {
  background: #fff;
  border: 2px dashed #d6d6d6;
  height: 280px;
  border-radius: 12px;
  position: relative;
}
@media (min-width: 992px) {
  .img-box {
    height: 360px;
  }
}
.img-box::after {
  content: "Image Placeholder — replace in code";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #888;
  font-size: 0.9rem;
  text-align: center;
  padding: 0 6px;
}

/* 5) Minimal carousel wrapper used by AlterEco card */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
  display: grid;
  place-items: center;
}
.carousel__img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
}
.carousel__btn:hover,
.carousel__btn:focus-visible {
  background: rgba(0, 0, 0, 0.6);
}
.carousel__btn.prev {
  left: 10px;
}
.carousel__btn.next {
  right: 10px;
}

/* 6) Theme variants
   Keep colors legible & consistent with the project branding
   --------------------------------------------------------- */

/* 6a) AlterEco — soft greens, editorial serif head */
.cs--altereco {
  --ink: #1c1c1c;
  --paper: #e7eadb;
  --accent: #5a764c; /* sage */
  --cta: #ffffff;
  --frame: #cfd6c3;
  background: var(--paper);
  color: var(--ink);
}
.cs--altereco .cs__text {
  font-family: "Source Sans 3", ui-sans-serif, system-ui;
}
.cs--altereco h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.cs--altereco .cs__summary {
  color: #36433b;
}
.cs--altereco .cs__cta {
  background: var(--cta);
  color: #20462f;
  border-color: #d7dbc9;
}
.cs--altereco .img-box {
  border-color: var(--frame);
}

/* 6b) Rook Lift — classic academic vibe */
.cs--rook {
  --ink: #f3efe6;
  --paper: #5c5a6e;
  background: var(--paper);
  color: var(--ink);
}
.cs--rook .cs__text {
  font-family: "Inter", ui-sans-serif;
}
.cs--rook h2 {
  font-family: "EB Garamond", Garamond, serif;
  font-variant: small-caps;
  font-size: 1.9rem;
  letter-spacing: 0.03em;
}
.cs--rook .cs__summary {
  color: #efe9de;
}
.cs--rook .cs__cta {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.cs--rook .cs__cta:hover {
  background: #fff;
  color: #333;
}
.cs--rook .img-box {
  border-color: #d4cfca;
  background: #fff;
}

/* 6c) Blendr Add-on — cool, technical */
.cs--blendr {
  --ink: #e9ecef;
  --paper: #383838;
  background: var(--paper);
  color: var(--ink);
}
.cs--blendr .cs__text {
  font-family: "Inter", ui-sans-serif;
}
.cs--blendr h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.cs--blendr .cs__summary {
  color: #cfd3d7;
}
.cs--blendr .cs__cta {
  background: #e9ecef;
  color: #111;
  border-color: #e9ecef;
}
.cs--blendr .img-box {
  border-color: #b5b5b5;
}

/* 7) Small motion niceties (respects reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  .cs__cta {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
}
