/* Reset y Variables CSS */
:root {
  /* Digital Alchemy Palette */
  --primary: hsl(120, 100%, 50%);
  /* Neon Green similar to #39ff14 */
  --primary-dark: hsl(120, 100%, 40%);
  --primary-glow: hsl(120, 100%, 60%);

  --background: hsl(0, 0%, 5%);
  /* Deeper Black */
  --background-secondary: hsl(0, 0%, 8%);

  --foreground: hsl(0, 0%, 95%);
  --foreground-muted: hsl(0, 0%, 70%);

  --card: hsla(0, 0%, 12%, 0.6);
  /* Glassmorphism base */
  --card-border: hsla(120, 100%, 50%, 0.15);

  --muted: hsl(0, 0%, 15%);
  --muted-foreground: hsl(0, 0%, 65%);

  --border: hsla(0, 0%, 100%, 0.1);
  --radius: 0.75rem;

  --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
  --font-body: 'Roboto', 'Inter', -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Pattern - subtle digital noise */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 15% 50%, hsla(120, 100%, 40%, 0.03) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, hsla(120, 100%, 40%, 0.02) 0%, transparent 25%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Navigation */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: all 0.3s ease;
  backdrop-filter: blur(0);
}

.nav-fixed.scrolled {
  background: hsla(0, 0%, 5%, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--foreground);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--primary);
  filter: drop-shadow(0 0 5px var(--primary));
}

.logo-text {
  background: linear-gradient(90deg, #fff, var(--primary-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu-desktop {
  display: none;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-menu-desktop {
    display: flex;
  }
}

.nav-link {
  color: var(--foreground-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s;
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  box-shadow: 0 0 8px var(--primary);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta-desktop {
  display: none !important;
}

@media (min-width: 768px) {
  .nav-cta-desktop {
    display: block !important;
  }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 1001;
  /* Ensure above mobile menu */
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  width: 28px;
  height: 2px;
  background: var(--foreground);
  transition: all 0.3s;
  border-radius: 2px;
}

/* Mobile Menu */
.nav-menu-mobile {
  position: fixed;
  top: 4.5rem;
  left: 0;
  right: 0;
  background: hsla(0, 0%, 5%, 0.98);
  backdrop-filter: blur(15px);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid var(--border);
}

.nav-menu-mobile.open {
  max-height: 100vh;
  padding: 1rem 0 2rem;
}

.nav-link-mobile {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--foreground);
  text-decoration: none;
  font-size: 1.1rem;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.nav-link-mobile:hover {
  background: hsla(120, 100%, 50%, 0.05);
  color: var(--primary);
  border-left-color: var(--primary);
}

/* Buttons */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 2rem;
  /* More rounded modern look */
  font-weight: 600;
  font-family: var(--font-heading);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  /* High contrast text on neon green */
  box-shadow: 0 0 15px hsla(120, 100%, 50%, 0.4);
}

.btn-primary:hover {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 0 25px hsla(120, 100%, 50%, 0.6);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: inset 0 0 0 0 var(--primary);
}

.btn-outline:hover {
  background: hsla(120, 100%, 50%, 0.1);
  box-shadow: 0 0 15px hsla(120, 100%, 50%, 0.2);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  filter: grayscale(100%) contrast(1.2);
  /* Stylized hero bg */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, var(--background) 90%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: var(--primary);
  border-radius: 50%;
  animation: float-rise 10s infinite linear;
  opacity: 0;
}

@keyframes float-rise {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  20% {
    opacity: 0.6;
  }

  80% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-20vh) scale(1.5);
    opacity: 0;
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 64rem;
  padding: 0 1.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 5.5rem;
  }
}

.hero-title-primary {
  display: block;
  color: var(--primary);
  text-shadow: 0 0 30px hsla(120, 100%, 50%, 0.5);
  margin-bottom: 0.5rem;
}

.hero-title-subtitle {
  display: block;
  font-size: 1.5rem;
  color: #fff;
  font-weight: 300;
}

@media (min-width: 768px) {
  .hero-title-subtitle {
    font-size: 2.25rem;
  }
}

.hero-description {
  font-size: 1.125rem;
  color: var(--foreground-muted);
  margin-bottom: 2.5rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.35rem;
  }
}

.hero-description strong {
  color: #fff;
  font-weight: 600;
  position: relative;
}

