/* ============ RESET + VARIABLES ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy-deep: #050a18;
  --navy: #0a1628;
  --blue-bright: #378ADD;
  --blue-glow: #5DCAFF;
  --blue-soft: #85B7EB;
  --purple: #7F77DD;
  --green-soft: #97C459;
  --green-wpp: #25D366;
  --red-error: #E5484D;
}

html, body {
  background: var(--navy-deep);
  color: #fff;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }


/* ============ HEADER (logo + lang) ============ */
.site-header {
  position: absolute;
  top: 24px;
  left: 6vw;
  right: 6vw;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.site-header > * { pointer-events: auto; }

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo img {
  width: 40px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(55, 138, 221, 0.4));
}

.brand-logo .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #fff;
}

.brand-tag {
  font-size: 9px;
  letter-spacing: 0.25em;
  color: rgba(133, 183, 235, 0.8);
  margin-top: 4px;
}

.lang-selector {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(10px);
}

.lang-btn {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.25s ease;
  font-family: inherit;
}

.lang-btn:hover { color: rgba(255, 255, 255, 0.85); }
.lang-btn.active { color: #fff; background: rgba(55, 138, 221, 0.25); }


/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 6vw;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
      rgba(55, 138, 221, 0.12) 0%,
      rgba(55, 138, 221, 0.04) 25%,
      transparent 55%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
  transition: background 0.3s ease-out;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(55, 138, 221, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 138, 221, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.hero-text { position: relative; z-index: 5; max-width: 540px; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--blue-soft);
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid rgba(55, 138, 221, 0.3);
  border-radius: 999px;
  background: rgba(55, 138, 221, 0.05);
  backdrop-filter: blur(8px);
}

.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--blue-glow);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 8px var(--blue-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

h1 {
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

h1 .word { display: inline-block; perspective: 800px; }

h1 .word span {
  display: inline-block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}

h1 .accent {
  background: linear-gradient(135deg, var(--blue-glow) 0%, var(--blue-bright) 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
}

.subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 36px;
  max-width: 480px;
}

.cta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.btn-primary {
  position: relative;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--blue-bright), var(--purple));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease;
  font-family: inherit;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-glow), var(--blue-bright));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary span { position: relative; z-index: 1; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  padding: 14px 24px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-ghost:hover { border-color: var(--blue-bright); color: #fff; }

.hero-visual {
  position: relative;
  height: 80vh;
  max-height: 720px;
  perspective: 1200px;
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  will-change: transform;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.layer-circuits { background-image: url('../assets/circuits.png'); opacity: 0.95; }
.layer-lion { background-image: url('../assets/lion.png'); filter: drop-shadow(0 0 30px rgba(55, 138, 221, 0.4)); }

.pulse-network { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.pulse-network svg { width: 100%; height: 100%; }
.pulse-line { fill: none; stroke: rgba(55, 138, 221, 0.25); stroke-width: 1.5; }
.pulse-dot { fill: var(--blue-glow); filter: drop-shadow(0 0 6px var(--blue-glow)); }

.particle {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--blue-glow);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--blue-glow);
  pointer-events: none;
  opacity: 0;
  animation: float-up 6s linear infinite;
}

@keyframes float-up {
  0% { opacity: 0; transform: translateY(20px); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-200px); }
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  letter-spacing: 0.3em;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-hint::after {
  content: "";
  width: 1px; height: 30px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.4), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(8px); opacity: 1; }
}


/* ============ SERVICIOS STICKY ============ */
.services-wrapper { position: relative; height: 400vh; }

.services-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--navy-deep);
}

.services-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a2942 0%, #0a1628 60%, #1f2d4a 100%);
  transition: background 0.8s ease;
}

.project-visual {
  position: absolute;
  right: -8%;
  top: 50%;
  width: 70%;
  max-width: 900px;
  aspect-ratio: 4/3;
  transform: translateY(-50%) perspective(1200px) rotateY(-18deg) rotateX(8deg);
  border-radius: 14px;
  border: 0.5px solid rgba(55, 138, 221, 0.35);
  background: linear-gradient(135deg, #1a2942, #142036);
  overflow: hidden;
  transition: opacity 0.6s ease, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(55, 138, 221, 0.15);
}

.project-visual.fade {
  opacity: 0;
  transform: translateY(-50%) perspective(1200px) rotateY(-18deg) rotateX(8deg) translateX(50px);
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-visual img.active { opacity: 1; }

/* Indicadores del carrusel de fotos por proyecto */
.photo-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.photo-dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.photo-dot.active {
  background: var(--blue-glow);
  width: 20px;
  border-radius: 999px;
}

@media (min-width: 1400px) {
  .project-visual { width: 65%; right: -5%; }
}
@media (max-width: 1100px) {
  .project-visual { width: 75%; right: -12%; }
}

.services-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(5,10,24,0.98) 0%,
    rgba(5,10,24,0.92) 25%,
    rgba(5,10,24,0.7) 45%,
    rgba(5,10,24,0.2) 65%,
    transparent 85%);
  pointer-events: none;
}

