:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #eef1f8; --text: #141a29; --muted: #5a6478;
  --line: #e1e5ee; --accent: #2f5bd3; --accent-2: #7a4ff0; --on-accent: #ffffff;
  --pdf: #d9412f; --pdf-soft: #fde9e5; --word: #2b5fc9; --word-soft: #e4ecfc;
  --tl: #0f8f6f; --tl-soft: #ddf4ec; --hc: #c2610c; --hc-soft: #fdeedd; --ac: #6d3fd9; --ac-soft: #ece5fd; --sc: #c0267e; --sc-soft: #fce4f1; --glow-1: rgba(47, 91, 211, .18); --glow-2: rgba(122, 79, 240, .14);
  --shadow: 0 1px 2px rgba(20, 26, 41, .05), 0 12px 32px -12px rgba(20, 26, 41, .18);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1017; --surface: #151a24; --surface-2: #1c2230; --text: #e9ecf3; --muted: #9aa4b8;
    --line: #262e3d; --accent: #7392f5; --accent-2: #a68bff; --on-accent: #0b0f18;
    --pdf: #ff7a66; --pdf-soft: #3a1f1c; --word: #7ea2ff; --word-soft: #1a2640;
    --tl: #3fd2a8; --tl-soft: #12302a; --hc: #ffa94d; --hc-soft: #33240f; --ac: #a68bff; --ac-soft: #241b3d; --sc: #f472b6; --sc-soft: #3a1630; --glow-1: rgba(115, 146, 245, .16); --glow-2: rgba(166, 139, 255, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden;
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* cabecera */
header { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid transparent; }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px;
  letter-spacing: -.01em; text-decoration: none; }
.logo svg { width: 32px; height: 32px; }
nav { display: flex; align-items: center; gap: 22px; font-size: 15px; color: var(--muted); }
nav a { text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); }
nav .lang { border: 1px solid var(--line); border-radius: 8px; padding: 1px 8px; font-size: 13px;
  font-weight: 700; letter-spacing: .05em; }
nav .lang:hover { border-color: var(--muted); }

/* portada */
.hero { position: relative; padding: 88px 0 72px; text-align: center; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 0; z-index: -1;
  background:
    radial-gradient(520px 320px at 30% 30%, var(--glow-1), transparent 70%),
    radial-gradient(480px 300px at 72% 40%, var(--glow-2), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: -120px 0 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 20%, transparent 75%);
}
.badge-check { width: 72px; height: 72px; margin: 0 auto 26px; display: block;
  filter: drop-shadow(0 10px 24px var(--glow-1)); }
.badge-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .7s .25s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
h1 { font-size: clamp(38px, 7vw, 68px); line-height: 1.04; letter-spacing: -.035em; margin: 0 auto 18px;
  max-width: 820px; font-weight: 800; }
.grad { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: clamp(17px, 2.2vw, 20px); margin: 0 auto 34px; max-width: 600px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px;
  font-weight: 650; font-size: 16px; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px var(--accent); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }

/* productos */
.section-title { text-align: center; margin: 0 0 8px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.02em; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 36px; max-width: 560px; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
/* cuatro productos: dos por fila en pantallas anchas (con tres columnas, el cuarto quedaba solo) */
@media (min-width: 700px) { .products { grid-template-columns: repeat(2, 1fr); } }
.product { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none;
  transition: transform .2s, border-color .2s; }
.product:hover { transform: translateY(-4px); border-color: var(--hue); }
.product.pdf { --hue: var(--word); --soft: var(--word-soft); }
.product.tl { --hue: var(--tl); --soft: var(--tl-soft); }
.product.hc { --hue: var(--hc); --soft: var(--hc-soft); }
.product.ac { --hue: var(--ac); --soft: var(--ac-soft); }
.product.sc { --hue: var(--sc); --soft: var(--sc-soft); }
/* número impar de productos: el último ocupa la fila entera, con el dibujo a la izquierda */
@media (min-width: 700px) {
  .product:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; }
  .product:last-child:nth-child(odd) .art { flex: 0 0 56%; border-bottom: 0; border-right: 1px solid var(--line); }
}
.art { background: var(--soft); padding: 26px 22px; display: grid; place-items: center;
  border-bottom: 1px solid var(--line); min-height: 210px; }
