/* ========== assets/styles/styles.css ========== */
/* ----- RESET & BASE (cosmic dark blue/purple) ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at 20% 30%, #0d0b1a, #03010a);
    color: #e1d9ff;
    line-height: 1.5;
    scroll-behavior: smooth;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* accent color (electric violet) */
.accent, .lang-switch, .floating-btn, .contact-frame button {
    color: #9F5CFF; 
    border-color: #7d4ec2;
}

a {
    color: #c0b7e6;
    text-decoration: none;
    transition: 0.2s;
}
a:hover { color: #e3c9ff; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #3f2b6b;
    display: inline-block;
    padding-bottom: 0.25rem;
    text-transform: uppercase;
    color: #bc9bff;
}

/* ----- HEADER (left logo+name / right icons+lang / burger) ----- */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(8, 4, 18, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid #9F5CFF;
    position: sticky;
    top: 0;
    z-index: 200;
}

.header__left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo {
    width: 32px;
    height: 32px;
    background: #b59dff;
    border-radius: 50%;
    /* inline SVG as fallback – we put an img, but we'll also embed via content in case image missing */
}
.studio-name {
    font-size: 1.7rem;
    font-weight: 300;
    letter-spacing: 1px;
	color: #9F5CFF;
}

.header__nav-desktop ul {
    display: flex;
    gap: 2.2rem;
    list-style: none;
}
.header__nav-desktop a {
    font-size: 1.1rem;
	color: #b397ff;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.social-desktop {
    display: flex;
    gap: 0.7rem;
}
.social-desktop svg {
    stroke: #b397ff;
    transition: 0.2s;
}
.social-desktop a:hover svg {
    stroke: #b397ff;
}

.lang-switch {
    background: transparent;
    border: 1px solid #6d4f9e;
    color: #d7c0ff;
    font-weight: 600;
    padding: 0.2rem 0.9rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
}
.lang-switch:hover {
    background: #32284d;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 300;
}
.burger span {
    width: 100%;
    height: 2px;
    background: #c7b3ff;
    transition: 0.2s;
}

/* mobile menu (dropdown) */
.mobile-menu {
    display: none;
    position: absolute;
    top: 75px;
    right: 2rem;
    background: #130e28;
    border: 2px solid #51447a;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    width: fit-content;
    max-width: 90vw;
    flex-direction: column;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    z-index: 250;
}
.mobile-menu.menu-open {
    display: flex;
}
.mobile-menu__social {
    display: flex;
    gap: 1.8rem;
    justify-content: center;
    border-bottom: 1px solid #9F5CFF;
    padding-bottom: 1rem;
    color: #b397ff;
}

.mobile-menu__nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: left;
}

.mobile-menu__nav a {
    font-size: 1.4rem;
    font-weight: 300;
    color: #b397ff;
}
/* ----- FOR ARHOR Links ----- */
[id] {
  scroll-margin-top: 60px; /* Высота вашей шапки + небольшой отступ */
}

/* ----- HERO ----- */
.hero {
    padding: 3rem 0 2rem;
    background: transparent;
}

.hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 3rem; /* Увеличил общий gap для большего расстояния между элементами */
    align-items: center;
}

.hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 5rem;
    position: relative;
}

.hero__image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #c38aff;
    border-right-color: #926ef0;
    animation: spinDot 2s linear infinite;
    opacity: 0.8;
}

.hero__image::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid transparent;
    border-bottom-color: #5d3eb0;
    border-left-color: #b77aff;
    animation: spinDot 3s linear infinite reverse;
    opacity: 0.5;
}

.hero__image img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #926ef0;
    box-shadow: 0 0 20px rgba(146, 110, 240, 0.3);
    transition: transform 0.3s ease;
}

.hero__content {
    max-width: 100%;
    padding-right: 1rem; /* Добавил отступ справа от текста */
}

.hero__title {
    font-size: 4rem;
    font-weight: 300;
    line-height: 1.1;
    background: linear-gradient(135deg, #dbb6ff, #a58cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
	color: #9F5CFF;
}

.hero__subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #c6a2ff;
}

.hero__cta {
    font-size: 1.3rem;
    border-left: 5px solid #926ef0;
    padding-left: 1.5rem;
    color: #c6a2ff;
}

.hero__spacer {
    /* Пустой блок для соблюдения пропорций */
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero__image {
        order: -1;
        margin-right: 0; /* Убираем отступ на мобильных */
    }
    
    .hero__image img {
        width: 150px; /* Немного меньше на мобильных */
        height: 150px;
    }
    
    .hero__content {
        padding-right: 0; /* Убираем отступ на мобильных */
    }
    
    .hero__spacer {
        display: none;
    }
}

