/* ===== PORTFOLIO PAGE ===== */



/* --- Hero --- */

.portfolio-hero {

  background: var(--bg);

  padding: 88px 0 56px;

  text-align: center;

  position: relative;

  overflow: hidden;

  border-bottom: 1px solid rgba(78, 43, 52, 0.08);

}



.portfolio-hero::before {

  content: '';

  position: absolute;

  top: -120px;

  left: 50%;

  transform: translateX(-50%);

  width: min(720px, 90vw);

  height: 320px;

  background: radial-gradient(ellipse at center, rgba(231, 221, 210, 0.65) 0%, transparent 70%);

  pointer-events: none;

}



.portfolio-hero::after {

  content: '';

  position: absolute;

  bottom: 0;

  left: 50%;

  transform: translateX(-50%);

  width: min(480px, 60vw);

  height: 1px;

  background: linear-gradient(90deg, transparent, rgba(78, 43, 52, 0.28), transparent);

  pointer-events: none;

}



.portfolio-hero__inner {

  position: relative;

  max-width: 720px;

  margin: 0 auto;

}



.portfolio-hero__eyebrow {

  font-size: 10px;

  font-weight: 600;

  letter-spacing: 0.28em;

  text-transform: uppercase;

  color: var(--accent);

  opacity: 0.9;

  margin-bottom: 20px;

}



.portfolio-hero__title {

  font-family: var(--font-display);

  font-size: clamp(40px, 5.5vw, 64px);

  font-weight: 500;

  color: var(--accent);

  letter-spacing: 0.04em;

  line-height: 1.12;

  margin-bottom: 0;

}



.portfolio-hero__divider {

  width: 56px;

  height: 2px;

  background: var(--accent);

  opacity: 0.5;

  margin: 28px auto;

}



.portfolio-hero__subtitle {

  font-family: var(--font-body);

  font-size: clamp(14px, 1.6vw, 16px);

  font-weight: 400;

  letter-spacing: 0.01em;

  text-transform: none;

  color: var(--text-muted);

  line-height: 1.65;

  max-width: 560px;

  margin: 0 auto 36px;

}



.portfolio-hero__facts {

  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 0;

  list-style: none;

  padding: 0;

  margin: 0;

}



.portfolio-hero__fact {

  font-size: 11px;

  font-weight: 500;

  letter-spacing: 0.12em;

  text-transform: uppercase;

  color: var(--text);

  padding: 10px 22px;

  border: 1px solid rgba(78, 43, 52, 0.18);

  background: rgba(255, 255, 255, 0.45);

}



.portfolio-hero__fact:not(:last-child) {

  border-right: none;

}



.portfolio-hero__fact:first-child {

  border-radius: 4px 0 0 4px;

}



.portfolio-hero__fact:last-child {

  border-radius: 0 4px 4px 0;

}



/* --- Filters --- */

.filters {

  padding: 0 0 40px;

}



.filters__panel {

  background: var(--white);

  border: 1px solid rgba(78, 43, 52, 0.14);

  border-radius: 999px;

  padding: 6px;

  box-shadow: 0 8px 32px rgba(43, 38, 35, 0.05);

}



.filters__inner {

  display: flex;

  justify-content: center;

  flex-wrap: nowrap;

  gap: 4px;

  overflow-x: auto;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;

}



.filters__inner::-webkit-scrollbar {

  display: none;

}



.filter-btn {

  flex-shrink: 0;

  padding: 12px 24px;

  font-size: 10px;

  font-weight: 600;

  letter-spacing: 0.14em;

  text-transform: uppercase;

  border: 1px solid transparent;

  border-radius: 999px;

  background: transparent;

  color: var(--accent);

  cursor: pointer;

  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;

  white-space: nowrap;

}



.filter-btn.active {

  background: var(--accent);

  color: var(--white);

  border-color: var(--accent);

}



.filter-btn:hover:not(.active) {

  background: rgba(78, 43, 52, 0.06);

  border-color: rgba(78, 43, 52, 0.12);

}



/* --- Project grid --- */

.projects-section {

  padding: 0 0 88px;

}



.portfolio-grid {

  display: grid;

  grid-template-columns: repeat(12, 1fr);

  gap: 24px;

  grid-auto-flow: dense;

}



.project-card {

  cursor: pointer;

  grid-column: span 4;

  transition: opacity 0.4s ease, transform 0.4s ease;

  outline: none;

}



.project-card:focus-visible {

  box-shadow: 0 0 0 2px var(--accent);

  border-radius: 8px;

}



.project-card.hidden {

  display: none;

}



.project-card--featured {

  grid-column: span 7;

}



.project-card--accent {

  grid-column: span 5;

}



