/* Landing Clickers Lab (plantilla page-clickers.php). Solo se carga en esa página. */
/* ---------------- 1. Variables ---------------- */
:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --text: #111111;
  --muted: #555555;
  --line: #E7E7E7;
  --line-strong: #D6D6D6;
  --accent: #FF5A1F;
  --accent-dark: #E0480F;
  --accent-soft: #FFF1EB;
  --wa: #1FA855;
  --wa-dark: #178A45;
  --ok: #15803D;
  --error: #C62828;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --shadow: 0 1px 2px rgba(17,17,17,.04), 0 8px 24px rgba(17,17,17,.06);
  --max: 1120px;
}

/* ---------------- 2. Base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--accent); }
.section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-top: 12px; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 17px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--text); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------------- 3. Header ---------------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(250,250,250,.88); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
/* Con sesión iniciada en WordPress, la barra negra de admin ocupa la parte de arriba */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.logo .dot { color: var(--accent); }
.logo .lab { font-weight: 500; color: var(--muted); }
.header-actions { display: flex; gap: 8px; }

/* ---------------- 4. Hero + carrusel ---------------- */
.hero { padding: 56px 0 72px; }
.hero .container { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.4vw, 58px); margin-top: 16px; }
.hero h1 .hl { color: var(--accent); }
.hero-sub { font-size: 18px; color: var(--muted); margin-top: 18px; max-width: 520px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; list-style: none; }
.chips li { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }

.carousel { position: relative; }
.carousel-frame { position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.carousel-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.slide img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.tag-example { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.92); border: 1px solid var(--line); color: var(--muted); pointer-events: none; }
.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.94); box-shadow: 0 2px 10px rgba(0,0,0,.14); cursor: pointer; color: var(--text);
}
.car-arrow:hover { background: #fff; }
.car-arrow svg { width: 20px; height: 20px; }
.car-prev { left: 12px; }
.car-next { right: 12px; }
.car-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.car-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.car-dot { width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; background: var(--line-strong); cursor: pointer; transition: width .2s, background .2s; }
.car-dot[aria-current="true"] { width: 28px; background: var(--accent); }
.car-tools { display: flex; align-items: center; gap: 8px; }
.car-note { margin-top: 10px; font-size: 13px; color: var(--muted); font-style: italic; }
.car-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; text-decoration: none; color: var(--text); }
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------------- 5. Crea con IA ---------------- */
.ai { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ai-steps { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
.ai-step { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--text); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.ai-step h3 { font-size: 20px; }
.step-content { margin-top: 14px; }
.inputs { display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; align-items: start; }
.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.text-input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--surface); transition: border-color .15s; }
.text-input:focus { outline: none; border-color: var(--text); }
textarea.text-input { min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }

.prompt-box { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 16px 18px; font-size: 14px; line-height: 1.65; color: #2B2B2B; white-space: pre-line; }
.prompt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn-copy.is-copied { background: var(--ok); }

.upload-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.upload-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.upload-list .ic { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: 14px; }
.ai-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tip { margin-top: 14px; font-size: 14px; color: var(--muted); }
.tip strong { color: var(--text); }

/* ---------------- 6. Lo hacemos por ti ---------------- */
.done-for-you { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.dfy-aside h2 { font-size: clamp(28px, 4vw, 40px); margin-top: 12px; }
.dfy-aside p { color: var(--muted); margin-top: 12px; }
.wa-card { margin-top: 24px; padding: 22px; border-radius: var(--radius); background: #F1FBF4; border: 1px solid #C9EBD4; }
.wa-card h3 { font-size: 18px; }
.wa-card p { margin: 6px 0 16px; font-size: 15px; color: #2E5A3C; }

.lead-form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field > .label { font-size: 14px; font-weight: 600; margin: 0; }
.opt { font-weight: 400; color: var(--muted); }
.lead-form .text-input { background: var(--bg); }
.lead-form .text-input:focus { background: var(--surface); }
select.text-input { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.text-input[aria-invalid="true"] { border-color: var(--error); background: #FFF7F7; }
.field-error { font-size: 13px; color: var(--error); }
.field-error:empty { display: none; }

.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 108px; padding: 16px; text-align: center; cursor: pointer; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: #F3FBF5; }
.dropzone.is-invalid { border-color: var(--error); background: #FFF7F7; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dz-title { font-weight: 600; font-size: 15px; }
.dz-hint { font-size: 13px; color: var(--muted); }
.file-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; padding: 8px 10px 8px 12px; border-radius: var(--radius-sm); background: #F3FBF5; border: 1px solid #CBE8D3; }
.file-chip[hidden] { display: none; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button { border: 0; background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 6px; }
.file-chip button:hover { color: var(--error); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.form-footer { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.form-footer .btn { width: 100%; min-height: 54px; font-size: 16px; }
.form-note { font-size: 13px; color: var(--muted); text-align: center; }
.form-alert { font-size: 14px; color: var(--error); font-weight: 500; }
.form-alert:empty { display: none; }

/* ---------------- 7. Footer y aviso ---------------- */
.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 80; background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 8. Responsive ---------------- */
@media (max-width: 960px) {
  .hero .container, .done-for-you { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  :root { --header-h: 58px; }
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }
  .hero { padding: 36px 0 52px; }
  .hero-sub { font-size: 17px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .logo { font-size: 17px; }
  .header-wa { display: none; }
  .site-header .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .car-arrow { width: 38px; height: 38px; }
  .ai-step { grid-template-columns: 1fr; gap: 12px; padding: 18px 16px; }
  .step-num { width: 38px; height: 38px; font-size: 16px; }
  .inputs, .form-grid { grid-template-columns: 1fr; }
  .prompt-actions .btn, .ai-tools .btn { flex: 1 1 100%; }
  .lead-form { padding: 20px 16px; }
}
@media (max-width: 380px) { .logo .lab, .logo .dot { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html, .carousel-track { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
