/* ============================================
   TEKVARA - Technology, Reimagined.
   Global Styles
   ============================================ */

/* =========================================
   1. ISOLATION (Keep the Header Stable)
   ========================================= */
   
/* #main-content {
  view-transition-name: chapter;
}

nav {
  view-transition-name: page-header;
  z-index: 20;
}

@view-transition {
  navigation: auto;
  types: slide;
}

::view-transition-group(page-header) {
  z-index: 100;
  animation: none;
}

::view-transition-group(chapter) {
  z-index: 1;
}

html:active-view-transition-type(slide) {
  
  &::view-transition-group(root) {
    animation: none;
  }

  &::view-transition-group(chapter) {
    animation-duration: 0.6s;
  }

  &::view-transition-old(chapter) {
    animation-name: slide-out-to-left;
  }

  &::view-transition-new(chapter) {
    animation-name: slide-in-from-right;
  }
}

@keyframes slide-out-to-left {
  to { transform: translateX(-100vw); }
}

@keyframes slide-in-from-right {
  from { transform: translateX(100vw); }
} */

/* ---------- CSS Variables ---------- */
:root {
  --color-bg-dark: #ffffff;
  --color-bg-section: #f6f5ff;
  --color-bg-card: #ffffff;
  --color-primary: #6c3fe6;
  --color-primary-light: #8b5cf6;
  --color-primary-dark: #5228cc;
  --color-accent: #00b4d8;
  --color-text: #4a4a68;
  --color-text-muted: #6b7280;
  --color-text-heading: #1a1b3a;
  --color-border: rgba(108, 63, 230, 0.12);
  --color-border-hover: rgba(108, 63, 230, 0.35);
  --color-gradient-start: #6c3fe6;
  --color-gradient-end: #00b4d8;
  --color-success: #10b981;
  --color-white: #ffffff;

  --font-primary:
    "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --font-heading:
    "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 4px 30px rgba(108, 63, 230, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 10px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  --max-width: 1200px;
  --nav-height: 80px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-drag: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-dark);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(108, 63, 230, 0.15);
  color: var(--color-text-heading);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

/* ul {
  list-style: none;
} */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
h3 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
}
h4 {
  font-size: 1.2rem;
}

p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

/* ---------- Utility Classes ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.section--alt {
  background-color: var(--color-bg-section);
}

.section__header {
  text-align: center;
  margin-bottom: 4rem;
}

.section__subtitle {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-primary-light);
  margin-bottom: 1rem;
}

.section__title {
  margin-bottom: 1rem;
}

.section__desc {
  max-width: 650px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--color-gradient-start),
    var(--color-gradient-end)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center {
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: var(--font-primary);
  text-transform: none;
  letter-spacing: 0.3px;
}

.btn--primary {
  background: linear-gradient(
    135deg,
    var(--color-gradient-start),
    var(--color-primary-light)
  );
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(108, 63, 230, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(108, 63, 230, 0.6);
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-border-hover);
}

.btn--outline:hover {
  background: rgba(108, 63, 230, 0.06);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

.btn__arrow {
  transition: transform var(--transition-fast);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding-top: 1rem;
  /* height: var(--nav-height); */
  z-index: 99999;
  transition: all var(--transition-normal);
  background: transparent;
}

.navbar.scrolled {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled .navbar__logo-icon {
  width: 40px;
  height: 40px;
  transition: all var(--transition-normal);
}

.navbar .navbar__logo {
  gap: 15px !important;
  width: 100%;
}

.navbar .navbar__logo span {
  font-size: 25px;
  transition: all var(--transition-normal);
}

.navbar.scrolled .navbar__logo span {
  font-size: 20px;
  transition: all var(--transition-normal);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 1001;
}

.navbar__logo-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-normal);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.navbar__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  padding: 0.25rem 0;
}

.navbar__link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--color-gradient-start),
    var(--color-gradient-end)
  );
  transition: width var(--transition-normal);
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--color-text-heading);
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

.navbar__cta {
  margin-left: 1rem;
  text-wrap: nowrap;
}

/* Mobile Menu Toggle */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 5px;
}

.navbar__toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #ffffff;
  transition: all var(--transition-normal);
  border-radius: 2px;
}

