html {
  scroll-padding-top: 5rem;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #0A2C63;
  background-color: #FFFFFF;
}

body:not(.home-page),
body:not(.home-page) *:not(i) {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

[hidden] { display: none !important; }

/* Hero Form Top-Right Decorative Cutout / Notch */
.form-notch {
  position: relative;
  overflow: hidden;
}
.form-notch::before {
  content: '';
  position: absolute;
  top: -18px;
  right: -18px;
  width: 56px;
  height: 56px;
  background-color: #EAF2FF;
  border-bottom-left-radius: 9999px;
  pointer-events: none;
}

.hero-enquiry-card {
  width: calc(100vw - 40px);
  max-width: 350px;
  min-height: 623px;
  flex-shrink: 0;
}
.hero-enquiry-card form {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.hero-enquiry-card form > button {
  margin-top: auto;
}
@media (min-width: 640px) {
  .hero-enquiry-card {
    width: 100%;
    max-width: 696px;
  }
}
@media (min-width: 1024px) {
  .hero-enquiry-card {
    width: 100%;
    max-width: 376px;
    min-height: 553px;
  }
}
@media (min-width: 1280px) {
  .hero-enquiry-card {
    max-width: 451px;
    min-height: 498px;
  }
}
@media (min-width: 1440px) {
  .hero-enquiry-card {
    max-width: 526px;
  }
}

/* Accent Line Prefix */
.eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow-line::before {
  content: '';
  width: 24px;
  height: 2px;
  background-color: #0D4AA7;
  display: inline-block;
}

/* Custom Architectural Shape for About Image */
.about-img-mask {
  border-radius: 24px;
  position: relative;
}

/* Developer Accent Glow Strip */
.dev-strip-bg {
  background: radial-gradient(circle at 12% 50%, rgba(13, 74, 167, 0.65) 0%, rgba(10, 59, 133, 0.95) 35%, #0A3B85 70%, rgba(106, 155, 231, 0.35) 100%);
}

.hero-image {
  filter: saturate(1.08) contrast(1.04);
  object-position: 50% 42%;
  animation: heroZoom 18s ease-in-out infinite alternate;
}
.hero-glow {
  background: radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.2), transparent 42%);
}
@keyframes heroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.09); }
}
.rs-img-hover {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.rs-img-hover:hover,
.group:hover .rs-img-hover,
.rs-service-card:hover .rs-img-hover {
  transform: scale(1.06);
}
.rs-service-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.rs-service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 42px -20px rgba(12, 84, 180, 0.45);
  border-color: rgba(12, 84, 180, 0.45);
}
.rs-service-card i {
  display: inline-block;
  transition: transform 0.35s ease;
}
.rs-service-card:hover i {
  transform: scale(1.14) rotate(-8deg);
}
.rs-service-card a {
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.rs-service-card:hover a {
  transform: translate(2px, -2px);
  background-color: #0D4AA7;
  border-color: #0D4AA7;
  color: #fff;
}
.rs-service-card svg {
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.rs-service-card:hover svg {
  transform: translateY(-4px) scale(1.03);
  opacity: 0.9;
}
.rs-service-card > div.absolute {
  transition: transform 0.5s ease;
}
.rs-service-card:hover > div.absolute {
  transform: scale(1.2) rotate(10deg);
}
@media (max-width: 640px) {
  .hero-image {
    animation: none;
    transform: scale(1.03);
  }
  .hero-glow {
    background: radial-gradient(circle at 70% 12%, rgba(255, 255, 255, 0.16), transparent 55%);
  }
}
.fab-wrap {
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
}

.dev-strip-bg {
  min-height: 120px;
  border-top: 3px solid #0A3B85;
  border-bottom: 3px solid #6A9BE7;
  background-color: #0D4AA7;
  background-image: url('../img/developers/investing-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.dev-strip-grid {
  width: calc(100% - 24px);
  max-width: 516px;
  min-height: 114px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dev-strip-title {
  flex: 0 0 216px;
  min-width: 216px;
  white-space: nowrap;
  line-height: 1.2;
}
.dev-strip-title span:first-child {
  font-size: 20px;
  letter-spacing: 1.2px;
}
.dev-strip-title span:last-child {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 300;
}
.dev-strip-marquee {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 1040px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.dev-strip-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: devMarquee 75s linear infinite;
  will-change: transform;
}
.dev-strip-track:hover {
  animation-play-state: paused;
}
.dev-strip-set {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.dev-logo-slide {
  flex: 0 0 235px;
  text-align: center;
}
.dev-logo-flag {
  width: 208px;
  height: 75px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  padding: 7px;
  border-radius: 7px;
}
.dev-logo-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}
@media (min-width: 768px) {
  .dev-strip-grid { max-width: 696px; }
}
@media (min-width: 992px) {
  .dev-strip-grid { max-width: 936px; }
}
@media (min-width: 1200px) {
  .dev-strip-grid { max-width: 1116px; }
}
@media (min-width: 1400px) {
  .dev-strip-grid { max-width: 1296px; }
}
.dev-arrow {
  display: inline-block;
  animation: devArrowNudge 1.8s ease-in-out infinite;
}
.dev-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.dev-reveal.in {
  opacity: 1;
  transform: none;
}
.dev-strip-marquee.dev-reveal {
  transition-delay: 0.15s;
}
@keyframes devMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes devArrowNudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

.excellence-progress {
  height: 2px;
  width: 100%;
  max-width: 220px;
  background: rgba(12, 84, 180, 0.15);
  overflow: hidden;
  border-radius: 9999px;
  margin-top: 0.75rem;
}
.excellence-progress span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: #0D4AA7;
  animation: excellenceProgress 3.2s ease-in-out infinite;
}
.excellence-card {
  --excel-y: 0px;
  opacity: 0;
  transform: translateY(calc(var(--excel-y) + 28px));
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.excellence-card.in {
  opacity: 1;
  transform: translateY(var(--excel-y));
}
.excellence-card:hover {
  transform: translateY(calc(var(--excel-y) - 8px));
  box-shadow: 0 20px 40px -18px rgba(12, 84, 180, 0.45);
}
.excellence-card.in:nth-child(1) { transition-delay: 0.06s; }
.excellence-card.in:nth-child(2) { transition-delay: 0.18s; }
.excellence-card.in:nth-child(3) { transition-delay: 0.3s; }
.excellence-card.excel-card-2 { --excel-y: 1rem; }
.excellence-card.excel-card-3 { --excel-y: -0.75rem; }
.excel-dot {
  animation: excelPulse 2.4s ease-in-out infinite;
}
.excel-compass {
  animation: excelSpin 36s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes excellenceProgress {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(260%); }
}
@keyframes excelPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(12, 84, 180, 0.35); }
  50% { transform: scale(1.35); box-shadow: 0 0 0 10px rgba(12, 84, 180, 0); }
}
@keyframes excelSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (min-width: 768px) {
  .excellence-card.excel-card-2 { --excel-y: 1rem; }
  .excellence-card.excel-card-3 { --excel-y: -0.75rem; }
}
@media (max-width: 767px) {
  .excellence-card.excel-card-2,
  .excellence-card.excel-card-3 { --excel-y: 0px; }
}

/* Subtle Grid Pattern for Excellence Cards */
.card-grid-light {
  background-image: linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.card-grid-dark {
  background-image: linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.card-grid-blue {
  background-image: linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Navbar popovers (written for this page only) */
.nav-pop { position: relative; }
.nav-pop-menu {
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  transform: translateY(8px);
}
.nav-pop:hover .nav-pop-menu,
.nav-pop:focus-within .nav-pop-menu,
.nav-pop.open .nav-pop-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
}
.nav-pop-trigger > i { transition: transform .2s ease; }
.nav-pop:hover .nav-pop-trigger > i,
.nav-pop:focus-within .nav-pop-trigger > i,
.nav-pop.open .nav-pop-trigger > i { transform: rotate(180deg); }
.nav-pop-menu a:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0D4AA7;
  outline-offset: 2px;
}

/* Mobile submenu */
.mobile-sub-menu { transition: all .2s ease; }

/* Feedback toast */
.toast-enter { animation: toastIn .25s ease both; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal */
.modal-panel { animation: modalIn .2s ease both; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Floating action buttons */
.fab { transition: transform .2s ease, background-color .2s ease, color .2s ease; }
.fab:hover { transform: translateY(-3px); }

select option { color: #0A2C63; }

@media (min-width: 1280px) {
  body.home-page [class~="max-w-7xl"],
  body.home-page [class~="max-w-6xl"],
  body.home-page [class~="max-w-5xl"] {
    max-width: min(1320px, calc(100% - 32px));
  }

  body.home-page > section[class~="lg:py-20"],
  body.home-page > section[class~="lg:py-24"] {
    padding-top: clamp(96px, 6.8vw, 110px);
    padding-bottom: clamp(96px, 6.8vw, 110px);
  }

  body.home-page [class~="grid"][class~="lg:grid-cols-12"][class~="gap-10"],
  body.home-page [class~="grid"][class~="lg:grid-cols-12"][class~="gap-12"] {
    column-gap: clamp(40px, 3.4vw, 56px);
  }

  body.home-page #about [class~="aspect-[4/3.6]"] {
    aspect-ratio: 4 / 3.9;
  }

  body.home-page #categories a[class~="h-64"] {
    height: clamp(300px, 23vw, 360px);
  }

  body.home-page #featured a[class~="h-80"] {
    height: clamp(380px, 26vw, 420px);
  }

  body.home-page #consultants div[class~="h-56"] {
    height: clamp(280px, 22vw, 340px);
  }

  body.home-page [class~="aspect-[16/10]"] {
    aspect-ratio: 16 / 11;
  }

  body.home-page .rs-service-card {
    min-height: clamp(270px, 19vw, 320px);
  }

  body.home-page .rs-service-card.bg-brandBlue {
    min-height: clamp(340px, 25vw, 380px);
  }

  body.home-page .excellence-card {
    min-height: clamp(360px, 28vw, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .hero-image,
  .rs-img-hover,
  .rs-service-card,
  .rs-service-card i,
  .rs-service-card a,
  .rs-service-card svg,
  .rs-service-card > div.absolute,
  .dev-strip-track,
  .dev-arrow,
  .excellence-progress span,
  .excel-dot,
  .excel-compass {
    animation: none !important;
    transform: none !important;
  }
  .dev-reveal,
  .excellence-card {
    opacity: 1 !important;
    transform: none !important;
  }
}
