/* Landing COMPUPER — etapa 1 (estática, tema oscuro) */

:root {
  --color-bg: #050505;
  --color-text: #f0f0f0;
  --color-text-muted: #a8a8a8;
  --color-text-soft: #9ca3af;
  --color-border: #2a2a2a;
  --color-accent: #22c55e;
  --color-accent-hover: #16a34a;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 2.75rem;
  --radius-btn: 0.375rem;
  --max-content: 38rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text);
  background-color: #050505;
}

/* Barra de acento superior */
body::before {
  content: "";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #89be4b;
  opacity: 0.85;
  z-index: 10;
}

/* Grilla CSS como overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout principal ── */

.landing {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  max-width: calc(var(--max-content) + 2 * var(--space-md));
  margin-inline: auto;
  text-align: center;
}

/* ── Logo ── */

.landing__header {
  margin-bottom: 2.5rem;
  animation: fadeScaleIn 0.6s ease both;
}

.landing__logo {
  display: block;
  width: min(340px, 80vw);
  height: auto;
  object-fit: contain;
  mix-blend-mode: screen;
}

/* ── Título ── */

.landing__title {
  margin: 0 0 3rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  animation: fadeSlideIn 0.6s ease 0.2s both;
}

.landing__title-accent {
  color: #89be4b;
}

/* ── Línea de contexto ── */

.landing__context {
  margin: 0 0 2rem;
  font-size: 1rem;
  font-weight: 400;
  color: #9ca3af;
  text-align: center;
  max-width: var(--max-content);
  animation: fadeSlideIn 0.6s ease 0.35s both;
}

/* ── Typewriter ── */

.typewriter {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #89be4b;
  text-align: center;
  line-height: 1.3;
  animation: fadeSlideIn 0.6s ease 0.5s both;
}

.typewriter__cursor {
  display: inline-block;
  margin-left: 1px;
  color: #89be4b;
  animation: cursorBlink 0.7s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Email ── */

.landing__email {
  margin: 0 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 1rem;
  animation: fadeSlideIn 0.6s ease 0.65s both;
}

.landing__email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #9ca3af;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, text-shadow 0.15s ease;
}

.landing__email-link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.landing__email-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Footer ── */

.landing__footer {
  position: relative;
  z-index: 1001;
  margin-top: auto;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-soft);
  text-align: center;
}

.landing__footer a {
  color: inherit;
  text-decoration: none;
}

.landing__footer a:hover {
  color: var(--color-accent);
}

/* ── Botón flotante WhatsApp ── */

.landing__btn-wa {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  background-color: var(--color-accent);
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  animation: fadeSlideIn 0.6s ease 0.8s both;
}

.landing__btn-wa:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 4px 28px rgba(74, 222, 128, 0.5);
  transform: translateY(-2px);
}

.landing__btn-wa:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.landing__btn-wa-icon {
  display: flex;
  flex-shrink: 0;
  animation: waPulse 2s ease-in-out infinite;
}

.landing__btn-wa-text {
  position: relative;
  top: 0.02em;
}

/* ── Keyframes ── */

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes waPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

/* ── WhatsApp botón — solo ícono en mobile ── */

@media (max-width: 768px) {
  .landing__btn-wa {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
  }

  .landing__btn-wa-text {
    display: none;
  }
}

/* ── Accesibilidad: sin movimiento ── */

@media (prefers-reduced-motion: reduce) {
  .landing__header,
  .landing__title,
  .landing__context,
  .typewriter,
  .landing__email,
  .landing__btn-wa {
    animation: none;
  }

  .landing__btn-wa-icon {
    animation: none;
  }

  .typewriter__cursor {
    animation: none;
  }

  .landing__btn-wa,
  .landing__email-link {
    transition: none;
  }
}
