/* =========================================================
   Clínica Dental Demo · Estils
   Paleta sòbria: blau petroli fosc + verd aigua suau + neutres
   ========================================================= */

:root {
  --ink: #0e2a33;          /* text principal / fons fosc */
  --ink-2: #3c5560;        /* text secundari */
  --muted: #6b7f87;
  --teal: #1f6f73;         /* color de marca */
  --teal-600: #185a5d;
  --teal-50: #e9f2f1;
  --sand: #f6f4ef;         /* fons alternatiu càlid */
  --bg: #fbfbf9;
  --white: #ffffff;
  --line: #e3e7e6;
  --ok: #2f9e6e;
  --danger: #b3473b;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14,42,51,.04), 0 8px 24px rgba(14,42,51,.06);
  --shadow-lg: 0 24px 60px rgba(14,42,51,.14);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 500; letter-spacing: -.03em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 500; letter-spacing: -.025em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.accent { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--teal); letter-spacing: -.01em; }
.muted { color: var(--ink-2); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}

/* ------------------------------ Botons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  font: 500 .95rem/1 var(--font); cursor: pointer;
  transition: background .2s, color .2s, transform .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--teal); box-shadow: 0 10px 24px rgba(31,111,115,.25); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 10px 18px; font-size: .88rem; }
.btn-block { width: 100%; }

/* ---------------------------- Banner demo ---------------------------- */
.demo-banner {
  background: var(--ink); color: rgba(255,255,255,.8);
  text-align: center; font-size: .78rem; padding: 7px 16px; letter-spacing: .02em;
}

/* ------------------------------ Header ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,251,249,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.brand em { font-family: var(--serif); font-weight: 400; font-size: 1.2em; color: var(--teal); }
.brand-light { color: var(--white); }
.brand-light em { color: #8cc7c3; }

.main-nav { display: flex; gap: 30px; }
.main-nav a { font-size: .92rem; color: var(--ink-2); position: relative; padding: 4px 0; transition: color .2s; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; background: var(--teal-50); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  font: 600 .75rem/1 var(--font); letter-spacing: .05em; color: var(--ink-2);
  padding: 8px 11px; border-radius: 999px; transition: background .2s, color .2s;
}
.lang-switch button.active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.menu-toggle { display: none; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: transform .3s, top .3s; }
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 23px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ------------------------------- Hero ------------------------------- */
.hero { position: relative; overflow: hidden; padding: 80px 0 110px; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(31,111,115,.13), transparent 70%),
    radial-gradient(500px 360px at 10% 90%, rgba(201,184,150,.18), transparent 70%);
}
.hero-bg::after { /* blob animat */
  content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: 40px;
  background: linear-gradient(135deg, rgba(31,111,115,.10), rgba(140,199,195,.14));
  border-radius: 42% 58% 63% 37% / 40% 45% 55% 60%;
  animation: blob 18s ease-in-out infinite;
}
@keyframes blob {
  0%, 100% { border-radius: 42% 58% 63% 37% / 40% 45% 55% 60%; transform: rotate(0) scale(1); }
  50% { border-radius: 60% 40% 35% 65% / 55% 60% 40% 45%; transform: rotate(18deg) scale(1.06); }
}

.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 520px; margin-bottom: 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 40px; margin: 0; padding-top: 28px; border-top: 1px solid var(--line); max-width: 520px; }
.hero-stats dt { font-size: .8rem; color: var(--muted); }
.hero-stats dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 600; }

.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  width: 340px; max-width: 100%; height: 470px;
  background: var(--white); border-radius: 32px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column;
  animation: floatY 7s ease-in-out infinite;
}
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.phone-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.phone-head strong { display: block; font-size: .92rem; }
.status { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(47,158,110,.18); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--teal-50); display: grid; place-items: center; flex-shrink: 0; }
.avatar img { width: 22px; height: 22px; }
.phone-body {
  flex: 1; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  background: linear-gradient(180deg, var(--white), var(--sand)); overflow: hidden;
}

