/* /whiteboard · luminosa, papel, marcador, trazo a mano */

.wb-page { --paper-dots: radial-gradient(rgba(42,42,42,.11) 1.4px, transparent 1.6px) 0 0 / 28px 28px; }
.wb-page .section, .wb-page .wb-hero { background: var(--bg) var(--paper-dots); }
.wb-page .t-paper { --bg: #FBF8F2; }

/* Trazo que se dibuja (bucle) */
.draw .d { stroke-dasharray: 1; stroke-dashoffset: 1; animation: wDraw 11s var(--ease) infinite both; animation-delay: calc(var(--i) * .45s); }
.draw .o { stroke: var(--orange); }
.draw text, .draw .ink { animation: wInk 11s infinite both; animation-delay: calc(var(--i, 0) * .45s + .6s); }
@keyframes wDraw { 0% { stroke-dashoffset: 1; opacity: 1; } 16% { stroke-dashoffset: 0; } 88% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes wInk { 0%, 6% { opacity: 0; } 14%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
/* Trazo que se dibuja una sola vez (al aparecer) */
.draw-once .d { stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .draw-once .d, .draw-once.in .d { animation: wOnce 1.4s var(--ease) forwards; animation-delay: calc(var(--i, 0) * .25s + .2s); }
@keyframes wOnce { to { stroke-dashoffset: 0; } }

/* Botones con sombra de trazo */
.wb-page .btn { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.wb-page .btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.wb-page .btn-ghost { --b-bg: #fff; --b-fg: var(--ink); }
.wb-page .nav .btn { box-shadow: 2px 2px 0 var(--ink); }
.wb-page .footer .btn { border-color: #fff; box-shadow: 4px 4px 0 #fff; }

/* ---------- HERO ---------- */
.wb-hero { position: relative; overflow: hidden; min-height: max(720px, 100svh); display: grid; align-items: center; padding: 130px 0 90px; }
.wb-hero-in { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
@media (max-width: 1000px) { .wb-hero-in { grid-template-columns: 1fr; } }
.wb-hero .h1 { font-size: clamp(2.7rem, 5.8vw, 5.4rem); }
.word-scribble { position: relative; white-space: nowrap; }
.word-scribble svg { position: absolute; left: -4%; right: -4%; width: 108%; bottom: -.12em; height: .32em; overflow: visible; }
.word-easy { position: relative; display: inline-block; font-family: var(--font-marker); font-weight: 400; color: var(--orange-deep); letter-spacing: 0; padding: 0 .12em; transform: rotate(-3deg); }
.word-easy svg { position: absolute; inset: -22% -14% -18% -14%; width: 128%; height: 140%; overflow: visible; pointer-events: none; }
.word-easy .d, .word-scribble .d { stroke-dasharray: 1; stroke-dashoffset: 1; animation: wOnce 1.1s var(--ease) forwards; }
.word-scribble .d { animation-delay: .5s; }
.word-easy .d { animation-delay: 1.1s; }
.hand-note { font-family: var(--font-hand); font-size: 1.6rem; font-weight: 600; color: var(--orange-deep); display: inline-flex; align-items: center; gap: 8px; rotate: -2deg; margin-top: 26px; }

.board { position: relative; aspect-ratio: 16 / 9; border-radius: 26px; background: #fff; border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); overflow: hidden; }
.board::before { content: ""; position: absolute; inset: 0; background: var(--paper-dots); opacity: .6; }
.board svg { position: relative; width: 100%; height: 100%; }
.board .lbl { font: 700 30px var(--font-hand); fill: var(--ink); stroke: none; }
.board .lbl.o { fill: var(--orange-deep); }
.board .mk { font: 400 22px var(--font-marker); fill: var(--ink); stroke: none; }
.board-tray { position: absolute; left: 8%; right: 8%; bottom: -14px; height: 14px; border-radius: 0 0 10px 10px; background: var(--ink); }
.marker-pen { position: absolute; right: -14px; bottom: 18%; width: 120px; rotate: -32deg; animation: pen 5s ease-in-out infinite; filter: drop-shadow(4px 6px 0 rgba(42,42,42,.18)); }
@keyframes pen { 50% { transform: translate(-10px, -8px) rotate(4deg); } }
.board-wrap { position: relative; padding: 0 14px 18px 0; }
.sticky-tag { position: absolute; top: -22px; left: 18px; z-index: 2; padding: 10px 16px; background: #FFE98A; font: 700 22px var(--font-hand); rotate: -4deg; box-shadow: 0 8px 18px -8px rgba(0,0,0,.35); }

/* ---------- USOS: notas adhesivas ---------- */
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 34px); }
@media (max-width: 900px) { .notes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .notes { grid-template-columns: 1fr; } }
.note { position: relative; padding: 34px 28px 30px; min-height: 250px; background: var(--c, #FFF1A8); color: var(--ink); box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 20px 30px -18px rgba(0,0,0,.35); rotate: var(--r, -1.5deg); transition: rotate .5s var(--ease), transform .5s var(--ease), box-shadow .5s; display: flex; flex-direction: column; gap: 10px; }
.note:hover { rotate: 0deg; transform: translateY(-6px) scale(1.02); box-shadow: 0 30px 40px -20px rgba(0,0,0,.4); }
.note::before { content: ""; position: absolute; top: -12px; left: 50%; translate: -50% 0; width: 96px; height: 26px; background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.05); rotate: -3deg; }
.note svg { width: 54px; height: 54px; }
.note .h3 { margin-top: auto; }
.note p { margin: 0; color: #4A453F; font-size: 15.5px; }
.note:nth-child(1) { --c: #FFF1A8; --r: -2deg; }
.note:nth-child(2) { --c: #FFD9B8; --r: 1.5deg; }
.note:nth-child(3) { --c: #D6E8FF; --r: -1deg; }
.note:nth-child(4) { --c: #D7F5E3; --r: 2deg; }
.note:nth-child(5) { --c: #FFD6E5; --r: -1.5deg; }
.note:nth-child(6) { --c: #E6DEFF; --r: 1deg; }

/* ---------- PORTAFOLIO: polaroids ---------- */
.pf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 44px; }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 26px; }
@media (max-width: 1000px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pf-grid { grid-template-columns: 1fr; } }
.pol { all: unset; cursor: pointer; display: block; position: relative; background: #fff; padding: 12px 12px 18px; box-shadow: 0 2px 0 rgba(0,0,0,.04), 0 22px 40px -22px rgba(0,0,0,.45); rotate: var(--r, 0deg); transition: rotate .5s var(--ease), transform .5s var(--ease); }
.pol:nth-child(odd) { --r: -1.2deg; } .pol:nth-child(even) { --r: 1.4deg; } .pol:nth-child(3n) { --r: -.5deg; }
.pol:hover { rotate: 0deg; transform: translateY(-6px); }
.pol:focus-visible { outline: 3px solid var(--orange); outline-offset: 6px; }
.pol[hidden] { display: none; }
.pol.in { animation: polIn .6s var(--ease) both; }
@keyframes polIn { from { opacity: 0; transform: translateY(16px); } }
.pol::before { content: ""; position: absolute; top: -10px; left: 50%; translate: -50% 0; width: 80px; height: 22px; background: rgba(249,129,32,.35); rotate: 2deg; z-index: 2; }
.pol-shot { aspect-ratio: 16 / 11; background: #FBF8F2 var(--paper-dots); border: 1px solid rgba(42,42,42,.1); position: relative; display: grid; place-items: center; overflow: hidden; }
.pol-shot svg { position: absolute; inset: 10%; width: 80%; height: 80%; }
.pol-shot .doodle { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.pol-shot .doodle .o { stroke: var(--orange); }
.pol-play { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; padding-left: 4px; position: relative; z-index: 2; transition: transform .4s var(--ease), background .3s; }
.pol:hover .pol-play { transform: scale(1.12); background: var(--orange); color: var(--ink); }
.pol-cap { display: block; margin-top: 12px; font: 700 26px/1.05 var(--font-hand); }
.pol-meta { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* ---------- POR QUÉ FUNCIONA ---------- */
.why-wb { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 900px) { .why-wb { grid-template-columns: 1fr; } }
.why-item { position: relative; padding-top: 10px; }
.why-item svg { width: 120px; height: 100px; margin-bottom: 18px; }
.why-item svg .d { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.why-item svg .o { stroke: var(--orange); }
.why-item .h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.why-item .h3 .hl { background: linear-gradient(transparent 58%, rgba(249,129,32,.45) 58%, rgba(249,129,32,.45) 90%, transparent 90%); padding: 0 .1em; }
.why-item p { color: var(--muted); margin: 12px 0 0; max-width: 34ch; }
.squiggle { display: block; width: 100%; height: 30px; color: var(--ink); opacity: .3; }

/* ---------- Precio en papel ---------- */
.price-card.paper { background: #fff; color: var(--ink); border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.price-card.paper::before, .price-card.paper::after { display: none; }
.price-card.paper .price-tag { background: #FFE98A; }
.price-card.paper .price-num { position: relative; width: fit-content; }
.price-card.paper .price-num::after { content: ""; position: absolute; left: -4%; right: -6%; bottom: 8%; height: 30%; background: rgba(249,129,32,.45); z-index: -1; rotate: -1.5deg; border-radius: 8px; }
.price-card.paper { isolation: isolate; }

.pol-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pol-shot:has(.pol-img) svg { display: none; }

/* ---------- Hero: video de Sher con botón de play (no arranca solo) ---------- */
.board.has-video { background: #000; }
.board.has-video::before { display: none; }
.board-play { all: unset; position: absolute; inset: 0; display: block; cursor: pointer; }
.board-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.board-play:hover img { transform: scale(1.03); }
.board-play:focus-visible { outline: 4px solid var(--orange); outline-offset: -4px; }
.play-orange { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 92px; height: 92px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); transition: transform .35s var(--ease); }
.play-orange::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--orange); animation: playPulse 2.2s ease-out infinite; }
.board .play-orange svg { position: static; width: 42px; height: 42px; fill: var(--ink); }
.board-play:hover .play-orange { transform: scale(1.08); }
.play-label { position: absolute; left: 16px; bottom: 14px; padding: 7px 12px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.board video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.board-wrap.playing .marker-pen, .board-wrap.playing .sticky-tag { display: none; }
@keyframes playPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
@media (max-width: 600px) { .play-orange { width: 70px; height: 70px; } .board .play-orange svg { width: 32px; height: 32px; } }

/* Subrayado y círculo del titular: se revelan con un barrido (más fiable que el trazo punteado) */
.word-easy .d, .word-scribble .d { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
.word-scribble svg, .word-easy svg { clip-path: inset(-40% 100% -40% -10%); animation: wReveal .9s var(--ease) .5s forwards; }
.word-easy svg { animation-delay: 1.1s; }
@keyframes wReveal { to { clip-path: inset(-40% -10% -40% -10%); } }
@media (prefers-reduced-motion: reduce) { .word-scribble svg, .word-easy svg { clip-path: none; } }

/* ===== RONDA 2026-12-04 ===== */

/* ---------- D · compacto ---------- */
.wb-hero { padding: 108px 0 64px; }
.pf-head { margin-bottom: 28px; }
.pf-grid { gap: 26px 24px; }
.pol-cap { font-size: 24px; margin-top: 9px; }
.notes { gap: clamp(16px, 2.2vw, 26px); }
.note { min-height: 0; padding: 26px 24px 22px; gap: 8px; }
.note svg { width: 46px; height: 46px; }
.note .h3 { margin-top: 6px; }
.hand-note { margin-top: 18px; }
.why-wb { gap: clamp(18px, 2.6vw, 34px); }
@media (min-width: 900px) and (max-height: 840px) {
  .wb-hero .h1 { font-size: clamp(2.5rem, 4.9vw, 4.2rem); }
  .wb-hero .lead { font-size: 1.05rem; }
}

/* ---------- G2 · Iconos de "Simple drawings": ilustración plana con contorno, que se dibuja al aparecer ---------- */
.why-item svg { width: 190px; height: 133px; margin-bottom: 12px; overflow: visible; }
.why-item svg .d { stroke-width: 4.5; }
.why-item svg .fl { stroke: none; }
.why-item svg .gaze { stroke: #FF6B8B; }
@media (prefers-reduced-motion: no-preference) {
  .why-item svg .fl { opacity: 0; }
  .in .draw-once .fl { animation: wFillIn .55s ease forwards; animation-delay: calc(var(--i, 0) * .25s + 1s); }
}
@keyframes wFillIn { to { opacity: 1; } }
