/* ============================================================
   KDC Interiors — Case Studies
   Shared stylesheet for /case-studies/* pages.
   Design system mirrors the inline <style> block in index.html.
   ============================================================ */

:root {
  --purple: #2a2543;
  --green: #a9bb95;
  --green-deep: #3d5229;          /* accessible green for small text (matches .trust-line on the homepage) */
  --lavender: #c4b5d8;
  --lavender-light: #ede8f3;
  --lavender-mist: #f6f3f9;
  --cream: #faf9f7;
  --warm-white: #fffef9;
  --text-dark: #2a2543;
  --text-body: #4a4459;
  --text-light: #584e6a;
  --border-soft: #e8e2ef;
  --green-light: #d5e0c8;
  --green-mist: #f0f4eb;
  --focus-ring: #a9bb95;
  --nav-h: 79px;
  --roomnav-h: 57px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  color: var(--text-body);
  background: var(--warm-white);
  line-height: 1.7;
  font-weight: 400;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--purple);
  font-weight: 400;
}

img { max-width: 100%; }

/* ============================================
   ACCESSIBILITY
   ============================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--purple);
  color: #fff;
  padding: 12px 24px;
  z-index: 10000;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 0; outline: 3px solid var(--focus-ring); outline-offset: 2px; }

*:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
*:focus:not(:focus-visible) { outline: none; }

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(169, 187, 149, 0.25);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in { opacity: 1 !important; transform: none !important; }
}

/* ============================================
   NAVIGATION (copied from index.html)
   ============================================ */
nav.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 254, 249, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow 0.4s ease;
}

nav.site-nav.scrolled { box-shadow: 0 2px 20px rgba(42, 37, 67, 0.06); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo-placeholder {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--purple);
  letter-spacing: 0.5px;
  text-decoration: none;
}

.nav-links { display: flex; gap: 28px; list-style: none; }

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--green);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--purple); }
.nav-links a:hover::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--purple); }
.nav-links a[aria-current="page"]::after { width: 100%; }

.nav-phone {
  font-size: 14px;
  font-weight: 500;
  color: var(--purple);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-phone:hover { color: var(--text-light); }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--purple);
  position: absolute;
  left: 9px;
  transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) { top: 11px; }
.mobile-menu-btn span:nth-child(2) { top: 19px; }
.mobile-menu-btn span:nth-child(3) { top: 27px; }

.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42, 37, 67, 0.4);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active { opacity: 1; pointer-events: auto; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  height: 100dvh;
  background: var(--warm-white);
  z-index: 999;
  padding: 100px 32px 40px;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 20px rgba(42, 37, 67, 0.1);
  overflow-y: auto;
}

.mobile-nav.open { right: 0; }
.mobile-nav ul { list-style: none; display: flex; flex-direction: column; gap: 0; }

.mobile-nav a {
  display: block;
  padding: 16px 0;
  text-decoration: none;
  color: var(--purple);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-soft);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible { color: var(--green); padding-left: 8px; }

.mobile-nav-phone {
  display: block;
  margin-top: 32px;
  padding: 16px 24px;
  background: var(--green);
  color: var(--purple);
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 2px;
}

.mobile-nav-email {
  display: block;
  margin-top: 12px;
  text-align: center;
  color: var(--text-light);
  text-decoration: none;
  font-size: 13px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: var(--purple);
  padding: 16px 40px;
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 2px;
}

.btn-primary:hover {
  background: #bfcea9;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(169, 187, 149, 0.3);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--purple);
  padding: 14px 36px;
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--green);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
  border-radius: 2px;
}

.btn-secondary:hover { background: var(--green); color: var(--purple); transform: translateY(-2px); }

/* ============================================
   SECTIONS COMMON
   ============================================ */
section { padding: 100px 32px; }

.section-inner { max-width: 960px; margin: 0 auto; }
.section-inner.wide { max-width: 1200px; }

.section-header {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  text-align: center;
  margin-bottom: 16px;
  font-weight: 400;
  letter-spacing: -0.3px;
}

.section-divider {
  width: 50px;
  height: 2px;
  background: var(--green);
  margin: 0 auto 50px;
  border: none;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-deep);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   CASE STUDY — PAGE HEADER
   ============================================ */
.cs-header {
  padding: calc(var(--nav-h) + 72px) 32px 48px;
  background: var(--warm-white);
  text-align: center;
}

.cs-header-inner { max-width: 820px; margin: 0 auto; }

