/* ═══════════════════════════════════════════════════════
   NAVBAR — Dark glass, bright white nav link text
   ═══════════════════════════════════════════════════════ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    height: 100px;
    display: flex;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.5s forwards;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    background: linear-gradient(180deg,
        rgba(6, 6, 8, 0.75) 0%,
        rgba(6, 6, 8, 0.5) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.08) 80%,
        transparent 100%);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.02) 0%,
        transparent 100%);
    pointer-events: none;
}

/* Scroll progress */
.scroll-progress-container {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    overflow: hidden;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
        rgba(255, 215, 0, 0.2),
        var(--accent) 60%,
        rgba(255, 255, 255, 0.9));
    box-shadow:
        0 0 12px rgba(255, 215, 0, 0.6),
        0 0 4px rgba(255, 215, 0, 0.8);
    transition: width 0.1s ease-out;
    border-radius: 0 2px 2px 0;
}

/* Scrolled state */
.navbar.scrolled {
    height: 64px;
    background: rgba(6, 6, 8, 0.88);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
}

.navbar.scrolled .main-logo-svg {
    height: 130px;
    max-height: 145px;
}

/* Hidden state */
.navbar {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease,
                height 0.4s ease,
                background 0.4s ease;
}

.navbar.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.navbar.hidden .scroll-progress-container {
    opacity: 0;
}

/* Nav container */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════
   LOGO + LIVE DOT
   ═══════════════════════════════════════════════════════ */

.nav-brand {
    height: 130px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    flex-shrink: 0;
    margin-left: -0.5rem; /* выравнивание левого края логотипа с заголовком hero */
}

.nav-brand .logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
}

/* Логотип в шапке — компактный размер */
.nav-brand .main-logo-svg {
    height: 180px;
    max-height: 200px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.1));
    transition: height 0.3s ease, filter 0.3s ease;
}

.main-logo-svg {
    height: 180px;
    max-height: 200px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.1));
    transition: height 0.3s ease, filter 0.3s ease;
}

.main-logo-svg:hover {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.25));
}

.nav-live-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    animation: livePulse 2.5s ease-in-out infinite;
    flex-shrink: 0;
    margin-bottom: 2px;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }
    50% { opacity: 0.5; box-shadow: 0 0 4px rgba(255, 215, 0, 0.3); }
}

/* ═══════════════════════════════════════════════════════
   NAV LINKS — Magnetic hover with sliding indicator
   ═══════════════════════════════════════════════════════ */

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-menu {
    display: flex;
    gap: 5px;
    position: relative;
    padding: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-link {
    font-family: var(--font-mono);
    font-size: clamp(0.72rem, 0.88vw, 0.82rem);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    letter-spacing: 0.1em;
    font-weight: 500;
    position: relative;
    padding: 10px 16px;
    border-radius: 8px;
    white-space: nowrap;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.nav-link:hover {
    color: #fff;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link.active {
    color: #fff;
    font-weight: 600;
}

.nav-link.active::before {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Выделенный пункт «Как мы работаем» — хочется нажать */
.nav-link--highlight {
    color: var(--accent);
    font-weight: 700;
}

.nav-link--highlight::before {
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.25);
}

.nav-link--highlight:hover {
    color: #fff;
    box-shadow: 0 0 24px -4px rgba(255, 215, 0, 0.3);
}

.nav-link--highlight:hover::before {
    opacity: 1;
    background: rgba(255, 215, 0, 0.18);
    border-color: rgba(255, 215, 0, 0.4);
}

.nav-link--highlight.active {
    color: var(--accent);
}

.nav-link--highlight.active::before {
    opacity: 1;
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.35);
}

/* ═══════════════════════════════════════════════════════
   PHONE (десктоп: всегда показываем ссылку и компактный телефон)
   ═══════════════════════════════════════════════════════ */

.nav-phone-compact {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.72rem;
    font-family: var(--font-b);
    font-weight: 400;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
}

.nav-phone-compact::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.9);
    transition: width 0.3s ease;
}

