/* Оттенок фона плавно меняется: полный круг примерно за 10 минут */
@property --hue {
    syntax: '<number>';
    inherits: true;
    initial-value: 354;
}

@keyframes hue-shift {
    from { --hue: 354; }
    to   { --hue: 714; }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
    min-height: 100%;
    background: #2a040a;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
    color: #fff;
    background: linear-gradient(
        160deg,
        hsl(var(--hue) 80% 12%),
        hsl(calc(var(--hue) - 2) 72% 22%) 55%,
        hsl(calc(var(--hue) + 8) 68% 15%)
    );
    animation: hue-shift 600s steps(1440) infinite;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
    z-index: 1;
}

#plexusCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.lang-switcher {
    position: fixed;
    top: calc(16px + env(safe-area-inset-top, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.lang-btn {
    min-width: 48px;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.3s ease;
}

.lang-btn.active { background: rgba(255, 255, 255, 0.4); font-weight: bold; }

.content {
    position: relative;
    z-index: 999;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(80px + env(safe-area-inset-top, 0px)) calc(20px + env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) calc(20px + env(safe-area-inset-left, 0px));
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.content h1 {
    font-size: clamp(1.9rem, 8vw, 3rem);
    margin: 0 0 16px;
    overflow-wrap: anywhere;
}

.lead {
    font-size: clamp(1rem, 4vw, 1.2rem);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.6;
    color: #ececec;
}

.services {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    margin-bottom: 32px;
}

.service {
    display: block;
    padding: 16px 20px;
    border-radius: 14px;
    text-align: left;
    text-decoration: none;
    color: #fff;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.service:active,
.service:focus-visible { background: rgba(255, 255, 255, 0.28); border-color: rgba(255, 255, 255, 0.6); }

.service-name { display: block; font-size: 1.15rem; font-weight: bold; }
.service-desc { display: block; margin-top: 4px; font-size: 0.95rem; color: #ececec; }

.login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 40px;
    border-radius: 26px;
    text-decoration: none;
    font-weight: bold;
    color: hsl(var(--hue) 70% 13%);
    background: #fff;
    text-shadow: none;
    transition: background 0.3s ease;
}

.login:active { background: #ececec; }

.note { margin: 20px 0 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.75); max-width: 320px; }

a:focus-visible, .lang-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (hover: hover) {
    .lang-btn:hover { background: rgba(255, 255, 255, 0.3); }
    .lang-btn.active:hover { background: rgba(255, 255, 255, 0.4); }
    .service:hover { background: rgba(255, 255, 255, 0.28); border-color: rgba(255, 255, 255, 0.6); }
    .login:hover { background: #ececec; }
}

@media (max-width: 600px) {
    /* переключатель языка по центру: не прячется за системными панелями у края экрана */
    .lang-switcher { left: 0; right: 0; justify-content: center; }
    #plexusCanvas { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
    body { animation: none; }
}
