/* Cotizo — página pública */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--topbar);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .3s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.topnav { display: flex; align-items: center; gap: 30px; }
.topnav a {
  position: relative;
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-2);
  transition: color .2s;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.topnav a:hover { color: var(--ink); }
.topnav a:hover::after { transform: scaleX(1); transform-origin: left; }
.top-actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 820px) {
  .topnav { display: none; }
}
@media (max-width: 440px) {
  .top-actions .btn-ghost { display: none; }
}

/* ── Hero ──────────────────────────── */
.hero { position: relative; padding: 80px 0 104px; overflow: hidden; }
.hero::before {
  /* Retícula sutil de fondo */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 10%, transparent 70%);
  opacity: .55;
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 26px;
}
.eyebrow i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: ring 2.4s var(--ease) infinite;
}
@keyframes ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
  70%, 100% { box-shadow: 0 0 0 8px transparent; }
}
.hero h1 {
  font-size: clamp(44px, 6.4vw, 82px);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -0.055em;
}
.hero h1 em {
  font-style: normal;
  color: var(--hero-em);
  background: linear-gradient(var(--mark-hl), var(--mark-hl)) no-repeat 0 88% / 0% 34%;
  padding: 0 .04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: highlight 1s .8s var(--ease) forwards;
}
@keyframes highlight { to { background-size: 100% 34%; } }
.hero .lede {
  margin-top: 26px;
  max-width: 33em;
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-cta .btn-primary .arrow-r { transition: transform .25s var(--ease); }
.hero-cta .btn-primary:hover .arrow-r { transform: translateX(4px); }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* Documento de muestra */
.paper-stage { position: relative; min-height: 520px; perspective: 1200px; }
.paper {
  position: absolute;
  inset: 10px 10px auto 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-paper);
  padding: 34px 34px 28px;
  font-size: 12.5px;
  color: var(--ink-2);
  --rot: 1.4deg;
  transform: rotate(var(--rot));
  animation: paper-in 1s .25s var(--ease) both;
}
@keyframes paper-in {
  from { opacity: 0; transform: translateY(40px) rotate(6deg) rotateX(12deg); }
  to   { opacity: 1; transform: rotate(var(--rot)); }
}
.paper.behind {
  inset: 34px 40px auto 4px;
  height: 470px;
  --rot: -3deg;
  background: var(--paper-2);
  box-shadow: 0 8px 24px -14px rgba(0,0,0,.25);
  animation-delay: .1s;
}
.paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.paper-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600; font-size: 17px;
}
.paper-title { text-align: right; }
.paper-title b { display: block; font-weight: 600; font-size: 22px; color: var(--ink); letter-spacing: -.04em; }
.paper-title span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.paper-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 26px 0 22px; }
.paper-parties small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.paper-parties strong { color: var(--ink); font-weight: 600; }
.paper table { width: 100%; border-collapse: collapse; }
.paper th { text-align: left; font-weight: 500; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 0 8px; border-bottom: 1px solid var(--ink); }
.paper td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.paper tbody tr { animation: fade-up .5s var(--ease) both; }
.paper tbody tr:nth-child(1) { animation-delay: .7s; }
.paper tbody tr:nth-child(2) { animation-delay: .82s; }
.paper tbody tr:nth-child(3) { animation-delay: .94s; }
.paper td:last-child, .paper th:last-child { text-align: right; }
.paper .num { font-size: 12px; color: var(--ink); }
.paper-total { display: flex; justify-content: flex-end; margin-top: 16px; }
.paper-total div { display: grid; grid-template-columns: auto auto; gap: 4px 28px; text-align: right; }
.paper-total .grand { font-weight: 600; font-size: 19px; color: var(--ink); padding-top: 6px; border-top: 1px solid var(--ink); letter-spacing: -.03em; }
.paper-foot { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line-strong); font-size: 11.5px; color: var(--muted); }

.sticky-note {
  position: absolute;
  right: -6px;
  bottom: -18px;
  width: 190px;
  padding: 14px 16px;
  border-radius: 4px;
  background: #f2d86a;
  color: #3a3214;
  font-size: 13.5px;
  line-height: 1.4;
  --rot: -4deg;
  transform: rotate(var(--rot));
  box-shadow: 0 14px 24px -12px rgba(60, 50, 10, .5);
  animation: pop .6s 1.3s var(--ease) both, float 6s 2s ease-in-out infinite;
}
.sticky-note b { display: block; font-weight: 600; margin-bottom: 2px; }

