/*
 * Home page sections
 */

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero__wrp {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 120px 0 110px;
    text-align: center;
}

.hero__pixels {
    position: absolute;
}

.hero__pixels--top {
    top: 42px;
    right: 102px;
}

.hero__pixels--bottom {
    top: 360px;
    left: 84px;
}

.hero__typed {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 154px;
    white-space: nowrap;
}

.hero__caret {
    display: inline-block;
    width: 14px;
    height: 132px;
    margin-left: 18px;
    background: var(--color-text);
    animation: hero-caret 1s steps(1) infinite;
}

@keyframes hero-caret {
    50% { opacity: 0; }
}

.hero__title {
    max-width: 900px;
    margin-top: 28px;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero__subtitle {
    max-width: 640px;
    margin-top: 20px;
    font-size: 18px;
    line-height: 1.45;
    color: var(--color-text-muted);
}

.hero__actions {
    display: flex;
    gap: 16px;
    margin-top: 40px;
}

.hero__btn { min-width: 230px; }

.hero__note {
    margin-top: 20px;
    font-size: var(--fs-small);
    line-height: 1.4;
    color: var(--color-text-muted);
}

.hero__advantages {
    display: flex;
    border: 1px solid var(--color-text-muted);
}

.hero__advantage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 43px;
    padding: 10px 16px;
    font-size: var(--fs-body);
    line-height: 1.2;
    text-align: center;
}

.hero__advantage {
    border-left: 1px solid var(--color-text-muted);
}

.hero__advantage:first-child { border-left: 0; }

.hero__advantage::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
}

/* ── Metrics ────────────────────────────────────────────────────────────── */
.metrics {
    padding: var(--space-section) 0;
}

.metrics__list {
    display: flex;
}

.metrics__item {
    flex: 1;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 16px;
    padding: 8px 24px;
    border-left: 1px solid var(--color-line);
}

.metrics__item:first-child {
    padding-left: var(--content-indent);
    border-left: 0;
}

.metrics__value {
    font-size: 88px;
    white-space: nowrap;
}

.metrics__label {
    max-width: 200px;
    font-size: var(--fs-body);
    line-height: 1.3;
    color: var(--color-text-muted);
}

/* ── Directions ─────────────────────────────────────────────────────────── */
.directions {
    padding: var(--space-section) 0;
}

.directions__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 64px;
    padding-left: var(--content-indent);
}

.directions__all { margin-bottom: 6px; }

.directions__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.directions__cell {
    width: calc((100% - 48px) / 3);
}

.directions__cell:nth-child(n+4) {
    width: calc((100% - 24px) / 2);
}

/* ── AI teaser ──────────────────────────────────────────────────────────── */
.ai-teaser {
    padding: var(--space-section-lg) 0;
    background: var(--color-primary-10);
}

.ai-teaser__wrp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
    padding-left: var(--content-indent);
}

.ai-teaser__intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    max-width: 560px;
}

.ai-teaser__title {
    font-size: 48px;
    line-height: 1;
}

.ai-teaser__text {
    font-size: 18px;
    line-height: 1.45;
    color: var(--color-text-secondary);
}

.ai-teaser__cta { margin-top: 16px; }

.ai-teaser__steps {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 420px;
    flex: none;
}

.ai-teaser__step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 24px 24px 88px;
    background: var(--color-bg);
    border: 1px solid var(--color-primary-50);
}

.ai-teaser__step:first-child::before { display: none; }

.ai-teaser__step::before {
    content: "";
    position: absolute;
    left: 44px;
    bottom: 100%;
    height: 24px;
    border-left: 1px dashed var(--color-primary);
}

