/* ============================================================
   Zerno — design tokens, reset, base elements, shared components
   Emerald + wheat on white. Flat: no decorative shadows anywhere.
   ============================================================ */

:root {
    /* ========================================================
       BRAND — вся палитра меняется в этом блоке.
       ======================================================== */
    --accent:        #0E7C4F;                    /* изумруд — основной акцент */
    --accent-2:      #0A6340;                    /* ховер/нажатие */
    --accent-light:  #3FA778;                    /* светлая пара */
    --accent-soft:   rgba(14, 124, 79, .09);     /* фон акцентных плашек */
    --accent-ink:    #ffffff;                    /* текст на акцентных кнопках */

    --wheat:         #E8A33D;                    /* пшеница — второй акцент */
    --wheat-2:       #D18F28;
    --wheat-soft:    rgba(232, 163, 61, .16);
    --wheat-ink:     #2A1F0A;                    /* текст на пшеничных кнопках */

    --deep:          #0C3527;                    /* тёмно-зелёные секции */
    --deep-2:        #114732;                    /* панели внутри тёмных секций */
    --deep-ink:      #F2F6F3;                    /* текст на тёмном */
    --deep-muted:    rgba(242, 246, 243, .64);

    --bg:            #ffffff;                    /* фон страницы */
    --bg-soft:       #F2F6F3;                    /* чередование секций */
    --panel:         #F5F8F5;                    /* карточки на белом */
    --panel-2:       #ffffff;                    /* карточки на тонированном */
    --inset:         #E9EFEA;                    /* внутренние плашки */

    --ink:           #14231B;                    /* заголовки */
    --text:          #3A473F;                    /* основной текст */
    --muted:         #68756D;                    /* подписи */

    --line:          rgba(20, 35, 27, .1);
    --line-strong:   rgba(20, 35, 27, .18);

    --green:         #2E9E5B;
    --green-soft:    rgba(46, 158, 91, .13);
    --red:           #D64545;
    --red-soft:      rgba(214, 69, 69, .11);
    --gold:          #D18F28;
    --gold-soft:     rgba(209, 143, 40, .14);

    --font-display:  'Space Grotesk', 'Manrope', system-ui, sans-serif;
    --font-body:     'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    /* ======================== /BRAND ======================== */

    --radius-s: 8px;
    --radius: 12px;
    --radius-l: 18px;
    --radius-xl: 24px;
    --container: 1200px;
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.025em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

img, svg, video { max-width: 100%; height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; padding: 0; }

::selection { background: rgba(14, 124, 79, .18); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Layout ---------- */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-tight { padding: 64px 0; }

/* Тёмно-зелёные band-секции */
.section-deep {
    background: var(--deep);
    color: var(--deep-ink);
    padding: 72px 0;
}

.section-deep h2, .section-deep h3 { color: #fff; }
.section-deep p { color: var(--deep-muted); }

.section-head {
    max-width: 720px;
    margin: 0 0 52px;
}

.section-head h2 { position: relative; padding-bottom: 18px; }

.section-head h2::after {
    content: "";
    position: absolute;
    left: 2px;
    bottom: 0;
    width: 46px;
    height: 5px;
    border-radius: 3px;
    background: var(--wheat);
}

.section-head .lede { max-width: 640px; }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
}

.kicker .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wheat);
    flex: none;
}

.section-deep .kicker { color: var(--wheat); }

.lede { font-size: 1.12rem; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

@media (max-width: 980px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .section { padding: 64px 0; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Buttons (прямоугольные, плоские) ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    letter-spacing: .01em;
    border: 1px solid transparent;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
    white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); }

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }

.btn-wheat { background: var(--wheat); color: var(--wheat-ink); }
.btn-wheat:hover { background: var(--wheat-2); color: var(--wheat-ink); }

.btn-ghost-on-deep {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .45);
}

.btn-ghost-on-deep:hover { border-color: #fff; color: #fff; }

.btn-line {
    padding: 0;
    border: 0;
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 600;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-line::after { content: "→"; transition: transform .15s ease; }
.btn-line:hover::after { transform: translateX(3px); }

.btn-lg { padding: 15px 30px; font-size: 1rem; border-radius: 12px; }

/* ---------- Cards: тонированные на белом, белые на тонированном ---------- */

.card {
    display: block;
    background: var(--panel);
    border: 1px solid transparent;
    border-radius: var(--radius-l);
    padding: 28px;
    transition: border-color .2s ease, transform .2s ease;
    color: var(--text);
}

.section-soft .card { background: var(--panel-2); border-color: var(--line); }

a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
a.card:hover h3 { color: var(--accent-2); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 7px;
    font-size: .76rem;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent-2);
}

.chip-green { background: var(--green-soft); color: var(--green); }
.chip-gold { background: var(--gold-soft); color: var(--gold); }
.chip-red { background: var(--red-soft); color: var(--red); }

.ico-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    flex: none;
}

