/* ========================================
   TSN Ventures — Premium Animation System
   Smooth, professional motion design
   ======================================== */

/* ---- Custom Easing Functions ---- */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Page Load Preloader ---- */
.preloader {
  position: fixed;
  inset: 0;
  background: #0d1922;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--ease-smooth), visibility 0.5s var(--ease-smooth);
  overflow: hidden;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px 34px;
  text-align: center;
}

.preloader-brand-mark {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-brand-glow {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: rgba(231, 185, 87, 0.18);
  filter: blur(24px);
  pointer-events: none;
}

.preloader-logo {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoSmoothRotate 3.2s linear infinite;
  will-change: transform;
}

.preloader-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preloader-wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  animation: preloaderTextFade 0.8s var(--ease-out-expo) both;
}

.preloader-wordmark__tsn {
  color: #ffffff;
}

.preloader-wordmark__ventures {
  color: #e7b957;
}

html[data-theme="light"] .preloader {
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 158, 73, 0.08), transparent 22%),
    linear-gradient(180deg, #f5f1e8 0%, #fbf8f2 100%);
}

html[data-theme="light"] .preloader-brand-glow {
  background: rgba(183, 134, 43, 0.12);
}

html[data-theme="light"] .preloader-wordmark__tsn {
  color: #14212c;
}

html[data-theme="light"] .preloader-wordmark__ventures {
  color: #b7862b;
}

body.loaded > :not(.preloader) {
  animation: pageContentReveal 0.5s var(--ease-out-expo) both;
}

@keyframes logoSmoothRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes pageContentReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  .preloader-shell {
    flex-direction: column;
    gap: 18px;
    padding: 24px;
  }

  .preloader-brand-mark,
  .preloader-logo {
    width: 76px;
    height: 76px;
  }

  .preloader-wordmark {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }
}

/* ---- Floating Particles (refined) ---- */
@keyframes float-particle {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
    transform: translate(0, -5px) scale(1);
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translate(calc(var(--drift-x, 20px)), calc(var(--drift-y, -80px))) scale(0);
    opacity: 0;
  }
}

.hero-particle {
  position: absolute;
  background: radial-gradient(circle, rgba(212,168,83,0.8), rgba(212,168,83,0));
  border-radius: 50%;
  pointer-events: none;
  animation: float-particle var(--duration, 8s) var(--ease-smooth) infinite;
  animation-delay: var(--delay, 0s);
}

/* ============================================
   HERO SECTION — Cinematic Entry Sequence
   ============================================ */

/* --- Background Ken Burns effect --- */
.hero-bg img {
  animation: kenBurns 25s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* --- Staggered hero entrance --- */
.hero-label {
  opacity: 0;
  transform: translateY(30px);
  animation: heroElementIn 1s var(--ease-out-expo) 0.3s forwards;
}

.hero h1 {
  opacity: 0;
  transform: translateY(45px);
  animation: heroElementIn 1.2s var(--ease-out-expo) 0.6s forwards;
}

.hero h1 .highlight {
  display: inline;
  background-size: 0% 100%;
  background-image: linear-gradient(to right, rgba(212,168,83,0.15), rgba(212,168,83,0.15));
  background-repeat: no-repeat;
  animation: heroElementIn 1.2s var(--ease-out-expo) 0.6s forwards,
             highlightReveal 0.8s var(--ease-out-expo) 1.6s forwards;
}

.hero p {
  opacity: 0;
  transform: translateY(30px);
  animation: heroElementIn 1s var(--ease-out-expo) 1s forwards;
}

.hero-btns {
  opacity: 0;
  transform: translateY(25px);
  animation: heroElementIn 0.8s var(--ease-out-expo) 1.3s forwards;
}

.hero-stats {
  opacity: 0;
  transform: translateY(30px);
  animation: heroElementIn 0.8s var(--ease-out-expo) 1.6s forwards;
}

@keyframes heroElementIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes highlightReveal {
  to {
    background-size: 100% 100%;
  }
}

/* --- Hero stat glow on hover --- */
.hero-stat {
  transition: transform 0.4s var(--ease-out-expo),
              background 0.4s ease;
}

.hero-stat:hover {
  transform: translateY(-4px);
  background: rgba(212,168,83,0.08);
}

/* ============================================
   SCROLL REVEAL SYSTEM — Smooth & Layered
   ============================================ */

/* Base reveal: fade up */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

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

/* Reveal from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s var(--ease-out-expo),
              transform 0.9s var(--ease-out-expo);
  will-change: opacity, transform;
}

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

/* Reveal from right */
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.9s var(--ease-out-expo),
              transform 0.9s var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal with scale */
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ---- Stagger children — smooth cascade ---- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
  will-change: opacity, transform;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }

