/* ===== Armonía Viral — estilos compartidos (terminal / matrix) ===== */
:root {
  --bg: #070807;
  --bg-2: #0a0d0a;
  --panel: #0d120e;
  --panel-2: #101711;
  --line: #17301c;
  --line-2: #214a2a;
  --acc: #00ff41;
  --acc-2: #00c934;
  --acc-dim: rgba(0, 255, 65, 0.12);
  --txt: #e6efe7;
  --muted: #8fa593;
  --danger: #ff5c5c;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --radius: 12px;
  --max: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Líneas de escaneo sutiles */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  opacity: 0.55;
}
/* Viñeta y brillo verde suave */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(0, 255, 65, 0.09), transparent 70%),
    radial-gradient(80% 60% at 50% 100%, rgba(0, 0, 0, 0.6), transparent 60%);
}

a { color: var(--acc); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 5.8vw + 0.4rem, 3.4rem); }
h2 { font-size: clamp(1.35rem, 3vw + 0.5rem, 2rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.acc { color: var(--acc); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
section { padding: 48px 0; }
@media (min-width: 768px) { section { padding: 72px 0; } }

/* Prompt tipo terminal */
.prompt {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--acc);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  opacity: 0.9;
  word-break: break-word;
}
.prompt::after { content: "▌"; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Banner superior */
.banner {
  background: var(--acc);
  color: #04120a;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 16px;
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--head); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
  padding: 16px 26px; border-radius: 12px; border: 1px solid var(--acc);
  position: relative; overflow: hidden;
  background: var(--acc); color: #04120a; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 0 0 rgba(0, 255, 65, 0);
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #33ff67; box-shadow: 0 0 32px rgba(0, 255, 65, 0.45); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: sheen 3.2s ease-in-out infinite;
}
@keyframes sheen { 0%, 60% { left: -80%; } 100% { left: 130%; } }
.btn .arrow { display: inline-block; animation: bounce 1.4s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.btn-glow { animation: glow 2.6s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 rgba(0, 255, 65, 0.0); }
  50% { box-shadow: 0 0 34px rgba(0, 255, 65, 0.45); }
}
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--acc); }
.btn-ghost:hover { background: var(--acc-dim); }
.btn-xl { font-size: 1.15rem; padding: 20px 28px; }
@media (min-width: 640px) { .btn { width: auto; } .btn-block { width: 100%; } }

/* Tarjetas */
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.card::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px;
  background: var(--acc); opacity: 0.7; border-radius: 2px;
}
.grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* Listas con prompt */
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.list li::before { content: ">"; font-family: var(--mono); color: var(--acc); font-weight: 700; line-height: 1.55; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono); font-size: 0.8rem; color: var(--acc);
  border: 1px solid var(--line-2); background: var(--acc-dim);
  padding: 6px 10px; border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.chip:hover { transform: translateY(-2px); background: rgba(0, 255, 65, 0.2); }

/* Callout */
.callout {
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 18px 20px; background: rgba(0, 255, 65, 0.04);
}

/* Formularios */
label { display: block; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input, select {
  width: 100%; font: inherit; color: var(--txt);
  background: #0a0e0b; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 14px 14px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  font-size: 16px; /* evita zoom en iOS */
}
input::placeholder { color: #5d6f60; }
input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.18); }
input[aria-invalid="true"] { border-color: var(--danger); }
.err { display: none; color: var(--danger); font-size: 0.8rem; margin-top: 6px; font-family: var(--mono); }
.field.invalid .err { display: block; }
.tel { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Footer */
footer {
  border-top: 1px solid var(--line); padding: 28px 0 40px;
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; }
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--acc); }

/* Divisor */
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }

/* Glitch ligero en el título */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%;
  overflow: hidden; opacity: 0; pointer-events: none;
}
.glitch::before { color: #00ffe1; clip-path: inset(0 0 62% 0); animation: gl1 7s infinite; }
.glitch::after { color: #ff2fa0; clip-path: inset(58% 0 0 0); animation: gl2 7s infinite; }
@keyframes gl1 {
  0%, 92%, 100% { opacity: 0; transform: none; }
  93% { opacity: 0.8; transform: translate(-3px, -1px); }
  95% { opacity: 0.8; transform: translate(3px, 1px); clip-path: inset(20% 0 45% 0); }
  97% { opacity: 0; }
}
@keyframes gl2 {
  0%, 93%, 100% { opacity: 0; transform: none; }
  94% { opacity: 0.8; transform: translate(3px, 1px); }
  96% { opacity: 0.8; transform: translate(-3px, -1px); clip-path: inset(70% 0 5% 0); }
  98% { opacity: 0; }
}

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; } .reveal-d2 { transition-delay: 0.2s; } .reveal-d3 { transition-delay: 0.3s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .prompt::after { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
