/* =============================================================================
   VibeTools Hub — performant cosmic landing
   No canvas. No blur. No backdrop-filter. Two cheap animations total.
   ============================================================================= */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #010204;
  color: #f1f5f9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ── Static background layer — SVG stars + nebula, painted once ── */
.cosmos-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 50%, #030610 0%, #010204 100%);
}

.cosmos-bg svg {
  position: absolute;
  /* oversized so slow drift never exposes empty edges */
  top: -6%;
  left: -6%;
  width: 112%;
  height: 112%;
  display: block;
  animation: cosmos-drift 120s ease-in-out infinite alternate;
  will-change: transform;
}

/* slow diagonal drift + barely-perceptible breathing — pure compositor work */
@keyframes cosmos-drift {
  0%   { transform: translate3d(0,      0,      0) scale(1);    }
  50%  { transform: translate3d(-1.5%, -1%,    0) scale(1.015); }
  100% { transform: translate3d(1.5%,   0.8%,  0) scale(1);    }
}

/* bright stars twinkle — only opacity, only 10 elements */
.cosmos-bg svg .tw {
  animation-name: star-twinkle;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  will-change: opacity;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 1;    }
  50%      { opacity: 0.35; }
}

/* ── Page layout ── */
.cosmos-page {
  position: relative;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════════════ */
/* HERO                                                                    */
/* ══════════════════════════════════════════════════════════════════════ */

.cosmos-hero {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  text-align: center;
}

/* allow pointer events only on the brand word (hero itself is decorative) */
.cosmos-hero__brand {
  pointer-events: auto;
  cursor: default;
}

.cosmos-hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 1.5vh, 1rem);
  margin: 0;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* brand — letter-wise gradient shine */
.cosmos-hero__brand {
  display: inline-flex;
  font-size: clamp(3.2rem, 13vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.cosmos-hero__char {
  display: inline-block;
  background: linear-gradient(
    100deg,
    #ffffff 0%,
    #e8eeff 25%,
    #d4dcf5 45%,
    #ffffff 55%,
    #d4dcf5 75%,
    #ffffff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shine 10s linear infinite;
  transition:
    transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1),
    filter   280ms ease;
  will-change: transform;
}

@keyframes shine {
  0%   { background-position: 0%   50%; }
  100% { background-position: 200% 50%; }
}

/* ══════════════════════════════════════════════════════════════════════ */
/* WOW on hover — SUPERNOVA                                                */
/* ══════════════════════════════════════════════════════════════════════ */

.cosmos-hero__brand { position: relative; }

/* base letter transition — smooth return when cursor leaves */
.cosmos-hero__char {
  transition:
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    filter   320ms ease;
}

/* letters blast outward; farther from centre → farther they fly */
.cosmos-hero__brand:hover .cosmos-hero__char,
.cosmos-hero__brand:focus-visible .cosmos-hero__char {
  animation: shine 3.3s linear infinite;
  transform: translateX(calc(var(--o) * 0.09em)) scale(1.04);
  filter: brightness(1.25) drop-shadow(0 0 0.28em rgba(255, 255, 255, 0.75));
  transition:
    transform 440ms cubic-bezier(0.34, 1.56, 0.64, 1),
    filter   280ms ease;
}

/* ── shockwave ring — cold white, sharp then dissipating ── */
.cosmos-hero__brand::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%) scale(0.15);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.cosmos-hero__brand:hover::before,
.cosmos-hero__brand:focus-visible::before {
  animation: nova-ring 1100ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes nova-ring {
  0%   { transform: translate(-50%, -50%) scale(0.15); opacity: 0;    border-color: rgba(255,255,255,1);    border-width: 2px;   }
  15%  {                                                opacity: 1;                                                              }
  60%  {                                                opacity: 0.35; border-color: rgba(220,232,255,0.6);                      }
  100% { transform: translate(-50%, -50%) scale(4.5);  opacity: 0;    border-color: rgba(180,200,240,0);    border-width: 0.5px; }
}

/* ── core flash — pure-white bloom, no tint ── */
.cosmos-hero__brand::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.30) 30%,
    rgba(230, 240, 255, 0.0) 70%);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.cosmos-hero__brand:hover::after,
.cosmos-hero__brand:focus-visible::after {
  animation: nova-core 1100ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes nova-core {
  0%   { transform: translate(-50%, -50%) scale(0.2); opacity: 0;    }
  12%  { transform: translate(-50%, -50%) scale(0.9); opacity: 1;    }
  100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0;    }
}