.navbar__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
  background: #1a1b3a;
  color: #e2e8f0;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-gradient {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.hero__bg-gradient--1 {
  top: -100px;
  right: -100px;
  background: var(--color-primary);
  opacity: 0.15;
}

.hero__bg-gradient--2 {
  bottom: -200px;
  left: -200px;
  background: var(--color-accent);
  opacity: 0.12;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 63, 230, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 63, 230, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__image {
  position: relative;
  z-index: 1;
}

.hero__image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* Navbar on dark hero - light text by default, dark when scrolled */
.navbar .navbar__link {
  color: rgba(255, 255, 255, 0.7);
}

.navbar .navbar__link:hover,
.navbar .navbar__link.active {
  color: #ffffff;
}

.navbar .navbar__logo {
  color: #ffffff;
}

.navbar.scrolled .navbar__link {
  color: var(--color-text-muted);
}

.navbar.scrolled .navbar__link:hover,
.navbar.scrolled .navbar__link.active {
  color: var(--color-text-heading);
}

.navbar.scrolled .navbar__logo {
  color: var(--color-text-heading);
}

.navbar.scrolled .navbar__toggle span {
  background: var(--color-text-heading);
}

.hero__image::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: calc(var(--radius-lg) + 8px);
  background: linear-gradient(
    135deg,
    var(--color-gradient-start),
    var(--color-gradient-end)
  );
  opacity: 0.25;
  z-index: -1;
}

.about-intro__image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-intro__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
  border-radius: var(--radius-lg);
}

.about-intro__image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(26, 27, 58, 0.9), transparent);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.about-intro__image-stats {
  display: flex;
  gap: 2rem;
}

.about-intro__image-stat {
  text-align: center;
}

.about-intro__image-stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
}

.about-intro__image-stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.15rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  background: rgba(108, 63, 230, 0.2);
  border: 1px solid rgba(108, 63, 230, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: #b4a0f4;
  margin-bottom: 1.5rem;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.hero__title {
  margin-bottom: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: #a0a3c0;
  margin-bottom: 2.5rem;
  max-width: 600px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
}

.hero__stat-label {
  font-size: 0.85rem;
  color: #8789a8;
  margin-top: 0.25rem;
}

.hero .btn--outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.hero .btn--outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

/* ---------- Services Cards ---------- */
.services-grid:has(.service-card) {
  display: grid;
  /* grid-template-columns: repeat(2, 1fr); */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-gradient-start),
    var(--color-gradient-end)
  );
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-border-hover);
  box-shadow: 0 8px 30px rgba(108, 63, 230, 0.12);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(108, 63, 230, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.service-card__title {
  margin-bottom: 1rem;
}

.service-card__desc {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary-light);
}

.service-card__link:hover {
  color: var(--color-accent);
}

.service-card__link-arrow {
  transition: transform var(--transition-fast);
}

.service-card__link:hover .service-card__link-arrow {
  transform: translateX(4px);
}

.services-grid:has(.why-card) {
  display: grid;
  /* grid-template-columns: repeat(4, 1fr); */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* ---------- Tech Stack ---------- */
.tech-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.tech-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.tech-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
}

.tech-card__title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  color: var(--color-primary-light);
}

.tech-card__icons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.tech-card__icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.tech-card__icon-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.tech-card__icon-item span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
}

.tech-tagline {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  font-style: italic;
  color: var(--color-primary-light);
  letter-spacing: 0.02em;
}

/* ---------- Service-Mapped Tech (Services Page) ---------- */
.tech-service-map {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tech-service-row {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 2rem;
  align-items: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.tech-service-row:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tech-service-row__info {
  border-right: 1px solid var(--color-border);
  padding-right: 2rem;
}

.tech-service-row__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 0.4rem;
}

.tech-service-row__desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

.tech-service-row__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: flex-start;
}

.tech-service-row__icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 60px;
}

.tech-service-row__icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.tech-service-row__icon:hover img {
  transform: scale(1.12);
}

.tech-service-row__icon span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.tech-item:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
}

.tech-item__icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-item__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

