/* style.css */
:root {
    --bg: #0A0E1A;
    --bg-card: #111827;
    --bg-card-hover: #1a1f2e;
    --text: #F1F5F9;
    --text-secondary: #CBD5E1;
    --accent: #7C3AED;
    --accent2: #2563EB;
    --cta: #22C55E;
    --cta-hover: #16A34A;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 20px;
    --radius-sm: 14px;
    --shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 18px;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
a { color: inherit; text-decoration: none; }

.particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; opacity: 0.25;
}
.particle {
    position: absolute; background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    border-radius: 50%; animation: float 22s infinite ease-in-out;
}
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    25% { transform: translateY(-60px) translateX(40px) scale(1.1); }
    50% { transform: translateY(-30px) translateX(-30px) scale(0.9); }
    75% { transform: translateY(-80px) translateX(15px) scale(1.05); }
}

.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 14, 26, 0.85); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    opacity: 98%;
}
.header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.logo span { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.lang-switcher {
    display: flex; gap: 4px; background: var(--bg-card);
    border-radius: 30px; padding: 4px; border: 1px solid var(--border);
    /* для псевдоэлемента */
    position: relative;
}
.lang-switcher a {
    padding: 10px 16px; border-radius: 26px; font-size: 14px; font-weight: 500;
    transition: color 0.2s; color: var(--text-secondary);
    background: transparent !important;
    position: relative;
    z-index: 1;
}
/* убрали фон, оставили только цвет */
.lang-switcher a.active,
.lang-switcher a:hover {
    color: #fff;
}
.lang-switcher a.active {
    background: transparent !important;
}

/* Скользящий псевдоэлемент */
.lang-switcher::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: var(--active-left, 0);
    width: var(--active-width, 0);
    border-radius: 26px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    z-index: 0;
    transition: left 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                width 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Блик на активном пункте */
.lang-switcher a.glare-hover {
    overflow: hidden;
}

.glare-hover { position: relative; overflow: hidden; }
.glare-hover::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.6s ease;
    z-index: 2; pointer-events: none;
}
.glare-hover:hover::after { left: 100%; }

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 18px 42px; border-radius: 50px; font-weight: 700;
    font-size: 20px; cursor: pointer; transition: all 0.3s; border: none; white-space: nowrap;
    position: relative; overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--cta), #16A34A);
    color: #fff; box-shadow: 0 10px 32px rgba(34, 197, 94, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 44px rgba(34, 197, 94, 0.5); }
.btn-secondary {
    background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.4); }
.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
    z-index: 2; pointer-events: none;
}
.btn:hover::after { left: 100%; }

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.hero-note { margin-top: 32px; font-size: 15px; color: var(--text-secondary); line-height: 1.5; }

