/* Web comercial de Tomaatoma (DISENO_V1 §4.1): sin dependencias, rápida, móvil primero.
   Misma paleta que la app (contraste AA comprobado: frontend/scripts/contraste.mjs) y las
   mismas fuentes (OFL), servidas desde aquí. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/bricolage.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #fbf8f6;
  --fg: #1c1917;
  --muted: #6b625d;
  --primary: #d42a25;
  --primary-dark: #c4221e;
  --tomato: #e5322d;
  --tint: #fff1ef;
  --leaf: #1f7a45;
  --band: #f4efec;
  --border: #ede7e3;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(28 25 23 / .04), 0 4px 16px rgb(28 25 23 / .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
body {
  margin: 0;
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
h1, h2, .display { font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif; letter-spacing: -.01em; }
a { color: inherit; }
img, video { max-width: 100%; }
:focus-visible { outline: 3px solid rgb(212 42 37 / .55); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 32px; width: auto; display: block; }

/* Cabecera: en el móvil, menú hamburguesa (antes ocupaba tres filas). */
.top { position: sticky; top: 0; background: rgb(251 248 246 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); z-index: 20; }
.nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; }
.nav a { text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; }
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .top .nav { display: none; position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 20px 16px; box-shadow: var(--shadow); }
  .top .nav a { padding: 12px 4px; font-size: 1.05rem; }
  .top .nav .btn { margin-top: 8px; text-align: center; }
  .top.open .nav { display: flex; }
  .menu-toggle { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 14px; background: transparent; color: var(--fg); cursor: pointer; }
  .menu-toggle:hover { background: var(--band); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; background: var(--primary); color: #fff; text-decoration: none;
  font-weight: 600; padding: 12px 24px; border-radius: 14px; border: 2px solid var(--primary);
  box-shadow: var(--shadow);
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); text-decoration: none; }
.btn.small { min-height: 40px; padding: 7px 16px; }
.nav .btn { color: #fff; }
.btn.outline { background: #fff; color: var(--primary); box-shadow: none; }
.btn.outline:hover { background: var(--tint); }
.btn.big { min-height: 56px; font-size: 1.1rem; padding: 14px 28px; }

/* Portada: titular, subtítulo, botón y un móvil con un vídeo real en bucle. */
.hero { padding: 48px 0 56px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } .hero { padding: 72px 0 80px; } }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.08; font-weight: 800; margin: 10px 0 16px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; letter-spacing: .02em; font-size: .9rem; color: #b3201c; font-weight: 700; margin: 0; background: var(--tint); padding: 6px 12px; border-radius: 999px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.note, .muted { color: var(--muted); }
.small { font-size: .92rem; }
.phone { position: relative; width: min(300px, 78vw); margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 36px; padding: 10px; background: #1c1917; box-shadow: 0 30px 60px rgb(28 25 23 / .25); }
.phone video, .phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; display: block; background: #000; }
.phone .tag { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; color: #fff; background: rgb(28 25 23 / .75); white-space: nowrap; transition: background-color .25s; }
.phone .tag.done { background: var(--leaf); }

.section { padding-block: 64px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; line-height: 1.15; margin: 0 0 12px; }
h3 { margin: 0 0 6px; font-size: 1.15rem; }
.section-lead { color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.band { background: var(--band); }

/* Cómo funciona, en 3 pasos con ilustración. */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.steps li { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.steps img { width: 120px; height: 96px; display: block; margin-bottom: 8px; }
.num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; margin-right: 8px; font-size: .95rem; }
.steps h3 { display: flex; align-items: center; }
.steps p { margin: 0; color: var(--muted); }

/* Antes / después. */
.examples { display: grid; gap: 24px; }
@media (min-width: 880px) { .examples { grid-template-columns: 1.4fr 1fr; } }
.example { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 14px; align-content: start; }
.example h3 { margin: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair figure { margin: 0; display: grid; gap: 6px; }
.pair figcaption { font-size: .9rem; font-weight: 600; color: var(--muted); }
.pair figcaption.after { color: var(--leaf); }
.pair video { width: 100%; border-radius: 14px; background: #000; display: block; }
.pair.h video { aspect-ratio: 16 / 9; }
.pair.v video { aspect-ratio: 9 / 16; }

/* Para qué tipo de vídeos (tipos activos) y lo que hace por ti. */
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.grid > li { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.grid > li p { margin: 0; color: var(--muted); font-size: .95rem; }
.ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--primary); }
.ico svg { width: 24px; height: 24px; }

/* Precios (desde la API), con el recomendado destacado. */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 22px 0; }
.plan { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--primary); }
.plan .badge { position: absolute; top: -13px; left: 20px; background: var(--tint); color: #b3201c; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid #ffe0dc; }
.plan ul { padding-left: 20px; flex: 1; }
.price { font-family: "Bricolage Grotesque", "Inter", sans-serif; font-size: 2.4rem; font-weight: 800; margin: 4px 0 0; }
.price span:not([data-price]) { font-family: "Inter", sans-serif; font-size: 1rem; font-weight: 500; color: var(--muted); }
.year { margin: 0; color: var(--muted); font-size: .92rem; }

.faq details { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 16px; color: var(--muted); }

.small-hero { text-align: center; background: var(--fg); color: #fff; padding: 64px 0; }
.small-hero h2 { color: #fff; }
.small-hero .muted { color: #d6d0cc; }

/* Botón fijo «Prueba gratis» en el móvil al hacer scroll. */
.sticky-cta { position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 15; display: none; }
.sticky-cta.shown { display: flex; }
@media (min-width: 761px) { .sticky-cta, .sticky-cta.shown { display: none; } }

.foot { border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; padding-bottom: 80px; }
.foot .bar { flex-wrap: wrap; }
.foot .nav { flex-wrap: wrap; gap: 16px; }
@media (min-width: 761px) { .foot { padding-bottom: 0; } }
.legal { max-width: 800px; padding-block: 40px 70px; }
.legal table { border-collapse: collapse; width: 100%; font-size: .92rem; display: block; overflow-x: auto; }
.legal th, .legal td { border: 1px solid var(--border); padding: 8px; text-align: left; vertical-align: top; }
.legal blockquote { margin: 0; padding: 10px 16px; background: #fff7e6; border-left: 4px solid #f59e0b; }

/* Páginas de contenido (blog, herramientas y nichos): web/build_sitio.py. */
.crumbs { font-size: .88rem; color: var(--muted); padding-top: 24px; }
.crumbs a { color: var(--muted); }
.article { max-width: 780px; padding-bottom: 64px; }
.article.tool-page { max-width: 980px; }
.page-head { padding: 12px 0 8px; }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.1; font-weight: 800; margin: 8px 0 14px; }
.page-head .lead { margin-bottom: 8px; }
.article h2 { margin-top: 44px; font-size: clamp(1.45rem, 3vw, 1.9rem); }
.article h3 { margin-top: 28px; font-size: 1.2rem; }
.article p, .article li { max-width: 72ch; }
.article li { margin-bottom: 6px; }
.article a:not(.btn) { color: var(--primary-dark); text-underline-offset: 2px; }
.article table { border-collapse: collapse; width: 100%; font-size: .94rem; display: block; overflow-x: auto; margin: 18px 0; background: #fff; border-radius: 12px; }
.article th, .article td { border: 1px solid var(--border); padding: 9px 10px; text-align: left; vertical-align: top; }
.article th { background: var(--band); }
.article kbd { font: .85em "Inter", sans-serif; background: #fff; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }
.cards { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 16px; }
.cards a { display: block; text-decoration: none; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.cards a:hover { border-color: var(--primary); }
.cards h2 { font-size: 1.3rem; margin: 0 0 6px; }
.cards p { color: var(--muted); margin: 0 0 10px; }
.cards .more { color: var(--primary-dark); font-weight: 600; }

/* Teleprompter. */
.tp-setup { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 18px 0 8px; }
.tp-label { font-weight: 700; display: block; margin-bottom: 8px; }
#tp-text { width: 100%; font: 1rem/1.5 "Inter", sans-serif; padding: 12px; border: 1px solid var(--border); border-radius: 12px; resize: vertical; min-height: 180px; background: var(--bg); color: var(--fg); }
.tp-controls { display: grid; gap: 12px; margin: 16px 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tp-controls label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.tp-controls input[type=range] { flex: 1; accent-color: var(--primary); }
.tp-controls output { min-width: 2ch; font-weight: 700; }
.tp-check input { width: 20px; height: 20px; accent-color: var(--primary); }
.tp-stage { position: relative; background: #111; color: #fff; border-radius: var(--radius); overflow: hidden; height: min(78vh, 720px); margin: 18px 0; }
.tp-stage:fullscreen { border-radius: 0; height: 100vh; }
.tp-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.tp-window { position: absolute; inset: 0; overflow: hidden; padding: 24px 6%; }
.tp-stage.with-camera .tp-window { inset: 0 0 auto 0; height: 42%; background: rgb(0 0 0 / .55); }
.tp-window.mirror { transform: scaleX(-1); }
.tp-scroll { will-change: transform; font-family: "Inter", sans-serif; font-weight: 600; line-height: 1.35; padding-top: 30%; padding-bottom: 60vh; }
.tp-stage.with-camera .tp-scroll { padding-top: 8%; }
.tp-scroll p { margin: 0 0 .9em; max-width: none; }
.tp-count { position: absolute; inset: 0; display: grid; place-items: center; font: 800 7rem "Bricolage Grotesque", sans-serif; background: rgb(0 0 0 / .4); }
.tp-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 12px; background: linear-gradient(transparent, rgb(0 0 0 / .7)); }
.tp-bar .btn.outline { background: rgb(255 255 255 / .92); }
#tp-rec.recording { background: var(--primary); color: #fff; }
.tp-download { position: absolute; top: 12px; right: 12px; }
.tp-note { position: absolute; top: 12px; left: 12px; right: 12px; margin: 0; padding: 10px 14px; border-radius: 12px; background: #fff; color: var(--fg); }
.tp [hidden], .tp-stage [hidden] { display: none !important; }

/* Inicio: bloque SEO «Editar vídeos con IA». */
.lead.strong { color: var(--fg); font-weight: 600; margin-top: 10px; }
.prose p, .prose li { max-width: 72ch; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--primary-dark); }
.compare { display: grid; gap: 14px; margin: 22px 0; }
@media (min-width: 760px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare > div { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.compare .ours { border: 2px solid var(--primary); }
.compare p { margin: 0; color: var(--muted); }
.article pre { background: #1c1917; color: #f5f0ec; padding: 14px 16px; border-radius: 12px; overflow-x: auto; font-size: .9rem; }
