/* =====================================================================
   SWS FSPL - unified site theme
   Used by: index, services, journey, team, gallery, kcenter, grivience
   Sections: 1 tokens | 2 header/menu | 3 scroll-reveal animation system
             4 headings | 5 images | 6 buttons & forms | 7 footer | 8 a11y
   ===================================================================== */

/* ---------- 1. tokens ---------- */
:root {
  --sws-navy: #0a2540;
  --sws-navy-soft: #16365c;
  --sws-blue: #03a4ed;
  --sws-red: #fe3f40;
  --sws-gold: #c9a24a;
  --sws-text: #333;
  --sws-muted: #667085;
  --sws-card: #fff;
  --sws-section: #f5f7fb;
  --sws-ease: cubic-bezier(.22, .61, .36, 1);
}
.hl-blue { color: var(--sws-blue); }
.hl-red  { color: var(--sws-red); }

/* ---------- 2. header / menu (was copy-pasted in every page) ---------- */
.header-area .main-nav .nav > li > a,
.header-area.header-sticky .main-nav .nav > li > a,
.header-area .main-nav .nav > li.submenu > a {
  color: #000 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.header-area .main-nav .nav > li > a:hover { color: var(--sws-navy) !important; }
.header-area .main-nav .nav li.submenu ul {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, .06);
}
.header-area .main-nav .nav li.submenu ul li a { color: #000 !important; }
.header-area .main-nav .nav li.submenu ul li a:hover {
  background: rgba(0, 0, 0, .05);
  color: #000 !important;
}
.header-area { position: sticky; top: 0; z-index: 1000; }
@media (max-width: 991px) {
  .header-area .main-nav .nav > li > a,
  .header-area .main-nav .nav li.submenu ul li a { color: #000 !important; }
  .header-area .main-nav .nav li.submenu ul { background: #fff !important; }
}

/* ---------- 3. scroll-reveal animation system ----------
   .reveal            one element animates in (fade + rise)
   .reveal-left/right/top/zoom   other directions
   .reveal-group      every direct child animates in, staggered
   .reveal-trigger    only adds .in-view (for custom inner animation)
   --d                optional per-element delay, e.g. style="--d:200ms"
   Content is only hidden while <html> has .sws-js, so nothing is lost if JS fails. */
.reveal, .reveal-group { --dx: 48px; --dy: 30px; }

.sws-js .reveal { opacity: 0; }
.sws-js .reveal.in-view {
  opacity: 1;
  animation: swsUp .75s var(--sws-ease) var(--d, 0ms) backwards;
}
.sws-js .reveal.reveal-left.in-view  { animation-name: swsLeft; }
.sws-js .reveal.reveal-right.in-view { animation-name: swsRight; }
.sws-js .reveal.reveal-top.in-view   { animation-name: swsDown; }
.sws-js .reveal.reveal-zoom.in-view  { animation-name: swsZoom; }

.sws-js .reveal-group > * { opacity: 0; }
.sws-js .reveal-group.in-view > * {
  opacity: 1;
  animation: swsUp .75s var(--sws-ease) var(--d, 0ms) backwards;
}
/* big headings get a blur-in text effect */
.sws-js .reveal-group.in-view > h2 { animation-name: swsBlur; animation-duration: .95s; }

.reveal-group.in-view > :nth-child(1) { --d: 0ms; }
.reveal-group.in-view > :nth-child(2) { --d: 90ms; }
.reveal-group.in-view > :nth-child(3) { --d: 180ms; }
.reveal-group.in-view > :nth-child(4) { --d: 270ms; }
.reveal-group.in-view > :nth-child(5) { --d: 360ms; }
.reveal-group.in-view > :nth-child(6) { --d: 450ms; }
.reveal-group.in-view > :nth-child(7) { --d: 540ms; }
.reveal-group.in-view > :nth-child(8) { --d: 630ms; }
.reveal-group.in-view > :nth-child(9) { --d: 720ms; }
.reveal-group.in-view > :nth-child(10) { --d: 810ms; }
.reveal-group.in-view > :nth-child(11) { --d: 900ms; }
.reveal-group.in-view > :nth-child(12) { --d: 990ms; }
.reveal-group.in-view > :nth-child(n+13) { --d: 1000ms; }

@keyframes swsUp    { from { opacity: 0; transform: translateY(var(--dy)); } to { opacity: 1; transform: none; } }
@keyframes swsDown  { from { opacity: 0; transform: translateY(calc(var(--dy) * -.7)); } to { opacity: 1; transform: none; } }
@keyframes swsLeft  { from { opacity: 0; transform: translateX(calc(var(--dx) * -1)); } to { opacity: 1; transform: none; } }
@keyframes swsRight { from { opacity: 0; transform: translateX(var(--dx)); } to { opacity: 1; transform: none; } }
@keyframes swsZoom  { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
@keyframes swsBlur  { from { opacity: 0; filter: blur(9px); transform: translateY(26px); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes swsPop   { 0% { opacity: 0; transform: scale(.5); } 70% { transform: scale(1.1); } 100% { opacity: 1; transform: scale(1); } }
@keyframes swsWiggle { 0%,100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-14deg) scale(1.2); } 50% { transform: rotate(12deg) scale(1.25); } 75% { transform: rotate(-6deg) scale(1.15); } }
@keyframes swsFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes swsRing  { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes swsBounce { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-5px); } 70% { transform: translateY(1px); } }

.sws-count { font-variant-numeric: tabular-nums; }

/* ---------- 4. headings ---------- */
.sws-head h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  margin-top: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--sws-blue), var(--sws-red));
  transform-origin: left;
  transition: transform .9s ease .35s;
}
.sws-head-center h2::after { margin-left: auto; margin-right: auto; transform-origin: center; }
.sws-js .sws-head h2::after { transform: scaleX(0); }
.sws-js .sws-head.in-view h2::after { transform: scaleX(1); }