.hero { position: relative; z-index: 1; padding: 90px 0 50px; text-align: center; }
.hero-badge {
    display: inline-block; background: rgba(124, 58, 237, 0.15);
    color: #A78BFA; padding: 10px 26px; border-radius: 24px;
    font-size: 20px; font-weight: 600; margin-bottom: 24px;
    border: 1px solid rgba(124, 58, 237, 0.3);
}
.hero h1 {
    font-size: clamp(36px, 5.5vw, 60px); font-weight: 800;
    line-height: 1.15; margin-bottom: 24px; letter-spacing: -1px;
}
.hero h1 .gradient {
    background: linear-gradient(135deg, var(--accent), var(--accent2), #06B6D4);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: clamp(18px, 2.2vw, 20px); color: var(--text-secondary);
    max-width: 700px; margin: 0 auto 36px;
}

.trust-bar {
    position: relative; z-index: 1; padding: 40px 0 60px;
    display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
}
.trust-item {
    text-align: center; background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 28px 32px; min-width: 160px; backdrop-filter: blur(5px); transition: all 0.3s;
    position: relative; overflow: hidden;
}
.trust-item::after {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease; z-index: 2; pointer-events: none;
}
.trust-item:hover::after { left: 100%; }
.trust-item:hover {
    background: var(--bg-card-hover); border-color: rgba(124, 58, 237, 0.4); transform: translateY(-4px);
}
.trust-item .num {
    font-size: 48px; font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1;
}
.trust-item .label { font-size: 16px; color: var(--text-secondary); margin-top: 8px; font-weight: 500; }

.section { position: relative; z-index: 1; padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.section-header p { color: var(--text-secondary); font-size: 18px; max-width: 650px; margin: 0 auto; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.card {
    background: var(--bg-card); border-radius: var(--radius); padding: 40px 32px;
    border: 1px solid var(--border); transition: all 0.3s;
    position: relative; overflow: hidden;
}
.card::after {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.6s ease; z-index: 2; pointer-events: none;
}
.card:hover::after { left: 100%; }
.card:hover {
    background: var(--bg-card-hover); transform: translateY(-6px);
    box-shadow: var(--shadow); border-color: rgba(124, 58, 237, 0.3);
}
.card-icon { font-size: 40px; margin-bottom: 20px; }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.card p { color: var(--text-secondary); font-size: 16px; line-height: 1.6; }

.why-vpn {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 52px 48px; border: 1px solid var(--border);
    position: relative; overflow: hidden;
}
.why-vpn::after {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    transition: left 0.6s ease; z-index: 2; pointer-events: none;
}
.why-vpn:hover::after { left: 100%; }
.why-vpn p { color: var(--text-secondary); font-size: 18px; margin-bottom: 20px; line-height: 1.7; }
.why-vpn p:last-child { margin-bottom: 0; }
.why-vpn strong { color: var(--text); }

.about-block {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 48px; border: 1px solid var(--border);
    position: relative; overflow: hidden;
}
.about-block::after {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    transition: left 0.6s ease; z-index: 2; pointer-events: none;
}
.about-block:hover::after { left: 100%; }
.about-block p { color: var(--text-secondary); font-size: 18px; margin-bottom: 16px; line-height: 1.7; }
.about-block p:last-child { margin-bottom: 0; }

.protocol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; margin-top: 40px; }
.protocol-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 40px 32px;
    border: 1px solid var(--border); transition: all 0.3s; text-align: center;
    position: relative; overflow: hidden;
}
.protocol-card::after {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease; z-index: 2; pointer-events: none;
}
.protocol-card:hover::after { left: 100%; }
.protocol-card:hover {
    background: var(--bg-card-hover); border-color: rgba(124, 58, 237, 0.4); transform: translateY(-4px);
}
.protocol-card .protocol-icon { font-size: 48px; margin-bottom: 16px; }
.protocol-card h4 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.protocol-card p { color: var(--text-secondary); font-size: 16px; line-height: 1.6; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.pricing-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 40px 32px;
    border: 1px solid var(--border); text-align: center; transition: all 0.3s;
    position: relative; overflow: hidden;
}
.pricing-card::after {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.6s ease; z-index: 2; pointer-events: none;
}
.pricing-card:hover::after { left: 100%; }
.pricing-card:hover { border-color: rgba(124, 58, 237, 0.4); transform: translateY(-4px); }
.pricing-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.pricing-card .price { font-size: 48px; font-weight: 800; margin: 16px 0 4px; }
.pricing-card .price-period { font-size: 16px; color: var(--text-secondary); }
.pricing-card .savings { color: var(--cta); font-size: 16px; font-weight: 600; margin: 8px 0 20px; }
.pricing-card .btn { width: 100%; justify-content: center; }

.devices-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.device-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 20px 32px;
    font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px;
    transition: all 0.3s;
}
.device-item:hover { border-color: rgba(124, 58, 237, 0.4); transform: translateY(-2px); }
.device-icon { font-size: 28px; }