/* ============================================
   CARD INTERACTIVITY — 3D & Glow Effects
   ============================================ */

/* Service card hover lift */
.service-card {
  transition: transform 0.5s var(--ease-out-expo),
              box-shadow 0.5s var(--ease-out-expo);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12),
              0 0 0 1px rgba(212,168,83,0.1);
}

.service-card .service-icon {
  transition: transform 0.5s var(--ease-spring),
              background 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.12) rotate(-3deg);
}

/* Blog card smooth zoom */
.blog-card {
  transition: transform 0.5s var(--ease-out-expo),
              box-shadow 0.5s var(--ease-out-expo);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 45px rgba(0,0,0,0.1);
}

.blog-card .blog-img img {
  transition: transform 0.8s var(--ease-out-expo);
}

.blog-card:hover .blog-img img {
  transform: scale(1.06);
}

/* Stat item hover glow */
.stat-item {
  transition: transform 0.5s var(--ease-out-expo),
              box-shadow 0.5s var(--ease-out-expo),
              border-color 0.5s ease;
}

.stat-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 40px rgba(26,86,50,0.08);
  border-color: rgba(212,168,83,0.3) !important;
}

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */

.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out-expo),
              box-shadow 0.3s var(--ease-out-expo),
              background 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* Ripple effect */
.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 10%, transparent 10.01%);
  transform: scale(10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.6s;
  pointer-events: none;
}

.btn:active::after {
  transform: scale(0);
  opacity: 0.3;
  transition: 0s;
}

/* ============================================
   NAVBAR — Glassmorphism Transition
   ============================================ */

.navbar {
  transition: background 0.4s var(--ease-smooth),
              backdrop-filter 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth),
              padding 0.4s var(--ease-smooth);
}

/* Nav link hover */
.nav-links a {
  position: relative;
  transition: color 0.3s var(--ease-smooth);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out-expo),
              left 0.4s var(--ease-out-expo);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
  left: 0;
}

/* ============================================
   AUTO-SCROLL CAROUSEL — Smooth Infinite
   ============================================ */

@keyframes autoScrollCarousel {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.auto-scroll-track {
  animation: autoScrollCarousel var(--scroll-speed, 35s) linear infinite;
}

.auto-scroll-wrapper:hover .auto-scroll-track {
  animation-play-state: paused;
}

.auto-scroll-item {
  transition: transform 0.5s var(--ease-out-expo);
}

.auto-scroll-item:hover {
  transform: scale(1.03);
  z-index: 2;
}

.auto-scroll-item .overlay {
  opacity: 0;
  transition: opacity 0.4s var(--ease-smooth);
}

.auto-scroll-item:hover .overlay {
  opacity: 1;
}

/* ============================================
   TESTIMONIAL SLIDER — Crossfade
   ============================================ */

.testimonial-item {
  opacity: 0;
  transform: translateY(15px) scale(0.97);
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.6s var(--ease-out-expo);
  position: absolute;
  width: 100%;
}

.testimonial-item.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  position: relative;
}

.testimonial-dots .dot {
  transition: background 0.3s var(--ease-smooth),
              transform 0.3s var(--ease-spring),
              width 0.3s var(--ease-out-expo);
}

.testimonial-dots .dot.active {
  transform: scale(1.2);
}

/* ============================================
   PAGE HEADER — Parallax Text
   ============================================ */

