/* Web propia de Francisco Martínez. Rediseño 23/11/2026: "panel en vivo" (azul tinta, lima suave, Bricolage Grotesque + Instrument Sans). Versión anterior en _v1/. */

:root {
  --tinta: #0F1C2E;
  --tinta-2: #16263C;
  --tinta-3: #1E3250;
  --linea: #2C4466;
  --texto: #EAF0F7;
  --texto-2: #B4C2D4;
  --apagado: #8496AE;
  --lima: #C4EB7A;
  --lima-osc: #A9D45A;
  --oro: #F2C14E;
  --wa: #25A55F;
  --wa-osc: #1E8C50;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-panel: 22px;
  --r-ui: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--tinta); color: var(--texto); font: 400 1.0625rem/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; overflow-wrap: break-word; min-width: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--lima); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--lima); color: var(--tinta); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barra */
.bar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--tinta) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); }
.bar__in, .bar .container { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: 16px; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--r-ui); font: 600 1rem/1.2 var(--body); text-decoration: none; text-align: center; transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.btn:active { transform: translateY(1px); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: .95rem; background: var(--texto); color: var(--tinta); }
.btn--small:hover { background: var(--lima); }
.btn--accent { background: var(--lima); color: var(--tinta); }
.btn--accent:hover { background: var(--lima-osc); }
.btn--ghost { box-shadow: inset 0 0 0 1.5px var(--linea); color: var(--texto); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--texto-2); }
.btn--wa { background: var(--wa); color: #fff; min-height: 56px; padding: 0 28px; font-size: 1.05rem; }
.btn--wa:hover { background: var(--wa-osc); }

/* Portada */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hello { display: flex; align-items: center; gap: 14px; color: var(--texto-2); max-width: 30rem; margin-bottom: 28px; }
.avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--tinta), 0 0 0 5px var(--lima); }
.avatar--lg { width: 88px; height: 88px; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); line-height: .98; font-weight: 800; font-variation-settings: "opsz" 96; max-width: 12ch; text-wrap: balance; }
.hero .lead { margin-top: 22px; font-size: clamp(1.1rem, 1.4vw, 1.3rem); color: var(--texto-2); max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Panel en vivo */
.panel { margin: 0; background: var(--tinta-2); border: 1px solid var(--linea); border-radius: var(--r-panel); padding: 22px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--linea); }
.panel__title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.panel__live { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--lima); }
.panel__live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lima); box-shadow: 0 0 0 0 var(--lima); animation: latido 2s ease-out infinite; }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(196, 235, 122, .55); } 100% { box-shadow: 0 0 0 10px rgba(196, 235, 122, 0); } }

.feed { list-style: none; margin: 0; padding: 18px 0 0; display: grid; gap: 4px; position: relative; }
.feed::before { content: ""; position: absolute; left: 54px; top: 26px; bottom: 18px; width: 1px; background: var(--linea); }
.ev { display: grid; grid-template-columns: 44px 1fr; gap: 22px; padding: 8px 0; position: relative; }
.ev::before { content: ""; position: absolute; left: 50px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--tinta-2); box-shadow: inset 0 0 0 2px var(--texto-2); }
.ev--in::before { background: var(--lima); box-shadow: none; }
.ev--star::before { background: var(--oro); box-shadow: none; }
.ev time { font-size: .88rem; color: var(--apagado); font-variant-numeric: tabular-nums; padding-top: 2px; }
.ev__what { font-weight: 600; }
.ev__note { color: var(--texto-2); font-size: .94rem; margin-top: 2px; }
.ev__card { margin: 10px 0 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--linea); border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; }
.ev__card div { background: var(--tinta-3); padding: 8px 12px; }
.ev__card dt { font-size: .8rem; color: var(--apagado); }
.ev__card dd { margin: 0; font-weight: 600; }
.stars { color: var(--oro); letter-spacing: .08em; }
.panel__cap { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--linea); font-size: .9rem; color: var(--apagado); }

/* Un solo momento de movimiento: los avisos del panel llegan uno tras otro cuando el panel se ve. Sin JS o si algo falla, se ven todos. */
.feed.espera .ev { opacity: 0; transform: translateY(8px); }
.feed.llega .ev { opacity: 1; transform: none; transition: opacity .5s cubic-bezier(.16, 1, .3, 1), transform .5s cubic-bezier(.16, 1, .3, 1); }
.feed.llega .ev:nth-child(2) { transition-delay: .5s; }
.feed.llega .ev:nth-child(3) { transition-delay: 1s; }
.feed.llega .ev:nth-child(4) { transition-delay: 1.5s; }
.feed.llega .ev:nth-child(5) { transition-delay: 2s; }
@media (prefers-reduced-motion: reduce) { .panel__live::before { animation: none; } }