.hero-description strong::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  /* thick underline */
  background: hsla(120, 100%, 50%, 0.3);
  z-index: -1;
  transform: translateY(-2px);
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    gap: 1.5rem;
  }
}

/* Sections */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-alt {
  background: transparent;
  /* Rely on body bg */
}

.section-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: hsla(0, 0%, 100%, 0.02);
  z-index: -1;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.text-primary {
  color: var(--primary);
  text-shadow: 0 0 15px hsla(120, 100%, 50%, 0.4);
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 48rem;
  margin: 0 auto;
  font-weight: 300;
}

.text-center {
  text-align: center;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, hsla(120, 100%, 50%, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 40px -10px hsla(0, 0%, 0%, 0.5);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 3.5rem;
  height: 3.5rem;
  padding: 0.85rem;
  background: hsla(120, 100%, 50%, 0.1);
  border: 1px solid var(--primary-dark);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  box-shadow: 0 0 15px hsla(120, 100%, 50%, 0.2);
  transition: all 0.3s;
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 25px hsla(120, 100%, 50%, 0.5);
  border-color: var(--primary);
}

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

.service-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
  transition: color 0.3s;
}

.service-card:hover .service-title {
  color: #fff;
}

.service-description {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portfolio-item {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s;
  display: block;
}

.portfolio-item:hover {
  transform: translateY(-8px);
}

.portfolio-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  aspect-ratio: 16/9;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: grayscale(20%);
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.portfolio-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.portfolio-item:hover .portfolio-image::after {
  opacity: 1;
}

.portfolio-category {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px hsla(120, 100%, 50%, 0.3);
}

.portfolio-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  transition: color 0.3s;
}

.portfolio-item:hover .portfolio-title {
  color: #fff;
  text-shadow: 0 0 20px hsla(120, 100%, 50%, 0.2);
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  max-width: 64rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr 1.5fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.contact-item:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px hsla(120, 100%, 50%, 0.1);
}

.contact-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--primary);
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px var(--primary));
}

.contact-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #fff;
}

.contact-item a,
.contact-item p {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}

.contact-item a:hover {
  color: var(--primary);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--card);
  padding: 2.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--foreground);
  margin-left: 0.25rem;
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  background: hsla(0, 0%, 0%, 0.3);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: #fff;
  /* Input text white */
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px hsla(120, 100%, 50%, 0.15);
  background: hsla(0, 0%, 0%, 0.5);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: hsla(0, 0%, 3%, 0.8);
  backdrop-filter: blur(10px);
  padding: 5rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    max-width: 64rem;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.footer-logo .footer-icon {
  color: var(--primary);
  filter: drop-shadow(0 0 5px var(--primary));
}

.footer-icon {
  width: 2.5rem;
  height: 2.5rem;
}

.footer-brand p {
  color: var(--muted-foreground);
  line-height: 1.8;
  font-size: 1.05rem;
  max-width: 24rem;
}

.footer-contact h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #fff;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-contact-item svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
  filter: drop-shadow(0 0 2px var(--primary));
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-bottom p {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
}

/* Service Detail Page */
.service-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

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

  .service-detail-reverse {
    direction: rtl;
  }

  .service-detail-reverse>* {
    direction: ltr;
  }
}

.service-detail-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.service-icon-large {
  width: 5rem;
  height: 5rem;
  padding: 1.25rem;
  background: hsla(120, 100%, 50%, 0.1);
  border: 1px solid var(--primary);
  border-radius: 1.5rem;
  color: var(--primary);
  box-shadow: 0 0 30px hsla(120, 100%, 50%, 0.2);
}

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

.service-detail-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.service-detail-description {
  font-size: 1.15rem;
  color: var(--muted-foreground);
  line-height: 1.8;
}

.service-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--foreground);
}

.service-features li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 5px var(--primary);
}

.service-detail-info {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 10px 40px -10px hsla(0, 0, 0, 0.5);
}

.service-detail-info p {
  font-size: 1.05rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* Cookie Banner */
#cookieBanner {
  display: none;
}

@media (min-width: 768px) {
  #cookieBanner>.container>div {
    flex-direction: row;
    align-items: center;
  }

  #cookieBanner>.container>div>div:last-child {
    flex-direction: row;
    width: auto;
  }

  #cookieBanner button {
    width: auto !important;
  }
}

/* Animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}