/* =====================================================================
   Agro-GT — дизайн-система «Индустриальный люкс».
   Тёплая «бумажная» база + графитовые тёмные секции, глубокий зелёный,
   тёплый янтарный CTA. Крупная типографика (Unbounded — акценты,
   Manrope — рабочий текст), строгая сетка, дуотон-фотография.
   Префикс классов: ag-.
   ===================================================================== */

/* ── Токены ─────────────────────────────────────────────────────────── */
:root {
    --ink:      #14181a;   /* основной текст, графит */
    --ink-2:    #2b3230;
    --graphite: #171d1f;   /* тёмные секции */
    --graphite-2:#1f2729;
    --paper:    #f5f2ec;   /* фон страницы — тёплая бумага */
    --paper-2:  #efeae1;
    --card:     #ffffff;
    --green:    #123f31;   /* бренд, глубокий лес */
    --green-2:  #1d6a52;   /* акцент, ховеры */
    --green-ink:#0d2c23;
    --amber:    #c07a2c;   /* тёплый акцент CTA */
    --amber-2:  #a5651e;
    --muted:    #5d6560;   /* второстепенный текст */
    --muted-d:  #a9b3af;   /* второстепенный на тёмном */
    --line:     rgba(20,24,26,.12);
    --line-2:   rgba(20,24,26,.08);
    --line-d:   rgba(255,255,255,.14);

    --wrap: 1320px;
    --pad: clamp(20px, 5vw, 56px);
    --r: 4px;               /* базовый радиус — сдержанный, «инженерный» */
    --r-lg: 8px;
    --shadow: 0 1px 2px rgba(20,24,26,.04), 0 12px 32px -18px rgba(20,24,26,.28);
    --shadow-lg: 0 2px 6px rgba(20,24,26,.05), 0 30px 60px -30px rgba(20,24,26,.35);

    --f-sans: "Manrope", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
    --f-disp: "Unbounded", var(--f-sans);

    --ease: cubic-bezier(.22,.61,.36,1);
    --dur: .5s;
}

/* ── Сброс/база ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--f-sans);
    font-size: clamp(15.5px, 15px + .2vw, 17.5px);
    line-height: 1.62;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }
::selection { background: var(--green-2); color: #fff; }

/* ── Контейнер / секции ─────────────────────────────────────────────── */
.ag-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.ag-sec { padding-block: clamp(56px, 4vw + 40px, 120px); }
.ag-sec--tight { padding-block: clamp(40px, 3vw + 24px, 72px); }
.ag-dark { background: var(--graphite); color: #efeae1; }
.ag-dark h1, .ag-dark h2, .ag-dark h3 { color: #fff; }
.ag-green { background: var(--green); color: #eaf1ec; }
.ag-green h2, .ag-green h3 { color: #fff; }

/* ── Типографика-утилиты ────────────────────────────────────────────── */
.ag-eyebrow {
    display: inline-flex; align-items: center; gap: .6em;
    font-family: var(--f-disp); font-weight: 600;
    font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--green-2);
}
.ag-dark .ag-eyebrow, .ag-green .ag-eyebrow { color: var(--amber); }
.ag-eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; opacity: .9; }

.ag-h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.1rem); }
.ag-h3 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.55rem); }
.ag-lead { font-size: clamp(1.02rem, .98rem + .35vw, 1.22rem); color: var(--muted); line-height: 1.55; }
.ag-dark .ag-lead, .ag-green .ag-lead { color: var(--muted-d); }
.ag-measure { max-width: 62ch; }

/* Заголовок секции: индекс (Unbounded) + заголовок + ссылка справа */
.ag-shead { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; margin-bottom: clamp(28px, 3vw, 52px); }
.ag-shead__l { max-width: 42ch; }
.ag-shead__idx { font-family: var(--f-disp); font-weight: 700; font-size: .8rem; color: var(--amber); letter-spacing: .08em; }
.ag-shead .ag-h2 { margin-top: 14px; }
.ag-shead__sub { margin-top: 14px; color: var(--muted); }
.ag-dark .ag-shead__sub { color: var(--muted-d); }
.ag-shead__link { align-self: end; white-space: nowrap; }