@media (max-width: 960px) {
  .hero { padding: 40px 0 72px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .paper-stage { min-height: 500px; max-width: 520px; }
}
@media (max-width: 520px) {
  .paper { inset: 8px 0 auto 8px; padding: 22px 20px; }
  .paper.behind { display: none; }
  .paper-parties { grid-template-columns: 1fr; gap: 10px; }
  .sticky-note { right: 0; bottom: -10px; width: 170px; }
}

/* ── Franja con desplazamiento ─────── */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  background: var(--paper-2);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee span {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}
.marquee span i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Secciones ─────────────────────── */
.section { padding: 112px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.kicker { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--accent); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.05em; }
.section-head p { margin-top: 16px; font-size: 18px; color: var(--ink-2); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-paper); border-color: var(--line-strong); }
.step .n {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}
.step h3 { margin-top: 22px; font-size: 21px; letter-spacing: -0.035em; }
.step p { margin-top: 10px; color: var(--ink-2); }

@media (max-width: 820px) {
  .section { padding: 76px 0; }
  .steps { grid-template-columns: 1fr; }
}

/* Filas de funciones */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.feature:last-child { border-bottom: 1px solid var(--line); }
.feature.flip .feature-copy { order: 2; }
.feature-copy h3 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.045em; }
.feature-copy p { margin-top: 14px; color: var(--ink-2); font-size: 17px; max-width: 30em; }
.feature-copy ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.feature-copy li { padding-left: 26px; position: relative; color: var(--ink-2); }
.feature-copy li::before {
  content: "";
  position: absolute; left: 0; top: .45em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 4px var(--accent-soft), inset 0 0 0 10px var(--accent);
}

.feature-visual {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: background .3s, border-color .3s;
}

.convert-demo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mini-doc {
  flex: 1;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  background: var(--paper);
}
.mini-doc small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.mini-doc b { display: block; font-weight: 600; font-size: 18px; letter-spacing: -.03em; margin: 4px 0 10px; }
.mini-doc .num { font-size: 15px; }
.mini-doc.is-new { border-color: var(--accent); background: var(--accent-soft); }
.arrow { font-size: 26px; color: var(--accent); }
.reveal.in .mini-doc.is-new { animation: pop .6s .5s var(--ease) both; }
.reveal.in .arrow { animation: nudge 1.6s .9s ease-in-out 2; }
@keyframes nudge { 50% { transform: translateX(6px); } }

.owed { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.owed td { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.owed tr:last-child td { border-bottom: 0; }
.owed td:last-child { text-align: right; }
.owed .who { font-weight: 500; }
.owed .when { color: var(--muted); font-size: 13px; }
.owed tr { opacity: 0; }
.reveal.in .owed tr { animation: fade-up .55s var(--ease) both; }
.reveal.in .owed tr:nth-child(2) { animation-delay: .12s; }
.reveal.in .owed tr:nth-child(3) { animation-delay: .24s; }

.brand-demo { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.brand-demo .paper-logo { transition: background .4s var(--ease); }
.swatches { display: flex; gap: 8px; }
.swatches i {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.swatches i:hover { transform: scale(1.12); }
.swatches i.on { box-shadow: 0 0 0 2px var(--ink); }
.brand-line { height: 10px; border-radius: 4px; background: var(--paper-2); }
.brand-line + .brand-line { margin-top: 8px; width: 70%; }

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .feature.flip .feature-copy { order: 0; }
}

/* ── Precios ───────────────────────── */

/* Selector mensual / anual */
.billing-bar { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 28px; }
.billing-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
}
.billing-toggle button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 15px var(--sans);
  cursor: pointer;
  transition: color .3s;
}
.billing-toggle button[aria-checked="true"] { color: var(--ink); }
.billing-toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.billing-thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line);
  transition: transform .45s var(--ease);
}
.billing-toggle[data-cycle="annual"] .billing-thumb { transform: translateX(100%); }
.currency-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
}
.currency-toggle button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 13.5px var(--mono);
  cursor: pointer;
  transition: background .3s var(--ease), color .3s, box-shadow .3s;
}
.currency-toggle button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.currency-toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.save-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
}
.promo-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r);
  background: var(--warn-soft);
  color: var(--ink-2);
  font-size: 14px;
}
.promo-banner::before { content: "★"; color: var(--warn); }
.promo-banner b { color: var(--ink); font-weight: 600; }