.sws-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sws-gold);
  margin-bottom: 8px;
}

/* text links: gradient underline slides in on hover */
.fx-link,
.main-banner .left-content p a,
.right-list a:not(.map-pin):not(.map-link) {
  text-decoration: none;
  background: linear-gradient(90deg, var(--sws-blue), var(--sws-red)) 0 100% / 0 2px no-repeat;
  transition: background-size .35s ease, color .25s ease;
}
.fx-link:hover,
.main-banner .left-content p a:hover,
.right-list a:not(.map-pin):not(.map-link):hover { background-size: 100% 2px; }

/* ---------- 5. images ---------- */
.sws-zoom { display: block; overflow: hidden; border-radius: 14px; }
.sws-zoom img { display: block; transition: transform .8s ease; }
.sws-zoom:hover img { transform: scale(1.06); }

.sws-lift img { transition: transform .6s ease; }
.sws-lift:hover img { transform: translateY(-6px) scale(1.03); }

.about-us .services .item { transition: transform .35s ease; }
.about-us .services .item:hover { transform: translateY(-6px); }
.about-us .item .icon img { transition: transform .35s ease; }
.about-us .item:hover .icon img { transform: scale(1.1) rotate(-4deg); }
.sws-js .about-us .item.in-view .icon img {
  animation: swsPop .6s cubic-bezier(.34, 1.56, .64, 1) calc(var(--d, 0ms) + 250ms) backwards;
}
.our-portfolio .item { transition: transform .35s ease, box-shadow .35s ease; }
.our-portfolio .item:hover { transform: translateY(-8px); box-shadow: 0 16px 32px rgba(0, 0, 0, .16); }

.contact-dec img { animation: swsFloat 6s ease-in-out infinite; }

/* ---------- 6. buttons & forms ---------- */
.contact-button input,
.main-button,
#form-submit { transition: transform .3s ease, box-shadow .3s ease; }
.contact-button input:hover,
.main-button:hover,
#form-submit:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(10, 37, 64, .22); }

.contact-us input,
.contact-us textarea,
select.form-control { transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease; }
.contact-us input:focus,
.contact-us textarea:focus,
select.form-control:focus {
  box-shadow: 0 0 0 3px rgba(3, 164, 237, .25);
  transform: translateY(-2px);
}

/* ---------- 7. footer ---------- */
.sws-footer::before {
  content: "";
  display: block;
  height: 3px;
  margin-bottom: 28px;
  background: linear-gradient(90deg, var(--sws-blue), var(--sws-red));
  opacity: .85;
}
.sws-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 0 0 22px;
}
.sws-social a {
  position: relative;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 26px;
  color: var(--sws-navy);
  background: #fff;
  box-shadow: 0 4px 14px rgba(10, 37, 64, .12);
  overflow: hidden;
  text-decoration: none;
  transition: transform .35s var(--sws-ease), box-shadow .35s ease;
}
.sws-social a::before {                     /* brand colour floods in on hover */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bg, var(--sws-navy));
  transform: scale(0);
  transition: transform .4s var(--sws-ease);
}
.sws-social a i { position: relative; z-index: 1; transition: color .3s ease; }
.sws-social a:hover,
.sws-social a:focus-visible { transform: translateY(-8px); box-shadow: 0 14px 26px var(--glow, rgba(10, 37, 64, .3)); }
.sws-social a:hover::before,
.sws-social a:focus-visible::before { transform: scale(1); }
.sws-social a:hover i,
.sws-social a:focus-visible i { color: #fff; animation: swsWiggle .6s ease; }
.soc-linkedin  { --bg: #0a66c2; --glow: rgba(10, 102, 194, .45); }
.soc-facebook  { --bg: #1877f2; --glow: rgba(24, 119, 242, .45); }
.soc-instagram { --bg: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); --glow: rgba(214, 36, 159, .4); }
.soc-youtube   { --bg: #ff0000; --glow: rgba(255, 0, 0, .4); }

/* any picture placed in the footer: grey until hovered, then full colour */
.sws-footer img { filter: grayscale(1); opacity: .8; transition: filter .45s ease, opacity .45s ease, transform .45s ease; }
.sws-footer img:hover { filter: none; opacity: 1; transform: scale(1.08); }

/* ---------- 8. responsive + reduced motion ---------- */
@media (max-width: 767px) {
  .reveal, .reveal-group { --dx: 24px; --dy: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .sws-js .reveal.in-view,
  .sws-js .reveal-group.in-view > *,
  .sws-js .reveal-group.in-view > h2,
  .sws-js .about-us .item.in-view .icon img { animation: none; }
  .sws-head h2::after { transition: none; }
  .sws-zoom:hover img, .sws-lift:hover img,
  .about-us .services .item:hover, .our-portfolio .item:hover,
  .about-us .item:hover .icon img,
  .sws-social a:hover, .sws-social a:focus-visible,
  .contact-button input:hover, .main-button:hover, #form-submit:hover { transform: none; }
  .contact-dec img { animation: none; }
  .sws-social a:hover i, .sws-social a:focus-visible i { animation: none; }
}
