/* =========================================================
   Jetigen — modern home page styles
   Подключается только на главной (home.html).
   Не пересекается с глобальными стилями: всё под .home-modern.
   ========================================================= */

.home-modern {
    --hm-bg: #0b1220;
    --hm-bg-2: #111a2e;
    --hm-fg: #e9edf5;
    --hm-muted: #aab2c5;
    --hm-accent: #d4af37;        /* золотой */
    --hm-accent-2: #ffd76b;
    --hm-emerald: #2ecc71;
    --hm-blue: #4ea1ff;
    --hm-card: rgba(255, 255, 255, 0.06);
    --hm-card-border: rgba(255, 255, 255, 0.12);
    --hm-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --hm-radius: 18px;

    color: var(--hm-fg);
    background: linear-gradient(180deg, var(--hm-bg) 0%, var(--hm-bg-2) 100%);
    overflow-x: clip;
}

/* Чтобы редизайн жил рядом со старым layout без конфликтов */
.home-modern * { box-sizing: border-box; }

/* ---------- HERO ---------- */
.hm-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    overflow: hidden;
    isolation: isolate;
}

.hm-hero__bg {
    position: absolute; inset: 0;
    background-image: var(--hm-hero-img, none);
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    filter: brightness(0.55) saturate(1.05);
    z-index: -3;
    transition: transform 0.2s ease-out;
    will-change: transform;
}
.hm-hero__bg::after {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(60% 60% at 50% 30%, rgba(11, 18, 32, 0.20) 0%, rgba(11, 18, 32, 0.55) 100%),
        linear-gradient(180deg, rgba(11, 18, 32, 0.15) 0%, rgba(11, 18, 32, 0.05) 65%, var(--hm-bg) 100%);
}

.hm-stars {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

/* Созвездие Жетиген (Большая Медведица) — 7 звёзд */
.hm-constellation {
    position: absolute;
    top: 12%;
    right: 8%;
    width: min(420px, 40vw);
    height: min(260px, 25vw);
    z-index: -1;
    opacity: 0;
    animation: hm-fadein 1.6s ease-out 0.4s forwards;
    pointer-events: none;
}
.hm-constellation svg { width: 100%; height: 100%; }
.hm-constellation .hm-line {
    stroke: rgba(255, 215, 107, 0.55);
    stroke-width: 1.2;
    fill: none;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: hm-draw 2.2s ease-out 1s forwards;
    filter: drop-shadow(0 0 4px rgba(255, 215, 107, 0.55));
}
.hm-constellation .hm-star {
    fill: #fff8d6;
    filter: drop-shadow(0 0 6px rgba(255, 215, 107, 0.9));
    transform-origin: center;
    animation: hm-twinkle 3.2s ease-in-out infinite;
}
.hm-constellation .hm-star:nth-child(2) { animation-delay: .2s; }
.hm-constellation .hm-star:nth-child(3) { animation-delay: .4s; }
.hm-constellation .hm-star:nth-child(4) { animation-delay: .6s; }
.hm-constellation .hm-star:nth-child(5) { animation-delay: .8s; }
.hm-constellation .hm-star:nth-child(6) { animation-delay: 1.0s; }
.hm-constellation .hm-star:nth-child(7) { animation-delay: 1.2s; }

/* Плавающие частицы фоном */
.hm-stars__dot {
    position: absolute;
    width: 2px; height: 2px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.35;
    animation: hm-float 14s linear infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.hm-hero__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 980px;
}

.hm-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--hm-accent-2);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    animation: hm-rise 0.9s ease-out 0.2s forwards;
}
.hm-eyebrow::before {
    content: "";
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--hm-accent-2);
    box-shadow: 0 0 12px var(--hm-accent-2);
    animation: hm-pulse 1.8s ease-in-out infinite;
}

