/* =====================================================================
   DevSpire Solutions — site.css
   Custom, non-utility styles: brand tokens, the Blueprint→Build hero
   animation, and every hand-built interactive/animated detail.
   Loaded on every public page, independent of Tailwind (Play CDN or
   the compiled production build).
   ===================================================================== */

:root {
  --ink: #16232E;
  --ink-2: #223342;
  --spire: #1FC8DC;
  --amber: #8FEAF0;
  --paper: #F6FAFB;
  --slate: #5B6B78;
  --white: #FFFFFF;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--slate);
  font-family: 'Manrope', sans-serif;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Unbounded', sans-serif;
}

::selection {
  background: var(--spire);
  color: var(--white);
}

/* Visible keyboard focus states everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}

/* =====================================================================
   Page-transition loader (short, skippable, purely decorative)
   ===================================================================== */
#page-loader {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 9999;
  background: transparent;
  pointer-events: none;
}
#page-loader::before {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--spire), var(--amber));
  animation: page-loader-bar 0.6s ease-out forwards;
}
@keyframes page-loader-bar {
  0%   { width: 0%; opacity: 1; }
  70%  { width: 90%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}

/* =====================================================================
   Sticky header: shrinks + gains a blurred glass background on scroll
   ===================================================================== */
#site-header {
  background-color: rgba(22, 35, 46, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease, padding .3s ease, border-color .3s ease;
}
#site-header.is-scrolled {
  background-color: rgba(22, 35, 46, 0.55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(22, 35, 46, 0.15);
}
#site-header .header-inner {
  transition: padding .3s ease;
}
#site-header.is-scrolled .header-inner {
  padding-top: .5rem;
  padding-bottom: .5rem;
}
#site-header .header-inner img,
#site-header .header-inner .brand-mark-lg {
  transition: height .3s ease, width .3s ease;
}
#site-header.is-scrolled .header-inner img {
  height: 2.75rem;
}
#site-header.is-scrolled .header-inner .brand-mark-lg {
  height: 2.75rem;
  width: 2.75rem;
}

/* Hamburger -> X */
.hamburger {
  width: 28px;
  height: 20px;
  position: relative;
}
.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, top .3s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }
.hamburger.is-open span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* Mobile menu slide-in */
#mobile-menu {
  transform: translateX(100%);
  transition: transform .35s ease;
}
#mobile-menu.is-open {
  transform: translateX(0);
}
#mobile-menu-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
#mobile-menu-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* =====================================================================
   Hero: Blueprint grid background (slow pan)
   ===================================================================== */
.blueprint-grid {
  background-image:
    linear-gradient(rgba(31, 200, 220, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 200, 220, 0.14) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-pan 30s linear infinite;
}
@keyframes grid-pan {
  0%   { background-position: 0 0; }
  100% { background-position: 80px 80px; }
}

/* =====================================================================
   Hero: Blueprint -> Build signature animation
   The SVG draws itself (stroke-dashoffset), then fills in with color
   and UI blocks. Driven by a .is-visible class toggled by JS once,
   with a plain CSS fallback (animation-delay chain) if JS is blocked.
   ===================================================================== */
.blueprint-path {
  fill: none;
  stroke: var(--spire);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--path-length, 1000);
  stroke-dashoffset: var(--path-length, 1000);
}
.blueprint-hero.is-visible .blueprint-path {
  animation: draw-path 2.4s cubic-bezier(.65,0,.35,1) forwards;
  animation-delay: var(--path-delay, 0s);
}
.blueprint-fill {
  opacity: 0;
  transform: translateY(6px);
}
.blueprint-hero.is-visible .blueprint-fill {
  animation: fill-in .6s ease forwards;
  animation-delay: var(--fill-delay, 2.2s);
}
@keyframes draw-path {
  to { stroke-dashoffset: 0; }
}
@keyframes fill-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Ambient cyan glow behind the hero graphic + a slow idle float once built */
.blueprint-hero {
  position: relative;
}
.blueprint-hero::before {
  content: '';
  position: absolute;
  inset: -15%;
  background: radial-gradient(circle at 55% 45%, rgba(31, 200, 220, 0.22), transparent 65%);
  filter: blur(10px);
  z-index: -1;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.blueprint-hero.is-visible::before {
  opacity: 1;
}
.blueprint-hero svg {
  animation: hero-float 6s ease-in-out infinite;
  animation-play-state: paused;
}
.blueprint-hero.is-visible svg {
  animation-play-state: running;
  animation-delay: 2.6s;
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* =====================================================================
   Decorative floating icons — small glyphs that drift around a hero,
   purely ambient. Each instance sets its own --float-delay/--float-dur.
   ===================================================================== */
.floating-icon {
  position: absolute;
  color: var(--spire);
  opacity: 0.45;
  animation: icon-float var(--float-dur, 6s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  pointer-events: none;
}
@keyframes icon-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-16px) rotate(8deg); }
}

