/* Triumphs Global - Gen Z Premium Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;

  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-blue-deep: #0a192f;
  --accent-blue-light: #1d4ed8;
  --accent-gold: #FFB300;
  --accent-gold-hover: #FFA000;
  --accent-neon: #facc15;
  --accent-purple: #a855f7;
  --accent-cyan: #06b6d4;

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --input-bg: #ffffff;
  --input-border: #cbd5e1;

  --neon-glow: 0 0 20px rgba(250, 204, 21, 0.4), 0 0 60px rgba(250, 204, 21, 0.15);
  --neon-glow-blue: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 60px rgba(59, 130, 246, 0.15);
}

html.dark {
  --bg-primary: #060b14;
  --bg-secondary: #0a1220;
  --bg-tertiary: #0f1a2e;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-blue-deep: #020617;
  --accent-blue-light: #3b82f6;
  --accent-gold: #f59e0b;
  --accent-gold-hover: #fbbf24;
  --glass-bg: rgba(10, 18, 32, 0.75);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --input-bg: #0f1a2e;
  --input-border: #1e293b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #FFB300, #f59e0b, #a855f7, #06b6d4);
  background-size: 200% 100%;
  z-index: 9999;
  transition: width 0.1s linear;
  animation: progressGradient 3s linear infinite;
}

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

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FFB300, #a855f7);
  border-radius: 99px;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, #FFB300 0%, #f97316 50%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
  background-size: 200% 200%;
}

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

/* ===== GLASSMORPHISM ===== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,179,0,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.glass-card:hover::before { opacity: 1; }

.glass-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(250, 204, 21, 0.35);
  box-shadow: 0 25px 50px -15px rgba(250, 204, 21, 0.12),
              0 0 0 1px rgba(250, 204, 21, 0.1);
}

/* ===== HERO SECTION ===== */
.hero-grid {
  position: relative;
  background-image:
    radial-gradient(ellipse at 10% 20%, rgba(29, 78, 216, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(250, 204, 21, 0.03) 0%, transparent 60%);
}

.dark .hero-grid {
  background-image:
    radial-gradient(ellipse at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(250, 204, 21, 0.05) 0%, transparent 60%);
}

/* ===== ANIMATED BLOB BACKGROUND ===== */
.blob-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: blobFloat 8s ease-in-out infinite;
}

.dark .blob { opacity: 0.18; }

.blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #3b82f6, #1d4ed8);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
  animation-duration: 10s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #a855f7, #7c3aed);
  bottom: -150px;
  right: -100px;
  animation-delay: -3s;
  animation-duration: 12s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #FFB300, #f97316);
  top: 40%;
  left: 50%;
  animation-delay: -6s;
  animation-duration: 9s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(40px, 10px) scale(1.02); }
}

/* ===== TYPEWRITER CURSOR ===== */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #FFB300;
  margin-left: 4px;
  vertical-align: middle;
  border-radius: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== NEON GLOW BUTTONS ===== */
.btn-neon {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-neon::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #FFB300, #f97316, #a855f7, #06b6d4);
  background-size: 300% 300%;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: neonRotate 3s linear infinite;
}

.btn-neon:hover::after { opacity: 1; }
.btn-neon:hover {
  box-shadow: var(--neon-glow);
  transform: translateY(-2px) scale(1.02);
}

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

/* ===== FLOATING BADGE ANIMATION ===== */
.badge-float {
  animation: badgeFloat 3s ease-in-out infinite;
}

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

/* ===== STAT COUNTER ===== */
.stat-number {
  font-family: var(--font-display);
  background: linear-gradient(135deg, #FFB300, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s;
}

/* ===== HERO CARD HOVER ===== */
.hero-card-hover {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.hero-card-hover:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 30px 60px -20px rgba(250, 204, 21, 0.2);
}

/* ===== STEP CIRCLE PULSE ===== */
.step-circle {
  position: relative;
}

.step-circle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0;
  animation: stepPulse 2.5s ease-out infinite;
}

