/*
 * ALEBDAAT — styles.css
 * ---------------------
 * Only what Tailwind's CDN runtime can't express cleanly: the nav's
 * transparent→solid scroll state, the hero's reduced-motion/failed-load
 * static fallback, the section-kicker/underline tokens, the card family
 * shared across capabilities/portfolio/stats, the marquee loops, and the
 * fade+rise reveal transition used by every below-fold section (site.js
 * just toggles a class; the actual motion lives here).
 */

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 96px;
}

body {
  background: #0B1216;
}

::selection {
  background: rgba(0, 166, 199, 0.35);
  color: #EAF3F5;
}

/* ---------------------------------------------------------------------- */
/* Ambient grain + glow texture                                           */
/* ---------------------------------------------------------------------- */

.site-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.glow-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* Nav: transparent over the hero, solid once scrolled                    */
/* ---------------------------------------------------------------------- */

#site-nav {
  background: linear-gradient(to bottom, rgba(11, 18, 22, 0.55), transparent);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}

#site-nav.site-nav--solid {
  background: rgba(11, 18, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(234, 243, 245, 0.08);
}

.nav-link {
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, #00A6C7, #8FD7E5);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-link.is-active {
  color: #8FD7E5;
}

/* ---------------------------------------------------------------------- */
/* Static fallback: reduced-motion, or frame 0 failing to load            */
/* ---------------------------------------------------------------------- */

.hero-static-fallback {
  background: url('../../images/hero-poster.webp') center center / cover no-repeat;
}

/* ---------------------------------------------------------------------- */
/* Section kicker + underline — the recurring brand motif under titles    */
/* ---------------------------------------------------------------------- */

.mono-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #4DBACE;
}

.gold-rule,
.cyan-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 166, 199, 0.6), transparent);
}

.section-title {
  position: relative;
  padding-bottom: 18px;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #00A6C7, #4DBACE);
  box-shadow: 0 0 14px rgba(0, 166, 199, 0.5);
}

.section-title--center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------------- */
/* Card family — capabilities / portfolio / stats / process               */
/* ---------------------------------------------------------------------- */

.surface-card {
  background: rgba(234, 243, 245, 0.03);
  border: 1px solid rgba(234, 243, 245, 0.08);
  border-radius: 1.1rem;
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.surface-card:hover {
  border-color: rgba(0, 166, 199, 0.4);
  background: rgba(234, 243, 245, 0.045);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 166, 199, 0.08);
}

.icon-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 0.85rem;
  background: rgba(0, 166, 199, 0.1);
  border: 1px solid rgba(0, 166, 199, 0.3);
  color: #8FD7E5;
  flex-shrink: 0;
}

.icon-frame svg {
  width: 26px;
  height: 26px;
}

.icon-frame--sm {
  width: 40px;
  height: 40px;
}

.icon-frame--sm svg {
  width: 20px;
  height: 20px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8FD7E5;
  transition: gap 0.25s ease, color 0.25s ease;
}

.card-link:hover {
  gap: 10px;
  color: #EAF3F5;
}

.stat-strip {
  border: 1px solid rgba(234, 243, 245, 0.08);
  border-radius: 1.1rem;
  background: rgba(234, 243, 245, 0.02);
  display: grid;
}

.stat-strip > div {
  border-right: 1px solid rgba(234, 243, 245, 0.08);
}

.stat-strip > div:last-child {
  border-right: none;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #05161B;
  background: linear-gradient(135deg, #4DBACE, #00A6C7);
  box-shadow: 0 12px 34px rgba(0, 166, 199, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(0, 166, 199, 0.4);
  filter: brightness(1.06);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #EAF3F5;
  border: 1px solid rgba(234, 243, 245, 0.25);
  background: rgba(234, 243, 245, 0.02);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.btn-ghost:hover {
  border-color: rgba(0, 166, 199, 0.6);
  color: #8FD7E5;
  background: rgba(0, 166, 199, 0.06);
}

/* ---------------------------------------------------------------------- */
/* Marquees — services ticker + client logo strip                         */
/* ---------------------------------------------------------------------- */

.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 38s linear infinite;
}

.marquee-track--slow {
  animation-duration: 55s;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  width: 190px;
  padding: 1.1rem 1.4rem;
  margin: 0 0.6rem;
  background: rgba(234, 243, 245, 0.94);
  border-radius: 0.85rem;
  flex-shrink: 0;
}

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

/* ---------------------------------------------------------------------- */
/* Reveal — fade+rise on first scroll into view. site.js toggles          */
/* `.is-visible`; the transition itself lives here so timing/easing stay  */
/* in one place.                                                          */
/* ---------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 0.8, 0.24, 1), transform 0.7s cubic-bezier(0.16, 0.8, 0.24, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-group > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-group > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-group > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-group > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-group > .reveal:nth-child(n+6) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .marquee-track {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------------------------------------------------------------------- */
/* Mobile nav panel                                                       */
/* ---------------------------------------------------------------------- */

.mobile-panel {
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

/* ---------------------------------------------------------------------- */
/* Forms                                                                  */
/* ---------------------------------------------------------------------- */

.field {
  width: 100%;
  background: rgba(234, 243, 245, 0.04);
  border: 1px solid rgba(234, 243, 245, 0.14);
  border-radius: 0.7rem;
  padding: 0.85rem 1.1rem;
  color: #EAF3F5;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.field::placeholder {
  color: #8FA3AA;
}

.field:focus {
  outline: none;
  border-color: #00A6C7;
  background: rgba(234, 243, 245, 0.06);
  box-shadow: 0 0 0 4px rgba(0, 166, 199, 0.15);
}

/* ---------------------------------------------------------------------- */
/* WhatsApp floating action button                                        */
/* ---------------------------------------------------------------------- */

.whatsapp-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease;
}

.whatsapp-fab:hover {
  transform: translateY(-3px) scale(1.05);
}

/* ---------------------------------------------------------------------- */
/* Numbered rail rows (used in "why partner with us" / differentiators)   */
/* ---------------------------------------------------------------------- */

.rail-row {
  border-top: 1px solid rgba(234, 243, 245, 0.08);
}

.rail-row:last-child {
  border-bottom: 1px solid rgba(234, 243, 245, 0.08);
}

.rail-index {
  font-family: 'JetBrains Mono', monospace;
  color: rgba(0, 166, 199, 0.55);
}
