/* Estilos comunes de las páginas de producto (palyris.com/productos/… y /en/products/…).
   Cada página define sus colores de marca: --p, --p2, --p-on, --p-ac, --p-soft, --p-line, --p-glow y --p-font. */
/* ===== Marco Palyris ===== */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0B12; --bg-alt: #14141E; --fg: #F5F3EE; --muted: #9C9AAE; --line: rgba(255,255,255,.12);
  --nav-bg: rgba(14,14,22,.58); --nav-line: rgba(255,255,255,.09); --nav-chip: rgba(255,255,255,.05); --nav-pill: rgba(255,255,255,.1); --shadow: rgba(0,0,0,.5);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F3EC; --bg-alt: #ECE6DA; --fg: #0F0E17; --muted: #5E5B6B; --line: rgba(15,14,23,.12);
  --nav-bg: rgba(255,255,255,.62); --nav-line: rgba(15,14,23,.08); --nav-chip: rgba(15,14,23,.04); --nav-pill: rgba(15,14,23,.08); --shadow: rgba(30,20,60,.15);
}
:root {
  --violet: #7C5CFF; --cyan: #22D3EE; --green: #34D399; --amber: #FFC94D; --coral: #FF7A59; --pink: #F472B6;
  --iris: linear-gradient(100deg, var(--violet), var(--cyan) 25%, var(--green) 45%, var(--amber) 65%, var(--coral) 82%, var(--pink));
  --display: "Bricolage Grotesque", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px); --max: 1240px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--fg); font: 17px/1.6 var(--display); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .5s, color .5s; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.grad { background: var(--iris); -webkit-background-clip: text; background-clip: text; color: transparent; }
.acc { color: var(--p-ac); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-theme="dark"] .only-light, [data-theme="light"] .only-dark { display: none !important; }
html.lenis, html.lenis body { height: auto; } .lenis.lenis-smooth { scroll-behavior: auto !important; }

/* Nav */
.nav { position: fixed; top: 16px; left: 50%; z-index: 50; width: min(1180px, calc(100% - 24px)); transform: translateX(-50%); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.nav.hide { transform: translate(-50%, -140%); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 58px; padding: 0 8px 0 20px; border-radius: 18px; background: var(--nav-bg); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); border: 1px solid var(--nav-line); box-shadow: 0 10px 40px -10px var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -.035em; }
.brand img { width: 28px; height: 28px; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.brand:hover img { transform: rotate(180deg); }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.crumbs a:hover { color: var(--fg); }
.crumbs b { color: var(--fg); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--nav-chip); border: 1px solid var(--nav-line); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-btn { height: 42px; padding: 0 4px; border-radius: 12px; display: flex; gap: 2px; align-items: center; background: var(--nav-chip); border: 1px solid var(--nav-line); font: 600 11.5px var(--mono); }
.lang-btn span { padding: 6px 7px; border-radius: 8px; color: var(--muted); }
html[lang="es"] .lang-btn [data-l="es"], html[lang="en"] .lang-btn [data-l="en"] { background: var(--nav-pill); color: var(--fg); }
.cta { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; background: var(--fg); color: var(--bg); font-weight: 600; font-size: 14.5px; }
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; background: linear-gradient(90deg, var(--p), var(--p2, var(--amber))); transform-origin: left; transform: scaleX(0); }

