@font-face {
    font-family: 'Slifted';
    src: url('/fonts/slifted.otf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat-Light.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --radius: 10px;
    --white: #fffff0;
    --black: #01020485;
    --white-text: #fffff0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    width: 100%;
    font-family: 'Montserrat', Helvetica, Arial;
    font-weight: 300;
    position: relative;
    z-index: -5;
    background: var(--black);
}

h1 {
    font-family: 'Slifted',Helvetica, Arial;
    line-height: 1;
    margin-bottom: 1.2rem;
}

h2 {
    font-family: 'Montserrat',Helvetica, Arial;
    font-weight: 500;
}

p {
    line-height: 1.6;
}

#neural-network-canvas {
    display: block;
    width: 100%;
    height: 100vh;
    cursor: pointer;
    position: fixed;
    inset: 0;
    z-index: -1;
}

section {
    width: 100%;
    height: 100vh;
    position: relative;
}

.hero {
    height: 100vh;
    color: var(--white-text);
    position: relative;
    overflow: hidden;
}

/* Первый контейнер с анимациями (читай как секция hero) */
.animeContainer-1 {
    height: 300vh;
}

.heroContent {
    position: fixed;
    bottom: 15%;
    left: 5%;
    width: 40%;
    container-type: inline-size;
    container-name: hero-content-container;
    z-index: 10;
    opacity: 0;
    transform: translateX(150px);
}

.heroImage {
    position: fixed;
    z-index: 3;
    height: auto;
    width: clamp(280px, 60%, 720px);
    top: 55%;
    right: -3%;
    transform: translateY(-50%) scale(1.8) rotate(-9deg);
    filter: blur(18px) brightness(140%) opacity(0.1);
}

picture, img {
    max-width: 100%;
    max-height: 100%;
}

.heroContent h1 {
    font-size: clamp(1.8rem, 7cqi, 3rem);
    line-height: 1;
    margin-bottom: 1.2rem;
}
.heroContent h2 {
    font-size: clamp(1.2rem, 4.5cqi, 1.8rem);
    font-family: 'Montserrat',Helvetica, Arial;
    font-weight: 500;
    opacity: 0;
}

.heroContent h2 .word {
    display: inline-block;
}

/* Второй контейнер с анимациями (about) */
.animeContainer-2 {
    height: 400vh;
    background: transparent;
    position: relative;
    z-index: 12;
}

section.aboutAlina {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 150vh;
    background: #fffff099;
}

.aboutAlinaInner {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    align-items: center;
}

.aboutAlinaImg {
    width: 344px;
    height: 517px;
    position: relative;
}

.aboutAlinaContent {
    padding: 0 6vw 0 0;
}

.aboutAlinaContent h2 {
    margin: 0 0 1rem;
    font-size: 3.6rem;
    text-transform: uppercase;
}

section.services {
    z-index: 24;
    position: relative;
    background: var(--white);
}

.servicesGrid {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    z-index: 2;
}

.gridItem {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gridItem.header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 8%;
}

.gridItem.header h2 {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gridItem.header h3 {
    font-size: clamp(1rem, 2vw, 1.6rem);
    font-weight: 100;
    line-height: 1.4;
    max-width: 90%;
}

.gridItem.serviceText {
    justify-content: flex-end;
    padding-right: 10%;
}

.gridItem.serviceText h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    text-shadow: -5px 4px 8px rgba(0, 0, 0, 0.15);
}

.servicesTitle {
    height: 30vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 5vh;
    padding-left: 12vw;
}

.servicesTitle h2 {
    font-size: 2.8rem;
}

.servicesTitle h3 {
    font-size: 1.4rem;
    font-weight: 100;
}

.servicesContent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vh 0;
    align-items: end;
}

.service {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3vw;
}

.service picture {
    width: 24%;
}

.service h2 {
    font-size: 3rem;
    min-width: 16vw;
    text-shadow: -7px 5px 10px #aaa;
}

