/* SSS · Generador de Lead Magnets — autosetter style */

:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --bg-card: #0d0d0d;
  --ink: #ffffff;
  --ink-dim: rgba(255,255,255,0.72);
  --ink-mute: rgba(255,255,255,0.42);
  --line: rgba(255,255,255,0.12);
  --line-strong: rgba(255,255,255,0.24);
  --accent: #4F6BFF;
  --accent-2: #6B83FF;
  --accent-soft: rgba(79,107,255,0.15);
  --success: #6BE08A;
  --danger: #FF4757;

  --display: 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --hand: 'Caveat', 'Inter', cursive;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; }
.hidden { display: none !important; }
.mt-xl { margin-top: 56px; }

/* TOPBAR */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  align-items: center; padding: 14px 32px;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-mute);
}
.topbar-c { text-align: center; }
.topbar-r { text-align: right; }
.classified-tag {
  display: inline-block; border: 1.5px solid var(--accent);
  color: var(--accent); padding: 4px 10px;
  border-radius: 2px; letter-spacing: 0.18em; font-weight: 500;
}

.container {
  max-width: 1080px; margin: 0 auto;
  padding: 48px 24px 80px;
}

/* HERO */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; margin-bottom: 56px; align-items: start; }
.hero-tag {
  display: inline-block; font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); padding: 5px 10px;
  border: 1px solid var(--accent); margin-bottom: 16px; border-radius: 2px;
}
.brand-line {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
}
.brand-line img { height: 32px; width: auto; display: block; }

.hero-h1 {
  font-family: var(--display);
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 800; line-height: 0.98;
  letter-spacing: -0.025em; margin-bottom: 20px;
}
.hero-h1 em {
  font-family: var(--hand); font-style: italic;
  color: var(--accent); font-weight: 700;
  font-size: 1.1em;
}
.hero-sub {
  font-size: 15px; line-height: 1.6;
  color: var(--ink-dim); max-width: 520px;
}

/* BRAIN CARD */
.brain-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 18px;
  position: relative; overflow: hidden;
}
.brain-card-hd {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.brain-card-hd .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px var(--success);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.brain-readout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3px 14px; margin-bottom: 14px;
}
.readout-row {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px;
  padding: 3px 0; border-bottom: 1px dashed var(--line);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.readout-row.full { grid-column: 1 / -1; }
.readout-row span:first-child { color: var(--ink-mute); }
.readout-row span:last-child { color: var(--accent-2); }

.brain-svg-wrap { display: flex; justify-content: center; padding: 10px 0; }
.brain-svg-wrap svg {
  width: 100%; max-width: 260px;
  filter: drop-shadow(0 0 18px rgba(79,107,255,0.45));
}
.br-rotate { transform-origin: center; animation: tilt 8s ease-in-out infinite; }
@keyframes tilt { 0%,100%{transform:rotate(-1deg)} 50%{transform:rotate(1deg)} }
.br-neuron { fill: var(--accent-2); animation: fire 1.8s ease-in-out infinite; }
.br-neuron-big { fill: #fff; animation: fire-big 2.2s ease-in-out infinite; }
@keyframes fire { 0%,100%{opacity:0.25; r:0.6} 50%{opacity:1; r:1.6} }
@keyframes fire-big { 0%,100%{opacity:0.5; r:1.2} 50%{opacity:1; r:2.2} }
.br-synapse {
  stroke: var(--accent-2); stroke-width: 0.5; fill: none;
  stroke-dasharray: 4 6; animation: flow 2s linear infinite; opacity: 0.5;
}
@keyframes flow { 0%{stroke-dashoffset:0} 100%{stroke-dashoffset:-20} }
.br-pulse-line {
  stroke: #fff; stroke-width: 0.7; fill: none;
  stroke-dasharray: 2 30; animation: pulse-flow 1.6s linear infinite;
}
@keyframes pulse-flow { 0%{stroke-dashoffset:32;opacity:0} 20%{opacity:1} 80%{opacity:1} 100%{stroke-dashoffset:0;opacity:0} }

/* SECTION TAG */
.section-tag {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-mute); padding-bottom: 12px;
  margin-bottom: 28px; border-bottom: 1px solid var(--line);
}

/* FORM */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field-label {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); font-weight: 500;
}
.field-hint {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.03em;
}

