/* ==========================================
   CSS VARIABLES & THEME SETUP
   ========================================== */
:root {
    /* Colors extracted from reference */
    --clr-bg-dark: #010205;
    /* Deep space background (very dark, almost black) */
    --clr-gold: #d49a89;
    /* Copper / Rose Gold accents */
    --clr-gold-light: #e0b0a8;
    --clr-gold-glow: rgba(212, 154, 137, 0.5);

    --clr-text-main: #ffffff;
    --clr-text-muted: rgba(255, 255, 255, 0.7);
    --clr-text-dark: #121212;

    /* Glassmorphism */
    --glass-bg: rgba(13, 20, 48, 0.25);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* Font Sizes (Fluid Typography approach) */
    --fs-h1: clamp(2.5rem, 5vw + 1rem, 5rem);
    --fs-h2: clamp(2rem, 4vw + 1rem, 3.5rem);
    --fs-body: clamp(1rem, 1vw + 0.5rem, 1.125rem);
    --fs-small: 0.875rem;

    /* Spacing */
    --space-xs: 0.5rem;
    /* 8px */
    --space-sm: 1rem;
    /* 16px */
    --space-md: 1.5rem;
    /* 24px */
    --space-lg: 2rem;
    /* 32px */
    --space-xl: 3rem;
    /* 48px */
    --space-2xl: 5rem;
    /* 80px */

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-pill: 100px;

    /* Mobile specific variables */
    --header-height-mobile: 70px;
    --header-padding-mobile: 1rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    font-family: var(--font-body);
    color: var(--clr-text-main);
    background-color: var(--clr-bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    line-height: 1.1;
    font-weight: 700;
}

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

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-align: center;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--clr-gold);
    color: var(--clr-text-dark);
    box-shadow: 0 4px 15px var(--clr-gold-glow);
}

.btn-primary:hover {
    background-color: var(--clr-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--clr-gold-glow);
}

.btn-outline {
    background: transparent;
    color: var(--clr-text-main);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--clr-gold);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    color: var(--clr-text-main);
    position: relative;
}

.btn-link span {
    transition: transform var(--transition-fast);
}

.btn-link:hover span {
    transform: translateX(5px);
    color: var(--clr-gold);
}

.btn-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--clr-gold);
    transition: width var(--transition-smooth);
}

.btn-link:hover::after {
    width: 100%;
}

/* ==========================================
   HEADER (Reference Style)
   ========================================== */
.site-header {
    position: absolute;
    /* Using absolute so it sits nicely at the top without glassmorphism */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: var(--space-xl) var(--space-xl);
    background: linear-gradient(to bottom, rgba(1, 2, 5, 0.4) 0%, transparent 100%);
}

/* Главная: кнопка «Блог» — правый верх вьюпорта, в тон золотым CTA */
.header-blog-fab {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top, 0px));
    right: max(1.25rem, env(safe-area-inset-right, 0px));
    z-index: 120;
    padding: 0.5rem 1.15rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.45);
    background: rgba(6, 10, 26, 0.52);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header-blog-fab:hover {
    border-color: var(--clr-gold);
    background: rgba(212, 175, 55, 0.14);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(212, 175, 55, 0.15);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.nav-section {
    display: flex;
    align-items: center;
    gap: 4vw;
}

.nav-left {
    justify-content: flex-end;
    padding-right: 5vw;
}

.nav-right {
    justify-content: flex-start;
    padding-left: 5vw;
}

.logo {
    font-family: 'Philosopher', sans-serif;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: none;
    line-height: 1;
    white-space: nowrap;
}

.nav-link {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
    text-shadow: none;
    white-space: nowrap;
}

/* Specific sizes for different links to match previous inline styles */
.nav-link[href*="venus"],
.nav-link[href*="history"],
.nav-link[href*="examples"] {
    font-size: 1.375rem;
}

/* Совместимость + Поддержка: кегль как у .nav-link; в @media снижение, как у остальных .nav-link */
.nav-link.nav-syn-basket {
    font-size: 1.125rem;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.nav-link.active {
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   MOBILE NAVIGATION
   ========================================== */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10000; /* Должен быть выше оверлея */
    position: relative;
    width: 44px;
    height: 44px;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--clr-text-main);
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--clr-text-main);
    transition: all 0.3s ease;
}

.hamburger::before { top: -8px; left: 0; }
.hamburger::after { bottom: -8px; left: 0; }

.menu-open .hamburger { background: transparent; }
.menu-open .hamburger::before { transform: rotate(45deg); top: 0; }
.menu-open .hamburger::after { transform: rotate(-45deg); bottom: 0; }

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 2, 5, 0.98); /* Чуть плотнее фон */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999; /* Максимальный приоритет */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-open .mobile-nav-overlay {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    text-align: center;
}

