@import url('/fonts/fonts.css');

/* ==========================================================================
   ПНД.ГУРУ — дизайн-система
   Цвет: графит (база) + синий бренда из логотипа + один акцент (оранжевый).
   Радиусы: интерактив 8px, контейнеры 14px, чипы 999px. Других значений нет.
   ========================================================================== */

:root {
    /* поверхности и текст */
    --bg:        #ffffff;
    --bg-2:      #f4f6f9;
    --bg-3:      #e9edf2;
    --bg-inset:  #0e1620;
    --ink:       #0e1620;
    --ink-2:     #26323f;
    --muted:     #5c6875;
    --line:      #e0e5ec;
    --line-2:    #cdd5df;

    /* бренд и акцент */
    --brand:      #123a5e;
    --brand-2:    #1b5183;
    --brand-soft: #eaf1f8;
    --accent:      #c24d06;
    --accent-2:    #b84606;
    --accent-soft: #fdf0e6;
    --accent-ink:  #ffffff;

    /* состояния */
    --ok:   #1c7a4a;
    --warn: #9a6207;

    /* радиусы */
    --r-btn:  8px;
    --r-card: 14px;
    --r-chip: 999px;

    /* тени, тонированные в синий, без чистого черного */
    --sh-1: 0 1px 2px rgba(14, 22, 32, .06), 0 2px 8px rgba(14, 22, 32, .04);
    --sh-2: 0 2px 6px rgba(14, 22, 32, .07), 0 12px 28px rgba(14, 22, 32, .08);
    --sh-3: 0 8px 20px rgba(14, 22, 32, .10), 0 24px 56px rgba(14, 22, 32, .12);

    /* сетка */
    --wrap: 1240px;
    --gut: 24px;

    /* шрифты */
    --f-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

    --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #0b1118;
        --bg-2:      #0f1720;
        --bg-3:      #16202b;
        --bg-inset:  #060a0f;
        --ink:       #e7edf4;
        --ink-2:     #c3ceda;
        --muted:     #93a1b1;
        --line:      #223040;
        --line-2:    #2d3d4f;

        --brand:      #8fbde3;
        --brand-2:    #6ea6d4;
        --brand-soft: #13212f;
        --accent:      #ff7a2e;
        --accent-2:    #ff8f4f;
        --accent-soft: #2a1608;
        --accent-ink:  #1a0d03;

        --ok:   #4cc189;
        --warn: #d9a441;

        --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
        --sh-2: 0 2px 6px rgba(0, 0, 0, .45), 0 12px 28px rgba(0, 0, 0, .35);
        --sh-3: 0 8px 20px rgba(0, 0, 0, .5), 0 24px 56px rgba(0, 0, 0, .45);
    }
}

/* --------------------------------------------------------------- база --- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--f-sans);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-2); text-decoration-color: color-mix(in srgb, var(--brand-2) 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.022em;
    color: var(--ink);
    text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.7vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.5rem); }
h3 { font-size: clamp(1.12rem, 1rem + .55vw, 1.4rem); letter-spacing: -.015em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.15em; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gut);
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.section { padding-block: clamp(56px, 7vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }
.section--alt { background: var(--bg-2); }
.section--ink { background: var(--bg-inset); color: #e7edf4; }
.section--ink h2, .section--ink h3 { color: #fff; }

.lede {
    font-size: clamp(1rem, .96rem + .3vw, 1.15rem);
    color: var(--muted);
    max-width: 62ch;
}

.head { margin-bottom: clamp(28px, 3.4vw, 52px); max-width: 60ch; }
.head p { margin-top: 14px; }

.eyebrow {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* ------------------------------------------------------------- кнопки --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: var(--r-btn);
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s var(--ease), border-color .2s var(--ease),
                color .2s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--sh-1); }
.btn--primary:hover { background: var(--accent-2); color: var(--accent-ink); box-shadow: var(--sh-2); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--bg-2); color: var(--ink); border-color: var(--ink); }

.btn--onink { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn--onink:hover { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .55); }

.btn--sm { padding: 10px 18px; font-size: .92rem; }
.btn--block { width: 100%; }

/* На узких экранах кнопки занимают всю ширину: так их проще нажимать. */
@media (max-width: 480px) {
    .btn-row { flex-direction: column; align-items: stretch; }
    .btn-row .btn { width: 100%; }
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --------------------------------------------------------------- шапка --- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

@supports not (backdrop-filter: blur(4px)) {
    .site-header { background: var(--bg); }
}

.hbar {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.hbar__logo { flex: 0 0 auto; display: block; }
.hbar__logo img,
.hbar__logo picture { height: 40px; width: auto; display: block; }

.hnav { margin-left: auto; }

.hnav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hnav a {
    display: block;
    padding: 8px 13px;
    border-radius: var(--r-btn);
    color: var(--ink-2);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .18s var(--ease), color .18s var(--ease);
}

.hnav a:hover { background: var(--bg-2); color: var(--ink); }
.hnav a.is-active { color: var(--accent); }

.hbar__cta { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

.hphone {
    font-family: var(--f-mono);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}
.hphone:hover { color: var(--accent); }

.burger {
    display: none;
    width: 44px; height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line-2);
    border-radius: var(--r-btn);
    cursor: pointer;
}
.burger span {
    display: block;
    width: 18px; height: 2px;
    margin: 4px auto;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1023px) {
    .burger { display: block; order: 3; }
    .hbar__cta { margin-left: auto; }

    .hnav {
        position: fixed;
        inset: 72px 0 auto 0;
        margin: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--sh-3);
        transform: translateY(-140%);
        transition: transform .3s var(--ease);
        max-height: calc(100dvh - 72px);
        overflow-y: auto;
    }
    .hnav.is-open { transform: translateY(0); }
    .hnav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gut) 20px; }
    .hnav a { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
    .hnav li:last-child a { border-bottom: 0; }
}