/* Hero del caso */
.hero { position: relative; padding: 150px 0 80px; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 70vmax; aspect-ratio: 1; right: -25vmax; top: -20vmax; border-radius: 50%; background: radial-gradient(circle, var(--p-glow), transparent 62%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.case-tag { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.pill { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; }
.pill.brand { background: var(--p); color: var(--p-on); }
.pill.own { border: 1px solid var(--line); color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.pill.own img { width: 16px; height: 16px; }
.hero .logo { height: clamp(50px, 6vw, 80px); width: auto; margin-bottom: 26px; }
.hero h1 { font-size: clamp(34px, 4.1vw, 58px); line-height: .98; letter-spacing: -.045em; font-weight: 800; }
.hero .lead { margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 540px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px; border-radius: 14px; font-weight: 700; font-size: 16px; transition: transform .3s, box-shadow .3s, background .3s; }
.btn:hover { transform: translateY(-2px); }
.btn.brand { background: var(--p); color: var(--p-on); box-shadow: 0 14px 30px -14px var(--p); font-family: var(--p-font, inherit); }
.soon { display: inline-flex; align-items: center; gap: 10px; padding: 16px 22px; border-radius: 14px; border: 1px dashed var(--p-line); color: var(--p-ac); font-weight: 700; font-size: 15px; }
.btn.ghost { border: 1px solid var(--line); background: color-mix(in srgb, var(--fg) 4%, transparent); }

/* Equipos */
.devices { position: relative; }
.laptop .lid { background: #1A1F2B; border-radius: 16px 16px 6px 6px; padding: 10px 10px 12px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); }
[data-theme="dark"] .laptop .lid { background: #2B2B2E; box-shadow: 0 0 0 1px #3a3a3e, 0 40px 80px -30px rgba(0,0,0,.8); }
.laptop .base { height: 12px; margin: 0 -6%; background: linear-gradient(#C2C8D3, #9AA3B2); border-radius: 0 0 14px 14px; }
[data-theme="dark"] .laptop .base { background: linear-gradient(#4a4a4f, #2e2e32); }
.screen16 { border-radius: 6px; overflow: hidden; aspect-ratio: 16/10; position: relative; }
.screen16 img, .phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.fade > img { transition: opacity .9s ease; } .fade > img + img { position: absolute; inset: 0; } .fade > img:not(.on) { opacity: 0; }
.phone { position: absolute; right: -3%; bottom: -10%; width: 27%; aspect-ratio: 390/844; padding: 7px; border-radius: 30px; background: #050508; box-shadow: 0 0 0 1.5px #2B3140, 0 40px 80px -20px rgba(0,0,0,.6); }
.phone > div { position: relative; width: 100%; height: 100%; border-radius: 24px; overflow: hidden; background: #fff; }

/* Ficha rápida */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 70px 0 30px; }
.fact { border-top: 2px solid var(--p-line); padding-top: 16px; }
.fact .mono { color: var(--muted); font-size: 11px; }
.fact p { margin-top: 8px; font-weight: 600; font-size: 17px; line-height: 1.35; }

/* Secciones */
section.block { padding: 110px 0; }
section.alt { background: var(--bg-alt); border-radius: 36px; }
.head { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 60px; align-items: end; margin-bottom: 52px; }
.head .kicker { grid-column: 1 / -1; color: var(--p-ac); }
.head h2 { font-size: clamp(34px, 4.8vw, 64px); line-height: .98; letter-spacing: -.045em; font-weight: 800; }
.head p { color: var(--muted); font-size: 18px; }

/* Antes / después */
.ba { display: grid; gap: 12px; }
.ba-row { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; gap: 14px; }
.ba-card { border-radius: 18px; padding: 18px 20px; border: 1px solid var(--line); }
.ba-card small { display: block; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ba-card.before { background: color-mix(in srgb, var(--fg) 3%, transparent); }
.ba-card.before p { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.ba-card.after { background: var(--p-soft); border-color: var(--p-line); }
.ba-card.after small { color: var(--p-ac); }
.ba-card p { font-weight: 600; }
.ba-arrow { text-align: center; font-size: 22px; color: var(--p-ac); }
.ba-labels { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 14px; margin-bottom: 4px; }
.ba-labels span { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ba-labels span:last-child { color: var(--p-ac); }

/* Qué hace */
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feat { padding: 28px; border-radius: 22px; background: var(--bg); border: 1px solid var(--line); transition: transform .4s, border-color .4s; }
.feat:hover { transform: translateY(-4px); border-color: var(--p-line); }
.feat .n { font: 600 12px var(--mono); color: var(--p-ac); }
.feat h3 { font-size: 22px; letter-spacing: -.03em; margin: 14px 0 8px; font-weight: 800; }
.feat p { color: var(--muted); font-size: 16px; }

/* Galería */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-alt); border: 1px solid var(--line); margin-bottom: 28px; }
.tabs button { padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--muted); transition: background .3s, color .3s; }
.tabs button.on { background: var(--fg); color: var(--bg); }
.gallery { display: none; gap: 20px; }
.gallery.on { display: grid; }
.gallery.web { grid-template-columns: 1fr 1fr; }
.gallery.mobile { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.zoom { display: block; width: 100%; cursor: zoom-in; position: relative; }
.zoom::after { content: "⤢"; position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(11,11,18,.6); color: #fff; font-size: 16px; opacity: 0; transition: opacity .3s; }
.shot:hover .zoom::after { opacity: 1; }
.shot { transition: transform .4s, border-color .4s; } .shot:hover { transform: translateY(-4px); border-color: var(--p-line); }
.viewer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(6,6,10,.86); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.viewer.open { opacity: 1; pointer-events: auto; }
.viewer figure { max-width: min(1200px, 100%); max-height: 100%; display: grid; gap: 12px; justify-items: center; }
.viewer img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.viewer figcaption { color: #E9E7F2; font-size: 15px; text-align: center; }
.viewer .close, .viewer .nav-b { position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; }
.viewer .close { top: 18px; right: 18px; } .viewer .prev-b { left: 18px; top: 50%; translate: 0 -50%; } .viewer .next-b { right: 18px; top: 50%; translate: 0 -50%; }
.shot { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); }
.shot img { width: 100%; height: auto; }
.gallery.mobile .shot { border-radius: 26px; }
.shot figcaption { padding: 12px 16px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }

/* Lo que logra */
.outcomes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.outcome { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 26px; border-radius: 22px; border: 1px solid var(--line); }
.outcome .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--p-soft); color: var(--p-ac); font-weight: 800; font-size: 20px; }
.outcome h3 { font-size: 21px; letter-spacing: -.03em; font-weight: 800; }
.outcome p { color: var(--muted); margin-top: 6px; font-size: 16px; }

/* Cómo lo construimos */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step { padding: 26px; border-radius: 22px; background: var(--bg); border: 1px solid var(--line); position: relative; overflow: hidden; }
.step::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--iris); }
.step .n { font: 600 12px var(--mono); color: var(--muted); }
.step h3 { font-size: 22px; letter-spacing: -.03em; margin: 12px 0 8px; font-weight: 800; }
.step p { color: var(--muted); font-size: 15.5px; }

/* Lo que podemos hacer por ti */
.transfer { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.transfer h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1; letter-spacing: -.045em; font-weight: 800; }
.transfer ul { list-style: none; display: grid; gap: 12px; }
.transfer li { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); font-weight: 600; }
.transfer li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--iris); }

/* Cierre */
.closing { margin: 40px auto 0; text-align: center; padding: clamp(48px, 7vw, 90px) var(--gutter); border-radius: 32px; position: relative; overflow: hidden; isolation: isolate; background: var(--bg-alt); }
.closing::before { content: ""; position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from 90deg, var(--p), var(--p2, var(--amber)), var(--violet), var(--cyan), var(--p)); filter: blur(90px); opacity: .18; }
.closing h2 { font-size: clamp(36px, 5.5vw, 76px); line-height: .96; letter-spacing: -.045em; font-weight: 800; max-width: 900px; margin: 0 auto; }
.closing p { color: var(--muted); max-width: 560px; margin: 20px auto 32px; font-size: 18px; }
.closing .actions { justify-content: center; }
.btn.main { background: var(--fg); color: var(--bg); }
.btn.wa { background: #25D366; color: #06210F; }
.btn .wa-ic { width: 20px; height: 20px; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 60px; padding: 30px 0; border-top: 1px solid var(--line); }
.next a { display: grid; gap: 4px; }
.next a .mono { color: var(--muted); }
.next a b { font-size: clamp(26px, 3vw, 40px); letter-spacing: -.04em; transition: transform .4s; }
.next a:hover b { transform: translateX(8px); }
.next a.prev:hover b { transform: translateX(-8px); }
.next a.fwd { text-align: right; }

footer { padding: 34px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); margin-top: 60px; }
footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
footer nav { display: flex; gap: 22px; } footer a:hover { color: var(--fg); }

.reveal { will-change: transform; }

@media (max-width: 980px) {
  .hero-grid, .head, .transfer { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .feats, .steps { grid-template-columns: 1fr 1fr; }
  .gallery.mobile { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .outcomes { grid-template-columns: 1fr; }
  .crumbs { display: none; }
}
@media (max-width: 640px) {
  .nav .cta { display: none; }
  .hero { padding-top: 120px; }
  .feats, .steps, .facts { grid-template-columns: 1fr; }
  .ba-labels { display: none; }
  .ba-row { grid-template-columns: 1fr; gap: 6px; }
  .ba-arrow { transform: rotate(90deg); }
  .gallery.web { grid-template-columns: 1fr; }
  .gallery.mobile { grid-template-columns: 1fr 1fr; }
  .viewer .nav-b { display: none; }
  .phone { width: 30%; right: 0; }
  .next { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
