/* Traza — web. Rejilla estricta, tinta negra, un único rojo. Sin esquinas redondeadas, sin sombras. */
:root {
  --bg: #f4f2ec;
  --paper: #fbfaf6;
  --ink: #111111;
  --ink-2: #3d3d3a;
  --muted: #77756e;
  --accent: #e5361b;
  --grid: #e3e0d6;
  --rule: #111111;
  --display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --pad: clamp(1.1rem, 2.4vw, 2rem);
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--display); font-size: 17px; line-height: 1.55;
  overflow-x: clip; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.02; font-weight: 800; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Rejilla ---------- */
.grid-12 {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1px; background: var(--rule);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.grid-12 > .cell { background: var(--bg); padding: var(--pad); min-width: 0; }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; } .col-9 { grid-column: span 9; }

.kicker { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 1.2rem; }
.lead { font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-2); max-width: 46ch; }
.micro, .note { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 14px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; font-family: var(--mono); font-size: 14px; font-weight: 500;
  text-decoration: none; padding: 0.7em 1.1em; border: 1px solid var(--ink); cursor: pointer; transition: background 0.12s, color 0.12s;
  background: transparent; color: var(--ink); white-space: nowrap;
}
.btn.solid { background: var(--ink); color: var(--bg); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn.big { font-size: 15px; padding: 0.95em 1.4em; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 2rem;
  padding: 0 var(--pad); background: var(--bg); border-bottom: 1px solid var(--rule);
}
.logo { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.04em; white-space: nowrap; }
.logo svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: square; }
.logo svg .r { stroke: var(--accent); }
.nav-links { display: flex; gap: 1.6rem; font-family: var(--mono); font-size: 13.5px; }
.nav-links a { text-decoration: none; padding: 0.3em 0; border-bottom: 1px solid transparent; }
.nav-links a:hover { border-bottom-color: var(--accent); color: var(--accent); }
.nav-cta { margin-left: auto; display: flex; gap: 0.6rem; align-items: center; }
.burger { display: none; width: 42px; height: 40px; border: 1px solid var(--ink); background: transparent; cursor: pointer; padding: 0 10px; flex-direction: column; justify-content: center; gap: 6px; }
.burger span { display: block; height: 2px; background: var(--ink); transition: transform 0.2s; }
.nav.open .burger span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.open .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Portada ---------- */
.hero { min-height: calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h)); border-top: 0; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 6vw, 6rem) var(--pad) !important; }
.hero h1 { font-size: clamp(2.8rem, 6.4vw, 6.4rem); max-width: 12ch; text-wrap: balance; margin-bottom: 1.6rem; }
.hero h1 em { font-style: normal; color: var(--accent); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.07em; background: var(--accent);
  transform-origin: left; animation: underline 0.9s 1.3s cubic-bezier(0.7, 0, 0.2, 1) both;
}
@keyframes underline { from { transform: scaleX(0); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 0.6rem 0 1.4rem; }
.hero-figure { display: flex; flex-direction: column; justify-content: center; gap: 1rem; background: var(--paper) !important; }
.construction { width: 100%; max-height: 64vh; }
.construction .d { fill: none; stroke: var(--ink); stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
.construction .thick { stroke-width: 3.2; stroke-linecap: square; }
.construction .thin { stroke-width: 1.3; }
.construction .axis { stroke: var(--accent); stroke-width: 1.6; }
.construction .d1 { animation-delay: 0.2s; }
.construction .d2 { animation-delay: 1.1s; }
.construction .d3 { animation-delay: 1.8s; }
.construction .d4 { animation-delay: 2.7s; animation-duration: 1.2s; }
.construction .d5 { animation-delay: 3.6s; animation-duration: 0.4s; }
/* El eje se vuelve trazo y punto cuando termina de dibujarse */
.construction .d4.done { stroke-dasharray: 16 5 3 5; stroke-dashoffset: 0; animation: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.construction .p { fill: var(--ink); stroke: var(--paper); stroke-width: 2; opacity: 0; animation: pop 0.3s ease-out forwards; }
.construction .p.red { fill: var(--accent); }
.construction text { font-family: var(--mono); font-size: 15px; font-weight: 700; fill: var(--ink); opacity: 0; animation: pop 0.3s ease-out forwards; }
.construction .p1 { animation-delay: 0.9s; }
.construction .p2 { animation-delay: 2.5s; }
.construction .p3 { animation-delay: 3.9s; }
.construction .dim { opacity: 0; animation: pop 0.4s ease-out 4.2s forwards; }
.construction .dim path { fill: none; stroke: var(--ink); stroke-width: 1; }
.construction .dim text { font-size: 12px; font-weight: 500; text-anchor: middle; opacity: 1; animation: none; }
@keyframes pop { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.fig-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); counter-reset: f; }
.fig-steps li { background: var(--paper); font-family: var(--mono); font-size: 11.5px; padding: 0.6rem 0.6rem; line-height: 1.3; counter-increment: f; }
.fig-steps li::before { content: "0" counter(f) " "; color: var(--accent); }

/* ---------- Cinta ---------- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--rule); background: var(--ink); color: var(--bg); }
.marquee-track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee span { font-family: var(--mono); font-size: clamp(15px, 1.5vw, 20px); text-transform: uppercase; letter-spacing: 0.04em; padding: 0.9rem 1.6rem; white-space: nowrap; }
.marquee span::after { content: "+"; color: var(--accent); margin-left: 3.2rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Bloques ---------- */
.block { padding-top: clamp(3rem, 8vw, 7rem); }
.block-head { border: 0; background: transparent; }
.block-head > .cell { background: transparent; }
.block-head .kicker { padding-top: 0.9rem; }
.block-head h2 { font-size: clamp(1.9rem, 3.6vw, 3.4rem); max-width: 22ch; text-wrap: balance; }
.block h2 { font-size: clamp(1.9rem, 3.6vw, 3.4rem); text-wrap: balance; margin-bottom: 1.2rem; }
.cards-3 article, .modules article { padding: clamp(1.4rem, 2.6vw, 2.4rem) var(--pad); }
.cards-3 h3, .modules h3 { font-size: clamp(1.25rem, 1.7vw, 1.6rem); margin: 0.6rem 0 0.8rem; }
.cards-3 p, .modules p { color: var(--ink-2); font-size: 16px; }
.num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.invert-hover { transition: background 0.12s, color 0.12s; }
.invert-hover:hover { background: var(--ink) !important; color: var(--bg); }
.invert-hover:hover p { color: #cfcdc5; }

.dark { background: var(--ink); color: var(--bg); padding-bottom: 0; }
.dark .grid-12 { background: #3a3a37; border-color: #3a3a37; }
.dark .grid-12 > .cell { background: var(--ink); }
.dark .lead { color: #c9c7bf; }
.ticks { list-style: none; padding: 0; margin: 1.6rem 0 0; font-family: var(--mono); font-size: 14px; }
.ticks li { padding: 0.55rem 0; border-top: 1px solid #3a3a37; }
.ticks li::before { content: "→ "; color: var(--accent); }

.player { background: var(--paper); border: 1px solid #3a3a37; color: var(--ink); }
.player svg { width: 100%; }
.player .ps { fill: none; stroke: var(--ink); }
.player .thin { stroke-width: 1.3; }
.player .thick { stroke-width: 3.2; stroke-linejoin: miter; }
.player .axis { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 14 4 2 4; }
.player .aux { stroke: #9a988f; stroke-dasharray: 3 3; }
.player .pf { fill: var(--ink); }
.player [data-step] { opacity: 0; transition: opacity 0.45s; }
.player [data-step].on { opacity: 1; }
.player [data-step].now .ps { stroke: var(--accent); }
.player-bar { display: flex; align-items: center; gap: 1rem; border-top: 1px solid var(--ink); padding: 0.7rem 0.9rem; font-family: var(--mono); font-size: 13px; }
.pbtn { width: 38px; height: 38px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; font-size: 13px; }
.pbtn:hover { background: var(--accent); border-color: var(--accent); }
.pdots { display: flex; gap: 4px; flex: 1; }
.pdots span { flex: 1; height: 4px; background: var(--grid); }
.pdots span.on { background: var(--ink); }

.tag { display: inline-block; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.25em 0.6em; border: 1px solid var(--ink); }
.tag.ok { background: var(--ink); color: var(--bg); }
.tag.wip { background: var(--bg); color: var(--ink); }
.tag.next { border-style: dashed; color: var(--muted); border-color: var(--muted); }

.views-fig { background: var(--paper) !important; display: flex; align-items: center; }
.views-fig svg { width: 100%; }
.views-fig .f1 { fill: #e9e6dc; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.views-fig .f2 { fill: #cfcbbe; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.views-fig .f3 { fill: #fbfaf6; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.vw text { font-family: var(--mono); font-size: 11px; fill: var(--muted); letter-spacing: 0.05em; }
.vw .leg { font-size: 10.5px; fill: var(--ink-2); letter-spacing: 0; }
.vk { fill: none; stroke: var(--ink); stroke-width: 2; }
.vh { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 6 4; }
.vl { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 12 3 2 3; }

.stats { margin-top: -1px; }
.stats .cell { display: flex; flex-direction: column; gap: 0.3rem; padding-block: clamp(1.6rem, 3vw, 2.6rem); }
.stats strong { font-family: var(--mono); font-size: clamp(2.2rem, 4vw, 3.6rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.stats span { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.prices article { display: flex; flex-direction: column; gap: 0.6rem; padding: clamp(1.6rem, 2.8vw, 2.6rem) var(--pad); }
.prices h3 { font-size: 1.7rem; }
.prices .price { font-family: var(--mono); font-size: 1.15rem; color: var(--accent); margin: 0; }
.prices ul { list-style: none; padding: 0; margin: 0.6rem 0 1.4rem; flex: 1; }
.prices li { padding: 0.55rem 0; border-top: 1px solid var(--grid); font-size: 15.5px; }
.prices li::before { content: "+ "; font-family: var(--mono); color: var(--accent); }
.prices .featured { background: var(--paper) !important; }
.prices .featured .tag { align-self: flex-start; }
.grid-note { font-family: var(--mono); font-size: 13.5px; color: var(--ink-2); padding: 1.2rem var(--pad) 0; max-width: 80ch; }

/* ---------- Formulario ---------- */
.signup .grid-12 > .cell:first-child { background: var(--accent); color: #fff; }
.signup .kicker { color: #fff; opacity: 0.85; }
.signup .lead { color: #fff; opacity: 0.92; }
.form { display: flex; flex-direction: column; gap: 1.2rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label > span, .form legend { display: block; font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.4rem; }
.form input:not([type="radio"]):not([type="checkbox"]) {
  width: 100%; font: inherit; font-size: 17px; padding: 0.75em 0.85em; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 0; outline: none;
}
.form input:focus { box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.form legend { width: 100%; margin-bottom: 0.5rem; padding: 0; }
.opt { cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-block; font-family: var(--mono); font-size: 13.5px; text-transform: none !important; letter-spacing: 0 !important; color: var(--ink) !important; margin: 0 !important; padding: 0.55em 0.9em; border: 1px solid var(--ink); background: var(--paper); transition: background 0.1s; }
.opt input:checked + span { background: var(--ink); color: var(--bg) !important; }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.form .consent > span { display: inline; font-family: var(--display); font-size: 14.5px; text-transform: none; letter-spacing: 0; color: var(--ink-2); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { align-self: flex-start; }
.form-msg { font-family: var(--mono); font-size: 14px; min-height: 1.4em; margin: 0; }
.form-msg.ok { color: #0a7a47; }
.form-msg.err { color: var(--accent); }
.form.is-sending .btn { opacity: 0.6; pointer-events: none; }

/* ---------- Preguntas ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.3rem var(--pad); font-weight: 600; font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  display: flex; justify-content: space-between; gap: 1rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-size: 1.4em; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: var(--paper); }
.faq details p { padding: 0 var(--pad) 1.4rem; max-width: 70ch; color: var(--ink-2); }

.foot { margin-top: clamp(3rem, 8vw, 6rem); }
.foot .cell { padding-block: 2rem; }
.foot p { margin: 0.3rem 0; color: var(--ink-2); }

/* ---------- Revelado al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Coordenadas que siguen al cursor ---------- */
.coords {
  position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none; font-family: var(--mono); font-size: 11px;
  color: var(--accent); background: var(--bg); border: 1px solid var(--accent); padding: 1px 5px; opacity: 0; transition: opacity 0.2s;
}
.coords.is-ready { opacity: 1; }
@media (hover: none) { .coords { display: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 1rem; }
  .col-3 { grid-column: span 6; }
  .block-head .col-3, .block-head .col-9 { grid-column: span 12; }
  .block-head .col-3 { padding-bottom: 0; }
  .block-head .kicker { margin-bottom: 0; }
}
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--rule); display: none; font-size: 16px;
  }
  .nav-links a { padding: 1rem var(--pad); border-top: 1px solid var(--grid); }
  .nav.open .nav-links { display: flex; }
  .burger { display: flex; }
  .hide-sm { display: none; }
  .col-4, .col-5, .col-7, .col-9 { grid-column: span 12; }
  .block-head .col-3 { grid-column: span 12; padding-bottom: 0; }
  .block-head .kicker { margin-bottom: 0; }
  .hero { min-height: 0; }
  .construction { max-height: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .col-3 { grid-column: span 12; }
  .row2 { grid-template-columns: 1fr; }
  .fig-steps { grid-template-columns: repeat(2, 1fr); }
  .nav-cta .btn.solid { padding: 0.6em 0.8em; font-size: 13px; }
  .stats .cell { grid-column: span 6; }
}

/* ---------- Novedad: modelador 3D ---------- */
.nav-links a.nuevo { position: relative; }
.nav-links a.nuevo::after { content: ""; position: absolute; top: 0.1em; right: -0.55em; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.nuevo-pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 0.6em; margin-bottom: 1.4rem; padding: 0.35em 0.8em 0.35em 0.35em;
  border: 1px solid var(--ink); font-family: var(--mono); font-size: 13px; text-decoration: none; background: var(--paper); transition: background 0.12s, color 0.12s;
}
.nuevo-pill b { background: var(--accent); color: #fff; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; font-size: 11.5px; padding: 0.25em 0.55em; }
.nuevo-pill:hover { background: var(--ink); color: var(--bg); }
.tag.nuevo-tag { background: var(--accent); border-color: var(--accent); color: #fff; margin-right: 0.5em; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn.ghost-inv { border-color: #6b6a65; color: var(--bg); }
.btn.ghost-inv:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }

.modelador { background: var(--ink); color: var(--bg); padding-top: 0; padding-bottom: 0; }
.modelador .grid-12 { background: #3a3a37; border-color: #3a3a37; }
.modelador .grid-12 > .cell { background: var(--ink); }
.modelador .lead { color: #c9c7bf; }
.modelador .micro { color: #9a988f; }
.modelador .kicker { display: flex; align-items: center; }
.mod-head .col-5 { display: flex; flex-direction: column; justify-content: center; padding-block: clamp(2rem, 5vw, 4.5rem); }
.mod-shot { display: flex; align-items: center; padding: clamp(1rem, 3vw, 3rem) !important; background: radial-gradient(120% 120% at 70% 20%, #2b2b29, var(--ink)) !important; }
.frame { margin: 0; width: 100%; border: 1px solid #55544f; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); transform: perspective(1600px) rotateY(-4deg) rotateX(2deg); transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.frame:hover { transform: none; }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; background: #ecebe6; border-bottom: 1px solid #d6d4cc; font-family: var(--mono); font-size: 11px; color: #77756e; }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d0cec6; }
.frame-bar i:first-child { background: var(--accent); }
.frame-bar span { margin-left: 8px; }
.frame img { width: 100%; height: auto; }
.mod-pasos { list-style: none; margin: -1px 0 0; padding: 0; }
.mod-pasos li { display: flex; flex-direction: column; gap: 0.5rem; padding: clamp(1.2rem, 2.4vw, 2rem) var(--pad) clamp(1.6rem, 3vw, 2.6rem); }
.mod-pasos img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 60% 50%; border: 1px solid #3a3a37; margin-bottom: 0.8rem; transition: transform 0.4s; }
.mod-pasos li:hover img { transform: translateY(-4px); }
.mod-pasos h3 { font-size: clamp(1.25rem, 1.7vw, 1.6rem); margin: 0.2rem 0 0.4rem; }
.mod-pasos p { color: #c9c7bf; font-size: 16px; margin: 0; }
.mod-datos { margin-top: -1px; }
.mod-datos .cell { display: flex; flex-direction: column; gap: 0.3rem; padding-block: clamp(1.4rem, 2.6vw, 2.2rem); }
.mod-datos strong { font-family: var(--mono); font-size: clamp(1.5rem, 2.6vw, 2.4rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; color: #fff; }
.mod-datos span { font-family: var(--mono); font-size: 13px; color: #9a988f; }
.modules .destacado { background: var(--paper) !important; box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 900px) {
  .frame { transform: none; }
  .mod-datos .cell { grid-column: span 6; }
}
