/* ============================================================
   SEO Lens API — Landing
   Design tokens: tema oscuro (guia-diseno.md)
   ============================================================ */
:root {
  --base: #0b1220;
  --base-2: #0d1526;
  --card: #111d33;
  --line: #1e2c47;
  --ink: #e8eefb;
  --muted: #93a4c4;
  --brand: #22d3ee;
  --brand-2: #818cf8;
  --ok: #34d399;
  --danger: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--base);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(34, 211, 238, 0.35); color: #fff; }

.font-display { font-family: "Space Grotesk", sans-serif; }
.font-mono2 { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ---------- Aurora / fondo hero ---------- */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; border-radius: 9999px; filter: blur(90px); opacity: 0.5;
  will-change: transform;
}
.aurora .a1 { width: 560px; height: 560px; left: -140px; top: -160px;
  background: radial-gradient(circle, rgba(34,211,238,0.35), transparent 65%);
  animation: drift1 18s ease-in-out infinite alternate; }
.aurora .a2 { width: 640px; height: 640px; right: -180px; top: -100px;
  background: radial-gradient(circle, rgba(129,140,248,0.32), transparent 65%);
  animation: drift2 22s ease-in-out infinite alternate; }
.aurora .a3 { width: 480px; height: 480px; left: 38%; bottom: -240px;
  background: radial-gradient(circle, rgba(34,211,238,0.18), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(90px, 60px) scale(1.12); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1.05); } to { transform: translate(-80px, 70px) scale(0.95); } }

.grid-overlay {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(rgba(30,44,71,0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,44,71,0.35) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
}

/* ---------- Canvas 3D ---------- */
#hero-3d { position: absolute; inset: 0; }
#hero-3d canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
#hero-3d.is-ready canvas { opacity: 1; }

/* ---------- Reveals (solo si hay JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-hero] { opacity: 0; transform: translateY(24px); }

/* ---------- Botones ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.75rem; border-radius: 9999px;
  font-weight: 700; color: #04121a;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 30px -8px rgba(34, 211, 238, 0.45);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08);
  box-shadow: 0 12px 38px -8px rgba(34, 211, 238, 0.6); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.75rem; border-radius: 9999px;
  font-weight: 600; color: var(--ink);
  border: 1px solid var(--line); background: rgba(17, 29, 51, 0.55);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}
.btn-ghost:hover { border-color: var(--brand); transform: translateY(-2px); background: rgba(17,29,51,0.9); }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(23, 36, 63, 0.75), rgba(17, 29, 51, 0.85));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 18px 44px -12px rgba(34, 211, 238, 0.25); }

.icon-badge {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(34,211,238,0.16), rgba(129,140,248,0.16));
  border: 1px solid rgba(34, 211, 238, 0.3); color: var(--brand);
}

/* ---------- Código ---------- */
.code-window {
  background: #080f1d; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(34,211,238,0.06);
  overflow: hidden;
}
.code-window .traffic { display: flex; gap: 8px; }
.code-window .traffic i { width: 12px; height: 12px; border-radius: 9999px; display: block; }
.code-window pre { margin: 0; overflow-x: auto; }
.code-window code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13.5px; line-height: 1.75; }

.tab-btn {
  padding: 0.55rem 1.1rem; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
  color: var(--muted); border: 1px solid transparent; transition: all 0.25s;
  min-height: 40px;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn[aria-selected="true"] {
  color: var(--ink); background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.35);
}

.copy-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  padding: 0.45rem 0.9rem; border-radius: 8px; border: 1px solid var(--line);
  transition: all 0.25s; min-height: 36px;
}
.copy-btn:hover { color: var(--brand); border-color: rgba(34,211,238,0.4); }
.copy-btn.copied { color: var(--ok); border-color: rgba(52, 211, 153, 0.5); }

/* Syntax highlighting */
.tok-key { color: #7dd3fc; }
.tok-str { color: #a7f3d0; }
.tok-num { color: #fbbf24; }
.tok-bool { color: #c4b5fd; }
.tok-punct { color: #5b6b8c; }
.tok-comment { color: #5b6b8c; font-style: italic; }
.code-shell .tok-prompt { color: var(--brand); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17,29,51,0.5); transition: border-color 0.3s; }
.faq-item[open] { border-color: rgba(34, 211, 238, 0.4); }
.faq-item summary { cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { transition: transform 0.3s var(--ease); }
.faq-item[open] summary .plus { transform: rotate(45deg); }

/* ---------- Nav ---------- */
#site-nav { transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s; border-bottom: 1px solid transparent; }
#site-nav.scrolled { background: rgba(11, 18, 32, 0.82); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav-link { color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: color 0.25s; }
.nav-link:hover { color: var(--ink); }

/* ---------- Pricing ---------- */
.plan-featured { border: 1px solid rgba(34, 211, 238, 0.6) !important;
  box-shadow: 0 8px 30px -8px rgba(34, 211, 238, 0.4), 0 2px 12px rgba(0,0,0,0.45) !important; }

/* ---------- Utilidades ---------- */
.grad-text { background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glass { background: rgba(17, 29, 51, 0.6); backdrop-filter: blur(12px); border: 1px solid var(--line); }
.section-alt { background: var(--base-2); }
.img-frame { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.7); }
.img-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.img-frame:hover img { transform: scale(1.04); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--card); color: var(--ink); padding: 0.75rem 1.25rem; border-radius: 10px; border: 1px solid var(--brand); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--base); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #2b3f63; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora span { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .js [data-reveal], .js [data-hero] { opacity: 1 !important; transform: none !important; }
  #hero-3d canvas { opacity: 1; transition: none; }
}
