/* Układ case study. Tokeny, reset, nawigacja bazowa i stopka
   pochodzą z src/css/landing.css. */

@media (hover: none), (pointer: coarse) {
  body.case .cursor-dot {
    display: none;
  }
}

body.case {
  line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.case nav.top {
  position: sticky;
  top: 0;
  z-index: 100;
  mix-blend-mode: normal;
  padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
  padding-bottom: 1.5rem;
  padding-left: 6vw;
  padding-right: 6vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.case .lang-menu {
  z-index: 2;
}

body.case .nav-logo {
  font-size: 1.4rem;
}

body.case .hero {
  height: auto;
  display: block;
  justify-content: initial;
  padding: 8rem 6vw 6rem;
  overflow: hidden;
}

body.case .hero-pre,
body.case .hero-sub {
  opacity: 1;
}

body.case .hero-pre {
  font-size: 0.7rem;
  margin-bottom: 2rem;
}

body.case .hero-pre time {
  color: var(--grey);
}

body.case .hero-pre time::before,
body.case .hero-pre a::before {
  content: "· ";
}

body.case .hero-pre a,
body.case footer a {
  color: var(--grey);
}

body.case .hero-pre a:hover,
body.case footer a:hover {
  color: var(--lime);
}

body.case .hero-title {
  font-size: clamp(2.8rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

body.case .hero-answer {
  margin-top: 2rem;
  max-width: 620px;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.7;
  color: #b7b7b0;
}

body.case .hero-sub {
  margin-top: 2rem;
  font-size: 1.1rem;
  max-width: 620px;
  line-height: 1.75;
}

body.case .hero-answer + .hero-sub {
  margin-top: 1.1rem;
}

body.case .numbers {
  padding: 4rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 3rem;
  background: rgba(200, 230, 14, 0.02);
}

body.case .number-block {
  padding: 2.5rem 1.5rem;
  text-align: left;
}

body.case .number-value {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

body.case .number-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

body.case section {
  padding: 7rem 6vw;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.case section.tight {
  padding: 4rem 6vw;
}

body.case .section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--lime);
  margin-bottom: 2rem;
}

body.case .section-title {
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 2rem;
}

body.case .section-title .accent {
  color: var(--lime);
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
}

body.case .col-2 {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3.5rem;
}

body.case p.body-lg {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--grey);
  max-width: 680px;
  line-height: 1.8;
}

body.case .anchor-callout {
  background: var(--dark-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid var(--lime);
  padding: 1.75rem 2rem;
  margin-bottom: 3rem;
}

body.case .anchor-callout p {
  font-size: 0.95rem;
  color: var(--grey);
  font-weight: 300;
  line-height: 1.7;
}

body.case .anchor-callout strong {
  color: var(--light);
  font-weight: 600;
}

body.case .node-callout {
  margin: 2.5rem 0 0;
}

body.case .node-callout .node-joke {
  margin-top: 1rem;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--lime);
}

body.case .pull-quote {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 300;
  line-height: 1.4;
  border-left: 2px solid var(--lime);
  padding-left: 1.75rem;
  margin: 2.5rem 0;
  max-width: 760px;
}

body.case .pull-quote strong {
  color: var(--lime);
  font-weight: 700;
}

body.case .pull-quote cite {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 1rem;
  letter-spacing: 0.05em;
}
body.case .phase {
  margin-bottom: 4rem;
}

body.case .phase-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

body.case .phase-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--grey);
}

body.case .phase-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.case .phase-range {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (min-width: 801px) {
  body.case .phase-head,
  body.case .tl-item {
    width: 70vw;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}
body.case .tl-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.case .tl-item:first-of-type {
  border-top: none;
}

body.case .tl-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey);
  padding-top: 0.15rem;
}

body.case .tl-date.anchor {
  color: var(--lime);
  font-weight: 700;
}

body.case .tl-text {
  color: var(--grey);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
}

body.case .tl-text strong {
  color: var(--light);
  font-weight: 600;
}

body.case .sources .tl-text a {
  color: var(--light);
  border-bottom: 1px solid rgba(200, 230, 14, 0.4);
  transition: color 0.3s, border-color 0.3s;
}

body.case .sources .tl-text a:hover {
  color: var(--lime);
  border-color: var(--lime);
}
body.case .spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 2.5rem;
  background: rgba(200, 230, 14, 0.02);
}

body.case .spec {
  padding: 2rem 1.5rem;
}

