/* =========================================================
   Home page hero slider
   ========================================================= */

.home-hero {
    --home-hero-height: clamp(520px, 44vw, 680px);

    position: relative;
    min-height: var(--home-hero-height);
    overflow: hidden;
    background: var(--color-navy-dark);
}

.home-hero__slide {
    position: absolute;
    inset: 0;
    min-height: var(--home-hero-height);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 650ms ease,
        visibility 650ms ease;
}

.home-hero__slide.is-active {
    z-index: 1;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.home-hero__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgb(14 20 28 / 42%) 0%,
            rgb(14 20 28 / 26%) 38%,
            rgb(14 20 28 / 10%) 68%,
            rgb(14 20 28 / 0%) 100%);
}

.home-hero__slide--shipowners::after {
    background: linear-gradient(90deg,
            rgb(0 48 93 / 48%) 0%,
            rgb(0 48 93 / 30%) 38%,
            rgb(0 48 93 / 10%) 68%,
            transparent 100%);
}

.home-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero__slide--shipowners .home-hero__image {
    object-position: 56% center;
}

.home-hero__slide--seafarers .home-hero__image {
    object-position: 64% center;
}

.home-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    min-height: var(--home-hero-height);
    padding-top: 138px;
    padding-bottom: 92px;
    color: var(--color-white);
}

.home-hero__title {
    max-width: 650px;
    margin: 0 0 20px;
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: clamp(38px, 4.2vw, 58px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-transform: none;
}

.home-hero__description {
    max-width: 650px;
    margin: 0 0 32px;
    color: rgb(255 255 255 / 94%);
    font-size: 18px;
    line-height: 1.55;
    font-weight: 500;
    text-shadow: 0 2px 10px rgb(0 0 0 / 24%);
}

.home-hero__buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.home-hero__button {
    min-width: 154px;
}

.home-hero__button--secondary {
    color: var(--color-white);
    background: rgb(0 48 93 / 24%);
    border: 1px solid rgb(255 255 255 / 80%);
    box-shadow: none;
}

.home-hero__button--secondary:hover,
.home-hero__button--secondary:focus-visible {
    color: var(--color-navy-dark);
    background: var(--color-white);
    transform: translateY(-1px);
}

.home-hero__dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}

.home-hero__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background: rgb(255 255 255 / 52%);
    border: 1px solid rgb(255 255 255 / 85%);
    border-radius: 50%;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.home-hero__dot:hover,
.home-hero__dot:focus-visible {
    background: var(--color-white);
}

.home-hero__dot.is-active {
    background: var(--color-white);
    transform: scale(1.22);
}

/* =========================================================
   Home hero swipe
   ========================================================= */
.home-hero {
    touch-action: auto;
}

@media (max-width: 640px) {
    .home-hero {
        touch-action: pan-y;
    }
}