.service picture {
    filter: drop-shadow(2px 32px 18px #777);
}

/* Glitch эффект */
.stack {
    display: grid;
    grid-template-columns: 1fr;
}

.stack span {
    grid-row-start: 1;
    grid-column-start: 1;
    --stack-height: calc(100% / var(--stacks) - 1px);
    --inverse-index: calc(calc(var(--stacks) - 1) - var(--index));
    --clip-top: calc(var(--stack-height) * var(--index));
    --clip-bottom: calc(var(--stack-height) * var(--inverse-index));
    clip-path: inset(var(--clip-top) 0 var(--clip-bottom) 0);
    animation: stack 340ms cubic-bezier(.26,.19,0,0.64) 1 backwards calc(var(--index) * 120ms), glitch 10s ease infinite 7s;
}

.stack span:nth-child(odd) { --glitch-translate: 8px; }
.stack span:nth-child(even) { --glitch-translate: -8px; }

@keyframes stack {
    0% {
        opacity: 0;
        transform: translateX(-50%);
        text-shadow: -2px 3px 0 red, 2px -3px 0 blue;
    };
    60% {
        opacity: 0.5;
        transform: translateX(50%);
    }
    80% {
        transform: none;
        opacity: 1;
        text-shadow: 2px -3px 0 red, -2px 3px 0 blue;
    }
    100% {
        text-shadow: none;
    }
}

@keyframes glitch {
    0% {
        text-shadow: -2px 3px 0 red, 2px -3px 0 blue;
        transform: translate(var(--glitch-translate));
    }
    1% {
        text-shadow: 2px -3px 0 red, -2px 3px 0 blue;
        transform: none;
    }
    2% {
        text-shadow: none;
        transform: none;
    }
    3% {
        text-shadow: -2px 3px 0 red, 2px -3px 0 blue;
        transform: translate(var(--glitch-translate));
    }
    4% {
        text-shadow: 2px -3px 0 red, -2px 3px 0 blue;
        transform: none;
    }
    5%, 100% {  
        text-shadow: none; 
        transform: none; 
    }
}

/* Preloader */
.preloader {
	position: fixed;
	inset: 0;
	background: #060607;
	z-index: 80;
	height: 100vh;
	width: 100vw;
	line-height: unset;
    container-type: inline-size;
    container-name: preloader-container;
    opacity: 1;
    transition: opacity 0.8s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.preloader.fade-out {
    opacity: 0;
}
.flip {
	height: clamp(40px, 10cqi, 75px);
	text-align: center;
	overflow: hidden;
	width: Xu;
	height: Yu;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: var(--white);
	text-transform: uppercase;
	font-size: clamp(2rem, 4.5cqi, 5.8rem);
    font-weight: 500;
}
.flip > div > div {
	color: #e1306c;
	display: inline-block;
}
.flip div:first-child {
	animation: show 7s linear 1;
}
.preloader-text {
	color: var(--white);
	font-size: clamp(1rem, 3cqi, 1.8rem);
	font-family: 'Montserrat', sans-serif;
    font-weight: 100;
    position: fixed;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}
@keyframes show {
	0% {
		transform: translateY(-600%);
	}
	12% {
		transform: translateY(-500%);
	}
	24% {
		transform: translateY(-400%);
	}
	36% {
		transform: translateY(-300%);
	}
	48% {
		transform: translateY(-200%);
	}
	60% {
		transform: translateY(-100%);
	}
	72% {
		transform: translateY(0%);
	}
	100% {
		transform: translateY(0%);
	}
}
/* EOF Preloader */

@media (width <= 1440px) {
    .aboutAlinaContent h2 {
        font-size: 2.5rem;
    }
}

@media (width <= 992px) {
    .heroContent {
        width: 50%;
    }
    .aboutAlinaContent h2 {
        font-size: 2rem;
    }
}

@media (width <= 768px) {
    .animeContainer-1 {
        height: 300vh;
    }
    .heroContent {
        width: 75%;
        left: 5%;
        transform: translateX(50px);
    }
    .heroContent h1 {
        margin-bottom: 0.5rem;
    }
    .heroImage {
        top: 5%;
        transform: translateY(-25%) scale(2) rotate(-9deg);
        max-width: 80%;
        filter: blur(18px) brightness(140%) opacity(0.15);
    }
    .animeContainer-2 {
        height: 250vh;
    }
    section.aboutAlina {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        align-content: space-evenly;
    }
    .aboutAlinaImg {
        width: 156px;
        height: 233px;
    }
    
    .servicesGrid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }
    
    .gridItem.header {
        padding: 8% 5%;
        min-height: 25vh;
    }
    
    .gridItem.serviceText {
        justify-content: center;
        padding: 8%;
        min-height: 25vh;
    }
    
    .gridItem.serviceText h2 {
        font-size: clamp(2.5rem, 8vw, 5rem);
    }
    .aboutAlinaContent {
        padding: 0 10vw;
    }
    .aboutAlinaContent h2 {
        font-size: 1.6rem;
    }
}