/* ══════════════════════════════════════════════
   CASE STUDY / REALIZACJA — layout współdzielony
   Wykorzystuje zmienne i nagłówek/stopkę z style.css
   ══════════════════════════════════════════════ */

.cs-page {
  padding: 40px 0 80px;
}

/* ── Back link ── */
.cs-back {
  display: inline-block;
  margin-bottom: 36px;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: color 0.2s, transform 0.2s;
}

.cs-back:hover {
  color: var(--accent);
  transform: translateX(-3px);
}

/* ── Header ── */
.cs-header {
  margin-bottom: 40px;
}

.cs-meta {
  font-size: 13px;
  color: var(--ink-dim);
  margin: 0 0 12px;
  letter-spacing: 0.5px;
}

.cs-title {
  font-size: clamp(30px, 5.5vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--ink);
}

.cs-lead {
  font-size: clamp(15px, 2.2vw, 19px);
  color: var(--ink-dim);
  line-height: 1.6;
  margin: 0 0 22px;
  max-width: 62ch;
}

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

.cs-tags .tag {
  font-size: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 10px;
  color: var(--ink-dim);
  letter-spacing: 0.3px;
}

/* ── Facts strip ── */
.cs-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 0 56px;
}

.cs-fact {
  background: var(--bg-card);
  padding: 16px 18px;
  margin: 0;
}

.cs-fact dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  margin-bottom: 6px;
}

.cs-fact dd {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}

/* ── Narrative sections ── */
.cs-section {
  margin: 0 0 48px;
  max-width: 68ch;
}

.cs-section h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 16px;
  font-weight: normal;
}

.cs-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 18px;
}

.cs-section p:last-child {
  margin-bottom: 0;
}

.cs-section strong {
  color: var(--ink);
  font-weight: 700;
}

/* Bullet list inside a section. Both the migrated .cs-list and any plain
   <ul> written in the CMS editor get the same arrow-bullet styling. */
.cs-list,
.cs-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-list li,
.cs-section ul li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-dim);
}

.cs-list li::before,
.cs-section ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.cs-list li strong,
.cs-section ul li strong {
  color: var(--ink);
  font-weight: 700;
}

/* ── Highlight callout (wyróżnik) ── */
.cs-highlight {
  position: relative;
  border: 1px solid rgba(172, 190, 255, 0.28);
  border-radius: 8px;
  padding: 28px 30px;
  margin: 0 0 56px;
  background: var(--bg-card);
  overflow: hidden;
}

.cs-highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(172, 190, 255, 0.07) 0%, transparent 62%);
  pointer-events: none;
}

.cs-highlight-label {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.cs-highlight h3 {
  position: relative;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 10px 0 12px;
  color: var(--ink);
}

.cs-highlight p {
  position: relative;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-dim);
  margin: 0;
  max-width: 62ch;
}

/* ── Tech list ── */
.cs-tech-block {
  margin: 0 0 56px;
}

.cs-tech-block h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 16px;
  font-weight: normal;
}

.cs-tech {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-tech li {
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 6px 12px;
  color: var(--ink-dim);
}

/* ── CTA ── */
.cs-cta {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.cs-cta-link {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.cs-cta-link:hover {
  background: var(--accent);
  color: #000;
}

/* Disabled CTA for upcoming projects */
.cs-cta-link.is-soon {
  border-color: var(--border);
  color: var(--ink-dim);
  cursor: default;
  pointer-events: none;
}

.cs-cta-note {
  font-size: 13px;
  color: var(--ink-dim);
}

.cs-cta-note a {
  color: var(--accent);
  text-decoration: none;
}

.cs-cta-note a:hover {
  text-decoration: underline;
}

/* ── Media / preview (used on lighter project pages) ── */
.cs-media {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 48px;
  background: #000;
}

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

/* YouTube thumbnail link */
.cs-yt {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.cs-yt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.7);
  transition: filter 0.3s;
}

.cs-yt:hover img {
  filter: brightness(0.5);
}

.cs-yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(207, 214, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.cs-yt:hover .cs-yt-play {
  background: rgba(172, 190, 255, 0.18);
  border-color: var(--accent);
}

.cs-yt-play svg {
  width: 24px;
  height: 24px;
  fill: var(--accent);
  margin-left: 3px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .cs-page {
    padding: 28px 0 60px;
  }

  .cs-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-highlight {
    padding: 22px 20px;
  }
}
