/* === Kippis — Reference & Case Study pages === */

/* ---------- Reference index page ---------- */
.ref-hero {
  padding: 140px 0 24px;
  position: relative;
  /* overflow visible — accent glow continues into next section */
}
.ref-hero .container { position: relative; z-index: 2; }
.ref-hero-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: end;
}
.ref-hero-head.ref-hero-head-slim {
  display: block;
}
.ref-hero h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--cocoa);
}
.ref-hero h1 em {
  font-style: italic;
  font-family: var(--body);
  font-weight: 500;
  color: var(--gold-dark);
}
.ref-hero .ref-lede {
  font-size: 18px;
  color: var(--espresso);
  max-width: 44ch;
  padding-bottom: 8px;
}
@media (max-width: 880px) {
  .ref-hero-head { grid-template-columns: 1fr; gap: 24px; }
}

/* Filter bar */
.ref-filters {
  margin: 36px 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.ref-filter {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--rule-strong);
  background: transparent;
  color: var(--cocoa);
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ref-filter .count {
  font-size: 11px;
  color: var(--muted);
  background: rgba(42,30,24,0.06);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.ref-filter:hover { border-color: var(--cocoa); }
.ref-filter.is-active {
  background: var(--cocoa);
  color: var(--cream);
  border-color: var(--cocoa);
}
.ref-filter.is-active .count {
  background: rgba(255,255,255,0.15);
  color: var(--cream);
}

/* Grid */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding-bottom: 100px;
}
@media (max-width: 880px) {
  .ref-grid { grid-template-columns: 1fr; gap: 24px; }
}

.ref-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-decoration: none;
  color: inherit;
  group: card;
}
.ref-card[data-hidden="true"] { display: none; }

.ref-card-frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--cream);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--rule);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s, border-color .4s;
}
.ref-card:hover .ref-card-frame {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* Collage layout (two slanted screenshots side-by-side, each shows top crop) */
.ref-collage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 100%, rgba(0,191,158,0.12), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(240,184,64,0.16), transparent 55%);
}
.ref-collage .shot {
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 22px 48px -18px rgba(42,30,24,0.45), 0 0 0 1px var(--rule);
  position: relative;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.ref-collage .shot::after {
  /* fade on bottom edge so the cut isn't a hard line */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 32%;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 100%);
  pointer-events: none;
}
.ref-collage .shot img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  display: block;
}
/* per-shot vertical offsets (negative top % shifts image up to reveal lower section) */
.ref-collage .shot[data-offset="0"]   img { top: 0; }
.ref-collage .shot[data-offset="-15"] img { top: -15%; }
.ref-collage .shot[data-offset="-30"] img { top: -30%; }
.ref-collage .shot[data-offset="-45"] img { top: -45%; }
.ref-collage .shot[data-offset="-60"] img { top: -60%; }

/* shots fill the cell height */
.ref-collage .shot {
  align-self: stretch;
  height: 100%;
}
.ref-collage .shot.shot-a {
  transform: rotate(-1.5deg) translateY(-4px);
  z-index: 2;
}
.ref-collage .shot.shot-b {
  transform: rotate(1.5deg) translateY(4px);
  z-index: 1;
}
.ref-card:hover .ref-collage .shot.shot-a {
  transform: rotate(-2.6deg) translateY(-8px);
}
.ref-card:hover .ref-collage .shot.shot-b {
  transform: rotate(2.6deg) translateY(8px);
}

/* Single screenshot card */
.ref-single {
  position: absolute;
  inset: 0;
  padding: 28px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}
.ref-single .browser {
  width: 100%;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: white;
  box-shadow: 0 22px 50px -18px rgba(42,30,24,0.4), 0 0 0 1px var(--rule);
}
.ref-single .browser-bar {
  height: 22px;
  background: var(--paper);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border-bottom: 1px solid var(--rule);
}
.ref-single .browser-bar i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--clay);
  opacity: 0.4;
}
.ref-single .browser img {
  width: 100%;
  display: block;
}

/* Card meta */
.ref-card-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ref-card-title {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--cocoa);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.ref-card-title .arrow {
  font-size: 22px;
  color: var(--muted);
  transition: transform .25s, color .25s;
}
.ref-card:hover .ref-card-title .arrow {
  transform: translateX(6px);
  color: var(--cocoa);
}
.ref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ref-tag {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgba(42,30,24,0.06);
  color: var(--espresso);
}
.ref-tag.tag-marketing {
  background: rgba(0, 191, 158, 0.12);
  color: var(--accent-dark);
}
.ref-tag.tag-web {
  background: rgba(240, 184, 64, 0.18);
  color: var(--gold-dark);
}

