/* Estudos de caso no mesmo sistema visual da home: areia no fundo, cartões
   claros, carvão nos blocos de destaque e verde só no acento. Carregado
   depois do site.css, então as regras com .portfolio-shell prevalecem. */

/* O site.css veste os blocos de caso para fundo escuro (tokens "inverse").
   Aqui só o aviso e a chamada final são escuros — e eles trazem a própria
   cor. Então os tokens invertidos passam a apontar para o texto sobre areia,
   menos dentro do carrossel e do lightbox, que continuam escuros. */
.portfolio-shell .case-topbar,
.portfolio-shell .case-hero,
.portfolio-shell .case-nav,
.portfolio-shell .case-section,
.portfolio-shell .case-next {
  --color-text-inverse: var(--profile-text);
  --color-text-inverse-secondary: var(--profile-text-secondary);
}

/* Valores originais do site.css: uma referência encadeada a
   --color-text-inverse aqui seria circular e voltaria ao tom escuro. */
.portfolio-shell .media-carousel,
.portfolio-shell [data-media-lightbox] {
  --color-text-inverse: #f6f1e8;
  --color-text-inverse-secondary: #c4cabe;
}

.portfolio-shell .case-hero .eyebrow {
  color: var(--profile-accent);
}

.portfolio-shell .case-page {
  width: min(calc(100% - 2rem), 62rem);
  margin-inline: auto;
  padding-block: clamp(1rem, 3vw, 2.4rem);
}

.case-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.portfolio-shell .back-link {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.4rem;
  color: var(--profile-text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--profile-accent);
  text-underline-offset: 0.25rem;
}

.portfolio-shell .case-topbar__cta {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--profile-accent-bright);
  color: var(--profile-on-accent);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

/* Cartões */
.portfolio-shell .case-hero,
.portfolio-shell .case-section,
.portfolio-shell .case-cta,
.portfolio-shell .demo-notice {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius);
  background: var(--profile-surface);
  box-shadow: 0 1rem 2.8rem var(--profile-shadow);
}

.portfolio-shell .case-hero {
  display: grid;
  gap: 0.9rem;
}

.case-hero__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portfolio-shell .case-hero__logo {
  width: auto;
  max-width: 7rem;
  max-height: 4.5rem;
  object-fit: contain;
}

.portfolio-shell .case-hero__logo--app {
  width: 4.75rem;
  max-width: 4.75rem;
  max-height: none;
  border-radius: 1rem;
}