.home-hero__image {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.home-hero.is-dragging {
    cursor: grabbing;
    user-select: none;
}

@media (hover: hover) and (pointer: fine) {

    .home-hero a,
    .home-hero button {
        cursor: pointer;
    }
}

/* =========================================================
   Home page introduction
   ========================================================= */

.home-intro {
    padding: 76px 0;
    background: linear-gradient(135deg,
            var(--color-white) 0%,
            var(--color-light-blue) 100%);
}

.home-intro__inner {
    max-width: 980px;
}

.home-intro__title {
    max-width: 900px;
    margin: 0 0 24px;
    color: var(--color-blue);
    font-family: var(--font-primary);
    font-size: clamp(34px, 2.5vw, 50px);
    font-weight: 400;
    line-height: 1.15;
}

.home-intro__text {
    max-width: 920px;
    margin: 0;
    color: var(--color-navy-dark);
    font-size: 18px;
    line-height: 1.75;
}

/* =========================================================
   Home page corporate values
   ========================================================= */

.home-values {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 84px 0 96px;
    background: linear-gradient(135deg,
            #dce9f6 0%,
            var(--color-light-blue) 50%,
            #dfeaf5 100%);
}

.home-values__map {
    position: absolute;
    top: 53%;
    left: 50%;
    z-index: 0;
    width: min(1160px, 92vw);
    max-width: none;
    height: auto;
    opacity: 0.52;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
}

.home-values__inner {
    position: relative;
    z-index: 1;
}

.home-values__header {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.home-values__eyebrow {
    margin: 0 0 10px;
    color: var(--color-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-values__title {
    margin: 0;
    color: var(--color-navy-dark);
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.15;
}

.home-values__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-values__item {
    min-height: 250px;
    padding: 26px 22px;
    background: rgb(255 255 255 / 82%);
    border: 1px solid rgb(255 255 255 / 92%);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgb(0 48 93 / 9%);
}

.home-values__item-image,
.home-values__toggle {
    display: none;
}

.home-values__panel {
    display: block;
}

.home-values__number {
    display: block;
    margin-bottom: 22px;
    color: var(--color-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.home-values__item-title {
    margin: 0 0 14px;
    color: var(--color-navy-dark);
    font-size: 20px;
    line-height: 1.25;
}

.home-values__item-text {
    margin: 0;
    color: rgb(1 33 78 / 82%);
    font-size: 15px;
    line-height: 1.65;
}

.home-values__dots {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.home-values__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background: rgb(1 33 78 / 20%);
    border: 1px solid rgb(1 33 78 / 38%);
    border-radius: 50%;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}

.home-values__dot:hover,
.home-values__dot:focus-visible {
    background: rgb(49 125 185 / 55%);
    border-color: var(--color-blue);
}

.home-values__dot.is-active {
    background: var(--color-blue);
    border-color: var(--color-blue);
    transform: scale(1.2);
}

/* =========================================================
   Home page quick links
   ========================================================= */

.home-links {
    padding: 78px 0 90px;
    background: var(--color-white);
}

.home-links__container {
    width: min(1380px, calc(100% - 40px));
    margin-right: auto;
    margin-left: auto;
}

.home-links__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.home-links__card {
    position: relative;
    aspect-ratio: 3 / 4;
    min-width: 0;
    overflow: hidden;
    background: var(--color-navy-dark);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgb(0 48 93 / 14%);
    transition:
        transform 220ms ease,
        box-shadow 220ms ease;
}

.home-links__card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,
            rgb(1 33 78 / 2%) 20%,
            rgb(1 33 78 / 22%) 52%,
            rgb(1 33 78 / 94%) 100%);
    pointer-events: none;
}

.home-links__card:hover {
    box-shadow: 0 24px 52px rgb(0 48 93 / 20%);
    transform: translateY(-4px);
}

.home-links__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.home-links__card:hover .home-links__image {
    transform: scale(1.035);
}

.home-links__content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 44px 34px 36px;
    color: var(--color-white);
    text-align: center;
}

.home-links__title {
    margin: 0 0 14px;
    color: var(--color-white);
    font-size: clamp(28px, 2.5vw, 36px);
    line-height: 1.15;
}

.home-links__description {
    max-width: 330px;
    min-height: 54px;
    margin: 0 0 24px;
    color: rgb(255 255 255 / 92%);
    font-size: 16px;
    line-height: 1.55;
}

.home-links__button {
    min-width: 150px;
    min-height: 46px;
    padding: 0 24px;
    color: var(--color-white);
    background: rgb(0 48 93 / 22%);
    border: 1px solid rgb(255 255 255 / 84%);
    box-shadow: none;
}

.home-links__button:hover,
.home-links__button:focus-visible {
    color: var(--color-navy-dark);
    background: var(--color-white);
    transform: translateY(-1px);
}

/* =========================================================
   Home page scroll reveal
   ========================================================= */

.home-reveal-ready [data-home-reveal="fade-up"],
.home-reveal-ready [data-home-reveal="value"] {
    --home-reveal-delay: 0ms;

    visibility: hidden;
    opacity: 0;
    translate: 0 28px;
    transition:
        visibility 0s linear 700ms,
        opacity 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--home-reveal-delay),
        translate 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--home-reveal-delay);
}

.home-reveal-ready [data-home-reveal="fade-up"].is-visible,
.home-reveal-ready [data-home-reveal="value"].is-visible {
    visibility: visible;
    opacity: 1;
    translate: 0 0;
    transition:
        visibility 0s linear 0s,
        opacity 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--home-reveal-delay),
        translate 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--home-reveal-delay);
}

/* Последовательное появление ценностей */

.home-values__item:nth-child(1) {
    --home-reveal-delay: 100ms;
}

