/* ===== CSS Custom Properties ===== */
:root {
  --bg-primary: #13131F;
  --bg-secondary: #1a1a2e;
  --text-primary: #F5F5F5;
  --text-secondary: #b0b0c0;
  --accent-purple: #6F70FE;
  --accent-cyan: #00C4CC;
  --accent-red: #FF4D4D;
  --border-color: rgba(111, 112, 254, 0.2);
  --card-bg: #1a1a2e;
  --header-bg: rgba(19, 19, 31, 0.95);
  --input-bg: #1a1a2e;
  --input-border: rgba(111, 112, 254, 0.3);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg-primary: #F5F5F5;
  --bg-secondary: #FFFFFF;
  --text-primary: #13131F;
  --text-secondary: #555566;
  --border-color: rgba(111, 112, 254, 0.15);
  --card-bg: #FFFFFF;
  --header-bg: rgba(245, 245, 245, 0.95);
  --input-bg: #FFFFFF;
  --input-border: #d0d0dd;
  color-scheme: light;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #13131F;
}

[data-theme="light"] html,
html[data-theme="light"] {
  background-color: #F5F5F5;
}

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

img, svg {
  max-width: 100%;
  height: auto;
}

/* ===== Focus Styles ===== */
:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(19, 19, 31, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.3s ease;
}

[data-theme="light"] .header {
  background-color: rgba(245, 245, 245, 0.75);
}

.header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 196, 204, 0.5) 50%, transparent 100%);
  pointer-events: none;
}

.header--scrolled {
  background-color: rgba(19, 19, 31, 0.97);
}

[data-theme="light"] .header--scrolled {
  background-color: rgba(245, 245, 245, 0.97);
}

.header.header--scrolled .container {
  height: 60px;
}

.header.header--scrolled .header__logo svg {
  height: 32px;
}

.header--scrolled ~ #mobile-menu {
  top: 60px;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  transition: height 0.3s ease;
}

.header__logo {
  display: flex;
  align-items: center;
  height: 60px;
}

.header__logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: height 0.3s ease;
}

.header__logo svg path:not(:first-child) {
  fill: var(--accent-cyan);
}

[data-theme="light"] .header__logo svg g > path:first-child {
  fill: #F5F5F5;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__list {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-purple);
  transition: width 0.3s ease;
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--accent-purple);
}

.nav__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
  min-width: 44px;
  min-height: 44px;
}

.nav__btn:hover {
  border-color: var(--accent-purple);
  background-color: rgba(111, 112, 254, 0.1);
}

.nav__btn svg {
  width: 18px;
  height: 18px;
}

/* ===== Nav pill ===== */
.nav__pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 4px 0;
}

[data-theme="light"] .nav__pill {
  background: rgba(0, 0, 0, 0.04);
}

.nav__pill .nav__link {
  padding: 6px 18px;
  border-radius: 100px;
}

.nav__pill .nav__link::after {
  display: none;
}

@media (hover: hover) {
  .nav__pill .nav__link:hover {
    background-color: rgba(111, 112, 254, 0.12);
  }
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger svg {
  width: 24px;
  height: 24px;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero__tagline {
  font-family: 'Poppins', sans-serif;
  font-size: 5.5rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn--primary {
  background-color: var(--accent-cyan);
  color: #000000;
}

.btn--primary:hover {
  background-color: #00d4e6;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 196, 204, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--accent-purple);
  border: 2px solid var(--accent-purple);
}

.btn--outline:hover {
  background-color: rgba(111, 112, 254, 0.1);
  transform: translateY(-2px);
}

.btn--hero-cta {
  background: var(--accent-cyan);
  color: #000000;
  border: 2px solid var(--accent-cyan);
  padding: 14px 40px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
  animation: cta-glow-pulse 2.5s ease-out infinite;
}

.btn--hero-cta::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: left 550ms ease;
  pointer-events: none;
}

@media (hover: hover) {
  .btn--hero-cta:hover {
    transform: scale(1.04);
    box-shadow: 0 0 32px rgba(0, 196, 204, 0.65);
    animation: none;
  }

  .btn--hero-cta:hover::after {
    left: 130%;
  }
}

.btn--hero-cta:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

@keyframes cta-glow-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(0, 196, 204, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(0, 196, 204, 0);    }
  100% { box-shadow: 0 0 0 0    rgba(0, 196, 204, 0);    }
}

.hero__scroll {
  margin-top: 48px;
  color: var(--text-secondary);
  opacity: 0.5;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll { animation: none; }
}

/* ===== Tech Stack Carousel ===== */
.stack {
  padding: 56px 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.stack__title {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

/* Fade edges left and right using CSS mask */
.stack__track-wrapper {
  position: relative;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

/* The moving belt — contains two identical logo rows */
.stack__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: carousel-scroll 30s linear infinite;
  animation-play-state: paused;
}

.stack__track.is-ready {
  animation-play-state: running;
}

.stack__track:hover {
  animation-play-state: paused;
}

/* One set of logos */
.stack__logos {
  display: flex;
  align-items: center;
  gap: 56px;
  padding: 0 28px;
}

.stack__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  width: 110px;
  cursor: default;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

.stack__logo:hover {
  opacity: 1;
}

.stack__logo img {
  height: 40px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  filter: grayscale(1);
  transition: filter 0.3s ease;
}

.stack__logo:hover img {
  filter: grayscale(0);
}

.stack__logo span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* The scroll animation — moves exactly one full logo-set width */
@keyframes carousel-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Reduced motion — freeze carousel, show static grid instead */
@media (prefers-reduced-motion: reduce) {
  .stack__track {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Hide the duplicate set */
  .stack__logos:last-child {
    display: none;
  }

  .stack__logos {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
  }
}

/* ===== Services Section ===== */
.services {
  padding: 80px 0;
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease;
}

.section__title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 56px;
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  margin: 16px auto 0;
  border-radius: 2px;
}

.section__subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: -36px;
  margin-bottom: 48px;
}

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

.service-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
  box-shadow: 0 8px 30px rgba(111, 112, 254, 0.15);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--accent-cyan);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.service-card__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Process Section ===== */
.process {
  padding: 80px 0;
  background-color: var(--bg-primary);
}

.process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
  position: relative;
}

