/* Эмуляция оригинальных шрифтов Атом */
@font-face {
    font-family: 'atom';
    src: url('https://atom.auto/_next/static/media/ca4788f40d4427d0-s.p.woff2') format('woff2');
    font-display: swap;
    font-weight: 500;
}

@font-face {
    font-family: 'atom';
    src: url('https://atom.auto/_next/static/media/e056faa9996ea05c-s.p.woff2') format('woff2');
    font-display: swap;
    font-weight: 400;
}

@font-face {
    font-family: 'atomInter';
    src: url('https://atom.auto/_next/static/media/9676e675a647453b-s.p.woff2') format('woff2');
    font-display: swap;
    font-weight: 500;
}

:root {
    --bg-color: #000;
    --bg-color-secondary: #0a0a0a;
    --text-primary: #fff;
    --text-secondary: #7f7f7f;
    --accent-color: #00b3b3;
    /* Teal у Атома */
    --btn-bg: rgba(255, 255, 255, 0.03);
    --btn-border: rgba(255, 255, 255, 0.1);
    --btn-text: #fff;
    --btn-hover-bg: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'atomInter', sans-serif;
    color: var(--text-primary);
    background-color: #000000;
    background-image: radial-gradient(circle at 50% 25%, rgba(0, 179, 179, 0.3) 0%, transparent 75%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 0 20px 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.profile {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-photo-wrapper {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, var(--accent-color), rgba(0, 179, 179, 0.2));
    margin-bottom: 24px;
    cursor: pointer;
}

.profile-photo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--bg-color-secondary);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Смещаем origin вправо и вверх, чтобы при зуме слева (перед лицом) было чуть больше "воздуха" */
    transform-origin: 60% 10%;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

.profile-photo-wrapper:hover .profile-photo {
    transform: scale(1.4);
}

.name {
    font-size: 40px;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
}

/* Glitch-эффект: однократное появление при загрузке */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    overflow: hidden;
    pointer-events: none;
}

.glitch::before {
    color: rgba(255, 255, 255, 0.7);
    animation: glitch-before 3s steps(1) 0.2s 1 forwards;
    clip-path: polygon(0 15%, 100% 15%, 100% 35%, 0 35%);
    opacity: 0;
}

.glitch::after {
    color: rgba(180, 180, 180, 0.6);
    animation: glitch-after 3s steps(1) 0.2s 1 forwards;
    clip-path: polygon(0 55%, 100% 55%, 100% 78%, 0 78%);
    opacity: 0;
}

