/* Traffick Pro — Landing de la agencia
   Requiere styles.css (tokens). Azul = marca. Amarillo = solo conversión. */

:root { --max: 1120px; --hair: var(--n-200); --wa: #128c7e; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { background: #fff; overflow-x: hidden; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.sec { padding: 112px 0; }
.sec-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.tag {
  display: inline-block; padding: 3px 11px; margin-bottom: 16px;
  border: 1px solid var(--tp-blue-100); border-radius: var(--r-pill); background: var(--tp-blue-50);
  color: var(--tp-blue); font-family: var(--font-display); font-weight: 700; font-size: 12px;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
h1 { font-weight: 900; font-size: clamp(40px, 5.6vw, 64px); line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-weight: 800; font-size: clamp(30px, 4vw, 42px); line-height: 1.08; letter-spacing: -0.025em; }
h3 { font-weight: 700; font-size: 18px; line-height: 1.25; }
.lead { font-size: 18px; line-height: 1.6; color: var(--n-600); margin: 16px 0 0; }
.mark { position: relative; z-index: 0; white-space: nowrap; color: var(--tp-blue); padding: 0 .12em; }
.mark::before { content: ""; position: absolute; z-index: -1; inset: .06em -.02em .02em; background: var(--tp-blue-50); border-radius: 10px; transform: skewX(-3deg); }
.num { font-family: var(--font-slab); font-weight: 600; }

/* Botones */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border: 1px solid transparent; border-radius: 14px; font-family: var(--font-display); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .08s ease, box-shadow .15s ease, background .15s ease; }
.b:active { transform: translateY(1px); }
.b:focus-visible, .step-btn:focus-visible, .faq summary:focus-visible, .nav a:focus-visible, input:focus-visible { outline: 3px solid var(--tp-blue-200); outline-offset: 2px; }
.b-y { background: var(--tp-yellow); color: var(--tp-black); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 1px 2px rgba(15,18,50,.2); }
.b-y:hover { background: #ffc81f; box-shadow: 0 12px 32px rgba(250,188,0,.35); }
.b-blue { background: var(--tp-blue); color: #fff; }
.b-blue:hover { background: var(--tp-blue-600); box-shadow: var(--sh-pop); }
.b-line { background: #fff; border-color: var(--hair); color: var(--tp-black); }
.b-line:hover { border-color: var(--tp-blue-200); color: var(--tp-blue); }
.b-text { color: var(--tp-black); background: none; }
.b-text:hover { color: var(--tp-blue); }

/* Nav flotante */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; padding: 0 16px; pointer-events: none; }
.nav-in { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 760px; margin: 0 auto; padding: 8px 8px 8px 18px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border: 1px solid var(--hair); border-radius: var(--r-pill); box-shadow: var(--sh-2); }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 900; font-size: 18px; letter-spacing: -0.02em; color: var(--tp-black); text-decoration: none; }
.logo img { width: 28px; height: 28px; object-fit: contain; }
.logo b { color: var(--tp-blue); font-weight: 900; margin-left: -3px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--n-600); text-decoration: none; }
.nav-links a:hover { color: var(--tp-blue); }
.nav .b { min-height: 44px; padding: 10px 16px; font-size: 13px; border-radius: var(--r-pill); }

/* Hero */
.hero { padding: 148px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 30px; }
.note { font-size: 12px; color: var(--n-500); margin: 10px 0 0; }

/* Franja de confianza */
.trust { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.trust ul { list-style: none; margin: 0; padding: 22px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--n-600); }

/* Pasos */
.steps { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: stretch; }
.step-list { display: grid; gap: 10px; align-content: start; }
.step { border: 1px solid var(--hair); border-radius: var(--r-lg); background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.step.on { border-color: var(--tp-blue-200); box-shadow: var(--sh-2); }
.step-btn { width: 100%; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px 18px; background: none; border: 0; border-radius: var(--r-lg); cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 15px; text-align: left; color: var(--tp-black); }
.step-btn span { font-weight: 600; font-size: 12px; color: var(--n-500); white-space: nowrap; }
.step p { display: none; margin: 0; padding: 0 18px 18px; color: var(--n-600); font-size: 14px; line-height: 1.6; }
.step.on p { display: block; }
.stage { background: var(--n-50); border-radius: var(--r-xl); padding: 28px; display: grid; place-items: center; min-height: 380px; }
.demo { display: none; width: 100%; max-width: 360px; }
.demo.on { display: block; animation: rise .3s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sheet { background: #fff; border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-2); font-size: 14px; }
.sheet + .sheet { margin-top: 10px; }
.sheet dt { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--n-500); }
.sheet dd { margin: 2px 0 12px; }
.sheet dd:last-child { margin-bottom: 0; }
.mini-hero { height: 110px; border-radius: var(--r-md); background: linear-gradient(135deg, var(--tp-blue), var(--tp-blue-700)); color: #fff; padding: 14px; font-family: var(--font-display); font-weight: 800; line-height: 1.2; display: flex; align-items: flex-end; margin-bottom: 12px; }
.mini-line { height: 8px; border-radius: 4px; background: var(--n-100); margin-bottom: 8px; }
.mini-btn { display: block; margin-top: 12px; padding: 10px; text-align: center; border-radius: var(--r-sm); background: var(--tp-yellow); font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.bub { max-width: 88%; width: fit-content; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; background: #fff; box-shadow: var(--sh-1); margin-bottom: 8px; }
.bub.me { margin-left: auto; background: var(--tp-blue-100); }

/* Cifras */
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split { border: 1px solid var(--hair); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--sh-2); }
.split small { font-size: 13px; color: var(--n-600); }
.bar-row { margin-top: 20px; }
.bar-row div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 6px; }
.bar { height: 16px; border-radius: 6px; background: var(--n-100); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--n-400); }
.bar.direct i { background: var(--tp-blue); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.kpi .num { display: block; font-size: 38px; line-height: 1.05; color: var(--tp-blue); }
.kpi b { display: block; font-family: var(--font-display); font-size: 14px; margin-top: 6px; }
.kpi span:last-child { font-size: 13px; color: var(--n-600); }

/* Recorrido */
.panel { background: var(--n-50); border-radius: 28px; padding: 64px 32px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: f; }
.flow li { position: relative; background: #fff; border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 18px 14px; text-align: center; box-shadow: var(--sh-1); }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); z-index: 1; color: var(--tp-blue); font-weight: 700; }
.flow b { display: block; font-family: var(--font-display); font-size: 14px; margin-bottom: 4px; }
.flow span { font-size: 12px; color: var(--n-600); line-height: 1.4; display: block; }
.flow li:last-child { background: var(--tp-blue); border-color: var(--tp-blue); color: #fff; }
.flow li:last-child span { color: rgba(255,255,255,.8); }

/* Calculadora */
.calc { display: grid; grid-template-columns: 1fr 1fr; max-width: 900px; margin: 0 auto; border: 1px solid var(--hair); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-3); }
.calc form { padding: 28px; display: grid; gap: 14px; }
.calc label { display: grid; gap: 6px; font-family: var(--font-display); font-weight: 600; font-size: 13px; }
.calc input { width: 100%; padding: 12px 14px; font: 500 16px var(--font-body); color: var(--text); background: var(--n-25); border: 1px solid var(--hair); border-radius: var(--r-md); }
.calc-out { background: var(--tp-blue); color: #fff; padding: 28px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.calc-out small { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.calc-out .num { font-size: clamp(36px, 5vw, 48px); line-height: 1.1; color: #fff; margin-top: 6px; }
.calc-out p { color: rgba(255,255,255,.85); font-size: 14px; margin: 4px 0 20px; }

/* Garantía + fundador */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo > div { border-radius: var(--r-xl); padding: 32px; }
.guar { background: var(--tp-blue); color: #fff; }
.guar .tag { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }
.guar p { color: rgba(255,255,255,.85); line-height: 1.6; margin: 12px 0 0; }
.who { border: 1px solid var(--hair); }
.who p { color: var(--n-600); line-height: 1.6; margin: 12px 0 0; }
.who-id { display: flex; gap: 12px; align-items: center; margin-top: 20px; }
.who-id b { display: block; font-family: var(--font-display); }
.who-id span:last-child { font-size: 13px; color: var(--n-600); }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--tp-blue); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0 0 18px; color: var(--n-600); font-size: 14px; line-height: 1.65; }

/* CTA final */
.final { background: var(--tp-black); color: #fff; border-radius: 28px; padding: 72px 24px; text-align: center; }
.final h2 { font-size: clamp(32px, 5vw, 52px); }
.final h2 em { font-style: normal; color: var(--tp-yellow); }
.final .lead { color: rgba(255,255,255,.75); max-width: 520px; margin: 16px auto 28px; }

/* Footer */
.foot { padding: 64px 0 0; overflow: hidden; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; font-size: 14px; color: var(--n-600); }
.foot-row a { color: var(--n-700); }
.giant { font-family: var(--font-display); font-weight: 900; font-size: 15.5vw; line-height: .8; letter-spacing: -0.05em; text-align: center; white-space: nowrap; color: var(--tp-blue-50); margin: 40px 0 -.08em; user-select: none; }

/* Teléfono con página de ejemplo */
.phone { width: 100%; max-width: 300px; margin: 0 auto; padding: 10px; background: var(--tp-black); border-radius: 36px; box-shadow: var(--sh-pop); }
.phone-screen { height: 540px; overflow: hidden; border-radius: 27px; background: #fff; }
.phone-page { animation: page-scroll 16s ease-in-out infinite alternate; }
.phone:hover .phone-page { animation-play-state: paused; }
@keyframes page-scroll { 0%, 12% { transform: translateY(0); } 88%, 100% { transform: translateY(calc(-100% + 540px)); } }
.fp-hero { height: 250px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; background: linear-gradient(170deg, #7fa66a 0%, #3f6b45 52%, #24402c 100%); }
.fp-hero small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.fp-hero strong { font-family: var(--font-slab); font-size: 24px; line-height: 1.15; margin: 4px 0 12px; }
.fp-btn { display: block; padding: 10px; border-radius: 10px; background: #25d366; color: #06371c; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 12px; }
.fp-sec { padding: 16px; border-bottom: 1px solid var(--n-100); font-size: 12px; color: var(--n-600); }
.fp-sec b { display: block; margin-bottom: 8px; color: var(--tp-black); font-family: var(--font-slab); font-size: 15px; }
.fp-gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.fp-gal i { height: 62px; border-radius: 6px; background: linear-gradient(145deg, #a9c28f, #55805a); }
.fp-gal i:nth-child(2) { background: linear-gradient(145deg, #c9a37a, #7b5635); }
.fp-gal i:nth-child(3) { background: linear-gradient(145deg, #8fb4c9, #4c7a8f); }
.fp-room { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--n-100); }
.phone-note { max-width: 300px; margin: 10px auto 0; text-align: center; font-size: 12px; color: var(--n-500); }
.offer-line { margin: 18px 0 0; font-size: 14px; color: var(--n-600); }
.offer-line b { color: var(--tp-black); }

/* Lo que no funcionó */
.fails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fail { padding: 22px; border: 1px solid var(--hair); border-radius: var(--r-lg); background: #fff; }
.fail p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--n-600); }

/* Qué trae la página */
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: part; }
.parts li { padding: 20px; border: 1px solid var(--hair); border-radius: var(--r-lg); background: #fff; counter-increment: part; }
.parts li::before { content: counter(part, decimal-leading-zero); display: block; margin-bottom: 10px; color: var(--tp-blue); font-family: var(--font-slab); font-weight: 600; font-size: 20px; }
.parts p { margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--n-600); }

/* Para quién */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fit > div { padding: 28px; border-radius: var(--r-xl); border: 1px solid var(--hair); }
.fit .yes-box { background: var(--tp-blue-50); border-color: var(--tp-blue-100); }
.fit ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; font-size: 15px; line-height: 1.5; }
.fit li { display: flex; gap: 10px; }
.fit .yes-box li::before { content: "✓"; color: var(--tp-blue); font-weight: 700; }
.fit .no-box li::before { content: "✕"; color: var(--danger); font-weight: 700; }

/* Inversión */
.price { max-width: 620px; margin: 0 auto; padding: 36px; text-align: center; border: 2px solid var(--tp-yellow); border-radius: var(--r-xl); box-shadow: var(--sh-3); }
.price .num { display: block; font-size: clamp(44px, 8vw, 64px); line-height: 1; }
.price small { display: block; margin-top: 6px; color: var(--n-600); font-size: 14px; }
.price ul { list-style: none; display: grid; gap: 10px; margin: 24px auto; padding: 0; max-width: 420px; text-align: left; font-size: 15px; }
.price li { display: flex; gap: 10px; line-height: 1.45; }
.price li::before { content: "✓"; color: var(--tp-blue); font-weight: 700; }
.price .b { width: 100%; }
.price-note { margin: 14px 0 0; font-size: 13px; line-height: 1.55; color: var(--n-600); }
.flow.three { grid-template-columns: repeat(3, 1fr); max-width: 820px; margin: 0 auto; }
.guar small { display: block; margin-top: 16px; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,.75); }

@media (max-width: 960px) {
  .sec { padding: 80px 0; }
  .hero-grid, .steps, .nums, .calc, .duo, .fit { grid-template-columns: 1fr; }
  .fails, .flow.three { grid-template-columns: 1fr; }
  .parts { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow li:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -15px; transform: translateX(50%); }
  .faq { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .mark { white-space: normal; padding: 0 .08em; background: var(--tp-blue-50); border-radius: 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .mark::before { display: none; }
  .parts { grid-template-columns: 1fr; }
  .price { padding: 24px 18px; }
  .hero { padding-top: 112px; }
  .panel { padding: 48px 16px; border-radius: var(--r-xl); }
  .kpis { gap: 22px 16px; }
  .kpi .num { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo.on, .phone-page { animation: none; }
}