/* ── Кнопки ─────────────────────────────────────────────────────────── */
.ag-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6em;
    padding: 15px 26px; border-radius: var(--r);
    font-weight: 700; font-size: .95rem; letter-spacing: .01em;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform .25s var(--ease), border-color var(--dur) var(--ease);
    will-change: transform;
}
.ag-btn svg { width: 18px; height: 18px; flex: none; }
.ag-btn:active { transform: translateY(1px); }
.ag-btn--primary { background: var(--amber); color: #fff; }
.ag-btn--primary:hover { background: var(--amber-2); }
.ag-btn--dark { background: var(--ink); color: #fff; }
.ag-btn--dark:hover { background: #000; }
.ag-btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.ag-btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.ag-dark .ag-btn--ghost, .ag-green .ag-btn--ghost { color: #fff; border-color: var(--line-d); }
.ag-dark .ag-btn--ghost:hover, .ag-green .ag-btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.ag-btn--lg { padding: 17px 32px; font-size: 1rem; }

/* Текстовая ссылка со стрелкой */
.ag-link { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; color: var(--green-2); }
.ag-link svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.ag-link:hover svg { transform: translateX(4px); }
.ag-dark .ag-link, .ag-green .ag-link { color: var(--amber); }

/* ── Шапка ──────────────────────────────────────────────────────────── */
.ag-hd {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
    transition: background .4s var(--ease), border-color .4s var(--ease);
}
.ag-hd.is-stuck { background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom-color: var(--line); }
.ag-hd__in { display: flex; align-items: center; gap: 28px; height: 76px; }
.ag-logo { display: inline-flex; align-items: center; gap: 11px; font-family: var(--f-disp); font-weight: 700; font-size: 1.16rem; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.ag-logo__mark { width: 30px; height: 30px; border-radius: 6px; background: linear-gradient(140deg, var(--green-2), var(--green)); position: relative; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.ag-logo__mark::after { content: ""; position: absolute; inset: 9px; border-radius: 2px; border: 2px solid var(--amber); border-right-color: transparent; border-bottom-color: transparent; }
.ag-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.ag-nav a { padding: 9px 13px; border-radius: var(--r); font-weight: 600; font-size: .93rem; color: var(--ink-2); transition: color .25s, background .25s; }
.ag-nav a:hover { color: var(--green); background: rgba(18,63,49,.06); }
.ag-nav a.is-active { color: var(--green); }
.ag-hd__spacer { margin-left: auto; }
.ag-hd__actions { display: flex; align-items: center; gap: 14px; }
.ag-hd__phone { font-family: var(--f-disp); font-weight: 600; font-size: .98rem; color: var(--ink); white-space: nowrap; }
.ag-hd__phone small { display: block; font-family: var(--f-sans); font-weight: 600; font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ag-burger { display: none; width: 44px; height: 44px; border-radius: var(--r); border: 1px solid var(--line); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.ag-burger span { width: 19px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }

/* Мобильное меню */
.ag-mnav { position: fixed; inset: 76px 0 auto; background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px var(--pad) 28px; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s; z-index: 49; }
.ag-mnav.is-open { opacity: 1; transform: none; visibility: visible; }
.ag-mnav a { display: block; padding: 13px 4px; font-family: var(--f-disp); font-weight: 600; font-size: 1.15rem; border-bottom: 1px solid var(--line-2); }
.ag-mnav__cta { margin-top: 20px; display: grid; gap: 10px; }

/* ── Hero (photo-first, дуотон справа) ──────────────────────────────── */
.ag-hero { position: relative; padding-block: clamp(48px, 5vw, 96px) clamp(56px, 5vw, 104px); overflow: hidden; }
.ag-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.ag-hero__k { font-family: var(--f-disp); font-weight: 700; font-size: clamp(1.95rem, 1.1rem + 4vw, 4.6rem); line-height: 1.02; letter-spacing: -.03em; overflow-wrap: break-word; }
.ag-hero__k em { font-style: normal; color: var(--green-2); }
.ag-hero__sub { margin-top: 26px; max-width: 46ch; }
.ag-hero__cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }
.ag-hero__ops { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.ag-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px; background: rgba(255,255,255,.5); font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.ag-chip svg { width: 15px; height: 15px; color: var(--green-2); }

/* Дуотон-медиа-блок героя */
.ag-hero__media { position: relative; aspect-ratio: 4/5; border-radius: var(--r-lg); overflow: hidden; background: var(--green-ink); box-shadow: var(--shadow-lg); }
.ag-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, rgba(18,63,49,.25), rgba(20,24,26,.55)); mix-blend-mode: multiply; }
.ag-duo { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35) contrast(1.03); }
/* Плейсхолдер медиа, пока нет реальных фото (Ф1) */
.ag-ph { position: relative; width: 100%; height: 100%; display: grid; place-items: center; background:
    radial-gradient(120% 120% at 78% 12%, rgba(29,106,82,.55), transparent 55%),
    linear-gradient(160deg, var(--green-ink), var(--ink)); color: rgba(255,255,255,.6); }
.ag-ph svg { width: 34%; height: 34%; opacity: .5; }
.ag-ph__tag { position: absolute; left: 18px; bottom: 16px; font-family: var(--f-disp); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.ag-hero__badge { position: absolute; left: 18px; top: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 100px; background: rgba(20,24,26,.5); backdrop-filter: blur(6px); color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .04em; }
.ag-hero__badge b { color: var(--amber); }

/* ── Сетки карточек (колонки от количества — без «сирот») ───────────── */
.ag-grid { display: grid; gap: 18px; }
.ag-grid--5 { grid-template-columns: repeat(5, 1fr); }
.ag-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ag-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ag-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1080px) { .ag-grid--5, .ag-grid--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .ag-grid--4, .ag-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .ag-grid--5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .ag-grid--5, .ag-grid--4, .ag-grid--3, .ag-grid--2 { grid-template-columns: 1fr; } }

/* Категория-операция */
.ag-cat { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s; overflow: hidden; }
.ag-cat::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 0; background: var(--amber); transition: height .4s var(--ease); }
.ag-cat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.ag-cat:hover::before { height: 100%; }
.ag-cat__ic { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: rgba(18,63,49,.07); color: var(--green); }
.ag-cat__ic svg { width: 24px; height: 24px; }
.ag-cat__t { font-family: var(--f-disp); font-weight: 600; font-size: 1.04rem; line-height: 1.2; }
.ag-cat__d { font-size: .9rem; color: var(--muted); line-height: 1.5; flex: 1; }
.ag-cat__m { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--green-2); }
.ag-cat__m svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.ag-cat:hover .ag-cat__m svg { transform: translateX(4px); }

/* Карточка товара */
.ag-prod { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.ag-prod:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ag-prod__media { position: relative; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line-2); }
.ag-prod__media img { width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 12px; }
.ag-prod__tag { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 100px; background: rgba(20,24,26,.06); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.ag-prod__b { display: inline-block; font-family: var(--f-disp); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--green-2); }
.ag-prod__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; flex: 1; }
.ag-prod__t { font-size: 1rem; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-prod__res { font-size: .82rem; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-prod__facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ag-prod__facts span { font-size: .74rem; color: var(--muted); padding: 3px 9px; border: 1px solid var(--line); border-radius: 100px; }
.ag-prod__foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-2); }
.ag-prod__price { font-family: var(--f-disp); font-weight: 600; font-size: .9rem; color: var(--ink); }
.ag-prod__more { font-size: .82rem; font-weight: 700; color: var(--green-2); display: inline-flex; align-items: center; gap: 5px; }

/* Плитка бренда */
.ag-brand { display: flex; flex-direction: column; gap: 14px; padding: 26px 24px; background: rgba(255,255,255,.04); border: 1px solid var(--line-d); border-radius: var(--r-lg); transition: transform .4s var(--ease), background .4s; }
.ag-brand:hover { transform: translateY(-4px); background: rgba(255,255,255,.07); }
.ag-brand__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ag-brand__name { font-family: var(--f-disp); font-weight: 700; font-size: 1.3rem; color: #fff; }
.ag-brand__geo { font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: var(--amber); }
.ag-brand__d { font-size: .86rem; color: var(--muted-d); line-height: 1.5; }

/* Линия / решение — компактный список-плитка */
.ag-tile { display: flex; align-items: flex-start; gap: 16px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.ag-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ag-tile__n { font-family: var(--f-disp); font-weight: 700; font-size: .78rem; color: var(--amber); padding-top: 3px; }
.ag-tile__t { font-weight: 700; font-size: 1rem; }
.ag-tile__d { margin-top: 5px; font-size: .85rem; color: var(--muted); line-height: 1.45; }

/* Плашки-решения (компактные) */
.ag-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.ag-pill { display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 100px; font-weight: 600; font-size: .92rem; transition: border-color .3s, transform .3s var(--ease), color .3s; }
.ag-pill:hover { border-color: var(--green-2); color: var(--green); transform: translateY(-2px); }
.ag-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* ── Процесс (фирменная «линия потока») ─────────────────────────────── */
.ag-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; }
.ag-flow__i { position: relative; padding: 28px 20px 0; text-align: left; }
.ag-flow__i::before { counter-increment: step; content: "0" counter(step); font-family: var(--f-disp); font-weight: 700; font-size: .82rem; color: var(--amber); }
.ag-flow__i::after { content: ""; position: absolute; left: 20px; right: -0px; top: 62px; height: 2px; background: linear-gradient(90deg, var(--green-2) 40%, transparent); }
.ag-flow__i:last-child::after { display: none; }
.ag-flow__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green-2); margin: 22px 0 18px; position: relative; z-index: 1; box-shadow: 0 0 0 5px rgba(29,106,82,.15); }
.ag-flow__t { font-family: var(--f-disp); font-weight: 600; font-size: 1rem; }
.ag-flow__d { margin-top: 8px; font-size: .84rem; color: var(--muted-d); line-height: 1.5; }
.ag-green .ag-flow__d { color: rgba(234,241,236,.72); }

/* ── Лид-форма ──────────────────────────────────────────────────────── */
.ag-cta { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
div.ag-lead { background: var(--card); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 40px); box-shadow: var(--shadow-lg); }
.ag-lead__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ag-lead__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ag-field { display: flex; flex-direction: column; gap: 7px; }
.ag-field__l { font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-2); }
.ag-field__l span { color: var(--amber); }
.ag-field__i { padding: 13px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .25s, box-shadow .25s; width: 100%; font-size: .96rem; text-overflow: ellipsis; }
.ag-field__i::placeholder { color: var(--muted); opacity: .8; }
.ag-field__i:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(29,106,82,.14); }
textarea.ag-field__i { resize: vertical; min-height: 92px; }
.ag-lead__btn { margin-top: 16px; width: 100%; }
.ag-lead__note { margin-top: 14px; font-size: .78rem; color: var(--muted); line-height: 1.5; }
.ag-lead__note a { color: var(--green-2); text-decoration: underline; text-underline-offset: 2px; }
.ag-lead__ok { text-align: center; padding: 20px 0; }
.ag-lead__ok b { display: block; font-family: var(--f-disp); font-size: 1.2rem; margin-bottom: 8px; color: var(--green); }