.cs-header .eyebrow { display: block; margin-bottom: 18px; }

.cs-header h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.cs-header h1 em { font-style: italic; color: #6b5f86; }

.cs-subtitle {
  font-size: 19px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text-light);
  max-width: 680px;
  margin: 0 auto;
}

.cs-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 900px;
  margin: 44px auto 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--border-soft);
  text-align: left;
}

.cs-meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 6px;
}

.cs-meta dd { font-size: 15px; line-height: 1.6; color: var(--text-light); }

/* ============================================
   CASE STUDY — HERO IMAGE
   ============================================ */
.cs-hero { padding: 0 32px 24px; }

.cs-hero-inner { max-width: 1200px; margin: 0 auto; }

.cs-hero figure {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--lavender-mist);
}

.cs-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================
   CASE STUDY — ROOM JUMP NAV
   ============================================ */
.room-nav {
  position: sticky;
  top: var(--nav-h);
  z-index: 900;
  background: rgba(255, 254, 249, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-top: 48px;
}

.room-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.room-nav-inner::-webkit-scrollbar { display: none; }

/* Centre the pills when they fit the row. Auto margins rather than
   justify-content: center on purpose: when the pills overflow on a phone,
   auto margins collapse to 0 and the row stays fully scrollable, whereas
   justify-content: center would clip the first pill out of reach. */
.room-nav-inner > .room-pill:first-child { margin-left: auto; }
.room-nav-inner > .room-pill:last-child { margin-right: auto; }

.room-pill {
  flex: 0 0 auto;
  display: inline-block;
  padding: 8px 18px;
  background: var(--lavender-mist);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.room-pill:hover { background: var(--lavender-light); color: var(--purple); }

.room-pill.is-active,
.room-pill[aria-current="true"] {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

/* ============================================
   CASE STUDY — ROOM SECTIONS
   ============================================ */
.room {
  padding: 84px 32px;
  scroll-margin-top: calc(var(--nav-h) + var(--roomnav-h));
}

.room:nth-of-type(even) { background: var(--cream); }

.room-inner { max-width: 1200px; margin: 0 auto; }

.room-head { margin-bottom: 40px; }

.room-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  color: #7d6699;
  font-weight: 300;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}

.room h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.room-head .room-rule {
  width: 50px;
  height: 2px;
  background: var(--green);
  border: none;
  margin-top: 20px;
}

.room-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin-bottom: 56px;
  max-width: 1000px;
}

.room-copy h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 12px;
}

.room-copy p { font-size: 17px; line-height: 1.85; color: var(--text-light); }

/* ============================================
   BEFORE / AFTER — SHARED BITS
   ============================================ */
.ba-tag {
  position: absolute;
  top: 12px;
  z-index: 3;
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  border-radius: 4px;
  background: rgba(255, 254, 249, 0.92);
  color: var(--purple);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

.ba-tag-before { left: 12px; }
.ba-tag-after { right: 12px; background: rgba(42, 37, 67, 0.86); color: #fff; }

.ba-caption {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  text-align: center;
}

/* ============================================
   BEFORE / AFTER — INTERACTIVE SLIDER
   ============================================ */
.ba-slider-figure { margin-bottom: 56px; }

.ba-slider {
  --pos: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 4px;
  background: var(--lavender-mist);
  touch-action: none;           /* only the slider itself — page scroll stays intact elsewhere */
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}

.ba-slider[data-aspect="2:1"] { aspect-ratio: 2 / 1; }

.ba-slider picture,
.ba-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.ba-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  transition: clip-path 0.18s ease;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 44px;
  margin-left: -22px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: left 0.18s ease;
}

.ba-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 10px rgba(42, 37, 67, 0.35);
}

.ba-knob {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 18px rgba(42, 37, 67, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--purple);
  font-size: 11px;
  line-height: 1;
}

.ba-slider.has-kb-focus .ba-knob {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(169, 187, 149, 0.25);
}

.ba-slider.is-dragging .ba-layer,
.ba-slider.is-dragging .ba-handle { transition: none; }

.ba-range {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: 50%;
  top: 50%;
}

@media (prefers-reduced-motion: reduce) {
  .ba-layer, .ba-handle { transition: none !important; }
}

/* ============================================
   BEFORE / AFTER — SIDE BY SIDE
   ============================================ */
.ba-pair {
  margin: 0 auto 56px;
}

