/* Case study pages — v0 design system */

.cs-hero {
  padding: calc(var(--nav-h) + 48px) 0 64px;
}

.v0-section--compact.cs-hero {
  padding: calc(var(--nav-h) + 48px) 0 64px;
}

.cs-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: end;
}

.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cs-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--v0-line);
  background: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.cs-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 20px;
}

.cs-hero-lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--v0-muted);
  max-width: 36rem;
  margin: 0;
}

.cs-browser {
  background: #fff;
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-lg);
}

.cs-browser-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.cs-browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--v0-line);
}

.cs-browser-dots span:first-child { background: #ffb4ab; }
.cs-browser-dots span:nth-child(2) { background: var(--v0-lav); }
.cs-browser-dots span:nth-child(3) { background: var(--v0-peach); }

.cs-browser img {
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
}

.cs-summary {
  border-top: 1px solid var(--v0-line);
  border-bottom: 1px solid var(--v0-line);
  background: #fff;
}

.cs-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.cs-summary-item {
  padding: 28px 24px;
  border-right: 1px solid var(--v0-line);
}

.cs-summary-item:last-child { border-right: none; }

.cs-summary-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.cs-summary-value {
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.cs-problem-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cs-problem-card {
  background: #fff;
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.cs-problem-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.cs-problem-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.cs-problem-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--v0-muted);
}

.cs-goals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cs-goal-card {
  background: #fff;
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border-bottom: 3px solid var(--accent);
}

.cs-goal-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-goal-icon svg,
.cs-problem-icon svg {
  display: block;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

.cs-goal-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.cs-goal-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--v0-muted);
}

.cs-work-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
}

.cs-phase-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 24px;
}

.cs-phase-label::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.cs-phases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cs-phase-card {
  background: #fff;
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.cs-phase-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.cs-phase-card h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
}

.cs-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--v0-muted);
}

.cs-checklist li::before {
  content: "✓";
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 700;
}

.cs-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cs-metric-card {
  background: #fff;
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  text-align: center;
}

.cs-metric-value {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.cs-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cs-metric-desc {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--v0-muted);
  margin: 0;
}

.cs-insight {
  background: linear-gradient(135deg, var(--v0-lav) 0%, #fff 55%, var(--v0-peach) 100%);
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-xl);
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.cs-insight::before {
  content: "✦";
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0.35;
}

.cs-insight h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.cs-insight p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
  max-width: 52rem;
}

.cs-gallery {
  columns: 1;
  column-gap: 20px;
}

.cs-gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-lg);
  padding: 8px;
}

.cs-gallery-item img {
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
}

.cs-gallery-item figcaption,
.cs-result-figure figcaption {
  padding: 10px 8px 4px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--v0-muted);
}

.cs-results-table-wrap {
  margin-top: 36px;
  overflow-x: auto;
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.cs-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.cs-results-table th,
.cs-results-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--v0-line);
  vertical-align: top;
}

.cs-results-table th {
  background: var(--bg-light, #f7f7f5);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.cs-results-table tr:last-child td {
  border-bottom: none;
}

.cs-results-table td strong {
  color: var(--accent-hover, var(--accent));
}

.cs-actions-list {
  margin: 0;
  padding-left: 1.35em;
  color: var(--v0-muted);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-actions-list li::marker {
  color: var(--accent);
  font-weight: 700;
}

.cs-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cs-related-card {
  background: #fff;
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.cs-related-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cs-related-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.cs-related-card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--v0-muted);
  margin: 0 0 16px;
}

.cs-related-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

/* Hub page */
.cs-hub-card {
  background: #fff;
  border: 1px solid var(--v0-line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.cs-hub-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.cs-hub-card-image {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.cs-hub-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cs-hub-card:hover .cs-hub-card-image img { transform: scale(1.04); }

.cs-hub-card-tags {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.cs-hub-card-body h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.cs-hub-card-body > p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--v0-muted);
  margin: 0 0 20px;
  flex: 1;
}

.cs-hub-stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}

.cs-hub-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.cs-hub-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--v0-muted);
}

.cs-hub-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
}

.cs-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .cs-hero-grid,
  .cs-two-col,
  .cs-work-grid { grid-template-columns: 1fr; }
  .cs-goals-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-summary-item:nth-child(2) { border-right: none; }
  .cs-summary-item { border-bottom: 1px solid var(--v0-line); }
  .cs-summary-item:nth-child(3),
  .cs-summary-item:nth-child(4) { border-bottom: none; }
  .cs-phases { grid-template-columns: 1fr; }
  .cs-metrics-grid { grid-template-columns: 1fr; }
  .cs-related-grid,
  .cs-hub-grid { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
  .cs-gallery { columns: 2; }
}

@media (min-width: 1100px) {
  .cs-gallery { columns: 3; }
}

@media (max-width: 640px) {
  .cs-goals-grid { grid-template-columns: 1fr; }
  .cs-summary-grid { grid-template-columns: 1fr; }
  .cs-summary-item { border-right: none; }
  .cs-summary-item:last-child { border-bottom: none; }
  .cs-insight { padding: 32px 24px; }
}
