Política de Cookies – Bianco Sea Emotion
var intro = document.querySelector('.bx-intro'); var introDone = false; function endIntro() { if (introDone) { return; } introDone = true; if (!intro) { startHero(); return; } intro.classList.add('is-out'); doc.classList.remove('bx-lock'); try { sessionStorage.setItem('bxIntro', '1'); } catch (e) {} setTimeout(startHero, 175); setTimeout(function () { intro.remove(); }, 600); } if (doc.classList.contains('bx-arrive')) { var arrive = function () { doc.classList.add('bx-arrived'); }; setTimeout(arrive, 60); setTimeout(arrive, 400); window.addEventListener('load', arrive); } window.addEventListener('pageshow', function (e) { if (e.persisted) { var c = document.querySelector('.bx-curtain'); if (c) { c.classList.remove('is-in'); } } }); if (!reduce) { document.addEventListener('click', function (e) { var a = e.target.closest && e.target.closest('a[href]'); if (!a || e.defaultPrevented| e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) { return; } if (a.target && a.target = '_self') { return; } if (a.hasAttribute('download')) { return; } var url = new URL(a.hre.href); if (url.origin !== location.origin || /^(mailto|tel):/.test(a.href)) { return; } if (/\/wp-(admin|logi.test(url.pathname) || /\.(pdf|jpe?g|png|webp|mp4|zip)$/i.test(url.pathname)) { return; } if (url.pathname === location.pathname && url.search === location.search) { return; } e.preventDefault(); var c = document.querySelector('.bx-curtain'); try { sessionStorage.setItem('bxNav', '1'); } catch (err) {} if (c) { c.classList.add('is-in'); } setTimeout(function () { location.href = url.href; }, 560); }); } function splitWords(el) { var walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT var nodes = []; while (walker.nextNode()) { nodes.push(walker.currentNode); } var i = 0; nodes.forEach(function (node) { if (!node.nodeValue.trim()) { return; } var frag = document.createDocumentFragment(); node.nodeValue.split(/(\s+)/).forEach(function (part) { if (!part) { return; } if (/^\s+$/.test(part)) { frag.appendChild(document.createTextNode(' ')); return; } var w = document.createElement('span'); w.className = 'bx-w'; var inner = document.createElement('span'); inner.textContent = part; inner.style.transitionDelay = Math.min(i * 70, 900) + 'ms'; w.appendChild(inner); frag.appendChild(w); i++; }); node.parentNode.replaceChild(frag, node); }); if (/flex|grid/.test(getComputedStyle(el).display)) { var wrap = document.createElement('span'); wrap.className = 'bx-flexwrap'; while (el.firstChild) { wrap.appendChild(el.firstChild); } el.appendChild(wrap); } el.classList.add('bx-split'); } var io = 'IntersectionObserver' in window ? new IntersectionObserver(function (entries) { entries.forEach(function (en) { if (en.isIntersecting) { en.target.classList.add('bx-in'); io.unobserve(en.target); } }); }, { threshold: 0.12, rootMargin: '0px 0px -6% 0px' }) : null; function watch(el) { if (io) { io.observe(el); } else { el.classList.add('bx-in'); } } function isVisual(el) { var cs = getComputedStyle(el); return cs.display !== 'none' && cs.visibility !== 'hidden' && el.offsetWidth > 0 && !/visually-hidden|screen-reader|bnc-sr-h1/.test(el.className); } if (!reduce) { root.querySelectorAll('h1, h2').forEach(function (h) { if (h.closest(EXCLUDE) || (hero && hero.contains(h)) || !isVisual(h)) { return; } splitWords(h); watch(h); }); var groups = new Map(); root.querySelectorAll('p, blockquote, .bse-actions, .menu-item, .wine-item, li, .bse-card, figcaption').forEach(function (el) { if (el.closest(EXCLUDE) || (hero && hero.contains(el)) || el.closest('.bx-up') || !isVisual(el)) { return; } var sec = el.closest('section') || root; var n = groups.get(sec) || 0; groups.set(sec, n + 1); el.classList.add('bx-up'); el.style.transitionDelay = Math.min((n % 6) * 90, 450) + 'ms'; watch(el); }); root.querySelectorAll('img').forEach(function (img) { if (img.closest(EXCLUDE) || (hero && hero.contains(img)) || /allergen-icon|bse-hero__|logo/.test(img.className)) { return; } var r = img.getBoundingClientRect(); if (r.width < 160 || r.height < 120) { return; } img.classList.add('bx-img'); watch(img); }); } var heroItems = hero ? hero.querySelectorAll('.bse-hero__content > *') : []; if (!reduce) { heroItems.forEach(function (el, i) { el.classList.add('bx-up'); el.style.transitionDelay = (i * 140) + 'ms'; }); } var heroStarted = false; function startHero() { if (heroStarted) { return; } heroStarted = true; heroItems.forEach(function (el) { el.classList.add('bx-in'); }); } var track = null; if (hero && hero.parentNode) { var mq = document.createElement('div'); mq.className = 'bx-marquee'; mq.setAttribute, 'true'); track = document.createElement('div'); track.className = 'bx-marquee__track'; for (var k = 0; k < 4; k++) { T.marquee.forEach(function (txt) { var s = document.createElement('span'); s.textContent = txt; track.appendChild(s); }); } mq.appendChild(track); hero.parentNode.insertBefore(mq, hero.nextSibling); } if (!reduce) { root.querySelectorAll('strong, span, b, div, p').forEach(function (el) { if (el.children.length || !/^\d{1,4}$/.test(el.textContent.trim()) || el.closest(EXCLUDE)) { return; } if (parseFloat(getComputedStyle(el).fontSize) < 28) { return; } var end = parseInt(el.textContent, 10); var cio = new IntersectionObserver(function (en) { if (!en[0].isIntersecting) { return; } cio.disconnect(); var t0 = performance.now(); (function step(t) { var p = Math.min((t - t0) / 1600, 1); el.textContent = Math.round(end * (1 - Math.pow(1 - p, 3))); if (p < 1) { requestAnimationFrame(step); } })(t0); }); cio.observe(el); }); } var cur = null, dot = null, ring = null; var mx = -100, my = -100, rx = -100, ry = -100; if (fine && !reduce) { cur = document.createElement('div'); cur.className = 'bx-cursor is-hidden'; cur.innerHTML = '
'; document.body.appendChild(cur); dot = cur.lastCld; ring = cur.firstChild; doc.classList.add('bx-cur'); document.addEventListener('mousemove', function (e) { mx = e.clientX; m= e.clientY; cur.classList.remove('is-hidden'); var t = e.targ cur.classList.toggle('is-link', !!(t.closest && t.closest('a, button, [role=button], .bse-btn, label, summary'))); }, { passive: true }); document.addEventListener('mouseleave', function () { cur.classList.add('is-hidden'); }); document.querySelecll('iframe').forEach(function (f) { f.addEventListener('mouseenter', function () { cur.classList.add('is-hidden'); }); }); document.querySelectorAll; b.addEventListener('mousemove', function (e) { var r = b.getBoundingClientRect(); var dx = e.clientX - (r.left + r.width / 2), dy = e.clientY - (r.top + r.height / 2); b.style.transfo 'translate(' + (dx * 0.2) + 'px,' + (dy * 0.2) + 'px)'; }); b.addEventListener('mouseleave', function () { b.style.transform = ''; }); }); } var progress = document.querySelector('.bx-progress'); var heroVideo = hero ? heroerySelector('.bse-hero__video, .bse-hero__poster') : null; var heroContent = hero ? hero.querySelector('.bse-hero__content') : null; var lastY = scrollY, vel = nimations ? track.getAnimations()[0] : null; function loop() { if (cur) { rx += (mx - rx) * 0.16; ry += (my - ry) * 0.16; dot.style.transform = 'translate3d(' + mx + 'px,' + my + 'px,0) transl(-50%50%)'; ring.style.transform = 'translate3d(' + rx + 'px,' + ry + 'px,0) trante(-50-50%)'; } var y = scrollY; vel += ((y - lastY) - vel) * 0.1; lastY = y; if (progress) { var max = document.documentElement.scrollHeight - innerHeight; progress.style.transform = 'scaleX(' + (max > 0 ? y / max : 0) + ')'; } if (!reduce && hero &&roVideo.style.transform = 'translate3d(0,' + (y * 0.28) + 'px,0) scale(' + (1.0 + y * 0.12) + ')'; } if (heroContent && heroStarted) { heroContent.style.transform = 'translate3d(0,' + (y * 0.14) + 'px,0)'; heroContent.style.city = Math.max(1 - y / (innerHeight * 0.75), 0); } } if (anim && !reduce) { anim.playbackRate = 1 + Math.min(Math.abs(vel) * 0.12, 5); } requestAnimationFrame(loop); } }); var typed = ''; document.addEventListener('keydown', function (e) { if (/input|textarea|select/i.test((e.target.tagName || ''))) { return; } typed = (typed + (e.key || '')).slice(-6).toLowerCase(); if (typed === 'bianco') { egg(); } }); try { console.log('%cBIANCO · SEA EMOTION', 'font:60 140px Georgia,serif;letter-spacing:6px;color:#b39); console.log('%c' + T.hint + ' → escribe / type "bianco" ✦', 'font:12px Arial;color:#888'); } catch (err) {} if (intro) { var go = function () { setTimeout(endIntro, 450); }; if (document.readyState === 'complete') { go(); } else { window.addEventListener('load', go); setTimeout(endIntro, 1600); } } else { setTimeout(startHero, doc.classList.contains('bx-arrive') ? 450 : 100); } })();