/* ---------- Why Choose Us ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.why-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.why-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
}

.why-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: rgba(108, 63, 230, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.why-card__title {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.why-card__desc {
  font-size: 0.9rem;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(
    135deg,
    var(--color-primary-dark),
    var(--color-primary)
  );
  border-radius: var(--radius-lg);
  padding: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.cta-banner__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
  position: relative;
  color: #fff !important;
}

.cta-banner__desc {
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin: 0 auto 2rem;
  position: relative;
}

.cta-banner .btn--outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.cta-banner .btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  color: #ffffff;
}

/* ---------- About Page ---------- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-intro__content h2 {
  margin-bottom: 1.5rem;
}

.about-intro__content p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-intro__visual {
  background: var(--color-bg-section);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-stat {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  background: rgba(108, 63, 230, 0.05);
  border-radius: var(--radius-sm);
}

.about-stat__number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary-light);
  min-width: 80px;
}

.about-stat__text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.value-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.value-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
}

.value-card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.value-card__title {
  margin-bottom: 0.5rem;
}

/* ---------- Services Page Detailed ---------- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}

.service-detail:nth-child(even) {
  direction: rtl;
}

.service-detail:nth-child(even) > * {
  direction: ltr;
}

.service-detail__content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.service-detail__features {
  margin-top: 1.5rem;
}

.service-detail__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.service-detail__feature-icon {
  color: var(--color-success);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.service-detail__visual {
  background: var(--color-bg-section);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

/* ---------- Contact Page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-info__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(108, 63, 230, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-info__text h4 {
  margin-bottom: 0.25rem;
}

.contact-info__text p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.contact-form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-bg-section);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-heading);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(108, 63, 230, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Container for relative positioning */
.input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

/* The actual Input */
.input-field {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  background: transparent;
  outline: none;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s;
}

/* Change border color on focus */
.input-field:focus {
  border-color: #6c3fe6;
}

/* The Label (Sitting on top of the input) */
.input-label {
  position: absolute;
  line-height: 1;
  left: 1rem;
  top: 1rem;
  color: #999;
  pointer-events: none; /* Allows clicks to pass through to the input */
  transition: all 0.2s ease;
  background-color: var(
    --color-bg-section
  ); /* Matches page background to 'cut' the border */
  padding: 0 5px;
}

.input-label.visible {
  z-index: 1;
}

/* THE MAGIC: Move label when focused OR when the input isn't empty */
.input-field:focus ~ .input-label,
.input-field:not(:placeholder-shown):not(select) ~ .input-label,
select.input-field:valid ~ .input-label {
  top: -0.35rem; /* Moves it up to the border line */
  left: 0.8rem;
  font-size: 0.8rem;
  color: #6c3fe6;
  font-weight: 600;
}

.input-field:focus + .input-label,
.input-field:not(:placeholder-shown):not(select) + .input-label,
select.input-field:valid + .input-label {
  background: transparent !important;
}

.input-field:focus ~ .input-label:last-child,
.input-field:not(:placeholder-shown):not(select) ~ .input-label:last-child,
select.input-field:valid ~ .input-label:last-child {
  top: 0px !important;
  color: transparent !important;
}

/* Specific styling for the select to remove default browser styling */
select.input-field {
  appearance: none; /* Removes default arrow */
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

/* Page Header - force dark nav on non-hero pages */
.page-header {
  padding: calc(var(--nav-height) + 4rem) 0 4rem;
  text-align: center;
  background: var(--color-bg-section);
  position: relative;
  overflow: hidden;
}

/* Non-hero pages: navbar should always look scrolled (dark text) */
body:not(:has(.hero)) .navbar .navbar__link {
  color: var(--color-text-muted);
}

body:not(:has(.hero)) .navbar .navbar__link:hover,
body:not(:has(.hero)) .navbar .navbar__link.active {
  color: var(--color-text-heading);
}

body:not(:has(.hero)) .navbar .navbar__logo {
  color: var(--color-text-heading);
}

body:not(:has(.hero)) .navbar .navbar__toggle span {
  background: var(--color-text-heading);
}

body:not(:has(.hero)) .navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
  padding-top: 1rem;
  padding-bottom: 1rem;
  transition: all var(--transition-normal);
}

body:not(:has(.hero)) .navbar.scrolled {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  transition: all var(--transition-normal);
}

.page-header::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.04;
  filter: blur(80px);
}

.page-header__title {
  margin-bottom: 1rem;
}

