/* =========================================================
   TORNADO LAB
   HOME PAGE — HERO SLIDER
   ========================================================= */

.tl-hero {
    --tl-hero-green: #199b3d;
    --tl-hero-red: #f52c24;
    --tl-hero-duration: 7000ms;
    --tl-hero-height: clamp(500px, 39.8vw, 760px);
    --tl-hero-padding: clamp(32px, 7.8vw, 150px);

    position: relative;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
    background: #252222;
    color: #fff;
    font-family: inherit;
}

.tl-hero *,
.tl-hero *::before,
.tl-hero *::after {
    box-sizing: border-box;
}

/* Slides */

.tl-hero__slides {
    display: grid;
    min-height: var(--tl-hero-height);
}

.tl-hero__slide {
    position: relative;
    grid-area: 1 / 1;
    display: flex;
    align-items: flex-end;
    min-width: 0;
    min-height: var(--tl-hero-height);

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .65s ease,
        visibility .65s ease;
}

.tl-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

/* Background images */

/* =========================================================
   HERO — BACKGROUND IMAGES
   ========================================================= */

.tl-hero__slide--production {
    background-color: #141c1a;
    background-image: url('../img/custom/slide2.png');
}

.tl-hero__slide--torlit {
    background-color: #252222;
    background-image: url('../img/custom/slide2.png');
}

.tl-hero__slide--project {
    background-image: url('../img/custom/slide3.png');
}

.tl-hero__slide--series {
    background-image: url('../img/custom/slide4.png');
}

/* Video background */

.tl-hero__video {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
}

/* Dark overlay */

.tl-hero__slide::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;

    background: linear-gradient(90deg,
            rgba(12, 20, 22, .76) 0%,
            rgba(12, 20, 22, .56) 50%,
            rgba(12, 20, 22, .48) 100%);

    pointer-events: none;
}

/* Затемнение видео */

.tl-hero__slide--production::before {
    background: rgba(0, 12, 10, .60);
}

/* ТорЛит — готовый тёмный фон */

.tl-hero__slide--torlit::before {
    display: none;
}

/* Content container */

.tl-hero__inner {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: flex-end;

    width: 100%;
    min-height: var(--tl-hero-height);

    padding: 80px var(--tl-hero-padding) 65px;
}

.tl-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
}

/* Badge */

.tl-hero .tl-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 28px;
    background: #f8fafc;
    color: #25282c;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.tl-hero__badge::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tl-hero-green);
}

/* Headings */

.tl-hero .tl-hero__title {
    margin: 0 0 28px;
    padding: 0;
    color: #fff;
    font-family: inherit;
    font-size: 64px;
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -.025em;
    text-transform: none;
}

/* Description */

.tl-hero .tl-hero__description {
    margin: 0 0 28px;
    padding: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
}

.tl-hero__description::before,
.tl-hero__description::after {
    display: none;
}

/* Buttons */

.tl-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.tl-hero .tl-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 50px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.tl-hero .tl-hero__btn--primary {
    background: var(--tl-hero-green);
    border-color: var(--tl-hero-green);
}

.tl-hero .tl-hero__btn--primary:hover {
    background: #147d31;
    border-color: #147d31;
    color: #fff;
}

.tl-hero .tl-hero__btn--outline {
    background: transparent;
    border-color: rgba(255, 255, 255, .85);
}

.tl-hero .tl-hero__btn--outline:hover {
    background: #fff;
    border-color: #fff;
    color: #252222;
}

.tl-hero__btn span {
    font-size: 16px;
    line-height: 1;
}

/* TorLit artwork */

.tl-hero .tl-hero__art {
    position: absolute;
    z-index: 1;
    top: 45%;
    right: var(--tl-hero-padding);

    width: 29%;
    max-width: 550px;
    max-height: 76%;

    object-fit: contain;
    transform: translateY(-50%);
    pointer-events: none;
}

.tl-hero__slide--torlit .tl-hero__content {
    max-width: 65%;
}

/* Navigation */

.tl-hero__navigation {
    position: absolute;
    z-index: 5;
    right: var(--tl-hero-padding);
    bottom: 65px;
    display: grid;
    grid-template-columns: repeat(4, max-content) auto;
    align-items: start;
    gap: 16px;
    width: max-content;
    max-width: calc(100% - var(--tl-hero-padding) * 2);
}