/* Brand CTA — sdílené (reference + case study) — gradient teal→gold z homepage */
.brand-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, #6BCEA0 45%, var(--gold) 100%);
  border-radius: var(--r-xl);
  padding: 72px 64px;
  display: grid;
  grid-template-columns: 1.3fr auto;
  gap: 40px;
  align-items: center;
  margin: 80px 0 100px;
  color: var(--cocoa);
  isolation: isolate;
}
.brand-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.35), transparent 55%),
    radial-gradient(circle at 12% 90%, rgba(42,30,24,0.10), transparent 55%);
  pointer-events: none;
  z-index: -1;
}
.brand-cta h2 {
  font-size: clamp(32px, 4.2vw, 54px);
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--cocoa);
  font-weight: 800;
}
.brand-cta h2 em {
  font-style: italic;
  font-family: var(--body);
  font-weight: 500;
}
.brand-cta p {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--cocoa);
  opacity: 0.82;
  max-width: 48ch;
}
.brand-cta .cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.brand-cta .btn-cta-primary {
  background: var(--cocoa);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 600;
  padding: 16px 28px;
  border-radius: var(--r-pill);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.brand-cta .btn-cta-primary:hover {
  background: #3b2a22;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(42,30,24,0.45);
}
.brand-cta .btn-cta-secondary {
  background: rgba(255,255,255,0.92);
  color: var(--cocoa);
  font-family: var(--sans);
  font-weight: 600;
  padding: 16px 28px;
  border-radius: var(--r-pill);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.brand-cta .btn-cta-secondary:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(42,30,24,0.35);
}
@media (max-width: 880px) {
  .brand-cta { grid-template-columns: 1fr; padding: 48px 32px; gap: 28px; }
  .brand-cta .cta-actions { justify-content: flex-start; }
}

/* ---------- Case Study common ---------- */
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
  transition: color .2s;
}
.cs-back:hover { color: var(--cocoa); }
.cs-back .arr { transition: transform .25s; }
.cs-back:hover .arr { transform: translateX(-4px); }

.cs-hero {
  padding: 160px 0 60px;
  position: relative;
  /* overflow visible — green/gold glow extends into next section */
}

.cs-hero-head {
  max-width: 880px;
  margin-bottom: 56px;
}
.cs-hero-head .ref-tags { margin-bottom: 24px; }
.cs-hero-head h1 {
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.cs-hero-head h1 em {
  font-style: italic;
  font-family: var(--body);
  font-weight: 500;
  color: var(--gold-dark);
}
.cs-hero-head .cs-claim {
  margin-top: 24px;
  font-size: 20px;
  color: var(--espresso);
  max-width: 60ch;
}

.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
  margin-top: 48px;
}
.cs-meta.cs-meta-2 {
  grid-template-columns: repeat(2, max-content);
  gap: 64px;
  justify-content: start;
}
.cs-meta.cs-meta-3 {
  grid-template-columns: repeat(3, max-content);
  gap: 64px;
  justify-content: start;
  align-items: start;
}
.cs-meta dd a.cs-meta-link {
  color: var(--accent-dark);
  border-bottom: 1px solid rgba(0,155,128,0.35);
  transition: color .2s, border-color .2s;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: inline-block;
  max-width: 100%;
}
.cs-meta dd a.cs-meta-link:hover {
  color: var(--cocoa);
  border-bottom-color: var(--cocoa);
}
@media (max-width: 1024px) {
  .cs-meta.cs-meta-3 {
    grid-template-columns: minmax(0, auto) minmax(0, auto) minmax(0, 1fr);
    gap: 32px;
  }
  .cs-meta.cs-meta-3 > div:last-child { min-width: 0; }
  .cs-meta dd { word-break: break-word; overflow-wrap: anywhere; }
}
@media (max-width: 720px) {
  .cs-meta.cs-meta-3 { grid-template-columns: 1fr; gap: 20px; }
}
.cs-meta dt {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.cs-meta dd {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--cocoa);
}
@media (max-width: 720px) {
  .cs-meta { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* Section */
.cs-section { padding: 80px 0; }
.cs-section-title {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 32px;
  max-width: 24ch;
}
.cs-section-title em {
  font-style: italic;
  font-family: var(--body);
  font-weight: 500;
  color: var(--gold-dark);
}

/* Long text block */
.cs-prose {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}
.cs-prose .cs-kicker { padding-top: 8px; }
.cs-prose-body p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--espresso);
  margin-bottom: 22px;
}
.cs-prose-body p:first-child {
  font-size: 22px;
  font-weight: 500;
  color: var(--cocoa);
}
@media (max-width: 880px) {
  .cs-prose { grid-template-columns: 1fr; gap: 24px; }
}