.field input[type="text"], .field input[type="email"],
.field textarea, .field select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--body); font-size: 15px;
  padding: 13px 15px; border-radius: 6px;
  resize: vertical; transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
}
.field select { cursor: pointer; }
.field select option { background: var(--bg-card); }

.locked-objective {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 6px; padding: 13px;
}
.locked-objective-t {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; color: var(--accent);
  text-transform: uppercase; font-weight: 700; margin-bottom: 5px;
}
.locked-objective-b {
  font-size: 14px; color: var(--ink-dim); line-height: 1.5;
}

.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type="color"] {
  width: 52px; height: 46px; border: 1px solid var(--line-strong);
  background: var(--bg-card); cursor: pointer; padding: 3px; border-radius: 6px;
}
.color-row input[type="text"] {
  flex: 1; font-family: var(--mono); text-transform: uppercase;
}

/* UPLOAD ZONE */
.upload-zone {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; background: var(--bg-card);
  border: 1px dashed var(--line-strong); border-radius: 8px;
  flex-wrap: wrap;
}
.upload-btn {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 14px; cursor: pointer; border-radius: 5px;
  transition: all 0.15s;
}
.upload-btn:hover { background: var(--accent-soft); }
.upload-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.upload-hint {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.03em;
}

.image-thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-top: 12px;
}
.image-thumbs:empty { display: none; }

/* AVATAR ZONE (foto de perfil del entrenador) */
.avatar-zone {
  display: flex; align-items: center; gap: 18px;
  padding: 14px; background: var(--bg-card);
  border: 1px dashed var(--line-strong); border-radius: 8px;
}
.avatar-preview {
  width: 80px; height: 80px;
  border-radius: 10px; overflow: hidden;
  background: #000; border: 1px solid var(--line-strong);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.avatar-preview img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.avatar-placeholder {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.08em;
  text-transform: uppercase; text-align: center; padding: 0 6px;
}
.avatar-actions {
  display: flex; flex-direction: column; gap: 6px; flex: 1;
  align-items: flex-start;
}
.avatar-actions .upload-btn { margin: 0; }
.avatar-remove-btn {
  color: var(--danger) !important;
  border-color: var(--danger) !important;
}
.avatar-remove-btn:hover { background: rgba(255,71,87,0.1) !important; }
.avatar-status {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.avatar-status.uploading { color: var(--ink-mute); }
.avatar-status.ok { color: var(--success); }
.avatar-status.err { color: var(--danger); }
.thumb {
  background: var(--bg-card); border: 1px solid var(--line-strong);
  border-radius: 8px; overflow: hidden; position: relative;
}
.thumb-img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  background: #0a0a0a;
}
.thumb-body {
  padding: 8px 10px;
}
.thumb-label {
  width: 100%; background: transparent; border: none;
  color: var(--ink); font-family: var(--body); font-size: 12px;
  padding: 4px 0; outline: none;
}
.thumb-label::placeholder { color: var(--ink-mute); }
.thumb-status {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 4px;
}
.thumb-status.uploading { color: var(--ink-mute); }
.thumb-status.ok { color: var(--success); }
.thumb-status.err { color: var(--danger); }
.thumb-remove {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,0.7); color: white;
  border: 1px solid var(--line-strong);
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; line-height: 1;
}
.thumb-remove:hover { background: var(--danger); border-color: var(--danger); }