@keyframes glitch-before {
    0% {
        opacity: 0;
        transform: translateX(0);
    }

    5% {
        opacity: 1;
        transform: translateX(-5px);
    }

    8% {
        opacity: 0;
        transform: translateX(5px);
    }

    12% {
        opacity: 1;
        transform: translateX(-3px);
        clip-path: polygon(0 5%, 100% 5%, 100% 25%, 0 25%);
    }

    15% {
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translateX(4px);
        clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
    }

    23% {
        opacity: 0;
    }

    28% {
        opacity: 1;
        transform: translateX(-6px);
    }

    30% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes glitch-after {
    0% {
        opacity: 0;
        transform: translateX(0);
    }

    6% {
        opacity: 1;
        transform: translateX(6px);
    }

    10% {
        opacity: 0;
        transform: translateX(-4px);
    }

    14% {
        opacity: 1;
        transform: translateX(3px);
        clip-path: polygon(0 45%, 100% 45%, 100% 65%, 0 65%);
    }

    18% {
        opacity: 0;
    }

    22% {
        opacity: 1;
        transform: translateX(-5px);
        clip-path: polygon(0 70%, 100% 70%, 100% 90%, 0 90%);
    }

    26% {
        opacity: 0;
    }

    30% {
        opacity: 1;
        transform: translateX(4px);
    }

    33% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* 绿色 пульсирующий статус-индикатор */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #2ecc71;
    box-shadow: 0 0 6px #2ecc71, 0 0 12px rgba(46, 204, 113, 0.5);
    animation: pulse-status 2.5s ease-in-out infinite;
    flex-shrink: 0;
    position: relative;
    cursor: default;
}

.status-dot::after {
    content: 'Открыт к общению';
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    background: rgba(20, 20, 20, 0.95);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(46, 204, 113, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-family: 'atomInter', sans-serif;
}

.status-dot:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Ночной режим: красный индикатор */
.status-dot.status-offline {
    background-color: #e74c3c;
    box-shadow: 0 0 6px #e74c3c, 0 0 12px rgba(231, 76, 60, 0.5);
    animation: pulse-offline 2.5s ease-in-out infinite;
}

.status-dot.status-offline::after {
    content: 'Доступен после 08:00 МСК';
    border-color: rgba(231, 76, 60, 0.3);
}

@keyframes pulse-offline {

    0%,
    100% {
        box-shadow: 0 0 6px #e74c3c, 0 0 12px rgba(231, 76, 60, 0.5);
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 10px #e74c3c, 0 0 22px rgba(231, 76, 60, 0.7);
        opacity: 0.75;
    }
}

@keyframes pulse-status {

    0%,
    100% {
        box-shadow: 0 0 6px #2ecc71, 0 0 12px rgba(46, 204, 113, 0.5);
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 10px #2ecc71, 0 0 22px rgba(46, 204, 113, 0.7);
        opacity: 0.75;
    }
}

.title {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'atomInter', sans-serif;
    margin-bottom: 4px;
}

.company-badge {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'atomInter', sans-serif;
    margin-bottom: 32px;
}

.company-name {
    font-size: 15px;
    color: var(--text-primary);
    font-family: 'atomInter', sans-serif;
    font-weight: 500;
}

.top-brand-logo {
    position: absolute;
    top: 24px;
    right: 32px;
    height: 80px;
    width: auto;
    opacity: 0.9;
    z-index: 10;
    transition: all 0.3s ease;
    cursor: pointer;
}

@media (max-width: 520px) {
    .top-brand-logo {
        height: 44px;
        top: 16px;
        right: 16px;
    }
}

/* Добавляем сильное неоновое свечение под лого и буквы при наведении */
.top-brand-logo:hover {
    opacity: 1;
    transform: scale(1.1);
    /* Создаем двойное "неоновое" свечение контура (drop-shadow работает по форме букв и значка) */
    filter: brightness(1.5) drop-shadow(0 0 8px #00b3b3) drop-shadow(0 0 20px rgba(0, 179, 179, 0.6));
}

.phone,
.email-text {
    display: inline-block;
    text-decoration: none;
    transition: color 0.2s ease;
}

.phone {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.email-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.phone:hover,
.email-text:hover {
    color: var(--accent-color);
}

.links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.link-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--btn-bg);
    border: 1px solid var(--btn-border);
    color: var(--btn-text);
    text-decoration: none;
    padding: 16px 24px;
    border-radius: 100px;
    /* Капсульная форма (pill shape), очень стильно */
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, background-color 0.3s, border-color 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    will-change: transform;
    transform-style: preserve-3d;
}

.link-btn:hover {
    background-color: var(--btn-hover-bg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 179, 179, 0.15);
}

.link-btn:active {
    transform: translateY(0);
}

.link-btn.highlight {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
    /* Контрастный черный текст на бирюзовом */
    font-weight: 600;
}

.link-btn.highlight:hover {
    background-color: #00cccc;
    border-color: #00cccc;
    box-shadow: 0 4px 24px rgba(0, 204, 204, 0.3);
}

/* Автомобиль внизу с анимацией "моргания фарами" */
.car-container {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    cursor: pointer;
    width: 100%;
}

.car-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
}

.car-image {
    width: 100%;
    display: block;
    /* Режим screen делает весь черный фон JPG картинки полностью прозрачным */
    mix-blend-mode: screen;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.car-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    /* Размываем белые пиксели и сильно увеличиваем их яркость */
    filter: blur(8px) brightness(4) contrast(2);
    /* Режим screen игнорирует черный цвет, оставляя только яркие белые фары */
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
}

.car-container:hover .car-glow {
    /* Двойное быстрое моргание при наведении (только фарами) */
    animation: flash-headlights 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes flash-headlights {
    0% {
        opacity: 0;
    }

    15% {
        opacity: 1;
        filter: blur(12px) brightness(5) contrast(3);
    }

    30% {
        opacity: 0;
    }

    45% {
        opacity: 1;
        filter: blur(12px) brightness(5) contrast(3);
    }

    60% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* Кастомный курсор */
.cursor-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease;
    z-index: 9999;
    mix-blend-mode: screen;
    box-shadow: 0 0 8px rgba(0, 179, 179, 0.8);
}

/* На мобильных курсора нет — скрываем точку */
@media (hover: none) {
    .cursor-dot {
        display: none;
    }

    body {
        cursor: auto;
    }
}

/* ── Кнопка калькулятора под машиной ── */
.calc-car-btn {
    background: rgba(0, 179, 179, 0.06);
    border-color: rgba(0, 179, 179, 0.22);
}

.calc-car-btn:hover {
    background: rgba(0, 179, 179, 0.12);
    border-color: var(--accent-color);
    box-shadow: 0 4px 24px rgba(0, 179, 179, 0.2);
}

/* ── Модальное окно: Кредитный Калькулятор ── */
.calc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.calc-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.calc-modal-box {
    position: relative;
    width: 94vw;
    max-width: 480px;
    height: 95vh;
    max-height: 920px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0, 179, 179, 0.25);
    box-shadow: 0 0 60px rgba(0, 179, 179, 0.15), 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.calc-modal-overlay.is-open .calc-modal-box {
    transform: translateY(0) scale(1);
}

.calc-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.calc-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
    font-family: sans-serif;
}

.calc-close-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}