/* ============================================================
   Más Clientes para tu Restaurante — estilos
   Paleta cálida (tomate + crema + carbón + dorado)
   ============================================================ */

:root {
  --tomato: #d64541;
  --tomato-dark: #b23530;
  --charcoal: #23201d;
  --cream: #fbf6ee;
  --cream-2: #f3ead9;
  --gold: #e0a458;
  --ink: #2b2622;
  --muted: #6f665d;
  --line: #e7ddcc;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(35, 32, 29, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }
.center { text-align: center; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--charcoal); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
h1 em { color: var(--tomato); font-style: normal; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; }
p { margin: 0 0 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; border-radius: 999px; transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
  padding: .7rem 1.4rem; font-size: 1rem; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--tomato); color: #fff; box-shadow: 0 6px 18px rgba(214, 69, 65, .35); }
.btn-primary:hover { background: var(--tomato-dark); }
.btn-ghost { background: transparent; color: var(--charcoal); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--charcoal); }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-lg { padding: .9rem 1.8rem; font-size: 1.1rem; }
.btn-xl { padding: 1.1rem 2.2rem; font-size: 1.25rem; }

/* ---------- Barra de anuncio ---------- */
.announce {
  background: var(--charcoal); color: var(--cream); text-align: center;
  font-size: .9rem; padding: .55rem 1rem;
}
.announce strong { color: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 238, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--charcoal); font-weight: 800; }
.brand-mark { font-size: 1.4rem; }
.brand-name { font-size: 1rem; }
.header-cta { display: flex; align-items: center; gap: 1rem; }
.price-mini { font-size: .95rem; color: var(--muted); }
.price-mini strong { color: var(--tomato); font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0; background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--tomato); margin-bottom: .6rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.2rem; }
.trust-row { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; font-size: .92rem; color: var(--muted); }
.trust-row li { white-space: nowrap; }

/* Book mockup */
.hero-visual { display: flex; justify-content: center; }
.book-mock { perspective: 1400px; }
.book-cover {
  width: 280px; min-height: 380px; border-radius: 6px 12px 12px 6px;
  background: linear-gradient(135deg, var(--tomato) 0%, var(--tomato-dark) 100%);
  color: #fff; padding: 2rem 1.6rem; display: flex; flex-direction: column; gap: .8rem;
  box-shadow: var(--shadow), inset 6px 0 0 rgba(0,0,0,.18);
  transform: rotateY(-16deg) rotateX(4deg); transition: transform .3s ease;
}
.book-cover:hover { transform: rotateY(-6deg); }
.book-kicker { font-size: .72rem; letter-spacing: .18em; opacity: .85; }
.book-title { font-size: 1.7rem; font-weight: 800; line-height: 1.1; margin-top: .4rem; }
.book-sub { font-size: .9rem; opacity: .9; }
.book-brand { margin-top: auto; font-size: .8rem; opacity: .8; letter-spacing: .04em; }

