/* ═══════════════════════════════════════════
   Shared case study styles
   Used by: case-study.html, case-study-2.html
═══════════════════════════════════════════ */

/* ── Password overlay ─────────────────────── */
#pw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-modal {
  background: white;
  border-radius: 20px;
  padding: 56px 60px;
  width: 460px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28);
}

.pw-lock {
  width: 52px;
  height: 52px;
  background: var(--c100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pw-lock svg { width: 24px; height: 24px; fill: var(--c700); display: block; }

.pw-modal h2 {
  font-family: 'Merriweather', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3;
  color: black;
}

.pw-modal p {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  color: var(--c600);
  line-height: 1.6;
}

#pw-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--c100);
  border-radius: 12px;
  font-family: 'Lato', sans-serif;
  font-size: 17px;
  color: var(--c800);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#pw-input:focus  { border-color: var(--coral); }
#pw-input.shake {
  border-color: #d9534f;
  animation: shake 0.35s ease;
}

#pw-error {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: #d9534f;
  display: none;
  margin-top: -6px;
}

.pw-btn {
  background: var(--coral);
  border: 2px solid black;
  border-radius: 30px;
  padding: 13px 30px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--c800);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  width: 100%;
  margin-top: 4px;
}
.pw-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(237,122,84,.35);
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-8px); }
  75%      { transform: translateX(8px); }
}

/* ── Reading progress bar ─────────────────── */
#cs-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--coral);
  z-index: 10000;
  transition: width 0.08s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Page content (hidden until unlocked) ─── */
#cs-content {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#cs-content.visible {
  display: block;
  opacity: 1;
}

/* ── Layout ───────────────────────────────── */
.cs-page {
  padding: 130px 60px 60px;
  background: white;
  min-height: 100vh;
}

.cs-body {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* ── Back link ────────────────────────────── */
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: black;
  padding: 8px 0;
  text-decoration: none;
  transition: opacity 0.2s;
}
.cs-back:hover { opacity: 0.5; }
.cs-back svg { width: 18px; height: 18px; fill: currentColor; display: block; }

/* ── Title ────────────────────────────────── */
.cs-title {
  font-family: 'Merriweather', serif;
  font-size: 60px;
  font-weight: 400;
  line-height: 1.2;
  color: black;
  letter-spacing: -1.5px;
}

/* ── Meta chips ───────────────────────────── */
.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -32px;
}
.cs-meta-chip {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c600);
  background: var(--c100);
  border-radius: 30px;
  padding: 6px 14px;
}

/* ── Section block ────────────────────────── */
.cs-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cs-section-title {
  font-family: 'Merriweather', serif;
  font-size: 32px;
  font-weight: 400;
  color: black;
  line-height: 1;
}

/* ── Body text ────────────────────────────── */
.cs-text {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
  color: black;
}

.cs-text-italic {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: 18px;
  line-height: 32px;
  color: black;
}

/* ── Tag pills ────────────────────────────── */
.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cs-tag {
  background: #ededed;
  border-radius: 40px;
  padding: 10px 20px;
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  color: black;
  white-space: nowrap;
}

/* Tag pill with × prefix */
.cs-tag-x {
  background: #ededed;
  border-radius: 40px;
  padding: 10px 20px;
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  color: black;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cs-tag-x::before {
  content: '✕';
  font-size: 13px;
  opacity: 0.6;
}

/* ── Image block ──────────────────────────── */
.cs-img {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
}
.cs-img img {
  width: 100%;
  height: auto;
  display: block;
  /* 2x images — cap at 1x display width so they stay crisp */
  max-width: 800px;
}

/* ── Bullet list ──────────────────────────── */
.cs-list {
  list-style: disc;
  padding-left: 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-list li {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  line-height: 32px;
  color: black;
}

/* ── Italic bullet list ───────────────────── */
.cs-italic-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-italic-list p {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: 18px;
  line-height: 32px;
  color: black;
}

/* ── Callout — grey ───────────────────────── */
.cs-callout {
  background: var(--c50);
  padding: 24px;
  border-radius: 4px;
}
.cs-callout ul {
  list-style: disc;
  padding-left: 26px;
}
.cs-callout ul li {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  line-height: 40px;
  color: black;
}

/* ── Callout — quote with coral left accent ─ */
.cs-quote {
  background: var(--c50);
  border-left: 4px solid var(--coral);
  padding: 28px 32px;
}
.cs-quote p {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: 18px;
  line-height: 32px;
  color: black;
}

/* ── Callout — large quote ────────────────── */
.cs-quote-lg {
  background: var(--c50);
  border-left: 4px solid var(--coral);
  padding: 36px 32px;
}
.cs-quote-lg p {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: 22px;
  line-height: 38px;
  color: black;
}

/* ── Callout — Vs comparison ──────────────── */
.cs-callout-vs {
  background: var(--c50);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.cs-callout-vs p {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: 18px;
  line-height: 32px;
  color: black;
}
.vs-divider {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: 18px;
  color: black;
  opacity: 0.4;
}

/* ── Callout — coral border ───────────────── */
.cs-callout-coral {
  border: 1.5px solid var(--coral);
  border-radius: 10px;
  padding: 24px;
}
.cs-callout-coral ul {
  list-style: disc;
  padding-left: 26px;
}
.cs-callout-coral ul li {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  line-height: 40px;
  color: var(--c800);
}

/* ── 2-col grid ───────────────────────────── */
.cs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.cs-grid-item { display: flex; flex-direction: column; gap: 8px; }
.cs-grid-title {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: 18px;
  line-height: 32px;
  color: black;
}
.cs-grid-body {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  line-height: 32px;
  color: black;
}

/* ── Divider ──────────────────────────────── */
.cs-divider {
  height: 1.5px;
  background: #ededed;
  width: 100%;
}

/* ── Explore / next case study cards ─────── */
.cs-next-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cs-next-card {
  background: #fcdbcc;
  border-radius: 20px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 360px;
}

.cs-next-card-title {
  font-family: 'Merriweather', serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 36px;
  color: var(--c800);
}

.cs-next-card-desc {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  line-height: 28px;
  color: var(--c800);
  margin-top: 8px;
}

.cs-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid black;
  border-radius: 30px;
  padding: 10px 28px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--c800);
  text-decoration: none;
  transition: opacity 0.15s;
  align-self: flex-start;
  white-space: nowrap;
}
.cs-next-btn:hover { opacity: 0.75; }
.cs-next-btn svg { width: 16px; height: 16px; fill: currentColor; display: block; }

.cs-next-card--dim {
  opacity: 0.45;
  pointer-events: none;
}

.cs-coming-soon {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c600);
}

/* ── Scroll reveal ────────────────────────── */
.cs-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.cs-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {
  .cs-page  { padding: 100px 32px 48px; }
  .cs-title { font-size: 42px; }
  .cs-body  { gap: 48px; }
}

@media (max-width: 480px) {
  .cs-page      { padding: 90px 20px 40px; }
  .cs-title     { font-size: 32px; }
  .cs-grid      { grid-template-columns: 1fr; }
  .cs-next-grid { grid-template-columns: 1fr; }
  .cs-tags      { flex-wrap: wrap; }
}