/* Secciones */
.sec { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--linea); }
.sec__title { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.02; font-weight: 800; max-width: 16ch; margin-bottom: clamp(32px, 5vw, 56px); text-wrap: balance; }

.services { list-style: none; margin: 0; padding: 0; }
.services li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 48px; padding: 28px 0; border-top: 1px solid var(--linea); }
.services li:last-child { border-bottom: 1px solid var(--linea); }
.services h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.1; font-weight: 700; }
.services p { color: var(--texto-2); max-width: 36rem; }

.sec--ejemplos .sec__title { margin-bottom: 16px; }
.ejemplos__intro { color: var(--texto-2); max-width: 40rem; margin-bottom: clamp(32px, 5vw, 48px); }
.ejemplos__intro p + p { margin-top: 14px; }
.ejemplos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.ej { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.ej img { width: 100%; height: auto; aspect-ratio: 960 / 645; object-fit: cover; object-position: top; border-radius: 12px; border: 1px solid var(--linea); margin-bottom: 18px; transition: border-color .2s ease, transform .2s ease; }
.ej h3 { font-size: 1.3rem; line-height: 1.15; }
.ej__nombre { color: var(--apagado); font-size: .95rem; margin: 2px 0 10px; }
.ej p:not(.ej__nombre) { color: var(--texto-2); }
.ej__ver { margin-top: auto; padding-top: 14px; color: var(--lima); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.ej:hover img { border-color: var(--lima); }
.ej:hover .ej__ver { text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: no-preference) { .ej:hover img { transform: translateY(-3px); } }
@media (max-width: 900px) { .ejemplos { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

.sec--steps { background: var(--tinta-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: paso; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: var(--linea); }
.steps li { position: relative; counter-increment: paso; padding-top: 68px; }
.steps li::before { content: counter(paso); position: absolute; top: 0; left: 0; width: 45px; height: 45px; display: grid; place-items: center; border-radius: 50%; background: var(--tinta); border: 1.5px solid var(--lima); color: var(--lima); font: 700 1.1rem/1 var(--display); }
.steps h3 { font-size: 1.3rem; margin-bottom: 6px; }
.steps p { color: var(--texto-2); }

.promise { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.promise .sec__title { margin-bottom: 0; max-width: 11ch; }
.guar { margin: 0; }
.guar div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px 24px; padding: 18px 0; border-top: 1px solid var(--linea); }
.guar div:last-child { border-bottom: 1px solid var(--linea); }
.guar dt { font-weight: 600; color: var(--lima); }
.guar dd { margin: 0; color: var(--texto-2); }

/* Pie */
.foot { padding: clamp(64px, 9vw, 112px) 0 40px; background: var(--lima); color: var(--tinta); }
.foot .container { display: grid; gap: 48px; }
.foot__cta { display: grid; gap: 24px; justify-items: start; }
.foot__cta .avatar { box-shadow: 0 0 0 3px var(--lima), 0 0 0 5px var(--tinta); }
.foot__statement { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.02; max-width: 18ch; }
.foot__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; border-top: 1px solid rgba(15, 28, 46, .25); font-size: .92rem; }
.foot__links { display: flex; gap: 20px; }
.foot__links a { text-underline-offset: 3px; }
.foot :focus-visible { outline-color: var(--tinta); }
.fill { padding: 0 .25em; border: 1px dashed currentColor; border-radius: 3px; opacity: .8; }

/* Páginas legales */
.legal { max-width: 46rem; padding-top: 56px; padding-bottom: 48px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.02; font-weight: 800; margin-bottom: 20px; }
.legal h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.legal p, .legal li { line-height: 1.65; color: var(--texto-2); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; }
.legal b { color: var(--texto); }
.legal a { color: var(--lima); text-underline-offset: 3px; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 16px 0 0; }
.legal dt { color: var(--apagado); }
.legal dd { margin: 0; overflow-wrap: anywhere; }
.legal .fecha { color: var(--apagado); font-size: .9rem; }
.legal ~ .foot, body:has(.legal) .foot { padding: 32px 0; }

/* Móvil */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .services li, .promise, .guar div { grid-template-columns: minmax(0, 1fr); }
  .promise { gap: 32px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps::before { left: 22px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps li { padding: 4px 0 28px 68px; min-height: 45px; }
}
@media (max-width: 520px) {
  .wordmark { font-size: 1.05rem; }
  .panel { padding: 16px; }
  .legal dl { grid-template-columns: 1fr; }
  .legal dd { margin-bottom: 8px; }
}
section[id] { scroll-margin-top: 64px; }
