/* ==========================================================================
   SyncFico — main.css
   Tokens: fondo papel frío, verde ledger + ámbar de acción.
   ========================================================================== */

:root {
  --bg: #F2F5F8;
  --bg-alt: #E6ECF3;
  --ink: #0F1B2D;
  --ink-soft: #4C5B72;
  --brand: #0E2A4A;
  --brand-dark: #081B30;
  --accent: #FF6B5B;
  --accent-dark: #E5503F;
  --cyan: #14B8B4;
  --danger: #D64545;
  --line: #C6D0DC;
  --card-bg: #FFFFFF;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --max-width: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}

p { margin: 0; color: var(--ink-soft); }

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink-soft); }

.btn-large { padding: 15px 28px; font-size: 1.02rem; }
.btn-small { padding: 9px 18px; font-size: 0.9rem; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transform: scale(0);
  animation: ripple-anim 0.55s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(3.2); opacity: 0; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 245, 241, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 14px rgba(18,32,28,0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.main-nav {
  display: flex;
  gap: 28px;
}
.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .main-nav { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 96px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.eyebrow-plain {
  font-size: 0.95rem;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  max-width: 14ch;
}

.hero-sub {
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-microcopy {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Hero visual: sync diagram */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.pipeline-card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 20px 40px -24px rgba(18,32,28,0.25);
  transition: box-shadow 0.3s ease;
}
.pipeline-card.is-syncing {
  box-shadow: 0 24px 48px -20px rgba(226,149,61,0.35);
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  flex: 1 1 0;
  min-width: 0;
  padding: 4px;
}
.pipeline-label {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.pipeline-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--brand-dark);
  white-space: nowrap;
}
.pipeline-node[data-node="woo"] .pipeline-value {
  color: var(--accent-dark);
}

/* Plugin node: the middleware, visually distinct as the hub of the pipeline */
.pipeline-node--core {
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 12px 10px;
  background: var(--bg-alt);
  transition: transform 0.25s ease;
}
.pipeline-card.is-syncing .pipeline-node--core {
  transform: translateY(-2px);
}
.pipeline-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-dark);
}
.pipeline-node--core .pipeline-label {
  font-size: 1rem;
}

/* Pipes connecting the nodes */
.pipeline-pipe {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 40px;
}
.pipe-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--line);
  transform: translateY(-50%);
}
.pipe-pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}
.pipeline-pipe--oneway .pipe-pulse {
  animation: pulse-h-oneway 2.2s linear infinite;
}
.pipeline-pipe--twoway .pipe-pulse {
  background: var(--cyan);
  animation: pulse-h-twoway 2.6s ease-in-out infinite alternate;
}
.pipe-arrow {
  position: relative;
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: var(--card-bg);
  padding: 0 3px;
  z-index: 1;
}
.pipe-arrow--v { display: none; }

@keyframes pulse-h-oneway {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}
@keyframes pulse-h-twoway {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 1; }
}

.sync-status {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* Below this width, read the pipeline top-to-bottom instead of left-to-right */
@media (max-width: 520px) {
  .pipeline-card { flex-direction: column; padding: 28px 18px; }
  .pipeline-pipe { flex: 0 0 40px; width: 100%; height: 40px; }
  .pipe-track { left: 50%; right: auto; top: 0; bottom: 0; height: auto; width: 2px; transform: translateX(-50%); }
  .pipe-pulse { left: 50%; top: 0; transform: translateX(-50%); }
  .pipe-arrow--h { display: none; }
  .pipe-arrow--v { display: block; }
  .pipeline-pipe--oneway .pipe-pulse { animation-name: pulse-v-oneway; }
  .pipeline-pipe--twoway .pipe-pulse { animation-name: pulse-v-twoway; }
}
@keyframes pulse-v-oneway {
  0% { top: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: calc(100% - 8px); opacity: 0; }
}
@keyframes pulse-v-twoway {
  0% { top: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: calc(100% - 8px); opacity: 1; }
}

/* ---------- Sections generic ---------- */
.section {
  padding: 88px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  max-width: 52ch;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 12px;
}
.section-sub {
  font-size: 1.05rem;
}

/* ---------- Pain / benefits list ---------- */
.pain-list {
  display: flex;
  flex-direction: column;
}
.pain-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.pain-item:last-child { border-bottom: 1px solid var(--line); }
.pain-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brand);
  font-weight: 600;
}
.pain-body h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.pain-body p { max-width: 62ch; }