/* Big web screenshot stack */
.cs-shot {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px -28px rgba(42,30,24,0.35), 0 0 0 1px var(--rule);
  margin-bottom: 32px;
  background: white;
}
.cs-shot img { width: 100%; display: block; }

/* Clipped variant — never shows the full long screenshot, only the top viewport area */
.cs-shot.cs-shot-clip {
  position: relative;
  max-height: 720px;
  overflow: hidden;
}
.cs-shot.cs-shot-clip img {
  display: block;
  width: 100%;
  height: auto;
}
.cs-shot.cs-shot-clip::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(255,251,242,0) 0%, var(--paper) 95%);
  pointer-events: none;
}

/* Hero CTA button row inside hero column */
.cs-hero-cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cs-shot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) {
  .cs-shot-grid { grid-template-columns: 1fr; }
}

/* CTA bottom */
.cs-cta {
  background: var(--cocoa);
  color: var(--cream);
  border-radius: var(--r-xl);
  padding: 80px 56px;
  text-align: center;
  margin: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.cs-cta::before {
  content: '';
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,184,64,0.18), transparent 70%);
  top: -200px; right: -120px;
  pointer-events: none;
}
.cs-cta h2 {
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--cream);
  position: relative;
}
.cs-cta h2 em {
  font-style: italic;
  font-family: var(--body);
  font-weight: 500;
  color: var(--gold);
}
.cs-cta p {
  margin: 16px auto 0;
  max-width: 56ch;
  color: rgba(250,242,226,0.7);
  font-size: 18px;
  position: relative;
}
.cs-cta .cta-actions {
  margin-top: 32px;
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
}

/* ---------- Marketing case study: hero with diagram ---------- */
.cs-hero-marketing {
  padding: 160px 0 80px;
  position: relative;
  /* overflow visible — green/gold glow extends into next section */
}
.cs-hero-marketing-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
}
.cs-hero-marketing-grid .cs-claim { margin-top: 24px; max-width: 48ch; }
@media (max-width: 1024px) {
  .cs-hero-marketing-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* Diagram switcher (used on ista marketing page to preview 3 concepts) */
.diagram-switcher {
  display: flex;
  gap: 6px;
  background: rgba(42,30,24,0.05);
  padding: 5px;
  border-radius: var(--r-pill);
  margin-bottom: 20px;
  width: fit-content;
}
.diagram-switcher button {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 0;
  background: transparent;
  color: var(--espresso);
  cursor: pointer;
  transition: all .2s;
}
.diagram-switcher button.is-active {
  background: var(--cocoa);
  color: var(--cream);
}

.diagram-stage {
  position: relative;
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--rule);
  padding: 32px;
  box-shadow: var(--shadow-md);
  aspect-ratio: 1 / 1;
  max-width: 600px;
  margin: 0 auto;
}
.diagram-stage.diagram-stage-static {
  aspect-ratio: 760 / 600;
  max-width: 720px;
}
.diagram-stage > .diagram { display: none; width: 100%; height: 100%; }
.diagram-stage > .diagram.is-active { display: block; }

.diagram-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--espresso);
  justify-content: center;
}
.diagram-legend .lg-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.diagram-legend .dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot.dot-active { background: var(--accent); box-shadow: 0 0 0 3px rgba(0,191,158,0.18); }
.dot.dot-inactive { background: var(--rule-strong); }
.dot.dot-marketing { background: var(--accent); }
.dot.dot-obchod { background: var(--gold); }

