/*
  Быстрые правки темы Zhemkova Atelier.

  Здесь можно переопределять стили, не трогая основной theme.css.
  Примеры:

  :root {
    --color-wine: #7a1738;
    --color-wine-dark: #551024;
    --color-bg: #fbfaf7;
  }

  .hero {
    background-color: #fbfaf7;
  }

  .final-cta {
    background: #4b1024;
  }
*/


/* =========================================================
   Fix 01: wider desktop layout
   ========================================================= */

@media (min-width: 1181px) {
  :root {
    --container: 1500px;
  }

  .hero__inner {
    grid-template-columns: minmax(560px, 0.95fr) minmax(560px, 1.05fr);
    gap: clamp(44px, 4.6vw, 82px);
  }

  .hero__title {
    max-width: 800px;
    font-size: clamp(48px, 4.35vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.045em;
  }

  .hero__text {
    max-width: 620px;
  }

  .hero__media {
    min-height: min(68svh, 720px);
  }

  .hero__image-frame,
  .hero__showcase {
    min-height: min(68svh, 720px);
  }
}

@media (min-width: 1500px) {
  :root {
    --container: 1540px;
  }

  .hero__title {
    font-size: clamp(54px, 4.15vw, 78px);
  }
}


/* =========================================================
   Fix 02: latest works on homepage must be equal cards
   ========================================================= */

.works-grid.works-grid--latest {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: stretch;
}

.works-grid--latest .work-card,
.works-grid--latest .work-card--1,
.works-grid--latest .work-card--2,
.works-grid--latest .work-card--3,
.works-grid--latest .work-card--4,
.works-grid--latest .work-card--5,
.works-grid--latest .work-card--6 {
  grid-column: auto;
  grid-row: auto;
  min-height: 520px;
}

.works-grid--latest .work-card__shade {
  background:
    linear-gradient(180deg, transparent 18%, rgba(251, 250, 247, 0.92) 100%),
    linear-gradient(90deg, rgba(251, 250, 247, 0.62), transparent 60%);
}

.works-grid--latest .work-card__content {
  left: 28px;
  right: 28px;
  bottom: 28px;
}

.works-grid--latest .work-card__content h3 {
  max-width: 360px;
}

.works-grid--latest .work-card__content p {
  max-width: 360px;
}

@media (max-width: 980px) {
  .works-grid.works-grid--latest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .works-grid--latest .work-card,
  .works-grid--latest .work-card--1,
  .works-grid--latest .work-card--2,
  .works-grid--latest .work-card--3 {
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .works-grid.works-grid--latest {
    grid-template-columns: 1fr;
  }

  .works-grid--latest .work-card,
  .works-grid--latest .work-card--1,
  .works-grid--latest .work-card--2,
  .works-grid--latest .work-card--3 {
    min-height: 340px;
  }

  .works-grid--latest .work-card__content {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }
}


/* =========================================================
   Fix 03: portfolio archive cards should keep clean equal rhythm
   ========================================================= */

.portfolio-card {
  height: 100%;
}

.portfolio-card__content {
  display: flex;
  flex-direction: column;
}

.portfolio-card__link {
  margin-top: auto;
  padding-top: 18px;
}



/* =========================================================
   Hero as full background image
   Use with: Главная → Первый экран → Фоновое изображение hero
   ========================================================= */

.hero--has-bg {
  min-height: calc(100svh - 78px);
  background-image:
    linear-gradient(
      90deg,
      rgba(251, 250, 247, 0.96) 0%,
      rgba(251, 250, 247, 0.86) 34%,
      rgba(251, 250, 247, 0.18) 62%,
      rgba(251, 250, 247, 0.04) 100%
    ),
    var(--hero-bg);
  background-size: cover;
  background-position: var(--hero-bg-position);
  background-repeat: no-repeat;
}

.hero--has-bg .hero__inner {
  grid-template-columns: minmax(0, 690px);
  min-height: calc(100svh - 78px);
  align-items: center;
}

.hero--has-bg .hero__media {
  display: none;
}

.hero--has-bg .hero__title {
  max-width: 690px;
  font-size: clamp(50px, 4.6vw, 82px);
  line-height: 0.98;
}

.hero--has-bg .hero__text {
  max-width: 560px;
}

.hero--has-bg .hero__features {
  max-width: 720px;
}

@media (max-width: 920px) {
  .hero--has-bg {
    background-image:
      linear-gradient(
        180deg,
        rgba(251, 250, 247, 0.96) 0%,
        rgba(251, 250, 247, 0.9) 50%,
        rgba(251, 250, 247, 0.72) 100%
      ),
      var(--hero-bg);
    background-position: center top;
  }

  .hero--has-bg .hero__inner {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .hero--has-bg .hero__title {
    font-size: clamp(38px, 12vw, 54px);
  }
}


/* =========================================================
   Hero final polish after real background
   ========================================================= */

@media (min-width: 1181px) {
  .hero--has-bg {
    padding: 34px 0 28px;
    background-image:
      linear-gradient(
        90deg,
        rgba(251, 250, 247, 0.96) 0%,
        rgba(251, 250, 247, 0.84) 30%,
        rgba(251, 250, 247, 0.24) 46%,
        rgba(251, 250, 247, 0.02) 68%,
        rgba(251, 250, 247, 0) 100%
      ),
      var(--hero-bg);
  }

  .hero--has-bg .hero__inner {
    grid-template-columns: minmax(0, 760px);
    min-height: calc(100svh - 78px);
  }

  .hero--has-bg .hero__title {
    max-width: 760px;
    font-size: clamp(54px, 4vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.045em;
  }

  .hero--has-bg .hero__text {
    max-width: 590px;
    margin-top: 26px;
  }

  .hero--has-bg .hero__lead {
    font-size: clamp(24px, 1.65vw, 30px);
  }

  .hero--has-bg .hero__actions {
    margin-top: 32px;
  }

  .hero--has-bg .hero__features {
    max-width: 760px;
    margin-top: 44px;
    gap: 14px;
  }

  .hero--has-bg .hero-feature {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  .hero--has-bg .hero-feature__icon {
    width: 34px;
    height: 34px;
  }
}

@media (min-width: 1600px) {
  .hero--has-bg .hero__title {
    font-size: 76px;
  }
}


/* =========================================================
   Cookie popup
   ========================================================= */

.cookie-popup {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cookie-popup[hidden] {
  display: none;
}

.cookie-popup__content {
  width: min(100%, 920px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid rgba(99, 72, 82, 0.14);
  border-radius: 16px;
  background: rgba(251, 250, 247, 0.96);
  box-shadow: 0 24px 80px rgba(73, 42, 52, 0.18);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.cookie-popup h2 {
  margin: 0 0 6px;
  color: #302930;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
}

.cookie-popup p {
  margin: 0;
  color: #625960;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-popup a {
  color: var(--color-wine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-popup__button {
  min-height: 46px;
  flex: 0 0 auto;
  padding: 0 24px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--color-wine);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.cookie-popup__button:hover {
  background: var(--color-wine-dark);
}

@media (max-width: 680px) {
  .cookie-popup {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .cookie-popup__content {
    display: grid;
    gap: 16px;
    padding: 20px;
  }

  .cookie-popup__button {
    width: 100%;
  }
}


/* =========================================================
   Legal page
   ========================================================= */

.legal-hero {
  padding: 86px 0 46px;
  background:
    radial-gradient(circle at 84% 18%, rgba(122, 23, 56, 0.08), transparent 28%),
    linear-gradient(180deg, #fffdfa 0%, #f7f3ef 100%);
}

.legal-hero__eyebrow {
  margin: 0 0 16px;
  color: var(--color-muted);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 900px;
  margin: 0;
  color: #2b2630;
  font-family: var(--font-serif);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.legal-content {
  padding: 46px 0 86px;
  background: #f7f3ef;
}

.legal-content__box {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 54px);
  border: 1px solid rgba(99, 72, 82, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 54px rgba(73, 42, 52, 0.075);
}

.legal-content__box h2 {
  margin: 34px 0 14px;
  color: #302930;
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.4vw, 38px);
  font-weight: 400;
  line-height: 1.1;
}

.legal-content__box h2:first-child {
  margin-top: 0;
}

.legal-content__box p,
.legal-content__box li {
  color: #514950;
  font-size: 16px;
  line-height: 1.72;
}

.legal-content__box ul {
  padding-left: 22px;
}

.legal-content__box p {
  margin: 0 0 14px;
}


/* Footer developer link */

.site-footer__bottom-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px 22px;
}

.site-footer__dev {
  color: rgba(255, 255, 255, 0.52);
}

.site-footer__dev:hover {
  color: #fff;
}

@media (max-width: 680px) {
  .site-footer__bottom-links {
    justify-content: flex-start;
  }
}