/* =====================================================================
   Feature icons: draw themselves in once their card scrolls into view
   (piggybacks on the .reveal/.is-visible system), then idle-pulse.
   ===================================================================== */
.icon-draw path,
.icon-draw circle,
.icon-draw line,
.icon-draw polyline {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
}
.reveal.is-visible .icon-draw path,
.reveal.is-visible .icon-draw circle,
.reveal.is-visible .icon-draw line,
.reveal.is-visible .icon-draw polyline {
  animation: draw-path 1s ease forwards;
  animation-delay: .15s;
}
.icon-pulse-ring {
  animation: icon-pulse 2.6s ease-in-out infinite;
}
@keyframes icon-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 200, 220, 0.35); }
  50%      { box-shadow: 0 0 0 10px rgba(31, 200, 220, 0); }
}

/* =====================================================================
   Service card icon: line-draw on hover/focus
   ===================================================================== */
.service-icon svg path,
.service-icon svg circle,
.service-icon svg rect {
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  transition: stroke-dashoffset .8s ease;
}
.service-card:hover .service-icon svg path,
.service-card:hover .service-icon svg circle,
.service-card:hover .service-icon svg rect,
.service-card:focus-within .service-icon svg path,
.service-card:focus-within .service-icon svg circle,
.service-card:focus-within .service-icon svg rect {
  stroke-dashoffset: 0;
}
.service-card {
  border-color: transparent;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.service-card:hover,
.service-card:focus-within {
  border-color: rgba(31, 200, 220, 0.35);
}

/* =====================================================================
   Nav links: a cyan underline that grows in from the left on hover/focus
   ===================================================================== */
.nav-underline {
  position: relative;
}
.nav-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 100%;
  background: var(--spire);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.nav-underline:hover::after,
.nav-underline:focus-visible::after,
.nav-underline[aria-current="page"]::after {
  transform: scaleX(1);
}

/* =====================================================================
   Scroll reveal: fade + rise into view once, respecting reduced motion
   ===================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================================
   Glassmorphism: frosted, translucent surfaces for a lighter, layered feel
   ===================================================================== */
.glass-dark {
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.glass-light {
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.glass-spire {
  background: rgba(31, 200, 220, 0.1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(31, 200, 220, 0.25);
}

/* =====================================================================
   Ambient glow orbs: soft, slowly drifting blurred color blobs used to
   add depth and "ronaq" behind dark/gradient sections. Decorative only.
   ===================================================================== */
.glow-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  animation: orb-drift 16s ease-in-out infinite;
}
.glow-orb-cyan {
  background: radial-gradient(circle, rgba(31, 200, 220, 0.65), transparent 70%);
}
.glow-orb-pale {
  background: radial-gradient(circle, rgba(143, 234, 240, 0.55), transparent 70%);
  animation-delay: -6s;
  animation-duration: 20s;
}
.glow-orb-faint {
  opacity: 0.18;
}
@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(3%, -4%) scale(1.08); }
}

/* Shimmer sweep across primary buttons on hover — a subtle "advanced UI" touch */
.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left .7s ease;
  pointer-events: none;
}
.btn-shine:hover::after,
.btn-shine:focus-visible::after {
  left: 125%;
}

/* =====================================================================
   Tech marquee: auto-scroll, pause on hover, keyboard-focusable content
   ===================================================================== */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 26s linear infinite;
}
.marquee-wrap:hover .marquee-track,
.marquee-wrap:focus-within .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =====================================================================
   Team cards: flip / reveal on hover or focus
   ===================================================================== */
.flip-card {
  perspective: 1200px;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .6s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-card-back {
  transform: rotateY(180deg);
}

/* =====================================================================
   Gallery lightbox
   ===================================================================== */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(22, 35, 46, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
#lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
#lightbox img {
  transform: scale(.96);
  transition: transform .25s ease;
}
#lightbox.is-open img {
  transform: scale(1);
}

/* Gallery filter transitions */
.gallery-item {
  transition: opacity .35s ease, transform .35s ease;
}
.gallery-item[hidden] {
  display: none;
}
.gallery-item.is-hiding {
  opacity: 0;
  transform: scale(.96);
}

/* =====================================================================
   Timeline (About page)
   ===================================================================== */
.timeline-line {
  background: linear-gradient(180deg, var(--spire), var(--amber));
}