.home-values__item:nth-child(2) {
    --home-reveal-delay: 190ms;
}

.home-values__item:nth-child(3) {
    --home-reveal-delay: 280ms;
}

.home-values__item:nth-child(4) {
    --home-reveal-delay: 370ms;
}

.home-values__item:nth-child(5) {
    --home-reveal-delay: 460ms;
}

/* Карточки Company, Services и Contacts */

.home-reveal-ready [data-home-reveal="card"] {
    --home-reveal-delay: 0ms;

    visibility: hidden;
    opacity: 0;
    translate: -36px 0;
    pointer-events: none;
    transition:
        visibility 0s linear 720ms,
        opacity 900ms cubic-bezier(0.22, 1, 0.36, 1) var(--home-reveal-delay),
        translate 900ms cubic-bezier(0.22, 1, 0.36, 1) var(--home-reveal-delay),
        transform 220ms ease,
        box-shadow 220ms ease;
}

.home-reveal-ready [data-home-reveal="card"].is-visible {
    visibility: visible;
    opacity: 1;
    translate: 0 0;
    pointer-events: auto;
    transition:
        visibility 0s linear 0s,
        opacity 900ms cubic-bezier(0.22, 1, 0.36, 1) var(--home-reveal-delay),
        translate 900ms cubic-bezier(0.22, 1, 0.36, 1) var(--home-reveal-delay),
        transform 220ms ease,
        box-shadow 220ms ease;
}

.home-links__card:nth-child(1) {
    --home-reveal-delay: 0ms;
}

.home-links__card:nth-child(2) {
    --home-reveal-delay: 320ms;
}