@keyframes stepPulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ===== SERVICE CARD ICON BOUNCE ===== */
.service-icon {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover .service-icon {
  transform: scale(1.2) rotate(-5deg);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* ===== TAB PANE ===== */
.tab-pane {
  display: none;
  opacity: 0;
  transform: scale(0.98) translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.tab-pane.active {
  display: block;
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader-logo {
  margin-bottom: 2rem;
  animation: logoPulse 2s infinite ease-in-out;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: #FFB300;
  border-right-color: #a855f7;
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* ===== CONFETTI PARTICLE ===== */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9998;
  animation: confettiFall var(--duration, 2s) ease-in forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) translateX(var(--drift, 0px));
    opacity: 0;
  }
}

/* ===== SECTION LABEL PILL ===== */
.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(250,204,21,0.12), rgba(168,85,247,0.08));
  border: 1px solid rgba(250,204,21,0.2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f59e0b;
}

.dark .section-pill {
  background: linear-gradient(135deg, rgba(250,204,21,0.1), rgba(168,85,247,0.06));
  border-color: rgba(250,204,21,0.15);
}

/* ===== FAQ ACCORDION ===== */
.faq-header {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.faq-header:hover { color: #FFB300; }

/* ===== FOCUS ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #FFB300;
  outline-offset: 3px;
}

/* ===== CHAT WIDGET ===== */
#chat-messages-container::-webkit-scrollbar { width: 3px; }
#chat-messages-container::-webkit-scrollbar-track { background: transparent; }
#chat-messages-container::-webkit-scrollbar-thumb {
  background: rgba(250,204,21,0.3);
  border-radius: 99px;
}

#chat-widget-container {
  pointer-events: none !important;
}

#chat-toggle-btn,
#chat-window.active,
#chat-window.active * {
  pointer-events: auto !important;
}

#chat-toggle-btn {
  pointer-events: auto !important;
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4);
  animation: chatPulse 2s ease-out infinite;
}

@keyframes chatPulse {
  0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(250, 204, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

#chat-window.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

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

/* ===== DARK MODE LOGO ===== */
html.dark #main-header img[alt="Triumphs Global"] {
  filter: brightness(0) invert(1);
}

/* ===== MOBILE NAV ===== */
#mobile-nav {
  top: 72px;
  background: rgba(6, 11, 20, 0.97) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

html:not(.dark) #mobile-nav {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(28px) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1) !important;
}

#mobile-nav nav { padding-top: 2.5rem; }

#mobile-nav a {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.4rem;
  padding: 0.75rem 2.5rem;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: inline-block;
  min-height: 48px;
  line-height: 48px;
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
}

html:not(.dark) #mobile-nav a { color: #0f172a !important; }

#mobile-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #FFB300, #a855f7);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

#mobile-nav a:hover::after { transform: translateX(-50%) scaleX(1); }
#mobile-nav a:hover {
  color: #FFB300 !important;
  background: rgba(255, 179, 0, 0.08);
  transform: translateY(-1px);
}

/* ===== TOUCH / MOBILE ===== */
a, button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (max-width: 640px) {
  section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  h1 { font-size: 2rem; line-height: 1.2; }
  h2 { font-size: 1.6rem; line-height: 1.3; }

  .glass-card { padding: 1.25rem; }

  input, textarea, select {
    font-size: 16px !important;
    padding: 0.875rem 1rem;
  }

  footer .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  #scroll-top-btn {
    padding: 0.5rem;
    bottom: 1rem;
    left: 1rem;
  }

  #chat-widget-container {
    bottom: 1rem;
    right: 1rem;
  }

  #chat-toggle-btn {
    width: 3rem;
    height: 3rem;
  }

  #trendsChart { height: 200px !important; }
}

@media (min-width: 641px) and (max-width: 1023px) {
  h1 { font-size: 2.5rem; }
}

@media (hover: none) {
  .glass-card:hover {
    transform: none;
    box-shadow: var(--glass-shadow);
  }
  .glass-card:active { transform: scale(0.98); }
}

@media (max-width: 1280px) {
  .mobile-nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  button, [role="button"] {
    min-height: 48px;
    min-width: 48px;
  }

  #contact-form input,
  #contact-form textarea,
  #contact-form select {
    font-size: 16px !important;
    min-height: 52px;
    padding: 1rem !important;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 12px;
  }

  #contact-form textarea { min-height: 120px; }
  #contact-submit-btn { min-height: 56px; font-size: 1rem; }

  .faq-header {
    min-height: 60px !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  footer a {
    display: block;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    min-height: 44px;
  }

  #newsletter-form input {
    font-size: 16px !important;
    min-height: 48px;
  }

  a[href="#contact"].hero-cta, .hero-cta {
    min-height: 56px;
    font-size: 1rem;
  }
}

/* ===== GRADIENT BORDER ANIMATION ===== */
.gradient-border {
  position: relative;
  background: var(--glass-bg);
  border-radius: 1.5rem;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #FFB300, #f97316, #a855f7, #06b6d4, #FFB300);
  background-size: 300% 300%;
  z-index: -1;
  animation: borderSpin 4s linear infinite;
}

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

/* ===== FLOATING EMOJI / ICONS ===== */
@keyframes floatUp {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-80px) scale(0.5); opacity: 0; }
}

/* ===== GRID DOT PATTERN ===== */
.dot-grid {
  background-image: radial-gradient(circle, rgba(100,116,139,0.12) 1px, transparent 1px);
  background-size: 28px 28px;
}

.dark .dot-grid {
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
}