.tl-hero .tl-hero__nav-item {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;

    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .6);

    text-align: left;
    cursor: pointer;
}

.tl-hero__progress {
    position: relative;
    display: block;
    width: 100%;
    height: 2px;
    margin-bottom: 9px;

    overflow: hidden;
    background: rgba(255, 255, 255, .3);
}

.tl-hero__progress::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--tl-hero-green);
    transform: scaleX(0);
    transform-origin: left center;
}

.tl-hero__nav-item.is-active {
    color: #fff;
}

.tl-hero__nav-item.is-active .tl-hero__progress::after {
    animation: tlHeroProgress var(--tl-hero-duration) linear forwards;
}

.tl-hero.is-paused .tl-hero__progress::after {
    animation-play-state: paused;
}

.tl-hero__nav-label {
    position: relative;
    display: block;
    padding-left: 14px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tl-hero__nav-item.is-active .tl-hero__nav-label::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 1px;
    width: 8px;
    height: 8px;
    background: var(--tl-hero-red);
    transform: translateY(-50%) rotate(45deg);
}

.tl-hero .tl-hero__pause {
    padding: 4px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.tl-hero button:focus-visible,
.tl-hero a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 5px;
}

.tl-stats {
    --tl-stats-green: #199b3d;
    width: 100%;
    padding: 36px 0 0px;
    background: #fff;
}

.tl-stats *,
.tl-stats *::before,
.tl-stats *::after {
    box-sizing: border-box;
}

.tl-stats__container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4.8vw, 90px);
}

.tl-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.tl-stats__item {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.tl-stats__value {
    flex-shrink: 0;
    color: var(--tl-stats-green);
    font-size: 44px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.025em;
    white-space: nowrap;
}

.tl-stats__label {
    color: #718096;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

/* =========================================================
   TORNADO LAB
   HOME PAGE — QUALITY
   ========================================================= */

.tl-quality {
    width: 100%;
    padding: 56px 0 75px;
    background: #fff;
}

.tl-quality *,
.tl-quality *::before,
.tl-quality *::after {
    box-sizing: border-box;
}

.tl-quality__container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4.8vw, 90px);
}

.tl-quality__card {
    display: grid;
    grid-template-columns: minmax(0, 35%) minmax(0, 1fr);
    align-items: center;
    gap: 80px;
    padding: 64px;
    background: #f3f6fa;
    border-radius: 14px;
}

/* Logo */

.tl-quality__logo {
    display: flex;
    align-items: center;
    justify-content: start;
    width: 100%;
}

.tl-quality .tl-quality__logo img {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    object-fit: contain;
}

/* Content */

.tl-quality .tl-quality__content {
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* Quote */

.tl-quality .tl-quality__quote {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #252222;
    font-family: inherit;
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    text-align: left;
}

/* Reset theme blockquote decoration */

.tl-quality .tl-quality__quote::before,
.tl-quality .tl-quality__quote::after {
    display: none;
    content: none;
}

/* Author */

.tl-quality .tl-quality__author {
    margin: 0;
    padding: 0;
    color: #9299a3;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
}

.tl-catalog {
    --tl-catalog-green: #199b3d;
    --tl-catalog-border: #e2e6eb;
    width: 100%;
    padding: 0 0 80px;
    background: #fff;
}

.tl-catalog *,
.tl-catalog *::before,
.tl-catalog *::after {
    box-sizing: border-box;
}

.tl-catalog__container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4.8vw, 90px);
}

/* Header */
.tl-catalog__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 42px;
}

.tl-catalog__heading {
    min-width: 0;
}

.tl-catalog .tl-catalog__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 12px;
    border-radius: 50px;
    background: #f3f6fa;
    color: #252222;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-transform: uppercase;
}

.tl-catalog__badge::before {
    content: "";
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    background: var(--tl-catalog-green);
    border-radius: 50%;
}

.tl-catalog .tl-catalog__title {
    margin: 0;
    padding: 0;
    color: #252222;
    font-family: inherit;
    font-size: 44px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.025em;
    text-transform: none;
}

.tl-catalog .tl-catalog__all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--tl-catalog-green);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.tl-catalog__all-link span {
    font-size: 16px;
    font-weight: 600;
    transition: transform .2s ease;
}

.tl-catalog__all-link:hover span {
    transform: translateX(4px);
}

