/* animation.css
   Adds smooth scrolling, section reveals, hero sequencing, card animations,
   button and hover micro-interactions, image reveals, and accessibility
   (prefers-reduced-motion) for 10xLogs landing page.

   Notes:
   - Keep colors, layout and existing classes intact.
   - This file uses lightweight CSS only; JS handles observers and staggering.
*/

/* ========== SMOOTH SCROLLING ========== */
html, body, .site-wrapper {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: #090909 !important;
  min-height: 100%;
}

body {
  background: #090909 !important;
  overflow-x: hidden;
}

body.header-fixed {
  padding-top: 88px;
}

@media (max-width: 768px) {
  body.header-fixed { padding-top: 72px; }
}

.site-wrapper {
  background: #090909 !important;
}

section {
  background: transparent !important;
}

/* ========== VISUAL DEFAULTS ========== */
.animate-hidden { opacity: 0; transform: translateY(40px); will-change: transform, opacity; }
.revealed { opacity: 1 !important; transform: translateY(0) !important; }

/* HERO SEQUENCE (duration 0.8s ease-out) */
.hero-seq-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.hero-seq-item.revealed { opacity: 1; transform: translateY(0); }

/* SECTION REVEALS */
.section-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: transform, opacity;
}
.section-animate.revealed { opacity: 1; transform: translateY(0); }

/* CARD ANIMATIONS */
.card-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: transform, opacity;
}
.card-animate.revealed { opacity: 1; transform: translateY(0); }

/* CARD HOVER EFFECTS */
.category-card,
.diff-card,
.testi-card,
.service-pill,
.card-animate {
  transition: all 0.3s ease;
}
.category-card:hover,
.diff-card:hover,
.testi-card:hover,
.service-pill:hover {
  transform: scale(1.03);
}

/* BUTTON HOVER EFFECTS */
.btn-orange-main,
.btn-outline-dark,
.btn-white-action,
.card-button {
  transition: all 0.3s ease;
}
.btn-orange-main:hover,
.btn-outline-dark:hover,
.btn-white-action:hover,
.card-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(255,122,0,0.12);
}

/* NAVBAR: normal flow initially, fixed only after scroll */
header, .site-header, .navbar, .header, .main-header {
  transition: all 0.3s ease;
  position: relative;
  background: transparent !important;
  width: 100%;
  z-index: 1200;
}
header.scrolled, .site-header.scrolled, .navbar.scrolled, .header.scrolled, .main-header.scrolled,
body.header-fixed header, body.header-fixed .site-header, body.header-fixed .navbar, body.header-fixed .header, body.header-fixed .main-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.96) !important;
  backdrop-filter: blur(12px);
}

/* IMAGE ANIMATIONS */
.img-animate {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: transform, opacity;
}
.img-animate.revealed { opacity: 1; transform: scale(1); }

/* Ticker subtle show */
.ticker-message { transition: transform 0.45s ease, opacity 0.45s ease; }

/* COUNTER styles (visual only) */
.counter { font-variant-numeric: tabular-nums; }

/* Reduce motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 768px) {
  .hero-section,
  .hero-content,
  .visual-card-wrap,
  .hero-title,
  .hero-description,
  .hero-cta-group,
  .typing-text {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  /* disable only the top-level section reveal on mobile to avoid blank flashes */
  .section-animate {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  html, body { background: #090909 !important; }
}

/* Small helpers */
.is-hidden { visibility: hidden; }

/* Telegram support widget */
.site-footer {
  background: #090909;
  padding: 36px 18px 26px;
  border-top: 1px solid rgba(255, 122, 0, 0.14);
  color: #f4f4f4;
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}
.site-footer .footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: flex-start;
}
.footer-brand {
  min-width: 240px;
  max-width: 420px;
}
.footer-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}
.footer-brand p {
  margin-top: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  max-width: 360px;
}
.footer-links,
.footer-support {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a,
.footer-support a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}
.footer-links a:hover,
.footer-support a:hover {
  color: #ff7a00;
}
.footer-support p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}
.footer-copy {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.54);
  text-align: center;
}
.telegram-support-widget-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  pointer-events: auto;
}
.telegram-support-widget {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  max-width: min(320px, calc(100vw - 36px));
  pointer-events: auto;
  text-decoration: none;
}
.telegram-support-widget__card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 180px;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(15, 15, 15, 0.96);
  border: 1px solid rgba(255, 122, 0, 0.14);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateX(20px) scale(0.96);
  visibility: hidden;
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}
.telegram-support-widget:hover .telegram-support-widget__card,
.telegram-support-widget.active .telegram-support-widget__card {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}
.telegram-support-widget__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #ff7a00;
  color: #090909;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.telegram-support-widget__title {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}
.telegram-support-widget__button {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border: 1px solid rgba(255, 122, 0, 0.25);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.telegram-support-widget__button svg {
  color: #ff7a00;
  width: 26px;
  height: 26px;
}
.telegram-support-widget__button:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 22px 50px rgba(255, 122, 0, 0.2);
}
.telegram-support-widget:focus-visible .telegram-support-widget__button,
.telegram-support-widget__button:focus-visible {
  outline: 2px solid rgba(255, 122, 0, 0.9);
  outline-offset: 4px;
}
@media (max-width: 720px) {
  .telegram-support-widget-wrap {
    bottom: 16px;
    right: 16px;
  }
  .telegram-support-widget {
    gap: 12px;
    max-width: calc(100vw - 32px);
  }
  .telegram-support-widget__card {
    min-width: 0;
    width: 100%;
    padding: 14px 16px;
  }
}
@media (max-width: 520px) {
  .telegram-support-widget {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 10px;
  }
  .telegram-support-widget__card {
    width: 100%;
    border-radius: 20px;
    padding: 14px 14px;
  }
  .telegram-support-widget__button {
    width: 56px;
    height: 56px;
    min-width: 56px;
  }
}

/* end of animation.css */