.mobile-nav-link {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.5rem;
    color: var(--clr-text-main);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--clr-gold);
}

/* Update mobile menu handling */
@media screen and (max-width: 992px) {
    .nav-section {
        gap: 2vw;
    }

    .nav-left {
        padding-right: 3vw;
    }

    .nav-right {
        padding-left: 3vw;
    }

    .nav-link,
    .nav-link.nav-syn-basket {
        font-size: 1rem;
    }
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--clr-bg-dark);
}

/* Обертка нужна, чтобы градиент-виньетка лежал ровно по размерам самой картинки */
.image-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 100vh;
    display: flex;
    transform: scale(1.2);
}

.bg-image {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    filter: contrast(1.05) brightness(1) saturate(1.1);
}

/* Оптическая резкость: Векторные звезды, разбитые на слои для асинхронного мерцания */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* Слой 1: Мелкие звезды, быстрое мерцание */
.layer-1 {
    background-image: url("moscow-stars-1.svg");
    animation: twinkle 4s ease-in-out infinite alternate;
}

/* Слой 2: Средние звезды, среднее по скорости мерцание со сдвигом */
.layer-2 {
    background-image: url("moscow-stars-2.svg");
    animation: twinkle 7s ease-in-out infinite alternate 2s;
}

/* Слой 3: Крупные/тусклые звезды, очень медленное мерцание со сдвигом */
.layer-3 {
    background-image: url("moscow-stars-3.svg");
    animation: twinkle 11s ease-in-out infinite alternate 5s;
}

/* Созвездие Большой Медведицы */
.ursa-major {
    background-image: url("ursa-major.svg");
    /* Медленное кинематографичное свечение линий созвездия */
    animation: twinkle-ursa 6s ease-in-out infinite alternate 1s;
}

/* Новые Созвездия */
.orion {
    background-image: url("orion.svg");
    animation: twinkle-ursa 7s ease-in-out infinite alternate 0s;
}

.cassiopeia {
    background-image: url("cassiopeia.svg");
    animation: twinkle-ursa 5s ease-in-out infinite alternate 3s;
}

.cygnus {
    background-image: url("cygnus.svg");
    animation: twinkle-ursa 8s ease-in-out infinite alternate 2s;
}

.andromeda {
    background-image: url("andromeda.svg");
    animation: twinkle-ursa 6.5s ease-in-out infinite alternate 4s;
}

@keyframes twinkle {
    0% {
        opacity: 0.1;
    }

    100% {
        opacity: 1;
    }
}

@keyframes twinkle-ursa {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* Кинематографический шум: скрывает артефакты апскейлинга и обманывает глаз, создавая иллюзию сверхвысокой плотности пикселей */
.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0.08;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 
  Градиенты ложатся ровно внутри .image-wrapper
*/
.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    /* Экстремальное затемнение именно краев рамки */
    box-shadow: inset 0 0 100px 50px var(--clr-bg-dark),
        inset 0 0 250px 100px var(--clr-bg-dark);
    background:
        linear-gradient(to right, var(--clr-bg-dark) 0%, transparent 20%, transparent 80%, var(--clr-bg-dark) 100%),
        linear-gradient(to bottom, var(--clr-bg-dark) 0%, transparent 20%, transparent 80%, var(--clr-bg-dark) 100%),
        radial-gradient(circle at center, transparent 30%, rgba(1, 2, 5, 0.4) 80%, var(--clr-bg-dark) 100%);
}

.hero-content {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.hero-content-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    max-width: min(650px, 92vw);
}

