:root {
  --bg-page: #070a0f;
  --bg-elevated: #0d1117;
  --bg-elevated-alt: #111727;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.1);
  --border-subtle: #1e2535;
  --text-main: #f9fbff;
  --text-muted: #8b97b3;
  --text-soft: #64708b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
--shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --container-width: 1200px;
  --nav-height: clamp(60px, 10vw, 80px);
  --container-mobile-padding: 16px;
}

/*
  styles.css - overview

  - CSS variables are defined above in :root for colors, radii and layout tokens.
  - The file is organized into global reset/typography, layout helpers, UI
    components (buttons, navbar, hero, cards), and responsive rules near the
    sections they affect.
  - Keep comments short and update them when you change related rules.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  /* Layout container: centers content and constrains width */
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px);
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--container-mobile-padding);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.08s ease;
  background: transparent;
  color: var(--text-main);
}

.btn-primary {
  background: linear-gradient(135deg, #4f8cff, #7b5cff);
  border-color: transparent;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  border-color: var(--border-subtle);
  background: rgba(15, 24, 40, 0.9);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(18, 30, 52, 0.95);
}

.navbar {
  /* Navigation bar: sticky top header with subtle gradient/backdrop */
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease, box-shadow 0.2s ease,
    backdrop-filter 0.2s ease, border-color 0.2s ease;
  background: radial-gradient(circle at top left, rgba(79, 140, 255, 0.2), transparent 55%) fixed,
    linear-gradient(to bottom, rgba(6, 10, 20, 0.96), rgba(6, 10, 20, 0.92));
  border-bottom: 1px solid transparent;
}

@media (max-width: 480px) {
  .navbar {
    padding: 0;
  }
}

.navbar.scrolled {
  backdrop-filter: blur(14px);
  background: rgba(6, 10, 20, 0.92);
  border-bottom-color: rgba(53, 66, 99, 0.8);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

@media (max-width: 480px) {
  .navbar-inner {
    gap: 0.8rem;
  }
}

.mobile-sub-nav,
.close-x {
  display: none;
}

.navbar-inner .logo {
  margin-right: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 110; /* Ensure logo is above navbar elements */
}

.logo-img {
  height: clamp(80px, 15vw, 140px); /* Slightly refined base size */
  width: auto;
  display: block;
  transform: translateY(4px); /* Subtle nudge for visual balance */
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: conic-gradient(from 210deg,
      #4f8cff,
      #7b5cff,
      #4f8cff);
  box-shadow: 0 0 0 1px rgba(4, 10, 25, 0.8), 0 0 0 8px rgba(79, 140, 255, 0.12),
    0 20px 45px rgba(0, 0, 0, 0.75);
}

.logo-mark.small {
  width: 22px;
  height: 22px;
}

.logo-text {
  font-weight: 600;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  font-size: 1.05rem;
}

.nav-links a {
  color: var(--text-soft);
  transition: color 0.16s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Dropdown menu for Services nav item */
.nav-item {
  position: relative;
}

.dropdown-toggle {
  background: transparent;
  border: none;
  color: var(--text-soft);
  font: inherit;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.dropdown-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.08);
  color: var(--text-main);
}

.dropdown-menu {
  position: absolute;
  top: calc(var(--nav-height) + 8px);
  left: 0;
  min-width: 220px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 40px rgba(2, 6, 12, 0.45);
  padding: 6px 0;
  display: none;
  z-index: 120;
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: inherit;
  font-size: 0.95rem;
}

.dropdown-menu a:hover {
  background: rgba(79, 140, 255, 0.06);
}

/* Show on hover for pointer devices */
.nav-item.dropdown:hover>.dropdown-menu {
  display: block;
}

/* When opened via JS (mobile/click), parent gets .open */
.nav-item.dropdown.open>.dropdown-menu {
  display: block;
}

@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
  }

  .dropdown-toggle {
    width: 100%;
    text-align: left;
    color: #ffffff;
    padding: 12px 0;
  }

  .dropdown-menu a {
    padding: 10px 8px;
    color: #ffffff;
  }

  /* when mobile nav is open by default keep dropdowns hidden until toggled */
  .nav-links.mobile-open .dropdown-menu {
    display: none;
    padding-left: 1rem;
    border-left: 1px solid rgba(79, 140, 255, 0.3);
    margin-top: 0.8rem;
    margin-bottom: 0.5rem;
  }

  /* but show it when .open class is added by main.js */
  .nav-links.mobile-open .nav-item.dropdown.open .dropdown-menu {
    display: block;
  }


  .nav-links.mobile-open .dropdown-menu a {
    font-size: 1.05rem;
    padding: 10px 0;
  }
}

.nav-quote {
  margin-left: 0.8rem;
}

.mobile-nav-info {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.nav-toggle:hover span {
  background: var(--accent);
}

.navbar.nav-hidden .nav-toggle {
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
}

main {
  padding-top: 0;
}

.hero {
  /* Hero section: large lead area with media and call-to-action */
  padding: calc(var(--nav-height) + 24px) 0 clamp(64px, 12vw, 96px);
  background:
    radial-gradient(circle at top left, rgba(79, 140, 255, 0.28), transparent 55%),
    radial-gradient(circle at top right, rgba(123, 92, 255, 0.16), transparent 60%),
    linear-gradient(175deg, #050912 0%, #050812 45%, #02040a 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 56px);
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.7rem, 3.8vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-text {
  max-width: 42rem;
  margin-bottom: 1.8rem;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.90rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* Highlight-only modifier for eyebrow text (make word white) */
.eyebrow-highlight {
  color: var(--text-main);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-media {
  display: flex;
  justify-content: flex-end;
}

.hero-placeholder {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  border: 1px solid rgba(76, 99, 152, 0.8);
  background: radial-gradient(circle at top, rgba(79, 140, 255, 0.32), transparent 60%),
    linear-gradient(145deg, #050913, #050816);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.hero-placeholder img.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  /* start hidden and slightly shifted; fadeIn runs when `.in-view` is added */
  opacity: 0;
  transform: translateY(8px) scale(0.995);
  will-change: opacity, transform;
}

.hero-placeholder img.hero-image.in-view {
  animation: fadeIn 3s ease both;
}

/* Animista animation: tracking-in-expand-fwd
   - creates an expanding letter-spacing entrance effect
   - animation only runs when the element gets `.in-view` (used by IntersectionObserver)
*/
@keyframes tracking-in-expand-fwd {
  0% {
    letter-spacing: -0.8em;
    transform: translateZ(0);
    opacity: 0;
  }

  40% {
    opacity: 0.6;
  }

  100% {
    letter-spacing: 0;
    transform: translateZ(0);
    opacity: 1;
  }
}

.tracking-in-expand-fwd {
  display: inline-block;
  will-change: letter-spacing, transform, opacity;
  /* start hidden; animation begins when `.in-view` is added */
  opacity: 0;
}

.tracking-in-expand-fwd.in-view {
  animation: tracking-in-expand-fwd 2.5s cubic-bezier(.215, .61, .355, 1) both;
}

/* Respect user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .tracking-in-expand-fwd.in-view {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* animate.css-like zoomIn effect (slow) for hero paragraph */
@keyframes zoomIn {
  0% {
    opacity: 0;
    transform: scale(.3);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate__zoomIn {
  display: inline-block;
  /* start hidden; animation runs when `.in-view` is added */
  opacity: 0;
  transform: scale(.98);
}

.animate__zoomIn.in-view {
  animation: zoomIn 2.5s cubic-bezier(.215, .61, .355, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .animate__zoomIn.in-view {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Simple fade-in animation for list content */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide-in from left animation */

@keyframes slideInRightSidebar {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-60px);
  }

  60% {
    opacity: 0.6;
    transform: translateX(-18px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate__slideInLeft {
  display: block;
  opacity: 0;
  transform: translateX(-40px);
  will-change: transform, opacity;
}

.animate__slideInLeft.in-view {
  /* slower, gentle slide + fade from left to right */
  animation: slideInLeft 1600ms cubic-bezier(.2, .7, .2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .animate__slideInLeft.in-view {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.animate__fadeIn {
  display: block;
  /* start hidden; animation runs when `.in-view` is added */
  opacity: 0;
  transform: translateY(8px);
}

.animate__fadeIn.in-view {
  /* slowed from 2s to 3.5s for a gentler entrance */
  animation: fadeIn 3.5s cubic-bezier(.215, .61, .355, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .animate__fadeIn.in-view {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.section {
  /* Page sections: light background blocks for content areas */
  padding: clamp(40px, 8vw, 72px) 0;
  background: #ffffff;
  color: #0f172a;
}

.section-alt {
  background: #ffffff;
  color: #0f172a;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header.left {
  text-align: left;
}

.section-header h2 {
  /* Slightly larger, responsive section headings */
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

.services-grid {
  /* Services grid: three columns on desktop, stacks on small screens */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top, rgba(79, 140, 255, 0.12), transparent 60%),
    #050815;
  display: flex;
  gap: 18px;
  align-items: stretch;
  min-height: 120px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.simple-fade.appear {
  opacity: 1;
  transform: translateY(0);
}

/* Fix Services cards always visible on index.html (Observer misses fade-in-up) */
.services-grid .card {
  opacity: 1 !important;
  transform: none !important;
}

/* Ensure text inside dark cards is readable */
.card {
  color: var(--text-main);
}

/*
  Card layout (split):
  - .card-left contains title, description and links
  - .card-right holds a representative image
  The layout flips to vertical on small screens.
*/

.card p {
  color: var(--text-soft);
}

.card-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

  .card-right {
    width: 180px;
    height: 140px;
    border-radius: calc(var(--radius-md) - 4px);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.06));
    display: flex;
    align-items: center;
    justify-content: center;
  }

.card-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card .card-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(79, 140, 255, 0.7);
  margin-bottom: 6px;
}

.card h3 {
  font-size: 1.12rem;
  color: var(--text-main);
  font-weight: 600;
  margin: 0 0 6px 0;
}

.card-link {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--accent);
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .card {
    flex-direction: column;
  }

  .card-right {
    width: 100%;
    height: 240px;
  }
}


.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}

.image-placeholder {
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(87, 112, 168, 0.9);
  background: linear-gradient(145deg, #050818, #050715);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Image placeholders and section imagery:
   used to display large illustrative images while maintaining aspect.
*/

.image-placeholder img.section-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.image-placeholder.large {
  min-height: 280px;
}

.content-block {
  max-width: 520px;
}

.bullet-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bullet-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem 0.9rem;
  align-items: flex-start;
}

.bullet-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(79, 140, 255, 0.9);
  background: radial-gradient(circle at top, rgba(79, 140, 255, 0.6), transparent 70%);
}

.bullet-list h3 {
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  padding: 18px 18px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #050815;
}

.project-card img.project-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 4px);
}

.project-card h3 {
  margin-top: 0.75rem;
  font-size: 1rem;
}

/* Fade-in animation for project images when they come into view */
.project-image {
  display: block;
  width: 100%;
  height: auto;
  /* start hidden and slightly shifted so fadeIn has visible movement */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms ease, transform 320ms ease;
}

/* Use the shared `fadeIn` keyframes already defined above for list items */
.project-image.in-view {
  animation: fadeIn 3.2s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .project-image.in-view {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.cta {
  background: radial-gradient(circle at top left, rgba(79, 140, 255, 0.32), transparent 55%),
    linear-gradient(150deg, #050814, #050612);
}

.cta-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

.cta-inner h2 {
  max-width: 36rem;
  /* Improve visibility: larger, bolder, and higher contrast on dark CTA background */
  color: var(--text-main);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  text-shadow: 0 8px 24px rgba(2, 6, 12, 0.6);
}

/* Jumping CTA button to draw attention; pause on hover */
@keyframes jump {
  0% {
    transform: translateY(0);
  }

  25% {
    transform: translateY(-8px);
  }

  50% {
    transform: translateY(0);
  }

  75% {
    transform: translateY(-4px);
  }

  100% {
    transform: translateY(0);
  }
}

.cta .btn-primary {
  animation: jump 1.6s ease-in-out infinite;
}

.cta .btn-primary:hover,
.cta .btn-primary:focus {
  /* Stop jumping when user hovers or focuses the button */
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .cta .btn-primary {
    animation: none !important;
  }
}

.contact-layout {
  align-items: flex-start;
}



.form-card {
  padding: 22px 20px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top, rgba(79, 140, 255, 0.13), transparent 60%),
    #050815;
}

form {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vw, 1rem);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.8rem;
  color: var(--text-soft);
}

input,
select,
textarea {
  background: rgba(5, 9, 18, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  color: var(--text-main);
  font: inherit;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease,
    background-color 0.12s ease, transform 0.2s ease;
}

input.error,
select.error,
textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  background-color: rgba(239, 68, 68, 0.05);
}

input.valid,
select.valid,
textarea.valid {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-field {
  position: relative;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

form.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
  border-radius: var(--radius-lg);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-soft);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.5);
  background-color: #050814;
}

.form-actions {
  margin-top: 0.3rem;
  display: flex;
  justify-content: flex-end;
}

.error-container {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #ef4444;
  font-size: 0.8rem;
  min-height: 1.5em;
  display: flex;
  align-items: center;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
}

.honeypot {
  display: none;
}

.error-message {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

.valid-container {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #10b981 !important;
}

.footer {
  border-top: 1px solid var(--border-subtle);
  background: #040614;
  padding-top: 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: clamp(20px, 4vw, 24px);
  align-items: flex-start;
  font-size: 0.9rem;
}

.footer-column h3 {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.footer-column ul li {
  margin-bottom: 0.3rem;
  color: var(--text-soft);
}

.social-links {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.35rem;
}

.social-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-soft);
  background: rgba(6, 10, 20, 0.94);
  transition: border-color 0.15s ease, background-color 0.15s ease,
    color 0.15s ease, transform 0.12s ease;
}

.social-icon:hover {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.18);
  color: var(--text-main);
}

/* Ensure icon images fit nicely inside the circular container */
.social-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .social-icon {
    width: 40px;
    height: 40px;
  }

  .social-icon img {
    width: 22px;
    height: 22px;
  }
}

.footer-bottom {
  margin-top: 18px;
  border-top: 1px solid var(--border-subtle);
  padding: 12px 0 18px;
}

.footer-bottom-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-soft);
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 12, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
}

.modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 420px;
  padding: 24px 22px 20px;
  border-radius: 18px;
  border: 1px solid rgba(79, 140, 255, 0.8);
  background: radial-gradient(circle at top, rgba(79, 140, 255, 0.32), transparent 65%),
    #050814;
  text-align: center;
}

.modal h2 {
  margin-bottom: 0.5rem;
}

.modal p {
  margin-bottom: 1.4rem;
}

.page-header {
  padding: calc(var(--nav-height) + 28px) 0 48px;
  background:
    radial-gradient(circle at top left, rgba(79, 140, 255, 0.28), transparent 55%),
    linear-gradient(160deg, #050814, #050612);
}

.page-header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 720px;
}

.page-header h1 {
  font-size: clamp(2.1rem, 2.7vw, 2.5rem);
}

.page-header p {
  max-width: 32rem;
}

.breadcrumbs {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.breadcrumbs a {
  color: var(--text-soft);
}

.breadcrumbs span {
  color: var(--text-main);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.tag {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid rgba(86, 111, 173, 0.9);
  color: var(--text-soft);
}

.services-layout {
  padding: 32px 0 64px;
  background: #ffffff;
  color: #0f172a;
}

.services-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: flex-start;
}

.services-main {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.rich-text h2 {
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
}

.rich-text p+p {
  margin-top: 0.4rem;
}

.feature-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Two-column layout for service detail pages: text left, large image right */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.service-content h2 {
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
}

.service-media img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

/* Devices list used on service pages (replaces images) */
.devices-list {
  background: #ffffff;
  color: #0f172a;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 30px rgba(2, 6, 12, 0.08);
}

.devices-list h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: #0b1a2a;
}

.device-list {
  margin: 10px 0 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.device-list li {
  background: rgba(6, 10, 20, 0.02);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #21324a;
}

.device-list li strong {
  display: inline-block;
  min-width: 130px;
  color: #0b2032;
}

@media (max-width: 900px) {
  .devices-list {
    padding: 14px;
  }

  .device-list li {
    font-size: 0.92rem;
  }
}

@media (max-width: 900px) {
  .service-detail {
    grid-template-columns: 1fr;
  }

  .service-media img {
    height: 220px;
  }
}

/* Service hero: full-bleed background with slow fade-in for selected service */
.service-hero {
  position: relative;
  min-height: 70vh;
  /* Increased from 62vh to give the background image more uncropped vertical space */
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  color: var(--text-main);
  overflow: hidden;
}

.service-hero .service-hero-inner {
  position: relative;
  z-index: 3;
  text-align: left;
  width: 100%;
}

.service-hero .hero-content {
  padding: calc(var(--nav-height) + 32px) 0 60px;
  max-width: 680px;
}

.service-hero .service-hero-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.02;
  margin: 0.25rem 0 0.8rem;
}

.service-hero .hero-subtext p {
  margin: 0 0 0.6rem;
  color: rgba(249, 251, 255, 0.9);
  opacity: 0.95;
  font-size: 1rem;
  line-height: 1.6;
}

/* custom left-to-right wipe effect to simulate writing out the title */
@keyframes writeLeftToRight {
  0% {
    clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
    opacity: 0;
  }

  1% {
    opacity: 1;
  }

  100% {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    opacity: 1;
  }
}

.service-hero .tracking-in-expand-fwd {
  opacity: 0;
  /* starts hidden */
}

.service-hero .tracking-in-expand-fwd.in-view {
  animation: fadeIn 1.5s ease both;
}

@keyframes cyberGlitchReveal {
  0% {
    opacity: 0;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    transform: translateZ(0);
  }
  10%, 30%, 50%, 70%, 90% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: translateX(2px) skewX(-1deg);
  }
  20%, 40%, 60%, 80% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: translateX(-2px) skewX(1deg);
  }
  100% {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: translateZ(0);
  }
}

.service-hero-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 800;
  text-shadow: 0 10px 36px rgba(2, 6, 12, 0.6);
}

.service-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  /* Set to center horizontally and 30% down vertically */
  opacity: 0;
  transform: scale(1.02);
  background-repeat: no-repeat;
  /* keep image behind an overlay so animated content is visible */
  will-change: opacity, transform;
}

/* Dark, semi-transparent overlay on top of the background image so the
   hero image appears very dark but still visible. This makes it safe to
   place bright/animated content on top (e.g. on the right side). */
.service-hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   Modern Entry Animation System (Page Load)
   ========================================================================== */

/* The 'is-ready' class is added to the body via JS on DOMContentLoaded to trigger 
   the staggered entry of hero elements and the navbar. */

@keyframes fadeUpReveal {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes navEntrance {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kenBurnsZoom {
  0% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* Staggered Delay Utilities */
.stagger-1 { animation-delay: 0.2s !important; }
.stagger-2 { animation-delay: 0.4s !important; }
.stagger-3 { animation-delay: 0.6s !important; }
.stagger-4 { animation-delay: 0.8s !important; }

/* Apply entrance animations when page is ready */

body.is-ready .navbar {
  animation: navEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Make the hero-content wrapper visible immediately when page is ready */
body.is-ready .hero-content,
body.is-ready .page-header-inner {
  opacity: 1;
}

body.is-ready .hero-content > *,
body.is-ready .page-header-inner > *,
body.is-ready .service-hero .container > * {
  opacity: 0;
  animation: fadeUpReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.is-ready .service-hero-bg.in-view {
  animation: fadeIn 1.5s ease both, kenBurnsZoom 6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Backwards compatibility and existing animations */
.hero-content {
  /* starts hidden; body.is-ready sets opacity:1 on the wrapper */
  opacity: 0;
}

.particle {
  background: #ffffff;
  color: #0f172a;
  padding: 40px 0;
}

.selected-service .container {
  max-width: 1100px;
}

.selected-service-inner {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 32px;
  align-items: center;
}

.selected-service .service-media img {
  height: 420px;
}

@media (max-width: 900px) {
  .selected-service-inner {
    grid-template-columns: 1fr;
  }

  .selected-service .service-media img {
    height: 260px;
  }

  .testimonials-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.5rem 1rem;
  }

  .testimonial-card {
    padding: 2rem 1.5rem 1.5rem;
  }
}

.feature-card {
  padding: 16px 14px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #050815;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feature-card .card-icon {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 0.95rem;
}

.quote-panel {
  padding: 20px 18px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(79, 140, 255, 0.75);
  background: radial-gradient(circle at top, rgba(79, 140, 255, 0.26), transparent 65%),
    #050814;
}

.quote-panel h2 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.quote-panel p {
  margin-bottom: 1rem;
}

.quote-panel .btn {
  width: 100%;
}

.quote-form-section {
  padding: 28px 0 64px;
  background: #ffffff;
  color: #0f172a;
}

.quote-form-inner {
  max-width: 720px;
  margin: 0 auto;
}

.page-tabs {
  margin-top: 1.4rem;
  display: inline-flex;
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 3px;
}

.page-tab {
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-soft);
  cursor: pointer;
}

.page-tab.active {
  background: var(--accent-soft);
  color: var(--text-main);
}

.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.4rem;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-tab {
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  cursor: pointer;
  background: rgba(5, 9, 18, 0.95);
}

.filter-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-main);
}

.projects-page-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card[data-category] {
  display: block;
}

.contact-page {
  padding: 32px 0 64px;
  background: #ffffff;
  color: #0f172a;
}

.map-block {
  margin-top: 40px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(67, 92, 152, 0.9);
  background: linear-gradient(145deg, #050818, #050715);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.map-block img.map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

@media (max-width: 992px) {

  .hero-grid,
  .two-column,
  .services-columns,
  .projects-grid,
  .feature-grid,
  .projects-page-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 20px;
  }

  .footer-column:first-child {
    grid-column: 1 / -1;
  }

  .project-card img.project-image {
    height: 300px;
  }

  .hero-media {
    order: -1;
    justify-content: center;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 20px);
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    gap: 20px;
  }

  .footer-column:first-child {
    max-width: none;
  }

  .filter-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header.left {
    text-align: center;
  }

  .content-block {
    margin: 0 auto;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .navbar {
    background: rgba(6, 10, 20, 0.96);
    border-bottom-color: rgba(53, 66, 99, 0.8);
    height: var(--nav-height); /* Revert to sleek height */
    padding: 0;
  }

  .navbar-inner {
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px; /* Added concrete padding to prevent edge clipping */
    width: 100%;
  }

  .navbar-inner .logo {
    margin-right: auto;
    margin-left: 24px; /* Shifted to the right for a premium, intentional look */
    width: auto;
    justify-content: flex-start;
    flex: 0 1 auto;
  }

  /* Large Left-Aligned Logo with Overlap */
  .logo-img {
    height: clamp(140px, 25vw, 200px); /* Massive, high-impact brand presence */
    transform: translateY(10px); /* Slightly refined upward shift */
    margin-top: 0;
  }

  .mobile-sub-nav {
    display: flex;
    gap: clamp(0.2rem, 1vw, 0.8rem);
    align-items: center;
    margin-left: auto; /* Shift specifically to the right next to the toggle */
    margin-right: 0.1rem;
    flex: 0 1 auto;
  }

  .mobile-sub-nav a {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    font-weight: 500;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.4rem;
    white-space: nowrap;
    transition: color 0.3s ease;
  }

  .mobile-sub-nav a:hover {
    color: var(--accent);
  }

  .desktop-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 2000; /* Absolute priority above all other elements */
    background: rgba(79, 140, 255, 0.2);
    border: 1px solid rgba(79, 140, 255, 0.4);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    margin-left: 0.5rem;
    pointer-events: auto; /* Force response to touch/click */
    flex-shrink: 0; /* Never allow it to be squeezed */
  }

.nav-links.mobile-open {
  display: flex !important;
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(0);
  height: 100vh;
  width: 90vw;
  max-width: 420px;
  background: rgba(5, 9, 18, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px 0 0 20px;
  flex-direction: column;
  padding: 32px 24px;
  gap: 1.2rem;
  overflow-y: auto;
  z-index: 1000;
  animation: slideInRightSidebar 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.nav-toggle.mobile-open span:nth-child(1) {
  transform: rotate(-45deg) translate(-1px, 1px);
}

.nav-toggle.mobile-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.mobile-open span:nth-child(3) {
  transform: rotate(45deg) translate(1px, -1px);
}

.nav-links.mobile-open .close-x {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent);
  border-radius: 50%;
  cursor: pointer;
  z-index: 150;
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInDown 0.5s 0.2s both;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(79, 140, 255, 0);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-links.mobile-open .close-x:hover {
  background: var(--accent);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 8px 25px rgba(79, 140, 255, 0.4);
}

.nav-links.mobile-open .close-x::before,
.nav-links.mobile-open .close-x::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--text-main);
  border-radius: 999px;
  transform-origin: center;
  transition: all 0.3s ease;
}

.nav-links.mobile-open .close-x::before {
  transform: rotate(45deg);
}

.nav-links.mobile-open .close-x::after {
  transform: rotate(-45deg);
}

.nav-links.mobile-open .close-x:hover::before,
.nav-links.mobile-open .close-x:hover::after {
  background: #fff;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  z-index: 105;
  transition: opacity 0.3s ease;
}

.nav-links.mobile-open::before:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.nav-links.mobile-open::before::before,
.nav-links.mobile-open::before::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 2px;
  background: var(--text-main);
  border-radius: 999px;
  transform-origin: center;
  transition: all 0.25s ease;
}

.nav-links.mobile-open::before::before {
  transform: rotate(45deg);
}

.nav-links.mobile-open::before::after {
  transform: rotate(-45deg);
}

.nav-links.mobile-open:hover::before {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(180deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.nav-close span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
  transform-origin: center;
  transition: all 0.25s ease;
}

.nav-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-close:active {
  transform: rotate(90deg) scale(0.95);
}

.nav-close span {
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
  transform-origin: center;
  transition: all 0.25s ease;
}

.nav-links.mobile-open .nav-close {
  display: flex;
}

/* Mobile close button (hidden until sidebar open) */
.nav-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 20px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 110;
}

.nav-close span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
  transform-origin: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


  .nav-links.mobile-open > a:not(.nav-quote),
  .nav-links.mobile-open > .nav-item {
    font-size: 1.25rem;
    text-align: left;
  }

  .nav-links.mobile-open .nav-quote {
    align-self: center;
    margin: 1.5rem auto 0;
    font-size: 1.05rem;
    padding: 0.85rem 2rem;
  }

  .mobile-nav-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(54, 67, 104, 0.6);
  }

  .mobile-nav-info .contact-info p {
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
  }

  .mobile-nav-info .contact-info strong {
    color: var(--accent);
  }

  .social-links-mobile {
    display: flex;
    gap: 0.8rem;
  }

  .social-links-mobile .social-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 10, 20, 0.94);
  }

  .social-links-mobile .social-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }

  .hero-grid {
    gap: 32px;
  }

  .hero-placeholder {
    max-width: 100%;
  }

  .section {
    padding: 56px 0;
  }

  .services-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 8px; /* Reduced gap for small screens */
  }

  .footer-column:first-child {
    grid-column: 1 / -1;
  }

  .footer-column h3 {
    font-size: 0.85rem; /* Slightly smaller headers */
  }

  .footer-column ul li {
    font-size: 0.8rem;
  }

  .page-header {
    padding-top: calc(var(--nav-height) + 20px);
  }
}

@media (max-width: 480px) {
  .container {
    padding: var(--container-mobile-padding) 0;
  }

  .hero {
    padding-bottom: clamp(48px, 10vw, 72px);
  }

  .hero-grid {
    gap: clamp(20px, 5vw, 24px);
  }

  .hero-content h1 {
    font-size: clamp(1.6rem, 8vw, 2rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .form-actions {
    justify-content: center;
  }

  .form-actions .btn {
    width: 100%;
  }

  .projects-page-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Reduce heading sizes slightly for small mobile screens to prevent overflow */
  .section-header h2 {
    font-size: clamp(1.4rem, 6vw, 1.6rem);
  }

  .service-hero-title {
    font-size: clamp(1.8rem, 8vw, 2rem);
  }

  .logo-img {
    height: clamp(160px, 30vw, 240px); /* Massive, high-impact brand presence */
    transform: translateY(12px); /* Pushed up for better balance */
    width: auto;
    margin-bottom: 0;
    max-width: 90vw; 
    object-fit: contain;
    z-index: 120;
  }

  .footer-grid {
    gap: 20px;
    font-size: 0.85rem;
  }
}

/* Projects Page Filter Tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.filter-tab {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  /* This gives it the blue color */
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 0.95rem;
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ========== Testimonials Page Styles ========== */

/* Page Header for testimonials - matches hero aesthetic */
.testimonials-page .page-header {
  padding: calc(var(--nav-height) + 28px) 0 64px;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.15) 0%, rgba(123, 92, 255, 0.08) 50%, transparent 100%),
    radial-gradient(ellipse at top left, rgba(79, 140, 255, 0.2), transparent 60%);
}

.page-header-inner {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.page-header h1 {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Testimonials Section */
.testimonials-section {
  padding: 80px 0;
  background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
  color: #1e293b;
}

.testimonials-section .section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.8rem;
}

.section-subtitle {
  font-size: 1.15rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

/* Testimonials Slider */
.testimonials-slider {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 4rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.testimonial-card {
  background: radial-gradient(circle at top left, rgba(79, 140, 255, 0.12), transparent 70%), linear-gradient(145deg, var(--bg-elevated), var(--bg-elevated-alt));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(79, 140, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem 2rem;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
  transform: translateY(20px);
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(79, 140, 255, 0.3);
  background: rgba(255, 255, 255, 0.95);
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #7b5cff);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.quote-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 1.5rem;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.star-rating {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 1.5rem;
}

.star {
  color: #fbbf24;
  font-size: 1.4rem;
  text-shadow: 0 1px 3px rgba(251, 191, 36, 0.4);
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.6;
  color: #334155;
  margin-bottom: 2rem;
  font-weight: 400;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7b5cff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  color: white;
  box-shadow: 0 8px 25px rgba(79, 140, 255, 0.4);
  flex-shrink: 0;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.author-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 1rem;
}

.author-position {
  color: #475569;
  font-size: 0.9rem;
}

.author-company {
  color: #64748b;
  font-size: 0.85rem;
}

.slider-nav {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
}

.slider-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.slider-btn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(79, 140, 255, 0.4);
}

.link-with-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.link-with-arrow:hover {
  color: #2563eb;
}

.link-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.link-with-arrow:hover .link-icon {
  transform: translateX(4px);
}

.quote-panel {
  max-width: 500px;
  margin: 0 auto;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(79, 140, 255, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  text-align: center;
}

.quote-panel h2 {
  font-size: 1.6rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.quote-panel p {
  color: #64748b;
  margin-bottom: 2rem;
}

.quote-panel .form-row {
  gap: 1rem;
}

.quote-panel label {
  color: #374151;
}

.quote-panel input,
.quote-panel textarea {
  background: white;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quote-panel input:focus,
.quote-panel textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 900px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .testimonial-card {
    padding: 2rem 1.5rem 1.5rem;
  }

  .slider-nav {
    bottom: -40px;
  }

  .slider-btn {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  .quote-panel {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
  }
}

@media (max-width: 480px) {
  .testimonials-section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .testimonial-card {
    padding: 1.8rem 1.2rem 1.2rem;
  }

  .testimonial-text {
    font-size: 1rem;
  }

  .author-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .slider-nav {
    gap: 0.8rem;
  }
}

/* Animation for cards entering view */
.testimonial-card.in-view {
  animation: fadeIn 0.8s ease both;
}

.testimonial-card[data-stagger="1"].in-view { animation-delay: 0.1s; }
.testimonial-card[data-stagger="2"].in-view { animation-delay: 0.2s; }
.testimonial-card[data-stagger="3"].in-view { animation-delay: 0.3s; }

/* ========== Form Validation Overhaul Styles ========== */

.error-container {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: none; /* Hidden by default if empty */
  transition: all 0.3s ease;
}

.error-container:not(:empty) {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.error-container.valid-container {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.form-field input.error,
.form-field select.error,
.form-field textarea.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.form-field input.valid,
.form-field select.valid,
.form-field textarea.valid {
  border-color: #22c55e !important;
}

.error-message {
  display: block;
  color: #f87171;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  font-weight: 500;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
