/* ============================================
   atsky.ru — Premium Dark Theme Design System
   ============================================ */

/* === CSS Variables === */
:root {
    /* Color Palette — HSL-based */
    --clr-bg-primary: hsl(228, 24%, 8%);
    --clr-bg-secondary: hsl(228, 20%, 12%);
    --clr-bg-card: hsl(228, 18%, 14%);
    --clr-bg-card-hover: hsl(228, 18%, 18%);
    --clr-bg-glass: hsla(228, 20%, 16%, 0.7);
    --clr-border: hsla(220, 30%, 40%, 0.2);
    --clr-border-hover: hsla(220, 30%, 50%, 0.4);

    /* Text */
    --clr-text-primary: hsl(210, 20%, 95%);
    --clr-text-secondary: hsl(215, 15%, 65%);
    --clr-text-muted: hsl(215, 10%, 45%);

    /* Accents */
    --clr-accent: hsl(250, 80%, 65%);
    --clr-accent-hover: hsl(250, 85%, 72%);
    --clr-accent-glow: hsla(250, 80%, 65%, 0.3);
    --clr-accent-2: hsl(190, 90%, 55%);
    --clr-accent-3: hsl(340, 75%, 60%);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, hsl(250, 80%, 65%), hsl(190, 90%, 55%));
    --grad-hero: linear-gradient(160deg, hsl(250, 60%, 20%) 0%, hsl(228, 24%, 8%) 50%, hsl(190, 40%, 12%) 100%);
    --grad-card: linear-gradient(145deg, hsla(250, 50%, 30%, 0.15), hsla(190, 50%, 30%, 0.05));

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 5rem;
    --space-4xl: 8rem;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.75rem;
    --fs-3xl: 2.5rem;
    --fs-4xl: 3.5rem;
    --fs-hero: clamp(2.5rem, 6vw, 5rem);

    /* Borders & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-card: 0 4px 24px hsla(0, 0%, 0%, 0.3);
    --shadow-glow: 0 0 40px var(--clr-accent-glow);

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 200ms;
    --duration-normal: 350ms;
    --duration-slow: 600ms;
}

/* === Reset === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.7;
    color: var(--clr-text-primary);
    background: var(--clr-bg-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--clr-accent);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--clr-accent-hover); }

img { max-width: 100%; display: block; }
ul { list-style: none; }

/* === Container === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* === Typography === */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* ============================
   HEADER
   ============================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: hsla(228, 24%, 8%, 0.85);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-bottom: 1px solid var(--clr-border);
    transition: background var(--duration-normal) var(--ease-out);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--clr-text-primary);
}

.logo__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--grad-primary);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 14px;
}

.nav__menu {
    display: flex;
    gap: var(--space-xl);
}

.nav__link {
    color: var(--clr-text-secondary);
    font-weight: 500;
    font-size: var(--fs-sm);
    transition: color var(--duration-fast);
    position: relative;
}
.nav__link:hover { color: var(--clr-text-primary); }
.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--grad-primary);
    border-radius: 1px;
    transition: width var(--duration-normal) var(--ease-out);
}
.nav__link:hover::after { width: 100%; }

.nav__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}
.nav__burger span {
    width: 24px;
    height: 2px;
    background: var(--clr-text-secondary);
    border-radius: 1px;
    transition: all var(--duration-fast);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}
.user-badge__avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.user-badge__name {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--clr-text-secondary);
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out);
}

.btn--sm { padding: 0.4rem 1rem; font-size: var(--fs-sm); }
.btn--md { padding: 0.6rem 1.5rem; font-size: var(--fs-base); }
.btn--lg { padding: 0.8rem 2rem; font-size: var(--fs-lg); }

.btn--primary {
    background: var(--grad-primary);
    color: white;
    box-shadow: 0 2px 12px var(--clr-accent-glow);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--clr-accent-glow);
}

.btn--accent {
    background: transparent;
    color: var(--clr-accent);
    border: 1px solid var(--clr-accent);
}
.btn--accent:hover {
    background: hsla(250, 80%, 65%, 0.1);
    transform: translateY(-1px);
}

.btn--ghost {
    background: transparent;
    color: var(--clr-text-secondary);
    border: 1px solid var(--clr-border);
}
.btn--ghost:hover {
    color: var(--clr-text-primary);
    border-color: var(--clr-border-hover);
}