.project-card__image-wrap {

  position: relative;

  overflow: hidden;

  border-radius: 8px 8px 0 0;

  aspect-ratio: 4 / 3;

}



/* .portfolio-watermark — базовые стили в style.css */



.project-card--featured .project-card__image-wrap,

.project-card--accent .project-card__image-wrap {

  aspect-ratio: 16 / 10;

}



.project-card__image {

  width: 100%;

  height: 100%;

  object-fit: cover;

  transition: transform 0.55s ease;

}



.project-card:hover .project-card__image,

.project-card:focus-visible .project-card__image {

  transform: scale(1.04);

}



.project-card__overlay {

  position: absolute;

  inset: 0;

  background: rgba(43, 38, 35, 0.5);

  display: flex;

  align-items: center;

  justify-content: center;

  opacity: 0;

  transition: opacity 0.4s ease;

}



.project-card:hover .project-card__overlay,

.project-card:focus-visible .project-card__overlay {

  opacity: 1;

}



.project-card__view-btn {

  padding: 12px 24px;

  font-size: 10px;

  font-weight: 600;

  letter-spacing: 0.14em;

  text-transform: uppercase;

  background: var(--white);

  color: var(--accent);

  border-radius: 4px;

  transform: translateY(8px);

  transition: transform 0.4s ease;

  pointer-events: none;

}



.project-card:hover .project-card__view-btn,

.project-card:focus-visible .project-card__view-btn {

  transform: translateY(0);

}



.project-card__body {

  background: var(--white);

  padding: 22px 24px 24px;

  border-radius: 0 0 8px 8px;

  border: 1px solid rgba(78, 43, 52, 0.06);

  border-top: none;

}



.project-card__category {

  display: block;

  font-size: 10px;

  font-weight: 600;

  letter-spacing: 0.14em;

  text-transform: uppercase;

  color: var(--accent);

  opacity: 0.85;

  margin-bottom: 8px;

}



.project-card__title {

  font-family: var(--font-display);

  font-size: 22px;

  font-weight: 500;

  color: var(--text);

  margin-bottom: 10px;

  line-height: 1.25;

}



.project-card--featured .project-card__title {

  font-size: 26px;

}



.project-card__stats {

  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 8px;

  font-size: 11px;

  font-weight: 500;

  letter-spacing: 0.08em;

  text-transform: uppercase;

  color: #8a8a8a;

  margin-bottom: 10px;

}



.project-card__stats .dot {

  width: 3px;

  height: 3px;

  border-radius: 50%;

  background: #8a8a8a;

  flex-shrink: 0;

}



.project-card__stats:empty {

  display: none;

  margin: 0;

}



.project-card__review-tag {

  display: inline-block;

  font-size: 9px;

  font-weight: 600;

  letter-spacing: 0.12em;

  text-transform: uppercase;

  color: var(--accent);

  opacity: 0.72;

  padding: 4px 0 2px;

  margin-bottom: 6px;

}



.project-card__desc {

  font-size: 13px;

  line-height: 1.55;

  color: var(--text-muted);

  margin: 0;

}



/* --- Project detail modal --- */

#modalOverlay.modal-overlay {

  background: rgba(0, 0, 0, 0.85);

  z-index: 200;

  padding: 24px;

}



#modalOverlay .modal {

  max-width: 920px;

  max-height: 92vh;

  overflow-y: auto;

  padding: 0;

  border-radius: 10px;

}



#modalOverlay .modal__close {

  top: 16px;

  right: 16px;

  width: 40px;

  height: 40px;

  background: rgba(255, 255, 255, 0.92);

  border-radius: 50%;

  display: flex;

  align-items: center;

  justify-content: center;

  z-index: 10;

}



#modalOverlay .modal__close:hover {

  background: var(--white);

}



#modalOverlay .modal__close svg {

  width: 18px;

  height: 18px;

  stroke: var(--text);

}



.modal__gallery {

  position: relative;

  width: 100%;

  height: 75vh;

  max-height: 75vh;

  overflow: hidden;

  background: var(--bg);

  flex-shrink: 0;

}



.modal__gallery-track {

  display: flex;

  height: 100%;

  transition: transform 0.4s ease;

}



.modal__gallery-slide {

  position: relative;

  min-width: 100%;

  height: 100%;

  flex-shrink: 0;

}



.modal__gallery-stage {

  position: relative;

  width: 100%;

  height: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  background: var(--bg);

  box-shadow: inset 0 0 0 1px rgba(78, 43, 52, 0.07);

}



.modal__gallery-frame {

  position: relative;

  flex-shrink: 0;

  line-height: 0;

  overflow: hidden;

}



.modal__gallery-frame img {

  display: block;

  width: 100%;

  height: 100%;

  object-fit: contain;

  object-position: center;

}