/* Grid and cards */
.tl-catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.tl-catalog__card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--tl-catalog-border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.tl-catalog__card:hover,
.tl-catalog__card:focus-within {
    border-color: var(--tl-catalog-green);
    box-shadow: 0 8px 24px rgba(25, 155, 61, .06);
}

.tl-catalog .tl-catalog__image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #f0f1f2;
    border-radius: 10px;
    overflow: hidden;
}

.tl-catalog .tl-catalog__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .4s ease;
}

.tl-catalog__card:hover .tl-catalog__image img {
    transform: scale(1.025);
}

.tl-catalog__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 12px 12px;
}

.tl-catalog .tl-catalog__card-title {
    margin: 0 0 20px;
    padding: 0;
    color: #252222;
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
}

.tl-catalog .tl-catalog__card-title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.tl-catalog .tl-catalog__card-title a:hover {
    color: var(--tl-catalog-green);
}

/* Child categories — updated for long names */
.tl-catalog__children {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 6px 12px;
    margin-bottom: 28px;
}

.tl-catalog .tl-catalog__children a {
    display: inline;
    max-width: 100%;
    color: #718096;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: #a8b7b0;
    text-underline-offset: 3px;
    transition: color .2s ease;
}

.tl-catalog .tl-catalog__children a:hover {
    color: var(--tl-catalog-green);
    text-decoration-color: var(--tl-catalog-green);
}

/* All models */
.tl-catalog .tl-catalog__card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    color: var(--tl-catalog-green);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.tl-catalog__card-link span:last-child {
    font-size: 18px;
    line-height: 1;
    transition: transform .2s ease;
}

.tl-catalog__card-link:hover span:last-child {
    transform: translateX(4px);
}

/* Static custom order card */
.tl-catalog__card--custom {
    position: relative;
    justify-content: flex-end;
    min-height: 360px;
    padding: 24px;
    background: var(--tl-catalog-green);
    border-color: var(--tl-catalog-green);
    isolation: isolate;
}

.tl-catalog .tl-catalog__custom-art {
    position: absolute;
    z-index: -1;
    top: 0;
    right: 0;
    display: block;
    width: 50%;
    height: 55%;
    object-fit: contain;
    object-position: top right;
    pointer-events: none;
}

.tl-catalog__custom-content {
    position: relative;
    padding-top: 170px;
}

.tl-catalog .tl-catalog__custom-title {
    margin: 0 0 12px;
    padding: 0;
    color: #fff;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: none;
}

.tl-catalog .tl-catalog__custom-description {
    max-width: 340px;
    margin: 0 0 18px;
    padding: 0;
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.tl-catalog .tl-catalog__custom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 42px;
    padding: 12px 24px;
    border: 1px solid #fff;
    border-radius: 50px;
    background: #fff;
    color: #252222;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.tl-catalog .tl-catalog__custom-btn:hover {
    background: transparent;
    color: #fff;
}

.tl-catalog__custom-btn span {
    font-size: 16px;
    line-height: 1;
}

.tl-catalog a:focus-visible {
    outline: 2px solid var(--tl-catalog-green);
    outline-offset: 3px;
}

.tl-catalog__card--custom a:focus-visible {
    outline-color: #fff;
}

@media (max-width: 1199px) {

    .tl-catalog {
        padding-bottom: 60px;
    }

    .tl-catalog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .tl-catalog__header {
        margin-bottom: 32px;
    }

    .tl-catalog__card--custom {
        grid-column: 1 / -1;
        min-height: 260px;
    }

    .tl-catalog__custom-content {
        max-width: 60%;
        padding-top: 0;
    }

    .tl-catalog .tl-catalog__custom-art {
        width: 35%;
        height: 100%;
    }

    .tl-quality {
        padding: 30px 0 60px;
    }

    .tl-quality__card {
        grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
        gap: 64px;
        padding: 48px;
    }

    .tl-quality .tl-quality__quote {
        font-size: 20px;
    }

    .tl-stats {
        padding: 32px 0 45px;
    }

    .tl-stats__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }

    .tl-stats__item {
        gap: 14px;
    }

    .tl-stats__value {
        font-size: 36px;
    }

    .tl-hero {
        --tl-hero-height: 520px;
        --tl-hero-padding: 32px;
    }

    .tl-hero__navigation {
        top: 32px;
        bottom: auto;
        left: var(--tl-hero-padding);
        right: var(--tl-hero-padding);

        width: auto;
        grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
        gap: 14px;
    }

    .tl-hero__inner {
        padding-top: 115px;
        padding-bottom: 36px;
    }

    .tl-hero .tl-hero__title {
        font-size: 48px;
    }

    .tl-hero .tl-hero__art {
        width: 32%;
    }

    .tl-catalog .tl-catalog__title {
        font-size: 36px;
    }
}