.cosmos-hero__tagline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
  font-size: clamp(1rem, 2.6vw, 1.9rem);
  font-weight: 300;
  letter-spacing: 0.005em;
  color: rgba(226, 232, 240, 0.92);
}

.cosmos-hero__tagline-text {
  /* static subtle gradient — no animation */
  background: linear-gradient(90deg,
    rgba(226, 232, 240, 0.75) 0%,
    #ffffff                   50%,
    rgba(226, 232, 240, 0.75) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* animated dots — only opacity/transform, compositor-only */
.cosmos-hero__dots {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  margin-left: 0.1em;
}

.cosmos-hero__dots span {
  width: 0.28em;
  height: 0.28em;
  border-radius: 50%;
  background: #e0e7ff;
  animation: dot-blink 1.6s ease-in-out infinite;
  will-change: opacity;
}
.cosmos-hero__dots span:nth-child(2) { animation-delay: 0.25s; }
.cosmos-hero__dots span:nth-child(3) { animation-delay: 0.50s; }

@keyframes dot-blink {
  0%, 80%, 100% { opacity: 0.25; }
  40%           { opacity: 1;    }
}

.cosmos-hero__sub {
  margin-top: clamp(1.25rem, 3vh, 2.25rem);
  font-size: clamp(0.875rem, 1.6vw, 1.0625rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(148, 163, 184, 0.75);
  max-width: 38ch;
  line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════════════ */
/* FOOTER                                                                 */
/* ══════════════════════════════════════════════════════════════════════ */

.cosmos-footer {
  position: relative;
  z-index: 10;
  padding: 0 1rem clamp(1rem, 3.5vh, 2rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.cosmos-footer__links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cosmos-footer__link {
  font-size: 0.875rem;
  color: rgba(203, 213, 225, 0.7);
  letter-spacing: 0.02em;
  transition: color 180ms ease;
  white-space: nowrap;
  padding: 0.25rem 0.1rem;
}

.cosmos-footer__link:hover,
.cosmos-footer__link:focus-visible {
  color: #ffffff;
  outline: none;
}

.cosmos-footer__dot {
  color: rgba(100, 116, 139, 0.55);
  font-size: 0.875rem;
}

.cosmos-footer__copy {
  font-size: 0.75rem;
  color: rgba(100, 116, 139, 0.5);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════════════════════════ */
/* CONTENT PAGES (about / privacy / terms / contact)                      */
/* ══════════════════════════════════════════════════════════════════════ */

.cosmos-page--content {
  height: auto;
  min-height: 100dvh;
  justify-content: flex-start;
}

html:has(.cosmos-page--content),
body:has(.cosmos-page--content),
html:has(.cosmos-page--home),
body:has(.cosmos-page--home) {
  height: auto;
  overflow: auto;
}

/* На home hero занимает первый экран целиком, дальше — обычный документ. */
.cosmos-page--home {
  height: auto;
  min-height: 100dvh;
  justify-content: flex-start;
}

.cosmos-page--home .cosmos-hero {
  min-height: 100dvh;
  flex: 0 0 auto;
}

.cosmos-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 5rem) 1.5rem clamp(2rem, 5vh, 3rem);
}

.cosmos-content__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: rgba(148, 163, 184, 0.75);
  margin-bottom: 2rem;
  transition: color 180ms ease;
}

.cosmos-content__back:hover { color: #ffffff; }

.cosmos-content h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  background: linear-gradient(120deg, #ffffff 0%, #d4dcf5 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.cosmos-content__lead {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: rgba(203, 213, 225, 0.85);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.cosmos-content h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: #f1f5f9;
  margin: 2.5rem 0 0.85rem;
  letter-spacing: -0.01em;
}

.cosmos-content h2:first-of-type { margin-top: 0; }

.cosmos-content p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(203, 213, 225, 0.82);
  margin-bottom: 1rem;
}

.cosmos-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.cosmos-content ul li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(203, 213, 225, 0.82);
  margin-bottom: 0.45rem;
}

.cosmos-content ul li::before {
  content: '·';
  position: absolute;
  left: 0.4rem;
  top: 0;
  color: rgba(165, 180, 252, 0.7);
  font-weight: 700;
}

.cosmos-content a {
  color: #c7d2fe;
  text-decoration: underline;
  text-decoration-color: rgba(199, 210, 254, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 180ms ease, color 180ms ease;
}

.cosmos-content a:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

.cosmos-content__updated {
  font-size: 0.8125rem;
  color: rgba(100, 116, 139, 0.7);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

/* contact page — quiet card */
.cosmos-contact-card {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0.85rem;
}

.cosmos-contact-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.7);
  margin-bottom: 0.4rem;
}

.cosmos-contact-card__value {
  font-size: 1rem;
  color: #f1f5f9;
  margin-bottom: 0;
}

.cosmos-contact-card__value a { color: #e0e7ff; }

.cosmos-contact-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.cosmos-contact-channels a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #e0e7ff;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease;
}

.cosmos-contact-channels a:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(165, 180, 252, 0.55);
  color: #ffffff;
}

/* hint box — quiet, non-pushy "open to commissions" tone */
.cosmos-hint {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(30, 27, 75, 0.3) 100%);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-left: 2px solid rgba(165, 180, 252, 0.5);
  border-radius: 0.6rem;
}

.cosmos-hint p {
  margin-bottom: 0.6rem;
  font-size: 0.9375rem;
  color: rgba(226, 232, 240, 0.88);
}

.cosmos-hint p:last-child { margin-bottom: 0; }

.cosmos-hint p em {
  font-style: normal;
  color: #ffffff;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════════ */
/* Cookie banner                                                          */
/* ══════════════════════════════════════════════════════════════════════ */

.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #0a0f20;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  max-width: min(480px, calc(100vw - 2rem));
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.cookie-banner[hidden] { display: none; }

.cookie-banner__text {
  font-size: 0.8125rem;
  color: rgba(203, 213, 225, 0.9);
  line-height: 1.55;
}

.cookie-banner__text a {
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__btn {
  align-self: flex-end;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease;
}

.cookie-banner__btn:hover { background: #4f46e5; }

/* ══════════════════════════════════════════════════════════════════════ */
/* Reduced motion — kill all animation                                    */
/* ══════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .cosmos-bg svg,
  .cosmos-bg svg .tw,
  .cosmos-hero__char,
  .cosmos-hero__dots span,
  .cosmos-hero__brand::before,
  .cosmos-hero__brand::after {
    animation: none !important;
    transition: none !important;
  }
  .cosmos-hero__brand:hover .cosmos-hero__char {
    transform: none !important;
    filter: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Contact Form — форма обратной связи на /contact/
   ══════════════════════════════════════════════════════════════════════════ */
.contact-intro {
  font-size: var(--font-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}
.contact-intro strong { color: var(--color-text); font-weight: 600; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.contact-form__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.contact-form__label {
  font-weight: 600;
  font-size: var(--font-sm);
  color: var(--color-text);
}
.contact-form__hint {
  font-size: var(--font-xs);
  color: var(--color-text-dim);
  font-weight: 400;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--font-base);
  background: var(--color-bg, #fff);
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.contact-form textarea {
  resize: vertical;
  min-height: 140px;
  font-family: var(--font);
}
.contact-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form__captcha {
  display: flex;
  justify-content: center;
}
.contact-form__submit {
  align-self: flex-start;
  min-width: 200px;
}
.contact-form__status {
  min-height: 1.5em;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  padding: var(--space-2) 0;
}
.contact-form__status.is-error {
  color: var(--color-danger, #ef4444);
}
.contact-form__status.is-success {
  color: var(--color-success, #10b981);
  padding: var(--space-3) var(--space-4);
  background: var(--color-success-light, #ecfdf5);
  border-radius: var(--radius);
  font-weight: 500;
}

.contact-socials {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
@media (min-width: 560px) {
  .contact-socials { grid-template-columns: 1fr 1fr; }
}
.contact-social {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.contact-social:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.contact-social__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-social__icon--tg { background: #e8f4fd; color: #2AABEE; }
.contact-social__icon--vk { background: #e8efff; color: #0077FF; }
.contact-social__title {
  font-weight: 600;
  margin: 0 0 2px;
  font-size: var(--font-base);
}
.contact-social__handle {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
}

/* Footer CTA — «Напишите нам» */
.site-footer__cta {
  background: var(--color-primary-light, rgba(99, 102, 241, 0.08));
  color: var(--color-text);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
  font-size: var(--font-sm);
  text-align: center;
  line-height: 1.5;
}
.site-footer__cta a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}
.site-footer__cta a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════════
   Cosmos overrides for contact form + shared CTA — в хабе нет светлой темы
   с фирменными --color-*, поэтому переопределяем partial под тёмный фон
   ══════════════════════════════════════════════════════════════════════════ */

.cosmos-page--content .result-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.55) 0%, rgba(30, 27, 75, 0.4) 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.85rem;
  padding: 1.75rem 1.75rem 1.5rem;
  margin-bottom: 2rem;
}

.cosmos-page--content .contact-intro {
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.cosmos-page--content .contact-intro strong {
  color: #ffffff;
  font-weight: 600;
}

.cosmos-page--content .contact-form { gap: 1.1rem; }

.cosmos-page--content .contact-form__label {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cosmos-page--content .contact-form__hint {
  color: rgba(148, 163, 184, 0.75);
  font-size: 0.78rem;
  font-weight: 400;
  text-decoration: none;
}

.cosmos-page--content .contact-form input[type="text"],
.cosmos-page--content .contact-form input[type="email"],
.cosmos-page--content .contact-form textarea {
  background: rgba(2, 6, 16, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #f1f5f9;
  padding: 0.7rem 0.9rem;
  border-radius: 0.55rem;
  font-size: 0.9375rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.cosmos-page--content .contact-form input::placeholder,
.cosmos-page--content .contact-form textarea::placeholder {
  color: rgba(148, 163, 184, 0.45);
}
.cosmos-page--content .contact-form input:focus,
.cosmos-page--content .contact-form textarea:focus {
  outline: none;
  border-color: rgba(165, 180, 252, 0.7);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
  background: rgba(2, 6, 16, 0.75);
}

.cosmos-page--content .contact-form__status {
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.8125rem;
}
.cosmos-page--content .contact-form__status.is-error {
  color: #fca5a5;
}
.cosmos-page--content .contact-form__status.is-success {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 0.5rem;
  padding: 0.55rem 0.85rem;
}

.cosmos-page--content .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.55rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 180ms ease, border-color 180ms ease, transform 120ms ease;
}
.cosmos-page--content .btn--primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.cosmos-page--content .btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}
.cosmos-page--content .btn--ghost {
  background: transparent;
  color: rgba(203, 213, 225, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.cosmos-page--content .btn--ghost:hover {
  color: #ffffff;
  border-color: rgba(165, 180, 252, 0.5);
  background: rgba(99, 102, 241, 0.1);
}
.cosmos-page--content .btn--sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

.cosmos-page--content .contact-form__submit {
  align-self: flex-start;
  min-width: 200px;
  margin-top: 0.25rem;
}

/* ─── социалки — production-grade pill'ы (2026) ─── */
.cosmos-page--content .contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.875rem;
  margin-bottom: 0.25rem;
}

.cosmos-page--content .contact-social {
  display: inline-flex;
  align-items: center;
  gap: 0;                          /* gap управляется внутри через padding */
  min-height: 44px;                /* touch target */
  padding: 0 1.125rem 0 0.5rem;
  background:
    linear-gradient(
      145deg,
      rgba(30, 27, 75, 0.72) 0%,
      rgba(15, 23, 42, 0.6) 100%
    );
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #e2e8f0;
  text-decoration: none;
  /* укрепляем глубину: внешняя тень + тонкий highlight сверху */
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: translateZ(0);
  transition:
    border-color 200ms cubic-bezier(0.4, 0, 0.2, 1),
    background    200ms cubic-bezier(0.4, 0, 0.2, 1),
    transform     200ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow    200ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

@media (prefers-reduced-motion: reduce) {
  .cosmos-page--content .contact-social {
    transition: border-color 100ms linear, background 100ms linear;
  }
}

.cosmos-page--content .contact-social:hover {
  border-color: rgba(165, 180, 252, 0.45);
  background:
    linear-gradient(
      145deg,
      rgba(49, 46, 129, 0.85) 0%,
      rgba(30, 27, 75, 0.75) 100%
    );
  transform: translateY(-2px);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(99, 102, 241, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cosmos-page--content .contact-social:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 3px;
}

/* ── иконка — 32px, чёткий градиент + inner stroke ── */
.cosmos-page--content .contact-social__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: 0 0.625rem 0 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  /* inner-stroke + тень самого кружка */
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.35);
  transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* градиентный фон иконки через ::before */
.cosmos-page--content .contact-social__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  /* базовый — индиго, переопределяется для каждой соцсети */
  background: linear-gradient(145deg, #818cf8 0%, #6366f1 45%, #4f46e5 100%);
}

/* subtle highlight-полоска сверху кружка */
.cosmos-page--content .contact-social__icon::after {
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.cosmos-page--content .contact-social__icon svg {
  display: block;
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}

/* TG — холодный индиго→синий */
.cosmos-page--content .contact-social--tg .contact-social__icon::before {
  background: linear-gradient(145deg, #818cf8 0%, #6366f1 40%, #3b82f6 100%);
}

/* VK — тёплый фиолет→пурпур */
.cosmos-page--content .contact-social--vk .contact-social__icon::before {
  background: linear-gradient(145deg, #a78bfa 0%, #8b5cf6 40%, #7c3aed 100%);
}

/* hover усиливает тень кружка */
.cosmos-page--content .contact-social:hover .contact-social__icon {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 3px 12px rgba(99, 102, 241, 0.45);
}

/* ── текстовая часть ── */
.cosmos-page--content .contact-social > div {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1;
}

.cosmos-page--content .contact-social__title {
  display: none;
}

.cosmos-page--content .contact-social__handle {
  margin: 0;
  font-size: 0.8125rem;       /* 13px — соразмерно 32px кружку */
  font-weight: 600;
  color: color-mix(in srgb, #e2e8f0 90%, #a5b4fc 10%);
  letter-spacing: 0.02em;
  line-height: 1;
  transition: color 200ms ease;
}

.cosmos-page--content .contact-social:hover .contact-social__handle {
  color: #ffffff;
}

/* заголовок соцсетей — обнуляем inline-стили из shared/contact-form.partial.php */
.cosmos-page--content .cosmos-content h2[style] {
  font-size: 0.8125rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.75) !important;
  font-weight: 600;
  margin: 2.25rem 0 0.6rem !important;
}
.cosmos-page--content .cosmos-content h2 {
  color: #f1f5f9;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.85rem;
}

/* переопределяем site-footer__cta — плотный акцент-блок в космической гамме */
.cosmos-page--content .site-footer__cta {
  max-width: 720px;
  margin: 2rem auto 1.5rem;
  padding: 1rem 1.4rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(165, 180, 252, 0.2);
  border-radius: 0.7rem;
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: center;
}
.cosmos-page--content .site-footer__cta a {
  color: #c7d2fe;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(199, 210, 254, 0.4);
  text-underline-offset: 3px;
}
.cosmos-page--content .site-footer__cta a:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

/* bottom footer nav */
.cosmos-footer {
  position: relative;
  z-index: 10;
  padding: 1rem 1.5rem 2rem;
  text-align: center;
}
.cosmos-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.9rem;
  margin-bottom: 0.6rem;
}
.cosmos-footer__link {
  color: rgba(148, 163, 184, 0.75);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 180ms ease;
}
.cosmos-footer__link:hover { color: #ffffff; }
.cosmos-footer__dot { color: rgba(100, 116, 139, 0.5); font-size: 0.8125rem; }
.cosmos-footer__copy {
  color: rgba(100, 116, 139, 0.7);
  font-size: 0.75rem;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════ */
/* SCROLL HINT — chevron внизу hero, намёк «скролль ниже»                 */
/* ══════════════════════════════════════════════════════════════════════ */

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 4vh, 2.25rem);
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: rgba(203, 213, 225, 0.62);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 200ms ease;
}
.scroll-hint:hover,
.scroll-hint:focus-visible {
  color: #ffffff;
  outline: none;
}
.scroll-hint__chevron {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(165, 180, 252, 0.85);
  animation: scroll-hint-bounce 2.4s ease-in-out infinite;
  will-change: transform;
}
.scroll-hint__chevron svg { width: 100%; height: 100%; display: block; }

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.75; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════ */
/* TOOLS — секция каталога                                                */
/* ══════════════════════════════════════════════════════════════════════ */

.tools {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) 1.25rem clamp(3rem, 7vh, 5rem);
}

.tools__header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vh, 3rem);
}

.tools__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(165, 180, 252, 0.75);
}

.tools__heading {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f8fafc;
  background: linear-gradient(180deg, #ffffff 0%, rgba(203, 213, 225, 0.82) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tools__lead {
  margin: 0 auto;
  max-width: 560px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(203, 213, 225, 0.7);
}

.tools__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .tools__grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
  /* 9-я карточка — центрирование на планшете */
  .tools__grid .tool:nth-child(9) {
    grid-column: 1 / -1;
    max-width: calc((100% - 1.1rem) / 2);
    justify-self: center;
  }
}

@media (min-width: 1024px) {
  .tools__grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  .tools__grid .tool:nth-child(9) {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
  }
}

.tools__foot {
  margin: clamp(2rem, 5vh, 3rem) 0 0;
  text-align: center;
  font-size: 0.78125rem;
  letter-spacing: 0.04em;
  color: rgba(148, 163, 184, 0.55);
}

/* ── Tool card — Stellar Glass ── */
.tool {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "icon tag   arrow"
    "icon name  arrow"
    "desc desc  desc";
  column-gap: 1rem;
  row-gap: 0.35rem;
  padding: 1.5rem 1.375rem;
  border-radius: 1.125rem;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.62) 0%, rgba(30, 27, 75, 0.34) 100%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.35);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 280ms cubic-bezier(.2,.7,.2,1),
    border-color 240ms ease,
    box-shadow 280ms ease;
  /* stagger fade-in */
  opacity: 0;
  transform: translateY(16px);
}
.tool--in {
  opacity: 1;
  transform: none;
  transition-property: opacity, transform, border-color, box-shadow;
  transition-duration: 520ms, 520ms, 240ms, 280ms;
  transition-timing-function: ease, cubic-bezier(.2,.7,.2,1), ease, ease;
  transition-delay: calc(var(--i, 0) * 60ms), calc(var(--i, 0) * 60ms), 0ms, 0ms;
}

.tool__glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(480px circle at var(--mx, 50%) var(--my, -20%),
      rgba(129, 140, 248, 0.22),
      transparent 45%);
  opacity: 0;
  transition: opacity 260ms ease;
  z-index: -1;
}

.tool:hover,
.tool:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(165, 180, 252, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 12px 40px rgba(99, 102, 241, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.4);
  outline: none;
}
.tool:hover .tool__glow,
.tool:focus-visible .tool__glow {
  opacity: 1;
}
.tool:hover .tool__arrow,
.tool:focus-visible .tool__arrow {
  color: #c7d2fe;
  transform: translateX(3px);
}

.tool__icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(168, 85, 247, 0.18) 100%);
  border: 1px solid rgba(165, 180, 252, 0.22);
  color: #e0e7ff;
  align-self: start;
  flex-shrink: 0;
}
.tool__icon svg { width: 1.375rem; height: 1.375rem; display: block; }

.tool__tag {
  grid-area: tag;
  align-self: end;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(165, 180, 252, 0.72);
}

.tool__name {
  grid-area: name;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: #f1f5f9;
}

.tool__desc {
  grid-area: desc;
  margin-top: 0.45rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(203, 213, 225, 0.68);
}

.tool__arrow {
  grid-area: arrow;
  align-self: start;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.4);
  transition: color 220ms ease, transform 260ms cubic-bezier(.2,.7,.2,1);
}
.tool__arrow svg { width: 100%; height: 100%; display: block; }

/* ── Reduced motion: убираем bounce и stagger, но оставляем visibility ── */
@media (prefers-reduced-motion: reduce) {
  .scroll-hint__chevron { animation: none; }
  .tool {
    opacity: 1;
    transform: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
  }
  .tool:hover,
  .tool:focus-visible { transform: none; }
  .tool__arrow { transition: color 120ms ease; }
}

/* ── Mobile-specific card tweaks ── */
@media (max-width: 599px) {
  .tool {
    padding: 1.25rem 1.2rem;
    column-gap: 0.85rem;
  }
  .tool__icon { width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; }
  .tool__icon svg { width: 1.25rem; height: 1.25rem; }
  .tool__name { font-size: 0.9375rem; }
  .tool__desc { font-size: 0.78125rem; }
}

/* ── Scroll-hint не должен налезать на текст на очень низком вьюпорте ── */
@media (max-height: 620px) {
  .scroll-hint { bottom: 0.75rem; font-size: 0.625rem; }
  .scroll-hint__chevron { width: 1.25rem; height: 1.25rem; }
}