.ai-teaser__step:last-child {
    color: var(--color-bg);
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.ai-teaser__step-number {
    position: absolute;
    left: 24px;
    top: 22px;
    font-family: var(--font-heading);
    font-size: var(--fs-h3);
    font-weight: 500;
    line-height: 1;
    color: var(--color-primary);
}

.ai-teaser__step:last-child .ai-teaser__step-number { color: var(--color-bg); }

.ai-teaser__step-text {
    font-size: var(--fs-small);
    line-height: 1.4;
    color: var(--color-text-muted);
}

.ai-teaser__step:last-child .ai-teaser__step-text { color: var(--color-primary-10); }

/* ── Tech strip ─────────────────────────────────────────────────────────── */
.tech {
    padding: var(--space-section) 0;
}

.tech__wrp {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding-left: var(--content-indent);
}

.tech__title {
    flex: none;
    width: 200px;
    padding-top: 10px;
}

.tech__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech__item {
    padding: 10px 16px;
    font-family: var(--font-heading);
    font-size: var(--fs-small);
    font-weight: 500;
    line-height: 1;
    color: var(--color-text-muted);
    border: 1px solid var(--color-line);
    transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}

.tech__item:hover {
    color: var(--color-primary);
    background: var(--color-primary-10);
    border-color: var(--color-primary);
}

/* ── Prices ─────────────────────────────────────────────────────────────── */
.prices {
    padding: var(--space-section) 0;
}

.prices__wrp {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.prices__intro {
    display: flex;
    align-items: flex-start;
}

.prices__title {
    flex: 0 1 var(--aside-width);
    min-width: 0;
    padding: 0 40px 0 var(--content-indent);
}

.prices__title.heading::before { left: 62px; }

.prices__text {
    max-width: 520px;
    padding-top: 4px;
    font-size: 18px;
    line-height: 1.45;
    color: var(--color-text-secondary);
}

.prices__table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.prices__th {
    padding: 0 24px 16px 0;
    font-size: var(--fs-small);
    font-weight: 400;
    line-height: 1;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-text);
}

.prices__th:first-child { padding-left: var(--content-indent); }
.prices__th--price { padding-right: 0; text-align: right; }

.prices__service,
.prices__desc,
.prices__price {
    padding: 28px 24px 28px 0;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-line);
}

.prices__service {
    width: 506px;
    padding-left: var(--content-indent);
    font-family: var(--font-heading);
    font-size: var(--fs-h3);
    font-weight: 500;
    line-height: 1.15;
}

.prices__link { transition: color var(--transition); }
.prices__link:hover { color: var(--color-primary); }

.prices__desc {
    font-size: var(--fs-body);
    line-height: 1.4;
    color: var(--color-text-muted);
}

.prices__price {
    padding-right: 0;
    font-size: var(--fs-h3);
    line-height: 1.2;
    text-align: right;
}

.prices__actions {
    padding-left: var(--content-indent);
}

/* ── About ──────────────────────────────────────────────────────────────── */
.about {
    padding: var(--space-section-lg) 0;
}

.about__wrp {
    display: flex;
    align-items: flex-start;
}

.about__head {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 48px;
    width: var(--aside-width);
    padding: 0 40px 0 var(--content-indent);
}

.about__title.heading::before { left: -40px; }

.about__photo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
}

.about__image {
    width: 100%;
    height: auto;
    filter: grayscale(1);
}

.about__caption {
    font-size: var(--fs-small);
    color: var(--color-text-on-dark);
}

.about__text {
    max-width: 486px;
    padding-top: 6px;
    font-size: var(--fs-body);
    line-height: 1.4;
    color: var(--color-bg);
}


/* ═══ Tablet (< 1024px) ═════════════════════════════════════════════════ */
@media (max-width: 1023px) {
    .hero__wrp { padding: 80px 0 72px; }
    .prices__title { padding-top: 26px; }
    .prices__title.heading::before { left: var(--content-indent); }
    .about__title.heading::before { left: 0; }
    .hero__pixels--top { top: 24px; right: 40px; }
    .hero__pixels--bottom { top: 300px; left: 24px; }
    .hero__caret { height: 88px; width: 10px; margin-left: 12px; }
    .hero__typed { min-height: 104px; }
    .hero__title { font-size: 32px; margin-top: 20px; }
    .hero__subtitle { font-size: 16px; }

    .metrics__value { font-size: 64px; }
    .metrics__item { padding: 8px 16px; }
    .metrics__item:first-child { padding-left: var(--content-indent); }

    .directions__cell,
    .directions__cell:nth-child(n+4) { width: calc((100% - 20px) / 2); }
    .directions__grid { gap: 20px; }
    .directions__head { margin-bottom: 40px; }

    .ai-teaser__wrp { gap: 32px; }
    .ai-teaser__title { font-size: 36px; }
    .ai-teaser__text { font-size: 16px; }
    .ai-teaser__steps { width: 320px; }
    .ai-teaser__step { padding: 20px 20px 20px 72px; }

    .tech__title { width: 160px; }

    .prices__service { width: auto; font-size: 22px; }
    .prices__price { font-size: 22px; }

    .about__text { max-width: none; }

}