/* Portada blanca tipográfica (hero) */
.book-cover-w {
  width: 320px; min-height: 460px; background: #ffffff; border-radius: 6px 14px 14px 6px;
  padding: 2.6rem 1.5rem 2rem; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; line-height: .96; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: 0 22px 50px rgba(35,32,29,.30), inset 7px 0 0 rgba(0,0,0,.06);
  transform: rotateY(-14deg) rotateX(3deg); transition: transform .3s ease;
}
.book-cover-w:hover { transform: rotateY(-5deg); }
.bc-mas, .bc-clientes { font-size: 3.1rem; line-height: .9; }
.bc-mas { color: #1a1a1a; }
.bc-clientes { color: var(--tomato); }
.bc-para { font-size: 1.35rem; color: #1a1a1a; letter-spacing: .01em; margin: .3rem 0; position: relative; }
.bc-para::before, .bc-para::after { content: ""; position: absolute; top: 52%; width: 24px; height: 3px; background: var(--tomato); }
.bc-para::before { right: 100%; margin-right: 8px; }
.bc-para::after { left: 100%; margin-left: 8px; }
.bc-rest { font-size: 1.95rem; color: #1a1a1a; }
.bc-sub { font-size: .72rem; font-weight: 600; color: #6f665d; line-height: 1.4; margin: .9rem 0 .5rem; max-width: 220px; letter-spacing: 0; }
.bc-sub b { color: var(--tomato); }
.bc-icon { width: 42px; height: 42px; color: var(--tomato); margin: .2rem 0 .7rem; }
.bc-author { font-size: .78rem; letter-spacing: .2em; font-weight: 800; color: #1a1a1a; }

/* Sistema / 8 motores */
.motores-section { background: var(--cream-2); }
.motores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.motor { display: flex; gap: .8rem; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.motor-n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--tomato); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.motor h3 { font-size: 1.02rem; margin: 0 0 .15rem; }
.motor p { margin: 0; color: var(--muted); font-size: .9rem; }
.motores-foot { text-align: center; margin-top: 1.8rem; font-weight: 700; letter-spacing: .02em; color: var(--charcoal); }
.motores-foot b { color: var(--tomato); }
.chapters-extra { margin-top: 1.8rem; margin-bottom: 0; }

/* ---------- Secciones ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-title { text-align: center; }
.section-sub { text-align: center; color: var(--muted); max-width: 52ch; margin: 0 auto 2.2rem; }

/* Tarjetas */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

.problem { background: var(--white); }
.problem-note { text-align: center; max-width: 60ch; margin: 2.2rem auto 0; font-size: 1.15rem; }

/* Medidor */
.meter-section { background: var(--cream-2); }
.meter-form { display: grid; gap: .7rem; margin: 0 auto 1.5rem; max-width: 560px; }
.check { display: flex; align-items: flex-start; gap: .6rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; cursor: pointer; font-size: .98rem; }
.check input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--tomato); }
.meter { max-width: 560px; margin: 0 auto 1.6rem; }
.meter-bar { height: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--tomato)); transition: width .4s ease; }
.meter-verdict { text-align: center; margin-top: .8rem; font-weight: 600; }

/* Capítulos */
.chapters { list-style: none; counter-reset: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.4rem; }
.chapters li { display: flex; gap: .8rem; align-items: baseline; padding: .7rem .2rem; border-bottom: 1px dashed var(--line); }
.chapters li span { color: var(--tomato); font-weight: 800; font-variant-numeric: tabular-nums; }

/* Bonos */
.bonus { background: var(--white); }
.bonus-card { position: relative; }
.bonus-tag { display: inline-block; background: var(--gold); color: var(--charcoal); font-size: .7rem; font-weight: 800; letter-spacing: .08em; padding: .2rem .6rem; border-radius: 999px; margin-bottom: .6rem; }

/* Prueba social */
.testimonials { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; }
.testimonials .testimonial { flex: 1 1 300px; max-width: 360px; }
.testimonial { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 1.4rem; margin: 0; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.testimonial p { font-size: 1.05rem; margin-bottom: 1rem; }
.testimonial strong { color: var(--tomato); }
.testimonial footer { margin-top: auto; display: flex; flex-direction: column; }
.testimonial cite { font-style: normal; font-weight: 700; color: var(--charcoal); }
.testimonial footer span { color: var(--muted); font-size: .85rem; }
.live-visitors { text-align: center; margin-top: 2.4rem; color: var(--muted); font-weight: 600; }

/* Screenshots reales (prueba social) */
.shots { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.shot { flex: 0 0 auto; width: 190px; padding: 0; border: none; background: none; cursor: pointer; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .2s ease; }
.shot:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(35, 32, 29, .22); }
.shot img { display: block; width: 100%; height: auto; }
@media (max-width: 480px) { .shot { width: 46%; } }

/* Lightbox de screenshots */
.shot-lightbox { position: relative; z-index: 1; }
.shot-lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; border-radius: 12px; box-shadow: var(--shadow); display: block; }
.shot-lightbox .modal-close { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; background: var(--white); border-radius: 50%; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; }

/* Sobre el autor */
.author { background: var(--white); }
.author-grid { display: grid; grid-template-columns: .8fr 1.1fr; gap: 2.5rem; align-items: center; }
.author-photo { position: relative; }
.author-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 22%; border-radius: 18px; box-shadow: var(--shadow); }
.author-copy h2 { margin-bottom: .1rem; }
.author-role { color: var(--tomato); font-weight: 700; margin-bottom: 1rem; }
.author-copy .btn { margin-top: .8rem; }
/* Placeholder cuando aún no existe la foto (autor.jpg) */
.author-photo.no-photo { aspect-ratio: 4 / 5; border: 2px dashed var(--line); border-radius: 18px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); background: var(--cream-2); padding: 1rem; }
.author-photo.no-photo::after { content: "📷 Coloca aquí\A assets/img/autor.jpg"; white-space: pre-line; font-size: .9rem; }