/* Justified row: each .ba-shot carries an inline flex-grow equal to its aspect
   ratio, so every shot in the row lands at the same height with its natural
   width and the row fills the figure exactly. */
.ba-pair-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ba-shot {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: var(--lavender-mist);
  flex-basis: 0;
  min-width: 0;
}

.ba-shot img { width: 100%; height: auto; display: block; }

.ba-shot.is-before { opacity: 0.88; filter: saturate(0.85); }
.ba-shot.is-before:hover { opacity: 1; filter: none; }

.ba-pair-caption {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  text-align: center;
  margin: 14px auto 0;
  max-width: 62ch;
}

.ba-shot.is-clickable { cursor: zoom-in; }
.ba-shot.is-clickable img { transition: transform 0.4s ease; }
.ba-shot.is-clickable:hover img { transform: scale(1.03); }

/* Full-width lead photo for rooms that do not carry a before shot */
.cs-lead { margin: 0 0 56px; }
.cs-lead-shot { border-radius: 4px; overflow: hidden; background: var(--lavender-mist); cursor: zoom-in; }
.cs-lead-shot img { width: 100%; height: auto; display: block; transition: transform 0.4s ease; }
.cs-lead-shot:hover img { transform: scale(1.02); }


/* ============================================
   ROOM GALLERY (masonry, same pattern as the homepage portfolio)
   ============================================ */
/* Balanced masonry: case-studies.js distributes items into .cs-gallery-col
   columns by aspect ratio (shortest column first). Without JS the items fall
   back to a plain 3-column grid. */
.cs-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cs-gallery-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* A gallery holding a single photo centres it rather than stranding it
   in the left column. */
.cs-gallery.is-single { max-width: 760px; margin-left: auto; margin-right: auto; }

.cs-gallery-item {
  margin: 0;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
  display: block;
  background: var(--lavender-mist);
}

.cs-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.cs-gallery-item:hover img { transform: scale(1.05); }

.cs-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border-radius: 4px;
  background: rgba(255, 254, 249, 0.92);
  color: var(--purple);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ============================================
   LIGHTBOX (copied from index.html)
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 48px;
  cursor: pointer;
  padding: 16px;
  z-index: 10001;
  line-height: 1;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* ============================================
   TESTIMONIAL
   ============================================ */
.cs-testimonial { background: var(--warm-white); }

.cs-quote {
  background: var(--lavender-mist);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 64px 56px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.cs-quote blockquote p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.6;
  color: var(--purple);
  margin-bottom: 20px;
}

.cs-quote blockquote p:last-of-type { margin-bottom: 0; }

.cs-quote figcaption {
  margin-top: 32px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--green-deep);
}

.cs-quote-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem;
  line-height: 0.6;
  color: var(--lavender);
  display: block;
  margin-bottom: 18px;
}

/* ============================================
   CTA BAND
   ============================================ */
.cs-cta {
  background: var(--purple);
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

.cs-cta h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.cs-cta p { max-width: 620px; margin: 0 auto 32px; font-weight: 300; }

/* ============================================
   NEXT CASE STUDY / BACK LINK
   ============================================ */
.cs-next { background: var(--cream); }

.cs-next-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  max-width: 1000px;
  margin: 0 auto;
}

.cs-next-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.cs-next-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(42, 37, 67, 0.08);
  border-color: var(--green);
}

/* height:100% makes the image column fill the card. Without it the 4/3 box
   is shorter than the text column and leaves a white strip underneath. */
.cs-next-card-img { overflow: hidden; background: var(--lavender-mist); aspect-ratio: 4 / 3; height: 100%; }

.cs-next-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }

.cs-next-card:hover .cs-next-card-img img { transform: scale(1.05); }

.cs-next-card-body { padding: 32px; }

.cs-next-card-body .eyebrow { display: block; margin-bottom: 10px; }

.cs-next-card-body h3 { font-size: 1.6rem; line-height: 1.25; margin-bottom: 10px; }

.cs-next-card-body p { font-size: 16px; color: var(--text-light); line-height: 1.75; }

.cs-next-card-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--purple);
}

.cs-back { text-align: center; margin-top: 36px; }

/* ============================================
   FEATURED CASE STUDY CARDS (preview + future homepage)
   ============================================ */
.featured-studies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 56px;
}

.featured-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(42, 37, 67, 0.08);
  border-color: var(--green);
}

.featured-card-img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--lavender-mist); }

.featured-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }

.featured-card:hover .featured-card-img img { transform: scale(1.05); }