/* ── Хлебные крошки ─────────────────────────────────────────────────── */
.ag-bc { border-bottom: 1px solid var(--line-2); }
.ag-bc__in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 15px; font-size: .82rem; color: var(--muted); }
.ag-bc a { color: var(--muted); transition: color .2s; }
.ag-bc a:hover { color: var(--green); }
.ag-bc__sep { opacity: .5; }

/* ── Подвал ─────────────────────────────────────────────────────────── */
.ag-ft { background: var(--graphite); color: var(--muted-d); padding-top: clamp(48px, 4vw, 80px); }
.ag-ft__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--line-d); }
.ag-ft__brand .ag-logo { color: #fff; margin-bottom: 16px; }
.ag-ft__tag { font-size: .9rem; line-height: 1.6; max-width: 34ch; }
.ag-ft__contact { margin-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.ag-ft__contact a { color: #fff; font-family: var(--f-disp); font-weight: 600; }
.ag-ft__col b { display: block; color: #fff; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--f-sans); }
.ag-ft__col a { display: block; padding: 6px 0; font-size: .9rem; transition: color .2s; }
.ag-ft__col a:hover { color: var(--amber); }
.ag-ft__copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 26px; font-size: .8rem; color: var(--muted-d); }

/* ── Cookie ─────────────────────────────────────────────────────────── */
.ag-cookie { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 130%); width: min(920px, calc(100% - 32px)); z-index: 60; background: var(--ink); color: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); transition: transform .5s var(--ease); }
.ag-cookie.is-shown { transform: translate(-50%, 0); }
.ag-cookie__in { display: flex; align-items: center; gap: 20px; padding: 18px 22px; flex-wrap: wrap; }
.ag-cookie__t { flex: 1; min-width: 240px; font-size: .84rem; line-height: 1.5; color: rgba(255,255,255,.82); }
.ag-cookie__t a { color: var(--amber); text-decoration: underline; }
.ag-cookie__btns { display: flex; gap: 10px; }

/* ── Анимация появления ───────────────────────────────────────────────
   .ag-rise и карточки .ag-stagger видны по умолчанию, даже если app.js
   не загрузился. JS может кратко анимировать вход отдельного элемента,
   не создавая постоянного скрытого состояния. */

/* ── Заголовок внутренней страницы ──────────────────────────────────── */
.ag-phead { padding-block: clamp(30px, 4vw, 60px) 0; }
.ag-phead h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); margin-top: 12px; max-width: 22ch; }
.ag-phead__lead { margin-top: 16px; max-width: 70ch; }
.ag-phead__lead--full { max-width: none; }
.ag-phead h1.ag-wide, .ag-shead__l.ag-wide, .ag-prose.ag-wide { max-width: none; }