.nav-phone-compact:hover {
    color: #fff;
}

.nav-phone-compact:hover::after {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════
   CTA BUTTON — Premium golden with shimmer
   ═══════════════════════════════════════════════════════ */

/* .nav-cta-btn — unified style in main.css */

/* ═══════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 60px 0;
    position: relative;
    z-index: 10;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 60px;
    flex-grow: 1;
}

/* Резерв высоты под контент, чтобы избежать CLS при загрузке шрифтов */
.hero-text-block {
    min-height: clamp(280px, 42vh, 360px);
}

/* Kicker — короткая линия + // … (журнальный тег) */
.agency-badge.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: clamp(10px, 1.4vw, 14px);
    margin-bottom: clamp(0.65rem, 1.4vw, 1rem);
    padding: 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
    position: relative;
}

.hero-kicker__rule {
    width: clamp(28px, 3.6vw, 44px);
    height: 1px;
    flex-shrink: 0;
    background: linear-gradient(90deg, var(--accent), rgba(255, 215, 0, 0.35));
}

.hero-kicker__text {
    font-family: var(--font-label), ui-monospace, monospace;
    font-size: clamp(0.58rem, 0.72vw, 0.65rem);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.92);
}

/* Title — двухстрочный плакат */
.hero-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.06em;
    margin-bottom: 22px;
    max-width: min(56rem, 100%);
    text-wrap: balance;
    opacity: 0;
    filter: blur(10px);
    animation: revealBlur 1.2s cubic-bezier(0.22, 1, 0.36, 1) 1s forwards;
}

.hero-title__line {
    display: block;
    font-family: var(--font-hero-display), var(--font-display), system-ui, sans-serif;
    font-weight: 900;
    line-height: 0.94;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #fff;
}

.hero-title__line--top {
    font-size: clamp(2.475rem, 5.55vw, 4.8rem);
}

.hero-title__line--bottom {
    font-size: clamp(2.775rem, 6.225vw, 5.325rem);
    text-shadow: 0 0 48px rgba(255, 215, 0, 0.06);
}

/* Выделение слова «управляемую»: прямое подчёркивание с прорисовкой */
.hero-title-accent {
    position: relative;
    display: inline-block;
    color: var(--accent);
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.12);
}

.hero-title-underline {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 24px;
    pointer-events: none;
    color: var(--accent);
    opacity: 0.9;
}

.hero-title-underline-path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: heroUnderlineDraw 2.5s cubic-bezier(0.45, 0, 0.15, 1) 1.6s forwards;
}

@keyframes heroUnderlineDraw {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-title-underline-path {
        animation: none;
        stroke-dashoffset: 0;
    }
}

.accent-word {
    position: relative;
    display: inline-block;
    color: var(--accent);
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.15);
    white-space: nowrap;
}

.title-gradient {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Подзаголовок — спокойная «стеклянная» карточка без полосатого маркера */
.hero-description-wrapper {
    padding: clamp(14px, 2.2vw, 18px) clamp(16px, 2.6vw, 22px);
    padding-left: clamp(18px, 2.8vw, 22px);
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 1.2s forwards;
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(255, 215, 0, 0.14);
    background:
        linear-gradient(165deg, rgba(255, 215, 0, 0.045) 0%, transparent 42%),
        rgba(8, 9, 12, 0.78);
    box-shadow:
        inset 3px 0 0 0 rgba(255, 215, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 44px -18px rgba(0, 0, 0, 0.65),
        0 0 60px -36px rgba(255, 215, 0, 0.08);
}

.hero-description {
    font-size: clamp(0.88rem, 1.05vw, 1rem);
    color: rgba(255, 255, 255, 0.88);
    max-width: 500px;
    line-height: 1.62;
    letter-spacing: 0.01em;
    font-weight: 400;
    margin: 0;
    text-shadow: none;
}

/* Hero actions */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 1.4s forwards;
}

.hero-cta-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-cta-trust {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.3px;
}

/* .btn-main — unified style in main.css */

.vnedrenie .label {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════
   FOUNDERS — Premium cards (circles untouched)
   ═══════════════════════════════════════════════════════ */

.hero-founders {
    display: flex;
    gap: 30px;
    justify-content: flex-end;
    perspective: 1000px;
}

.founder-card {
    width: clamp(200px, 18vw, 280px);
    text-align: center;
    opacity: 0;
    transform: translateX(40px) scale(0.9);
    animation: fadeInRight 1s cubic-bezier(0.22, 1, 0.36, 1) 1.6s forwards;
    position: relative;
    cursor: crosshair;
}

.founder-card.offset {
    margin-top: 80px;
}

.img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.orbit-ring {
    position: absolute;
    inset: -12px;
    border: 1.5px solid transparent;
    border-top: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: rotateRing 8s linear infinite;
    z-index: 1;
    opacity: 0.6;
}

.img-frame {
    width: 92%;
    height: 92%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    position: relative;
    background: #111;
}

.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

#founder-2 .img-frame img {
    transform: scale(1.4) translateY(10%) translateX(-3%);
}

#founder-2:hover .img-frame img {
    transform: scale(1.5) translateY(10%) translateX(-3%);
}