@media (max-width: 560px) {
    .hphone { font-size: .82rem; }
    .hbar { height: 64px; gap: 10px; }
    .hbar__logo img { height: 32px; }
    .hnav { inset-block-start: 64px; max-height: calc(100dvh - 64px); }
}

/* ---------------------------------------------------------------- герой --- */

.hero {
    position: relative;
    padding-block: clamp(40px, 5vw, 84px) clamp(48px, 6vw, 96px);
    background:
        radial-gradient(120% 90% at 88% 8%, var(--brand-soft) 0%, transparent 62%),
        var(--bg);
    overflow: hidden;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    gap: clamp(32px, 4vw, 64px);
    align-items: center;
}

.hero h1 { margin-bottom: 20px; }

.hero__sub {
    font-size: clamp(1.02rem, .96rem + .4vw, 1.2rem);
    color: var(--muted);
    max-width: 46ch;
    margin-bottom: 30px;
}

.hero__art {
    position: relative;
    border-radius: var(--r-card);
    overflow: hidden;
    box-shadow: var(--sh-3);
    aspect-ratio: 4 / 3;
    background: var(--bg-3);
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; }

.hero__badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 16px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    box-shadow: var(--sh-2);
}
.hero__badge b { font-family: var(--f-mono); font-size: 1.15rem; color: var(--ink); }
.hero__badge span { font-size: .85rem; color: var(--muted); }

@media (max-width: 900px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__art { aspect-ratio: 16 / 10; }
}

/* ------------------------------------------------------- полоса фактов --- */

.facts {
    border-block: 1px solid var(--line);
    background: var(--bg-2);
}

.facts__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.facts__item {
    padding: clamp(20px, 2.6vw, 32px) 20px;
    border-left: 1px solid var(--line);
}
.facts__item:first-child { border-left: 0; }

.facts__n {
    display: block;
    font-family: var(--f-mono);
    font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.03em;
}
.facts__t { display: block; margin-top: 6px; font-size: .92rem; color: var(--muted); }

@media (max-width: 900px) {
    .facts__grid { grid-template-columns: repeat(2, 1fr); }
    .facts__n { font-size: 1.35rem; white-space: nowrap; }
    .facts__item:nth-child(odd) { border-left: 0; }
    .facts__item:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ------------------------------------------------------------ аудитории --- */

.aud__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.aud__tab {
    padding: 11px 18px;
    background: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: var(--r-chip);
    color: var(--ink-2);
    font: inherit;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.aud__tab:hover { border-color: var(--ink); color: var(--ink); }
.aud__tab[aria-selected="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

.aud__panel { display: none; }
.aud__panel.is-active { display: block; }

.aud__body {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: clamp(24px, 3.4vw, 56px);
    padding: clamp(24px, 3vw, 40px);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: var(--sh-1);
}

.aud__who {
    font-family: var(--f-mono);
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.aud__body h3 { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.75rem); margin-bottom: 14px; }
.aud__lead { color: var(--muted); }

.aud__list { list-style: none; margin: 0 0 24px; padding: 0; }
.aud__list li {
    position: relative;
    padding: 11px 0 11px 32px;
    border-top: 1px solid var(--line);
    font-size: .97rem;
}
.aud__list li:first-child { border-top: 0; padding-top: 0; }
.aud__list li::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 17px;
    width: 6px; height: 11px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
}
.aud__list li:first-child::before { top: 6px; }

@media (max-width: 860px) {
    .aud__body { grid-template-columns: 1fr; }
    .aud__tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
    .aud__tabs::-webkit-scrollbar { display: none; }
    .aud__tab { flex: 0 0 auto; }
}

/* --------------------------------------------------------------- услуги --- */

.bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 230px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--bg);
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-2); }

