/* Demo de Minairó · Assistent de veu (trucada al Taller Cal Pep, exemple) */
@font-face { font-family: "Bricolage"; src: url("/assets/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --nit: #1F2140; --nit-2: #2B2E57; --nit-3: #3A3D6B;
  --groc: #F2B705; --groc-suau: #FFF4CC;
  --molsa: #3E6B48; --verd: #25A55F; --vermell: #D2453B;
  --paper: #FAFAF6; --pedra: #EEF0EA; --linia: #E2E4DC;
  --tinta: #1F2140; --tinta-2: #5A5E7A;
  --display: "Bricolage", system-ui, sans-serif; --cos: "Figtree", system-ui, sans-serif;
  --radi: 22px; --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--tinta); font: 400 1rem/1.55 var(--cos); }
img, svg { display: block; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--groc); outline-offset: 3px; border-radius: 8px; }

.veu { max-width: 560px; margin: 0 auto; padding: 18px 16px 48px; display: grid; gap: 22px; }
.veu-cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.veu-marca { display: flex; align-items: center; gap: 8px; text-decoration: none; font: 800 1.25rem/1 var(--display); color: var(--nit); }
.veu-etiqueta { font: 700 .72rem/1 var(--cos); letter-spacing: .12em; text-transform: uppercase; color: var(--molsa); background: #E3EEE5; padding: .45rem .7rem; border-radius: 999px; }
.veu-intro h1 { font: 800 clamp(1.7rem, 6vw, 2.3rem)/1.08 var(--display); margin: 0 0 10px; letter-spacing: -.01em; }
.veu-intro p { margin: 0; color: var(--tinta-2); }

/* ---- telèfon ---- */
.telefon { background: var(--nit); color: var(--paper); border-radius: 30px; padding: 18px; display: grid; gap: 14px; box-shadow: 0 30px 70px rgba(31,33,64,.28); }
.tel-cap { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.tel-av { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--groc); color: var(--nit); display: grid; place-items: center; }
.tel-av svg { width: 24px; height: 24px; }
.tel-qui { display: grid; gap: 2px; min-width: 0; }
.tel-qui b { font: 700 1.05rem/1.2 var(--display); }
.tel-estat { font-size: .88rem; color: #C9CBE0; display: flex; align-items: center; gap: 7px; }
.tel-estat::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #8A8DB0; }
.telefon[data-estat="escoltant"] .tel-estat::before { background: var(--verd); animation: polsa 1s ease-out infinite; }
.telefon[data-estat="pensant"] .tel-estat::before { background: var(--groc); animation: polsa 1.2s ease-out infinite; }
.telefon[data-estat="parlant"] .tel-estat::before { background: var(--groc); }
.telefon[data-estat="trucant"] .tel-estat::before { background: var(--verd); }
.tel-temps { margin-left: auto; font: 600 .95rem/1 var(--cos); font-variant-numeric: tabular-nums; color: #C9CBE0; }

.tel-fil { display: flex; flex-direction: column; gap: 10px; min-height: 120px; max-height: 46vh; overflow-y: auto; padding: 2px 2px 4px; scroll-behavior: smooth; }
.tel-fil:empty::before { content: attr(data-buit); color: #8A8DB0; font-size: .92rem; margin: auto; text-align: center; padding: 18px 8px; }
.msg { max-width: 86%; padding: .65rem .9rem; border-radius: 18px; font-size: .97rem; line-height: 1.45; white-space: pre-wrap; animation: entra .25s var(--ease) both; }
.msg.ia { align-self: flex-start; background: var(--nit-2); border-bottom-left-radius: 6px; }
.msg.jo { align-self: flex-end; background: var(--groc); color: var(--nit); border-bottom-right-radius: 6px; }
.msg.jo.provisional { opacity: .65; }
.msg.sistema { align-self: center; background: transparent; color: #A9ABC8; font-size: .85rem; text-align: center; max-width: 100%; }
.msg.sistema a { color: var(--groc); font-weight: 700; }
.msg small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.pensant-punts { display: inline-flex; gap: 4px; padding: 4px 0; }
.pensant-punts i { width: 7px; height: 7px; border-radius: 50%; background: #C9CBE0; animation: punt 1s ease-in-out infinite; }
.pensant-punts i:nth-child(2) { animation-delay: .15s; } .pensant-punts i:nth-child(3) { animation-delay: .3s; }

.tel-xips { display: flex; flex-wrap: wrap; gap: 8px; }
.tel-xips button { font: 600 .86rem/1.2 var(--cos); color: var(--paper); background: transparent; border: 1.5px solid var(--nit-3); border-radius: 999px; padding: .5rem .8rem; cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease); }
.tel-xips button:hover { border-color: var(--groc); background: rgba(242,183,5,.08); }
.tel-xips button:disabled { opacity: .45; cursor: default; }

.tel-text { display: flex; gap: 8px; }
.tel-text input { flex: 1; min-width: 0; font: 400 1rem var(--cos); color: var(--tinta); background: var(--paper); border: 0; border-radius: 14px; padding: .8rem .95rem; }
.tel-enviar { flex: none; width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--groc); color: var(--nit); display: grid; place-items: center; cursor: pointer; }
.tel-enviar svg { width: 20px; height: 20px; }
.tel-nota { margin: -4px 0 0; font-size: .85rem; color: #C9CBE0; }

.tel-controls { display: flex; justify-content: center; align-items: center; gap: 26px; padding-top: 6px; }
.tel-controls button { border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; position: relative; transition: transform .2s var(--ease), background .2s var(--ease); }
.tel-controls button:active { transform: scale(.95); }
.tel-controls svg { width: 30px; height: 30px; position: relative; }
.boto-trucar { width: 78px; height: 78px; background: var(--verd); color: #fff; box-shadow: 0 0 0 0 rgba(37,165,95,.55); animation: crida 2s ease-out infinite; }
.boto-micro { width: 84px; height: 84px; background: var(--groc); color: var(--nit); }
.boto-micro.actiu { background: #fff; }
.boto-micro:disabled { opacity: .5; cursor: default; }
.micro-ona { position: absolute; inset: 0; border-radius: 50%; }
.boto-micro.actiu .micro-ona { animation: ona 1.2s ease-out infinite; }
.boto-penjar { width: 60px; height: 60px; background: var(--vermell); color: #fff; }
.boto-penjar svg { width: 28px; height: 28px; }
.tel-ajuda { margin: 0; text-align: center; font-size: .85rem; color: #A9ABC8; }

/* ---- avís de WhatsApp ---- */
.avis-wa { display: grid; gap: 16px; animation: entra .3s var(--ease) both; }
.avis-wa h2 { font: 800 1.45rem/1.15 var(--display); margin: 0; }
.wa-mobil { background: #E6DDD4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='4' cy='4' r='1.2' fill='%23d6ccc2'/%3E%3C/svg%3E"); border-radius: 24px; padding: 14px; box-shadow: 0 20px 50px rgba(31,33,64,.18); }
.wa-cap { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: .9rem; }
.wa-logo { width: 28px; height: 28px; border-radius: 50%; background: #1F6B4C; color: #fff; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.wa-cap small { margin-left: auto; color: #6b6b6b; }
.wa-bombolla { background: #fff; border-radius: 4px 16px 16px 16px; padding: 12px 14px; font-size: .95rem; line-height: 1.5; color: #1b1b1b; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wa-bombolla b { display: block; margin-bottom: 6px; }
.wa-bombolla ul { margin: 0; padding-left: 1.1rem; }
.wa-bombolla li { margin: 2px 0; }
.wa-bombolla .wa-accio { margin-top: 8px; font-weight: 700; color: #1F6B4C; }
.avis-cta { background: var(--pedra); border-radius: var(--radi); padding: 18px; display: grid; gap: 12px; }
.avis-cta p { margin: 0; font: 700 1.1rem/1.3 var(--display); }
.avis-botons { display: flex; flex-wrap: wrap; gap: 10px; }
.boto { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.2rem; border-radius: 999px; font-weight: 800; text-decoration: none; transition: transform .2s var(--ease); }
.boto:active { transform: scale(.97); }
.boto-groc { background: var(--groc); color: var(--nit); }
.boto-linia { border: 2px solid var(--nit); color: var(--nit); }
.boto-tornar { justify-self: start; background: none; border: 0; padding: 4px 0; font: 700 .95rem var(--cos); color: var(--molsa); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.veu-privacitat { margin: 0; font-size: .82rem; color: var(--tinta-2); border-left: 3px solid var(--groc); padding-left: 12px; }

@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes polsa { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes punt { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes crida { 0% { box-shadow: 0 0 0 0 rgba(37,165,95,.55); } 100% { box-shadow: 0 0 0 22px rgba(37,165,95,0); } }
@keyframes ona { 0% { box-shadow: 0 0 0 0 rgba(242,183,5,.6); } 100% { box-shadow: 0 0 0 26px rgba(242,183,5,0); } }

@media (min-width: 720px) {
  .veu { padding-top: 32px; gap: 28px; }
  .telefon { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
