/**
 * Переиспользуемый блок «<формат> в текст» (template-parts/format-block.php).
 * Используется на страницах про отдельные форматы (AVI, MP4, MKV, MOV…).
 * Все селекторы scoped под .format-block, чтобы стили не влияли на остальной лендинг.
 */

.format-block {
    --ink: #09090a;
    --muted: #6f6f85;
    --line: #e8e4f5;
    --blue: #3333ff;
    --orange: #ff5c33;
    --grad: linear-gradient(90deg, #3333ff 0%, #ff5c33 100%);
    --grad-soft: linear-gradient(135deg, rgba(51, 51, 255, .08), rgba(255, 92, 51, .06));
    --mono: 'PT Root UI', system-ui, sans-serif;

    padding: 80px 24px;
    color: var(--ink);
    font-family: 'PT Root UI', system-ui, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

.format-block p {
    margin: 0;
}

.format-block .stage {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 64px;
    border-radius: 36px;
    background:
        radial-gradient(ellipse at top, #f5f4fc 0%, transparent 60%),
        radial-gradient(ellipse at bottom, #fff0eb 0%, transparent 60%),
        #fff;
    border: 1px solid var(--line);
    overflow: hidden;
}

.format-block .stage::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(155, 155, 180, .18) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: .35;
    -webkit-mask: radial-gradient(ellipse at center, #000 30%, transparent 70%);
            mask: radial-gradient(ellipse at center, #000 30%, transparent 70%);
}

.format-block .stage > * {
    position: relative;
    z-index: 1;
}

/* ── Lead block ── */
.format-block .lead-block {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 32px;
    align-items: flex-start;
    max-width: 1000px;
    margin: 0 auto 64px;
}

.format-block .marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 6px;
}

.format-block .marker .ext-tag {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: .06em;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--grad);
    color: #fff;
    display: inline-block;
}

.format-block .marker .line {
    width: 2px;
    flex: 1;
    min-height: 60px;
    background: linear-gradient(180deg, var(--blue), var(--orange));
    border-radius: 1px;
    opacity: .3;
}

.format-block .marker .reel-dec {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px dashed rgba(51, 51, 255, .3);
    display: grid;
    place-items: center;
    color: var(--blue);
    font-size: 14px;
    animation: format-block-spin 20s linear infinite;
}

@keyframes format-block-spin {
    to { transform: rotate(360deg); }
}

.format-block .lead {
    font-family: 'PT Root UI', sans-serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 1.35;
    color: var(--ink);
    letter-spacing: -.012em;
    text-wrap: pretty;
}

.format-block .lead .hl {
    background: linear-gradient(180deg, transparent 65%, rgba(184, 161, 229, .45) 65%);
    padding: 0 2px;
}

.format-block .lead .hl-pop {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.format-block .lead em {
    font-style: normal;
    font-weight: 700;
}

/* ── Pillars ── */
.format-block .pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.format-block .p {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.format-block .p:hover {
    transform: translateY(-3px);
    border-color: rgba(51, 51, 255, .30);
    box-shadow: 0 24px 60px rgba(51, 51, 255, .10);
}

.format-block .p::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--grad-soft);
    pointer-events: none;
}

/* Опциональная нумерация карточек (01/02/03), если передать 'num' в pillar */
.format-block .p .num {
    position: relative;
    z-index: 1;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .12em;
    color: var(--blue);
}

.format-block .p .num::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 1px;
    background: currentColor;
    margin-left: 8px;
    vertical-align: middle;
    opacity: .4;
}

.format-block .p .ic {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--grad);
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 8px 20px rgba(51, 51, 255, .20);
}

.format-block .p .ic svg {
    width: 22px;
    height: 22px;
}

.format-block .p .k {
    position: relative;
    z-index: 1;
    font-family: 'PT Root UI', sans-serif;
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -.01em;
    color: var(--ink);
    line-height: 1.2;
}

.format-block .p .t {
    position: relative;
    z-index: 1;
    font-size: 18px;
    color: var(--muted);
    line-height: 1.55;
}

.format-block .p .t b {
    color: var(--ink);
    font-weight: 600;
}

@media (max-width: 880px) {
    .format-block {
        padding: 48px 14px;
    }
    .format-block .stage {
        padding: 48px 24px;
        border-radius: 24px;
    }
    .format-block .lead-block {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 40px;
    }
    .format-block .marker {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }
    .format-block .marker .line {
        width: 40px;
        height: 2px;
        min-height: 0;
        flex: 0 0 auto;
    }
    .format-block .lead {
        font-size: 22px;
    }
    .format-block .pillars {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .format-block .p {
        padding: 24px 22px;
    }
}