/* Diagram concept gallery (3 side-by-side preview, used on /diagrams page or section) */
.diag-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) {
  .diag-gallery { grid-template-columns: 1fr; }
}
.diag-card {
  background: white;
  border-radius: var(--r-lg);
  border: 1px solid var(--rule);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .35s, box-shadow .35s;
}
.diag-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.diag-card .diag-tag {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.diag-card h3 {
  font-size: 22px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.diag-card p {
  font-size: 14px;
  color: var(--espresso);
  line-height: 1.55;
}
.diag-card .diag-canvas {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: var(--cream);
  border-radius: var(--r-md);
  padding: 18px;
}
.diag-card .diag-canvas svg { width: 100%; height: 100%; display: block; }

/* ---------- Parallax homepage screenshot ---------- */
.cs-parallax-frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: white;
  box-shadow: 0 30px 80px -28px rgba(42,30,24,0.4), 0 0 0 1px var(--rule);
  height: min(82vh, 760px);
  outline: 0 solid rgba(0,191,158,0);
  transition: outline .25s ease, box-shadow .25s ease;
}
.cs-parallax-frame.is-engaged {
  outline: 3px solid rgba(0,191,158,0.35);
  box-shadow: 0 36px 90px -28px rgba(42,30,24,0.5), 0 0 0 1px var(--rule);
}
.cs-parallax-scroller {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(42,30,24,0.35) transparent;
}
.cs-parallax-scroller::-webkit-scrollbar { width: 8px; }
.cs-parallax-scroller::-webkit-scrollbar-thumb {
  background: rgba(42,30,24,0.3);
  border-radius: 999px;
}
.cs-parallax-scroller::-webkit-scrollbar-track { background: transparent; }
.cs-parallax-scroller img {
  width: 100%;
  height: auto;
  display: block;
}
.cs-parallax-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: rgba(42,30,24,0.88);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity .25s ease;
}
.cs-parallax-hint .hint-icon {
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  animation: hintBob 1.6s ease-in-out infinite;
}
.cs-parallax-frame.is-engaged .cs-parallax-hint { opacity: 0; }
@keyframes hintBob {
  0%, 100% { transform: translateY(-2px); }
  50%      { transform: translateY(2px); }
}

