/* Lone Star International - motion layer
   KES-style dynamic feel implemented in pure CSS/JS, LSI navy branding kept.
   Loaded AFTER style.css. Degrades gracefully and respects reduced motion. */

/* ---------- Scroll-triggered reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.7, 0.2, 1),
              transform 0.7s cubic-bezier(0.22, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

.reveal-left  { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }
.reveal-scale { transform: scale(0.96); }
.reveal-left.in, .reveal-right.in, .reveal-scale.in { transform: none; }

/* ---------- Hero intro (on load) ---------- */
.hero-inner > * {
  opacity: 0;
  transform: translateY(22px);
  animation: lsiHeroIn 0.9s cubic-bezier(0.22, 0.7, 0.2, 1) forwards;
}
/* the headline reveals word-by-word (motion.js), so don't fade it as a block */
.hero-inner > h1 { opacity: 1; transform: none; animation: none; }
.hero-inner > *:nth-child(1) { animation-delay: 0.10s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.22s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.36s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.50s; }
@keyframes lsiHeroIn { to { opacity: 1; transform: none; } }

/* ---------- Magnetic buttons ---------- */
.btn { will-change: transform; }

/* ---------- Sector strip ---------- */
.strip { padding: 30px 0; border-bottom: 1px solid var(--line); background: var(--white); }

/* ---------- Client / sector logos marquee ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  font-size: 1.05rem; color: var(--slate); opacity: 0.62; white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Three.js WebGL hero layer ----------
   Sits above the hero photo (::before) and navy overlay (::after) but below the
   hero text (.hero-inner is z-index:2). Added by js/hero3d.js only when WebGL +
   motion are OK; screen blend lets the bright particles glow over the navy. */
.hero-3d {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity 1.6s ease;
  mix-blend-mode: screen;
}
.hero-3d.ready { opacity: 0.92; }
.hero-3d canvas { width: 100% !important; height: 100% !important; display: block; }

/* ---------- Sticky nav condense on scroll ---------- */
.site-header { transition: box-shadow 0.3s ease, background-color 0.3s ease; }
.site-header .nav { transition: height 0.3s ease; }
.site-header.condensed {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 24px rgba(1, 32, 58, 0.10);
}
.site-header.condensed .nav { height: 60px; }
.site-header.condensed .brand img { height: 38px; transition: height 0.3s ease; }
.brand img { transition: height 0.3s ease; }

/* ---------- Card hover motion (smoothed; complements style.css) ---------- */
.card { transition: transform 0.28s cubic-bezier(0.22, 0.7, 0.2, 1), box-shadow 0.28s ease, border-color 0.28s ease; }
.card:hover { border-color: rgba(17, 109, 255, 0.35); }
.card .ico { transition: transform 0.28s cubic-bezier(0.22, 0.7, 0.2, 1), background-color 0.28s ease; }
.card:hover .ico { transform: translateY(-2px) scale(1.06); }

/* subtle media zoom on pillar images */
.pillar-media img { transition: transform 0.6s cubic-bezier(0.22, 0.7, 0.2, 1); }
.pillar-media:hover img { transform: scale(1.04); }

/* ---------- Animated counter accent ---------- */
.stat .num { transition: color 0.3s ease; }
.stats.counting .stat .num { color: var(--blue-bright); }

/* ---------- Scroll-to-top button ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 8px 22px rgba(1, 32, 58, 0.28);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--blue); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Draft-content note (new pages) ---------- */
.draft-note {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(17, 109, 255, 0.10); color: var(--blue-dark);
  border: 1px solid rgba(17, 109, 255, 0.30);
  border-radius: 999px; padding: 7px 16px;
  font-size: 0.84rem; font-weight: 600; letter-spacing: 0.3px;
  margin-bottom: 18px;
}
.draft-note::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); flex: none;
}
.section-dark .draft-note { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.22); }

/* ---------- Timeline (Projects / Track Record) ---------- */
.timeline { position: relative; margin: 8px 0 0; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--blue), rgba(17,109,255,0.15));
}
.tl-item { position: relative; margin-bottom: 30px; }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue);
}
.tl-item h3 { margin-bottom: 0.25em; }
.tl-item .when { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); font-size: 0.92rem; }
.tl-item p { color: var(--muted); margin: 6px 0 0; }

/* ---------- Team / Leadership cards ---------- */
.person { text-align: center; }
.person .avatar {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 2rem; letter-spacing: 1px;
  color: #fff; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  box-shadow: var(--shadow);
}
.person h3 { margin: 0 0 2px; }
.person .role { color: var(--blue); font-weight: 600; font-size: 0.95rem; margin: 0 0 10px; }
.person p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Nav fit for the expanded 8-item bar ---------- */
.nav-links { gap: 22px; }
@media (max-width: 1180px) and (min-width: 981px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.96rem; letter-spacing: 0.6px; }
  .nav-links .nav-cta a { padding: 10px 18px; }
}
/* keep mobile dropdown flush under the header when condensed */
@media (max-width: 980px) {
  .site-header.condensed .nav-links { top: 60px; }
}

/* ---------- Reduced motion: disable non-essential motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-inner > * { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero h1 .word > span { transform: none !important; transition: none !important; }
  .card, .card .ico, .pillar-media img, .site-header, .site-header .nav, .brand img { transition: none !important; }
  .card:hover .ico, .pillar-media:hover img { transform: none !important; }
  .to-top { transition: opacity 0.001s linear; }
  .hero-3d { display: none !important; }
  .scroll-cue .mouse::after { animation: none !important; }
  .marquee-track { animation: none !important; }
  .btn { transform: none !important; }
  html { scroll-behavior: auto; }
}