.portfolio-shell .case-hero h1 {
  margin: 0.15rem 0 0;
  color: var(--profile-text);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.portfolio-shell .case-hero__lead {
  max-width: 54ch;
  margin: 0;
  color: var(--profile-text-secondary);
  font-size: 1rem;
}

.portfolio-shell .case-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin: 0.35rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--profile-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.portfolio-shell .case-facts > div {
  display: grid;
  gap: 0.2rem;
}

.portfolio-shell .case-facts dt {
  color: var(--profile-text-muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portfolio-shell .case-facts dd {
  margin: 0;
  color: var(--profile-text);
  font-size: 0.86rem;
  font-weight: 600;
}

/* Selo da loja */
.portfolio-shell .store-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.1rem 0.55rem 0.85rem;
  border-radius: 0.85rem;
  background: #20231f;
  color: #f6f1e7;
  text-decoration: none;
}

.portfolio-shell .store-badge img {
  width: 1.5rem;
  height: 1.5rem;
}

.portfolio-shell .store-badge span {
  display: block;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-shell .store-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.15;
}

.portfolio-shell .case-usage-line {
  margin: 0;
  color: var(--profile-accent);
  font-size: 0.86rem;
  font-weight: 700;
}

.portfolio-shell .case-note {
  margin: 0.8rem 0 0;
  padding-left: 0.8rem;
  border-left: 2px solid var(--profile-accent-bright);
  color: var(--profile-text-muted);
  font-size: 0.8rem;
}

/* Navegação interna */
.portfolio-shell .case-nav {
  position: static;
  margin: 0.8rem 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.portfolio-shell .case-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portfolio-shell .case-nav a {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  padding: 0 0.95rem;
  border: 1px solid var(--profile-border);
  border-radius: 999px;
  background: var(--profile-surface);
  color: var(--profile-text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.portfolio-shell .case-nav a:hover {
  color: var(--profile-text);
  border-color: var(--profile-border-strong);
}

/* Blocos */
.portfolio-shell .case-content {
  display: grid;
  gap: 0.8rem;
}

.portfolio-shell .case-section h2 {
  margin: 0.35rem 0 0.7rem;
  max-width: 24ch;
  color: var(--profile-text);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

/* Só os parágrafos do próprio bloco: o carrossel e o lightbox trazem as
   cores deles e não podem ser alcançados por esta regra. */
.portfolio-shell .case-section > p,
.portfolio-shell .comparison-copy > p {
  max-width: 68ch;
  margin: 0 0 0.7rem;
  color: var(--profile-text-secondary);
  font-size: 0.9rem;
}

.portfolio-shell .case-section > p:last-child {
  margin-bottom: 0;
}

.portfolio-shell .feature-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portfolio-shell .feature-list li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--profile-text-secondary);
  font-size: 0.86rem;
}

.portfolio-shell .feature-list li::before {
  position: absolute;
  top: 0.55rem;
  left: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--profile-accent-bright);
  content: "";
}

.portfolio-shell .feature-list--grid {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.portfolio-shell .process-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portfolio-shell .process-list > li {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: var(--profile-radius-small);
  background: var(--profile-surface-raised);
}

.portfolio-shell .process-list__number {
  /* No layout antigo o número era absoluto sobre o card; aqui ele é a
     primeira coluna da grade e precisa voltar ao fluxo. */
  position: static;
  color: var(--profile-accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
}

.portfolio-shell .process-list h3,
.portfolio-shell .process-list h4 {
  margin: 0 0 0.15rem;
  color: var(--profile-text);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
}

.portfolio-shell .process-list p {
  margin: 0;
  font-size: 0.82rem;
}

/* Leitura de design da solução: por que cada tela ficou daquele jeito. Mora
   dentro do bloco "Solução" porque comenta as capturas que o visitante acabou
   de ver — e porque o formato enxuto do caso é fechado em seis seções. */
.portfolio-shell .case-design-read {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.7rem;
}

.portfolio-shell .case-design-read h3 {
  margin: 0;
  color: var(--profile-text);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
}

.portfolio-shell .case-design-read > p {
  margin: 0;
  color: var(--profile-text-secondary);
  font-size: 0.88rem;
}

.portfolio-shell .technology-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* O layout antigo separava as tecnologias por pontos; agora cada uma é um
   chip fechado e o separador viraria sujeira. */
.portfolio-shell .technology-line li::before,
.portfolio-shell .technology-line li::after {
  display: none;
  content: none;
}

.portfolio-shell .technology-line li {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--profile-border);
  border-radius: 999px;
  background: var(--profile-surface-raised);
  color: var(--profile-text);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Antes e depois */
.portfolio-shell .comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.8rem;
  align-items: start;
  margin: 0;
}

.portfolio-shell .comparison-card {
  margin: 0;
  padding: 0.9rem;
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius-small);
  background: var(--profile-surface-raised);
}

.portfolio-shell .comparison-card figcaption {
  margin-bottom: 0.6rem;
  color: var(--profile-text-muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portfolio-shell .artifact-preview {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
  border: 1px dashed var(--profile-border-strong);
  border-radius: 0.75rem;
  background: var(--profile-surface);
  color: var(--profile-text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.portfolio-shell .artifact-preview span {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--profile-border);
  border-radius: 0.55rem;
  background: var(--profile-surface-raised);
  color: var(--profile-text);
}

.portfolio-shell .artifact-preview strong {
  color: var(--profile-text);
  font-family: var(--font-display);
  font-size: 0.88rem;
}

.portfolio-shell .representation-note {
  margin: 0.7rem 0 0;
  color: var(--profile-text-muted);
  font-size: 0.74rem;
}

.portfolio-shell .comparison-copy {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.portfolio-shell .comparison-copy p {
  margin: 0;
}

/* Aviso de demonstração e chamada final: os blocos carvão da página. */
.portfolio-shell .demo-notice,
.portfolio-shell .case-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-color: #3b3f38;
  background: #20231f;
  color: #f6f1e7;
}

.portfolio-shell .demo-notice p,
.portfolio-shell .case-cta p {
  max-width: 58ch;
  margin: 0;
  color: #d7d1c4;
  font-size: 0.84rem;
}

.portfolio-shell .demo-notice h2,
.portfolio-shell .case-cta h2 {
  margin: 0.2rem 0 0.35rem;
  max-width: 26ch;
  color: #f6f1e7;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.portfolio-shell .demo-notice .eyebrow,
.portfolio-shell .case-cta .eyebrow {
  color: var(--profile-accent-bright);
}

.portfolio-shell .case-cta .button,
.portfolio-shell .mobile-cta-bar .button {
  /* O .button do site.css usa a fonte monoespaçada; aqui os botões seguem a
     tipografia do resto da página. */
  font-family: var(--font-body);
}

.portfolio-shell .case-cta .button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--profile-accent-bright);
  color: var(--profile-on-accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: none;
}

.portfolio-shell [data-status-label] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--profile-accent-bright);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portfolio-shell .case-facts [data-status-label] {
  color: var(--profile-accent);
  font-size: 0.86rem;
  letter-spacing: 0;
  text-transform: none;
}

.portfolio-shell .case-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.4rem 0 0;
  padding: 0 0.4rem;
}

.portfolio-shell .case-next__label {
  color: var(--profile-text-muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portfolio-shell .case-next__link {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  color: var(--profile-text);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--profile-accent);
  text-underline-offset: 0.25rem;
}

.portfolio-shell .site-footer {
  margin-top: 0.8rem;
}

/* Barra fixa de contato no celular */
.portfolio-shell .mobile-cta-bar {
  display: none;
}

@media (max-width: 768px) {
  .portfolio-shell .case-page {
    width: min(calc(100% - 1rem), 46rem);
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .portfolio-shell .case-topbar__cta {
    display: none;
  }

  .portfolio-shell .mobile-cta-bar {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    padding: 0.5rem calc(0.75rem + env(safe-area-inset-left, 0px)) calc(0.5rem + env(safe-area-inset-bottom, 0px)) calc(0.75rem + env(safe-area-inset-right, 0px));
    border-top: 1px solid var(--profile-border);
    background: rgb(255 250 242 / 96%);
    backdrop-filter: blur(0.8rem);
  }

  .portfolio-shell .mobile-cta-bar .button {
    display: inline-flex;
    width: 100%;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--profile-accent-bright);
    color: var(--profile-on-accent);
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
  }

  .portfolio-shell .case-hero__identity {
    align-items: flex-start;
  }
}