/* ---------- Client testimonial placeholder ---------- */
.cs-testimonial {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  padding: 64px 72px 56px;
  max-width: 920px;
  margin: 0 auto;
  overflow: hidden;
}
.cs-testimonial::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(240,184,64,0.10), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(0,191,158,0.08), transparent 50%);
  pointer-events: none;
}
.cs-testimonial-mark {
  position: absolute;
  top: 18px; left: 36px;
  font-family: var(--body);
  font-size: 140px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.22;
  font-weight: 700;
  pointer-events: none;
}
.cs-testimonial blockquote {
  position: relative;
  margin: 0 0 36px;
  font-family: var(--sans);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--cocoa);
  font-weight: 500;
}
.cs-testimonial-author {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cs-testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
  flex-shrink: 0;
  box-shadow: 0 8px 20px -8px rgba(42,30,24,0.4);
}
.cs-testimonial-name {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--cocoa);
  font-size: 16px;
}
.cs-testimonial-role {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.cs-testimonial-placeholder {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}
.cs-testimonial + .cs-testimonial { margin-top: 28px; }
.cs-testimonial-stack { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.cs-testimonial-stack .cs-testimonial { margin: 0; }
@media (max-width: 720px) {
  .cs-testimonial { padding: 44px 28px 36px; }
  .cs-testimonial-mark { font-size: 96px; left: 18px; top: 8px; }
  .cs-testimonial + .cs-testimonial { margin-top: 20px; }
  .cs-testimonial-stack { gap: 20px; }
}

/* ---------- Footer matches main site ---------- */
.footer {
  background: var(--cocoa);
  color: var(--cream);
  padding: 80px 0 32px;
  margin-top: 0;
}
.footer-grid {
  display: flex;
  align-items: flex-start;
  gap: 80px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand {
  flex: 0 1 360px;
  margin-right: auto;
}
.footer-grid > div:not(.footer-brand) {
  text-align: right;
  flex: 0 0 auto;
}
.footer-grid > div:not(.footer-brand) ul { align-items: flex-end; }
.footer-brand img { height: 32px; margin-bottom: 18px; }
.footer-brand p { color: rgba(250,242,226,0.65); font-size: 14px; max-width: 36ch; }
.footer h5 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: rgba(250,242,226,0.75); font-size: 14px; transition: color .2s; }
.footer ul a:hover { color: var(--cream); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(250,242,226,0.5);
  font-family: var(--sans);
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* =====================================================================
   === Reference + case study — responsive V2                       ===
   ===================================================================== */

/* --- Reference hero --- */
@media (max-width: 720px) {
  .ref-hero { padding: 110px 0 16px; }
  .ref-hero h1 { font-size: clamp(34px, 10vw, 52px); line-height: 1.04; }
  .ref-filters { margin: 24px 0 28px; gap: 8px; }
  .ref-filter { padding: 9px 14px; font-size: 13px; }
  .ref-filter .count { font-size: 10px; padding: 2px 7px; }
}

/* --- Reference grid --- */
@media (max-width: 720px) {
  .ref-grid { gap: 28px; padding-bottom: 64px; }
  .ref-card-frame { aspect-ratio: 5 / 4; border-radius: 18px; }
  .ref-collage { padding: 16px; gap: 10px; }
  .ref-card-title { font-size: 22px; }
  .ref-card-title .arrow { font-size: 19px; }
}

/* --- Brand CTA --- */
@media (max-width: 720px) {
  .brand-cta {
    padding: 40px 26px;
    gap: 22px;
    margin: 56px 0 80px;
    border-radius: 26px;
  }
  .brand-cta p { font-size: 16px; margin-top: 12px; }
  .brand-cta .btn-cta-primary,
  .brand-cta .btn-cta-secondary { padding: 14px 22px; font-size: 15px; }
}
@media (max-width: 480px) {
  .brand-cta .cta-actions { flex-direction: column; align-items: stretch; }
  .brand-cta .cta-actions a { justify-content: center; }
}

/* --- CS hero --- */
@media (max-width: 1024px) {
  .cs-hero { padding: 140px 0 48px; }
  .cs-hero-marketing { padding: 140px 0 56px; }
}
@media (max-width: 720px) {
  .cs-hero { padding: 120px 0 32px; }
  .cs-hero-marketing { padding: 120px 0 32px; }
  .cs-back { margin-bottom: 18px; font-size: 13px; }
  .cs-hero-head { margin-bottom: 36px; }
  .cs-hero-head h1 { font-size: clamp(34px, 10vw, 52px); line-height: 1.02; }
  .cs-hero-head .cs-claim { font-size: 17px; margin-top: 18px; }
  .cs-meta { padding: 22px 0; margin-top: 32px; gap: 18px; }
  .cs-meta dt { font-size: 10px; margin-bottom: 6px; }
  .cs-meta dd { font-size: 15px; }
}
@media (max-width: 480px) {
  .cs-meta.cs-meta-2,
  .cs-meta.cs-meta-3 { grid-template-columns: 1fr; gap: 16px; }
}

/* --- CS section --- */
@media (max-width: 1024px) {
  .cs-section { padding: 64px 0; }
}
@media (max-width: 480px) {
  .cs-section { padding: 48px 0; }
  .cs-section-title { font-size: clamp(28px, 8vw, 42px); margin-bottom: 22px; }
}

/* --- CS prose --- */
@media (max-width: 720px) {
  .cs-prose-body p { font-size: 17px; line-height: 1.6; margin-bottom: 18px; }
  .cs-prose-body p:first-child { font-size: 18px; }
}

/* --- CS parallax --- */
@media (max-width: 1024px) {
  .cs-parallax-frame { height: min(70vh, 580px); border-radius: 18px; }
}
@media (max-width: 720px) {
  .cs-parallax-frame { height: 480px; }
  .cs-parallax-hint { font-size: 11px; padding: 7px 12px; right: 10px; bottom: 10px; }
}
@media (max-width: 480px) {
  .cs-parallax-frame { height: 380px; }
}

/* --- Testimonial --- */
@media (max-width: 480px) {
  .cs-testimonial { padding: 36px 22px 28px; border-radius: 26px; }
  .cs-testimonial-mark { font-size: 76px; left: 14px; top: 4px; }
  .cs-testimonial blockquote { font-size: clamp(16px, 4.5vw, 19px) !important; margin-bottom: 24px; }
  .cs-testimonial-avatar { width: 44px; height: 44px; }
  .cs-testimonial-name { font-size: 15px; }
  .cs-testimonial-role { font-size: 12px; }
}

/* --- CS CTA --- */
@media (max-width: 720px) {
  .cs-cta { padding: 56px 28px; margin: 56px 0 64px; border-radius: 26px; }
  .cs-cta h2 { font-size: clamp(28px, 8vw, 42px); }
  .cs-cta p { font-size: 16px; }
}
@media (max-width: 480px) {
  .cs-cta .cta-actions { flex-direction: column; align-items: stretch; width: 100%; display: flex; }
  .cs-cta .cta-actions .btn { justify-content: center; }
}

/* --- Footer in reference.css override --- */
@media (max-width: 880px) {
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }
  .footer-grid > div:not(.footer-brand) { text-align: left; }
  .footer-grid > div:not(.footer-brand) ul { align-items: flex-start; }
  .footer-brand { grid-column: 1 / -1; flex: none; margin-right: 0; }
  .footer-brand p { max-width: 48ch; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* --- Reference invite card adapts --- */
@media (max-width: 720px) {
  .ref-card-invite { min-height: 320px; border-radius: 26px; }
}