.home-links__card:nth-child(3) {
    --home-reveal-delay: 640ms;
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 900px) {
    .home-hero {
        --home-hero-height: 600px;
    }

    .home-hero__content {
        padding-top: 112px;
        padding-bottom: 84px;
    }

    .home-hero__title {
        max-width: 560px;
        font-size: clamp(34px, 5.8vw, 48px);
    }

    .home-hero__description {
        max-width: 570px;
        font-size: 17px;
        line-height: 1.58;
    }

    .home-intro {
        padding: 64px 0;
    }

    .home-values {
        padding: 72px 0 80px;
    }

    .home-values__map {
        width: 1080px;
        opacity: 0.44;
    }

    .home-values__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-links {
        padding: 68px 0 78px;
    }

    .home-links__container {
        width: min(920px, calc(100% - 40px));
    }

    .home-links__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .home-links__card:last-child {
        grid-column: 1 / -1;
        width: calc(50% - 10px);
        justify-self: center;
    }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {
    .home-hero {
        --home-hero-height: 580px;
    }

    .home-hero__slide::after {
        background: linear-gradient(90deg,
                rgb(14 20 28 / 56%) 0%,
                rgb(14 20 28 / 38%) 58%,
                rgb(14 20 28 / 12%) 100%);
    }

    .home-hero__slide--shipowners .home-hero__image {
        object-position: 62% center;
    }

    .home-hero__slide--seafarers .home-hero__image {
        object-position: 52% center;
    }

    .home-hero__content {
        justify-content: flex-end;
        padding-top: 108px;
        padding-bottom: 82px;
    }

    .home-hero__title {
        max-width: 480px;
        margin-bottom: 16px;
        font-size: clamp(30px, 8.8vw, 40px);
    }

    .home-hero__description {
        max-width: 510px;
        margin-bottom: 26px;
        font-size: 17px;
        line-height: 1.58;
    }

    .home-hero__button {
        min-width: 142px;
    }

    .home-intro {
        padding: 52px 0;
    }

    .home-intro__title {
        margin-bottom: 18px;
        font-size: 34px;
    }

    .home-intro__text {
        font-size: 16px;
        line-height: 1.7;
    }

    .home-values {
        padding: 60px 0 68px;
    }

    .home-values__map {
        top: 46%;
        width: 900px;
        opacity: 0.3;
    }

    .home-values__header {
        margin-bottom: 34px;
    }

    .home-values__title {
        font-size: 34px;
    }

    .home-values__list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .home-values__list.is-accordion-ready .home-values__item {
        position: relative;
        isolation: isolate;
        display: flex;
        flex-direction: column;
        min-height: 78px;
        padding: 0;
        overflow: hidden;
        background: var(--color-navy-dark);
        border: 0;
        border-radius: 18px;
        box-shadow:
            0 14px 32px rgb(0 48 93 / 16%);
    }

    .home-values__list.is-accordion-ready .home-values__item::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        background:
            linear-gradient(90deg,
                rgb(1 20 42 / 68%) 0%,
                rgb(1 25 50 / 48%) 65%,
                rgb(1 25 50 / 32%) 100%);
        pointer-events: none;
        transition:
            background 360ms ease;
    }

    .home-values__list.is-accordion-ready .home-values__item.is-open::after {
        background:
            linear-gradient(180deg,
                rgb(1 20 42 / 38%) 0%,
                rgb(1 25 50 / 54%) 48%,
                rgb(1 25 50 / 88%) 100%);
    }

    .home-values__list.is-accordion-ready .home-values__item-image {
        position: absolute;
        inset: 0;
        z-index: 0;
        display: block;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        object-position: center;
        pointer-events: none;
        user-select: none;
        transition:
            transform 500ms ease;
    }

    .home-values__list.is-accordion-ready .home-values__item.is-open .home-values__item-image {
        transform: scale(1.025);
    }

    .home-values__list.is-accordion-ready .home-values__toggle {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 78px;
        padding: 18px 22px;
        color: var(--color-white);
        background: transparent;
        border: 0;
        cursor: pointer;
        text-align: left;
    }

    .home-values__list.is-accordion-ready .home-values__toggle:focus-visible {
        outline:
            2px solid rgb(255 255 255 / 92%);
        outline-offset: -4px;
    }

    .home-values__toggle-title {
        color: var(--color-white);
        font-size: clamp(24px, 7.2vw, 29px);
        font-weight: 700;
        line-height: 1.15;
        letter-spacing: -0.02em;
        text-shadow:
            0 2px 12px rgb(0 0 0 / 38%);
    }

    .home-values__toggle-title--full {
        display: none;
    }

    .home-values__item.is-open .home-values__toggle-title--short {
        display: none;
    }

    .home-values__item.is-open .home-values__toggle-title--full {
        display: inline;
    }

    .home-values__list.is-accordion-ready .home-values__panel {
        position: relative;
        z-index: 2;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition:
            max-height 420ms cubic-bezier(0.22, 1, 0.36, 1),
            opacity 260ms ease;
    }

    .home-values__list.is-accordion-ready .home-values__item.is-open .home-values__panel {
        max-height: 260px;
        opacity: 1;
    }

    .home-values__list.is-accordion-ready .home-values__panel-inner {
        display: flex;
        align-items: flex-end;
        min-height: 230px;
    }

    .home-values__list.is-accordion-ready .home-values__number,
    .home-values__list.is-accordion-ready .home-values__item-title {
        display: none;
    }

    .home-values__list.is-accordion-ready .home-values__item-text {
        width: 100%;
        margin: 0;
        padding: 0 22px 26px;
        color: rgb(255 255 255 / 96%);
        font-size: 16px;
        line-height: 1.58;
        text-shadow:
            0 2px 12px rgb(0 0 0 / 44%);
    }

    .home-values__dots {
        display: none;
    }

    .home-links {
        padding: 56px 0 64px;
    }

    .home-links__container {
        width: min(520px, calc(100% - 30px));
    }

    .home-links__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .home-links__card,
    .home-links__card:last-child {
        grid-column: auto;
        width: 100%;
    }

    .home-links__content {
        padding: 38px 24px 28px;
    }

    .home-links__description {
        min-height: 0;
        font-size: 15px;
    }

    .home-reveal-ready [data-home-reveal="fade-up"],
    .home-reveal-ready [data-home-reveal="value"] {
        translate: 0 20px;
    }

    .home-reveal-ready [data-home-reveal="card"] {
        translate: -22px 0;
    }
}

@media (max-width: 420px) {
    .home-hero__buttons {
        width: 100%;
    }

    .home-hero__button {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    .home-hero__slide,
    .home-hero__dot {
        transition: none;
    }

    .home-reveal-ready [data-home-reveal] {
        visibility: visible;
        opacity: 1;
        translate: 0 0;
        clip-path: none;
        filter: none;
        pointer-events: auto;
        transition: none;
    }

    .home-values__list {
        scroll-behavior: auto;
    }
}