/* نمونه‌کار — گالری مطالعه موردی (هویت بصری مستقل از مرکز خدمات) */

.portfolio-showcase-page {
  --pf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pf-accent: #7c3aed;
  --pf-accent-2: #f59e0b;
  --pf-accent-soft: rgb(124 58 237 / 0.12);
  --pf-accent-border: rgb(124 58 237 / 0.28);
  --pf-radius-lg: 24px;
  --pf-radius-md: 16px;
  --pf-max: min(1240px, calc(100% - clamp(1.25rem, 4vw, 2.75rem)));
}

[data-theme="dark"] .portfolio-showcase-page {
  --pf-accent-soft: rgb(167 139 250 / 0.14);
  --pf-accent-border: rgb(167 139 250 / 0.32);
}

.portfolio-showcase-page .site-main.container {
  padding-top: var(--header-clearance);
}

.pf-hub-main.container {
  width: var(--pf-max);
  max-width: 1240px;
}

.pf-hub {
  position: relative;
  isolation: isolate;
  padding-block: var(--space-4) clamp(3rem, 7vw, 5rem);
  font-family: var(--font-sans);
}

/* —— Ambient —— */
.pf-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.pf-ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: pf-orb-float 18s var(--pf-ease) infinite;
}

.pf-ambient__orb--a {
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgb(124 58 237 / 0.35), transparent 70%);
}

.pf-ambient__orb--b {
  width: min(440px, 60vw);
  height: min(440px, 60vw);
  bottom: 5%;
  right: -10%;
  background: radial-gradient(circle, rgb(245 158 11 / 0.22), transparent 72%);
  animation-delay: -6s;
}

.pf-ambient__grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgb(15 23 42 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgb(15 23 42 / 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black, transparent);
}

[data-theme="dark"] .pf-ambient__grid {
  opacity: 0.2;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.04) 1px, transparent 1px);
}

@keyframes pf-orb-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(3%, 4%, 0) scale(1.05);
  }
}

.pf-kicker {
  margin: 0 0 0.45rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pf-accent);
}

.pf-lead,
.pf-section__sub,
.pf-muted {
  color: var(--color-text-muted);
  line-height: 1.75;
}

.pf-lead {
  margin: 0 0 1.25rem;
  max-width: 52ch;
  font-size: var(--text-md);
}

/* —— Hero —— */
.pf-hero {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.25rem, 3.5vw, 2rem);
  border-radius: var(--pf-radius-lg);
  overflow: hidden;
}

@media (min-width: 960px) {
  .pf-hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: stretch;
  }
}

.pf-hero h1 {
  margin: 0 0 0.75rem;
  max-width: 16ch;
  font-size: clamp(1.85rem, 4.8vw, 2.65rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.pf-hero__accent {
  display: block;
  background: linear-gradient(105deg, var(--pf-accent), var(--pf-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pf-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.pf-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.pf-trust li {
  position: relative;
  padding-inline-start: 0.85rem;
}

.pf-trust li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pf-accent-2);
}

.pf-hero__stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pf-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: var(--pf-radius-md);
}

.pf-stats__item {
  text-align: center;
}

.pf-stats__item strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pf-stats__item span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.pf-spotlight {
  position: relative;
  display: grid;
  gap: 0;
  flex: 1;
  min-height: 220px;
  padding: 0;
  border-radius: var(--pf-radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.45s var(--pf-ease), box-shadow 0.45s var(--pf-ease);
}

.pf-spotlight:hover {
  transform: translateY(-3px);
}

.pf-spotlight__badge {
  position: absolute;
  top: 0.85rem;
  inset-inline-start: 0.85rem;
  z-index: 2;
  padding: 0.25rem 0.65rem;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.72);
  color: #fff;
}

.pf-spotlight__media {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.pf-spotlight__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--pf-ease);
}

.pf-spotlight:hover .pf-spotlight__media img {
  transform: scale(1.04);
}

.pf-spotlight__blueprint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  aspect-ratio: 16 / 10;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: linear-gradient(135deg, var(--pf-accent-soft), transparent);
}

.pf-spotlight__blueprint i {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--pf-accent-border);
}

.pf-spotlight__body {
  padding: 1rem 1.1rem 1.15rem;
}

.pf-spotlight__domain {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--pf-accent);
}

.pf-spotlight__body strong {
  display: block;
  margin: 0.35rem 0;
  font-size: var(--text-lg);
  line-height: 1.35;
}