.modal__gallery-frame .portfolio-watermark {

  top: auto;

  bottom: 16px;

  right: 16px;

  font-size: 30px;

  padding: 10px 20px;

}



.modal__arrow {

  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  width: 44px;

  height: 44px;

  background: rgba(255, 255, 255, 0.9);

  border: none;

  border-radius: 50%;

  cursor: pointer;

  display: flex;

  align-items: center;

  justify-content: center;

  transition: background 0.2s;

  z-index: 5;

}



.modal__arrow:hover {

  background: var(--white);

}



.modal__arrow svg {

  width: 18px;

  height: 18px;

  stroke: var(--text);

}



.modal__arrow--prev {

  left: 16px;

}



.modal__arrow--next {

  right: 16px;

}



.modal__dots {

  position: absolute;

  bottom: 16px;

  left: 50%;

  transform: translateX(-50%);

  display: flex;

  gap: 8px;

  z-index: 5;

}



.modal__dot {

  width: 8px;

  height: 8px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.5);

  border: none;

  cursor: pointer;

  padding: 0;

  transition: background 0.2s, transform 0.2s;

}



.modal__dot.active {

  background: var(--white);

  transform: scale(1.2);

}



#modalOverlay .modal__content {

  padding: 36px 44px 44px;

}



.modal__head {

  margin-bottom: 28px;

  padding-bottom: 24px;

  border-bottom: 1px solid rgba(78, 43, 52, 0.1);

}



.modal__category {

  display: inline-block;

  font-size: 10px;

  font-weight: 600;

  letter-spacing: 0.14em;

  text-transform: uppercase;

  color: var(--accent);

  margin-bottom: 10px;

}



#modalOverlay .modal__title {

  font-family: var(--font-display);

  font-size: clamp(28px, 4vw, 38px);

  font-weight: 500;

  color: var(--text);

  margin-bottom: 14px;

  line-height: 1.2;

}



.modal__stats {

  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 8px;

  font-size: 11px;

  font-weight: 500;

  letter-spacing: 0.1em;

  text-transform: uppercase;

  color: #8a8a8a;

}



.modal__stats .dot {

  width: 3px;

  height: 3px;

  border-radius: 50%;

  background: #8a8a8a;

}



.modal__columns {

  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 32px;

  margin-bottom: 28px;

}



.modal__col-title {

  font-size: 11px;

  font-weight: 600;

  letter-spacing: 0.14em;

  text-transform: uppercase;

  color: var(--accent);

  margin-bottom: 12px;

}



.modal__col-text {

  font-size: 14px;

  color: var(--text-muted);

  line-height: 1.7;

  margin: 0;

}



.modal__stats:empty {

  display: none;

}



.modal__review {

  margin-bottom: 32px;

}



.modal__review.hidden {

  display: none;

}



.modal__review-inner {

  position: relative;

  margin: 0;

  padding: 28px 28px 28px 32px;

  background: var(--secondary);

  border: 1px solid rgba(78, 43, 52, 0.14);

  border-left: 3px solid var(--accent);

  border-radius: 6px;

}



.modal__review-quote {

  position: absolute;

  top: 12px;

  left: 18px;

  font-family: var(--font-display);

  font-size: 56px;

  line-height: 1;

  color: var(--accent);

  opacity: 0.18;

  pointer-events: none;

}



.modal__review-meta {

  display: flex;

  flex-wrap: wrap;

  align-items: baseline;

  gap: 6px 12px;

  margin-bottom: 14px;

  padding-left: 28px;

}



.modal__review-name {

  font-style: normal;

  font-size: 15px;

  font-weight: 600;

  color: var(--text);

}



.modal__review-project {

  font-size: 12px;

  font-weight: 500;

  letter-spacing: 0.06em;

  color: var(--accent);

  opacity: 0.85;

}



.modal__review-text {

  font-size: 14px;

  line-height: 1.75;

  color: var(--text-muted);

  padding-left: 28px;

}



.modal__important {

  margin-bottom: 28px;

  padding: 24px 28px;

  background: var(--bg);

  border-radius: 6px;

  border: 1px solid rgba(78, 43, 52, 0.08);

}



.modal__important-list {

  list-style: none;

  padding: 0;

  margin: 0;

  display: flex;

  flex-direction: column;

  gap: 12px;

}



.modal__important-list li {

  font-size: 14px;

  color: var(--text-muted);

  line-height: 1.55;

  padding-left: 18px;

  position: relative;

}



.modal__important-list li::before {

  content: '';

  position: absolute;

  left: 0;

  top: 0.55em;

  width: 6px;

  height: 1px;

  background: var(--accent);

  opacity: 0.6;

}



.modal__cta {

  width: 100%;

}



/* --- Project / Realization teaser --- */