/* ── Страница товара ────────────────────────────────────────────────── */
.ag-pd { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; padding-top: clamp(20px, 3vw, 30px); }
.ag-pd__gallery { position: sticky; top: 96px; display: grid; gap: 12px; }
.ag-pd__main { aspect-ratio: 4/3; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); display: flex; align-items: center; justify-content: center; }
.ag-pd__main img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.ag-pd__main .ag-ph { border-radius: 0; }
.ag-pd__thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.ag-pd__thumb { width: 80px; height: 62px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); display: flex; align-items: center; justify-content: center; }
.ag-pd__thumb img { width: 100%; height: 100%; object-fit: contain; }
.ag-pd h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); margin: 12px 0 0; }
.ag-pd__lead { margin-top: 14px; color: var(--muted); }
.ag-pd__params { margin: 22px 0; border-top: 1px solid var(--line); }
.ag-pd__params div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.ag-pd__params dt { color: var(--muted); margin: 0; }
.ag-pd__params dd { font-weight: 600; margin: 0; }
.ag-pd__price { font-family: var(--f-disp); font-weight: 600; font-size: 1.3rem; }
.ag-pd__cta { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; }

.ag-block { padding-top: clamp(32px, 4vw, 56px); }
.ag-block h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-bottom: 18px; }
.ag-block ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.ag-spec { width: 100%; border-collapse: collapse; }
.ag-spec tr { border-bottom: 1px solid var(--line); }
.ag-spec th { text-align: left; font-weight: 600; color: var(--muted); padding: 12px 16px 12px 0; width: 42%; vertical-align: top; }
.ag-spec td { padding: 12px 0; font-weight: 600; }
.ag-note { color: var(--muted); }
@media (max-width: 900px) {
    .ag-pd { grid-template-columns: 1fr; }
    .ag-pd__gallery { position: static; }
}

