/* =========================================================
   Portfólio — complementa styles.css
   Valores de referencias/modelo-portfolio-desktop.dc.html (1440)
   e referencias/modelo-portfolio-celular.dc.html (390).
   ========================================================= */

/* ============ HERO ============ */
.pf-hero {
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 48px 48px;
}
.pf-hero-inner {
  padding-top: 88px;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.pf-eyebrow { font-size: 13px; }
.pf-title {
  margin: 0;
  font-size: 64px;
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 880px;
}
.pf-lead {
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
}

/* filtros */
.pf-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.pf-filter {
  box-sizing: content-box;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border-field);
  background: transparent;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.pf-filter:hover { border-color: #6B7280; color: var(--text); }
.pf-filter[aria-pressed="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--on-cyan);
  font-weight: 700;
}
.pf-filter[aria-pressed="true"]:hover { background: var(--cyan-hover); border-color: var(--cyan-hover); }

/* ============ SEÇÕES ============ */
.pf-section[hidden] { display: none; }
.pf-section-inner {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.pf-head { display: flex; flex-direction: column; gap: 14px; max-width: 680px; }
.pf-head-wide { max-width: 700px; }
.pf-section-lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); }

/* tags */
.pf-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-tag {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-field);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}
.pf-tag-sm { padding: 4px 10px; font-size: 12px; }
.pf-tag-model {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
}

/* Miniaturas: desenhos copiados do modelo, que não usa border-box. */
.pf-thumb, .pf-thumb * { box-sizing: content-box; }
.pf-thumb { position: relative; overflow: hidden; }
.pf-thumb svg { display: inline; } /* como no modelo (styles.css usa block) */

/* ============ PROJETOS ============ */
.pf-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.pf-project {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pf-project[hidden], .pf-model[hidden] { display: none; }
.pf-thumb-project { height: 340px; }
.pf-thumb-glitch {
  background-color: var(--bg-alt);
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 32px 32px;
}
.pf-pw {
  position: absolute;
  left: 70px;
  right: 70px;
  top: 52px;
  bottom: -40px;
  border-radius: 16px 16px 0 0;
}
.pf-project-body { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 14px; }
.pf-project-title { margin: 0; font-size: 28px; font-weight: 700; }
.pf-project-text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }

.pf-thumb-img { display: block; background: var(--bg-alt); }
.pf-thumb-img img { box-sizing: border-box; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pf-project:hover .pf-thumb-img img { transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) { .pf-thumb-img img { transition: none; } }
.pf-project-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 4px; }
.pf-link { font-weight: 700; font-size: 16px; text-decoration: none; }
.pf-link:hover { text-decoration: underline; }
.pf-link-soft { color: var(--text-soft); font-weight: 600; }