.hm-hero__title {
    font-family: 'Ubuntu Condensed', 'Istok Web', sans-serif;
    font-size: clamp(36px, 6.2vw, 76px);
    line-height: 1.05;
    margin: 22px 0 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    opacity: 0;
    animation: hm-rise 1s ease-out 0.4s forwards;
}
.hm-hero__title .hm-grad {
    background: linear-gradient(90deg, var(--hm-accent-2) 0%, var(--hm-accent) 50%, #fff7c2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: hm-shine 6s ease-in-out infinite;
}

.hm-hero__lead {
    font-size: clamp(18px, 1.6vw, 20px);
    color: #e6ebf5;
    max-width: 720px;
    margin: 0 auto 32px;
    line-height: 1.6;
    opacity: 0;
    animation: hm-rise 1s ease-out 0.6s forwards;
}

.hm-cta {
    display: inline-flex; flex-wrap: wrap;
    gap: 14px; justify-content: center;
    opacity: 0;
    animation: hm-rise 1s ease-out 0.8s forwards;
}
.hm-btn {
    --b: var(--hm-accent);
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
    will-change: transform;
}
.hm-btn--primary {
    background: linear-gradient(135deg, var(--hm-accent) 0%, var(--hm-accent-2) 100%);
    color: #1a1408;
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.35);
}
.hm-btn--primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 40px rgba(212, 175, 55, 0.5);
    color: #1a1408;
}
.hm-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.hm-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    color: #fff;
}
.hm-btn i { transition: transform .25s ease; }
.hm-btn:hover i { transform: translateX(4px); }

.hm-scroll-hint {
    position: absolute;
    left: 50%; bottom: 28px;
    transform: translateX(-50%);
    color: var(--hm-muted);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    animation: hm-fadein 1s ease-out 1.4s forwards;
}
.hm-scroll-hint::after {
    content: "";
    display: block;
    width: 1px; height: 36px;
    background: linear-gradient(180deg, var(--hm-accent-2), transparent);
    margin: 12px auto 0;
    animation: hm-scroll 2s ease-in-out infinite;
}

/* ---------- SECTION SHELL ---------- */
.hm-section {
    padding: clamp(60px, 9vw, 120px) 20px;
    position: relative;
}
.hm-section__head {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 56px;
}
.hm-section__kicker {
    color: var(--hm-accent-2);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
}
.hm-section__title {
    font-family: 'Ubuntu Condensed', 'Istok Web', sans-serif;
    font-size: clamp(28px, 4.2vw, 48px);
    margin: 12px 0 14px;
    color: #fff;
    line-height: 1.15;
}
.hm-section__sub {
    color: var(--hm-muted);
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.6;
}

.hm-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- WELCOME (glassmorphism) ---------- */
.hm-welcome {
    position: relative;
}
.hm-welcome::before {
    content: "";
    position: absolute;
    inset: -10% 10% auto 10%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.hm-glass {
    position: relative;
    z-index: 1;
    background: var(--hm-card);
    border: 1px solid var(--hm-card-border);
    border-radius: var(--hm-radius);
    padding: clamp(28px, 4vw, 56px);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--hm-shadow);
}
.hm-lang-switch {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--hm-card-border);
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}
.hm-lang-switch__btn {
    padding: 8px 18px;
    border-radius: 999px;
    background: transparent;
    color: var(--hm-muted);
    border: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
}
.hm-lang-switch__btn.is-active {
    background: linear-gradient(135deg, var(--hm-accent) 0%, var(--hm-accent-2) 100%);
    color: #1a1408;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
}

.hm-welcome__text p {
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.8;
    color: #d6dbe8;
    margin-bottom: 18px;
}
.hm-welcome__text p:first-of-type {
    font-size: clamp(18px, 1.7vw, 22px);
    color: #fff;
    font-weight: 600;
}
.hm-signature {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px dashed var(--hm-card-border);
    color: var(--hm-muted);
    font-style: italic;
}
.hm-signature strong { color: var(--hm-accent-2); font-style: normal; }