/* ── Адаптив ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ag-nav { display: none; }
    .ag-burger { display: inline-flex; }
    .ag-hero__grid { grid-template-columns: 1fr; }
    .ag-hero__media { aspect-ratio: 16/10; max-height: 460px; }
    .ag-cta { grid-template-columns: 1fr; }
    .ag-flow { grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
    .ag-flow__i::after { display: none; }
    .ag-ft__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 680px) {
    .ag-hd__phone small { display: none; }
    .ag-hd__actions .ag-btn--primary { display: none; } /* CTA живёт в бургер-меню */
    .ag-hd__in { gap: 16px; }
    .ag-shead { grid-template-columns: 1fr; }
    .ag-shead__link { justify-self: start; }
    .ag-flow { grid-template-columns: 1fr; }
    .ag-lead__grid { grid-template-columns: 1fr; }
    .ag-ft__grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
    .ag-rise, .ag-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* =====================================================================
   Дополнения: CTA-заголовок, крупные плитки брендов, статьи (Ф3),
   контакты/о компании, юридические страницы (Ф4).
   ===================================================================== */

/* CTA-заголовок — компактнее, чем секционный (был визуально «огромным») */
.ag-cta h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.35rem); line-height: 1.12; }

/* ── Крупные плитки брендов (страница «Каталог») ─────────────────────── */
.ag-brandcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px 22px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s; overflow: hidden; }
.ag-brandcard::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 0; background: var(--amber); transition: height .4s var(--ease); }
.ag-brandcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.ag-brandcard:hover::before { height: 100%; }
.ag-brandcard__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ag-brandcard__mark { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-family: var(--f-disp); font-weight: 700; font-size: 1.28rem; color: #fff; background: linear-gradient(140deg, var(--green-2), var(--green)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.ag-brandcard__geo { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
.ag-brandcard__name { font-family: var(--f-disp); font-weight: 700; font-size: 1.32rem; color: var(--ink); line-height: 1.1; }
.ag-brandcard__d { font-size: .86rem; color: var(--muted); line-height: 1.5; flex: 1; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ag-brandcard__m { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--green-2); margin-top: 2px; }
.ag-brandcard__m svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.ag-brandcard:hover .ag-brandcard__m svg { transform: translateX(4px); }

/* ── Статьи: карточки списка ─────────────────────────────────────────── */
.ag-artcard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.ag-artcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ag-artcard__top { position: relative; aspect-ratio: 16/9; display: grid; place-items: center; background: radial-gradient(120% 120% at 78% 12%, rgba(29,106,82,.5), transparent 55%), linear-gradient(160deg, var(--green-ink), var(--ink)); color: rgba(255,255,255,.7); }
.ag-artcard__top svg { width: 58px; height: 58px; opacity: .5; }
.ag-artcard__eyebrow { position: absolute; left: 14px; top: 14px; padding: 5px 11px; border-radius: 100px; background: rgba(20,24,26,.5); backdrop-filter: blur(6px); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.ag-artcard__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 22px; flex: 1; }
.ag-artcard__t { font-size: 1.08rem; font-weight: 700; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ag-artcard__x { font-size: .88rem; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.ag-artcard__meta { display: flex; align-items: center; gap: 14px; font-size: .76rem; color: var(--muted); margin-top: 4px; }
.ag-artcard__meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ── Статья: layout + типографика ────────────────────────────────────── */
.ag-art { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: clamp(28px, 4vw, 60px); align-items: start; padding-top: clamp(8px, 2vw, 20px); }
.ag-art__main { max-width: 760px; min-width: 0; }
.ag-art__main > p:first-of-type { font-size: clamp(1.05rem, 1rem + .4vw, 1.2rem); color: var(--ink-2); line-height: 1.6; }
.ag-art__main h2 { font-size: clamp(1.35rem, 1.15rem + .9vw, 1.8rem); margin: clamp(30px, 3vw, 44px) 0 14px; scroll-margin-top: 96px; }
.ag-art__main h3 { font-size: 1.16rem; margin: 26px 0 10px; }
.ag-art__main p { margin: 0 0 16px; }
.ag-art__main ul, .ag-art__main ol { margin: 0 0 18px; padding-left: 1.2em; display: grid; gap: 8px; }
.ag-art__main li { line-height: 1.55; }
.ag-art__main a { color: var(--green-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.ag-art__main table { margin: 6px 0 22px; }
.ag-art__main blockquote { margin: 18px 0; padding: 14px 20px; border-left: 3px solid var(--amber); background: var(--paper-2); border-radius: 0 var(--r) var(--r) 0; color: var(--ink-2); }
.ag-artmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 18px; font-size: .84rem; color: var(--muted); }
.ag-artmeta span { display: inline-flex; align-items: center; gap: 6px; }
.ag-art__aside { position: sticky; top: 96px; display: grid; gap: 20px; }
.ag-toc { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: var(--card); }
.ag-toc b { display: block; font-family: var(--f-disp); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.ag-toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); font-size: .86rem; color: var(--ink-2); transition: color .2s, border-color .2s; }
.ag-toc a:hover { color: var(--green); border-color: var(--green-2); }
@media (max-width: 900px) { .ag-art { grid-template-columns: 1fr; } .ag-art__aside { display: none; } }

/* ── FAQ (details/summary) ───────────────────────────────────────────── */
.ag-faq { display: grid; gap: 12px; }
.ag-faq details { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.ag-faq summary { list-style: none; cursor: pointer; padding: 17px 20px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ag-faq summary::-webkit-details-marker { display: none; }
.ag-faq summary::after { content: "+"; font-family: var(--f-disp); font-size: 1.35rem; line-height: 1; color: var(--green-2); transition: transform .3s var(--ease); }
.ag-faq details[open] summary::after { transform: rotate(45deg); }
.ag-faq__a { padding: 0 20px 18px; color: var(--muted); line-height: 1.6; }

/* ── Контакты / О компании ───────────────────────────────────────────── */
.ag-cards { display: grid; gap: 14px; }
.ag-vcard { display: flex; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.ag-vcard__ic { width: 44px; height: 44px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(18,63,49,.07); color: var(--green); }
.ag-vcard__ic svg { width: 22px; height: 22px; }
.ag-vcard__k { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ag-vcard__v { font-family: var(--f-disp); font-weight: 600; font-size: 1.08rem; color: var(--ink); margin-top: 3px; line-height: 1.25; }
.ag-vcard__v a { color: inherit; }
.ag-vcard__note { font-size: .84rem; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.ag-feat { display: flex; flex-direction: column; gap: 10px; padding: 24px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.ag-feat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ag-feat__n { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: rgba(18,63,49,.07); color: var(--green); }
.ag-feat__n svg { width: 22px; height: 22px; }
.ag-feat__t { font-family: var(--f-disp); font-weight: 600; font-size: 1.06rem; line-height: 1.2; }
.ag-feat__d { font-size: .9rem; color: var(--muted); line-height: 1.5; }
.ag-prose { max-width: 68ch; }
.ag-prose p { margin-bottom: 16px; color: var(--ink-2); }
.ag-prose p:last-child { margin-bottom: 0; }
.ag-prose strong { color: var(--ink); }

/* ── Юридические страницы (152-ФЗ) ───────────────────────────────────── */
.ag-legal { max-width: 820px; }
.ag-legal h2 { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem); margin: 32px 0 12px; scroll-margin-top: 96px; }
.ag-legal h3 { font-size: 1.1rem; margin: 22px 0 8px; }
.ag-legal p, .ag-legal li { color: var(--ink-2); line-height: 1.65; }
.ag-legal p { margin-bottom: 14px; }
.ag-legal ul, .ag-legal ol { margin: 0 0 16px; padding-left: 1.2em; display: grid; gap: 8px; }
.ag-legal a { color: var(--green-2); text-decoration: underline; text-underline-offset: 2px; }
.ag-legal__upd { display: inline-block; margin-top: 10px; font-size: .82rem; color: var(--muted); }
.ag-legal__toc { margin: 24px 0 8px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper-2); }
.ag-legal__toc b { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; font-family: var(--f-disp); }
.ag-legal__toc a { display: block; padding: 4px 0; font-size: .9rem; }
.ag-legal table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; }
.ag-legal th, .ag-legal td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .92rem; }
.ag-legal th { color: var(--muted); font-weight: 600; width: 38%; }

/* ── Табы-фильтр по разделам (страница бренда) ───────────────────────── */
.ag-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(24px, 3vw, 40px); }
.ag-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 100px; background: var(--card); font-weight: 600; font-size: .9rem; color: var(--ink-2); cursor: pointer; transition: border-color .25s, color .25s, background .25s; }
.ag-tab:hover { border-color: var(--green-2); color: var(--green); }
.ag-tab.is-active { background: var(--green); color: #fff; border-color: var(--green); }
.ag-tab span { font-size: .8em; opacity: .55; font-variant-numeric: tabular-nums; }
.ag-tab.is-active span { opacity: .85; }

.ag-brandcat { margin-top: clamp(34px, 4vw, 54px); }
.ag-brandcat:first-of-type { margin-top: 0; }
.ag-brandcat.is-hidden { display: none; }
.ag-brandcat__h { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ag-brandcat__h h2 { font-size: clamp(1.15rem, 1.02rem + .5vw, 1.45rem); }
.ag-brandcat__ic { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: rgba(18,63,49,.07); color: var(--green); flex: none; }
.ag-brandcat__ic svg { width: 20px; height: 20px; }
.ag-brandcat__h > span:last-child { margin-left: auto; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }

/* First improvements: real equipment in the homepage hero. */
.ag-hero-machine { margin:0; background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; }
.ag-hero-machine img { display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:contain; padding:24px; }
.ag-hero-machine figcaption { padding:16px 20px; color:var(--ink); border-top:1px solid var(--line); font-size:.95rem; }
.ag-hero__k { overflow-wrap:break-word; }

.ag-hero__media--equipment { aspect-ratio:auto; background:transparent; box-shadow:none; overflow:visible; }
.ag-hero__media--equipment::after { display:none; }
.ag-hero__k { font-size:clamp(2rem,3.5vw,3rem); line-height:1.12; }

/* Integrated conversion enhancements; existing Agro-GT tokens. */
#lead,
.ag-anchor-target { scroll-margin-top: 100px; }

.ag-field__hint { font-size: .76rem; line-height: 1.45; color: var(--muted, #5b655f); }
.ag-field__error { font-size: .8rem; line-height: 1.45; color: #a52d25; }
.ag-field__error[hidden] { display: none; }
.ag-field__i[aria-invalid="true"] { border-color: #a52d25; }

.ag-pd__main--interactive { position: relative; }
.ag-gallery-open {
    position: absolute; right: 12px; bottom: 12px; z-index: 1;
    padding: 9px 12px; border: 1px solid var(--line, #ccd4ce);
    border-radius: var(--r, 8px); background: var(--card, #fff);
    color: var(--green, #194d3c); font-size: .8rem; font-weight: 700;
    text-decoration: none;
}
button.ag-pd__thumb { padding: 0; cursor: pointer; flex-shrink: 0; }
button.ag-pd__thumb[aria-pressed="true"] {
    border-color: var(--green, #194d3c);
    box-shadow: 0 0 0 2px var(--green, #194d3c);
}
.ag-gallery-open:focus-visible,
button.ag-pd__thumb:focus-visible,
.ag-viewer button:focus-visible {
    outline: 3px solid var(--green-2, #1d6a52); outline-offset: 4px;
}

.ag-viewer {
    width: min(1040px, calc(100vw - 32px)); max-width: none;
    max-height: calc(100dvh - 32px); margin: auto; padding: 24px;
    overflow: auto; border: 0; border-radius: var(--r-lg, 18px);
    color: var(--ink, #1b2922); background: var(--card, #fff);
    box-shadow: var(--shadow-lg, 0 16px 60px #0004);
}
.ag-viewer::backdrop { background: rgb(12 27 20 / 76%); }
.ag-viewer__title { margin: 0 96px 16px 0; font-size: 1rem; font-weight: 700; line-height: 1.4; }
.ag-viewer__close {
    position: absolute; top: 14px; right: 14px; min-height: 44px;
    padding: 8px 12px; border: 1px solid var(--line, #ccd4ce);
    border-radius: var(--r, 8px); background: var(--paper, #f5f2ec);
    color: var(--ink, #1b2922); font: inherit; cursor: pointer;
}
.ag-viewer__image {
    display: block; width: 100%; height: min(65vh, 700px); object-fit: contain;
    background: #fff;
}
.ag-viewer__controls { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }
.ag-viewer__controls [hidden] { display: none; }
.ag-viewer__count { min-width: 100px; text-align: center; font-size: .85rem; }

@media (max-width: 600px) {
    .ag-viewer { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; }
    .ag-viewer__image { height: 54vh; }
    .ag-viewer__title { margin-right: 90px; font-size: .9rem; }
    .ag-viewer__controls { gap: 8px; }
    .ag-viewer__controls .ag-btn { padding: 10px 14px; }
    .ag-viewer__count { min-width: 85px; }
}

/* Contrast for white normal-size primary-button text.
   Keep existing/native focus outline; only the background changes. */
.ag-btn--primary { background: #a5651e; color: #fff; }
.ag-btn--primary:hover,
.ag-btn--primary:focus-visible { background: #855015; }