.tile--wide { grid-column: span 4; min-height: 300px; }
.tile--tall { grid-column: span 2; grid-row: span 2; }
.tile--norm { grid-column: span 2; }
.tile--full { grid-column: span 6; min-height: 190px; }

.tile--photo { color: #fff; border-color: transparent; }
.tile--photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(178deg, rgba(8, 14, 20, .18) 0%, rgba(8, 14, 20, .58) 48%, rgba(8, 14, 20, .92) 100%);
    z-index: 1;
}
.tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tile--photo > *:not(.tile__img) { position: relative; z-index: 2; }
.tile--photo h3 { color: #fff; }
.tile--photo .tile__lead { color: rgba(255, 255, 255, .84); }

.tile--flat { background: var(--bg-2); }
.tile--brand { background: var(--brand); border-color: transparent; color: #fff; }
.tile--brand h3 { color: #fff; }
.tile--brand .tile__lead { color: rgba(255, 255, 255, .82); }
.tile--brand .tile__meta { background: rgba(255, 255, 255, .16); color: #fff; }

.tile__meta {
    align-self: flex-start;
    padding: 5px 12px;
    background: var(--accent-soft);
    border-radius: var(--r-chip);
    font-family: var(--f-mono);
    font-size: .74rem;
    font-weight: 500;
    color: var(--accent);
}
.tile--photo .tile__meta { background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(4px); }

.tile h3 { margin: 14px 0 8px; }
.tile__lead { font-size: .95rem; color: var(--muted); margin: 0; }

@media (max-width: 980px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .tile--wide, .tile--tall, .tile--norm, .tile--full { grid-column: span 1; grid-row: auto; }
    .tile--wide, .tile--full { grid-column: span 2; }
}
@media (max-width: 620px) {
    .bento { grid-template-columns: 1fr; }
    .tile--wide, .tile--full { grid-column: span 1; }
    .tile { min-height: 200px; }
}

/* -------------------------------------------------------------- процесс --- */

.steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    overflow: hidden;
    background: var(--bg);
}

.step {
    padding: 28px 22px;
    border-left: 1px solid var(--line);
}
.step:first-child { border-left: 0; }

.step__mark {
    width: 10px; height: 10px;
    margin-bottom: 18px;
    background: var(--accent);
    transform: rotate(45deg);
}

.step h3 { font-size: 1.06rem; margin-bottom: 8px; }
.step p { font-size: .92rem; color: var(--muted); margin: 0; }

@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); }
    .step { border-left: 0; border-top: 1px solid var(--line); }
    .step:nth-child(odd) { border-right: 1px solid var(--line); }
    .step:nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; }
    .step:nth-child(odd) { border-right: 0; }
    .step:nth-child(2) { border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------- калькулятор --- */

.calc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
    gap: clamp(20px, 2.5vw, 36px);
    align-items: start;
}

.calc__form {
    padding: clamp(22px, 2.6vw, 34px);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
}

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }

.field > label,
.field__label {
    display: block;
    margin-bottom: 8px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
}

.field__hint { margin-top: 7px; font-size: .82rem; color: var(--muted); }

.input, .select, .textarea {
    width: 100%;
    padding: 13px 14px;
    background: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: var(--r-btn);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.textarea { min-height: 110px; resize: vertical; }

.select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

.range { width: 100%; accent-color: var(--accent); }

.calc__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: .93rem;
    color: var(--ink-2);
    cursor: pointer;
}
.check input { margin-top: 3px; accent-color: var(--accent); width: 17px; height: 17px; flex: 0 0 auto; }

