/* ==================================================
   Painting — estilos propios de la plantilla (hero: la web se pinta con el cursor)
   Barra, botones, secciones comunes, similares, CTA y WhatsApp vienen de themes/_kit/am-kit.css
   pa.js pinta en los lienzos: .pa-base (la obra sin pintar), .pa-paint (la pintura), .pa-gold (la lámina para
   raspar), .pa-trans (la pincelada gigante entre obras) y .pa-fx (viruta y confeti)
   ================================================== */

.pa-hero {
	--gold: #f6b300;
	--foot-h: 92px;
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100vh;
	height: 100svh;
	min-height: 720px;
	padding-top: 68px;
	overflow: hidden;
	color: #fff;
	background: #0c0c0c;
	touch-action: pan-y;
	cursor: none;
}
.pa-cv { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.pa-base { z-index: 0; }
.pa-paint, .pa-relief { z-index: 1; }
.pa-gold { z-index: 2; }
.pa-trans { z-index: 3; }
.pa-fx { z-index: 5; }
.pa-shade { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(90deg, rgba(8, 8, 8, .62) 0%, rgba(8, 8, 8, .25) 34%, rgba(8, 8, 8, 0) 52%); }
.pa-hero.is-scratch .pa-shade { background: linear-gradient(90deg, rgba(8, 8, 8, .45) 0%, rgba(8, 8, 8, 0) 44%); }

/* ---------- Texto: cintas negras con trazo de pincel (como el original) ---------- */
.pa-copy { position: absolute; z-index: 6; left: var(--gutter); top: calc(68px + 12vh); width: min(600px, 44vw); pointer-events: none; }
.pa-copy a { pointer-events: auto; cursor: pointer; }
.pa-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.pa-kicker__n { display: inline-grid; place-items: center; width: 40px; height: 40px; font-size: 14px; letter-spacing: 0; color: #0c0c0c; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 4px rgba(246, 179, 0, .25); }
.pa-page .pa-title { position: relative; margin: 0 0 26px; font-family: 'Poppins', sans-serif; font-size: clamp(30px, 3.3vw, 54px); font-weight: 800; line-height: 1; letter-spacing: .02em; text-align: left; text-transform: uppercase; color: #fff; }
.pa-rib { position: relative; display: table; padding: .32em .62em .3em; background: #0c0c0c; clip-path: polygon(1.2% 6%, 18% 0, 46% 4%, 74% 0, 98.6% 5%, 100% 48%, 98.8% 94%, 70% 100%, 38% 96%, 12% 100%, 0 92%, .8% 50%); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); white-space: nowrap; }
.pa-rib--1 { transform: rotate(-3deg); transform-origin: 0 50%; }
.pa-rib--2 { margin: .16em 0 0 .9em; transform: rotate(2deg); transform-origin: 0 50%; background: var(--gold); color: #0c0c0c; }
.pa-rib__t { display: inline-block; }
.pa-x { position: absolute; left: 30%; top: -26%; width: 2px; height: 160%; background: rgba(255, 255, 255, .85); transform: rotate(32deg); z-index: -1; pointer-events: none; }
.pa-x::after { content: ''; position: absolute; left: 0; top: 0; width: 2px; height: 100%; background: inherit; transform: rotate(-64deg); }
.pa-desc { max-width: 40ch; margin: 0 0 28px; font-family: 'Poppins', sans-serif; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.65; color: rgba(255, 255, 255, .92); text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.ak-page .pa-get { display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 30px; font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: #0c0c0c; background: #fff; border: 2px solid #0c0c0c; box-shadow: 6px 6px 0 var(--gold); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.ak-page .pa-get:hover, .ak-page .pa-get:focus-visible { color: #0c0c0c; transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--gold); }

/* ---------- Sorpresa (bajo la lámina dorada) ---------- */
.pa-surprise { position: absolute; z-index: 4; left: 64%; top: calc(68px + (100% - 68px - var(--foot-h)) / 2 + 40px); transform: translate(-50%, -50%); text-align: center; pointer-events: none; visibility: hidden; opacity: 0; }
.pa-surprise__k { display: inline-block; margin: 0 0 10px; padding: 8px 22px; font-family: 'Caveat', cursive; font-size: clamp(54px, 6vw, 96px); line-height: 1; color: #0c0c0c; background: #fff; transform: rotate(-4deg); box-shadow: 8px 8px 0 #0c0c0c; }
.pa-surprise__t { margin: 0; font-family: 'Poppins', sans-serif; font-size: clamp(18px, 1.8vw, 26px); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; text-shadow: 0 3px 0 #0c0c0c, 0 0 24px rgba(0, 0, 0, .8); }

/* ---------- Paleta ---------- */
.pa-palette { position: absolute; z-index: 7; right: var(--gutter); top: calc(68px + 22px); width: 196px; padding: 14px; color: #fff; background: rgba(12, 12, 12, .78); border: 1px solid rgba(255, 255, 255, .14); border-top: 3px solid var(--gold); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: auto; }
.pa-palette__h { margin: 0 0 10px; font-family: 'Caveat', cursive; font-size: 30px; line-height: 1; color: var(--gold); }
.pa-tools { display: grid; gap: 6px; margin-bottom: 12px; }
.ak-page .pa-tool { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 0; margin: 0; padding: 9px 10px; font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .78); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); cursor: pointer; transition: background-color .2s linear, color .2s linear; }
.pa-tool svg { width: 20px; height: 20px; flex: 0 0 auto; fill: currentColor; }
.ak-page .pa-tool:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.ak-page .pa-tool.is-on { color: #0c0c0c; background: var(--gold); border-color: var(--gold); }
.pa-tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pa-sizes { display: flex; gap: 6px; margin-bottom: 12px; }
.ak-page .pa-size { flex: 1 1 0; display: grid; place-items: center; width: auto; min-height: 40px; margin: 0; padding: 0; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); cursor: pointer; }
.pa-size i { width: var(--d); height: var(--d); border-radius: 50%; background: #fff; }
.ak-page .pa-size.is-on { border-color: var(--gold); background: rgba(246, 179, 0, .16); }
.pa-size.is-on i { background: var(--gold); }
.pa-size:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ak-page .pa-auto, .ak-page .pa-clear { display: block; width: 100%; min-height: 0; margin: 0 0 6px; padding: 9px 10px; font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .3); cursor: pointer; }
.ak-page .pa-auto:hover, .ak-page .pa-clear:hover { border-color: var(--gold); color: var(--gold); }
.pa-auto__off, .pa-auto[aria-pressed="false"] .pa-auto__on { display: none; }
.pa-auto[aria-pressed="false"] .pa-auto__off { display: inline; }
.pa-auto[aria-pressed="true"]::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #34c759; box-shadow: 0 0 8px #34c759; vertical-align: 1px; }
.pa-meter { margin-top: 6px; }
.pa-meter__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; white-space: nowrap; margin: 0 0 6px; font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.pa-meter__v { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 800; color: #fff; }
.pa-meter__bar { position: relative; display: block; height: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.pa-meter__bar b { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, #ff4d6d, var(--gold), #3cc2c0); transform: scaleX(0); transform-origin: 0 50%; }
.pa-meter.is-done .pa-meter__l { color: var(--gold); }

/* ---------- El pincel que sigue al cursor ---------- */
.pa-cursor { position: absolute; z-index: 8; left: 0; top: 0; width: 64px; height: 64px; margin: -56px 0 0 -6px; pointer-events: none; opacity: 0; transform-origin: 6px 56px; transition: opacity .2s linear; filter: drop-shadow(3px 6px 6px rgba(0, 0, 0, .5)); }
.pa-cursor.is-on { opacity: 1; }
.pa-cursor svg { position: absolute; inset: 0; display: none; width: 100%; height: 100%; }
.pa-cursor[data-tool="oil"] .pa-cursor__oil, .pa-cursor[data-tool="water"] .pa-cursor__water, .pa-cursor[data-tool="scratch"] .pa-cursor__scratch { display: block; }
.pa-cursor[data-tool="scratch"] { margin: -42px 0 0 -22px; transform-origin: 22px 42px; }
.pa-cursor.is-ghost { filter: drop-shadow(3px 6px 6px rgba(0, 0, 0, .5)) drop-shadow(0 0 10px rgba(255, 255, 255, .35)); }

.pa-hint { position: absolute; z-index: 6; left: var(--gutter); bottom: calc(var(--foot-h) + 22px); margin: 0; font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .7); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); pointer-events: none; }
.pa-hint--touch { display: none; }
@media (hover: none) {
	.pa-hint--mouse { display: none; }
	.pa-hint--touch { display: inline; }
}
.pa-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pie del hero ---------- */
.pa-foot {
	position: relative;
	z-index: 8;
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: minmax(260px, 1fr) auto auto;
	gap: 14px clamp(20px, 3vw, 44px);
	align-items: center;
	padding: 14px calc(var(--gutter) + 140px) 16px var(--gutter);
	background: rgba(10, 10, 10, .95);
	border-top: 3px solid var(--accent);
	cursor: auto;
}
.pa-foot__meta { margin: 0 0 4px; font-family: var(--mb-mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pa-foot__lead { max-width: 60ch; margin: 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; color: rgba(245, 245, 240, .86); }
.pa-ctrl { display: flex; align-items: center; gap: 10px; }
.pa-count { margin: 0 6px 0 0; font-family: var(--mb-mono); font-size: 14px; color: rgba(245, 245, 240, .7); white-space: nowrap; }
.pa-idx { display: inline-block; font-family: var(--mb-display); font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -.02em; vertical-align: -5px; color: var(--accent); }
@media (max-width: 1180px) {
	.pa-foot { grid-template-columns: minmax(0, 1fr) auto; }
	.pa-foot .ak-actions { grid-column: 1 / -1; }
}
@media (max-height: 820px) and (min-width: 1001px) {
	.pa-copy { top: calc(68px + 7vh); }
	.pa-page .pa-title { font-size: clamp(28px, 2.9vw, 46px); }
	.pa-desc { margin-bottom: 18px; }
	.pa-palette { padding: 10px; }
	.pa-palette__h { font-size: 24px; margin-bottom: 6px; }
	.ak-page .pa-tool { padding: 7px 10px; }
}

/* ---------- Tablet y móvil ---------- */
@media (max-width: 1000px) {
	.pa-hero { height: auto; min-height: 0; cursor: auto; }
	.pa-hero::before { content: ''; display: block; flex: 0 0 auto; height: calc(100svh - 70px); min-height: 680px; max-height: 1000px; }
	.pa-shade { background: linear-gradient(0deg, rgba(8, 8, 8, .85) 0%, rgba(8, 8, 8, .45) 36%, rgba(8, 8, 8, 0) 56%); }
	.pa-copy { top: auto; bottom: calc(var(--foot-h) + 112px); right: var(--gutter); width: auto; }
	.pa-page .pa-title { font-size: clamp(22px, 6.4vw, 42px); margin-bottom: 16px; }
	.pa-desc { margin-bottom: 18px; font-size: 14px; }
	.ak-page .pa-get { min-height: 46px; font-size: 13px; }
	.pa-hint { display: none; }
	/* la paleta pasa a ser una barra al pie del lienzo */
	.pa-palette { top: auto; bottom: calc(var(--foot-h) + 14px); left: var(--gutter); right: var(--gutter); width: auto; display: flex; align-items: center; gap: 8px; padding: 8px; }
	.pa-palette__h, .pa-meter { display: none; }
	.ak-page .pa-clear { width: auto; margin: 0; padding: 9px 8px; white-space: nowrap; }
	.pa-tools { display: flex; flex: 1 1 auto; margin: 0; }
	.ak-page .pa-tool { flex: 1 1 0; justify-content: center; padding: 8px 6px; font-size: 12px; }
	.pa-sizes { margin: 0; flex: 0 0 auto; }
	.ak-page .pa-size { width: 36px; min-height: 36px; }
	.ak-page .pa-auto { width: auto; margin: 0; padding: 9px 8px; }
	.pa-surprise { left: 50%; transform: translate(-50%, -80%); width: 90%; }
}
@media (max-width: 700px) {
	.pa-hero { padding-top: 60px; }
	/* deja libre la esquina del botón de WhatsApp en la primera pantalla */
	.pa-hero::before { height: min(calc(100svh - 136px), 820px); min-height: 640px; }
	/* paleta en dos filas: técnicas arriba, tamaño y opciones abajo */
	.pa-copy { bottom: calc(var(--foot-h) + 150px); }
	.pa-palette { flex-wrap: wrap; }
	.pa-tools { flex: 1 1 100%; }
	.pa-sizes .pa-size:first-child { display: none; }
	.ak-page .pa-auto, .ak-page .pa-clear { display: block; flex: 1 1 0; width: auto; margin: 0; padding: 9px 6px; font-size: 10px; white-space: nowrap; }
	.pa-foot { grid-template-columns: 1fr; padding: 14px var(--gutter) 88px; }
	.pa-ctrl { order: -1; }
	.pa-foot .ak-actions .ak-btn { flex: 1 1 auto; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
	.ak-page .pa-get, .pa-cursor { transition: none; }
}