.ico-tile svg { width: 22px; height: 22px; }

.step-num {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .9rem;
    letter-spacing: .08em;
    color: var(--wheat-2);
}

/* Feature list: росток-чекеры */
.check-list { list-style: none; padding: 0; margin: 0 0 1.2em; }

.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 19px;
    height: 19px;
    border-radius: 6px;
    background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E7C4F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* FAQ (native details/summary) */
.faq-list { max-width: 780px; margin: 0; }

.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-2);
    margin-bottom: 12px;
    overflow: hidden;
}

.section-soft .faq-item { background: #fff; }

.faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    font-size: 1.3rem;
    line-height: 1;
    color: var(--wheat-2);
    transition: transform .2s ease;
    flex: none;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-body { padding: 0 22px 20px; color: var(--text); font-size: .95rem; }

/* ---------- Reveal-on-scroll ---------- */

.reveal, .reveal-group > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s ease, transform .55s ease;
}

.reveal.in, .reveal-group.in > * { opacity: 1; transform: none; }

.reveal-group.in > *:nth-child(2) { transition-delay: .08s; }
.reveal-group.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-group.in > *:nth-child(4) { transition-delay: .24s; }

/* ============================================================
   Mock kit — общие детали "скриншотов" (герой, продуктовые)
   ============================================================ */

.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }

/* Таблица-леджер */
.ledger { display: flex; flex-direction: column; }

.lrow {
    display: grid;
    grid-template-columns: 1.6fr .7fr .9fr;
    gap: 10px;
    align-items: center;
    padding: 9px 2px;
    border-bottom: 1px solid var(--line);
    font-size: .87rem;
    min-width: 0;
}

.lrow:last-child { border-bottom: 0; }

.lrow span { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.lrow.lhead {
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.lrow.lhead span, .lrow.lhead b { color: var(--muted); font-weight: 600; }
.lrow .neg, .lrow .pos { font-weight: 700; }
.lrow span.neg { color: var(--red); }

/* Таймлайн */
.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
    position: relative;
    padding: 0 0 16px 26px;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: -2px;
    width: 2px;
    background: var(--line);
}

.timeline li:last-child::before { display: none; }

.timeline li::after {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--accent-soft);
    background-clip: padding-box;
}

.timeline li.now::after { background: var(--wheat); border-color: var(--wheat-soft); }

.timeline b { display: block; color: var(--ink); font-size: .9rem; }
.timeline small { color: var(--muted); font-size: .78rem; }

/* Столбики */
.bars {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 88px;
    margin-top: 14px;
}

.bars.tall { height: 120px; }

.bars i {
    flex: 1;
    height: var(--h, 40%);
    background: var(--accent-light);
    opacity: .55;
    border-radius: 5px 5px 2px 2px;
    min-width: 0;
}

.bars i.hot { background: var(--wheat); opacity: 1; }

/* KPI-плашки */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.kpi {
    background: var(--inset);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.kpi small { font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi b { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .chip { align-self: flex-start; margin-top: 4px; }

/* Пайплайн-колонки */
.pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.pipe-col {
    background: var(--inset);
    border-radius: 10px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pipe-col.hot { background: var(--wheat-soft); }

.pipe-col small { font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-col b { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.pipe-col span { font-size: .76rem; color: var(--muted); }

/* Воронка */
.funnel { display: flex; flex-direction: column; gap: 7px; }

.fstep {
    width: var(--w, 100%);
    min-width: 130px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: var(--accent-soft);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .84rem;
}

.fstep.hot { background: var(--wheat-soft); }

.fstep span { color: var(--text); }
.fstep b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Page hero (внутренние страницы) ---------- */

.page-hero {
    padding: 72px 0 8px;
}

.page-hero h1 { position: relative; padding-bottom: 20px; margin-bottom: 18px; }

.page-hero h1::after {
    content: "";
    position: absolute;
    left: 2px;
    bottom: 0;
    width: 52px;
    height: 5px;
    border-radius: 3px;
    background: var(--wheat);
}

.page-hero .lede { max-width: 640px; }

/* ---------- CTA band (тёмный, на всех страницах) ---------- */

.cta-band { padding: 76px 0; }

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.cta-copy { max-width: 560px; }

.cta-copy h2 { margin-bottom: 10px; }
.cta-copy p { margin: 0; font-size: 1.05rem; }

.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 700px) {
    .cta-inner { flex-direction: column; align-items: flex-start; }
}

/* Живая точка */
.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    flex: none;
    animation: zr-pulse 1.8s ease-out infinite;
}

@keyframes zr-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 158, 91, .45); }
    70% { box-shadow: 0 0 0 7px rgba(46, 158, 91, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 158, 91, 0); }
}