.page-header h1 {
  animation: pageHeaderIn 0.8s var(--ease-out-expo) 0.1s both;
}

.page-header .breadcrumb {
  animation: pageHeaderIn 0.8s var(--ease-out-expo) 0.3s both;
}

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

/* ============================================
   SECTION LABEL — Animated Underline
   ============================================ */

.section-label {
  position: relative;
  display: inline-block;
}

.revealed .section-label::after,
.section-label::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 2px;
  background: var(--accent);
  width: 0;
  transition: width 0.8s var(--ease-out-expo) 0.3s;
}

.revealed .section-label::after {
  width: 100%;
}

/* ============================================
   CTA BANNER — Animated Gradient Background
   ============================================ */

.cta-banner {
  background-size: 300% 300%;
  animation: ctaGradient 8s ease infinite;
}

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

/* ============================================
   FORM INPUTS — Focus Animations
   ============================================ */

#contactForm input,
#contactForm select,
#contactForm textarea {
  transition: border-color 0.3s var(--ease-smooth),
              box-shadow 0.3s var(--ease-smooth),
              background 0.3s var(--ease-smooth);
}

#contactForm input:focus,
#contactForm select:focus,
#contactForm textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(212,168,83,0.15) !important;
  background: rgba(255,255,255,0.12) !important;
  outline: none;
}

/* ============================================
   FOOTER — Staggered Entry
   ============================================ */

.footer-about,
.footer-col {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

.footer.revealed .footer-about { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.footer.revealed .footer-col:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.footer.revealed .footer-col:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.footer.revealed .footer-col:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* Social icons hover */
.footer-social a {
  transition: transform 0.3s var(--ease-spring),
              background 0.3s ease,
              color 0.3s ease;
}

.footer-social a:hover {
  transform: translateY(-4px) scale(1.1);
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */

.whatsapp-btn {
  animation: whatsappEntry 0.6s var(--ease-spring) 2s both;
}

@keyframes whatsappEntry {
  from {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.whatsapp-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 25px rgba(37,211,102,0.4);
}

/* ============================================
   SMOOTH SCROLL BEHAVIOR
   ============================================ */

html {
  scroll-behavior: smooth;
}

/* ============================================
   PERFORMANCE — Reduce Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .preloader,
  .preloader.hidden {
    transition-duration: 0.35s !important;
  }

  .preloader-logo,
  .preloader-wordmark,
  body.loaded > :not(.preloader) {
    animation: none !important;
  }

  .preloader-wordmark,
  body.loaded > :not(.preloader) {
    transition: opacity 0.35s ease !important;
  }
}

/* ============================================
   COUNTER ANIMATION SUPPORT
   ============================================ */

.counter-animated {
  transition: all 0.3s ease;
}

/* ============================================
   MISC KEYFRAMES (shared across pages)
   ============================================ */

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

.float {
  animation: float 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* ---- Page transition overlay ---- */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 99999;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
}

.page-transition.active {
  transform: scaleY(1);
  transform-origin: top;
}


/* ========================================
   TSN Ventures — Homepage Redesign Animations
   ======================================== */

.hero-premium-orb {
  animation: premiumOrbFloat 10s ease-in-out infinite;
}

.hero-premium-orb--two {
  animation-delay: 1.6s;
}

.hero-premium-pill,
.hero-premium-tags,
.hero-premium-title,
.hero-premium-lead,
.hero-premium-proof,
.hero-premium-actions,
.hero-quick-discovery {
  opacity: 0;
  transform: translateY(28px);
}

.hero-premium-pill { animation: premiumFadeUp 0.9s var(--ease-out-expo) 0.2s forwards; }
.hero-premium-tags { animation: premiumFadeUp 0.9s var(--ease-out-expo) 0.38s forwards; }
.hero-premium-title { animation: premiumFadeUp 1.1s var(--ease-out-expo) 0.58s forwards; }
.hero-premium-lead { animation: premiumFadeUp 0.95s var(--ease-out-expo) 0.82s forwards; }
.hero-premium-proof { animation: premiumFadeUp 0.95s var(--ease-out-expo) 1.02s forwards; }
.hero-premium-actions { animation: premiumFadeUp 0.95s var(--ease-out-expo) 1.18s forwards; }
.hero-quick-discovery { animation: premiumFadeUp 0.95s var(--ease-out-expo) 1.34s forwards; }

.hero-premium-panel {
  opacity: 0;
  transform: translateX(36px);
  animation: premiumPanelIn 1s var(--ease-out-expo) 0.82s forwards;
}

.hero-proof-pill,
.home-discovery-summary__item {
  animation: subtleFloat 7s ease-in-out infinite;
}

.hero-proof-pill:nth-child(2),
.home-discovery-summary__item:nth-child(2) { animation-delay: 0.6s; }
.hero-proof-pill:nth-child(3),
.home-discovery-summary__item:nth-child(3) { animation-delay: 1.2s; }
.hero-proof-pill:nth-child(4),
.home-discovery-summary__item:nth-child(4) { animation-delay: 1.8s; }
.home-discovery-summary__item:nth-child(5) { animation-delay: 2.4s; }

.hero-stage-card,
.home-trust-card,
.home-trust-flow__item,
.home-discovery-card {
  transition: transform 0.55s var(--ease-out-expo), box-shadow 0.55s var(--ease-out-expo), border-color 0.4s ease, background 0.4s ease;
}

.hero-stage-card:hover,
.home-trust-card:hover,
.home-trust-flow__item:hover,
.home-discovery-card:hover {
  transform: translateY(-8px);
}

.hero-premium-marquee__track {
  animation: premiumMarquee 26s linear infinite;
}

.hero-premium:hover .hero-premium-marquee__track {
  animation-play-state: paused;
}

.home-discovery-card__media::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 15%, rgba(255,255,255,0.18) 50%, transparent 82%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease-out-expo);
  z-index: 1;
}

.home-discovery-card:hover .home-discovery-card__media::before {
  transform: translateX(120%);
}

.hero-quick-chip,
.discovery-chip,
.hero-action,
.home-discovery-card__map,
.hero-panel-links a {
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo), color 0.35s ease, background 0.35s ease;
}

.hero-quick-chip:hover,
.discovery-chip:hover,
.hero-action:hover,
.home-discovery-card__map:hover,
.hero-panel-links a:hover {
  transform: translateY(-2px);
}

@keyframes premiumFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes premiumPanelIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes premiumOrbFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -18px, 0) scale(1.04); }
}

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