.pf-spotlight__body p {
  margin: 0 0 0.65rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.pf-spotlight__metric span {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.pf-spotlight__go {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--pf-accent);
}

/* —— Marquee —— */
.pf-marquee {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.pf-marquee__track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: pf-marquee 32s linear infinite;
}

.pf-marquee__track span {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.65;
}

@keyframes pf-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* —— Section —— */
.pf-section {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.pf-section__head {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .pf-section__head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.pf-section__head--center {
  align-items: center;
  text-align: center;
}

.pf-section__head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
}

.pf-section__sub {
  margin: 0;
  max-width: 48ch;
  font-size: var(--text-sm);
}

/* —— Filters —— */
.pf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pf-filter {
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.5);
  color: var(--color-text);
  cursor: pointer;
  transition:
    background 0.25s var(--pf-ease),
    border-color 0.25s var(--pf-ease),
    color 0.25s var(--pf-ease),
    transform 0.25s var(--pf-ease);
}

[data-theme="dark"] .pf-filter {
  background: rgb(15 23 42 / 0.45);
}

.pf-filter:hover {
  border-color: var(--pf-accent-border);
}

.pf-filter.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--pf-accent), #9333ea);
  color: #fff;
  transform: translateY(-1px);
}

/* —— Grid —— */
.pf-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .pf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pf-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pf-card--featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
  }

  .pf-card--featured .pf-card__visual {
    min-height: 100%;
    aspect-ratio: auto;
  }

  .pf-card--featured .pf-card__body {
    padding: 1.35rem 1.5rem;
  }
}

.pf-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--pf-radius-md);
  overflow: hidden;
  transition:
    opacity 0.35s var(--pf-ease),
    transform 0.35s var(--pf-ease),
    filter 0.35s var(--pf-ease);
}

.pf-card.is-hidden {
  display: none;
}

.pf-card__visual {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--pf-accent-soft);
}

.pf-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--pf-ease);
}

.pf-card:hover .pf-card__visual img {
  transform: scale(1.05);
}

.pf-card__signal {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  padding: 1rem;
}

.pf-card__signal span {
  padding: 0.25rem 0.55rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.55);
  border: 1px solid var(--pf-accent-border);
}

[data-theme="dark"] .pf-card__signal span {
  background: rgb(15 23 42 / 0.6);
}

.pf-card__index {
  position: absolute;
  bottom: 0.65rem;
  inset-inline-start: 0.65rem;
  padding: 0.2rem 0.5rem;
  font-size: var(--text-xs);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
  background: rgb(15 23 42 / 0.75);
  color: #fff;
}

.pf-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
  padding: 1.1rem 1.15rem 1.2rem;
}

.pf-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.pf-card__domain {
  font-weight: 700;
  color: var(--pf-accent);
}

.pf-card__body h3 {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.4;
}

.pf-card__body h3 a {
  color: inherit;
  text-decoration: none;
}

.pf-card__body h3 a:hover {
  color: var(--pf-accent);
}

.pf-card__body > p {
  margin: 0;
  flex: 1;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

.pf-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pf-card__stack li {
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--color-surface-2);
}

.pf-card__link {
  margin-top: 0.25rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--pf-accent);
  text-decoration: none;
}

.pf-empty-filter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-radius: var(--pf-radius-md);
  border: 1px dashed var(--color-border);
}

.pf-empty-filter[hidden] {
  display: none !important;
}

/* —— Process —— */
.pf-process {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .pf-process {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pf-process__step {
  padding: 1.15rem 1.1rem;
  border-radius: var(--pf-radius-md);
}

.pf-process__num {
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--pf-accent-2);
}

.pf-process__step h3 {
  margin: 0 0 0.45rem;
  font-size: var(--text-md);
}

.pf-process__step p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* —— CTA —— */
.pf-cta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--pf-radius-lg);
}

@media (min-width: 768px) {
  .pf-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.pf-cta h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  max-width: 28ch;
}

.pf-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* —— Empty —— */
.pf-empty {
  text-align: center;
  padding: clamp(2rem, 6vw, 3.5rem);
  border-radius: var(--pf-radius-lg);
  margin-bottom: 3rem;
}

.pf-empty__icon {
  display: block;
  margin-bottom: 1rem;
  color: var(--pf-accent);
}

.pf-empty h2 {
  margin: 0 0 0.5rem;
}

.pf-empty p {
  max-width: 40ch;
  margin: 0 auto 1.25rem;
  color: var(--color-text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .pf-marquee__track,
  .pf-ambient__orb {
    animation: none;
  }

  .pf-card,
  .pf-spotlight {
    transition: none;
  }
}

@media (max-width: 959px) {
  .pf-card--featured {
    grid-column: auto;
  }
}
