/* Для всех одиночных страниц (service, delivery) */

:root {
    --grey: #a8aab1;
    --dark: #313543;
    --red: #ef3e2c;
    --white: #faf9f6;
    --text-color: #faf9f6;
    --bg-color: #313543;
}

body {
     background-color: var(--bg-color);
     color: var(--text-color);
     font-family: 'Montserrat', sans-serif;
}

p {
    color: var(--white);
    max-width: 65ch;
    margin: 0 auto;
    margin-bottom: 1rem;
    line-height: 1.7;
}

main {
    padding-top: 2rem;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 4rem;
    font-weight: 500;
}

.title h1 {
    font-weight: 400;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    align-items: start;
}

section.service-section {
    margin-bottom: 6rem;
}

.left-pane {
    position: sticky;
    top: 50vh;
    transform: translateY(-50%);
    height: fit-content;
}

.image-holder {
    position: relative;
    width: 100%;
    max-width: 100px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

.service-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.service-image.is-active {
    opacity: 1;
}

.right-pane {
    position: relative;
    display: flex;
    flex-direction: column;
}

.service-item {
    color: var(--white);
    font-size: 1.1rem;
    padding-bottom: 15vh;
    transition: color 0.3s;
}

.service-item span {
    font-style: italic;
    font-size: .9rem;
}

.service-item.is-active {
    color: var(--red);
}

.service-item:last-child {
    border-bottom: none;
}

svg, g, path {
    max-width: 256px;
    max-height: 256px;
}

.divider {
    position: relative;
    height: 3px;
    background: linear-gradient(90deg, hsl(0, 0%, 20%), hsl(0, 0%, 70%), hsl(0, 0%, 20%));
}

/* Button */
.order {
    padding: 0;
    width: 6.8rem;
    margin: 0 auto;
    margin-bottom: 4rem;
}

.aboutme .order {
    width: 9.3rem;
}

.order a {
    color: var(--white);
    display: block;
    text-decoration: none;
    text-align: center;
    font-weight: 400;
    position: relative;
    z-index: 110;
    -webkit-text-size-adjust: 100%;
    padding: .8rem;
    width: 5rem;
    border: solid 3px var(--red);
    border-right: none;
    background: linear-gradient(29deg, transparent, transparent, rgba(255, 255, 255, .16), transparent, transparent);
}

.aboutme .order a {
    width: 7.5rem;
}

.order a::before {
    content: '';
    position: absolute;
    display: block;
    right: -3px;
    top: 0;
    width: 3px;
    border-left: solid 3px var(--red);
    height: .5rem;
}

.order a::after {
    content: '';
    position: absolute;
    display: block;
    right: -3px;
    bottom: 0;
    width: 3px;
    border-left: solid 3px var(--red);
    height: .5rem;
}

.order a span {
    width: 8.8rem;
    display: block;
    -webkit-box-reflect: below 1.5rem linear-gradient(#0004, #0001);
}

.aboutme .order a span {
    width: 10.8rem;
}
/* EOF Button */

/* Delivery page */
.deliveryAnime {
    height: 100svh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deliveryAnime h2 {
    position: absolute;
    top: 1rem;
    z-index: 10;
    text-align: center;
}

.deliveryCarousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deliveryAnimeItem {
    position: absolute;
    z-index: 14;
    width: 45vw;
    max-width: 350px;
    min-width: 175px;
    padding: 1.5rem;
    border: solid 3px var(--white);
    border-radius: 12px;
    background: rgba(49, 53, 67, 5%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.deliveryAnimeItem svg, .deliveryAnimeItem g, .deliveryAnimeItem path {
    width: 96px;
    height: 96px;
    margin-bottom: 1rem;
}

.deliveryAnimeItem .itemText {
    color: var(--white);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 280px;
}

.deliveryAnimeItem .itemText .word {
    display: inline-block;
    margin-right: 0.25em;
}

.deliveryAnimeItem:not(.firstVisible):last-child {
    opacity: 0;
}

.firstVisible {
    opacity: 1;
    animation: firstVisible .25s forwards;
}

@keyframes firstVisible {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.deliveryAnimeItem:not(.firstVisible):last-child svg path {
    opacity: 0;
}

.firstVisible svg path {
    stroke: #fff;
    stroke-width: 30px;
    fill: transparent;
    animation: svgAnime linear 1.5s forwards;
}

@keyframes svgAnime {
    from {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.deliveryAnimeItem:not(.active).next svg path {
    opacity: 0;
}

.deliveryAnimeItem.active.next svg path {
    stroke: #fff;
    stroke-width: 30px;
    fill: transparent;
    animation: svgAnimeNext linear 1.5s forwards;
}

@keyframes svgAnimeNext {
    from {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.deliveryAnimeItem > span {
    font-style: italic;
    font-weight: 100;
    font-size: 1.3rem;
    display: block;
    position: absolute;
    left: 1rem;
    top: 1rem;
}

.aboutme .text {
    text-align: center;
    opacity: 0;
    margin-bottom: 1rem;
}

.aboutme .sectionContentBtn.order:not(.visibleBtn) {
    opacity: 0;
    transform: translateY(30px);
}

.sectionContentBtn.order.visibleBtn {
    animation: visibleBtn 1s forwards;
}

@keyframes visibleBtn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.heroAboutText p:first-child {
    opacity: 0;
    transform: translateY(30px);
}

.heroAboutText p.animated:first-child {
    animation: visibleHeroTextFirst 1s forwards .25s;
}

@keyframes visibleHeroTextFirst {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.heroAboutText p:last-child {
    opacity: 0;
    transform: translateX(-30px);
}

.heroAboutText p.animated:last-child {
    animation: visibleHeroTextLast 1s forwards .25s;
}

@keyframes visibleHeroTextLast {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.heroAboutTextSecond p {
    opacity: 0;
    transform: translateY(30px);
}

.heroAboutTextSecond p.animated {
    animation: visibleHeroTextSecond 1s forwards .25s;
}

@keyframes visibleHeroTextSecond {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aboutme #modalOrder {
    background: var(--red);
}

.text span.word {
    line-height: 1.7;
}
/* EOF Delivery page */


/* About me page */

/* Скрываем только заголовок для анимации печатания */
.deliveryAnime h2 {
    opacity: 0;
}

/* Image */
.heroImage {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 820px;
    position: relative;
    margin: 0 auto;
    /* Фиксы для стабильности */
    transform: translateZ(0);
    contain: layout style paint;
}

img {
    object-fit: contain;
}

.image-wrap {
    transition: 1s ease-out;
    transition-delay: 0.2s;
    position: relative;
    width: auto;
    overflow: hidden;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    visibility: hidden;
}

.image-wrap img {
    will-change: transform;
    transform-origin: center center;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0); /* Принудительный композитный слой БЕЗ скейла */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.animating .image-wrap {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    visibility: visible;
    transform: skewY(0);
    max-width: 600px;
}

.animating img {
    margin: 0;
    border: none;
    max-width: 100%;
    border-radius: 0;
}
  
.fadeup {
    opacity: 0;
    transition: 0.4s ease-out;
    transform: translateY(40px);
}
  
.fading-up {
    opacity: 1;
    transition: 1s ease-out;
    transform: translateY(0px);
    transition-delay: 0.7s;
}
  
/* EOF Image */

/* EOF About me page */

@media (width > 1024px) {
    .aboutme .order {
        width: 11.3rem;
    }
    
    .aboutme .order a {
        width: 9.5rem;
    }
    
    .aboutme .order a span {
        width: 12.8rem;
    }
}