@keyframes premiumMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-premium-pill,
  .hero-premium-tags,
  .hero-premium-title,
  .hero-premium-lead,
  .hero-premium-proof,
  .hero-premium-actions,
  .hero-quick-discovery,
  .hero-premium-panel {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ========================================
   Homepage Refinement Animations
   ======================================== */

.hero-premium-title {
  animation: none;
}

.hero-premium-line {
  opacity: 0;
  transform: translateY(36px);
}

.hero-premium-line:nth-child(1) {
  animation: premiumLineIn 0.95s var(--ease-out-expo) 0.56s forwards;
}

.hero-premium-line:nth-child(2) {
  animation: premiumLineIn 1s var(--ease-out-expo) 0.78s forwards;
}

.hero-premium-line:nth-child(3) {
  animation: premiumLineIn 1s var(--ease-out-expo) 1s forwards;
}

.hero-identity-pill,
.hero-floating-card {
  opacity: 0;
  transform: translateY(24px);
  animation: premiumFadeUp 0.95s var(--ease-out-expo) forwards;
}

.hero-identity-pill:nth-child(1) { animation-delay: 0.96s; }
.hero-identity-pill:nth-child(2) { animation-delay: 1.08s; }
.hero-identity-pill:nth-child(3) { animation-delay: 1.2s; }
.hero-floating-card--one { animation-delay: 1.18s; }
.hero-floating-card--two { animation-delay: 1.32s; }

.hero-identity-pill {
  animation-name: premiumFadeUp, subtleFloat;
  animation-duration: 0.95s, 7.2s;
  animation-timing-function: var(--ease-out-expo), ease-in-out;
  animation-delay: 0.96s, 2s;
  animation-fill-mode: forwards, both;
  animation-iteration-count: 1, infinite;
}

.hero-identity-pill:nth-child(2) {
  animation-delay: 1.08s, 2.2s;
}

.hero-identity-pill:nth-child(3) {
  animation-delay: 1.2s, 2.4s;
}

.hero-floating-card {
  animation-name: premiumFadeUp, premiumFloatCard;
  animation-duration: 0.95s, 8s;
  animation-timing-function: var(--ease-out-expo), ease-in-out;
  animation-delay: 1.18s, 2.8s;
  animation-fill-mode: forwards, both;
  animation-iteration-count: 1, infinite;
}

.hero-floating-card--two {
  animation-delay: 1.32s, 3.2s;
}

.home-discovery-summary__item strong,
.hero-proof-pill strong {
  animation: numberPulse 5.6s ease-in-out infinite;
}

@keyframes premiumLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes premiumFloatCard {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}

@keyframes numberPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-premium-line,
  .hero-identity-pill,
  .hero-floating-card {
    opacity: 1 !important;
    transform: none !important;
  }
}