.payment-section { padding: 60px 0 40px; }
.payment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.payment-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 28px 24px;
    display: flex; align-items: center; gap: 16px; font-size: 18px; font-weight: 600;
    transition: all 0.3s;
    position: relative; overflow: hidden;
}
.payment-card::after {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease; z-index: 2; pointer-events: none;
}
.payment-card:hover::after { left: 100%; }
.payment-card:hover {
    border-color: rgba(124, 58, 237, 0.4); background: var(--bg-card-hover); transform: translateY(-2px);
}
.payment-icon { font-size: 32px; }
.payment-card small { font-size: 14px; color: var(--text-secondary); font-weight: 400; display: block; }

.comparison-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.comparison-table th, .comparison-table td { padding: 16px 20px; border-bottom: 1px solid var(--border); text-align: left; }
.comparison-table th { color: var(--text-secondary); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.comparison-table .highlight { color: var(--cta); font-weight: 700; }

.faq-list { display: flex; flex-direction: column; gap: 16px; }
.faq-item { background: var(--bg-card); border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; }
.faq-q {
    width: 100%; padding: 22px 28px; background: none; border: none;
    color: var(--text); font-size: 18px; font-weight: 600; text-align: left;
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    position: relative;
}
.faq-q::after {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    transition: left 0.6s ease; z-index: 2; pointer-events: none;
}
.faq-q:hover::after { left: 100%; }


.faq-a {
  padding: 0 28px;              /* убираем нижний отступ в закрытом состоянии */
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, padding 0.5s ease, opacity 0.4s ease;
}

.faq-item.open .faq-a {
  max-height: 1000px;           /* достаточно большой запас для любого текста */
  opacity: 1;
  padding: 0 28px 22px;         /* возвращаем нижний отступ */
}

.cta-bottom { text-align: center; padding: 90px 0 80px; position: relative; z-index: 1; }
.cta-bottom h2 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; margin-bottom: 16px; }
.cta-bottom p { color: var(--text-secondary); margin-bottom: 32px; font-size: 18px; }

.footer { border-top: 1px solid var(--border); padding: 32px 0; position: relative; z-index: 1; }
.footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer, .footer a { color: var(--text-secondary); font-size: 14px; }
.footer a:hover { color: var(--text); }

@media (max-width: 768px) {
    body { font-size: 15px; }
    .container { padding: 0 20px; }
    .hero { padding: 60px 0 30px; }
    .hero-badge { font-size: 16px; padding: 8px 20px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .btn { font-size: 16px; padding: 16px 32px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; }
    .trust-bar { gap: 16px; }
    .trust-item { padding: 20px 16px; min-width: 130px; }
    .trust-item .num { font-size: 34px; }
    .trust-item .label { font-size: 13px; }
    .lang-switcher a { padding: 8px 12px; font-size: 12px; }
    .header .container { flex-direction: column; gap: 12px; }
    .why-vpn, .about-block { padding: 28px 20px; }
    .why-vpn p, .about-block p { font-size: 15px; }
    .card { padding: 28px 20px; }
    .card h3 { font-size: 18px; }
    .card p { font-size: 14px; }
    .protocol-card { padding: 28px 20px; }
    .protocol-card h4 { font-size: 20px; }
    .protocol-card p { font-size: 14px; }
    .pricing-card { padding: 28px 20px; }
    .pricing-card .price { font-size: 40px; }
    .payment-card { font-size: 16px; padding: 20px; }
    .section { padding: 50px 0; }
    .section-header h2 { font-size: 28px; }
    .section-header p { font-size: 15px; }
    .faq-q { font-size: 16px; padding: 18px 20px; }
    .faq-a { font-size: 14px; padding: 0 20px 18px; }
}

.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }


/* Privacy policy page */
.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
}

.privacy-content h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
}

.privacy-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-top: 40px;
    margin-bottom: 12px;
}

.privacy-content p {
    margin-bottom: 16px;
}

.privacy-content a {
    color: #A78BFA;
    text-decoration: underline;
}

.privacy-content a:hover {
    color: var(--accent2);
}