.process__steps::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  opacity: 0.4;
  z-index: 0;
}

.process__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.process__step::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 196, 204, 0.4);
}

.process__date {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.process__step h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.process__step p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (max-width: 768px) {
  .process__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    padding-top: 0;
  }

  .process__steps::before {
    display: none;
  }

  .process {
    padding: 48px 0;
  }
}

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

/* ===== Contact Section ===== */
.contact {
  padding: 80px 0;
}

.contact__wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.contact__subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.contact__info {
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact__info a {
  color: var(--accent-cyan);
  transition: color 0.3s ease;
}

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

.contact__whatsapp {
  text-align: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.contact__whatsapp p {
  margin-bottom: 20px;
}

.btn--whatsapp {
  background-color: #25D366;
  color: #000000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn--whatsapp:hover {
  background-color: #20bd5a;
  transform: translateY(-2px);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form__input {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background-color: var(--input-bg);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form__input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.form__input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(111, 112, 254, 0.15);
}

.form__input--error {
  border-color: var(--accent-red);
}

textarea.form__input {
  resize: vertical;
  min-height: 100px;
}

.form__input--error:focus {
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.15);
}

.form__error {
  font-size: 0.8rem;
  color: var(--accent-red);
  display: none;
}

.form__error--visible {
  display: block;
}

.form__actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.form__next-steps {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 16px;
  line-height: 1.6;
}

.form__success {
  text-align: center;
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 1rem;
  padding: 16px;
  border: 1px solid var(--accent-cyan);
  border-radius: 8px;
  background-color: rgba(0, 196, 204, 0.1);
  display: none;
}

.form__success--visible {
  display: block;
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0 24px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
}

.footer__logo {
  display: flex;
  align-items: center;
  height: 28px;
  flex-shrink: 0;
}

.footer__logo svg {
  height: 28px;
  width: auto;
}

.footer__nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__nav a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

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

.footer__social {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
}

.footer__social a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

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

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer__sep {
  opacity: 0.35;
}

.footer__email-link {
  color: var(--accent-cyan);
  transition: color 0.3s ease;
}

.footer__email-link:hover {
  color: var(--accent-purple);
}

@media (max-width: 768px) {
  .footer__top {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .footer__sep {
    display: none;
  }
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-primary);
  z-index: 999;
  padding: 32px 24px;
  transition: background-color 0.3s ease;
}

.mobile-menu--open {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-menu .nav__link {
  font-size: 1.25rem;
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero__tagline {
    font-size: 3.5rem;
  }

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

@media (max-width: 768px) {
  .nav__pill {
    display: none;
  }

  .nav .nav__controls {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .hero__tagline {
    font-size: 2.8rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .services {
    padding: 48px 0;
  }

  .contact {
    padding: 48px 0;
  }

  .section__title {
    font-size: 1.8rem;
    margin-bottom: 40px;
  }

  .service-card {
    padding: 24px;
  }

}

@media (max-width: 480px) {
  .hero__tagline {
    font-size: 2.8rem;
  }

  .hero__subtitle {
    font-size: 0.9rem;
  }

  .container {
    padding: 0 16px;
  }

  .header .container {
    height: 64px;
  }

  .mobile-menu {
    top: 64px;
  }
}

/* ===== Loading state for submit button ===== */
.btn--loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

/* ===== Accessibility: reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

