/*
 Theme Name:   TrueTech Group
 Theme URI:    https://truetechgroup.io
 Description:  Custom Astra child theme for TrueTech Group LLC
 Author:       TrueTech Group LLC
 Author URI:   https://truetechgroup.io
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  astra-child
*/

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ast-header-break-point .main-header-bar {
  display: none !important;
}

#ast-scroll-top {
  display: none !important;
}

/* ========== FADE-IN ========== */

.ttg-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.ttg-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== HERO ========== */

.ttg-hero {
  position: relative;
  overflow: hidden;
}

.ttg-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ttg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: ttgOrbFloat 20s ease-in-out infinite;
}

.ttg-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #3b6a8f, transparent 70%);
  top: -15%;
  left: -10%;
  animation-duration: 22s;
}

.ttg-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #2a4d6e, transparent 70%);
  bottom: -10%;
  right: -10%;
  animation-duration: 26s;
  animation-delay: -8s;
}

.ttg-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 18s;
  animation-delay: -4s;
}

@keyframes ttgOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 25px) scale(0.95); }
}

.ttg-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
}

.ttg-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

.ttg-hero-headline {
  min-height: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ttgFadeUp 1s ease 0.3s both;
}

.ttg-hero-headline span {
  display: inline-block;
  background: linear-gradient(135deg, #f8fafc 0%, #3b82f6 50%, #f8fafc 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2, .8, .2, 1), filter 600ms ease;
  will-change: transform, opacity, filter;
}

.ttg-hero-headline span.exit {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
}

.ttg-hero-headline span.enter {
  opacity: 0;
  transform: translateY(-12px);
  filter: blur(10px);
}

.ttg-hero-sub {
  min-height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ttgFadeUp 1s ease 0.45s both;
}

.ttg-hero-sub span {
  display: inline-block;
  color: #94a3b8;
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2, .8, .2, 1), filter 600ms ease;
  will-change: transform, opacity, filter;
}

.ttg-hero-sub span.exit {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(6px);
}

.ttg-hero-sub span.enter {
  opacity: 0;
  transform: translateY(-10px);
  filter: blur(8px);
}

.ttg-hero-cta {
  animation: ttgFadeUp 1s ease 0.6s both;
}

@keyframes ttgFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== SECTION DIVIDER ========== */

.ttg-section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.12), transparent);
}

/* ========== PROGRESSIVE FOOTER ========== */

#ttg-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: #1e293b;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  transition: box-shadow 0.3s ease;
}

#ttg-footer-full {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#ttg-main {
  padding-bottom: 120px;
}

@media (min-width: 768px) {
  #ttg-main {
    padding-bottom: 350px;
  }
}


/* ========== SCROLL TO TOP ========== */

#ttg-scroll-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, border-color 0.2s ease;
}

#ttg-scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#ttg-scroll-top:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #f8fafc;
}

/* ========== CTA BOX ========== */

.ttg-cta-box {
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 40px;
  border-radius: 24px;
  background: linear-gradient(160deg, #111827, #1a2236);
  border: 1px solid rgba(59, 130, 246, 0.12);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

@media (max-width: 640px) {
  .ttg-cta-box {
    padding: 32px 24px;
  }
}

/* ========== REDUCED MOTION ========== */

@media (prefers-reduced-motion: reduce) {
  .ttg-hero-headline span,
  .ttg-hero-sub span,
  .ttg-fade-in,
  .ttg-orb,
  .ttg-hero-headline,
  .ttg-hero-sub,
  .ttg-hero-cta {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