@media(max-width: 991px) {
    .tl-quality__card {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
        padding: 40px;
        border-radius: 12px;
    }
}

@media (max-width: 767px) {

    .tl-catalog .tl-catalog__card-link {
        margin-top: 0;
    }

    .all-text-models {
        display: none;
    }

    .tl-catalog .tl-catalog__image {
        max-width: 84px;
    }

    .tl-catalog {
        padding-bottom: 40px;
    }

    .tl-catalog__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 24px;
    }

    .tl-catalog .tl-catalog__title {
        font-size: 28px;
    }

    .tl-catalog__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .tl-catalog__card {
        flex-direction: row;
        align-items: center;
        padding: 12px;
        border-radius: 12px;
    }

    .tl-catalog__body {
        padding: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .tl-catalog .tl-catalog__card-title {
        font-size: 16px;
        margin: 0;
    }

    .tl-catalog__children {
        display: none;
    }

    .tl-catalog__card--custom {
        grid-column: auto;
        min-height: 320px;
        padding: 24px;
    }

    .tl-catalog__custom-content {
        max-width: 100%;
        padding-top: 140px;
    }

    .tl-catalog .tl-catalog__custom-art {
        width: 45%;
        height: 50%;
    }

    .tl-quality {
        padding: 15px 0 40px;
    }

    .tl-quality .tl-quality__logo img {
        max-width: 260px;
    }

    .tl-quality .tl-quality__quote {
        font-size: 18px;
        line-height: 1.6;
        margin-bottom: 14px;
    }

    .tl-quality .tl-quality__author {
        font-size: 12px;
    }

    .tl-stats {
        padding: 28px 0 35px;
    }

    .tl-stats__grid {
        gap: 24px 16px;
    }

    .tl-stats__item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .tl-stats__value {
        font-size: 28px;
    }

    .tl-stats__label {
        font-size: 12px;
        line-height: 1.5;
    }

    .tl-stats__label br {
        display: none;
    }

    .tl-hero__video {
        object-position: center center;
    }

    .tl-hero__slide--torlit {
        background-position: 70% center;
    }

    .tl-hero__slide--torlit::before {
        display: block;

        background: linear-gradient(0deg,
                rgba(37, 34, 34, .95) 0%,
                rgba(37, 34, 34, .60) 50%,
                rgba(37, 34, 34, .15) 100%);
    }

    .tl-hero__slide--torlit .tl-hero__inner {
        padding-top: 120px;
    }

    .tl-hero {
        --tl-hero-height: 540px;
        --tl-hero-padding: 20px;
    }

    .tl-hero__navigation {
        top: 24px;
        gap: 8px;
    }

    .tl-hero__inner {
        padding-top: 120px;
        padding-bottom: 32px;
    }

    .tl-hero .tl-hero__title {
        line-height: 1.2;
        font-size: 32px;
    }

    .tl-hero .tl-hero__title br,
    .tl-hero .tl-hero__description br {
        display: none;
    }

    .tl-hero .tl-hero__btn {
        padding: 12px 18px;
        min-height: 42px;
        font-size: 10px;
    }

    .tl-hero__slide--torlit .tl-hero__content {
        max-width: 100%;
    }

    .tl-hero__slide--torlit .tl-hero__inner {
        padding-top: 270px;
    }

    .tl-hero .tl-hero__art {
        top: 90px;
        right: 20px;
        width: 160px;
        height: 160px;
        transform: none;
    }

    .tl-hero__slide--project {
        background-position: 65% center;
    }

    .tl-hero__slide--series {
        background-position: 65% center;
    }

    .tl-hero__slide::before {
        background: rgba(12, 20, 22, .67);
    }

    .tl-hero__slide--torlit::before {
        display: none;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {

    .tl-hero__slide {
        transition: none;
    }

    .tl-hero__nav-item.is-active .tl-hero__progress::after {
        animation: none;
        transform: scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .tl-hero__video {
        display: none;
    }
}

@keyframes tlHeroProgress {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .tl-catalog *,
    .tl-catalog *::before,
    .tl-catalog *::after {
        transition: none;
    }
}