/* =====================================================================
   FAQ accordion
   ===================================================================== */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.faq-item.is-open .faq-answer {
  max-height: 600px;
}
.faq-icon {
  transition: transform .3s ease;
}
.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

/* =====================================================================
   Stat counters
   ===================================================================== */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   State-of-the-Art Software Company Effects:
   Spotlights, Glows, Bento Grids, Terminal & Infinite Marquee
   ===================================================================== */

/* 1. Dynamic Mouse-Following Spotlight Card */
.spotlight-card {
  position: relative;
  border-radius: 1.25rem;
  background: rgba(22, 35, 46, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.35s ease;
  overflow: hidden;
}
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(450px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(31, 200, 220, 0.5), transparent 45%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
}
.spotlight-card:hover::before {
  opacity: 1;
}
.spotlight-card:hover {
  transform: translateY(-5px);
  border-color: rgba(31, 200, 220, 0.35);
  box-shadow: 0 24px 48px -12px rgba(10, 16, 23, 0.6), 0 0 35px -8px rgba(31, 200, 220, 0.25);
}

/* 2. Infinite Tech Marquee */
.tech-marquee-wrapper {
  position: relative;
  overflow: hidden;
  display: flex;
  user-select: none;
  gap: 1.5rem;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}
.tech-marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-around;
  min-width: 100%;
  animation: tech-marquee-run 32s linear infinite;
}
.tech-marquee-wrapper:hover .tech-marquee-track {
  animation-play-state: paused;
}
@keyframes tech-marquee-run {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - 1.5rem)); }
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}
.tech-pill:hover {
  background: rgba(31, 200, 220, 0.12);
  border-color: rgba(31, 200, 220, 0.45);
  transform: translateY(-2px);
  color: var(--spire);
}

/* 3. Interactive Code Terminal */
.terminal-window {
  border-radius: 1rem;
  background: #0A1017;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px -10px rgba(31, 200, 220, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  overflow: hidden;
}
.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(22, 35, 46, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.terminal-dots {
  display: flex;
  gap: 0.45rem;
}
.terminal-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}
.terminal-dot-red { background: #FF5F56; }
.terminal-dot-yellow { background: #FFBD2E; }
.terminal-dot-green { background: #27C93F; }

.terminal-body {
  padding: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #E2E8F0;
}
.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--spire);
  vertical-align: middle;
  animation: cursor-blink 0.9s infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 4. Glowing Beacon Pill */
.glow-beacon-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background: rgba(31, 200, 220, 0.1);
  border: 1px solid rgba(31, 200, 220, 0.3);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--spire);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.beacon-dot {
  position: relative;
  display: flex;
  height: 0.55rem;
  width: 0.55rem;
}
.beacon-dot span:first-child {
  position: absolute;
  display: inline-flex;
  height: 100%;
  width: 100%;
  border-radius: 9999px;
  background-color: var(--spire);
  opacity: 0.75;
  animation: ping-wave 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.beacon-dot span:last-child {
  position: relative;
  display: inline-flex;
  border-radius: 9999px;
  height: 0.55rem;
  width: 0.55rem;
  background-color: var(--spire);
}
@keyframes ping-wave {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* 5. Shimmer Gradient Text */
.text-gradient-cyan {
  background: linear-gradient(135deg, #1FC8DC 0%, #8FEAF0 50%, #FFFFFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-gradient-cosmic {
  background: linear-gradient(135deg, #38BDF8 0%, #1FC8DC 40%, #A78BFA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 6. Subtle Pulse Ring */
.pulse-ring {
  box-shadow: 0 0 0 0 rgba(31, 200, 220, 0.4);
  animation: pulse-ring-anim 2.5s infinite cubic-bezier(0.66, 0, 0, 1);
}
@keyframes pulse-ring-anim {
  to {
    box-shadow: 0 0 0 16px rgba(31, 200, 220, 0);
  }
}

/* 7. Bento Grid Accents */
.bento-glow-blob {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.15;
  transition: opacity 0.4s ease;
}
.spotlight-card:hover .bento-glow-blob {
  opacity: 0.35;
}

/* =====================================================================
   Utility: skip link
   ===================================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: var(--ink);
  padding: .75rem 1.25rem;
  z-index: 10000;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* =====================================================================
   prefers-reduced-motion: disable all non-essential animation
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .blueprint-grid {
    animation: none;
  }
  .blueprint-path {
    stroke-dashoffset: 0 !important;
  }
  .blueprint-fill {
    opacity: 1 !important;
    transform: none !important;
  }
  .marquee-track {
    animation: none;
  }
  #page-loader {
    display: none;
  }
}
