/* Portfolio — elenco card + dettaglio case study */

.pf-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.pf-hero {
  padding: 3.5rem 0 2rem;
}

.pf-hero h1,
.pf-detail-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.pf-lead,
.pf-detail-lead {
  margin: 1rem 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.pf-filters {
  margin-bottom: 1.5rem;
}

.pf-filter-form {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 18, 26, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.pf-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.pf-filter-field {
  display: grid;
  gap: 0.35rem;
  min-width: 10rem;
}

.pf-filter-field--grow {
  flex: 1;
  min-width: min(100%, 16rem);
}

.pf-filter-field span {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pf-filter-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.pf-filter-field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 18, 0.75);
  color: var(--text);
  font: inherit;
}

.pf-filter-btn {
  padding: 0.72rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(61, 214, 198, 0.35);
  background: rgba(61, 214, 198, 0.12);
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pf-filter-btn:hover {
  background: rgba(61, 214, 198, 0.2);
  border-color: rgba(61, 214, 198, 0.5);
}

.pf-grid-section {
  padding-bottom: 4.5rem;
}

.pf-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

.pf-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 48%),
    rgba(14, 18, 26, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.pf-card:hover {
  transform: translateY(-6px);
  border-color: rgba(61, 214, 198, 0.38);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.pf-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.pf-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d1218;
}

.pf-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.pf-card:hover .pf-card-media img {
  transform: scale(1.05);
}

.pf-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 70% at 20% 20%, rgba(61, 214, 198, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(122, 162, 255, 0.14), transparent 50%),
    #10141b;
}

.pf-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #041014;
  background: var(--accent);
}

.pf-card-body {
  padding: 1.1rem 1.15rem 0.5rem;
  flex: 1;
}

.pf-card-meta {
  margin: 0 0 0.35rem;
  color: var(--accent-2);
  font-size: 0.82rem;
}

.pf-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.pf-card-client {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pf-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.5rem 1.15rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

.pf-card-cta::after {
  content: "→";
  transition: transform 0.22s ease;
}

.pf-card:hover .pf-card-cta::after {
  transform: translateX(4px);
}

.pf-card--featured {
  border-color: rgba(61, 214, 198, 0.22);
}

.pf-empty {
  margin: 2rem 0;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

/* Dettaglio */
.pf-detail-hero {
  position: relative;
  isolation: isolate;
  padding: 3rem 0 2.5rem;
  overflow: hidden;
}

.pf-detail-hero-inner {
  position: relative;
  z-index: 2;
}

.pf-detail-client {
  margin: 0.65rem 0 0;
  color: var(--accent-2);
  font-size: 0.95rem;
}

.pf-detail-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: saturate(0.9);
}

.pf-detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 20, 0.35) 0%, rgba(11, 15, 20, 0.92) 78%);
}

.pf-detail-body {
  padding-bottom: 4.5rem;
}

.pf-tags {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pf-tags li {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  color: var(--muted);
}

.pf-content {
  max-width: 68ch;
  line-height: 1.7;
}

.pf-content :is(h2, h3, h4) {
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.02em;
}

.pf-content p {
  margin: 0 0 1rem;
  color: rgba(232, 238, 246, 0.9);
}

.pf-back {
  margin: 2.5rem 0 0;
}

.pf-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.pf-back-link::before {
  content: "←";
}

@media (max-width: 720px) {
  .pf-hero { padding: 2.5rem 0 1.5rem; }
  .pf-filter-row { flex-direction: column; align-items: stretch; }
  .pf-filter-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-card,
  .pf-card-media img,
  .pf-card-cta::after {
    transition: none;
  }
  .pf-card:hover {
    transform: none;
  }
  .pf-card:hover .pf-card-media img {
    transform: none;
  }
}
