/* ==========================================================================
   ПЕРЕПЛЁТ · Агентствам — поверх tokens → base → components → blocks → frames.
   Порядок: hero → что получает заказчик → Даша (форма) → три повода →
   почему удобно → полоса. Мобильные паттерны повторяют ny-mobile.css
   (фотолента в hero, нумерованный список в product, форма в стиле #zina).
   ========================================================================== */

/* ---------- HERO ---------- */
.ag-hero .hero__lead { max-width: 44rem; }
.ag-hero .hero__note { margin-top: 1rem; max-width: 44rem; }
.ag-hero .hero__gallery { min-height: 34rem; }
.ag-hero .hero__photo--1 { width: min(84%, 34rem); top: -8%; }
.ag-hero .hero__photo--2 { width: min(74%, 30rem); top: 50%; }
.ag-hero .hero__stamp { left: 0; right: auto; bottom: -2%; }
.ag-hero .hero__photo--m { display: none; }
@media (max-width: 1080px) { .ag-hero .hero__gallery { min-height: 26rem; } }

/* ---------- ЧТО ПОЛУЧАЕТ ЗАКАЗЧИК ---------- */
.ag-how .product__step p { color: var(--fg); }

/* ---------- ДАША: раскладка как на главной (фото · текст · широкая форма) ---------- */
.ag-contact .manager__text h2 { margin-bottom: 0.75rem; }
.ag-contact .manager__text .lead { margin-bottom: 1.25rem; max-width: none; }
.ag-contact .ag-sticker { display: none; }
.ag-contact .zina__invite { margin: 0 0 0.6rem; font-size: var(--fs-small); color: var(--fg-muted); }
.ag-contact .zina__or { margin: 0.7rem 0 0; font-size: var(--fs-small); color: var(--fg-muted); }
.ag-msg { display: flex; gap: 0.75rem; width: min(100%, 30rem); }
.ag-msg .btn { flex: 1 1 0; min-width: 0; margin: 0; justify-content: center; white-space: nowrap; }
.ag-contact .manager__formwrap { margin-top: 1.5rem; }
.ag-contact .manager__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ag-contact .manager__actions { justify-content: flex-start; text-align: left; }
.ag-contact .manager__actions .caption { margin: 0; max-width: 24rem; }

/* ---------- РАЗДЕЛИТЕЛЬ: лента «вещественное доказательство» ---------- */
.ag-divider {
  position: relative;
  z-index: 5;
  height: 64px;
  margin-block: -32px;
  overflow: hidden;
  pointer-events: none;
}
.ag-divider__tape {
  position: absolute;
  left: -2%; right: -2%;
  top: 0; bottom: 0;
  background: url("../assets/ui/divider-evidence.svg") repeat-x left center / auto 100%;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  transform: rotate(-0.5deg);
}
.ag-divider--how .ag-divider__tape { transform: rotate(0.4deg); }
.ag-divider--formats .ag-divider__tape { transform: rotate(0.5deg); }
@media (max-width: 700px) { .ag-divider { height: 44px; margin-block: -22px; } }

/* ---------- ТРИ ПОВОДА ---------- */
.ag-formats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.ag-format {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem;
  color: inherit;
  text-decoration: none;
}
.ag-format__body { display: flex; flex-direction: column; gap: inherit; flex: 1 1 auto; }
.ag-format__photo { margin: 0 0 0.5rem; }
.ag-format__photo img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }
.ag-format h3 { font-size: var(--fs-h3); line-height: var(--lh-display); margin: 0; }
.ag-format p { margin: 0; font-size: var(--fs-small); color: var(--fg-muted); }
.ag-format__link { margin-top: auto; font-family: var(--font-mono); font-size: var(--fs-caption); text-decoration: underline; text-underline-offset: 0.2em; }
.ag-format:hover .ag-format__link { text-decoration: none; }

/* ---------- ПОЧЕМУ УДОБНО: список + фургон ---------- */
.ag-why__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.ag-why__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  counter-reset: why;
}
.ag-why__list li {
  counter-increment: why;
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  column-gap: 0.65rem;
  row-gap: 0.3rem;
  align-items: baseline;
}
.ag-why__list li::before {
  content: counter(why);
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: var(--lh-display);
}
.ag-why__list h3 { grid-column: 2; grid-row: 1; margin: 0; font-size: var(--fs-h4); line-height: var(--lh-h4); }
.ag-why__list p { grid-column: 2; grid-row: 2; margin: 0; font-size: var(--fs-small); color: var(--fg-muted); }
.ag-why__photo { margin: 0; justify-self: end; width: min(100%, 24rem); }
.ag-why__photo img { width: 100%; height: auto; }