.services-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 6vw;
  z-index: 2;
}

.service-text {
  max-width: 600px;
  width: 50%;
  transition: opacity 0.5s ease, transform 0.6s ease;
  position: relative;
  z-index: 3;
}

@media (max-width: 1100px) { .service-text { width: 55%; } }

.service-text.fade { opacity: 0; transform: translateY(20px); }

.service-counter {
  color: rgba(133, 183, 235, 0.6);
  font-size: 11px;
  letter-spacing: 0.3em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-counter .num-current { color: #fff; }

.service-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.service-title .accent {
  background: linear-gradient(135deg, var(--blue-glow), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
}

.service-desc {
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 28px;
  max-width: 420px;
}

.service-projects-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  letter-spacing: 0.3em;
  margin-bottom: 10px;
}

.service-project-name {
  color: var(--blue-glow);
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-project-name::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--blue-glow);
}

.services-progress {
  position: absolute;
  right: 32px;
  bottom: 40px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.progress-item {
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.4s ease;
}

.progress-item::after {
  content: "";
  width: 24px; height: 1px;
  background: rgba(255, 255, 255, 0.2);
  transition: width 0.4s ease, background 0.4s ease;
}

.progress-item.active { color: var(--blue-glow); }
.progress-item.active::after { width: 48px; background: var(--blue-glow); }


/* ============ CONTACTO + BUILDER ============ */
.contact {
  position: relative;
  padding: 140px 6vw 80px;
  background: var(--navy-deep);
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(127, 119, 221, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(55, 138, 221, 0.1) 0%, transparent 45%);
  pointer-events: none;
}

.contact::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(55, 138, 221, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 138, 221, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.contact-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--blue-soft);
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid rgba(55, 138, 221, 0.3);
  border-radius: 999px;
  background: rgba(55, 138, 221, 0.05);
}

.contact-title {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 900px;
}

.contact-title .accent {
  background: linear-gradient(135deg, var(--blue-glow), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
}

.contact-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 48px;
  max-width: 600px;
}

.contact-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 64px;
  max-width: 580px;
}

.contact-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(8px);
}

.contact-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(93, 202, 255, 0.08), rgba(127, 119, 221, 0.08));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(93, 202, 255, 0.4);
  box-shadow: 0 12px 40px rgba(55, 138, 221, 0.15);
}

.contact-btn:hover::before { opacity: 1; }