.founder-card:hover .img-frame img {
    transform: scale(1.1);
}

.founder-name {
    display: block;
    font-weight: 800;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    margin-bottom: 5px;
}

.founder-role {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem;
    text-transform: uppercase;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════
   ДОСТИЖЕНИЯ — минималистичная плашка
   ═══════════════════════════════════════════════════════ */

.system-metrics {
    width: 100%;
    margin-top: 32px;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards;
}

.metrics-grid {
    display: flex;
    align-items: stretch;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: none;
}

.metrics-grid::before {
    display: none;
}

/* Блок достижений — компактный, без лишнего декора */
.metrics-achievements .metric-item {
    padding: 18px 14px;
}

.metric-item {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 12px;
    transition: background 0.25s ease;
}

.metric-item + .metric-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18%;
    height: 64%;
    width: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.metric-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.metric-item:hover .metric-value {
    text-shadow: none;
    transform: none;
}

.metric-value {
    font-family: var(--font-h);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 6px;
    text-shadow: none;
    transition: none;
    flex-shrink: 0;
}

.metric-label {
    font-family: var(--font-b);
    font-size: 0.6rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.8px;
    line-height: 1.3;
    max-width: 100%;
    word-break: break-word;
}

/* Десктоп: заголовок «В цифрах» только на мобильных */
.metrics-mobile-heading {
    display: none;
}

.metrics-mobile-wrap {
    display: block;
}

.metrics-scroll {
    overflow: visible;
}

.metric-label--mobile {
    display: none;
}

.metric-label--desktop {
    display: block;
}

/* Floating particles canvas */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-text-block,
.hero-founders,
.system-metrics {
    position: relative;
    z-index: 2;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile: founder cards — tighter orbit, no overflow */
@media (max-width: 768px) {
    .hero-founders .img-wrapper {
        aspect-ratio: 1 / 1;
        max-width: 100%;
    }

    .hero-founders .orbit-ring {
        inset: -8px;
        border-top-width: 1px;
        opacity: 0.5;
    }

    .hero-founders .orbit-ring.delay {
        inset: -6px;
    }

    .hero-founders .img-frame {
        border-width: 1.5px;
    }

    .hero-founders .img-frame img {
        object-fit: cover;
        object-position: center top;
        transform: none;
    }

    #founder-2 .img-frame img {
        transform: none;
    }
}

@media (max-width: 480px) {
    .hero-founders .orbit-ring {
        inset: -6px;
    }

    .hero-founders .orbit-ring.delay {
        inset: -4px;
    }
}

@media (max-width: 1024px), (pointer: coarse) {
    .navbar,
    .navbar.scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(6, 6, 8, 0.94);
    }

    .hero-title {
        filter: none;
        animation: none;
    }

    .hero-founders .orbit-ring {
        animation: none;
    }
}