/* H1/лид остаются в DOM для SEO; на экране не показываем (как .sr-only) */
.hero-extractive-summary {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero-extractive-summary__title {
    margin: 0 0 var(--space-xs);
    font-family: 'Philosopher', sans-serif;
    font-size: clamp(1rem, 1.35vw, 1.25rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.hero-extractive-summary__lead {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.hero-extractive-summary__offer {
    margin: var(--space-xs) 0 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.hero-extractive-summary__offer strong {
    color: var(--clr-gold);
    font-weight: 600;
}

.hero-extractive-summary__offer a {
    color: var(--clr-gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Glassmorphism Text Block */
.hero-text-block {
    position: relative;
    max-width: 650px;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

    /* Animation entry */
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-content-stack {
    display: grid;
    align-items: center;
    justify-items: center;
    width: 100%;
}

.hero-content-stack .hero-title {
    grid-area: 1 / 1;
    margin-bottom: 0;
    width: 100%;
    z-index: 2;
    pointer-events: none;
}

.hero-content-stack .hero-reveal {
    grid-area: 1 / 1;
    width: 100%;
    z-index: 3;
}

.eyebrow {
    display: inline-block;
    color: var(--clr-gold);
    font-size: var(--fs-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--space-sm);
}

.hero-title {
    font-size: var(--fs-h2);
    margin-bottom: var(--space-sm);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    min-height: 2.4em;
    /* Базовый резерв под 2 строки */
}

.hero-title .typing-line {
    display: block;
}

.hero-title span {
    color: transparent;
    -webkit-text-stroke: 1px var(--clr-text-main);
    background: linear-gradient(to right, var(--clr-gold), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    /* Optional: uncomment below to make it fully gradient instead of outlined */
    /* -webkit-text-stroke: 0; */
}

/* ==========================================
   MAJESTIC HOURGLASS ANIMATION
   ========================================== */
.majestic-hourglass-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-md);
    opacity: 0.95;
    /* Центрируем блок, чтобы новые большие часы смотрелись величественно */
    width: 100%;
}

.majestic-hourglass {
    filter: drop-shadow(0 0 15px var(--clr-gold-glow));
}

.sand-top-rect {
    transform-origin: 60px 90px;
    animation: shrinkMajesticSand 60s linear forwards;
    /* 60 секунд медленного падения */
}

.sand-bottom-rect {
    transform-origin: 60px 163px;
    animation: growMajesticSand 60s linear forwards;
}

.sand-stream-majestic {
    /* Анимация струи состоит из двух: бесконечное движение песчинок вниз и затухание в конце */
    animation:
        flowGrains 0.8s infinite linear,
        fadeStream 60s linear forwards;
}

@keyframes shrinkMajesticSand {
    0% {
        transform: scaleY(1);
    }

    100% {
        transform: scaleY(0);
    }
}

@keyframes growMajesticSand {
    0% {
        transform: scaleY(0);
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes flowGrains {
    to {
        stroke-dashoffset: -8;
        /* Сдвигаем штрихи (песчинки) вниз */
    }
}

@keyframes fadeStream {

    0%,
    98% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.hero-description {
    font-size: var(--fs-body);
    color: var(--clr-text-muted);
    margin-bottom: var(--space-lg);
    max-width: 90%;
}

.hero-offer-line {
    font-size: clamp(0.8125rem, 2.8vw, 0.95rem);
    color: var(--clr-text-muted);
    line-height: 1.5;
    text-align: center;
    max-width: 90%;
    margin: 0 auto var(--space-md);
}

.hero-offer-line strong {
    color: var(--clr-gold);
    font-weight: 600;
}

.hero-offer-line a {
    color: var(--clr-gold);
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0.125rem 0;
}

.hero-offer-line a:hover {
    color: var(--clr-gold-light);
}

.hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse-glow {
    animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 154, 137, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(212, 154, 137, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 154, 137, 0);
    }
}

/* Typing Animation Effects */
.typing-line {
    display: inline;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--clr-gold);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.hero-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-out-mystery {
    opacity: 0;
    /* Полностью растворяется */
    filter: blur(4px);
    /* Более мощное загадочное размытие */
    transition: opacity 2s ease-in-out, filter 2s ease-in-out;
}

/* Text Generate Effect */
.text-generate-word {
    opacity: 0;
    filter: blur(10px);
    display: inline-block;
    color: var(--clr-gold-light);
    animation: textGenerateFadeIn 3s forwards;
    /* Плавность появления должна быть очень мягкой */
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.text-generate-word.pre-init {
    animation: none !important;
}

@keyframes textGenerateFadeIn {
    to {
        opacity: 1;
        filter: blur(0);
    }
}


/* ==========================================
   VENUS CHART SECTION
   ========================================== */
.section-padding {
    padding: var(--space-2xl) 0;
}

.venus-section {
    position: relative;
    background: linear-gradient(rgba(1, 2, 5, 0.4), rgba(1, 2, 5, 0.4)), url('venus_bg.png') center/cover no-repeat;
    overflow: hidden;
}

.venus-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-xl);
}

.venus-text {
    padding-right: var(--space-lg);
    z-index: 2;
}

.section-title {
    font-size: var(--fs-h2);
    margin-bottom: var(--space-md);
    background: linear-gradient(to right, var(--clr-gold-light), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-desc {
    color: var(--clr-text-muted);
    font-size: var(--fs-body);
    margin-bottom: var(--space-lg);
}

.venus-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.venus-image {
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-md);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.venus-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--clr-gold-glow) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

/* ==========================================
   MARS CHART SECTION
   ========================================== */
.mars-section {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('mars_bg.png') center/cover no-repeat;
    overflow: hidden;
}

.mars-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-xl);
}

.mars-text {
    padding-left: var(--space-lg);
    z-index: 2;
}

/* Красный градиент для Марса */
.mars-title {
    background: linear-gradient(to right, #cf3131, #ff8c69);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mars-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.mars-image {
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-md);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(207, 49, 49, 0.2);
}

.mars-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 130%;
    background: radial-gradient(circle, rgba(168, 30, 30, 0.4) 0%, transparent 65%);
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
}

.mars-btn {
    background-color: #922222;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(168, 30, 30, 0.4);
}

.mars-btn:hover {
    background-color: #b82e2e;
    box-shadow: 0 8px 25px rgba(168, 30, 30, 0.6);
}

/* ==========================================
   SYNASTRY (COMPATIBILITY) SECTION
   ========================================== */
.synastry-section {
    position: relative;
    background: linear-gradient(rgba(1, 2, 5, 0.8), rgba(1, 2, 5, 0.9)), url('reference/bg.png') center/cover no-repeat;
    overflow: hidden;
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
}

.synastry-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.synastry-title {
    background: linear-gradient(to right, var(--clr-gold-light), #cf3131, var(--clr-gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: var(--fs-h2);
    margin-bottom: var(--space-sm);
}

.synastry-selector {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.synastry-tab {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--clr-text-muted);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.synastry-tab:hover,
.synastry-tab.active {
    background: var(--glass-bg);
    border-color: var(--clr-gold);
    color: var(--clr-text-main);
    box-shadow: 0 0 15px var(--clr-gold-glow);
}

/* Специальные цвета для разных вкладок */
.synastry-tab[data-left="mars"][data-right="mars"].active {
    border-color: #cf3131;
    box-shadow: 0 0 15px rgba(207, 49, 49, 0.4);
}

.synastry-tab[data-left="venus"][data-right="mars"].active {
    border-top-color: var(--clr-gold);
    border-left-color: var(--clr-gold);
    border-bottom-color: #cf3131;
    border-right-color: #cf3131;
    box-shadow: 0 0 15px rgba(212, 154, 137, 0.2), 0 0 15px rgba(207, 49, 49, 0.2);
}

.synastry-cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.synastry-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Зеркалим левый блок для симметрии */
.synastry-item:first-child {
    flex-direction: row-reverse;
}

/* Выравниваем текст левого блока по правому краю (к кругу) */
.synastry-item:first-child .synastry-meta-block {
    text-align: right;
}

.synastry-meta-block {
    width: 140px;
    color: var(--clr-text-main);
    font-size: 0.9rem;
    text-align: left;
    line-height: 1.4;
    flex-shrink: 0;
    white-space: normal;
    word-wrap: break-word;
}

.synastry-card {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(13, 20, 48, 0.4);
    border: 2px solid var(--glass-border);
    transition: all var(--transition-smooth);
    flex-shrink: 0;
}

.synastry-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.synastry-vs {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    color: var(--clr-text-main);
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
}

.synastry-action {
    display: flex;
    justify-content: center;
    margin-top: var(--space-lg);
}

.custom-select {
    padding: 0.75rem 1.5rem;
    background: rgba(13, 20, 48, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.custom-select:focus,
.custom-select:hover {
    border-color: var(--clr-gold);
    box-shadow: 0 0 10px var(--clr-gold-glow);
}

.custom-select option {
    background-color: var(--clr-bg-dark);
    color: var(--clr-text-main);
}

.custom-options-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: all var(--transition-smooth);
}

.custom-options-wrapper.show {
    max-height: 100px;
    opacity: 1;
    margin-bottom: var(--space-xl);
}

/* ==========================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================== */

/* Tablet & Smaller Desktop */
@media screen and (max-width: 992px) {
    .site-header {
        padding: var(--space-md) var(--space-md);
    }

    .header-inner {
        grid-template-columns: 1fr auto 1fr;
    }

    .nav-section {
        gap: 2vw;
    }

    .nav-left {
        padding-right: 2vw;
    }

    .nav-right {
        padding-left: 2vw;
    }

    .nav-link,
    .nav-link.nav-syn-basket {
        font-size: 1rem;
    }

    .hero-text-block {
        padding: var(--space-lg);
        max-width: 500px;
    }

    .venus-container,
    .mars-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }

    .venus-text,
    .mars-text {
        padding: 0;
        order: 2;
    }

    .venus-image-wrapper,
    .mars-image-wrapper {
        order: 1;
    }

    .cabinet-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Devices */
@media screen and (max-width: 768px) {
    .header-blog-fab {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-inner {
        grid-template-columns: auto 1fr auto;
        gap: var(--space-md);
    }

    .site-header {
        padding: var(--space-sm) var(--space-md);
        z-index: 10000;
    }

    .nav-section {
        display: none; /* Hide standard nav on mobile */
    }

    .logo {
        font-size: 1.5rem;
        justify-self: center;
        grid-column: 2;
        z-index: 10001; /* Логотип тоже выше меню, если нужно, или оставить под ним */
    }

    .mobile-menu-toggle {
        grid-column: 3;
        justify-self: end;
    }

    /* Mobile Hero */
    .hero {
        align-items: center;
        padding-top: calc(var(--header-height-mobile) + var(--space-xl));
        padding-bottom: var(--space-2xl);
    }

    .hero-content {
        position: relative;
        top: 0;
        right: 0;
        transform: none;
        width: 100%;
        padding: 0 var(--space-md);
        align-items: stretch;
    }

    .hero-content-column {
        width: 100%;
        max-width: 100%;
    }

    .hero-text-block {
        text-align: center;
        padding: var(--space-xl) var(--space-md);
        background: linear-gradient(to top, rgba(1, 2, 5, 0.7) 0%, rgba(13, 20, 48, 0.3) 100%);
        backdrop-filter: blur(4px);
        border-radius: var(--radius-lg);
        width: 100%;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2rem;
        min-height: auto;
    }

    .text-generate-word {
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
        font-size: 1rem;
    }

    .hero-offer-line {
        font-size: 0.9375rem;
        max-width: 100%;
        margin-bottom: var(--space-md);
    }

    .hero-cta-group {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .btn-lg {
        width: 100%;
    }

    /* Synastry */
    .custom-options-wrapper.show {
        max-height: none;
        flex-direction: column;
        gap: var(--space-sm);
    }

    .custom-options-wrapper.show span {
        display: none; /* Hide the "+" on mobile to save space */
    }

    .custom-select {
        width: 100%;
        max-width: 320px;
    }

    .synastry-cards-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .synastry-item,
    .synastry-item:first-child {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .synastry-card {
        width: 200px;
        height: 200px;
        margin-bottom: var(--space-sm);
    }

    .synastry-meta-block,
    .synastry-item:first-child .synastry-meta-block {
        width: 100%;
        text-align: center !important;
    }

    /* SVGs */
    .zodiac-wheel-container {
        width: 400px;
        height: 400px;
        bottom: -50px;
        right: -50px;
        opacity: 0.1; /* Dimmer for mobile */
        z-index: 1;    /* Put behind hero content on mobile */
    }

    .majestic-hourglass-wrapper svg {
        width: 80px;
        height: 120px;
    }

    .zodiac-desktop {
        display: none !important;
    }
    .zodiac-mobile {
        display: block !important;
    }
}

@media screen and (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .synastry-item {
        text-align: center;
    }
    
    .section-title {
        font-size: 1.75rem;
    }

    .footer-consent-actions .btn {
        font-size: 0.8rem;
    }
}

/* ==========================================
   FORM PAGES (Goddess & Mars)
   ========================================== */
.form-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    background-color: var(--clr-bg-dark);
    position: relative;
    overflow: hidden;
}

.form-container {
    position: relative;
    z-index: 10;
    background: rgba(13, 20, 48, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 154, 137, 0.2);
    width: 100%;
    max-width: 1100px;
    min-height: 550px;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    text-align: center;
}

.form-left-panel {
    flex: 1.2;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    position: relative;
}

h1.form-page__lead {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 2.8vw, 1.5rem);
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 1.25rem;
    text-align: center;
    background: linear-gradient(105deg, #fff8f5 0%, #ffffff 55%, #f5ebe8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.form-left-panel:has(#step7.active) .form-page__lead {
    display: none;
}

.form-right-panel {
    flex: 1;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 40px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.venus-chart-img {
    width: 100%;
    max-width: 380px;
    border-radius: var(--radius-md);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 2;
    animation: formFloat 6s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes formFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.panel-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, var(--clr-gold-glow) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
    animation: pulseOpacity 4s ease-in-out infinite alternate;
}

@keyframes pulseOpacity {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

#astrologyForm {
    position: relative;
    flex-grow: 1;
    display: flex;
}

.form-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
}

.form-step.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.step-indicator {
    color: var(--clr-gold);
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 600;
}

h2.step-title {
    font-size: var(--fs-h2);
    margin-bottom: 30px;
    background: linear-gradient(to right, var(--clr-gold-light), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: var(--font-serif);
}

#step7 .step-title {
    font-size: clamp(1.25rem, 2vw + 0.65rem, 1.85rem);
    line-height: 1.35;
}

.input-group {
    margin-bottom: 30px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: var(--fs-body);
    color: var(--clr-text-muted);
    margin-bottom: 15px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text-main);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
    color-scheme: dark;
}

.input-group input[type="date"]::-webkit-calendar-picker-indicator,
.input-group input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(70%) sepia(35%) saturate(300%) hue-rotate(330deg) brightness(110%);
    cursor: pointer;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--clr-gold);
    box-shadow: 0 0 15px rgba(212, 154, 137, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.radio-group {
    display: flex;
    gap: 30px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1.1rem;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--clr-gold);
    cursor: pointer;
}

.btn-back {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 100;
    color: var(--clr-text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color var(--transition-fast);
    font-family: var(--font-heading);
    font-weight: 500;
}

.btn-back:hover {
    color: var(--clr-gold);
}

/* Mars Form Specifics */
.mars-form .step-indicator {
    color: #cf3131;
}

.mars-form h2.step-title {
    background: linear-gradient(to right, #e25841, #fff);
    -webkit-background-clip: text;
    background-clip: text;
}

.mars-form .panel-glow {
    background: radial-gradient(circle, #ac2717 0%, transparent 50%);
}

.mars-form .venus-chart-img {
    box-shadow: 0 0 40px rgba(172, 39, 23, 0.4);
    border-color: rgba(172, 39, 23, 0.3);
}

/* Form Responsiveness */
@media screen and (max-width: 900px) {
    .form-page {
        align-items: flex-start;
        justify-content: flex-start;
        padding: calc(var(--header-height-mobile) + 12px) 12px 28px;
        overflow-x: hidden;
        overflow-y: auto;
        min-height: 100dvh;
        -webkit-overflow-scrolling: touch;
    }

    .form-container {
        flex-direction: column;
        max-width: 600px;
        min-height: auto;
        border-radius: var(--radius-md);
        width: 100%;
        box-sizing: border-box;
    }

    .form-left-panel {
        padding: var(--space-lg) var(--space-md);
        flex: none;
        width: 100%;
        box-sizing: border-box;
    }

    h1.form-page__lead {
        font-size: clamp(1rem, 3.8vw, 1.25rem);
        margin-bottom: 1rem;
        line-height: 1.4;
    }

    #astrologyForm {
        width: 100%;
        min-height: 0;
    }

    .form-right-panel {
        display: none;
    }

    .form-step {
        position: relative;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        height: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .form-step.active {
        display: flex;
    }

    h2.step-title {
        font-size: clamp(1.35rem, 5vw, 2rem);
        margin-bottom: 1.25rem;
    }

    #step7 .step-title {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
    }

    .form-step .input-group {
        margin-bottom: 1.25rem;
    }

    .form-step .input-group input,
    .form-step .input-group select {
        font-size: 16px;
        padding: 12px 14px;
    }

    .form-step .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        width: 100%;
        margin-top: 0.5rem;
    }

    .form-step .btn-group .btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 7.5rem;
        max-width: 100%;
        white-space: normal;
        line-height: 1.25;
        padding: 0.7rem 0.85rem;
        font-size: 0.9rem;
    }

    #step7 .btn-group .btn {
        flex: 1 1 100%;
    }

    #step7 #submitChartButton {
        order: -1;
    }

    .btn-back {
        top: 20px;
        left: 20px;
        font-size: 1rem;
    }

    #ns6-yookassa-modal {
        padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(16px, env(safe-area-inset-bottom, 0px)) 12px;
    }

    #ns6-yookassa-modal .ns6-yookassa-card {
        width: 100%;
        max-height: calc(100dvh - 24px);
        padding: 18px 16px;
        border-radius: 18px;
    }

    #ns6-yookassa-modal .ns6-yookassa-actions .btn {
        min-width: 0;
        flex: 1 1 100%;
    }
}

@media screen and (max-width: 480px) {
    .form-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .form-left-panel {
        padding: var(--space-md) 10px;
    }

    .form-step .btn-group .btn {
        flex: 1 1 100%;
    }
}

/* ==========================================
   ZODIAC WHEEL ANIMATION
   ========================================== */



.zodiac-wheel-container {
    position: fixed;
    /* Сдвигаем в пределы видимости (нулевые отступы от краев) */
    bottom: -80px;
    right: -80px;
    width: 780px;
    height: 780px;
    z-index: 10; /* Lowered to be a background element */
    pointer-events: none;
    opacity: 0.4;
    /* Хорошо видимый белый рисунок */
}

.zodiac-mobile {
    display: none;
}

.zodiac-wheel {
    width: 100%;
    height: 100%;
    display: block;
    animation: rotateWheel 120s linear infinite;
    transform-origin: center center;
    will-change: transform;
}

@keyframes rotateWheel {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    padding: var(--space-xl) 0;
    text-align: center;
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--glass-border);
    margin-top: var(--space-2xl);
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.footer-link {
    color: var(--clr-text-muted);
    font-size: var(--fs-small);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--clr-gold);
}

.footer-consent-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.footer-consent-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

.footer-disclaimer {
    color: rgba(255, 255, 255, 0.22);
    font-size: 0.65rem;
    line-height: 1.5;
    max-width: 48rem;
    margin: var(--space-md) auto 0;
    padding: 0 var(--space-sm);
    text-align: center;
}

/* ==========================================
   MODAL WINDOW (CONSENT)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    background: rgba(1, 2, 5, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
        max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    max-width: 450px;
    width: 90%;
    flex-shrink: 0;
    margin-top: auto;
    margin-bottom: auto;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(255, 255, 255, 0.05);
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    background: linear-gradient(to right, var(--clr-gold-light), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.modal-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
/* Custom Autocomplete/Dropdown for Synastry History Search */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 4px;
    background: rgba(13, 20, 48, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background var(--transition-fast);
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-dropdown-item .pair-name {
    display: block;
    color: var(--clr-text-main);
    font-size: 0.95rem;
    font-weight: 500;
}

.search-dropdown-item .pair-date {
    display: block;
    color: var(--clr-text-muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* Screen reader / crawler-only block (hero duplicate content variant C) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Inner pages (blog): same cosmic backdrop as main hero */
body.blog-layout {
    position: relative;
    min-height: 100vh;
    background-color: var(--clr-bg-dark);
}

body.blog-layout .site-page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

body.blog-layout .site-page-bg .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

body.blog-layout .site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(1, 2, 5, 0.55) 0%, transparent 100%);
}

body.blog-layout main {
    position: relative;
    z-index: 1;
    padding-top: 6.5rem;
}

body.blog-layout .site-footer {
    position: relative;
}

/* Blog: панели текста — баланс читаемости и лёгкой прозрачности на звёздном bg */
body.blog-layout .policy-container {
    background: linear-gradient(
        165deg,
        rgba(8, 12, 28, 0.86) 0%,
        rgba(13, 20, 48, 0.8) 45%,
        rgba(10, 14, 32, 0.84) 100%
    );
    border-color: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(1.05);
    -webkit-backdrop-filter: blur(18px) saturate(1.05);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.blog-layout .policy-container p,
body.blog-layout .policy-container li {
    color: rgba(230, 236, 255, 0.9);
}

body.blog-layout .policy-container h2 {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.blog-layout .article-lead {
    color: rgba(215, 222, 248, 0.78);
}

body.blog-layout .article-meta {
    margin-top: var(--space-xl);
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

/* Main page: synastry + FAQ strip */
.home-cosmic-strip {
    position: relative;
    background-color: var(--clr-bg-dark);
}

.home-cosmic-strip > section {
    position: relative;
}

/* Совместимость и FAQ: только звёздное небо */
.synastry-cosmic-section,
.faq-cosmic-section {
    overflow: hidden;
    background-color: var(--clr-bg-dark);
}

.synastry-cosmic-section__sky,
.faq-cosmic-section__sky {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: var(--clr-bg-dark);
}

.synastry-cosmic-section__sky .noise-overlay,
.faq-cosmic-section__sky .noise-overlay {
    z-index: 3;
}

.synastry-cosmic-section__content {
    position: relative;
    z-index: 1;
}

.faq-cosmic-section > .container {
    position: relative;
    z-index: 1;
}

.home-cosmic-strip .home-faq-block {
    background: linear-gradient(
        165deg,
        rgba(8, 12, 28, 0.86) 0%,
        rgba(13, 20, 48, 0.8) 45%,
        rgba(10, 14, 32, 0.84) 100%
    );
    border-color: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(1.05);
    -webkit-backdrop-filter: blur(18px) saturate(1.05);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Main page: social proof teaser (examples + reviews) */
.home-social-proof-section {
    position: relative;
    z-index: 1;
}

.home-social-proof-heading {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.home-social-proof-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.home-social-proof-panel {
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(
        165deg,
        rgba(8, 12, 28, 0.86) 0%,
        rgba(13, 20, 48, 0.8) 45%,
        rgba(10, 14, 32, 0.84) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    backdrop-filter: blur(18px) saturate(1.05);
    -webkit-backdrop-filter: blur(18px) saturate(1.05);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-social-proof-subtitle {
    color: var(--clr-gold-light);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0 0 var(--space-sm);
}

.home-social-proof-lead {
    margin-bottom: var(--space-md);
    text-align: left;
}

.home-social-proof-preview {
    margin: 0 0 var(--space-md);
}

.home-social-proof-preview img {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.45);
    background: rgba(0, 0, 0, 0.35);
}

.home-social-proof-list {
    margin: 0 0 var(--space-lg);
    padding-left: 1.25rem;
    color: var(--clr-text-muted);
    line-height: 1.75;
}

.home-social-proof-list li {
    margin-bottom: var(--space-xs);
}

.home-social-proof-cta {
    margin: 0;
    text-align: center;
}

.home-social-proof-aggregate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15em;
    margin-bottom: var(--space-lg);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    letter-spacing: 0.06em;
    line-height: 1;
}

.home-agg-star {
    color: var(--clr-gold);
    user-select: none;
}

.home-agg-star--partial {
    position: relative;
    display: inline-block;
    user-select: none;
}

.home-agg-star-dim {
    color: rgba(255, 255, 255, 0.16);
}

.home-agg-star-gold-clip {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    width: 71.43%;
    color: var(--clr-gold);
    pointer-events: none;
}

.home-review-teaser-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.home-review-teaser {
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
}

.home-review-teaser-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.home-review-teaser-head > div:first-of-type {
    min-width: min(100%, 10rem);
    flex: 1 1 10rem;
}

.home-review-teaser-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--clr-text-main);
}

.home-review-teaser-meta {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

.home-review-teaser-stars {
    color: var(--clr-gold);
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    user-select: none;
    flex-shrink: 0;
}

.home-review-teaser-text {
    margin: 0;
    color: var(--clr-text-muted);
    line-height: 1.65;
    font-size: 0.95rem;
}

.home-social-proof-more {
    text-align: center;
    margin: var(--space-lg) 0 0;
    margin-bottom: 0;
}

.home-social-proof-more a {
    color: var(--clr-gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.home-social-proof-more a:hover {
    color: var(--clr-gold-light);
}

@media (max-width: 768px) {
    .home-social-proof-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .home-social-proof-panel {
        padding: var(--space-lg) var(--space-md);
        margin-left: var(--space-sm);
        margin-right: var(--space-sm);
    }

    .home-social-proof-preview img {
        max-width: 100%;
    }

    .home-review-teaser-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

body.blog-layout .blog-card {
    background: linear-gradient(
        165deg,
        rgba(8, 12, 28, 0.82) 0%,
        rgba(13, 20, 48, 0.78) 50%,
        rgba(10, 14, 32, 0.82) 100%
    );
    border-color: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(18px) saturate(1.05);
    -webkit-backdrop-filter: blur(18px) saturate(1.05);
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.blog-layout .blog-hub-head p {
    color: rgba(220, 226, 245, 0.86);
}

body.blog-layout .blog-card-meta {
    color: rgba(200, 210, 235, 0.68);
}

body.blog-layout .blog-card-lead {
    color: rgba(225, 230, 250, 0.86);
}

/* ==========================================
   LOGIN MODAL (email auth)
   ========================================== */

body.login-modal-open {
    overflow: hidden;
}

.login-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

.login-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.login-modal-box {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding: 1.75rem 1.5rem 1.5rem;
    background: linear-gradient(
        165deg,
        rgba(10, 14, 32, 0.98) 0%,
        rgba(13, 20, 48, 0.98) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.login-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background: none;
    border: none;
    color: var(--clr-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.35rem;
    z-index: 2;
}

.login-modal-close:hover {
    color: var(--clr-text-main);
}

.login-modal-title {
    color: var(--clr-gold);
    margin: 0 2rem 0.5rem 0;
    font-size: 1.45rem;
    line-height: 1.2;
}

.login-modal-desc {
    color: var(--clr-text-muted);
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.45;
}

#loginModalForm {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.login-modal input[type="email"],
.login-modal input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text-main);
    font-size: 1rem;
    box-sizing: border-box;
}

.login-modal-consents {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0.25rem 0 0.85rem;
    min-width: 0;
}

.login-modal-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--clr-text-muted);
    font-size: 0.88rem;
    line-height: 1.4;
    cursor: pointer;
    text-align: left;
    min-width: 0;
}

.login-modal-consent input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    min-width: 1.05rem;
    margin: 0.15rem 0 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: var(--clr-gold);
    cursor: pointer;
}

.login-modal-consent a {
    color: var(--clr-gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-modal-feedback {
    min-height: 0;
}

.login-modal-hint {
    color: var(--clr-text-muted);
    font-size: 0.88rem;
    line-height: 1.4;
    margin: 0 0 0.75rem;
}

.login-modal-hint--inline {
    margin-top: -0.35rem;
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
}

.login-modal-error {
    color: #cf3131;
    font-size: 0.88rem;
    line-height: 1.4;
    margin: 0 0 0.75rem;
}

.login-modal .btn.login-modal-submit {
    width: 100%;
    margin-top: 0.15rem;
}

.login-modal-resend {
    display: block;
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.35rem 0;
    background: none;
    border: none;
    color: var(--clr-text-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 0.9rem;
}

.login-modal-resend:hover {
    color: var(--clr-gold-light);
}

@media (max-width: 480px) {
    .login-modal-box {
        padding: 1.5rem 1.15rem 1.15rem;
    }

    .login-modal-title {
        font-size: 1.3rem;
    }
}