.art svg { width: 100%; max-width: 380px; height: auto; }
/* tarjeta con ilustración a sangre (HelloCrew): ocupa todo el hueco del dibujo */
.art.photo { padding: 0; display: block; position: relative; overflow: hidden; }
.art.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center 45%; }
@media (prefers-color-scheme: dark) { .art.photo img { filter: brightness(.9) saturate(.95); } }
.body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.kicker { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--hue); }
.product h3 { margin: 6px 0 8px; font-size: 25px; letter-spacing: -.02em; }
.product p { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; }
.feats { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.feats li { display: flex; gap: 10px; align-items: flex-start; }
.feats li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 6px;
  background: var(--soft) no-repeat center / 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.2 2.2L9.5 3.7' stroke='%23888' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 35%, transparent); }
.go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--hue); }
.go span { transition: transform .2s; }
.product:hover .go span { transform: translateX(4px); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tag { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

/* principios */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 76px 0 0; }
.principle { padding: 22px; border-radius: 16px; border: 1px dashed var(--line); }
.principle svg { width: 28px; height: 28px; color: var(--accent); }
.principle h4 { margin: 10px 0 4px; font-size: 17px; }
.principle p { margin: 0; color: var(--muted); font-size: 15px; }

.soon { margin: 56px auto 0; text-align: center; color: var(--muted); font-size: 15px; }
.soon b { color: var(--text); }

footer { margin-top: 80px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: space-between;
  padding: 26px 20px 40px; color: var(--muted); font-size: 14px; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); text-decoration: underline; }

/* páginas interiores */
.narrow { max-width: 760px; }
.page-hero { position: relative; padding: 60px 0 30px; isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: -120px 0 0; z-index: -1;
  background: radial-gradient(520px 260px at 20% 30%, var(--glow-1), transparent 70%),
    radial-gradient(420px 240px at 75% 20%, var(--glow-2), transparent 70%);
}
.page-hero h1 { font-size: clamp(32px, 5.6vw, 52px); margin: 0 0 14px; max-width: none; }
.page-hero .lead { margin: 0; max-width: 680px; }
.eyebrow { display: inline-block; margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 18px; color: var(--muted); font-size: 15px; }
.back { color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--text); }

/* sobre mí */
.me { display: flex; gap: 22px; align-items: center; margin-bottom: 22px; }
.avatar { flex: none; width: 88px; height: 88px; border-radius: 26px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800;
  font-size: 32px; letter-spacing: -.02em; box-shadow: 0 14px 30px -14px var(--accent); }
.avatar.photo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; background: var(--surface);
  box-shadow: 0 14px 30px -16px rgba(20, 26, 41, .45); }
.avatar.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.me h1 { margin: 0; }
.btn-linkedin svg { width: 18px; height: 18px; }
.cta.left { justify-content: flex-start; margin-top: 26px; }
.prose .btn { text-decoration: none; }
.prose .btn-primary { color: var(--on-accent); }
.prose .btn-ghost { color: var(--text); }
.post-title { margin-top: 18px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 8px 0 26px; }
.fact { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.fact b { display: block; font-size: 28px; letter-spacing: -.02em; color: var(--accent); line-height: 1.2; }
.fact span { color: var(--muted); font-size: 14.5px; }

/* artículos */
.prose { font-size: 18px; line-height: 1.72; }
.prose h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.015em; margin: 46px 0 12px; }
.prose h3 { font-size: 20px; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin: 5px 0; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose code { font: .86em ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--surface-2);
  padding: 2px 6px; border-radius: 6px; }
.prose pre { margin: 0 0 18px; padding: 14px 16px; overflow-x: auto; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; font-size: 15px; line-height: 1.55; }
.prose pre code { background: none; padding: 0; border-radius: 0; font-size: 1em; }
.prose blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose figure { margin: 26px 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.prose figure svg, .prose figure img { display: block; width: 100%; height: auto; }
.prose .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 20px; }
.prose figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.prose th { font-size: 14px; color: var(--muted); font-weight: 650; }
.prose .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose tr.ours td { font-weight: 700; }
.bar { display: block; height: 8px; min-width: 2px; border-radius: 4px; background: var(--muted); opacity: .45; }
.ours .bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 1; }
.barcell { width: 38%; min-width: 90px; }
.end { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }

/* lista del blog */
.posts { display: grid; gap: 16px; }
.posts.grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); text-decoration: none; box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.post-card time { font-size: 14px; color: var(--muted); }
.post-card h3 { margin: 4px 0 6px; font-size: 21px; line-height: 1.3; letter-spacing: -.01em; }
.post-card p { margin: 0 0 12px; color: var(--muted); font-size: 15.5px; }
.post-card .go { color: var(--accent); font-size: 15px; }
.post-card:hover .go span { transform: translateX(4px); }
.blog-home { margin-top: 76px; }

@media (max-width: 560px) {
  nav { gap: 14px; }
  nav .opt { display: none; }
  .hero { padding: 56px 0 52px; }
  .badge-check { width: 60px; height: 60px; }
  .page-hero { padding: 40px 0 22px; }
  .me { flex-direction: column; align-items: flex-start; gap: 16px; }
  .avatar { width: 72px; height: 72px; font-size: 26px; border-radius: 22px; }
  .avatar.photo { width: 96px; height: 96px; border-radius: 50%; }
  .prose { font-size: 17px; }
  .prose figure { padding: 14px; }
  .prose table { font-size: 15px; }
  .prose th, .prose td { padding: 9px 6px; }
  .barcell { width: 26%; min-width: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .badge-check path { stroke-dashoffset: 0; }
}