/* Oferta */
.offer { background: linear-gradient(180deg, var(--cream-2), var(--cream)); }
.offer-box { background: var(--white); border: 2px solid var(--tomato); border-radius: 20px; padding: clamp(1.6rem, 4vw, 2.6rem); text-align: center; box-shadow: var(--shadow); }
.offer-list { list-style: none; padding: 0; margin: 1.2rem auto; max-width: 380px; text-align: left; display: grid; gap: .5rem; }
.price-block { margin: 1.6rem 0 1rem; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 1.4rem; margin-right: .5rem; }
.price-now { color: var(--tomato); font-size: 3rem; font-weight: 800; }
.price-note { display: block; color: var(--muted); font-size: .9rem; }
.guarantee { margin-top: 1rem; font-weight: 600; }
.secure-note { color: var(--muted); font-size: .85rem; }
.secure-note.small { font-size: .8rem; margin-top: .8rem; }

/* FAQ */
.faq { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 1.2rem; margin-bottom: .7rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: 1rem 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--tomato); font-weight: 800; }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0 0 1rem; color: var(--muted); }

/* CTA final */
.final-cta { background: var(--charcoal); color: var(--cream); }
.final-cta h2 { color: #fff; }
.final-cta p { color: rgba(251,246,238,.8); max-width: 52ch; margin: 0 auto 1.6rem; }

/* Footer */
.site-footer { background: var(--charcoal); color: rgba(251,246,238,.7); padding: 1.5rem 0; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center; }
.footer-links a { color: var(--gold); text-decoration: none; }

/* ---------- Toast ventas recientes ---------- */
.sale-toast {
  position: fixed; left: 20px; bottom: 20px; z-index: 60;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .8rem 1rem; align-items: center; gap: .6rem;
  max-width: 320px; font-size: .9rem;
  animation: toast-in .4s ease;
}
.sale-toast:not([hidden]) { display: flex; }
.sale-dot { width: 10px; height: 10px; border-radius: 50%; background: #22a06b; flex: none; box-shadow: 0 0 0 4px rgba(34,160,107,.18); }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Modales ---------- */
.modal { position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; padding: 1rem; }
.modal:not([hidden]) { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(35,32,29,.6); backdrop-filter: blur(2px); }
.modal-panel {
  position: relative; z-index: 1; background: var(--white); border-radius: 18px;
  max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 2rem; box-shadow: var(--shadow);
}
.modal-close { position: absolute; top: .8rem; right: 1rem; background: none; border: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-body { color: var(--ink); }
.extract-body h4 { color: var(--tomato); }
.extract-cut { color: var(--muted); font-style: italic; text-align: center; margin-top: 1.2rem; }

.checkout-item { background: var(--cream-2); border-radius: var(--radius-sm); padding: .7rem 1rem; font-weight: 600; }
.checkout-item span { color: var(--muted); font-weight: 400; }
.field { margin: 1rem 0; text-align: left; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.field-row .field { margin: 1rem 0 0; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* Teléfono con código de país */
.phone-input { display: flex; gap: .5rem; }
.phone-input select { flex: 0 1 150px; min-width: 96px; padding: .8rem .4rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit; background: var(--white); color: var(--ink); }
.phone-input input { flex: 1 1 auto; min-width: 0; }
.phone-input select:focus { outline: 2px solid var(--tomato); border-color: var(--tomato); }
.field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
.field input { width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit; }
.field input:focus { outline: 2px solid var(--tomato); border-color: var(--tomato); }
#payment-element { margin: 1rem 0; }

/* Order bumps */
.bumps { display: grid; gap: .7rem; margin: 1rem 0; }
.bump { display: flex; gap: .7rem; align-items: flex-start; border: 2px dashed var(--gold); border-radius: var(--radius-sm); padding: .8rem .9rem; cursor: pointer; background: var(--cream-2); transition: border-color .15s ease, background .15s ease; text-align: left; }
.bump:hover { border-color: var(--tomato); }
.bump-check { margin-top: .15rem; width: 20px; height: 20px; accent-color: var(--tomato); flex: none; cursor: pointer; }
.bump:has(.bump-check:checked) { border-style: solid; border-color: var(--tomato); background: rgba(214, 69, 65, .10); }
.bump-body { display: flex; flex-direction: column; gap: .25rem; }
.bump-top { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.bump-top strong { font-size: .96rem; color: var(--charcoal); }
.bump-price { color: var(--tomato); font-weight: 800; white-space: nowrap; }
.bump-desc { font-size: .84rem; color: var(--muted); line-height: 1.4; }
.checkout-total { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 1.1rem; margin: .9rem 0 .5rem; padding-top: .8rem; border-top: 1px solid var(--line); }
#checkout-total-amount { color: var(--tomato); font-size: 1.4rem; }
.consent { display: flex; gap: .55rem; align-items: flex-start; font-size: .82rem; color: var(--muted); line-height: 1.4; margin: .2rem 0 .7rem; cursor: pointer; }
.consent input { margin-top: .15rem; width: 17px; height: 17px; accent-color: var(--tomato); flex: 0 0 auto; cursor: pointer; }
#pay-button { width: 100%; margin-top: .5rem; }
.payment-message { margin-top: 1rem; padding: .7rem 1rem; border-radius: var(--radius-sm); background: #fde8e7; color: var(--tomato-dark); font-size: .9rem; }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Página de gracias ---------- */
.thanks { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 3rem 1rem; }
.thanks-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 3rem 2rem; max-width: 520px; box-shadow: var(--shadow); }
.thanks-emoji { font-size: 3.5rem; }

/* Formulario del Diagnóstico (página de gracias) */
.diag-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.4rem, 4vw, 2.4rem); max-width: 620px; margin: 1.5rem auto 0; box-shadow: var(--shadow); text-align: left; }
.diag-badge { display: inline-block; background: var(--gold); color: var(--charcoal); font-size: .72rem; font-weight: 800; letter-spacing: .06em; padding: .25rem .7rem; border-radius: 999px; }
.diag-card h2 { margin: .6rem 0 .3rem; }
.diag-sub { color: var(--muted); margin-bottom: 1.4rem; }
.diag-form .field { margin: 1rem 0; }
.diag-form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .4rem; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.redes { display: grid; gap: .5rem; }
.red-check { margin: 0; }
.red-url { width: 100%; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit; }
.red-url:focus { outline: 2px solid var(--tomato); border-color: var(--tomato); }
.radios, .busca { display: grid; gap: .5rem; }
@media (min-width: 520px) { .radios { grid-template-columns: 1fr 1fr; } .busca { grid-template-columns: 1fr 1fr; } }
.diag-form .check { font-weight: 500; }
/* Evita que el estilo grande de .field input afecte a los radios/checkboxes */
.check input[type="radio"], .check input[type="checkbox"] { width: 18px; height: 18px; padding: 0; margin-top: .15rem; accent-color: var(--tomato); flex: 0 0 auto; }
#d-submit { width: 100%; margin-top: .8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .trust-row, .hero-actions { justify-content: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cards-3 { grid-template-columns: 1fr; }
  .chapters { grid-template-columns: 1fr; }
  .author-grid { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
  .author-photo { max-width: 320px; margin: 0 auto; }
  .motores { grid-template-columns: 1fr 1fr; }
  .brand-name { display: none; }
}

@media (max-width: 480px) {
  .motores { grid-template-columns: 1fr; }
}

/* ---------- Modo oscuro ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #1c1a18; --cream-2: #242019; --white: #2a2622;
    --ink: #f0e9dd; --charcoal: #f7f1e6; --muted: #b3a999; --line: #3a352e;
  }
  body { background: var(--cream); }
  .site-header { background: rgba(28,26,24,.9); }
  .announce { background: #100f0e; }
  .final-cta, .site-footer { background: #100f0e; }
}
