/* Case Study Page + Index - loaded only on case study pages */
.cs-hero {
  padding: 10rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.cs-back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  letter-spacing: 0.03em;
}
.cs-back:hover { color: var(--accent); }

.cs-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.cs-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.cs-meta {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cs-meta-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cs-meta-value {
  font-size: 1rem;
  color: var(--text);
}

.cs-meta-value a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}
.cs-meta-value a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.cs-screenshot {
  padding: 4rem 0;
}

.cs-screenshot-frame {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--border);
}

.cs-screenshot-frame img {
  width: 100%;
  display: block;
}

.cs-screenshot-frame .frame-corner {
  position: absolute;
  width: 24px;
  height: 24px;
}

.cs-screenshot-frame .frame-tl { top: -8px; left: -8px; border-top: 3px solid var(--accent); border-left: 3px solid var(--accent); }
.cs-screenshot-frame .frame-tr { top: -8px; right: -8px; border-top: 3px solid var(--accent); border-right: 3px solid var(--accent); }
.cs-screenshot-frame .frame-bl { bottom: -8px; left: -8px; border-bottom: 3px solid var(--accent); border-left: 3px solid var(--accent); }
.cs-screenshot-frame .frame-br { bottom: -8px; right: -8px; border-bottom: 3px solid var(--accent); border-right: 3px solid var(--accent); }

.cs-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.cs-section-dark {
  background: var(--bg-card);
}

.cs-content {
  max-width: 750px;
  margin: 0 auto;
}

.cs-heading {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
}

.cs-content p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.cs-findings {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.cs-finding {
  padding: 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.cs-finding h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cs-finding p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.cs-finding-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

.cs-blocker { background: rgba(180, 40, 40, 0.15); color: #e05555; border: 1px solid rgba(180, 40, 40, 0.3); }
.cs-critical { background: rgba(220, 70, 40, 0.15); color: #e87040; border: 1px solid rgba(220, 70, 40, 0.3); }
.cs-high { background: rgba(224, 122, 58, 0.15); color: var(--accent); border: 1px solid rgba(224, 122, 58, 0.3); }
.cs-medium { background: rgba(70, 130, 220, 0.15); color: #6aa0e0; border: 1px solid rgba(70, 130, 220, 0.3); }

.cs-deliverable-list {
  margin: 1.5rem 0;
}

.cs-deliverable-list li {
  font-size: 1rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

.cs-deliverable-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.cs-quote-block {
  padding: 2.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  margin-bottom: 2rem;
}

.cs-quote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin: 1rem 0 1.5rem;
}

.cs-cta-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.cs-cta-block {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cs-cta-block p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.cs-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cs-index {
  padding: 4rem 0;
}

.cs-index-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.cs-index-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.4s var(--ease);
  position: relative;
}

.cs-index-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 16px; height: 16px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  z-index: 1;
  transition: all 0.4s var(--ease);
}

.cs-index-card::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 16px; height: 16px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transition: all 0.4s var(--ease);
}

.cs-index-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cs-index-card:hover::before,
.cs-index-card:hover::after {
  width: 22px;
  height: 22px;
}

.cs-index-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.cs-index-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

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

.cs-index-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cs-index-tags {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cs-index-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.cs-index-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.cs-index-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.cs-index-meta {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.cs-index-read {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-top: auto;
  transition: transform 0.3s var(--ease);
  display: inline-block;
}

.cs-index-card:hover .cs-index-read {
  transform: translateX(4px);
}

.cs-index-more {
  text-align: center;
  padding: 3rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.cs-index-more p {
  font-size: 1rem;
  color: var(--text-dim);
}

.cs-fixed-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.cs-fixed-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.cs-fixed-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 50%;
  margin-top: 2px;
}

.cs-fixed-item h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.cs-fixed-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .cs-title { font-size: 2.5rem; }
  .cs-meta { gap: 1.5rem; }
  .cs-heading { font-size: 1.75rem; }
  .cs-hero { padding: 8rem 0 3rem; }
  .cs-index-card { grid-template-columns: 1fr; }
  .cs-index-thumb { aspect-ratio: 16 / 9; }
  .cs-index-meta { flex-direction: column; gap: 0.25rem; }
  .cs-section { padding: 3.5rem 0; }
  .cs-finding { padding: 1.25rem; }
  .cs-finding h3 { font-size: 1.05rem; }
  .cs-finding p { font-size: 0.9rem; }
  .cs-quote { font-size: 1.1rem; }
  .cs-quote-block { padding: 1.5rem; }
  .cs-cta-section { padding: 4rem 0; }
  .cs-cta-buttons { flex-direction: column; }
  .cs-cta-buttons .btn { text-align: center; }
  .cs-screenshot { padding: 2rem 0; }
  .cs-fixed-item { padding: 1rem; }
  .cs-fixed-item h4 { font-size: 0.95rem; }
  .cs-fixed-item p { font-size: 0.85rem; }
  .cs-fixed-check { width: 24px; height: 24px; font-size: 0.75rem; }
  .cs-index { padding: 2rem 0; }
  .cs-index-body { padding: 1.25rem; }
  .cs-index-title { font-size: 1.25rem; }
  .cs-index-desc { font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .cs-title { font-size: 2rem; }
  .cs-subtitle { font-size: 1rem; }
  .cs-heading { font-size: 1.5rem; }
  .cs-meta {
    flex-direction: column;
    gap: 1rem;
  }
}