/* ============ PÁGINA DE PROJETO ============ */
.pf-case-hero-inner { padding-top: 64px; padding-bottom: 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.pf-back { font-size: 15px; font-weight: 600; color: var(--text-soft); text-decoration: none; }
.pf-back:hover { color: var(--text); }
.pf-case-actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 4px; }
.pf-case-facts {
  margin: 0; padding: 28px 0 0; width: 100%;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  border-top: 1px solid var(--border);
}
.pf-case-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pf-case-facts dd { margin: 6px 0 0; font-size: 16px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.pf-case-cover { margin: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.pf-case-cover img, .pf-case-shot img { width: 100%; height: auto; }
.pf-case-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 64px; align-items: start; }
.pf-case-split p { margin: 0; font-size: 18px; line-height: 1.7; color: var(--text-soft); }
.pf-case-split p + p { margin-top: 16px; }
.pf-case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.pf-case-item { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.pf-case-num { font-family: var(--font-title); font-size: 14px; font-weight: 700; letter-spacing: .12em; color: var(--magenta-soft); }
.pf-case-item h3 { margin: 0; font-size: 21px; font-weight: 600; }
.pf-case-item p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.pf-case-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pf-case-shot { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.pf-case-shot img { border-radius: 16px; border: 1px solid var(--border); }
.pf-case-shot-wide { grid-column: 1 / -1; }
.pf-case-shot figcaption { font-size: 15px; color: var(--muted); }
.pf-case-numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; }
.pf-case-numbers div { border-left: 2px solid var(--cyan); padding-left: 20px; }
.pf-case-numbers dt { font-family: var(--font-title); font-size: 44px; font-weight: 700; line-height: 1; color: var(--text); }
.pf-case-numbers dd { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ============ MODELOS ============ */
.pf-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pf-model {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pf-thumb-model { height: 230px; }
.pf-mbar { height: 24px; display: flex; align-items: center; gap: 5px; padding: 0 12px; }
.pf-mbar span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pf-mhero {
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.pf-mcopy { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pf-mfoot { position: absolute; left: 20px; right: 20px; bottom: 14px; display: flex; gap: 8px; }
.pf-model-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.pf-model-title { margin: 0; font-size: 21px; font-weight: 600; }
.pf-model-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ============ CTA ============ */
.pf-cta-wrap { padding-top: 96px; padding-bottom: 96px; }
.pf-cta {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 56px 56px 56px 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  overflow: hidden;
}
.pf-cta-copy { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.pf-cta-title { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.pf-cta-text { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); }
.pf-cta-btn { flex: none; min-height: 60px; padding: 0 32px; font-size: 18px; }

/* ============ Larguras intermediárias ============ */
@media (max-width: 1180px) and (min-width: 900px) {
  .pf-title { font-size: 56px; }
  .pf-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-pw { left: 40px; right: 40px; }
  .pf-models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-cta { flex-direction: column; align-items: flex-start; }
}

/* ============ Celular (< 900px) ============ */
@media (max-width: 899px) {
  .pf-hero { background-size: 40px 40px; }
  .pf-hero-inner { padding-top: 56px; padding-bottom: 44px; gap: 22px; align-items: stretch; }
  .pf-hero-inner > .pf-eyebrow { align-self: flex-start; }
  .pf-eyebrow { font-size: 13px; }
  .pf-title { font-size: 42px; line-height: 1.06; max-width: none; }
  .pf-lead { font-size: 17px; max-width: none; }
  .pf-filters {
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    margin: 0 -20px;
    padding: 4px 20px;
    scrollbar-width: none;
  }
  .pf-filters::-webkit-scrollbar { display: none; }
  .pf-filter { flex: none; padding: 0 18px; }

  .pf-section-inner { padding-top: 64px; padding-bottom: 64px; gap: 32px; }
  .pf-head { gap: 12px; max-width: none; }
  .pf-h2 { letter-spacing: normal; }
  .pf-section-lead { font-size: 16px; }

  .pf-projects { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pf-case-hero-inner { padding-top: 40px; padding-bottom: 40px; gap: 20px; }
  .pf-case-actions .btn { flex: 1 1 100%; }
  .pf-case-facts, .pf-case-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .pf-case-numbers dt { font-size: 34px; }
  .pf-case-split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pf-case-split p { font-size: 17px; }
  .pf-case-grid, .pf-case-shots { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pf-case-cover, .pf-case-shot img { border-radius: 14px; }
  .pf-pw { left: 28px; right: 28px; }
  .pf-models { grid-template-columns: minmax(0, 1fr); gap: 20px; }

  .pf-cta-wrap { padding-top: 64px; padding-bottom: 64px; }
  .pf-cta {
    border-radius: 20px;
    padding: 36px 24px 36px 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .pf-cta-copy { display: contents; }
  .pf-cta-title { font-size: 30px; line-height: 1.12; letter-spacing: normal; }
  .pf-cta-text { font-size: 16px; }
  .pf-cta-btn { min-height: 56px; padding: 0 20px; font-size: 17px; }
}
