/* Pitcher Agency layout */

body {
  background: #fff;
}

.section-bg {
  background: #fafafa;
}

/* ===== HEADER ===== */
.header-pitcher {
  background: #fff !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: none !important;
}

.header-pitcher.scrolled {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-pitcher .header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.header-start {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  justify-self: start;
}

.header-logo-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #000;
  text-decoration: none !important;
  color: #000 !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: background 0.25s, color 0.25s;
}

.header-logo-box:hover {
  background: #000;
  color: #fff !important;
}

.header-discuss {
  font-size: 14px;
  font-weight: 500;
  color: #000 !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.header-discuss:hover {
  opacity: 0.55;
}

.nav-pitcher {
  justify-self: center;
  gap: clamp(20px, 3vw, 40px);
}

.nav-pitcher a {
  color: #000 !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  position: relative;
  padding: 4px 2px;
  transition: opacity 0.2s;
}

.nav-pitcher a::after {
  display: none !important;
}

.nav-pitcher a.active {
  box-shadow: inset 0 0 0 1px var(--color-accent);
  border-radius: 2px;
  padding: 4px 10px;
}

.nav-pitcher a:hover {
  opacity: 0.55;
}

.nav-pitcher a.active:hover {
  opacity: 1;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}

.header-contacts {
  font-size: 14px;
  font-weight: 500;
  color: #000 !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.header-contacts:hover {
  opacity: 0.55;
}

.header-contacts.active {
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

.header-pitcher .btn-cta,
.header-pitcher .logo,
.header-pitcher .logo img {
  display: none;
}

.header-pitcher .burger span {
  background: #000;
}

/* ===== FOOTER ===== */
.footer-pitcher {
  background: #000;
  color: #fff;
  padding: 0;
  border-top: none;
}

.footer-pitcher-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) var(--container-padding) clamp(24px, 4vw, 40px);
}

.footer-pitcher-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-logo-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.footer-pitcher-brand p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  max-width: 360px;
  margin: 0;
}

.footer-pitcher-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-pitcher-nav a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-pitcher-nav a:hover {
  color: #fff;
}

.footer-pitcher-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-pitcher-contacts a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.footer-pitcher-contacts a:hover {
  color: #fff;
}

.footer-pitcher-cta {
  display: block;
  margin: clamp(40px, 6vw, 64px) 0 clamp(32px, 5vw, 48px);
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff !important;
  text-decoration: none !important;
  transition: opacity 0.3s;
}

.footer-pitcher-cta:hover {
  opacity: 0.6;
}

.footer-pitcher-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}

.footer-pitcher .footer-grid {
  display: none;
}

/* ===== WORKS LIST ===== */
.works-page-head {
  padding: clamp(20px, 3vw, 32px) 0;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.works-page-title {
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}

.works-page-desc {
  margin: 20px 0 0;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.45);
  max-width: 560px;
}

.works-view-toggle {
  display: flex;
  gap: 24px;
  margin-top: 0;
}

.works-view-toggle button {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.works-view-toggle button.is-active {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.works-list-section {
  position: relative;
  background: #fff;
  padding: 0 var(--container-padding) clamp(80px, 10vw, 120px);
}

.works-list {
  max-width: var(--container-max);
  margin: 0 auto;
}

.works-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: clamp(20px, 3vw, 28px) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none !important;
  color: inherit !important;
  transition: opacity 0.25s, padding-left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.works-row:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.works-row:hover {
  padding-left: 8px;
}

.works-list:has(.works-row:hover) .works-row:not(:hover) {
  opacity: 0.35;
}

.works-row-name {
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.works-row-industry,
.works-row-type {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
}

.works-row-type {
  text-align: right;
}

.works-preview {
  position: fixed;
  width: clamp(220px, 22vw, 320px);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92) rotate(-2deg);
  transition: opacity 0.35s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border-radius: 4px;
}

.works-preview.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

.works-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.works-list-section.is-hidden,
.works-mosaic-section.is-hidden {
  display: none;
}

/* ===== WORKS MOSAIC ===== */
.works-mosaic-head {
  padding: clamp(48px, 8vw, 80px) var(--container-padding) clamp(24px, 4vw, 40px);
  background: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.works-mosaic-head h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.works-mosaic-head a {
  font-size: 14px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.works-mosaic {
  background: #000;
}

.works-mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.works-mosaic-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  text-decoration: none !important;
  color: #fff !important;
  display: block;
}

.works-mosaic-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.works-mosaic-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
}

.works-mosaic-item:hover::before {
  transform: scale(1.06);
}

.works-mosaic-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 3vw, 32px);
}

.works-mosaic-title {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 6px;
}

.works-mosaic-cat {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

/* ===== PROJECT CASE (detail pages) ===== */
.project-case-hero {
  position: relative;
  min-height: clamp(420px, 70vh, 720px);
  margin-top: var(--header-height);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #111;
}

.project-case-hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 8s ease-out;
}

.project-case-hero:hover .project-case-hero-bg {
  transform: scale(1.06);
}

.project-case-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.15) 100%);
}

.project-case-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--container-padding);
}

.project-case-back {
  display: inline-block;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.project-case-back:hover {
  color: #fff !important;
}

.project-case-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 16px;
}

.project-case-title {
  font-size: clamp(32px, 5.5vw, 64px) !important;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
  max-width: 900px;
  margin: 0;
}

.project-case-intro {
  padding: clamp(48px, 8vw, 88px) var(--container-padding);
  background: #fff;
}

.project-case-intro-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.project-case-lead {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.75);
  margin: 0;
}

.project-case-facts {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.project-case-fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 14px;
}

.project-case-fact span {
  color: rgba(0, 0, 0, 0.45);
}

.project-case-fact strong {
  font-weight: 600;
  text-align: right;
}

.project-detail-meta,
.project-case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.project-detail-tag,
.project-case-tag {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
}

.project-case-body {
  padding: 0 var(--container-padding) clamp(64px, 10vw, 100px);
  background: #fff;
}

.project-case-body-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.project-case-body h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.project-case-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-case-list li {
  padding: 12px 0 12px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.7);
}

.project-case-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 20px);
  margin-top: clamp(32px, 5vw, 56px);
}

.project-gallery .img-placeholder,
.project-case-gallery-item {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
}

.project-gallery .img-placeholder:first-child,
.project-case-gallery-item:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.project-gallery img,
.project-case-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-case-cta {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Legacy detail page improvements */
.detail-page .page-hero-bg {
  margin-top: 72px;
}

.detail-content .img-placeholder {
  border-radius: 4px;
  overflow: hidden;
}

.detail-content .img-placeholder img {
  width: 100%;
  height: auto;
  display: block;
}

.back-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5) !important;
  text-decoration: none !important;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.back-link:hover {
  color: #000 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .header-pitcher .header-inner {
    grid-template-columns: 1fr auto;
    height: var(--header-height);
  }

  .header-discuss,
  .nav-pitcher,
  .header-contacts {
    display: none;
  }

  .footer-pitcher-top {
    grid-template-columns: 1fr;
  }

  .works-mosaic-grid {
    grid-template-columns: 1fr;
  }

  .works-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .works-row-type {
    text-align: left;
  }

  .works-preview {
    display: none;
  }

  .project-case-intro-grid {
    grid-template-columns: 1fr;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-gallery .img-placeholder:first-child {
    grid-column: auto;
    aspect-ratio: 4 / 3;
  }

  .project-case-hero {
    margin-top: var(--header-height);
    min-height: 55vh;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .works-mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
