/* ============================================
   LLOSA EDIFICACIONES — Sistema visual
   Estética: dark editorial, ámbar como acento
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,700;9..144,900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #0f1429;
  --bg-elev: #1a2040;
  --bg-card: #20274a;
  --bg-card-2: #252c52;
  --ink: #e8eaf2;
  --ink-soft: #b8bcd0;
  --ink-mute: #8a8fa8;
  --amber: #f5a623;
  --amber-soft: #ffb84d;
  --amber-glow: rgba(245, 166, 35, 0.15);
  --rose: #e85a4f;
  --green: #4ade80;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Formas decorativas de fondo (igual que en la imagen) */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #2a2f55 0%, #1a1f3d 60%, transparent 100%);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -180px;
  left: -180px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #1e2552 0%, #161b38 60%, transparent 100%);
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

main, header, nav, footer { position: relative; z-index: 1; }

/* ============================================
   NAV
   ============================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-glow);
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 100px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.nav-links a:hover { color: var(--ink); background: var(--bg-card); }
.nav-links a.active { color: var(--bg); background: var(--amber); }

/* ============================================
   CONTENEDOR
   ============================================ */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 48px 96px;
}

/* ============================================
   HEADER / EYEBROW
   ============================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}

.eyebrow .target {
  width: 22px; height: 22px;
  border: 2.5px solid var(--amber);
  border-radius: 50%;
  position: relative;
}
.eyebrow .target::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--amber);
}

.page-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  color: var(--ink);
}

.page-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

/* ============================================
   TARJETA DE CONTENIDO (estilo imagen)
   ============================================ */
.content-card {
  background: var(--bg-card);
  border-left: 4px solid var(--amber);
  border-radius: 4px;
  padding: 36px 44px;
  margin-bottom: 32px;
}

.content-card p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 18px;
}
.content-card p:last-child { margin-bottom: 0; }
.content-card strong { color: var(--ink); font-weight: 600; }
.content-card .highlight { color: var(--amber-soft); font-weight: 600; }

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--amber);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--amber-soft);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px var(--amber-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--bg-card); border-color: var(--amber); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 32px 48px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-mute);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ============================================
   PROMPT BOX (página 2)
   ============================================ */
.prompt-shell {
  position: relative;
  background: linear-gradient(135deg, #1a1f3d 0%, #20274a 100%);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}

.prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--line);
}

.prompt-toolbar .tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--amber);
  text-transform: uppercase;
}

.dots { display: flex; gap: 6px; }
.dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--line-strong);
}

.prompt-body {
  padding: 28px 32px;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 480px;
  overflow-y: auto;
}

.prompt-body::-webkit-scrollbar { width: 8px; }
.prompt-body::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.prompt-body .placeholder {
  color: var(--amber);
  font-weight: 700;
  background: var(--amber-glow);
  padding: 2px 8px;
  border-radius: 3px;
}

.copy-btn {
  position: relative;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--amber);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.copy-btn:hover { background: var(--amber-soft); }
.copy-btn.copied { background: var(--green); color: var(--bg); }

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--green);
  color: var(--bg);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
  z-index: 100;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ============================================
   WEBHOOK TESTER (página 3)
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--line);
}

.panel-header h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header h3::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.panel-body { padding: 22px; }

.field-group { margin-bottom: 18px; }
.field-group:last-child { margin-bottom: 0; }

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}

.input, .textarea {
  width: 100%;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.88rem;
  transition: border 0.2s;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.textarea {
  resize: vertical;
  min-height: 320px;
  line-height: 1.55;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.85rem;
  display: none;
  white-space: pre-wrap;
  word-break: break-word;
}
.status.show { display: block; }
.status.ok    { background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.3); color: #86efac; }
.status.err   { background: rgba(232, 90, 79, 0.1);  border: 1px solid rgba(232, 90, 79, 0.3);  color: #fca5a5; }
.status.info  { background: rgba(245, 166, 35, 0.08); border: 1px solid rgba(245, 166, 35, 0.25); color: var(--amber-soft); }

.helper {
  font-size: 0.8rem;
  color: var(--ink-mute);
  margin-top: 8px;
  line-height: 1.5;
}
.helper code {
  font-family: var(--mono);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--amber-soft);
  font-size: 0.82rem;
}

/* ============================================
   FOOTER NAV (next page)
   ============================================ */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.page-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.page-nav a:hover { color: var(--amber); }
.page-nav .num { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-mute); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .nav { padding: 20px 22px; flex-wrap: wrap; gap: 12px; }
  .nav-links { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .nav-links a { padding: 6px 12px; font-size: 0.8rem; }
  .container { padding: 36px 22px 64px; }
  .content-card { padding: 26px 24px; }
  .prompt-body { padding: 20px; font-size: 0.85rem; }
  .grid-2 { grid-template-columns: 1fr; gap: 20px; }
  .page-nav { flex-direction: column; align-items: stretch; gap: 14px; }
  .page-nav a { justify-content: center; padding: 12px; background: var(--bg-card); border-radius: 6px; }
}

@media (max-width: 480px) {
  .nav { padding: 16px; }
  .nav-brand { font-size: 1.05rem; }
  .container { padding: 28px 16px 56px; }
  .content-card { padding: 22px 18px; }
  .content-card p { font-size: 0.95rem; }
  .panel-body { padding: 18px; }
  .prompt-toolbar { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .prompt-body { padding: 18px 16px; font-size: 0.8rem; max-height: 380px; }
}

/* Reveal animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.7s ease-out backwards; }
.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.15s; }
.fade-up:nth-child(3) { animation-delay: 0.25s; }
.fade-up:nth-child(4) { animation-delay: 0.35s; }