@keyframes spinDot {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero__image img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(146, 110, 240, 0.5);
}

/* Для мобильных */
@media (max-width: 768px) {
    .hero__image::before {
        width: 160px;
        height: 160px;
    }
    
    .hero__image::after {
        width: 170px;
        height: 170px;
    }
}

/* ----- STEPS SECTION ----- */
.steps {
    padding: 3rem 0 2rem;
    background: transparent;
}

.steps .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.steps__grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.step__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step__icon-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 2px solid #926ef0;
    transition: all 0.3s ease;
}

.step__icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Степени затемнения (эффект проявления звезды) */
.step--dim-1 {
    opacity: 0.4;
    filter: grayscale(60%);
    box-shadow: 0 0 10px rgba(146, 110, 240, 0.2);
}

.step--dim-2 {
    opacity: 0.6;
    filter: grayscale(40%);
    box-shadow: 0 0 15px rgba(146, 110, 240, 0.3);
}

.step--dim-3 {
    opacity: 0.8;
    filter: grayscale(20%);
    box-shadow: 0 0 20px rgba(146, 110, 240, 0.4);
}

.step--dim-4 {
    opacity: 1;
    filter: grayscale(0%);
    box-shadow: 0 0 30px rgba(146, 110, 240, 0.7);
}

/* Эффект при наведении - иконка проявляется полностью */
.step__icon-wrapper:hover {
    opacity: 1 !important;
    filter: grayscale(0%) !important;
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(146, 110, 240, 0.9);
    transition: all 0.3s ease;
}

.step__text {
    font-size: 1rem;
    line-height: 1.5;
    color: #c6a2ff;
    max-width: 220px;
    margin: 0 auto;
}

.step__text strong {
    color: #9F5CFF;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.step__arrow {
    font-size: 3rem;
    color: #926ef0;
    opacity: 0.7;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    animation: pulseArrow 2s ease-in-out infinite; /* Добавленная строка */
}

/* Адаптивность для мобильных */
@media (max-width: 900px) {
    .steps__grid {
        grid-template-columns: 1fr;
        justify-items: center; /* Выравниваем все по центру */
        gap: 1rem;
    }
    
    .step__item {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .step__text {
        max-width: 280px;
        text-align: center; /* Центрируем текст */
    }
    
    .step__icon-wrapper {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .step__icon-wrapper {
        width: 90px;
        height: 90px;
    }
}

/* Новая анимация */
@keyframes pulseArrow {
    0% {
        opacity: 0.3;
        transform: scale(0.95);
        text-shadow: 0 0 0px #926ef0;
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        text-shadow: 0 0 15px #c38aff, 0 0 30px #926ef0;
    }
    100% {
        opacity: 0.3;
        transform: scale(0.95);
        text-shadow: 0 0 0px #926ef0;
    }
}

/* Для мобильных стрелок анимация тоже будет работать */
@media (max-width: 900px) {
    .step__arrow {
        transform: rotate(90deg)!important;
		font-size: 2.5rem;
        margin: 0.5rem 0;
        text-align: center;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        animation: pulseArrow 2s ease-in-out infinite; /* Анимация сохраняется */
    }
}

/* ----- SERVICES (flip cards) ----- */
.services {
    padding: 3rem 0 2rem;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.flip-card {
    background: transparent;
    width: 100%;
    height: 260px;
    perspective: 1200px;
}

.flip-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 30px;
    box-shadow: 0 20px 30px -10px #00000080;
}

.flip-card:hover .flip-card__inner {
    transform: rotateY(180deg);
}

.flip-card__front,
.flip-card__back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 30px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #1b143b;
    border: 2px solid #6851ac;
}

.flip-card__front {
    background: #120d27;
    color: #d4c3ff;
}

.flip-card__front h3 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #b397ff;
}

.card-short {
    font-size: 1rem;
    color: #9d86d6;
}

.flip-card__back {
    background: #1d153f;
    transform: rotateY(180deg);
    font-size: 1.1rem;
    border: 2px solid #af93ff;
    color: #c6a2ff;
}