.calc__out {
    position: sticky;
    top: 92px;
    padding: clamp(22px, 2.6vw, 30px);
    background: var(--bg-inset);
    color: #e7edf4;
    border-radius: var(--r-card);
    box-shadow: var(--sh-2);
}
.calc__out h3 { color: #fff; font-size: 1.05rem; margin-bottom: 18px; }

.calc__sum {
    font-family: var(--f-mono);
    font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.calc__basis { margin-top: 8px; font-size: .87rem; color: #9fb0c2; }

.calc__lines { margin: 22px 0; padding: 0; list-style: none; font-size: .9rem; }
.calc__lines li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: #c6d2de;
}
.calc__lines li:first-child { border-top: 0; }
.calc__lines b { font-family: var(--f-mono); font-weight: 500; color: #fff; }

.calc__note { font-size: .82rem; color: #8d9fb2; margin-top: 16px; }

@media (max-width: 900px) {
    .calc { grid-template-columns: 1fr; }
    .calc__out { position: static; }
}
@media (max-width: 480px) {
    .calc__row { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------- галерея --- */

.gal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.gal__item {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.gal__item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }

.gal__ph { position: relative; aspect-ratio: 4 / 3; background: var(--bg-3); overflow: hidden; }
.gal__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gal__item:hover .gal__ph img { transform: scale(1.04); }

.gal__tag {
    display: block;
    margin-bottom: 10px;
    font-family: var(--f-mono);
    font-size: .71rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
}

.gal__txt { padding: 18px 20px 22px; }
.gal__txt h3 { font-size: 1.05rem; margin-bottom: 7px; }
.gal__txt p { font-size: .91rem; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------- оборудование --- */

.rig {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.rig__item {
    padding: 22px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
}
.rig__name { font-weight: 800; font-size: 1.05rem; letter-spacing: -.015em; }
.rig__note { margin-top: 5px; font-size: .88rem; color: var(--muted); }

@media (max-width: 820px) { .rig { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .rig { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- прайс --- */

.tablewrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    background: var(--bg);
    -webkit-overflow-scrolling: touch;
}

table.price {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: .95rem;
}

table.price th {
    padding: 15px 18px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: .01em;
    white-space: nowrap;
}
table.price td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
}
table.price tr:last-child td { border-bottom: 0; }
table.price tbody tr:hover { background: var(--bg-2); }
table.price td:first-child { font-family: var(--f-mono); font-weight: 700; color: var(--ink); }
table.price td.n { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

.note {
    margin-top: 22px;
    padding: 20px 22px;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-btn);
    font-size: .93rem;
    color: var(--ink-2);
}
.note strong { color: var(--ink); }
.note ul { margin: 10px 0 0; padding-left: 1.1em; }
.note li { margin-bottom: 6px; }
.note li:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ FAQ --- */

.faq { max-width: 860px; }

.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--line); }

.faq__q {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    background: none;
    border: 0;
    font: inherit;
    font-size: clamp(1rem, .96rem + .28vw, 1.12rem);
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.faq__q:hover { color: var(--accent); }

.faq__ic {
    flex: 0 0 auto;
    position: relative;
    width: 20px; height: 20px;
    margin-top: 4px;
}
.faq__ic::before, .faq__ic::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    background: var(--accent);
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.faq__ic::before { width: 14px; height: 2px; }
.faq__ic::after  { width: 2px; height: 14px; }
.faq__q[aria-expanded="true"] .faq__ic::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

/* Высоту задает скрипт: без него ответы просто остаются открытыми. */
.faq__a {
    overflow: hidden;
    transition: height .3s var(--ease);
}
.faq__a p { padding-bottom: 24px; color: var(--muted); max-width: 68ch; margin: 0; }

/* --------------------------------------------------------------- статьи --- */

.posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.post {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.post:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-2); color: inherit; }

.post__ph { aspect-ratio: 3 / 2; background: var(--bg-3); overflow: hidden; }
.post__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post:hover .post__ph img { transform: scale(1.04); }

.post__txt { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 24px; }

.post__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-family: var(--f-mono);
    font-size: .72rem;
    color: var(--muted);
}
.post__meta span:first-child { color: var(--accent); font-weight: 500; }

.post h3 { font-size: 1.1rem; margin-bottom: 9px; }
.post p { font-size: .91rem; color: var(--muted); margin: 0 0 16px; }
.post__more { margin-top: auto; font-size: .9rem; font-weight: 700; color: var(--accent); }

/* --------------------------------------------------- страница статьи --- */

.article { max-width: 760px; margin-inline: auto; }

.article__cover {
    margin: 0;
    border-radius: var(--r-card);
    overflow: hidden;
    margin-bottom: clamp(28px, 3.4vw, 44px);
    aspect-ratio: 3 / 2;
    background: var(--bg-3);
}
.article__cover img { width: 100%; height: 100%; object-fit: cover; }

/* Подпись с авторством под фото: обязательна для лицензий CC BY-SA. */
.figcredit {
    margin: -28px 0 34px;
    font-size: .82rem;
    color: var(--muted);
}
.figcredit a { color: var(--muted); text-decoration: underline; }
.figcredit a:hover { color: var(--accent); }

.prose { font-size: 1.06rem; line-height: 1.75; color: var(--ink-2); }
.prose h2 {
    margin: 2em 0 .6em;
    font-size: clamp(1.35rem, 1.15rem + .85vw, 1.75rem);
    color: var(--ink);
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.prose li { margin-bottom: .55em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: .86rem;
    color: var(--muted);
    list-style: none;
    padding: 0;
}
.crumbs li::after { content: "/"; margin-left: 8px; color: var(--line-2); }
.crumbs li:last-child::after { content: ""; }

/* ------------------------------------------------------------- контакты --- */

.contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
    gap: clamp(26px, 3.4vw, 56px);
    align-items: start;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}
.card {
    padding: 22px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
}
.card h3 { font-size: 1.02rem; margin-bottom: 10px; }
.card p { font-size: .93rem; color: var(--muted); margin: 0 0 6px; }
.card a { font-family: var(--f-mono); font-weight: 700; color: var(--ink); text-decoration: none; }
.card a:hover { color: var(--accent); }

.form {
    padding: clamp(24px, 3vw, 34px);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: var(--sh-1);
}
.form h3 { margin-bottom: 6px; }
.form__lead { font-size: .93rem; color: var(--muted); margin-bottom: 22px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Прямые контакты вместо формы, когда SITE_FORM выключен.
   Это единственный путь к заявке, поэтому телефон оформлен как основная кнопка. */
.direct { display: grid; gap: 12px; }

.direct__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: var(--r-btn);
    text-decoration: none;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.direct__row:active { transform: translateY(1px); }
.direct__row:hover { border-color: var(--ink); background: var(--bg-2); }

.direct__label { font-size: .9rem; font-weight: 600; color: var(--muted); }
.direct__value {
    font-family: var(--f-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    text-align: right;
    word-break: break-word;
}

.direct__row--main {
    background: var(--accent);
    border-color: var(--accent);
}
.direct__row--main:hover { background: var(--accent-2); border-color: var(--accent-2); }
.direct__row--main .direct__label { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.direct__row--main .direct__value { color: var(--accent-ink); font-size: 1.2rem; }

@media (max-width: 420px) {
    .direct__row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .direct__value { text-align: left; }
}

.msg {
    padding: 14px 16px;
    border-radius: var(--r-btn);
    font-size: .93rem;
    margin-bottom: 18px;
}
.msg--ok  { background: color-mix(in srgb, var(--ok) 12%, transparent);   color: var(--ok);   border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent); }
.msg--err { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-2); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); }

.field__err { margin-top: 6px; font-size: .84rem; color: var(--accent-2); }

@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- CTA --- */

.cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    padding: clamp(30px, 4vw, 52px);
    background: var(--brand);
    border-radius: var(--r-card);
    color: #fff;
}
.cta h2 { color: #fff; margin-bottom: 10px; }
.cta p { color: rgba(255, 255, 255, .86); margin: 0; max-width: 54ch; }

@media (max-width: 780px) { .cta { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- подвал --- */

.site-footer {
    padding-block: clamp(44px, 5vw, 68px) 28px;
    background: var(--bg-inset);
    color: #a8b6c4;
    font-size: .93rem;
}

.fgrid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: clamp(24px, 3vw, 44px);
    padding-bottom: 34px;
}

.site-footer h4 {
    margin: 0 0 14px;
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.site-footer a { color: #a8b6c4; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }

.flogo { height: 34px; width: auto; margin-bottom: 14px; }
.fabout { max-width: 34ch; color: #8a99a8; }
.fphone { font-family: var(--f-mono); font-size: 1.15rem; font-weight: 700; color: #fff !important; }

.fbot {
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    justify-content: space-between;
    font-size: .86rem;
    color: #7d8b9a;
}

@media (max-width: 860px) { .fgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .fgrid { grid-template-columns: 1fr; } }

/* -------------------------------------------------- появление на скролле --- */

/* Прячем блоки до появления только если скрипт жив: класс js ставит сам скрипт.
   Без него страница видна целиком, а не пустой. */
.js .rv {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .rv.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .js .rv { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* --------------------------------------------------------------- печать --- */

@media print {
    .site-header, .site-footer, .calc__out, .btn { display: none; }
    body { font-size: 12pt; color: #000; background: #fff; }
}