.bubble {
  max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: .88rem; line-height: 1.45;
  animation: pop .35s cubic-bezier(.2,.9,.3,1.2) both;
}
.bubble.user { align-self: flex-end; background: var(--ink); color: var(--white); border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.leaving { animation: fadeOut .4s ease forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-8px); } }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.float-card {
  position: absolute; background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 16px; font-size: .82rem; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.float-card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.fc-1 { left: -10px; top: 70px; animation: floatY 6s ease-in-out infinite .5s; }
.fc-2 { right: 0; bottom: -22px; animation: floatY 8s ease-in-out infinite 1s; }
.fc-2 strong { color: var(--teal); }

/* ----------------------------- Seccions ----------------------------- */
.section { padding: 110px 0; }
.section-alt { background: var(--sand); }
.section-dark { background: var(--ink); color: var(--white); }
.section-dark .eyebrow { color: #8cc7c3; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; }

/* Features */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.feature p { color: var(--ink-2); font-size: .92rem; margin: 0; }
.ico {
  width: 44px; height: 44px; border-radius: 12px; background: var(--teal-50); color: var(--teal);
  display: grid; place-items: center; margin-bottom: 18px; flex-shrink: 0;
}
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Tractaments */
.treat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.treat {
  background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid transparent;
  display: flex; flex-direction: column; gap: 6px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.treat:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); }
.treat .ico { margin-bottom: 10px; }
.treat h3 { margin: 0; }
.treat p { color: var(--ink-2); font-size: .9rem; margin: 0; flex: 1; }
.treat .price { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .85rem; color: var(--muted); }
.treat .price strong { font-size: 1.2rem; color: var(--ink); font-weight: 600; margin-left: 4px; }
.treat.highlight { background: var(--ink); color: var(--white); }
.treat.highlight p, .treat.highlight .price { color: rgba(255,255,255,.7); }
.treat.highlight .price strong { color: #8cc7c3; }
.treat.highlight .price { border-color: rgba(255,255,255,.18); }
.treat.highlight .ico { background: rgba(255,255,255,.1); color: #8cc7c3; }

/* Info pràctica */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.info { padding: 30px 28px 30px 0; border-bottom: 1px solid var(--line); }
.info h3 { color: var(--teal); }
.info p { color: var(--ink-2); font-size: .93rem; margin: 0; }

/* Horaris */
.open-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 28px;
  padding: 7px 14px; border-radius: 999px; font-size: .82rem; font-weight: 500;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
}
.open-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.open-badge.is-open::before { background: #5fd3a0; box-shadow: 0 0 0 0 rgba(95,211,160,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(95,211,160,0); } 100% { box-shadow: 0 0 0 0 rgba(95,211,160,0); } }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.notes li { display: grid; gap: 2px; padding-left: 18px; border-left: 2px solid rgba(140,199,195,.5); }
.notes span { color: rgba(255,255,255,.7); font-size: .93rem; }
.hours-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 8px 28px; }
.hours-row { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.1); flex-wrap: wrap; }
.hours-row:last-child { border-bottom: 0; }
.hours-row span { color: rgba(255,255,255,.75); }
.hours-row strong { font-weight: 500; }
.hours-row.closed strong { color: rgba(255,255,255,.45); }
.hours-row.today span, .hours-row.today strong { color: #8cc7c3; }

/* FAQ */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-weight: 500; font-size: 1.02rem; transition: color .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2);
  transform: rotate(45deg); transition: transform .3s, margin .3s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item summary:hover { color: var(--teal); }
.faq-item .answer { color: var(--ink-2); padding: 0 40px 22px 0; animation: pop .3s ease both; }
.faq-more { text-align: center; margin-top: 32px; }

/* Contacte */
.contact-list { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 16px; align-items: center; }
.contact-list .ico { margin: 0; background: var(--white); }
.contact-list small { display: block; color: var(--muted); font-size: .78rem; }
.contact-list a:hover { color: var(--teal); }
.urgent { font-size: .88rem; color: var(--ink-2); background: var(--white); border-left: 3px solid var(--danger); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.urgent a { color: var(--danger); font-weight: 600; }

.contact-form { background: var(--white); border-radius: 24px; padding: 36px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label, .field .label { font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 4px rgba(31,111,115,.12);
}
.field .invalid, .check.invalid span { border-color: var(--danger); color: inherit; }
.check.invalid span { color: var(--danger); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips label { cursor: pointer; position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .85rem; background: var(--bg); transition: all .2s;
}
.chips input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chips input:focus-visible + span { box-shadow: 0 0 0 4px rgba(31,111,115,.2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--teal); }
.check a { color: var(--teal); text-decoration: underline; }
.form-ok { margin: 0; padding: 14px; border-radius: var(--radius-sm); background: var(--teal-50); color: var(--teal-600); font-size: .9rem; text-align: center; }

/* ------------------------------ Footer ------------------------------ */
.site-footer { background: var(--ink); color: rgba(255,255,255,.65); padding: 80px 0 0; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 56px; }
.footer-grid > div { display: flex; flex-direction: column; gap: 10px; }
.footer-grid p { max-width: 300px; margin-top: 10px; }
.footer-grid h4 { color: var(--white); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; font-weight: 600; }
.footer-grid a { transition: color .2s; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; padding-bottom: 28px; font-size: .8rem; }

/* ------------------------- Xat (placeholder) ------------------------- */
.chat-widget { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.chat-fab {
  display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
  background: var(--teal); color: var(--white); padding: 14px 20px 14px 16px; border-radius: 999px;
  font: 500 .92rem/1 var(--font); box-shadow: 0 12px 30px rgba(31,111,115,.35);
  transition: transform .2s, background .2s;
  animation: fabIn .6s cubic-bezier(.2,.9,.3,1.2) 1.2s both;
}
.chat-fab:hover { transform: translateY(-2px); background: var(--teal-600); }
.chat-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
@keyframes fabIn { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }

.chat-panel {
  width: 370px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 120px);
  background: var(--white); border-radius: 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right;
  animation: panelIn .3s cubic-bezier(.2,.9,.3,1.1) both;
}
.chat-panel[hidden] { display: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--ink); color: var(--white); }
.chat-head .avatar { background: rgba(255,255,255,.12); }
.chat-head strong { display: block; font-size: .95rem; }
.chat-head small { color: rgba(255,255,255,.6); font-size: .75rem; }
.chat-close { margin-left: auto; border: 0; background: transparent; color: var(--white); font-size: 1.6rem; line-height: 1; cursor: pointer; opacity: .7; width: 32px; height: 32px; }
.chat-close:hover { opacity: 1; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--sand); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: .9rem; line-height: 1.45; animation: pop .35s ease both; }
.msg.bot { background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--ink); color: var(--white); border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.note { align-self: center; background: transparent; color: var(--muted); font-size: .8rem; text-align: center; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; font: inherit; font-size: .9rem; padding: 11px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.chat-input input:focus { outline: none; border-color: var(--teal); }
.chat-input button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--teal); color: var(--white); display: grid; place-items: center; cursor: pointer; }
.chat-input button:disabled, .chat-input input:disabled { opacity: .5; cursor: not-allowed; }
.chat-input svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------- Pàgina legal ---------------------------- */
.legal-hero { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
.legal-hero a.back { font-size: .88rem; color: var(--teal); display: inline-block; margin-bottom: 24px; }
.legal-hero a.back:hover { text-decoration: underline; }
.legal-layout { display: grid; grid-template-columns: 220px 1fr; gap: 64px; padding: 56px 24px 110px; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: grid; gap: 10px; font-size: .92rem; }
.legal-toc a { color: var(--ink-2); padding-left: 14px; border-left: 2px solid var(--line); transition: all .2s; }
.legal-toc a:hover, .legal-toc a.active { color: var(--ink); border-color: var(--teal); }
.legal-content { max-width: 720px; }
.legal-content section { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--line); }
.legal-content section:last-child { border-bottom: 0; }
.legal-content h2 { font-size: 1.8rem; }
.legal-content h3 { margin-top: 1.6em; }
.legal-content p, .legal-content li { color: var(--ink-2); font-size: .96rem; }
.legal-content table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1em 0; }
.legal-content th, .legal-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-content th { background: var(--teal-50); font-weight: 600; }
.legal-content a { color: var(--teal); text-decoration: underline; }
[data-lang-block] { display: none; }
html[lang="ca"] [data-lang-block="ca"], html[lang="es"] [data-lang-block="es"] { display: block; }

/* ------------------------- Animació en scroll ------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 1000px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc { position: static; display: flex; flex-wrap: wrap; gap: 8px 16px; }
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .hide-mobile { display: none; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  .main-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .main-nav a::after { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 40px 0 72px; }
  .hero-stats { gap: 24px; }
  .hero-visual { display: none; }
  .feature-grid, .info-grid, .field-row { grid-template-columns: 1fr; }
  .info { padding-right: 0; }
  .contact-form { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .chat-widget { right: 16px; bottom: 16px; }
  .chat-fab span { display: none; }
  .chat-fab { padding: 16px; }
  .header-inner { gap: 8px; }
  .brand span { font-size: .95rem; }
  .legal-layout { padding: 40px 16px 72px; }
}