@media (max-width: 600px) {
  .pain-item { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Steps timeline ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 22px;
  padding-bottom: 40px;
  position: relative;
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: -8px;
  width: 1px;
  background: var(--line);
}
.step-index {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 1;
}
.step-body h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.step-body p { max-width: 58ch; }

/* ---------- Prueba social / video ---------- */
.prueba-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .prueba-grid { grid-template-columns: 1fr; }
}
.prueba-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}
.prueba-copy p { font-size: 1.05rem; max-width: 46ch; }

.video-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--brand-dark);
}
/* Esta regla faltaba por completo: sin ella, el <iframe> del embed de
   YouTube no tiene ninguna dimensión propia y el navegador lo renderiza
   a su tamaño por defecto (~300x150px) — esa era la causa del "video
   reducido", no un tema de paleta. */
.video-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}
.video-placeholder {
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--bg);
}
.play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
  overflow: hidden;
}
.play-btn:hover { transform: scale(1.06); }
.video-caption {
  font-size: 0.9rem;
  color: #AFC0D2;
}

/* ---------- FAQ ---------- */
.faq-list {
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.faq-icon {
  flex: 0 0 20px;
  height: 20px;
  position: relative;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--brand);
  transition: transform 0.25s ease;
}
.faq-icon::before {
  width: 100%; height: 2px; top: 9px; left: 0;
}
.faq-icon::after {
  width: 2px; height: 100%; top: 0; left: 9px;
}
.faq-item.is-open .faq-icon::after {
  transform: rotate(90deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p {
  padding-bottom: 22px;
  max-width: 68ch;
  font-size: 1rem;
}

/* ---------- Checkout / Precios ---------- */
.comprar-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .comprar-grid { grid-template-columns: 1fr; }
}
.comprar-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}
.comprar-copy p { font-size: 1.05rem; max-width: 46ch; }

.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 20px 40px -24px rgba(18,32,28,0.2);
}
.pricing-plan-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
}
.pricing-amount {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
}
.pricing-amount span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.pricing-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-features li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-left: 22px;
  position: relative;
}
.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.pricing-card .btn { width: 100%; margin-bottom: 12px; }
.pricing-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

/*Pago completado */
/* Mensaje de confirmación del Checkout */
#checkoutNote {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 600;
}

/* ---------- CTA final ---------- */
.cta-final {
  background: var(--brand-dark);
  color: var(--bg);
  padding: 96px 0;
}
.cta-final-inner {
  max-width: 620px;
  text-align: left;
}
.cta-final h2 {
  color: var(--bg);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin-bottom: 16px;
}
.cta-final p {
  color: #AFC0D2;
  font-size: 1.05rem;
  margin-bottom: 32px;
}
.cta-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cta-form input {
  flex: 1;
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #234061;
  background: #0F2440;
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 1rem;
}
.cta-form input::placeholder { color: #7C8FA8; }
.cta-form input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.cta-note {
  font-size: 0.85rem;
  color: #7C8FA8;
}
.cta-note.is-success { color: var(--cyan); }
.cta-note.is-error { color: var(--danger); }

@media (max-width: 560px) {
  .cta-form { flex-direction: column; }
  .cta-form .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding-top: 48px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 32px;
}
.footer-brand p {
  font-size: 0.9rem;
  margin-top: 4px;
}
.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.footer-links a:hover { color: var(--ink); }

.footer-legal {
  border-top: 1px solid var(--line);
  padding: 20px 24px 28px;
}
.footer-legal p {
  font-size: 0.78rem;
  color: var(--ink-soft);
  max-width: 80ch;
  margin-bottom: 8px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}