.contact-btn-icon {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-btn-wpp .contact-btn-icon { background: linear-gradient(135deg, var(--green-wpp), #128C7E); }
.contact-btn-mail .contact-btn-icon { background: linear-gradient(135deg, var(--blue-bright), var(--purple)); }

.contact-btn-icon svg { width: 22px; height: 22px; fill: #fff; }
.contact-btn-text { position: relative; flex: 1; }
.contact-btn-label { font-size: 15px; font-weight: 500; color: #fff; margin-bottom: 2px; }
.contact-btn-sub { font-size: 11px; letter-spacing: 0.15em; color: rgba(255, 255, 255, 0.4); }
.contact-btn-arrow {
  position: relative;
  color: rgba(255, 255, 255, 0.4);
  font-size: 20px;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}
.contact-btn:hover .contact-btn-arrow { transform: translateX(6px); color: var(--blue-glow); }


/* ===== BUILDER ===== */
.builder-wrap {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 48px;
}

.builder-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  font-family: inherit;
}

.builder-toggle:hover { color: var(--blue-glow); }

.builder-toggle .chev {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 18px;
}

.builder-wrap.open .builder-toggle .chev { transform: rotate(180deg); }

.builder {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease, opacity 0.4s ease, margin-top 0.4s ease;
  opacity: 0;
  margin-top: 0;
}

.builder-wrap.open .builder {
  max-height: 4000px;
  opacity: 1;
  margin-top: 36px;
}

.builder-sentence {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: -0.01em;
  margin-bottom: 40px;
  padding: 28px 32px;
  background: rgba(55, 138, 221, 0.04);
  border: 1px solid rgba(55, 138, 221, 0.15);
  border-radius: 14px;
  min-height: 100px;
  display: flex;
  align-items: center;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.builder-sentence.has-content {
  border-color: rgba(93, 202, 255, 0.35);
  background: rgba(55, 138, 221, 0.08);
}

.builder-sentence .filled {
  color: #fff;
  font-weight: 500;
  background: linear-gradient(135deg, var(--blue-glow), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.builder-step {
  margin-bottom: 36px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.6s ease, margin 0.5s ease;
}

.builder-step.visible { opacity: 1; max-height: 800px; }

.builder-step-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(133, 183, 235, 0.6);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.builder-step-label .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(93, 202, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--blue-glow);
}

.builder-step-skip {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  transition: color 0.2s ease;
}

.builder-step-skip:hover { color: rgba(255, 255, 255, 0.6); }

.builder-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: inherit;
}

.chip:hover {
  border-color: rgba(93, 202, 255, 0.5);
  background: rgba(55, 138, 221, 0.08);
  transform: translateY(-1px);
}

.chip.selected {
  background: linear-gradient(135deg, rgba(93, 202, 255, 0.2), rgba(127, 119, 221, 0.2));
  border-color: var(--blue-glow);
  color: #fff;
}

.chip.selected::before {
  content: "✓";
  margin-right: 6px;
  color: var(--blue-glow);
  font-weight: 600;
}

.chip-other-input {
  padding: 10px 16px;
  background: rgba(55, 138, 221, 0.08);
  border: 1px solid rgba(93, 202, 255, 0.5);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  width: 220px;
  outline: none;
}

.chip-other-input:focus { border-color: var(--blue-glow); }

.builder-textarea {
  width: 100%;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  min-height: 100px;
  resize: vertical;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.builder-textarea:focus {
  outline: none;
  border-color: var(--blue-bright);
  background: rgba(55, 138, 221, 0.05);
}

.builder-contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.builder-contact-fields input {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.builder-contact-fields input:focus {
  outline: none;
  border-color: var(--blue-bright);
  background: rgba(55, 138, 221, 0.05);
}

.builder-contact-fields input.error {
  border-color: var(--red-error);
  background: rgba(229, 72, 77, 0.05);
}

/* Honeypot anti-spam (oculto visualmente pero accesible para bots) */
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.builder-submit {
  margin-top: 28px;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--blue-bright), var(--purple));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
}

.builder-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(55, 138, 221, 0.3);
}

.builder-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.builder-submit.loading { cursor: wait; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.builder-submit.loading .spinner { display: inline-block; }
.builder-submit.loading .submit-arrow { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.builder-reset {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  margin-top: 12px;
  display: block;
  margin-left: auto;
  transition: color 0.2s ease;
}

.builder-reset:hover { color: rgba(255, 255, 255, 0.7); }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(10, 22, 40, 0.95);
  border: 1px solid var(--green-soft);
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(151, 196, 89, 0.15);
  max-width: 90vw;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error { border-color: var(--red-error); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(229, 72, 77, 0.15); }

.toast-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--navy-deep);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast.error .toast-icon { background: var(--red-error); color: #fff; }

/* Fallback modal cuando falla el envío */
.fallback-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 24, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.fallback-modal.show { display: flex; }

.fallback-content {
  background: var(--navy);
  border: 1px solid rgba(55, 138, 221, 0.3);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.fallback-content h3 {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 12px;
}

.fallback-content p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.fallback-content textarea {
  width: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-family: monospace;
  line-height: 1.5;
  min-height: 200px;
  margin-bottom: 16px;
  resize: vertical;
}

.fallback-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.fallback-btn {
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: transform 0.2s ease;
}

.fallback-btn:hover { transform: translateY(-2px); }

.fallback-btn-primary {
  background: linear-gradient(135deg, var(--blue-bright), var(--purple));
  color: #fff;
}

.fallback-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}


.contact-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-align: center;
}

.contact-footer a { color: var(--blue-soft); text-decoration: none; transition: color 0.2s ease; }
.contact-footer a:hover { color: var(--blue-glow); }


/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .site-header { top: 16px; left: 16px; right: 16px; }
  .brand-logo img { width: 32px; }
  .brand-name { font-size: 12px; }
  .brand-tag { font-size: 8px; }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding-top: 100px;
    gap: 20px;
  }
  .hero-visual { height: 50vh; }
  h1 { font-size: 2.1rem; }

  .services-wrapper { height: auto; }
  .services-sticky { position: relative; height: auto; padding: 80px 0; }
  .project-visual { display: none; }
  .services-overlay { display: none; }
  .service-text { width: 100%; max-width: 100%; padding: 0 6vw; }
  .service-title { font-size: 2rem; }
  .services-progress { display: none; }

  .contact { padding: 80px 6vw 60px; }
  .contact-primary { grid-template-columns: 1fr; gap: 12px; }
  .builder-contact-fields { grid-template-columns: 1fr; }
  .builder-sentence { font-size: 1.2rem; padding: 20px 22px; }
  .chip-other-input { width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .layer { transform: none !important; }
}