/* IMAGE BLOCK in document */
.doc-image-block {
  margin: 28px 0;
}
.doc-image-block img {
  width: 100%; max-width: 100%; height: auto;
  display: block; border-radius: 6px;
  border: 1px solid var(--line);
}
.doc-image-caption {
  font-family: var(--body); font-size: 13px;
  font-style: italic; color: var(--ink-mute);
  text-align: center; margin-top: 10px;
  letter-spacing: 0.01em;
}

/* BUTTONS */
.cta {
  width: 100%; background: var(--accent); color: white;
  border: none; font-family: var(--display);
  font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
  padding: 16px 24px; cursor: pointer; border-radius: 8px;
  margin-top: 12px; transition: all 0.15s;
}
.cta:hover { background: var(--accent-2); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta:disabled { opacity: 0.4; cursor: not-allowed; }

.cta-footnote {
  text-align: center; font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: 10px;
}

.secondary {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 9px 14px; cursor: pointer; border-radius: 5px;
  transition: all 0.15s;
}
.secondary:hover { border-color: var(--accent); }

.error-box {
  background: rgba(255,71,87,0.12); border: 1px solid var(--danger);
  color: #ffb3ba; padding: 12px; border-radius: 6px;
  font-size: 13px; margin-top: 14px;
}

/* LOADING — autosetter style */
.loading-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 100px 24px;
  text-align: center;
  margin: 24px 0;
  min-height: 420px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
}
.forge-line {
  display: inline-block;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.2em; color: var(--accent);
  text-decoration: line-through; text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-transform: uppercase; margin-bottom: 48px;
}
.loading-h {
  font-family: var(--display);
  font-size: clamp(32px, 5.5vw, 56px); font-weight: 800;
  line-height: 1.05; margin-bottom: 40px;
  letter-spacing: -0.02em;
}
.loading-h em {
  font-family: var(--hand); font-style: italic;
  color: var(--accent); font-weight: 700;
  font-size: 1.1em; margin-left: 10px;
}
.loading-step {
  font-family: var(--mono); font-size: 14px;
  color: white; margin-bottom: 16px; min-height: 18px;
}
.loading-step::before { content: '▸ '; color: var(--accent); }
.loading-timer {
  font-family: var(--mono); font-size: 13px;
  color: var(--ink-mute); margin-bottom: 36px;
  letter-spacing: 0.04em;
}
.loading-timer::before { content: '◷ '; }

.progress-bar-wrap {
  width: 80%; max-width: 520px; height: 2px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: var(--accent); width: 0%;
  transition: width 0.5s ease;
}

/* OUTPUT DOCUMENT — autosetter style */
.doc-frame {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}
.doc-actions-bar {
  display: flex; gap: 8px; padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap; justify-content: flex-end;
}
.doc-inner {
  padding: 80px 80px 100px;
  font-family: var(--display);
  color: var(--ink-dim);
  line-height: 1.6;
}
@media (max-width: 768px) {
  .doc-inner { padding: 48px 28px 60px; }
}
.doc-inner::-webkit-scrollbar { width: 6px; }
.doc-inner::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.doc-header {
  display: flex; justify-content: space-between;
  align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
  padding-bottom: 16px; margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap; gap: 14px;
}
.doc-header .handle { color: var(--accent); font-weight: 500; }