/* ═══ Phone (< 768px) ═══════════════════════════════════════════════════ */
@media (max-width: 767px) {
    /* Hero */
    .hero__wrp { padding: 48px 0 48px; }
    .hero__typed { min-height: 64px; }
    .hero__caret { width: 6px; height: 48px; margin-left: 8px; }
    .hero__pixels { --pixel: 16px; }
    .hero__pixels--top { top: 8px; right: 8px; }
    .hero__pixels--bottom { top: auto; bottom: 8px; left: 4px; }
    .hero__title { font-size: 26px; margin-top: 16px; }
    .hero__subtitle { margin-top: 14px; }
    .hero__actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-top: 28px;
    }
    .hero__btn { width: 100%; }
    .hero__note { margin-top: 16px; font-size: var(--fs-caption); }

    .hero__advantages { flex-direction: column; }
    .hero__advantage {
        justify-content: flex-start;
        min-height: 48px;
        padding: 12px 16px;
        text-align: left;
        border-left: 0;
        border-top: 1px solid var(--color-text-muted);
    }
    .hero__advantage:first-child { border-top: 0; }

    /* Metrics stack into rows */
    .metrics__list { flex-direction: column; }
    .metrics__item {
        flex-direction: row-reverse;
        align-items: baseline;
        justify-content: flex-end;
        gap: 16px;
        padding: 16px 0;
        border-left: 0;
        border-top: 1px solid var(--color-line);
    }
    .metrics__item:first-child { padding-left: 0; border-top: 0; }
    .metrics__value { font-size: 44px; min-width: 110px; }
    .metrics__label { max-width: none; font-size: var(--fs-small); }

    /* Directions */
    .directions__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 28px;
        padding-left: 0;
    }
    .directions__all { margin-bottom: 0; }
    .directions__grid { flex-direction: column; gap: 16px; }
    .directions__cell,
    .directions__cell:nth-child(n+4) { width: 100%; }

    /* AI teaser */
    .ai-teaser__wrp { flex-direction: column; padding-left: 0; }
    .ai-teaser__intro { max-width: none; gap: 16px; }
    .ai-teaser__title { font-size: 28px; }
    .ai-teaser__cta { width: 100%; }
    .ai-teaser__steps { width: 100%; gap: 16px; }
    .ai-teaser__step { padding: 18px 18px 18px 64px; }
    .ai-teaser__step-number { left: 18px; top: 18px; font-size: 22px; }
    .ai-teaser__step:first-child::before { display: none; }
    .ai-teaser__step::before { left: 34px; height: 16px; }

    /* Tech */
    .tech__wrp { flex-direction: column; gap: 16px; padding-left: 0; }
    .tech__title { width: auto; padding-top: 0; }
    .tech__item { padding: 8px 12px; }

    /* Prices become cards */
    .prices__wrp { gap: 32px; }
    .prices__title { flex: none; padding: 0; }
    .prices__title.heading::before { left: 0; }
    .about__title.heading::before { left: 0; }
    .prices__text { font-size: var(--fs-body); padding-top: 0; }

    .prices__table,
    .prices__table tbody,
    .prices__row,
    .prices__service,
    .prices__desc,
    .prices__price { display: block; width: auto; }

    .prices__thead { display: none; }

    .prices__row {
        padding: 20px 0;
        border-bottom: 1px solid var(--color-line);
    }

    .prices__row:hover { background: transparent; }

    .prices__service,
    .prices__desc,
    .prices__price {
        padding: 0;
        border: 0;
        text-align: left;
    }

    .prices__service { font-size: var(--fs-h3); }
    .prices__desc { margin-top: 6px; font-size: var(--fs-small); }
    .prices__price { margin-top: 10px; font-size: 24px; }
    .prices__actions { padding-left: 0; }
    .prices__actions .btn { width: 100%; }

    /* About */
    .about__wrp { flex-direction: column; gap: 24px; }
    .about__head { width: auto; gap: 24px; }
    .about__photo { max-width: 220px; }
    .about__text { padding-top: 0; }

    /* SEO text */
    .seo-text__body--collapsed { max-height: 180px; }
}