/* ============================
   HERO
   ============================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--grad-hero);
}

.hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 15s ease-in-out infinite;
}

.hero__orb--1 {
    width: 500px;
    height: 500px;
    background: hsla(250, 80%, 50%, 0.3);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}
.hero__orb--2 {
    width: 400px;
    height: 400px;
    background: hsla(190, 90%, 45%, 0.2);
    bottom: -15%;
    left: -10%;
    animation-delay: -5s;
}
.hero__orb--3 {
    width: 300px;
    height: 300px;
    background: hsla(340, 75%, 50%, 0.15);
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(15px, 15px) scale(1.02); }
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s var(--ease-out) both;
}

.hero__title {
    font-size: var(--fs-hero);
    font-weight: 800;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-md);
}

.hero__subtitle {
    font-size: var(--fs-2xl);
    font-weight: 300;
    color: var(--clr-text-secondary);
    margin-bottom: var(--space-md);
}

.hero__description {
    font-size: var(--fs-lg);
    color: var(--clr-text-muted);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================
   SECTIONS
   ============================ */
.section {
    padding: var(--space-4xl) 0;
    position: relative;
}

.section__title {
    font-size: var(--fs-3xl);
    text-align: center;
    margin-bottom: var(--space-sm);
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section__subtitle {
    text-align: center;
    color: var(--clr-text-muted);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-3xl);
}

/* ============================
   APP CARDS
   ============================ */
.apps__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.app-card {
    background: var(--grad-card);
    background-color: var(--clr-bg-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-primary);
    opacity: 0;
    transition: opacity var(--duration-normal);
}

.app-card:hover {
    transform: translateY(-6px);
    border-color: var(--clr-border-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}
.app-card:hover::before { opacity: 1; }

.app-card__icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    filter: drop-shadow(0 0 12px var(--clr-accent-glow));
}

.app-card__name {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-xs);
}

.app-card__tagline {
    color: var(--clr-accent);
    font-size: var(--fs-sm);
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.app-card__description {
    color: var(--clr-text-secondary);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-lg);
}

.app-card__features {
    margin-bottom: var(--space-lg);
}
.app-card__features li {
    color: var(--clr-text-secondary);
    font-size: var(--fs-sm);
    padding: var(--space-xs) 0;
    position: relative;
    padding-left: var(--space-lg);
}
.app-card__features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--clr-accent);
}

/* ============================
   NEWS CARDS
   ============================ */
.news__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.news-card {
    background: var(--clr-bg-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
}
.news-card:hover {
    transform: translateY(-3px);
    border-color: var(--clr-border-hover);
    box-shadow: var(--shadow-card);
}

.news-card__date {
    color: var(--clr-text-muted);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
}

.news-card__title {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.news-card__summary {
    color: var(--clr-text-secondary);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-md);
}

.news-card__tags {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}
.news-card__tag {
    font-size: var(--fs-xs);
    color: var(--clr-accent);
    background: hsla(250, 80%, 65%, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid hsla(250, 80%, 65%, 0.2);
}

.news__loading, .team__loading {
    text-align: center;
    color: var(--clr-text-muted);
    grid-column: 1 / -1;
    padding: var(--space-3xl) 0;
}

/* ============================
   TEAM CARDS
   ============================ */
.team__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.team-card {
    background: var(--clr-bg-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    transition: all var(--duration-normal) var(--ease-out);
}
.team-card:hover {
    transform: translateY(-4px);
    border-color: var(--clr-border-hover);
    box-shadow: var(--shadow-card);
}

.team-card__photo {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-lg);
    object-fit: cover;
    border: 3px solid var(--clr-border);
    background: var(--clr-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--clr-text-muted);
}

.team-card__name {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-xs);
}

.team-card__role {
    color: var(--clr-accent);
    font-size: var(--fs-sm);
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.team-card__bio {
    color: var(--clr-text-secondary);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-lg);
}

/* ============================
   FOOTER
   ============================ */
.footer {
    border-top: 1px solid var(--clr-border);
    padding: var(--space-xl) 0;
    background: var(--clr-bg-secondary);
}

.footer__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--clr-text-secondary);
}

.footer__copy {
    color: var(--clr-text-muted);
    font-size: var(--fs-sm);
}

/* ============================
   SCROLL ANIMATIONS
   ============================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .nav__menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--clr-bg-secondary);
        border-bottom: 1px solid var(--clr-border);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
    }
    .nav__menu.open { display: flex; }
    .nav__burger { display: flex; }

    .hero__title { font-size: var(--fs-3xl); }
    .hero__subtitle { font-size: var(--fs-xl); }

    .section { padding: var(--space-3xl) 0; }
    .section__title { font-size: var(--fs-2xl); }

    .apps__grid { grid-template-columns: 1fr; }
    .news__grid { grid-template-columns: 1fr; }
    .team__grid { grid-template-columns: 1fr; }

    .footer__content { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
    .nav__actions { gap: 4px; }
    .btn--sm { padding: 0.3rem 0.7rem; font-size: var(--fs-xs); }
    .app-card { padding: var(--space-lg); }
}
