/* =========================================================
   CASE PAGES — layout editorial
   Hierarquia feita 100% com PESOS do Inter (200 → 800),
   tamanho, caixa alta e tracking. Sem fonte serifada.
   A cor de destaque de cada projeto vem da variável --case,
   definida no <style> de cada página.
   ========================================================= */

:root {
  --case: #5e7bdf;
  --case-ink: #0e0e12;
}

.case-page {
  font-feature-settings: "ss01", "cv05";
}

.case-main {
  padding-bottom: 40px;
}

.case-page .nav-row {
  max-width: 1180px;
  padding: 18px 40px;
}

.case-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- utilitários de tipo ---------- */
.c-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.c-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--muted);
  max-width: 46ch;
}

.c-num {
  font-variant-numeric: tabular-nums;
}

/* ---------- voltar ---------- */
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 34px 0 26px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s ease, gap .2s ease;
}

.case-back:hover {
  color: var(--case);
  gap: 14px;
}

/* ---------- cabeçalho do case ---------- */
.case-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.case-kicker .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--case);
  display: inline-block;
}

.case-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px 130px;
  gap: 52px;
  align-items: start;
}

.case-title {
  font-size: clamp(44px, 7.4vw, 92px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: .92;
  color: var(--white);
}

.case-sub {
  margin-top: 14px;
  font-size: clamp(17px, 2.4vw, 30px);
  font-weight: 200;
  letter-spacing: -.015em;
  line-height: 1.25;
  color: var(--muted);
  max-width: 22ch;
}

.case-sub em {
  font-style: normal;
  font-weight: 500;
  color: var(--white);
}

/* ficha técnica */
.case-meta {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.case-meta .row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: baseline;
}

.case-meta dt {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.case-meta dd {
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  line-height: 1.5;
}

/* número fantasma */
.case-ghost {
  justify-self: end;
  margin-top: -22px;
  font-size: clamp(90px, 10vw, 140px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--case);
  opacity: .45;
  pointer-events: none;
  user-select: none;
}

.case-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0 0;
}

/* ---------- imagens ---------- */
.case-figure {
  margin: 34px 0 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--case-ink);
}

.case-figure img {
  width: 100%;
  display: block;
}

.case-caption {
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--muted);
}

/* ---------- desafio / solução / entrega + números ---------- */
.case-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 60px;
  margin-top: 56px;
}

.case-blocks {
  display: grid;
  gap: 34px;
}

.case-figures {
  display: grid;
  align-content: start;
  gap: 0;
  padding-top: 4px;
}

.case-figures li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--white);
}

.case-figures li:first-child {
  border-top: 1px solid var(--line);
}

.case-figures b {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ---------- vitrine: imagem + card destaque ---------- */
.case-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 28px;
  margin-top: 46px;
  align-items: stretch;
}

.case-showcase .case-figure {
  margin: 0;
}

.case-highlight {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 26px;
  border-radius: 4px;
  background: var(--case-ink);
  color: #fff;
  min-height: 240px;
}

.case-highlight .c-label {
  color: rgba(255, 255, 255, .55);
  margin: 0;
}

.case-highlight-num {
  font-size: clamp(52px, 6vw, 76px);
  font-weight: 200;
  letter-spacing: -.045em;
  line-height: .9;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.case-highlight-num span {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--case);
  margin-left: 6px;
}

.case-highlight p {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, .62);
}

/* ---------- tags ---------- */
.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.case-tags span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--case);
  border: 1px solid var(--case);
  border-radius: 100px;
  padding: 6px 12px;
  opacity: .9;
}

/* ---------- próximo projeto ---------- */
.case-next {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.case-next a {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(22px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--white);
  transition: color .2s ease;
}

.case-next a:hover {
  color: var(--case);
}

.case-next .c-label {
  margin: 0;
}

/* ---------- reveal ---------- */
.c-rise {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

.c-rise.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- responsivo ---------- */
@media (max-width: 980px) {
  .case-head {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .case-ghost {
    position: absolute;
    top: -4px;
    right: 0;
    margin: 0;
    font-size: 68px;
    opacity: .3;
  }

  .case-title {
    padding-right: 92px;
  }

  .case-brief,
  .case-showcase {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .case-meta .row {
    grid-template-columns: 90px 1fr;
  }
}

@media (max-width: 640px) {
  .case-wrap,
  .case-page .nav-row {
    padding-left: 20px;
    padding-right: 20px;
  }

  .case-title {
    letter-spacing: -.03em;
  }

  .case-sub {
    max-width: none;
  }

  .case-next {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-rise {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- botões de ação ---------- */
.case-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.case-cta a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  border: 1px solid var(--case);
  color: var(--case);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.case-cta a.is-solid {
  background: var(--case);
  color: #fff;
}

.case-cta a:hover {
  transform: translateY(-2px);
}

.case-cta a:not(.is-solid):hover {
  background: var(--case);
  color: #fff;
}

.case-cta a:focus-visible,
.case-back:focus-visible,
.case-next a:focus-visible {
  outline: 2px solid var(--case);
  outline-offset: 3px;
}

/* ---------- protótipo incorporado ---------- */
.case-proto {
  margin-top: 56px;
}

.case-proto-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.case-proto-head .c-label {
  margin: 0;
}

.case-proto-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.case-embed {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--case-ink);
}

.case-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.case-embed.is-phone {
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 420 / 860;
}

.case-embed.is-tablet {
  aspect-ratio: 16 / 11;
}

@media (max-width: 640px) {
  .case-embed.is-phone {
    aspect-ratio: 360 / 720;
  }

  .case-embed.is-tablet {
    aspect-ratio: 4 / 3;
  }

  .case-cta a {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- vídeo do case ---------- */
.case-video {
  margin-top: 56px;
}

.case-video-frame {
  max-width: 880px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--case-ink);
}

.case-video-frame video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- lightbox das imagens ---------- */
.case-figure img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(4, 4, 16, .92);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s ease;
}

html.light-theme .lightbox {
  background: rgba(241, 241, 241, .95);
}

.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  cursor: zoom-out;
  transform: scale(.97);
  transition: transform .25s ease;
}

.lightbox.is-open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}

.lightbox-close:hover {
  border-color: var(--case);
  color: var(--case);
}

@media (max-width: 640px) {
  .lightbox {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox img {
    transition: none;
  }
}