.featured-card-body { padding: 32px; display: flex; flex-direction: column; flex: 1; }

.featured-card-body .eyebrow { display: block; margin-bottom: 10px; }

.featured-card-body h3 { font-size: 1.65rem; line-height: 1.25; margin-bottom: 12px; }

.featured-card-body p { font-size: 16px; color: var(--text-light); line-height: 1.75; }

.featured-card-meta {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
}

.featured-card-meta .go { color: var(--purple); }

/* ============================================
   PREVIEW PAGE NOTE BAR
   ============================================ */
.preview-note {
  margin-top: var(--nav-h);
  background: var(--lavender-mist);
  border-bottom: 1px solid var(--border-soft);
  padding: 16px 32px;
  text-align: center;
}

.preview-note p {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--purple);
}

.preview-note .sub {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-light);
}

/* ============================================
   PORTFOLIO (homepage masonry, replicated on the preview page)
   ============================================ */
.portfolio { background: var(--cream); }

.portfolio-grid { columns: 3; column-gap: 16px; }

.portfolio-item {
  break-inside: avoid;
  margin-bottom: 16px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
}

.portfolio-item img { width: 100%; height: auto; display: block; transition: transform 0.4s ease; }

.portfolio-item:hover img { transform: scale(1.05); }

/* ============================================
   FOOTER (copied from index.html)
   ============================================ */
footer {
  background: var(--purple);
  color: rgba(255, 255, 255, 0.72);
  padding: 48px 32px;
  text-align: center;
}

.footer-inner { max-width: 800px; margin: 0 auto; }

.footer-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 400;
}

.footer-areas { font-size: 12px; line-height: 1.8; margin-bottom: 16px; letter-spacing: 0.5px; }

.footer-contact { margin-bottom: 16px; }

.footer-contact a {
  color: #e8eedf;
  text-decoration: none;
  font-size: 15px;
  transition: opacity 0.3s ease;
}

.footer-contact a:hover { opacity: 0.7; }
.footer-contact span { margin: 0 12px; opacity: 0.3; }

.footer-credit-link { color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.3s ease; }
.footer-credit-link:hover { color: #d5dfc8; }

.footer-copy { font-size: 11px; letter-spacing: 0.5px; color: rgba(255, 255, 255, 0.65); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .cs-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-studies { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .featured-card-body { padding: 24px; }
}

@media (max-width: 768px) {
  section { padding: 72px 24px; }

  .nav-links { display: none !important; }
  .nav-phone { display: none; }
  .mobile-menu-btn { display: block; }
  .mobile-overlay { display: block; }
  .mobile-nav { display: block; }

  .nav-inner { padding: 14px 24px; }

  .cs-header { padding: calc(var(--nav-h) + 48px) 24px 36px; }
  .cs-hero { padding: 0 24px 16px; }
  .cs-hero figure { aspect-ratio: 3 / 2; }

  .cs-meta { grid-template-columns: 1fr; gap: 20px; margin-top: 32px; }

  .room-nav { margin-top: 32px; }
  .room-nav-inner { padding: 10px 24px; }

  .room { padding: 64px 24px; }
  .room-copy { grid-template-columns: 1fr; gap: 28px; margin-bottom: 40px; }

  /* Stack each shot full width on phones: a justified row of three would
     leave every photo too small to read. */
  .ba-pair { max-width: none !important; margin-bottom: 40px; }
  .ba-pair-row { flex-direction: column; gap: 14px; }
  /* flex-basis:0 sizes the MAIN axis, which is the height once the row
     stacks -- leaving it would collapse every photo to zero height. */
  .ba-pair-row .ba-shot { flex: 0 0 auto !important; width: 100%; }
  .ba-pair-caption { text-align: left; margin-top: 12px; }
  .cs-lead { margin-bottom: 40px; }

  .cs-quote { padding: 44px 24px; }

  .cs-next-card { grid-template-columns: 1fr; }
  .cs-next-card-img { aspect-ratio: 16 / 9; height: auto; }
  .cs-next-card-body { padding: 24px; }

  .featured-studies { grid-template-columns: 1fr; }

  .preview-note { padding: 14px 24px; }

  .portfolio-grid { columns: 2; }
}

@media (max-width: 480px) {
  .cs-gallery { gap: 10px; }
  .cs-gallery-col { gap: 10px; }
  .portfolio-grid { columns: 1; }
  .room-copy p { font-size: 16px; }
  .cs-hero figure { aspect-ratio: 4 / 3; }
}