/* Tarjetas */
#precios .wrap { max-width: 1320px; }
.pricing { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.plan {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 26px 20px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.plan.pro { background: #161714; color: #f1f0ea; border-color: #161714; }
:root[data-theme-resolved="dark"] .plan.pro { background: #0b0c0b; border-color: #e8cd5a66; }
.plan.pro .plan-desc, .plan.pro li, .plan.pro .plan-line { color: #c3c2b8; }
.plan.pro .plan-old { color: #8f8e85; }
.plan h3 { font-size: 20px; letter-spacing: -0.03em; }
.plan-desc { margin-top: 6px; min-height: 2.8em; color: var(--ink-2); font-size: 14.5px; line-height: 1.4; }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 20px 0 6px; line-height: 1; }
.plan-price .amount { font-family: var(--display); font-size: clamp(28px, 2.5vw, 36px); white-space: nowrap; font-weight: 650; letter-spacing: -0.05em; }
.plan-price small { font-size: 14px; opacity: .7; }
.plan-old { order: -1; flex-basis: 100%; font-size: 14px; color: var(--muted); }
.plan-line { min-height: 2.8em; font-size: 13.5px; line-height: 1.4; color: var(--muted); margin-bottom: 18px; }
.plan ul { list-style: none; padding: 18px 0 0; margin: 20px 0 0; display: grid; gap: 9px; font-size: 14.5px; color: var(--ink-2); border-top: 1px solid var(--line); }
.plan.pro ul { border-top-color: #2e302b; }
.plan li { padding-left: 24px; position: relative; line-height: 1.4; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "–"; color: var(--muted); }
.plan.pro li::before { color: #e8cd5a; }
.plan.pro .btn { --bg: #e8cd5a; --fg: #161714; --bd: #e8cd5a; }
.plan.pro .btn:hover { --bg: #f2d86a; }
.plan-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #e8cd5a;
  color: #161714;
  font-size: 12px;
  font-weight: 600;
}

/* Entrada de las tarjetas y cambio de ciclo */
.pricing .plan-in { opacity: 0; transform: translateY(24px); }
.pricing.in .plan-in { animation: fade-up .7s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms); }
.pricing .plan-line, .pricing .plan-old { transition: opacity .3s; }
.pricing.switching .plan-line, .pricing.switching .plan-old { opacity: 0; }

.pricing-note { margin-top: 24px; max-width: 760px; font-size: 14px; color: var(--muted); }
.pricing-note a { color: var(--ink-2); }

/* Tabla comparativa */
.compare { margin-top: 36px; }
.compare-open span { display: inline-block; transition: transform .3s var(--ease); }
.compare-open.open span { transform: rotate(180deg); }
.compare-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); animation: fade-up .5s var(--ease) both; }
.compare-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 14.5px; }
.compare-table th, .compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.compare-table th[scope="row"] { text-align: left; font-weight: 400; color: var(--ink-2); }
.compare-table thead th { position: sticky; top: 0; background: var(--card); font-size: 15px; font-weight: 600; padding-top: 18px; padding-bottom: 14px; }
.compare-table .grp th { text-align: left; padding-top: 20px; background: var(--paper-2); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.compare-table .hl { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.ck { font-weight: 600; }
.ck.yes { color: var(--accent); }
.ck.no { color: var(--muted); opacity: .6; }

@media (max-width: 1240px) {
  .pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 16px; }
}
@media (max-width: 900px) {
  .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .pricing { grid-template-columns: 1fr; }
  .plan-desc, .plan-line { min-height: 0; }
  .billing-toggle { width: 100%; }
  .billing-toggle button { padding: 0 10px; }
}

/* ── Preguntas ─────────────────────── */
.faq { max-width: 760px; border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 40px 22px 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  position: relative;
  transition: color .2s;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 17px;
  font-size: 24px;
  font-weight: 300;
  color: var(--muted);
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--ink-2); max-width: 40em; }
.faq details[open] p { animation: fade-up .45s var(--ease) both; }

/* ── Cierre ────────────────────────── */
.closing { position: relative; padding: 104px 0; background: #1f5c43; color: #eef3ef; overflow: hidden; }
.closing::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  right: -160px; top: -200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 216, 106, .22), transparent 65%);
  animation: float 9s ease-in-out infinite;
}
.closing .wrap { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.closing h2 { font-size: clamp(34px, 5vw, 60px); max-width: 13em; letter-spacing: -0.055em; color: #fff; }
.closing .btn { --bg: #f6f5f1; --fg: #161714; --bd: #f6f5f1; }
.closing .btn:hover { --bg: #fff; transform: translateY(-2px); }

.footer { padding: 48px 0; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--ink); }
.footer .legal-line { flex-basis: 100%; font-size: 13px; }