/* ========================================================== МОБИЛКА */
@media (max-width: 899px) {
  /* Hero: фотолента без подписей, как на НГ */
  .ag-hero .hero__gallery .hero__stamp { display: none !important; }
  .ag-hero .hero__photo--m { display: block; }
  .ag-hero .hero__gallery {
    display: flex !important;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1rem var(--gutter) 1.5rem;
    margin-inline: calc(50% - 50vw);
    width: 100vw;
    min-height: 0 !important;
    max-width: none !important;
    scrollbar-width: none;
    align-items: flex-start;
  }
  .ag-hero .hero__gallery::-webkit-scrollbar { display: none; }
  .ag-hero .hero__gallery .hero__photo {
    position: static !important;
    flex: 0 0 68vw;
    width: auto !important;
    margin: 0 !important;
    scroll-snap-align: center;
    padding: 8px 8px 10px;
    --polaroid-foot: 0px;
  }
  .ag-hero .hero__gallery .hero__photo,
  .ag-hero .hero__gallery .hero__photo[data-reveal],
  .ag-hero .hero__gallery .hero__photo[data-reveal].is-in {
    opacity: 1 !important;
    transform: rotate(var(--rot)) !important;
    animation: none !important;
  }
  .ag-hero .hero__gallery .polaroid__caption { display: none; }

  /* Что получает заказчик: нумерованный список + лента фото */
  .ag-how > .container { display: flex; flex-direction: column; }
  .ag-how .product__steps { display: block; counter-reset: step; }
  .ag-how .product__step {
    counter-increment: step;
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    column-gap: 0.65rem;
    row-gap: 0.3rem;
    align-items: baseline;
    margin: 0 0 1.15rem;
    padding: 0;
    background: none;
    background-image: none;
    border: 0;
    box-shadow: none;
    transform: none;
  }
  .ag-how .product__step::before {
    content: counter(step);
    grid-column: 1;
    grid-row: 1;
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    line-height: var(--lh-display);
  }
  .ag-how .product__step h3 { grid-column: 2; grid-row: 1; margin: 0; font-size: var(--fs-h4); }
  .ag-how .product__step p { grid-column: 2; grid-row: 2; margin: 0; }
  .ag-how .product__media {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.5rem var(--gutter) 1.5rem;
    margin: 0.5rem calc(50% - 50vw) 0;
    width: 100vw;
    scrollbar-width: none;
  }
  .ag-how .product__media::-webkit-scrollbar { display: none; }
  .ag-how .product__shot {
    flex: 0 0 68vw;
    margin: 0;
    scroll-snap-align: center;
    padding: 8px 8px 10px;
    background: #fff;
    overflow: hidden;
    transform: rotate(-2deg);
  }
  .ag-how .product__shot:nth-child(2) { transform: rotate(2deg); }
  .ag-how .product__shot:nth-child(3) { transform: rotate(-1deg); }

  /* Даша: как #zina на НГ — стикер, две кнопки, форма в столбик */
  .ag-contact { padding-top: calc(var(--section-y) / 1.5); }
  .ag-contact .manager__grid { display: block; }
  .ag-contact .manager__person { display: none; }
  .ag-contact .manager__text h2 { font-size: var(--fs-h2); }
  .ag-contact .ag-sticker { display: grid; margin: 0.35rem 0 0.85rem; overflow: visible; }
  .ag-contact .zina__invite, .ag-contact .zina__or { text-align: center; }
  .ag-contact .zina__or { margin: 0.7rem 0 1rem; }
  .ag-msg { width: 100%; gap: 0.5rem; }
  .ag-msg .btn { padding-inline: 0.4rem; letter-spacing: 0.03em; }
  .ag-contact .manager__formwrap { margin-top: 0; }
  .ag-contact .manager__fields { grid-template-columns: 1fr; }
  .ag-contact .manager__actions { flex-direction: column; align-items: stretch; gap: 0.6rem; text-align: center; }
  .ag-contact .manager__actions .btn { width: 100%; }

  /* Три повода: лента карточек */
  .ag-formats__grid {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.5rem var(--gutter) 1.5rem;
    margin-inline: calc(50% - 50vw);
    width: 100vw;
    scrollbar-width: none;
  }
  .ag-formats__grid::-webkit-scrollbar { display: none; }
  .ag-format { flex: 0 0 76vw; scroll-snap-align: center; }

  /* Почему удобно: один столбец, фургон между 3-м и 4-м пунктом */
  .ag-why__layout { display: block; }
  .ag-why__list { grid-template-columns: 1fr; gap: 1.1rem; }
  .ag-why__photo { width: min(100%, 22rem); margin: 1.5rem auto 0; }

}
