/* 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(2, 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 .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 {
  min-width: 0;
  padding: 2rem 1.5rem;
}

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

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-title,
body.case .hero-pre,
body.case .hero-answer,
body.case .hero-sub,
body.case .numbers {
  position: relative;
}

body.case .phase-link {
  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 .hero-award {
  position: relative;
  display: inline-block;
  margin: -0.75rem 0 1.75rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--lime);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
}

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

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 figcaption {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--grey);
}

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

/* Miejsce na grafiki, dopóki nie ma plików. */
body.case .kv.is-pending .kv-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 21 / 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 .results-note {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--grey);
}

body.case .hero-mark {
  position: absolute;
  top: 16%;
  right: 5%;
  width: min(40vw, 480px);
  height: auto;
  opacity: 0.4;
  pointer-events: none;
}

body.case .hero-mark-path {
  fill: none;
  stroke: var(--lime-dim);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}


/* Wtedy i dziś: dwa obrazy jeden na drugim, suwak odsłania lewy. */
body.case .compare {
  width: 70vw;
  max-width: 100%;
  margin: 3rem auto 0;
}

body.case .compare-frame {
  --pos: 50%;
  position: relative;
  aspect-ratio: 2000 / 1620;
  overflow: hidden;
  border: 1px solid rgba(200, 230, 14, 0.35);
  background: #111;
  user-select: none;
  touch-action: pan-y;
}

body.case .compare-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
}

body.case .compare-before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

body.case .compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--lime);
  pointer-events: none;
}

body.case .compare-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--dark);
  border: 2px solid var(--lime);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.case .compare-tag {
  position: absolute;
  top: 1rem;
  padding: 0.3rem 0.6rem;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(200, 230, 14, 0.5);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--light);
  pointer-events: none;
}

body.case .compare-tag.is-before {
  left: 1rem;
}

body.case .compare-tag.is-after {
  right: 1rem;
}

body.case .compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

body.case .compare-range:focus-visible + .compare-line .compare-knob {
  box-shadow: 0 0 0 3px rgba(200, 230, 14, 0.35);
}

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

/* Wykresy: jedna seria, cienkie znaczniki, podpisy tekstem, nie kolorem. */
body.case .chart {
  position: relative;
  width: 70vw;
  max-width: 100%;
  margin: 3rem auto 0;
}

body.case .chart-title {
  font-weight: 600;
  color: var(--light);
}

body.case .chart-sub {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--grey);
  margin-top: 0.2rem;
}

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

body.case .hbars {
  margin-top: 1.75rem;
}

body.case .hbar {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  align-items: center;
}

body.case .hbar + .hbar {
  margin-top: 1rem;
}

body.case .hbar-name {
  font-size: 0.9rem;
  color: var(--grey);
}

body.case .hbar-track {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body.case .hbar-fill {
  height: 24px;
  width: var(--w);
  border-radius: 0 4px 4px 0;
  background: #3a3a36;
}

body.case .hbar.is-now .hbar-fill {
  background: var(--lime);
}

body.case .hbar-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--light);
  white-space: nowrap;
}

/* Generacje iiyama.com: paski na osi lat, daty z Internet Archive. */
body.case .gens-rows {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}

body.case .gen + .gen {
  margin-top: 0.9rem;
}

body.case .gen-head {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--grey);
  margin-bottom: 0.35rem;
}

body.case .gen-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--light);
  min-width: 5.5rem;
}

body.case .gen-track {
  position: relative;
  display: block;
  height: 18px;
  background: rgba(255, 255, 255, 0.04);
}

body.case .gen-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #3a3a36;
  transition: background 0.3s;
}

body.case .gen-bar.is-now,
body.case .gen-track:hover .gen-bar,
body.case .gen-track:focus-visible .gen-bar {
  background: var(--lime);
}

body.case .gens-axis {
  position: relative;
  height: 1.4rem;
  margin-top: 0.6rem;
}

body.case .gens-axis span {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--grey);
}

body.case .gens-axis span:first-child {
  transform: none;
}

body.case .chart-tip {
  position: absolute;
  z-index: 3;
  padding: 0.5rem 0.7rem;
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  white-space: nowrap;
}

body.case .chart-tip strong {
  display: block;
  font-size: 1rem;
  color: var(--light);
}

body.case .chart-tip span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--grey);
}

body.case .callout {
  width: 70vw;
  max-width: 100%;
  margin: 2.5rem auto 0;
  background: var(--dark-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid var(--lime);
  padding: 1.5rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--grey);
}

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

/* Własne pomysły: karty ze statusem. */
body.case .ideas {
  width: 70vw;
  max-width: 100%;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

body.case .idea {
  padding: 2rem 1.75rem;
  background: var(--dark-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.case .idea-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  border: 1px solid rgba(200, 230, 14, 0.5);
  padding: 0.25rem 0.55rem;
  margin-bottom: 1.1rem;
}

body.case .idea h3 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

body.case .idea h3 span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--grey);
  margin-left: 0.4rem;
}

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

/* Link do case'a G-Master. */
body.case .sibling {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  width: 70vw;
  max-width: 100%;
  margin: 2.5rem auto 0;
  padding: 2rem 1.75rem;
  border: 1px solid rgba(200, 230, 14, 0.35);
  color: var(--light);
  transition: border-color 0.3s, background 0.3s;
}

body.case .sibling:hover,
body.case .sibling:focus-visible {
  border-color: var(--lime);
  background: rgba(200, 230, 14, 0.04);
  outline: none;
}

body.case .sibling-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

body.case .sibling-title {
  display: block;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0.4rem;
}

body.case .sibling-text {
  display: block;
  color: var(--grey);
  font-weight: 300;
  margin-top: 0.4rem;
}

body.case .sibling-arrow {
  font-size: 2rem;
  color: var(--lime);
}

@media (max-width: 900px) {
  body.case .ideas {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  body.case .col-2 {
    grid-template-columns: 1fr;
  }

  body.case .kv-wide,
  body.case .compare,
  body.case .chart,
  body.case .callout,
  body.case .ideas,
  body.case .sibling {
    width: auto;
  }

  body.case .hero-mark {
    top: 30%;
    right: -12%;
    width: 90%;
    opacity: 0.2;
  }
}

@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;
  }

  body.case .hbar {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

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

  body.case .sibling {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