.portfolio-compare {
  padding: 0 0 72px;
}

.portfolio-compare__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 36px 40px;
  background: var(--secondary);
  border: 1px solid rgba(78, 43, 52, 0.1);
  border-radius: 12px;
}

.portfolio-compare__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 8px;
}

.portfolio-compare__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 480px;
}

.portfolio-compare__btn {
  flex-shrink: 0;
  padding: 12px 24px;
  font-size: 13px;
  white-space: nowrap;
}

/* --- Portfolio CTA --- */

.portfolio-cta {

  background: var(--secondary);

  padding: 88px 0;

  text-align: center;

  border-top: 1px solid rgba(78, 43, 52, 0.08);

}



.portfolio-cta__inner {

  max-width: 560px;

  margin: 0 auto;

}



.portfolio-cta__title {

  font-family: var(--font-display);

  font-size: clamp(28px, 4vw, 42px);

  font-weight: 500;

  color: var(--accent);

  line-height: 1.25;

  margin-bottom: 16px;

}



.portfolio-cta__desc {

  font-size: 15px;

  line-height: 1.65;

  color: var(--text-muted);

  margin-bottom: 32px;

}



.portfolio-cta__btn {

  min-width: 220px;

}



/* --- Responsive --- */

@media (max-width: 1024px) {

  .portfolio-grid {

    grid-template-columns: repeat(2, 1fr);

    gap: 24px;

  }



  .project-card,

  .project-card--accent {

    grid-column: span 1;

  }



  .project-card--featured {

    grid-column: span 2;

  }



  .project-card--accent .project-card__image-wrap {

    aspect-ratio: 4 / 3;

  }



  .modal__columns {

    grid-template-columns: 1fr;

    gap: 24px;

  }



  #modalOverlay .modal__content {

    padding: 28px 32px 36px;

  }

}



@media (max-width: 768px) {

  .portfolio-hero {

    padding: 56px 0 40px;

  }



  .portfolio-hero__facts {

    flex-direction: column;

    align-items: center;

    gap: 8px;

  }



  .portfolio-hero__fact {

    border: 1px solid rgba(78, 43, 52, 0.18);

    border-radius: 4px !important;

    width: 100%;

    max-width: 280px;

    text-align: center;

  }



  .portfolio-hero__fact:not(:last-child) {

    border-right: 1px solid rgba(78, 43, 52, 0.18);

  }



  .filters__panel {

    padding: 6px;

  }



  .filters__inner {

    justify-content: flex-start;

    padding: 2px 4px;

  }



  .filter-btn {

    padding: 10px 18px;

    font-size: 10px;

  }



  .portfolio-grid {

    grid-template-columns: 1fr;

    gap: 20px;

  }



  .project-card,

  .project-card--featured,

  .project-card--accent {

    grid-column: span 1;

  }



  .project-card__image-wrap,

  .project-card--featured .project-card__image-wrap,

  .project-card--accent .project-card__image-wrap {

    aspect-ratio: 4 / 3;

    min-height: 220px;

  }



  .project-card--featured .project-card__title {

    font-size: 22px;

  }



  .projects-section {

    padding-bottom: 64px;

  }



  .portfolio-compare {
    padding-bottom: 48px;
  }

  .portfolio-compare__inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 24px;
    text-align: center;
  }

  .portfolio-compare__desc {
    max-width: none;
  }

  .portfolio-compare__btn {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }



  .portfolio-cta {

    padding: 64px 20px;

  }



  .modal__gallery {

    height: 56vh;

    max-height: 56vh;

  }



  #modalOverlay .modal__content {

    padding: 24px 20px 32px;

  }



  .modal__important {

    padding: 20px;

  }



  .modal__review-inner {

    padding: 22px 20px 22px 24px;

  }



  .modal__review-meta,

  .modal__review-text {

    padding-left: 20px;

  }



  .modal__review-quote {

    font-size: 44px;

    top: 8px;

    left: 12px;

  }



  #modalOverlay.modal-overlay {

    padding: 12px;

  }

}



@media (max-width: 430px) {

  .portfolio-hero__subtitle {

    font-size: 14px;

  }



  .project-card__body {

    padding: 18px 18px 20px;

  }



  .project-card__desc {

    font-size: 12px;

  }



  .portfolio-watermark {

    font-size: 18px;

    padding: 5px 12px;

    top: 10px;

    right: 10px;

  }



  .modal__gallery-frame .portfolio-watermark {

    bottom: 12px;

    right: 12px;

    font-size: 20px;

    padding: 6px 14px;

  }

}



@media (max-width: 375px) {

  .portfolio-hero__title {

    font-size: 34px;

  }



  .filter-btn {

    padding: 9px 14px;

    letter-spacing: 0.1em;

  }

}