/* Адаптив для политики */
@media (max-width: 768px) {
    .privacy-content {
        font-size: 15px;
    }
    .privacy-content h1 {
        font-size: 28px;
    }
    .privacy-content h2 {
        font-size: 20px;
    }
}


/* Press / "Об Amnezia пишут" */
.press-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.press-carousel-wrapper {
    overflow: hidden;
    width: 100%;
    margin-top: 20px;
}

.press-carousel {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: scrollPress 30s linear infinite;
}

/* Анимация движения логотипов влево */
@keyframes scrollPress {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Пауза при наведении */
.press-carousel:hover {
    animation-play-state: paused;
}

/* Элемент с логотипом */
.press-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;            /* фиксированная высота */
    transition: opacity 0.3s;
    opacity: 0.7;
}

.press-item:hover {
    opacity: 1;
}

.press-item img {
    max-height: 100%;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(1) brightness(0) invert(1);  /* белые логотипы на тёмном фоне */
    transition: filter 0.3s;
}

.press-item:hover img {
    filter: grayscale(0) brightness(1) invert(0);  /* цвет при наведении */
}

/* Адаптив */
@media (max-width: 768px) {
    .press-carousel {
        gap: 24px;
    }
    .press-item img {
        max-width: 120px;
    }
}

/* Animation text and blocks */
.reveal-auto {
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.8s ease;
  /* transform не задаём – он будет в инлайн-стилях */
}
.reveal-auto.visible {
  transform: translateX(0) !important;
  opacity: 1 !important;
}


/* ==========================================
   БЛИК НА ЗАГОЛОВКАХ — последняя правка
   ========================================== */
:root {
  --glare-color-1: #7c3aed;
  --glare-color-2: #06b6d4;
  --glare-color-3: #ffffff;
  --glare-speed: 0.7s;
  --glare-size: 300%;
}

.glare-title {
  position: relative;
  display: inline-block;
  cursor: default;
}

.glare-trigger {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: -0.3em; /* выходим за нижний край line-box, чтобы покрыть выносные элементы (р, у, д...) */
  width: 100%;
  height: auto;   /* размер теперь задаётся через top/bottom, а не фиксированным 100% */
  z-index: 2;
  transform: translateZ(0); /* принудительный GPU-слой — убирает артефакты сглаживания при background-clip:text */
  pointer-events: none;
  opacity: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  white-space: pre-wrap;
  word-break: inherit;
  overflow: visible;

  /* Сглаживание */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* Хаки для гладких краёв при background-clip:text.
     Прозрачный stroke уточняет маску глифа, shadow добавляет субпиксельное покрытие.
     Раньше они ломали .gradient через перекрытие — теперь .glare-skip это предотвращает. */
/*  -webkit-text-stroke: 0.5px transparent;
  text-shadow: 0 0 0.5px rgba(255, 255, 255, 0.01); */

  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255,255,255,0.6) 15%,
    var(--glare-color-1) 30%,
    var(--glare-color-2) 50%,
    var(--glare-color-3) 70%,
    rgba(255,255,255,0.6) 85%,
    transparent 100%
  );
  background-size: var(--glare-size) var(--glare-size);
  background-position: 100% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.glare-trigger.animate {
  animation: glareDiagonal var(--glare-speed) ease forwards;
}

@keyframes glareDiagonal {
  0%   { background-position: 100% 100%; opacity: 1; }
  30%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { background-position: 0% 0%; opacity: 0; }
}

/* Скрываем всё, кроме блика и .gradient */
.glare-title.glare-active > :not(.glare-trigger):not(.gradient) {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* .gradient просто находится выше, без принудительного слоя */
.gradient {
  position: relative;
  z-index: 3;
  isolation: isolate; /* собственный stacking context — защита от compositing-артефактов соседних слоёв */
}

/* Невидимая заглушка внутри .glare-trigger на месте .gradient-спанов.
   Занимает то же пространство, но не рендерит ничего поверх оригинального градиентного текста. */
.glare-trigger .glare-skip {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}