/* ----- SERVICES (mobile) ----- */
@media (max-width: 768px) {
    .services {
        padding: 2rem 1rem;
    }
    
    .services__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .flip-card {
        height: auto;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        aspect-ratio: 16 / 9;
    }
    
    .flip-card__front,
    .flip-card__back {
        padding: 1.5rem 1rem;
    }
    
    .flip-card__front h3 {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }
    
    .card-short {
        font-size: 1rem;
    }
    
    .flip-card__back {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .flip-card {
        max-width: 100%;
    }
    
    .flip-card__front h3 {
        font-size: 1.3rem;
    }
    
    .card-short,
    .flip-card__back {
        font-size: 0.9rem;
    }
}

/* ----- WORKS (rotating images) ----- */
.works {
    padding: 3rem 2rem;
}

.works__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.work-card {
    display: block;
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* Соотношение 16:9 */
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid #634d9e;
    transition: 0.2s;
    background: #0f0b20;
}

.work-card:hover {
    border-color: #be9eff;
    transform: scale(1.02);
}

.rotating-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.rotating-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.rotating-images img.active {
    opacity: 1;
}

/* ----- WORKS (mobile) ----- */
@media (max-width: 768px) {
    .works {
        padding: 2rem 1rem;
    }
    
    .works__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .work-card {
        padding-bottom: 56.25%; /* Сохраняем 16:9 */
        width: 100%;
        max-width: 600px; /* Одинаковая максимальная ширина с flip-card */
        margin: 0 auto;
        border-width: 3px;
    }
}

@media (max-width: 480px) {
    .work-card {
        max-width: 100%; /* На очень маленьких экранах - на всю ширину */
        border-width: 1.8px;
    }
}

/* ----- CONTACTS ----- */
.contacts {
    padding: 4rem 0 2rem;
}
.contacts__grid {
    display: flex;
    justify-content: flex-start;
}
.contact-info {
    background: #0d0821cc;
    backdrop-filter: blur(4px);
    padding: 2rem 3rem;
    border-radius: 40px;
    border: 2px solid #6c50b3;
    font-size: 1.3rem;
}
.contact-info p {
    margin: 0.7rem 0;
    color: #c6a2ff;
}
.contact-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.8rem;
}
.contact-social svg {
    stroke: #a182e8;
}
.contact-social a:hover svg {
    stroke: #dbb9ff;
}

/* ----- FOOTER ----- */
.footer {
    background: #050311;
    border-top: 1px solid #423a63;
    padding: 2rem 0;
    margin-top: auto;
}
.footer__inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    color: #9483c9;
}
.footer-links a {
    margin: 0 0.5rem;
    color: #aa96ec;
}

/* ----- FLOATING BUTTON & FRAME ----- */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2c1f55;
    color: #eadaff;
    border: 2px solid #9f7eff;
    padding: 0.8rem 1.8rem;
    border-radius: 60px;
    font-weight: 600;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 5px 20px #190f3a;
    backdrop-filter: blur(4px);
}
.floating-btn:hover {
    background: #3b2b6b;
}

.contact-frame {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 300px;
    background: #130d29;
    border: 2px solid #846bcb;
    border-radius: 32px;
    padding: 1.5rem;
    box-shadow: 0 0 40px #221c3a;
    z-index: 300;
    display: none;
}
.contact-frame.show {
    display: block;
}
.contact-frame form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
}
.contact-frame h4 {
    font-size: 1.3rem;
    color: #c3acff;
}
.contact-frame input, .contact-frame textarea {
    background: #231d3b;
    border: 1px solid #6b51b1;
    border-radius: 40px;
    padding: 0.7rem 1rem;
    color: white;
    font-family: inherit;
}
.contact-frame button {
    background: #392e62;
    border: none;
    padding: 0.8rem;
    border-radius: 40px;
    font-weight: bold;
    color: #ebdfff;
    cursor: pointer;
}
.close-frame {
    position: absolute;
    top: -8px;
    right: -5px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #b098ff;
}

/* ----- mobile adaptive (<=768px) ----- */
@media (max-width: 768px) {
    .header {
        padding: 0.8rem 1rem;
    }
    .header__nav-desktop, .social-desktop {
        display: none;
    }
    .burger {
        display: flex;
    }
    .header__right {
        gap: 0.8rem;
    }
    .studio-name {
        font-size: 1.2rem;
    }
    .mobile-menu {
        right: 1rem;
        padding: 1.2rem;
    }
    .hero__title {
        font-size: 2.8rem;
    }
    .hero__subtitle {
        font-size: 1.2rem;
    }
    .services__grid {
        grid-template-columns: 1fr;
    }
    .works__grid {
        grid-template-columns: 1fr;
    }
    .contact-info {
        padding: 1.5rem;
        font-size: 1rem;
    }
    .floating-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
}