body.case .spec .v {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--lime);
  letter-spacing: -0.02em;
}

body.case .spec .k {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.4rem;
}

body.case .contact {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.case .contact-word {
  display: inline-block;
}

body.case footer {
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

body.case .copy-md {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--grey);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

body.case .copy-md:hover,
body.case .copy-md:focus-visible {
  color: var(--lime);
  border-color: var(--lime);
  outline: none;
}


body.case .hero-clock {
  position: absolute;
  top: 18%;
  right: 5%;
  width: min(48vw, 560px);
  height: auto;
  opacity: 0.4;
  pointer-events: none;
}

body.case .hero-clock text {
  font-family: var(--font-mono);
  font-size: 176px;
  font-weight: 700;
  fill: none;
  stroke: var(--lime-dim);
  stroke-width: 1.5;
}

body.case .hero-title,
body.case .hero-pre,
body.case .hero-answer,
body.case .hero-sub,
body.case .numbers {
  position: relative;
}

body.case .phase-link {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  border-bottom: 1px solid rgba(200, 230, 14, 0.4);
  transition: color 0.3s, border-color 0.3s;
}

body.case .phase-link:hover {
  color: var(--lime);
  border-color: var(--lime);
}

body.case .video {
  width: 70vw;
  max-width: 100%;
  margin: 1.25rem auto 1.75rem;
}

body.case .video-frame {
  position: relative;
  padding-top: 60.44%;
  background: var(--dark-card);
}

body.case .video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

body.case .video-yt .video-frame {
  padding-top: 56.25%;
  overflow: hidden;
}

body.case .video-play,
body.case .video-play img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.case .video-play img {
  object-fit: cover;
  opacity: 0.75;
  transition: opacity 0.4s;
}

body.case .video-play:hover img,
body.case .video-play:focus-visible img {
  opacity: 1;
}

body.case .video-play:focus-visible {
  outline: 1px solid var(--lime);
  outline-offset: 4px;
}

body.case .video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 50%;
  background: var(--lime);
}

body.case .video-play-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--dark);
}

body.case .video figcaption {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--grey);
}

body.case .roles {
  margin-top: 2.5rem;
}

body.case .roles .tl-date.anchor {
  font-weight: 700;
}

body.case .kv {
  margin: 1.25rem 0 1.75rem;
  overflow: hidden;
}

body.case .kv img {
  display: block;
  width: 100%;
  height: auto;
}

body.case .kv-wide {
  width: 70vw;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Miejsce na KV Los Mejores, dopóki nie ma plików. */
body.case .kv.is-pending .kv-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border: 1px dashed rgba(200, 230, 14, 0.35);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

body.case .kv-wide.is-pending .kv-slot {
  aspect-ratio: 21 / 9;
}

body.case .frames {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 70vw;
  max-width: 100%;
  margin: 2rem auto 0;
}

body.case .frames .kv {
  margin: 0;
}

body.case .frames .kv.is-pending .kv-slot {
  aspect-ratio: 1 / 1;
}

body.case .day-chart {
  margin: 3rem 0 0;
}

body.case .day-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

body.case .day-bars rect {
  fill: #3a3a36;
}

body.case .day-bars rect.peak {
  fill: var(--lime);
}

body.case .day-band {
  fill: rgba(200, 230, 14, 0.07);
}

body.case .day-axis {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

body.case .day-ticks text {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  fill: var(--grey);
}

body.case .day-ticks text.peak {
  fill: var(--lime);
  font-weight: 700;
}

body.case .day-chart figcaption {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--grey);
}

@media (max-width: 800px) {
  body.case section:has(.phase) {
    padding-bottom: 3.5rem;
  }

  body.case section:has(.phase) .phase:last-child {
    margin-bottom: 2rem;
  }

  body.case .col-2 {
    grid-template-columns: 1fr;
  }

  body.case .hero-clock {
    top: 26%;
    right: -10%;
    width: 110%;
  }

  body.case .kv-wide,
  body.case .frames,
  body.case .video {
    width: auto;
  }

  body.case .frames {
    grid-template-columns: 1fr 1fr;
  }

  body.case .day-ticks text {
    font-size: 26px;
  }
}

@media (max-width: 700px) {
  body.case .numbers,
  body.case .spec-grid {
    grid-template-columns: 1fr 1fr;
  }

  body.case .hero,
  body.case section,
  body.case nav.top {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  body.case section.tight {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 620px) {
  body.case .tl-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}