/* ---------- STATS ---------- */
.hm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 48px;
}
.hm-stat {
    text-align: center;
    padding: 24px 18px;
    background: var(--hm-card);
    border: 1px solid var(--hm-card-border);
    border-radius: var(--hm-radius);
    transition: transform .35s ease, border-color .35s ease, background .35s ease;
}
.hm-stat:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.45);
    background: rgba(212, 175, 55, 0.06);
}
.hm-stat__num {
    font-family: 'Ubuntu Condensed', sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    background: linear-gradient(135deg, var(--hm-accent) 0%, var(--hm-accent-2) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.hm-stat__label {
    margin-top: 10px;
    color: var(--hm-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- NEWS ---------- */
.hm-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
}
.hm-card-news {
    position: relative;
    background: var(--hm-card);
    border: 1px solid var(--hm-card-border);
    border-radius: var(--hm-radius);
    overflow: hidden;
    transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease, border-color .4s ease;
    text-decoration: none;
    color: inherit;
    display: flex; flex-direction: column;
    will-change: transform;
}
.hm-card-news:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: var(--hm-shadow);
    color: inherit;
}
.hm-card-news__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.hm-card-news__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s ease;
}
.hm-card-news:hover .hm-card-news__media img { transform: scale(1.08); }
.hm-card-news__body { padding: 22px 22px 16px; flex: 1; }
.hm-card-news__date {
    color: var(--hm-accent-2);
    font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
    margin-bottom: 8px;
}
.hm-card-news__title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hm-card-news__cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid var(--hm-card-border);
    color: var(--hm-accent-2);
    font-weight: 600;
    font-size: 14px;
    transition: gap .25s ease, color .25s ease;
}
.hm-card-news:hover .hm-card-news__cta { gap: 14px; color: #fff; }

/* ---------- PEOPLE ---------- */
.hm-people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}
.hm-card-person {
    position: relative;
    border-radius: var(--hm-radius);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #000;
    isolation: isolate;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform .4s ease;
}
.hm-card-person:hover { transform: translateY(-6px); color: inherit; }
.hm-card-person img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s ease, filter .4s ease;
    filter: saturate(0.85) brightness(0.95);
}
.hm-card-person:hover img { transform: scale(1.08); filter: saturate(1.1) brightness(1); }
.hm-card-person::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.85) 100%);
    z-index: 1;
}
.hm-card-person__body {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 20px;
    z-index: 2;
    transform: translateY(20px);
    transition: transform .4s ease;
}
.hm-card-person:hover .hm-card-person__body { transform: translateY(0); }
.hm-card-person__name {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.hm-card-person__title {
    color: var(--hm-accent-2);
    font-size: 13px;
    margin: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity .4s ease, max-height .4s ease;
}
.hm-card-person:hover .hm-card-person__title { opacity: 1; max-height: 80px; }

/* ---------- CTA STRIP ---------- */
.hm-cta-strip {
    position: relative;
    margin: 60px auto 0;
    max-width: 1200px;
    border-radius: var(--hm-radius);
    overflow: hidden;
    padding: clamp(40px, 6vw, 80px) 32px;
    text-align: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(78, 161, 255, 0.18) 100%);
    border: 1px solid var(--hm-card-border);
}
.hm-cta-strip::before {
    content: "";
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(212, 175, 55, 0.15) 90deg, transparent 180deg, rgba(78, 161, 255, 0.12) 270deg, transparent 360deg);
    animation: hm-spin 18s linear infinite;
    z-index: 0;
}
.hm-cta-strip > * { position: relative; z-index: 1; }
.hm-cta-strip h3 {
    font-family: 'Ubuntu Condensed', sans-serif;
    color: #fff;
    font-size: clamp(24px, 3.4vw, 38px);
    margin: 0 0 14px;
}
.hm-cta-strip p {
    color: var(--hm-muted);
    margin: 0 auto 26px;
    max-width: 640px;
}

/* ---------- REVEAL ---------- */
.hm-reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.hm-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.hm-reveal[data-delay="1"] { transition-delay: .12s; }
.hm-reveal[data-delay="2"] { transition-delay: .24s; }
.hm-reveal[data-delay="3"] { transition-delay: .36s; }
.hm-reveal[data-delay="4"] { transition-delay: .48s; }

/* ---------- KEYFRAMES ---------- */
@keyframes hm-fadein { to { opacity: 1; } }
@keyframes hm-rise {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hm-twinkle {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.5); opacity: .55; }
}
@keyframes hm-draw { to { stroke-dashoffset: 0; } }
@keyframes hm-shine {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes hm-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 107, 0.7); }
    50%      { box-shadow: 0 0 0 10px rgba(255, 215, 107, 0); }
}
@keyframes hm-scroll {
    0%   { transform: scaleY(0.2); transform-origin: top; }
    50%  { transform: scaleY(1);   transform-origin: top; }
    51%  { transform: scaleY(1);   transform-origin: bottom; }
    100% { transform: scaleY(0);   transform-origin: bottom; }
}
@keyframes hm-float {
    0%   { transform: translateY(0)    translateX(0);   opacity: 0; }
    10%  { opacity: 0.5; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}
@keyframes hm-spin {
    to { transform: rotate(360deg); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .hm-hero { min-height: 80vh; padding: 60px 16px; }
    .hm-constellation { top: 6%; right: 4%; width: 60vw; height: 28vw; opacity: .7; }
    .hm-cta { flex-direction: column; align-items: stretch; }
    .hm-btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .home-modern *,
    .home-modern *::before,
    .home-modern *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .hm-reveal { opacity: 1; transform: none; }
}
