/*
 * Lin i Dot · versió 2: fidel a la web original de linidot.com (The7 + WPBakery, 2019), amb els
 * personatges en moviment. Mides i colors mesurats a l'original el 22-10-2026 (PLA.md §6):
 * - Love Ya Like A Sister a tot arreu, cos 22/27 px; títols de secció 68 px.
 * - Barra vertical gris (#404040) de 52 px a l'esquerra i el menú en un plafó de paper.
 * - Text en caixes blanques al 70 % amb radi de 15 px; a la guia, caixes de colors al 55 %.
 * - El taronja d'en Lin (#e95b17) als detalls: el filet del preu, el focus.
 * La versió 1 («àlbum de collage») és a l'etiqueta git v1-collage.
 */
:root {
    --ink: #000;
    --head: #111;
    --grey: #404040;
    --shop-bg: #f7f7f7;
    --lin: #e95b17;
    --dot: #f9b727;
    --box: rgb(255 255 255 / .7);
    --teal: rgb(23 143 150 / .55);
    --orange: rgb(233 91 23 / .55);
    --olive: rgb(180 189 0 / .55);
    --red: rgb(226 86 86 / .55);
    --hand: "Love Ya Like A Sister", "Comic Sans MS", cursive;
    --bar: 52px;
    --top: 70px;
    --wrap: 1175px;
    --side: clamp(16px, 4vw, 60px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; background: #fff; color: var(--ink);
    font: 400 clamp(19px, 1.55vw, 22px)/1.25 var(--hand);
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .15em; }
a:hover { color: var(--lin); }
:focus-visible { outline: 3px solid var(--lin); outline-offset: 3px; }
h1, h2, h3, h4 { font-weight: 400; color: var(--head); margin: 0; }
p { margin: 0 0 .7em; }
ul, ol { margin: 0 0 .8em; padding-left: 1.2em; }
li { margin-bottom: .2em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--grey); color: #fff; padding: 10px 16px; }
.skip:focus { top: 8px; }
.logo { display: block; width: 100%; height: auto; }

.notice { margin: 0; padding: 10px var(--side); background: var(--dot); text-align: center; position: relative; z-index: 60; }

/* ---------- La barra vertical, la del mòbil i el plafó del menú ---------- */

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--bar);
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    background: var(--grey); padding: 8px 0 18px;
}
.burger { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.burger-lines, .burger-lines::before, .burger-lines::after { display: block; width: 24px; height: 3px; background: #fff; border-radius: 1px; content: ""; }
.burger-lines { position: relative; }
.burger-lines::before { position: absolute; top: -7px; }
.burger-lines::after { position: absolute; top: 7px; }
.sidebar-title { display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
/* El títol vertical de l'original: el logo de costat i la frase en blanc. */
.sidebar-tag { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; line-height: 1; white-space: nowrap; }
.sidebar-logo { display: block; width: 120px; transform: rotate(-90deg); margin: 46px 0; }
.sidebar .logo [style*="fill:#404040"] { fill: #fff !important; }
.sidebar .logo [style*="stroke:#404040"] { stroke: #fff !important; }

.topbar { display: none; }

.panel {
    position: fixed; top: 0; bottom: 0; left: var(--bar); z-index: 70;
    width: min(450px, 88vw); overflow-y: auto; padding: 70px 40px 40px;
    background: #fff url("../img/original/paper-menu.webp") center / cover;
    box-shadow: 0 0 30px rgb(0 0 0 / .25);
    transform: translateX(calc(-100% - var(--bar) - 40px)); visibility: hidden;
    transition: transform .35s ease, visibility 0s linear .35s;
}
.panel.is-open { transform: none; visibility: visible; transition: transform .35s ease; }
.panel-backdrop { position: fixed; inset: 0; z-index: 65; background: rgb(0 0 0 / .25); }
.panel-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; background: transparent; font: 34px/1 var(--hand); cursor: pointer; color: var(--grey); }
.panel-logo { display: block; width: 260px; margin-bottom: 8px; }
.panel-tag { font-size: 18px; margin-bottom: 36px; }
.panel-menu { list-style: none; padding: 0; margin: 0 0 30px; }
.panel-menu a { display: flex; align-items: center; min-height: 48px; font-size: 26px; text-decoration: none; color: var(--ink); }
.panel-menu a:hover, .panel-menu a.is-active { color: var(--lin); }
.panel-menu a.is-shop { margin-top: 10px; font-size: 24px; }
.panel-audio { display: inline-flex; min-height: 44px; align-items: center; font-size: 18px; }

.page-wrap { margin-left: var(--bar); }

/* ---------- L'obertura (l'Slider Revolution de l'original) ---------- */

.hero {
    position: relative; overflow: hidden; height: 100vh; height: 100svh; min-height: 560px;
    /* La «Constel·lació de paper» de l'Alex (27-10-2026): estrelles i trajectòries cosides als marges, el mig net.
       En vertical (mòbil, tauleta dreta), la seva versió alta. */
    background: #fffaf0 url("../img/fons/fons-header-02.svg") center / cover no-repeat;
}
@media (max-width: 760px), (orientation: portrait) {
    .hero { background-image: url("../img/fons/fons-header-02-mobil.svg"); }
}
.hero-center {
    position: absolute; left: 50%; top: 50%; z-index: 2; width: min(620px, 46vw); transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-logo .logo { width: 100%; }
.hero-slogan { margin: clamp(18px, 4vh, 44px) auto 0; font-size: clamp(26px, 3vw, 44px); line-height: 1.15; color: var(--ink); }
/* En Lin i la Dot, en moviment, als dos costats de baix, tallats per la vora com al dibuix. */
.hero .hero-kid { position: absolute; bottom: 0; z-index: 1; width: auto; }
.hero-kid img, img.hero-kid { height: min(66vh, 620px); width: auto; max-width: none; }
.hero-kid-lin { left: -2vw; }
.hero-kid-dot { right: -2vw; }
.hero-kid .anim-toggle { bottom: 14px; }
.hero-kid-lin .anim-toggle { right: auto; left: calc(2vw + 14px); }
.hero-kid-dot .anim-toggle { left: auto; right: calc(2vw + 14px); }

/* L'entrada: com al vídeo de l'original, primer la Dot i després en Lin; el logo, el lema i l'adhesiu darrere. */
.hero-kid-dot { animation: rise 1.1s cubic-bezier(.2, .8, .3, 1) .3s both; }
.hero-kid-lin { animation: rise 1.1s cubic-bezier(.2, .8, .3, 1) 1.1s both; }
.hero-logo { animation: pop .8s cubic-bezier(.2, .9, .3, 1.2) .1s both; }
.hero-slogan { animation: fade 1s ease 1.9s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14%); } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
@keyframes fade { from { opacity: 0; } }

/* L'adhesiu de compra de l'original: apareix per parts (2,7 s, 3,2 s, 3,6 s) i el carro, en passar-hi per sobre. */
.sticker { position: relative; display: block; width: clamp(120px, 11vw, 170px); aspect-ratio: 1; margin-top: clamp(14px, 3vh, 30px); }
.sticker img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sticker-box { animation: pop .5s cubic-bezier(.2, .9, .3, 1.3) 2.7s both; border-radius: 50%; }
.sticker-text-vareta { animation: fade .5s ease 3.2s both; }
.sticker-text-ja { animation: pop .5s cubic-bezier(.2, .9, .3, 1.3) 3.6s both; }
.sticker-cart { opacity: 0; transform: scale(.55); transition: opacity .2s, transform .2s; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .4)); }
.sticker::after { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: rgb(64 64 64 / 0); transition: background .2s; }
.sticker:hover .sticker-cart, .sticker:focus-visible .sticker-cart { opacity: 1; z-index: 1; }
.sticker:hover::after, .sticker:focus-visible::after { background: rgb(64 64 64 / .45); }
.sticker:focus-visible { outline-offset: 6px; border-radius: 50%; }

.music { position: absolute; left: 24px; top: 24px; z-index: 4; width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--grey); background: rgb(255 255 255 / .85); color: var(--grey); font: 28px/1 var(--hand); cursor: pointer; }
.music[aria-pressed="true"] { background: var(--grey); color: #fff; }

/* La vareta com a cursor dins l'obertura, amb l'estela de purpurina (site.js). Només amb ratolí. */
.hero.has-wand { cursor: url("../img/vareta-cursor.png") 6 6, auto; }
.hero.has-wand a, .hero.has-wand button { cursor: pointer; }
.glitter { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Les animacions sense fons (partials/anim) ---------- */

.anim { position: relative; }
.anim img { display: block; }
.anim-toggle {
    position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%;
    border: 2px solid var(--grey); background: rgb(255 255 255 / .85); color: var(--grey);
    font: 700 13px/1 system-ui, sans-serif; cursor: pointer; opacity: .45; transition: opacity .2s;
}
.anim:hover .anim-toggle, .anim-toggle:focus-visible, .anim-toggle[aria-pressed="true"] { opacity: 1; }
.anim-toggle .anim-toggle-play, .anim-toggle[aria-pressed="true"] .anim-toggle-pause { display: none; }
.anim-toggle[aria-pressed="true"] .anim-toggle-play { display: inline; }

/* ---------- Les caixes ---------- */

.box { border-radius: 15px; padding: 20px 20px 14px 30px; }
.box-white { background: var(--box); }
.box-color { color: var(--head); }
.box h3 { font-size: clamp(30px, 3vw, 40px); line-height: 1.05; margin-bottom: .45em; }
.box > :last-child { margin-bottom: 0; }
.c-teal { background: var(--teal); }
.c-orange { background: var(--orange); }
.c-olive { background: var(--olive); }
.c-red { background: var(--red); }
.title-xl { font-size: clamp(46px, 5vw, 68px); line-height: 1.1; }

/* ---------- La botiga (la fitxa del WooCommerce) ---------- */

.shop { background: var(--shop-bg); padding: clamp(40px, 6vw, 70px) var(--side); }
.shop-inner { display: grid; grid-template-columns: minmax(0, 584px) minmax(0, 400px); gap: clamp(30px, 5vw, 60px); justify-content: center; align-items: start; max-width: var(--wrap); margin: 0 auto; }
.shop-main { margin: 0; }
.shop-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 92px)); gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.shop-thumbs li { margin: 0; }
.shop-thumbs button { display: block; width: 100%; aspect-ratio: 1; padding: 4px; border: 2px solid transparent; background: #fff; cursor: pointer; }
.shop-thumbs button[aria-pressed="true"] { border-color: var(--grey); }
.shop-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.shop-title { font-size: 32px; line-height: 34px; margin-bottom: 26px; }
.shop-price { font-size: 25px; margin-bottom: 22px; }
.shop-price::after { content: ""; display: block; width: 60px; height: 3px; margin-top: 12px; background: var(--lin); }
.shop-excerpt, .shop-desc, .shop-age { font-size: 22px; }
.shop-box { font-size: 15px; line-height: 1.7; }
.shop-closed { margin-top: 20px; padding: 16px; border: 2px dashed var(--grey); border-radius: 10px; }

.buy { margin-top: 24px; font-size: 18px; }
.buy-delivery { border: 0; padding: 0; margin: 0 0 14px; }
.buy-delivery legend { font-size: 22px; margin-bottom: 6px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; line-height: 1.3; }
.choice input, .check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--lin); flex: none; }
.choice small { display: block; font-size: 15px; color: #444; }
.field { margin: 12px 0; }
.field label { display: block; margin-bottom: 4px; }
.field input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #ccc; border-radius: 5px; font: 18px var(--hand); background: #fff; }
.buy #nif { text-transform: uppercase; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; font-size: 17px; }
.err { color: #b3261e; margin: 4px 0 8px; font-size: 16px; }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.qty { display: inline-flex; align-items: stretch; border: 1px solid #ccc; border-radius: 5px; background: #fff; }
.qty button { width: 36px; min-height: 44px; border: 0; background: transparent; font: 20px var(--hand); cursor: pointer; color: #666; }
.qty input { width: 46px; border: 0; border-inline: 1px solid #ccc; text-align: center; font: 18px var(--hand); -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
/* El botó de l'original: gris, radi de 5 px. */
.btn-buy { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 5px; background: var(--grey); color: #fff; font: 18px/1.1 var(--hand); cursor: pointer; }
.btn-buy:hover { background: #222; }
.btn-buy output { white-space: nowrap; }
.buy-note { margin-top: 10px; font-size: 15px; color: #444; }

/* ---------- En Lin, la Dot i la M. Helena ---------- */

.kid {
    position: relative; overflow: hidden; min-height: 100vh;
    display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); align-items: end;
    background: #f7f7f7 var(--paper, none) 0 0 repeat;
}
.kid.is-right { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
.kid.is-right .kid-art { grid-column: 2; grid-row: 1; }
.kid.is-right .kid-text { grid-column: 1; grid-row: 1; }
.kid-art { position: relative; align-self: end; }
.kid-figure, .kid-figure img { width: min(100%, 620px); }
.kid.is-right .kid-figure, .kid.is-right .kid-figure img { margin-left: auto; }
.kid-text { align-self: center; padding: clamp(40px, 7vw, 90px) var(--side) clamp(40px, 7vw, 90px) 0; display: flex; flex-direction: column; }
.kid.is-right .kid-text { padding: clamp(40px, 7vw, 90px) 0 clamp(40px, 7vw, 90px) var(--side); }
.kid-name { width: min(382px, 70%); margin: 0 0 30px auto; }
.kid.is-right .kid-name { margin: 0 auto 30px 0; }
.kid-text .box { max-width: 840px; }
/* La M. Helena: el nom a sobre del dibuix i el paper clar de fons. */
.kid-mhelena { align-items: center; }
.kid-mhelena .kid-art { display: flex; flex-direction: column; align-items: center; padding: 60px 20px 0; }
.kid-mhelena .kid-name { margin: 0 0 20px; width: min(344px, 80%); }
.kid-mhelena .kid-figure, .kid-mhelena .kid-figure img { width: min(100%, 380px); }

/* ---------- La guia didàctica ---------- */

.guide { background: #f2b53f var(--paper, none) center / cover; padding: clamp(40px, 6vw, 60px) var(--side) clamp(50px, 7vw, 90px); }
.guide-inner { max-width: var(--wrap); margin: 0 auto; }
.guide-by { font-size: 26px; margin-top: 4px; }
.guide-download { display: flex; justify-content: center; margin: 24px 0 10px; }
.guide-download img { width: 250px; transition: transform .15s; }
.guide-download a:hover img { transform: translateY(-2px); }
.guide-row { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 30px; align-items: center; margin: 24px 0; }
.guide-row.is-right { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
.guide-row.is-right .guide-art { grid-column: 2; grid-row: 1; }
.guide-row.is-right .box { grid-column: 1; grid-row: 1; }
.guide-art { display: flex; justify-content: center; }
.guide-art img, .guide-art .anim { max-width: 340px; }
.guide-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 150px); }
.guide-intro .box h3 { font-size: clamp(34px, 3.6vw, 49px); }
.guide-art-small { width: 120px; justify-self: center; }

/* ---------- Pinta'ns ---------- */

.draw { background: #fff; padding: clamp(40px, 6vw, 60px) var(--side) clamp(50px, 7vw, 90px); }
.draw-inner { max-width: var(--wrap); margin: 0 auto; }
.draw-intro { max-width: 640px; margin: 20px auto 40px; text-align: center; font-size: 20px; }
/* Els dibuixos en graella (29-10-2026): tres per fila, dos a la tauleta i al mòbil. Tots són A4 apaïsats. */
.sheets { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(30px, 4vw, 48px) clamp(14px, 3vw, 40px); }
.sheet-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sheet { display: block; width: 100%; text-decoration: none; color: var(--ink); }
.sheet img { display: block; width: 100%; height: auto; aspect-ratio: 1491 / 1055; object-fit: contain; background: #fff; box-shadow: 0 10px 14px -8px rgb(0 0 0 / .4); transition: transform .2s; }
.sheet:hover img { transform: translateY(-4px); }
.sheet-label { margin: 14px 0 0; font-size: 20px; line-height: 1.2; }
@media (max-width: 900px) { .sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- El peu gris ---------- */

.foot { background: var(--grey); color: #fff; text-align: center; padding: 50px var(--side) 30px; font-size: 18px; }
.foot a { color: #fff; }
.foot a:hover { color: var(--dot); }
.foot-social { display: flex; justify-content: center; gap: 22px; list-style: none; padding: 0; margin: 0 0 18px; }
.foot-social a { display: grid; place-items: center; width: 48px; height: 48px; }
.foot-social img { width: 34px; height: auto; }
.foot-mail a { display: inline-flex; min-height: 44px; align-items: center; font-size: 22px; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 22px; list-style: none; padding: 0; margin: 6px 0 14px; }
.foot-legal a { display: inline-flex; min-height: 44px; align-items: center; }
.motion-toggle { min-height: 44px; padding: 0 14px; border: 1px solid rgb(255 255 255 / .5); border-radius: 5px; background: transparent; color: #fff; font: 16px var(--hand); cursor: pointer; }
.motion-toggle:hover { border-color: var(--dot); color: var(--dot); }

/* El peu nou de l'Alex (29-10-2026): el mateix llenguatge que l'obertura, de nit. El gris dels dibuixos amb els
   topos fluixos, la «Constel·lació de paper» (estrelles de paper i trajectòries cosides) i en Lin i la Dot tallats
   per la vora de baix: en Lin mira les estrelles i hi assenyala, la Dot s'estira per agafar-ne una. Els vídeos
   (eines/prepara-peu.sh) no tenen transparència: són sobre el mateix gris i es fonen amb una màscara suau per dalt
   i pel costat de dins. Si canvia --grey, s'han de refer. Tot el que es mou s'atura amb .no-motion. */
.foot-v2 { position: relative; overflow: hidden; isolation: isolate; padding: clamp(56px, 6vw, 84px) var(--side) clamp(150px, 15vw, 205px); }
/* Els topos del paper, per sobre de tot (també dels vídeos), perquè el fons es vegi continu. */
.foot-v2::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(circle at 2px 2px, rgb(255 255 255 / .06) 2px, transparent 2.5px) 0 0 / 28px 28px; }
.foot-sky { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.foot-trail { fill: none; stroke: #fff; stroke-opacity: .3; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 7 10; }
.foot-stars .fs { filter: drop-shadow(0 3px 0 rgb(0 0 0 / .18)); }
.foot-v2 .foot-kid { position: absolute; bottom: 0; z-index: 1; width: auto; transform: translateY(26%); }
.foot-video { display: block; height: clamp(300px, 34vw, 470px); width: auto; max-width: none; background: transparent;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%); }
.foot-kid-lin { left: -1vw; -webkit-mask-image: linear-gradient(to right, #000 80%, transparent 100%); mask-image: linear-gradient(to right, #000 80%, transparent 100%); }
.foot-kid-dot { right: -1vw; -webkit-mask-image: linear-gradient(to left, #000 80%, transparent 100%); mask-image: linear-gradient(to left, #000 80%, transparent 100%); }
.foot-inner { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
/* «M. Helena Tolosa amb Setdedisseny». Els logos ja són blancs (amb el filet verd de SE7DEDISSENY). */
.foot-by { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 26px; margin: 0 0 34px; }
.foot-by a { display: inline-flex; }
.foot-by img { width: auto; }
.foot-logo-mh { height: clamp(64px, 7vw, 86px); }
.foot-logo-se7 { height: clamp(36px, 4vw, 48px); }
.foot-amb { font: 28px/1 var(--hand); color: var(--dot); transform: rotate(-6deg); }
.foot-v2 .foot-social { margin-bottom: 14px; }
@keyframes foot-march { to { stroke-dashoffset: -34; } }
@keyframes foot-star { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes foot-zip { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 64% { opacity: 1; } 74%, 100% { offset-distance: 100%; opacity: 0; } }
@keyframes foot-peek { from { transform: translateY(100%); } 60% { transform: translateY(16%); } to { transform: translateY(26%); } }
.foot-v2 .fs { transform-box: fill-box; transform-origin: center; animation: foot-star 3.8s ease-in-out var(--d, 0s) infinite; }
.foot-v2 .foot-trail { animation: foot-march 5s linear infinite; }
.foot-v2 .foot-trail-b { animation-direction: reverse; }
/* La «zip-zap»: una estrella que cau pel camí cosit de la dreta, cap a la mà de la Dot. */
.foot-shoot { offset-path: path("M930 84 C 1160 100, 1310 190, 1430 400"); offset-rotate: 0deg; animation: foot-zip 9s ease-in-out 1.5s infinite; opacity: 0; filter: drop-shadow(0 0 8px rgb(249 183 39 / .9)); }
/* En Lin i la Dot surten de baix quan el peu arriba a la pantalla (site.js posa .is-in). */
.foot-v2.is-in .foot-kid { animation: foot-peek .9s cubic-bezier(.2, .8, .3, 1) both; }
.foot-v2.is-in .foot-kid-dot { animation-delay: .25s; }
.no-motion .foot-v2 .fs, .no-motion .foot-v2 .foot-trail, .no-motion .foot-v2 .foot-kid { animation: none !important; }
.no-motion .foot-shoot { display: none; }
/* Al mòbil, un cel propi (més estret), els logos un sobre l'altre i en Lin i la Dot als dos costats de baix. */
.foot-sky-m { display: none; }
@media (max-width: 760px) {
    .foot-v2 { padding-bottom: 150px; }
    .foot-video { height: 250px; }
    .foot-kid-lin { left: -6vw; }
    .foot-kid-dot { right: -6vw; }
    .foot-sky:not(.foot-sky-m) { display: none; }
    .foot-sky-m { display: block; }
    .foot-by { flex-direction: column; gap: 4px; }
    .foot-amb { font-size: 26px; }
    .foot-logo-mh { height: 72px; }
}

/* ---------- Pàgines a part, comanda, simulador, 404 i la porta del banc ---------- */

.page { padding: clamp(40px, 6vw, 70px) var(--side); background: var(--shop-bg); }
.page .cutout { max-width: 860px; margin: 0 auto; background: #fff; border-radius: 15px; padding: clamp(22px, 4vw, 44px); }
.page h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.05; margin-bottom: .5em; }
.prose { overflow-wrap: anywhere; }
.prose h3 { font-size: 28px; margin: 1em 0 .4em; }
.kicker { font-size: 16px; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .3em; color: #555; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 5px; background: var(--grey); color: #fff; font: 18px var(--hand); text-decoration: none; cursor: pointer; }
.btn:hover { background: #222; color: #fff; }
.order-sum { margin: 26px 0 0; padding-top: 14px; border-top: 1px solid #ddd; }
.order-sum div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.order-sum dd { margin: 0; white-space: nowrap; }
.order-total { font-size: 26px; border-top: 1px solid #ddd; margin-top: 6px; padding-top: 10px !important; }
.order-invoice { margin: 14px 0 0; text-align: right; }
.order-invoice a { display: inline-block; min-height: 44px; padding: 10px 0; }
.order-invoice .nowrap { white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.soon { min-height: 70vh; display: grid; place-content: center; text-align: center; padding: 16px; }
.soon h1 { font-size: clamp(44px, 8vw, 90px); }
.soon-note { font-size: 18px; letter-spacing: .1em; }
.gate-body { min-height: 100vh; display: grid; place-content: center; padding: 16px; background: var(--shop-bg); }
.gate-card { width: min(420px, 100%); background: #fff; border-radius: 15px; padding: 24px; }
.gate-head { display: flex; justify-content: space-between; font-size: 13px; text-transform: uppercase; margin-bottom: 16px; }
.gate-card h1 { font-size: 46px; margin: 0 0 8px; }
.field.has-error input { border-color: #b3261e; }

/* La pàgina de pagament: el formulari i la casella de Stripe a l'esquerra, el resum a la dreta (a dalt, al mòbil). */
.page .cutout.pay { max-width: 1060px; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px clamp(24px, 4vw, 48px); align-items: start; }
.pay-form { margin-top: 0; grid-column: 1; grid-row: 1; }
.pay-sum { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
.pay-sum-img { width: 100%; max-width: 240px; aspect-ratio: 1; object-fit: cover; border-radius: 5px; margin-bottom: 4px; }
.pay-sum .order-sum { margin-top: 10px; }
.pay-sum-nif { margin-top: 12px; font-size: 16px; color: #444; }
.pay-block { border: 0; border-top: 1px solid #ddd; margin: 0 0 6px; padding: 14px 0 4px; min-width: 0; }
.pay-block:first-child { border-top: 0; padding-top: 0; }
.pay-block legend { float: left; width: 100%; font-size: 24px; margin-bottom: 4px; }
.pay-block legend + * { clear: both; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pay-row-cp { grid-template-columns: 9em 1fr; }
.pay-row-contact { align-items: end; }
.field small { font-size: 15px; color: #444; }
.pay-form .field label small { display: block; }
.pay-province { display: block; min-height: 1.3em; margin-top: 2px; }
.pay-other { margin-top: 6px; }
.pay-element { min-height: 60px; margin-top: 8px; }
.pay-loading { margin: 0; font-size: 16px; color: #444; }
.pay-note { margin-top: 10px; font-size: 15px; color: #444; }
.pay-error { padding: 10px 12px; border-left: 3px solid #b3261e; background: #fdf3f2; }
.pay-error:focus { outline: none; }
.pay-submit { width: 100%; margin-top: 12px; font-size: 22px; min-height: 54px; }
.pay-submit:disabled { opacity: .55; cursor: not-allowed; }
.pay-submit.is-busy { cursor: progress; }
.pay-submit output { white-space: nowrap; }
.pay-back { margin-top: 12px; font-size: 16px; color: #444; }
@media (max-width: 900px) {
    .pay-grid { grid-template-columns: minmax(0, 1fr); }
    .pay-sum { grid-column: 1; grid-row: auto; position: static; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0 16px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid #ddd; }
    .pay-sum-img { grid-row: span 2; }
    .pay-sum-noimg { grid-template-columns: minmax(0, 1fr); }
    .pay-sum .order-sum { margin-top: 0; padding-top: 0; border-top: 0; font-size: 17px; }
    .pay-sum .order-total { font-size: 21px; }
    .pay-sum-nif { grid-column: 1 / -1; margin-bottom: 0; }
    .pay-form { grid-row: auto; }
}
@media (max-width: 520px) {
    .pay-row, .pay-row-cp { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Tauleta i mòbil ---------- */

@media (max-width: 1024px) {
    .sidebar { display: none; }
    .page-wrap { margin-left: 0; }
    .topbar {
        position: sticky; top: 0; z-index: 50; height: var(--top);
        display: flex; align-items: center; justify-content: space-between; gap: 16px;
        padding: 0 10px 0 16px; background: var(--grey);
    }
    .topbar-logo { width: 150px; }
    .topbar .logo [style*="fill:#404040"] { fill: #fff !important; }
    .topbar .logo [style*="stroke:#404040"] { stroke: #fff !important; }
    .panel { left: 0; transform: translateX(-110%); }
    .hero { height: calc(100svh - var(--top)); }
}

@media (max-width: 900px) {
    .shop-inner { grid-template-columns: minmax(0, 1fr); }
    .kid, .kid.is-right { grid-template-columns: 1fr; min-height: 0; }
    .kid-art, .kid-text, .kid.is-right .kid-art, .kid.is-right .kid-text { grid-column: 1; grid-row: auto; }
    .kid-text, .kid.is-right .kid-text { order: -1; padding: 40px var(--side) 20px; }
    .kid-figure, .kid-figure img { width: min(100%, 520px); }
    .kid-mhelena .kid-figure, .kid-mhelena .kid-figure img { width: min(86%, 380px); }
    /* La M. Helena, com a l'original del mòbil: primer el nom i el dibuix, després el text. */
    .kid-mhelena .kid-text { order: 0; padding-top: 10px; }
    .kid-name, .kid.is-right .kid-name { margin: 0 auto 24px; width: min(300px, 70%); }
    .guide-row, .guide-row.is-right, .guide-intro { grid-template-columns: 1fr; gap: 14px; }
    .guide-row .guide-art, .guide-row.is-right .guide-art, .guide-row.is-right .box { grid-column: 1; grid-row: auto; }
    .guide-art img, .guide-art .anim { max-width: 200px; }
    .guide-art-small { display: none; }
}

@media (max-width: 640px) {
    .hero-center { top: 34%; width: 88vw; }
    .hero-kid img, img.hero-kid { height: 40vh; }
    .hero-kid-lin { left: -8vw; }
    .hero-kid-dot { right: -8vw; }
    .hero-kid-lin .anim-toggle { left: calc(8vw + 10px); }
    .hero-kid-dot .anim-toggle { right: calc(8vw + 10px); }
    .sticker { width: 104px; }
    .hero-slogan { font-size: 24px; }
    .music { left: 12px; top: 12px; width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
.no-motion .hero-kid, .no-motion .hero-logo, .no-motion .hero-slogan, .no-motion .sticker img { animation: none !important; }

/* ---------- Els jocs (jocs.js) ---------- */

/* Els personatges parlen: el dibuix és un botó i la frase surt en una bafarada. */
.anim-talk { display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.anim-talk:focus-visible { outline: 3px solid var(--grey); outline-offset: 4px; }
.bubble {
    position: absolute; z-index: 3; top: 4%; left: 50%; max-width: min(260px, 70vw);
    padding: 12px 16px; border: 3px solid var(--grey); border-radius: 24px 24px 24px 6px; background: #fff;
    font: 20px/1.2 var(--hand); color: var(--ink);
    opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.bubble.is-on { opacity: 1; transform: none; }
.kid.is-right .bubble, .hero-kid-dot .bubble { left: auto; right: 50%; border-radius: 24px 24px 6px 24px; }
@keyframes kid-jump { 0%, 100% { transform: none; } 35% { transform: translateY(-16px); } 60% { transform: none; } 78% { transform: translateY(-5px); } }
.anim.is-jumping .anim-talk img { animation: kid-jump .6s ease-out; }

/* «Com estàs avui?» i la vareta de respirar, dins la guia. */
.guide-play { display: grid; gap: 30px; margin: 30px 0; }
.feel-faces { list-style: none; margin: 18px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 18px; }
.feel-face { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 88px; padding: 6px; border: 0; background: none; font: 20px var(--hand); color: var(--ink); cursor: pointer; }
.feel-face .cara { width: 76px; height: 76px; transition: transform .2s; }
.feel-face:hover .cara { transform: rotate(-6deg) scale(1.06); }
.feel-face[aria-pressed="true"] .cara { transform: scale(1.14); }
.feel-face[aria-pressed="true"] span { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.feel-face:focus-visible { outline: 3px solid var(--grey); outline-offset: 2px; }
.feel-answer { margin: 10px 0 0; }
.feel.is-ready .feel-answer, .feel.is-ready .feel-next { display: none; }
.feel.is-ready .is-shown { display: block; }
.feel-next { margin-top: 10px; font-size: 20px; }

.breathe { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 30px; align-items: center; }
.breathe-steps { margin: 14px 0 18px; padding-left: 1.4em; }
.breathe-steps li { margin: 6px 0; }
.breathe-stage { display: grid; place-items: center; }
.breathe-wand { width: 110px; height: 440px; cursor: pointer; transform: rotate(-12deg); }

/* La cambra fosca de la vareta: tot fosc i la vareta gran al mig. */
.room { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #07080f; color: #fff; overflow: hidden; }
.room::backdrop { background: #000; }
.room[open] { animation: room-in .5s ease-out; }
@keyframes room-in { from { opacity: 0; } to { opacity: 1; } }
.room-canvas { position: absolute; inset: 0; touch-action: none; }
.room-steps { position: absolute; top: clamp(14px, 3vh, 28px); left: 0; right: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0 70px; list-style: none; font: clamp(18px, 2.2vw, 26px) var(--hand); color: rgb(255 255 255 / .45); text-transform: uppercase; letter-spacing: .04em; pointer-events: none; }
.room-steps li.is-now { color: var(--dot); }
.room-close { position: absolute; top: 12px; right: 12px; min-width: 44px; min-height: 44px; padding: 6px 14px; border: 2px solid rgb(255 255 255 / .6); background: rgb(0 0 0 / .3); color: #fff; font: 18px var(--hand); cursor: pointer; }
.room-close:hover, .room-close:focus-visible { border-color: #fff; }
.room-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 16px max(14px, env(safe-area-inset-bottom)); text-align: center; pointer-events: none; }
.room-bottom button { pointer-events: auto; }
.room-say { margin: 0 0 6px; font: clamp(22px, 2.6vw, 30px)/1.2 var(--hand); text-shadow: 0 1px 6px #000; }
.room-count { display: flex; justify-content: center; align-items: baseline; gap: 18px; margin: 0; font: 22px/1.2 var(--hand); color: rgb(255 255 255 / .4); }
.room-count span { display: inline-block; min-width: 1ch; transition: transform .25s, color .25s; }
.room-count span.is-now { color: var(--dot); transform: scale(1.7); }
/* Mentre s'aguanta l'aire (ple o buit), el compte va del color del cercle. */
.room-count[data-phase="full"] span.is-now, .room-count[data-phase="empty"] span.is-now { color: #8ce6e1; }
.room-breaths { display: flex; justify-content: center; gap: 12px; margin: 8px 0 0; font-size: 26px; color: rgb(255 255 255 / .22); }
.room-breaths span { transition: color .4s, transform .4s; }
.room-breaths span.is-on { color: var(--dot); transform: scale(1.25); text-shadow: 0 0 12px rgb(249 183 39 / .8); }
.room-end[hidden], .room-count[hidden] { display: none; }
.room-end { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 10px 0 0; }
.room-end .btn { background: var(--dot); color: #222; }
.room-end .room-out { background: transparent; color: #fff; border: 2px solid rgb(255 255 255 / .6); }
.room-hint { margin: 8px 0 0; font-size: 14px; color: rgb(255 255 255 / .45); }

/* «Pinta'l aquí». */
/* Els botons, a baix de tot de la targeta: alineats encara que un títol faci dues línies. */
.sheet-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; margin: auto 0 0; padding-top: 8px; }
.sheet-pdf { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; color: var(--ink); }
@media (max-width: 520px) {
    .sheet-label { font-size: 17px; }
    .sheet-bar { flex-direction: column; gap: 0; }
    .sheet-paint { padding: 8px 14px; font-size: 16px; }
    .sheet-pdf { font-size: 16px; }
}
.paint { width: min(1100px, 100vw); max-width: 100vw; max-height: 100dvh; padding: 16px clamp(12px, 3vw, 24px); border: 0; background: #fff; color: var(--ink); }
.paint::backdrop { background: rgb(40 40 40 / .75); }
.paint-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.paint-title { font-size: clamp(24px, 3vw, 34px); }
.paint-close { flex: none; width: 44px; height: 44px; border: 3px solid var(--grey); background: #fff; color: var(--grey); font-size: 20px; cursor: pointer; }
.paint-colours { display: flex; gap: 8px; overflow-x: auto; padding: 10px 4px; }
.paint-colours button { flex: 0 0 44px; width: 44px; height: 44px; border: 3px solid #fff; border-radius: 50%; outline: 2px solid #bbb; background: var(--c); cursor: pointer; }
.paint-colours button[aria-checked="true"] { outline: 4px solid var(--grey); }
.paint-board { position: relative; display: grid; place-items: center; min-height: 200px; }
.paint-board canvas { max-width: 100%; max-height: calc(100dvh - 250px); width: auto; height: auto; border: 1px solid #ddd; cursor: crosshair; touch-action: manipulation; }
.paint-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.paint-help { margin-top: 8px; font-size: 16px; color: #555; }
.print-sheet { display: none; }
@media print {
    body.printing > *:not(.print-sheet), body.printing .paint { display: none !important; }
    body.printing .print-sheet { display: block; }
    .print-sheet img { width: 100%; height: auto; }
}

/* Les sorpreses (una estona i un cop per visita cada una): l'ocell volant per dalt i la salamandra pel peu de la
   pantalla. jocs.js els mou (amb una mica de física: el punt és el centre de l'animal i .critter-turn el gira) i fa
   que reaccionin quan es toquen. Passen per sota de les barres. */
.critter { position: fixed; z-index: 40; left: 0; top: 0; width: 0; height: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; will-change: transform; }
.critter[hidden] { display: none; }
.critter-turn { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); }
.critter img { display: block; height: auto; max-width: none; -webkit-user-drag: none; }
.critter img[hidden] { display: none; }
.critter-salamandra img { width: 120px; }
.critter-ocell img { width: clamp(90px, 9vw, 130px); }
.critter-body { transform-origin: 50% 60%; }
.critter-body.is-scared { animation: critter-scared .6s cubic-bezier(.3, 1.6, .5, 1); }
.critter-body.is-happy { animation: critter-happy .4s ease-in-out 4 alternate; }
.critter-body.is-hop { animation: critter-hop .65s cubic-bezier(.3, 1.4, .5, 1); }
.critter-ocell .critter-body.is-hop { animation: critter-loop .9s ease-in-out; }
@keyframes critter-scared { 25% { transform: translateY(-26px) rotate(-9deg); } 45% { transform: translateY(-26px) rotate(9deg); } 65% { transform: translateY(-12px) rotate(-5deg); } }
@keyframes critter-happy { from { transform: rotate(-7deg); } to { transform: rotate(7deg) scale(1.06); } }
/* La salamandra es veu des de dalt: el salt és cap a tu, més gran i amb l'ombra lluny. */
@keyframes critter-hop { 45% { transform: scale(1.35); filter: drop-shadow(0 18px 10px rgb(0 0 0 / .25)); } }
@keyframes critter-loop { to { transform: rotate(-360deg); } }
.critter-fx { position: absolute; left: 0; top: -40px; font: 700 28px/1 var(--hand); text-shadow: 0 1px 0 #fff; pointer-events: none; opacity: 0; animation: critter-fx 1.2s ease-out both; }
@keyframes critter-fx { from { opacity: 1; transform: translate(-50%, 0) scale(.6); } to { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -80px) scale(1.25); } }

/* La festa de després de pagar. */
.party { position: relative; display: flex; justify-content: space-between; align-items: flex-end; height: clamp(140px, 22vw, 220px); margin: -10px 0 10px; }
.party-glitter { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.party-kid { width: auto; height: 100%; animation: party-pop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.party-kid-dot { animation-delay: .25s; }
@keyframes party-pop { from { transform: translateY(30px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.gift { margin: 22px 0 0; padding: 16px 18px; border: 3px dashed var(--grey); }
.gift-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 10px 0 0; }

.no-motion .anim.is-jumping .anim-talk img, .no-motion .party-kid { animation: none !important; }
.no-motion .critter { display: none; }
.no-motion .room[open], .no-motion .room-count span, .no-motion .room-breaths span { animation: none; transition: none; }

@media (max-width: 900px) {
    /* Al mòbil, la vareta just sota l'explicació i el botó a sota: es veu caure la purpurina. */
    .breathe { grid-template-columns: 1fr; gap: 12px; }
    .breathe-text { display: contents; }
    .breathe-stage { order: 1; }
    .breathe-go { order: 2; margin: 0; }
    .breathe-steps { order: 4; }
    .breathe-wand { width: 82px; height: 330px; }
    .feel-face { min-width: 72px; }
    .feel-face .cara { width: 64px; height: 64px; }
}
@media (max-width: 640px) {
    .bubble { font-size: 17px; max-width: 200px; padding: 10px 12px; }
    .paint { padding: 10px; }
    .room-steps { justify-content: flex-start; gap: 4px 10px; padding: 0 80px 0 16px; top: 20px; font-size: 14px; }
    .paint-board canvas { max-height: calc(100dvh - 280px); }
}
