/* =========================================
   ШРИФТЫ
   ========================================= */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('/static/fonts/Montserrat-VariableFont_wght.ttf') format('ttf');
  font-display: swap;
}

/* Скрываем фон от шаблона и задаём свой на весь экран */
html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    background: #0a0a1a !important;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(120, 0, 255, 0.4) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 0, 150, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 90%, rgba(0, 150, 255, 0.3) 0%, transparent 55%) !important;
}


/* =========================================
   ГЛАВНАЯ СТРАНИЦА
   ========================================= */
.hero-page {
    height: 100vh;
    box-sizing: border-box;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* =========================================
   СЕТКА ЛЕЙАУТА
   ========================================= */
.hero-layout {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
    width: 100%;
    max-width: 1100px;
    height: 55vh;
    max-height: 500px;
    min-height: 380px;
}

/* Большая карточка — левая колонка, обе строки */
.main-card {
    grid-row: 1 / 3;
    grid-column: 1 / 2;
}

/* Маленькие карточки — правая колонка */
.side-cards {
    display: contents;
}
.small-card:nth-child(1) { grid-row: 1 / 2; grid-column: 2 / 3; }
.small-card:nth-child(2) { grid-row: 2 / 3; grid-column: 2 / 3; }

/* =========================================
   КАРТОЧКИ (общие стили)
   ========================================= */
.hero-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    display: block;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.hero-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(255, 0, 255, 0.4);
    box-shadow: 0 20px 60px rgba(180, 0, 255, 0.3), 0 0 40px rgba(255, 0, 255, 0.15);
}

/* Неоновая рамка */
.card-glow {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 2px;
    background: linear-gradient(135deg, #ff00ff, #00ffff, #7b00ff, #ff00ff);
    background-size: 300% 300%;
    animation: glowShift 6s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes glowShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.card-content {
    padding: 32px;
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =========================================
   БОЛЬШАЯ КАРТОЧКА
   ========================================= */
.hero-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.05;
    background: linear-gradient(135deg, #ffffff 0%, #ff66ff 50%, #66ffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: clamp(14px, 1.4vw, 18px);
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 40px;
    line-height: 1.6;
    max-width: 520px;
}

.hero-btn {
    display: inline-block;
    padding: 18px 52px;
    background: linear-gradient(135deg, #ff00ff, #7b00ff, #00ffff);
    background-size: 200% 200%;
    animation: btnGlow 4s ease infinite;
    border-radius: 50px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.5), 0 0 60px rgba(123, 0, 255, 0.3);
    transition: all 0.3s ease;
    align-self: flex-start;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@keyframes btnGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-btn:hover {
    box-shadow: 0 0 50px rgba(255, 0, 255, 0.8), 0 0 80px rgba(123, 0, 255, 0.5);
    transform: scale(1.05);
}

/* =========================================
   МАЛЕНЬКИЕ КАРТОЧКИ
   ========================================= */
.small-card .card-content {
    padding: 24px 28px;
}

.small-card h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(20px, 2vw, 28px);
    margin: 0 0 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #ff99ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.small-card p {
    font-size: clamp(13px, 1.2vw, 15px);
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.4;
}

/* =========================================
   АДАПТИВНОСТЬ (768px и ниже)
   ========================================= */
@media (max-width: 768px) {
    .hero-page { padding: 30px 24px; }

    .hero-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1.2fr 1fr 1fr;
        height: 85vh;
        max-height: none;
        gap: 16px;
    }

    .main-card { grid-row: 1 / 2; grid-column: 1 / 2; }
    .small-card:nth-child(1) { grid-row: 2 / 3; grid-column: 1 / 2; }
    .small-card:nth-child(2) { grid-row: 3 / 4; grid-column: 1 / 2; }

    .card-content { padding: 28px; }
    .hero-title { margin-bottom: 14px; font-size: clamp(20px, 7vw, 36px);}
    .hero-subtitle { margin-bottom: 24px; font-size: clamp(12px, 3vw, 16px);}
    .hero-btn {
        padding: 12px 28px;
        font-size: 13px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .small-card .card-content { padding: 24px; }
    .small-card h3 { font-size: 18px; }
    .small-card p { font-size: 12px; }
}