.hero-premium .hero-bg img {
  animation: heroBackdropScale 18s ease-in-out infinite alternate;
}

.hero-premium-grid {
  animation: premiumGridDrift 22s linear infinite;
}

.hero-premium-panel {
  animation: premiumPanelIn 1s var(--ease-out-expo) 0.82s forwards, premiumFloatCard 8s ease-in-out 2.8s infinite;
}

.hero-stage-card:hover,
.home-trust-card:hover,
.home-trust-flow__item:hover,
.home-discovery-card:hover {
  transform: perspective(1200px) rotateX(var(--card-tilt-x, 0deg)) rotateY(var(--card-tilt-y, 0deg)) translateY(var(--card-lift, -10px));
}

@keyframes heroBackdropScale {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.08) rotate(-1deg); }
}

@keyframes premiumGridDrift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-12px, 8px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ========================================
   TSN Ventures — Shared Motion Runtime
   Reusable primitives for the static site
   ======================================== */

:root {
  --tsn-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --tsn-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --tsn-card-glow-dark: 0 18px 44px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(244, 202, 88, 0.1);
  --tsn-card-glow-light: 0 18px 44px rgba(20, 33, 44, 0.12), 0 0 0 1px rgba(212, 168, 83, 0.18);
  --tsn-button-glow-dark: 0 18px 40px rgba(212, 168, 83, 0.16);
  --tsn-button-glow-light: 0 14px 32px rgba(212, 168, 83, 0.18);
}

[data-animated-section],
[data-animated-card],
.tsn-motion-target {
  --tsn-translate-x: 0px;
  --tsn-translate-y: var(--tsn-motion-distance, 28px);
  --tsn-scale: 1;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(var(--tsn-translate-x), var(--tsn-translate-y), 0) scale(var(--tsn-scale));
  transition:
    opacity var(--tsn-motion-duration, 860ms) var(--tsn-motion-easing, var(--tsn-ease-out)),
    transform var(--tsn-motion-duration, 860ms) var(--tsn-motion-easing, var(--tsn-ease-out)),
    box-shadow 320ms var(--tsn-ease-smooth),
    border-color 320ms var(--tsn-ease-smooth);
  transition-delay: var(--tsn-motion-delay, 0ms);
  will-change: opacity, transform;
}

[data-motion-direction="left"] {
  --tsn-translate-x: calc(var(--tsn-motion-distance, 28px) * -1);
  --tsn-translate-y: 8px;
}

[data-motion-direction="right"] {
  --tsn-translate-x: var(--tsn-motion-distance, 28px);
  --tsn-translate-y: 8px;
}

[data-motion-direction="down"] {
  --tsn-translate-y: calc(var(--tsn-motion-distance, 28px) * -1);
}

