:root {
  --ink: #140d0a;
  --ink-2: #1e1511;
  --ink-3: #2a1e18;
  --cream: #f6efe5;
  --paper: #fffaf2;
  --red: #e0362b;
  --red-2: #ff5a3d;
  --amber: #f3a53a;
  --mute: #a99a8c;
  --mute-d: #6f6158;
  --line: rgba(246, 239, 229, .12);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--amber); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.04; margin: 0; }
.mono { font-family: var(--mono); font-size: .78em; letter-spacing: .06em; }
.dim { opacity: .55; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: .55em; background: var(--red); color: #fff; text-decoration: none; font-weight: 600; border-radius: 999px; padding: .8em 1.4em; border: 1px solid transparent; transition: transform .25s var(--ease), background .25s, box-shadow .25s; box-shadow: 0 10px 30px -12px rgba(224, 54, 43, .8); }
.btn:hover { background: var(--red-2); transform: translateY(-2px); }
.btn.ghost { background: transparent; border-color: var(--line); box-shadow: none; color: var(--cream); }
.btn.ghost:hover { border-color: var(--cream); background: rgba(255, 255, 255, .04); }
.btn.sm { font-size: .88rem; padding: .55em 1.1em; }
.btn.lg { font-size: 1.02rem; padding: 1em 1.6em; }
.btn svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

/* Intro */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--ink); display: grid; place-items: center; transition: opacity .6s .2s, visibility .8s; }
.intro-ticket { width: 270px; background: var(--paper); color: var(--ink); padding: 22px 22px 26px; border-radius: 4px; font-size: 15px; clip-path: inset(0 0 100% 0); animation: print 1.1s steps(9) forwards; box-shadow: 0 30px 60px -20px #000; }
.intro-ticket p { margin: 0 0 6px; }
.intro-ticket hr { border: 0; border-top: 1.5px dashed #c9b9a6; margin: 10px 0; }
.intro-ticket .ok { color: #15803d; }
@keyframes print { to { clip-path: inset(0 0 0 0); } }
body:not(.loading) .intro { opacity: 0; visibility: hidden; }
body:not(.loading) .intro-ticket { transform: translateY(-120vh) rotate(-8deg); transition: transform .8s var(--ease); }

/* Navegación */
.nav { position: fixed; top: 0; inset-inline: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 18px clamp(16px, 4vw, 48px); transition: background .3s, padding .3s, border-color .3s; border-bottom: 1px solid transparent; }
body.scrolled .nav { background: rgba(20, 13, 10, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-block: 12px; border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.3rem/1 var(--sans); letter-spacing: -.03em; }
.brand-mark { width: 34px; height: 34px; color: var(--red); }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: .92rem; }
.nav-links a { text-decoration: none; opacity: .75; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { display: flex; gap: 10px; }

/* Dispositivos */
.device { margin: 0; position: relative; }
.device .screen { overflow: hidden; background: #fff; }
.device .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* El marco se mide contra el propio dispositivo (inset), no contra el contenedor */
.device.tablet .screen, .device.phone .screen { position: absolute; }
.device.tablet .screen { inset: 3.2% 2.2%; }
.device.phone .screen { inset: 1.5% 3.4%; }
.device.tablet { aspect-ratio: 1180 / 820; background: #0b0a0a; border-radius: 4.2% / 6%; box-shadow: inset 0 0 0 1.5px #3b3330, 0 40px 80px -30px rgba(0, 0, 0, .9); }
.device.tablet .screen { border-radius: 1.6% / 2.3%; }
.device.phone { aspect-ratio: 390 / 844; background: #0b0a0a; border-radius: 15% / 7%; box-shadow: inset 0 0 0 1.5px #3b3330, 0 40px 80px -30px rgba(0, 0, 0, .9); }
.device.phone .screen { border-radius: 12% / 5.6%; }
.device.phone::before { content: ""; position: absolute; top: 2.3%; left: 50%; width: 22%; height: 1.6%; transform: translateX(-50%); background: #0b0a0a; border-radius: 99px; z-index: 2; }
.device.laptop .screen { aspect-ratio: 1440 / 900; border: 10px solid #0b0a0a; border-bottom-width: 14px; border-radius: 14px 14px 0 0; box-shadow: inset 0 0 0 1px #3b3330; }
.device.laptop .base { height: 14px; margin: 0 -7%; background: linear-gradient(#cfc7c0, #8f857e); border-radius: 0 0 14px 14px; position: relative; box-shadow: 0 40px 60px -25px rgba(0, 0, 0, .9); }
.device.laptop .base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 5px; transform: translateX(-50%); background: #9e948d; border-radius: 0 0 6px 6px; }
[data-tilt] { transform-style: preserve-3d; transition: transform .5s var(--ease); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 40px; padding: 120px clamp(16px, 5vw, 72px) 80px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); filter: saturate(.85); animation: drift 22s ease-in-out infinite alternate; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 13, 10, .97) 0%, rgba(20, 13, 10, .86) 45%, rgba(20, 13, 10, .55) 100%), linear-gradient(0deg, var(--ink) 0%, transparent 30%); }
@keyframes drift { to { transform: scale(1.16) translate(-2%, -1%); } }
.eyebrow { font: 500 .78rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); margin: 0 0 22px; }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 5.6rem); }
.lead { font-size: clamp(1.02rem, 1.35vw, 1.2rem); color: #d9cdbf; max-width: 36em; margin: 26px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-devices { position: relative; height: min(560px, 70vh); perspective: 1400px; }
.hero-tab { position: absolute; width: 92%; right: 0; top: 8%; transform: rotateY(-14deg) rotateX(6deg) rotateZ(1deg); }
.hero-phone { position: absolute; width: 30%; left: -2%; bottom: -2%; transform: rotateY(10deg) rotateZ(-5deg) translateZ(60px); }
.chip { position: absolute; background: rgba(255, 250, 242, .96); color: var(--ink); font: 600 .82rem/1 var(--sans); padding: .75em 1em; border-radius: 999px; display: flex; gap: 8px; align-items: center; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .7); animation: bob 4s ease-in-out infinite; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(224, 54, 43, .25); }
.chip.c1 { top: 0; left: 18%; }
.chip.c2 { bottom: 10%; right: 4%; background: #16a34a; color: #fff; animation-delay: -2s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Marquesina */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 22px 0; background: var(--ink-2); }
.marquee-track { display: flex; gap: 34px; width: max-content; animation: marquee 34s linear infinite; font: italic 500 clamp(1.6rem, 3vw, 2.4rem)/1 var(--serif); white-space: nowrap; }
.marquee i { color: var(--red); font-style: normal; font-size: .6em; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Secciones */
section { padding: clamp(80px, 11vw, 150px) clamp(16px, 5vw, 72px); }
.section-head { max-width: 760px; margin: 0 auto clamp(48px, 7vw, 90px); text-align: center; }
.section-head h2, .contact h2 { font-size: clamp(2.1rem, 4.6vw, 3.8rem); }
.sub { color: var(--mute); font-size: 1.08rem; margin: 22px auto 0; max-width: 40em; }

/* Flujo con pantalla fija */
.flow-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 90px); max-width: 1240px; margin: 0 auto; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .5s; }
.step.on { opacity: 1; }
.step .num { font: 500 .85rem/1 var(--mono); color: var(--red); letter-spacing: .1em; }
.step h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 14px 0 16px; }
.step p { color: #cfc2b4; max-width: 30em; margin: 0; }
.flow-stage { position: sticky; top: 12vh; height: 76vh; display: grid; place-items: center; perspective: 1500px; }
.stage-inner { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.stage-inner::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(224, 54, 43, .35), transparent 65%); filter: blur(30px); }
.sv { position: absolute; opacity: 0; transform: translateY(40px) rotateX(18deg) scale(.92); transition: opacity .6s var(--ease), transform .8s var(--ease); pointer-events: none; }
.sv.on { opacity: 1; transform: none; }
.sv.phone { height: 86%; }
.sv.tablet { width: 100%; }
.sv.laptop { width: 100%; }
.stage-dots { position: absolute; bottom: 0; display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.stage-dots li { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .4s, background .4s; }
.stage-dots li.on { width: 28px; background: var(--red); }

/* Módulos (fondo crema) */
.modules, .features { background: var(--cream); color: var(--ink); }
.section-head.light .sub { color: var(--mute-d); }
.section-head.light em, .modules em, .features em { color: var(--red); }
.module { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 90px); align-items: center; max-width: 1240px; margin: 0 auto clamp(90px, 12vw, 160px); }
.module:last-child { margin-bottom: 0; }
.module.flip .m-media { order: 2; }
.m-media { position: relative; aspect-ratio: 5 / 4; perspective: 1400px; }
.m-photo { width: 78%; height: 100%; object-fit: cover; border-radius: 28px; box-shadow: 0 30px 60px -30px rgba(20, 13, 10, .6); }
.module.flip .m-photo { margin-left: auto; }
.m-dev { position: absolute; }
.m-dev.phone { width: 34%; right: 4%; bottom: -8%; transform: rotate(4deg); }
.module.flip .m-dev.phone, .module.flip .m-dev.tablet { right: auto; left: 0; }
.m-dev.tablet { width: 72%; right: 0; bottom: -10%; transform: rotate(-2deg); }
.module.flip .m-dev.tablet { transform: rotate(2deg); }
.m-media.wide { aspect-ratio: 16 / 11; }
.m-dev.laptop { width: 82%; right: 0; bottom: -6%; }
.module.flip .m-dev.laptop { right: auto; left: 0; }
.tag { font: 500 .76rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 16px; }
.m-copy h3 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 18px; }
.m-copy > p { color: #4b3f37; margin: 0; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; font-weight: 500; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }




.m-photo.tall { margin-left: auto; }

/* Mosaico */
.lineup { overflow: hidden; }
.lineup-row { display: flex; justify-content: center; align-items: flex-end; gap: 3%; max-width: 1240px; margin: 0 auto; perspective: 1600px; }
.lineup .l1 { width: 50%; }
.lineup .l2 { width: 32%; }
.lineup .l3 { width: 15%; }
.lineup figcaption { position: absolute; left: 0; right: 0; bottom: -40px; text-align: center; font: 500 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }

/* Funciones */
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; max-width: 1180px; margin: 0 auto; background: rgba(20, 13, 10, .12); border: 1px solid rgba(20, 13, 10, .12); border-radius: 28px; overflow: hidden; }
.feat { background: var(--cream); padding: 34px 30px; transition: background .3s; }
.feat:hover { background: var(--paper); }
.feat svg { width: 34px; height: 34px; fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feat h4 { font: 600 1.15rem/1.2 var(--sans); margin: 18px 0 8px; }
.feat p { margin: 0; color: #5a4c43; font-size: .96rem; }

/* Contacto con impresora */
.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 90px); align-items: start; max-width: 1240px; margin: 0 auto; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn.wa { background: #1faa59; box-shadow: 0 10px 30px -12px rgba(31, 170, 89, .8); }
.btn.wa:hover { background: #25c066; }
.printer { position: relative; width: min(340px, 100%); margin: 0 auto; padding-top: 10px; }
.printer-body { position: relative; z-index: 2; height: 92px; border-radius: 22px 22px 14px 14px; background: linear-gradient(#3a302b, #211915); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .08), 0 20px 40px -20px #000; }
.printer-body .led { position: absolute; left: 22px; top: 22px; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; animation: blink 1.4s infinite; }
.printer-body .slot { position: absolute; left: 8%; right: 8%; bottom: 16px; height: 8px; border-radius: 8px; background: #0b0807; }
@keyframes blink { 50% { opacity: .3; } }
.receipt { position: relative; z-index: 1; margin: -26px 12% 0; background: var(--paper); color: var(--ink); padding: 40px 22px 34px; font-size: .95rem; transform: translateY(-100%); clip-path: inset(100% 0 0 0); transition: transform 2.2s steps(14), clip-path 2.2s steps(14); }
.printer.on .receipt { transform: none; clip-path: inset(0 0 -20px 0); }
.receipt p { margin: 0 0 7px; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1.5px dashed #c9b9a6; margin: 14px 0; }
.receipt .total { font-size: .9rem; font-weight: 700; letter-spacing: .04em; }
.receipt .zigzag { position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(-45deg, transparent 6px, var(--paper) 0) 0 0 / 12px 10px, linear-gradient(45deg, transparent 6px, var(--paper) 0) 0 0 / 12px 10px; }

/* Pie */
.foot { border-top: 1px solid var(--line); padding: 40px clamp(16px, 5vw, 72px); display: grid; gap: 22px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; font-size: .92rem; }
.foot nav a { text-decoration: none; opacity: .7; }
.foot nav a:hover { opacity: 1; }
.foot-row.small { font-size: .82rem; color: var(--mute); }
.sello { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; opacity: .8; }
.sello:hover { opacity: 1; }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.feat.reveal:nth-child(3n+2) { transition-delay: .08s; }
.feat.reveal:nth-child(3n+3) { transition-delay: .16s; }

/* Responsive */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 110px; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(20, 13, 10, .9) 0%, rgba(20, 13, 10, .82) 55%, var(--ink) 100%); }
  .hero-devices { height: auto; aspect-ratio: 1.25; }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-stage { top: 64px; height: 46vh; order: -1; z-index: 2; background: linear-gradient(var(--ink) 85%, transparent); }
  .sv.phone { height: 92%; }
  .sv.tablet, .sv.laptop { width: 92%; }
  .step { min-height: 62vh; justify-content: flex-start; padding-top: 6vh; }
  .module, .contact { grid-template-columns: 1fr; }
  .module.flip .m-media { order: 0; }
  .m-media { margin-bottom: 40px; }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav-cta .ghost { display: none; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .feat-grid { grid-template-columns: 1fr; }
  .lineup-row { flex-wrap: wrap; }
  .lineup .l1 { width: 100%; margin-bottom: 50px; }
  .lineup .l2 { width: 64%; }
  .lineup .l3 { width: 28%; }
  .lineup figcaption { bottom: -32px; }
  .contact-actions .btn { width: 100%; justify-content: center; }
  .chip { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .intro { display: none; }
  .receipt { transform: none; clip-path: none; }
}