.doc-author-block {
  display: flex; align-items: center; gap: 12px;
}
.doc-author-avatar {
  width: 36px; height: 36px;
  border-radius: 8px; overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.doc-author-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.doc-author-text {
  display: flex; flex-direction: column; gap: 2px; line-height: 1.2;
}
.doc-author-text .name {
  color: var(--ink); font-weight: 700;
  text-transform: none; letter-spacing: 0.02em;
  font-family: var(--body); font-size: 13px;
}
.doc-author-text .handle {
  color: var(--accent); font-weight: 500;
  font-size: 11px;
}

/* Signature block at the bottom of the closing */
.doc-signature {
  display: flex; align-items: center; gap: 14px;
  margin: 32px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.doc-signature-avatar {
  width: 56px; height: 56px;
  border-radius: 10px; overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.doc-signature-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.doc-signature-text {
  display: flex; flex-direction: column; gap: 3px;
  font-family: var(--body);
}
.doc-signature-text .name {
  font-size: 16px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.01em;
}
.doc-signature-text .handle {
  font-size: 14px; color: var(--accent); font-weight: 500;
}

.doc-title {
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 78px);
  font-weight: 800; line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--accent);
  margin-bottom: 40px;
}

.doc-inner p {
  font-size: 16px; line-height: 1.75;
  color: var(--ink-dim); margin-bottom: 18px;
}
.doc-inner p strong { color: var(--ink); font-weight: 700; }
.doc-inner p em { color: var(--accent); font-style: italic; }

.doc-section-num {
  font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase;
  margin: 64px 0 14px; font-weight: 500;
}
.doc-h2 {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 28px;
}
.doc-h3 {
  font-family: var(--display);
  font-size: 17px; font-weight: 700;
  color: var(--ink); margin: 28px 0 14px;
}

.doc-list-numbered { list-style: none; padding: 0; margin: 0 0 22px; }
.doc-list-numbered li {
  display: flex; gap: 18px;
  padding: 8px 0; align-items: baseline;
}
.doc-list-numbered li::before {
  content: attr(data-n);
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 8px; border-radius: 4px;
  font-weight: 500; letter-spacing: 0.05em;
  min-width: 32px; text-align: center;
}
.doc-list-numbered li .li-content {
  font-size: 16px; color: var(--ink-dim); line-height: 1.7;
}
.doc-list-numbered li .li-content strong { color: var(--ink); font-weight: 700; }

.doc-list-dash { list-style: none; padding: 0; margin: 0 0 22px; }
.doc-list-dash li {
  position: relative; padding-left: 26px;
  font-size: 16px; color: var(--ink-dim);
  line-height: 1.7; margin-bottom: 12px;
}
.doc-list-dash li::before {
  content: '—';
  position: absolute; left: 0; top: 0;
  font-weight: 700;
}
.doc-list-dash li strong { color: var(--ink); font-weight: 700; }

.doc-quote {
  font-style: italic;
  font-size: 16px;
  line-height: 1.7;
  margin: 18px 0;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}

.doc-footer-divider {
  border-top: 1px solid var(--line);
  margin: 64px 0 24px;
}
.doc-cta-line {
  font-size: 16px; color: var(--ink-dim);
  margin-bottom: 10px; line-height: 1.75;
}
.doc-cta-line strong { color: var(--ink); font-weight: 700; }
.doc-handle-end { color: var(--accent); font-weight: 700; }

.doc-bottom-bar {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 24px; margin-top: 56px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap; gap: 10px;
}
.doc-bottom-bar .handle { color: var(--accent); }

/* FOOTER */
.footer {
  border-top: 1px solid var(--line);
  padding: 24px 32px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-mute);
  flex-wrap: wrap; gap: 12px;
}

/* PRINT — for PDF export */
@media print {
  body { background: white; color: black; }
  .topbar, .footer, .doc-actions-bar, #form-view, #loading-view { display: none !important; }
  .doc-frame { border: none; }
  .doc-inner { padding: 20px 30px; max-height: none; overflow: visible; }
  .doc-inner p, .doc-inner .doc-cta-line, .doc-list-numbered li .li-content,
  .doc-list-dash li { color: #222 !important; }
  .doc-inner p strong, .doc-list-numbered li strong, .doc-list-dash li strong,
  .doc-h2, .doc-h3, .doc-cta-line strong { color: #000 !important; }
  .doc-header, .doc-bottom-bar { color: #555 !important; border-color: #ccc !important; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .topbar { grid-template-columns: 1fr 1fr; font-size: 10px; padding: 12px 18px; }
  .topbar-c { display: none; }
  .container { padding: 32px 18px 60px; }
}