[data-motion-direction="scale"] {
  --tsn-translate-y: 14px;
  --tsn-scale: 0.95;
}

.tsn-motion-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
}

.tsn-motion-heading {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.tsn-animated-heading__line {
  display: block;
  overflow: hidden;
}

.tsn-animated-heading__line-inner {
  display: block;
  opacity: 0;
  transform: translate3d(var(--tsn-line-x, -24px), var(--tsn-line-y, 18px), 0);
  transition:
    opacity var(--tsn-motion-duration, 980ms) var(--tsn-motion-easing, var(--tsn-ease-out)),
    transform var(--tsn-motion-duration, 980ms) var(--tsn-motion-easing, var(--tsn-ease-out));
  transition-delay: calc(var(--tsn-motion-delay, 0ms) + var(--tsn-line-delay, 0ms));
  will-change: opacity, transform;
}

.tsn-motion-visible .tsn-animated-heading__line-inner {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.tsn-floating-element {
  animation: tsnFloatingDrift var(--tsn-floating-duration, 5200ms) ease-in-out infinite;
  animation-delay: var(--tsn-floating-delay, 0ms);
  will-change: transform, opacity;
}

.tsn-floating-static {
  animation: none !important;
}

.tsn-particle-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: var(--tsn-particle-opacity, 0.72);
}

[data-particle-background] {
  position: relative;
  isolation: isolate;
}

.tsn-home-redesign .home-rdx-title span {
  background-image: linear-gradient(120deg, #f8d77f 0%, #fff0b7 28%, #f4ca58 58%, #a1d6ff 100%);
  background-size: 220% 100%;
  background-position: 0 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: tsnGradientShift 9s ease-in-out infinite;
  text-shadow: none;
}

.tsn-home-redesign .home-rdx-actions .home-rdx-btn,
.ventures-rdx-showcase__actions .btn,
.ventures-rdx-cta__actions .btn,
.home-rdx-feature-row__actions .btn,
.ventures-rdx-feature-row__actions .btn,
.home-rdx-cta__actions .btn,
.venture-rdx-enquiry-actions .btn,
.venture-rdx-hero__actions .btn,
.services-feature-row__actions .btn,
.cta-banner .btn,
.theme-switch,
.btn {
  transition:
    transform 320ms var(--tsn-ease-smooth),
    box-shadow 320ms var(--tsn-ease-smooth),
    border-color 320ms var(--tsn-ease-smooth),
    background-color 320ms var(--tsn-ease-smooth),
    color 320ms var(--tsn-ease-smooth);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover,
  .theme-switch:hover {
    transform: translateY(-2px);
  }

  html[data-theme="dark"] .btn:hover,
  html[data-theme="dark"] .theme-switch:hover {
    box-shadow: var(--tsn-button-glow-dark);
  }

  html[data-theme="light"] .btn:hover,
  html[data-theme="light"] .theme-switch:hover {
    box-shadow: var(--tsn-button-glow-light);
  }

  [data-animated-card]:hover,
  .tsn-motion-card:hover {
    transform: translate3d(0, -8px, 0) scale(1.01);
  }

  html[data-theme="dark"] [data-animated-card]:hover,
  html[data-theme="dark"] .tsn-motion-card:hover {
    box-shadow: var(--tsn-card-glow-dark);
    border-color: rgba(244, 202, 88, 0.18);
  }

  html[data-theme="light"] [data-animated-card]:hover,
  html[data-theme="light"] .tsn-motion-card:hover {
    box-shadow: var(--tsn-card-glow-light);
    border-color: rgba(212, 168, 83, 0.2);
  }
}

@keyframes tsnFloatingDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.9;
  }
  50% {
    transform: translate3d(0, -10px, 0);
    opacity: 1;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  [data-animated-section],
  [data-animated-card],
  .tsn-motion-target,
  .tsn-animated-heading__line-inner {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
  }

  .tsn-floating-element,
  .tsn-home-redesign .home-rdx-title span {
    animation: none !important;
  }

  .tsn-particle-background {
    display: none !important;
  }
}