.page-header__desc {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */
.footer {
  background: #1a1b3a;
  border-top: 1px solid rgba(108, 63, 230, 0.15);
  padding: 4rem 0 0;
  color: #c4c6d8;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  max-width: 300px;
  color: #ffffff;
}

.footer .navbar__logo {
  color: #ffffff;
  gap: 15px !important;
}

.footer__heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer__link {
  display: block;
  font-size: 0.9rem;
  color: #ffffff;
  padding: 0.3rem 0;
  transition: all var(--transition-fast);
}

.footer__link:hover {
  color: #ffffff;
  padding-left: 5px;
}

.footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer__social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(108, 63, 230, 0.2);
  color: #c4c6d8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  font-size: 0.9rem;
}

.footer__social-link:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-3px);
}

.footer__bottom {
  border-top: 1px solid rgba(108, 63, 230, 0.15);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #ffffff;
}

.footer__bottom-links {
  display: flex;
  gap: 1.5rem;
}

/* ---------- Scroll Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- LEGAL PAGES --- */

.legal-section ul li {
  margin-left: 20px;
}

/* --- END OF LEGAL PAGES --- */

/* ---------- Responsive ---------- */

@media (max-height: 800px) {
  .hero__title {
    font-size: 40px !important;
  }

  .hero__subtitle {
    font-size: 1rem !important;
  }
}

@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero__image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }

  .services-grid,
  .why-grid,
  .tech-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* .services-grid:has(.why-card) {
    grid-template-columns: repeat(2, 1fr);
  } */

  .about-intro,
  .service-detail,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .service-detail:nth-child(even) {
    direction: ltr;
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html:has(.navbar__links.open) {
    overflow: hidden;
  }

  .navbar.scrolled .navbar__link:hover,
  .navbar.scrolled .navbar__link.active {
    color: #ffffff;
  }

  body:not(:has(.hero)) .navbar .navbar__link:hover,
  body:not(:has(.hero)) .navbar .navbar__link.active {
    color: #fff;
  }

  .navbar__links {
    position: fixed;
    top: 82px;
    right: -100%;
    width: 100%;
    /* max-width: 350px; */
    height: calc(100vh - 82px);
    /* background: #ffffff; */
    background: #1a1b3a;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right var(--transition-normal);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 9999;
  }

  .navbar.scrolled .navbar__links {
    top: 72.38px;
    height: calc(100dvh - 72.38px);
  }

  .navbar .navbar__link,
  .navbar .navbar__link.active {
    font-size: 1.6rem;
    /* color: var(--color-text-heading); */
  }
  .navbar__links.open {
    right: 0;
  }

  .navbar__toggle {
    display: flex;
  }

  .navbar__cta {
    margin-left: 0;
  }

  .hero__stats {
    gap: 2rem;
    flex-wrap: wrap;
  }

  .services-grid,
  .why-grid,
  .tech-cards-grid {
    grid-template-columns: 1fr;
  }

  .tech-service-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .tech-service-row__info {
    border-right: none;
    padding-right: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .tech-service-row__icons {
    justify-content: center;
  }

  .cta-banner {
    padding: 3rem 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: unset;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + 3rem) 0 3rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .navbar__logo-icon {
    height: 50px;
    width: 50px;
  }

  .navbar .navbar__logo span {
    font-size: 22px;
  }

  /* ---------- Mobile Overlay ---------- */
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
  }

  .mobile-overlay.active {
    display: block;
  }

  /* ---------- Legal Pages (Privacy Policy & Terms of Service) ---------- */
  .legal-content {
    max-width: 900px;
    margin: 0 auto;
  }

  .legal-section {
    margin-bottom: 3rem;
  }

  .legal-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-heading);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
  }

  .legal-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text-heading);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .legal-section p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 1rem;
  }

  .legal-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
  }

  .legal-section ul li {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
  }

  .legal-section a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
  }

  .legal-section a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
  }

  .legal-section strong {
    font-weight: 600;
    color: var(--color-text-heading);
  }

  .legal-section em {
    font-style: italic;
  }
}

@media (min-width: 769px) {
  .legal-section h2 {
    font-size: 2rem;
  }

  .legal-section h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .legal-content {
    padding: 0 1rem;
  }

  .legal-section h2 {
    font-size: 1.5rem;
  }

  .legal-section h3 {
    font-size: 1.25rem;
  }

  .legal-section p,
  .legal-section ul li {
    font-size: 1rem;
  }
}
