/* ============================================================
   NexClaria — portada publica
   Full independent del panell: aqui no hi ha Bootstrap ni Sneat,
   nomes el que fa falta perque la pagina carregui rapid.
   ============================================================ */

:root {
  --nx-orange:      #ED7623;
  --nx-orange-dark: #D15E14;
  --nx-orange-soft: #FDF0E6;
  --nx-magenta:     #E71D73;
  --nx-ink:         #1D1D1B;
  --nx-body:        #575756;
  --nx-muted:       #8A8A88;
  --nx-line:        #EAE8E4;
  --nx-canvas:      #FAF9F7;
  --nx-wrap:        68rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--nx-body);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.lp-wrap { width: 100%; max-width: var(--nx-wrap); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Botons ---------- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1.125rem;
  border-radius: 2rem;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.lp-btn--lg { padding: .875rem 1.75rem; font-size: 1rem; }

.lp-btn--primary {
  background: var(--nx-orange);
  color: #fff;
  box-shadow: 0 4px 16px rgba(237, 118, 35, .3);
}
.lp-btn--primary:hover { background: var(--nx-orange-dark); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(237, 118, 35, .36); }

.lp-btn--outline { border-color: #DCD8D2; color: var(--nx-ink); background: rgba(255,255,255,.7); }
.lp-btn--outline:hover { border-color: var(--nx-orange); color: var(--nx-orange-dark); }

.lp-btn--ghost { color: var(--nx-ink); }
.lp-btn--ghost:hover { color: var(--nx-orange-dark); }

/* ---------- Capcalera ---------- */
.lp-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(234, 232, 228, .8);
}
.lp-header__brand img { height: 30px; width: auto; }
.lp-header__actions { display: flex; align-items: center; gap: .625rem; }

.lp-lang { display: flex; align-items: center; gap: .375rem; font-size: .8125rem; color: var(--nx-muted); margin-right: .25rem; }
.lp-lang a { font-weight: 600; }
.lp-lang a:hover { color: var(--nx-orange-dark); }
.lp-lang .is-on { color: var(--nx-orange); }

/* ---------- Hero ---------- */
.lp-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem 1.5rem 5rem;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFDFB 0%, var(--nx-canvas) 100%);
}

/* Taques de color molt suaus, com el degradat de la referencia */
.lp-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.lp-hero__bg::before,
.lp-hero__bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
}
.lp-hero__bg::before {
  width: 46rem; height: 46rem;
  top: -18rem; right: -14rem;
  background: radial-gradient(circle, rgba(237,118,35,.16) 0%, rgba(237,118,35,0) 68%);
}
.lp-hero__bg::after {
  width: 34rem; height: 34rem;
  bottom: -14rem; left: -12rem;
  background: radial-gradient(circle, rgba(231,29,115,.1) 0%, rgba(231,29,115,0) 70%);
}

.lp-hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--nx-wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 62rem) {
  .lp-hero__inner { grid-template-columns: 1.05fr .95fr; gap: 4rem; }
}

.lp-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--nx-orange);
  margin: 0 0 1rem;
}
.lp-eyebrow--light { color: #F2953F; }

.lp-hero__title {
  font-size: clamp(2.25rem, 5.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 300;
  color: var(--nx-ink);
  margin: 0 0 1.25rem;
}
.lp-hero__title em { font-style: normal; font-weight: 700; color: var(--nx-orange); }

.lp-hero__lead {
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  color: var(--nx-body);
  max-width: 34rem;
  margin: 0 0 2rem;
}

.lp-hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.lp-hero__note { margin: 1.25rem 0 0; font-size: .8125rem; color: var(--nx-muted); }

/* ---------- Mockup del producte ---------- */
.lp-mock {
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--nx-line);
  box-shadow: 0 24px 70px rgba(29, 29, 27, .13), 0 4px 12px rgba(29, 29, 27, .05);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
}
@media (max-width: 61.99rem) { .lp-mock { transform: none; } }

.lp-mock__bar {
  display: flex; align-items: center; gap: .375rem;
  padding: .625rem .875rem;
  background: #F7F5F2;
  border-bottom: 1px solid var(--nx-line);
}
.lp-mock__bar span { width: 9px; height: 9px; border-radius: 50%; background: #DCD8D2; }
.lp-mock__url {
  margin-left: .625rem; font-size: .6875rem; color: var(--nx-muted);
  background: #fff; border: 1px solid var(--nx-line);
  border-radius: 1rem; padding: .1875rem .625rem;
}

.lp-mock__body { padding: 1.125rem; }

.lp-mock__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .625rem; margin-bottom: 1.125rem; }
.lp-kpi {
  border: 1px solid var(--nx-line);
  border-top: 3px solid var(--nx-line);
  border-radius: .625rem;
  padding: .625rem .75rem;
}
.lp-kpi span { display: block; font-size: .625rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-muted); }
.lp-kpi strong { font-size: 1.0625rem; color: var(--nx-ink); letter-spacing: -0.02em; }
.lp-kpi--accent { border-top-color: var(--nx-orange); background: var(--nx-orange-soft); }
.lp-kpi--accent strong { color: var(--nx-orange-dark); }

.lp-mock__bars {
  display: flex; align-items: flex-end; gap: .5rem;
  height: 5.5rem; padding: .5rem .25rem;
  border-bottom: 1px solid var(--nx-line); margin-bottom: 1rem;
}
.lp-bar {
  flex: 1;
  height: var(--h);
  border-radius: .25rem .25rem 0 0;
  background: linear-gradient(180deg, var(--nx-orange) 0%, #F5A868 100%);
  opacity: .9;
  animation: lpGrow .8s cubic-bezier(.2,.8,.3,1) both;
  animation-delay: var(--d);
}
@keyframes lpGrow { from { height: 0; opacity: 0; } to { height: var(--h); opacity: .9; } }

.lp-mock__lines { display: grid; gap: .4375rem; }
.lp-line { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--nx-body); }
.lp-line i { width: 7px; height: 7px; border-radius: 50%; background: #C9C6C1; flex-shrink: 0; }
.lp-line--good i { background: #22A45D; }
.lp-line--warn i { background: var(--nx-orange); }

/* ---------- Navegacio flotant ---------- */
.lp-pills {
  position: relative;
  margin: 3.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem;
  padding: .3125rem;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--nx-line);
  border-radius: 2rem;
  box-shadow: 0 8px 28px rgba(29, 29, 27, .08);
  width: fit-content;
  max-width: 100%;
}
.lp-pills a {
  padding: .5rem 1rem;
  border-radius: 2rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--nx-body);
  transition: background-color .15s ease, color .15s ease;
}
.lp-pills a:hover { background: var(--nx-orange); color: #fff; }

/* ---------- Seccions ---------- */
.lp-section { padding: 5.5rem 1.5rem; }
.lp-section--soft { background: var(--nx-canvas); }
.lp-section--dark { background: linear-gradient(160deg, #1D1D1B 0%, #2A2724 50%, #46331F 100%); }

.lp-h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--nx-ink);
  margin: 0 0 .75rem;
}
.lp-h2--light { color: #fff; }

.lp-sub { font-size: 1.0625rem; color: var(--nx-muted); max-width: 42rem; margin: 0 0 3rem; }
.lp-sub--light { color: rgba(255,255,255,.66); }
.lp-sub--left { margin-bottom: 1.75rem; }

/* Passos */
.lp-steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  counter-reset: step;
}
.lp-step {
  position: relative;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--nx-line);
  border-radius: .875rem;
  background: #fff;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.lp-step:hover { border-color: #F0B98B; transform: translateY(-3px); box-shadow: 0 10px 30px rgba(237,118,35,.1); }
.lp-step__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; margin-bottom: .875rem;
  border-radius: 50%;
  background: var(--nx-orange-soft);
  color: var(--nx-orange-dark);
  font-weight: 700; font-size: .875rem;
}
.lp-step h3 { font-size: 1.0625rem; font-weight: 600; color: var(--nx-ink); margin: 0 0 .375rem; }
.lp-step p  { font-size: .9375rem; margin: 0; }

/* Targetes */
.lp-cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.lp-card {
  padding: 1.75rem 1.5rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .875rem;
  background: rgba(255,255,255,.05);
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.lp-card:hover { background: rgba(255,255,255,.08); border-color: rgba(237,118,35,.4); transform: translateY(-3px); }
.lp-card__icon { font-size: 1.75rem; margin-bottom: .875rem; }
.lp-card h3 { font-size: 1.0625rem; font-weight: 600; color: #fff; margin: 0 0 .5rem; }
.lp-card p  { font-size: .9375rem; color: rgba(255,255,255,.68); margin: 0; }

/* Split */
.lp-split { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 56rem) { .lp-split { grid-template-columns: 1.25fr .75fr; gap: 4rem; } }

.lp-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.lp-checks li { display: flex; gap: .75rem; font-size: 1rem; color: var(--nx-body); }
.lp-checks span {
  flex-shrink: 0;
  width: 1.375rem; height: 1.375rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #E7F5EE; color: #1F7A4C;
  font-size: .75rem; font-weight: 700;
}

.lp-note {
  padding: 1.75rem 1.5rem;
  border-radius: .875rem;
  background: var(--nx-orange-soft);
  border-left: 3px solid var(--nx-orange);
}
.lp-note h3 { font-size: 1rem; font-weight: 700; color: var(--nx-orange-dark); margin: 0 0 .5rem; }
.lp-note p  { font-size: .9375rem; margin: 0; color: #8F4310; }

/* Qui som */
.lp-about { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 48rem) { .lp-about { grid-template-columns: auto 1fr; gap: 3rem; } }
.lp-about__mark {
  width: 6.5rem; height: 6.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nx-orange) 0%, #F2953F 100%);
  color: #fff; font-size: 2rem; font-weight: 700; letter-spacing: -0.02em;
  box-shadow: 0 12px 34px rgba(237,118,35,.28);
}

/* CTA final */
.lp-cta { padding: 5rem 1.5rem; text-align: center; background: var(--nx-canvas); }
.lp-cta h2 {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 600; letter-spacing: -0.03em; color: var(--nx-ink);
  margin: 0 0 .625rem;
}
.lp-cta p { color: var(--nx-muted); margin: 0 0 2rem; }

/* Peu */
.lp-footer { padding: 2.5rem 1.5rem; border-top: 1px solid var(--nx-line); }
.lp-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.lp-footer__logo { height: 22px; width: auto; opacity: .8; }
.lp-footer p { font-size: .8125rem; color: var(--nx-muted); margin: 0; }
.lp-footer__links { display: flex; gap: 1.25rem; font-size: .875rem; font-weight: 600; }
.lp-footer__links a:hover { color: var(--nx-orange-dark); }

/* Revelat en scroll */
.lp-reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.lp-reveal.is-visible { opacity: 1; transform: none; }

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

/* ============================================================
   Millores: accessibilitat, xifres, FAQ i moviment
   ============================================================ */

/* Salt al contingut per a teclat i lectors de pantalla */
.lp-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--nx-orange);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 .5rem 0;
  font-weight: 600;
}
.lp-skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--nx-orange);
  outline-offset: 2px;
  border-radius: .25rem;
}

/* Capçalera que s'encongeix en baixar */
.lp-header { transition: padding .2s ease, box-shadow .2s ease; }
.lp-header.is-stuck { padding-top: .625rem; padding-bottom: .625rem; box-shadow: 0 4px 20px rgba(29,29,27,.06); }
.lp-header.is-stuck .lp-header__brand img { height: 26px; transition: height .2s ease; }
.lp-header__brand img { height: 30px; transition: height .2s ease; }

/* Fletxa del botó */
.lp-btn__arrow { display: inline-block; transition: transform .18s ease; }
.lp-btn:hover .lp-btn__arrow { transform: translateX(3px); }

/* Xifres del hero */
.lp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2.5rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--nx-line);
}
.lp-stat { margin: 0; }
.lp-stat__n {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--nx-orange);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lp-stat__l {
  margin: .25rem 0 0;
  font-size: .8125rem;
  color: var(--nx-muted);
  max-width: 12rem;
  line-height: 1.4;
}

/* Preguntes freqüents */
.lp-faq { max-width: 48rem; }

.lp-faq__item {
  border: 1px solid var(--nx-line);
  border-radius: .75rem;
  background: #fff;
  margin-bottom: .625rem;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.lp-faq__item[open] { border-color: #F0B98B; box-shadow: 0 4px 20px rgba(237,118,35,.08); }
.lp-faq__item:hover { border-color: #DCD8D2; }

.lp-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  cursor: pointer;
  list-style: none;
}
.lp-faq__item summary::-webkit-details-marker { display: none; }

.lp-faq__item summary h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--nx-ink);
  letter-spacing: -0.01em;
}

.lp-faq__icon {
  flex-shrink: 0;
  position: relative;
  width: 18px; height: 18px;
}
.lp-faq__icon::before,
.lp-faq__icon::after {
  content: '';
  position: absolute;
  background: var(--nx-orange);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.lp-faq__icon::before { left: 0; top: 8px; width: 18px; height: 2px; }
.lp-faq__icon::after  { left: 8px; top: 0; width: 2px; height: 18px; }
.lp-faq__item[open] .lp-faq__icon::after { transform: rotate(90deg); opacity: 0; }

.lp-faq__answer { padding: 0 1.25rem 1.25rem; }
.lp-faq__answer p { margin: 0; color: var(--nx-body); font-size: .9375rem; line-height: 1.65; }

/* Entrada escalonada dels elements dins de cada secció */
.lp-reveal .lp-step,
.lp-reveal .lp-card,
.lp-reveal .lp-checks li {
  opacity: 0;
  transform: translateY(14px);
}
.lp-reveal.is-visible .lp-step,
.lp-reveal.is-visible .lp-card,
.lp-reveal.is-visible .lp-checks li {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease, transform .45s ease;
  transition-delay: calc(var(--i, 1) * 70ms);
}

/* La maqueta torna suau quan el ratolí se'n va */
.lp-mock { transition: transform .35s cubic-bezier(.2,.8,.3,1), box-shadow .3s ease; }
.lp-mock:hover { box-shadow: 0 30px 80px rgba(29, 29, 27, .16), 0 6px 16px rgba(29, 29, 27, .06); }

@media (prefers-reduced-motion: reduce) {
  .lp-reveal .lp-step,
  .lp-reveal .lp-card,
  .lp-reveal .lp-checks li { opacity: 1 !important; transform: none !important; }
  .lp-header, .lp-mock, .lp-btn__arrow { transition: none !important; }
}

/* ============================================================
   Menú ancorat, icones de linia i retrat
   ============================================================ */

/* El menú es queda enganxat sota la capçalera en baixar */
.lp-pills.is-pinned {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  margin: 0;
  box-shadow: 0 10px 34px rgba(29, 29, 27, .12);
  animation: lpDrop .25s cubic-bezier(.2,.8,.3,1) both;
}
.lp-header.is-stuck ~ * .lp-pills.is-pinned,
.lp-pills.is-pinned { top: 4.25rem; }

@keyframes lpDrop {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.lp-pills a.is-current { background: var(--nx-orange); color: #fff; }

@media (max-width: 40rem) {
  .lp-pills.is-pinned { display: none; }  /* en mòbil ocuparia mitja pantalla */
}

/* Icones de línia de les targetes */
.lp-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .75rem;
  background: rgba(237, 118, 35, .14);
  color: var(--nx-orange);
  margin-bottom: 1rem;
  transition: background-color .18s ease, transform .18s ease;
}
.lp-card__icon svg { width: 1.5rem; height: 1.5rem; }
.lp-card:hover .lp-card__icon { background: rgba(237, 118, 35, .24); transform: scale(1.06); }

/* Retrat de la secció "qui hi ha al darrere" */
.lp-about__photo {
  margin: 0;
  flex-shrink: 0;
  width: 15rem;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 48px rgba(29, 29, 27, .14);
}
.lp-about__photo img { width: 100%; height: auto; display: block; }

.lp-about__quote {
  margin: 1.5rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--nx-orange);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--nx-ink);
  line-height: 1.5;
}

@media (max-width: 47.99rem) {
  .lp-about__photo { width: 11rem; }
}

/* ============================================================
   Moviment lligat a l'scroll
   Els elements es construeixen a mesura que baixes. On el navegador
   suporta animation-timeline ho fa ell sol i va fi; on no, ho resol
   l'IntersectionObserver. En tots dos casos, si l'usuari ha demanat
   menys moviment, no es mou res.
   ============================================================ */

/* --- Barra de progres de lectura --- */
.lp-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.lp-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--nx-orange) 0%, var(--nx-magenta) 100%);
  transform-origin: 0 50%;
  transition: width .1s linear;
}

/* --- Parallax del hero --- */
.lp-hero__preview { will-change: transform; }
.lp-hero__bg      { will-change: transform; }

/* --- Passos: la linia es dibuixa mentre baixes --- */
.lp-steps { position: relative; }

@media (min-width: 62rem) {
  .lp-steps::before {
    content: '';
    position: absolute;
    top: 2.75rem;
    left: 8%;
    right: 8%;
    height: 2px;
    background: var(--nx-line);
    z-index: 0;
  }
  .lp-steps::after {
    content: '';
    position: absolute;
    top: 2.75rem;
    left: 8%;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--nx-orange), #F2953F);
    z-index: 0;
    transition: width 1.1s cubic-bezier(.3,.8,.4,1) .15s;
  }
  .lp-steps.is-drawn::after { width: 84%; }
}

.lp-step { position: relative; z-index: 1; background: #fff; }
.lp-step__n { transition: transform .3s cubic-bezier(.2,1.4,.4,1), background-color .3s ease, color .3s ease; }
.is-visible .lp-step:hover .lp-step__n,
.lp-step.is-lit .lp-step__n {
  background: var(--nx-orange);
  color: #fff;
  transform: scale(1.12);
}

/* --- Targetes fosques: entren alternant costat --- */
.lp-reveal .lp-card:nth-child(odd)  { transform: translateY(18px) translateX(-10px) scale(.98); }
.lp-reveal .lp-card:nth-child(even) { transform: translateY(18px) translateX(10px) scale(.98); }
.lp-reveal.is-visible .lp-card { transform: none; }

/* --- Titols: es descobreixen darrere d'una mascara --- */
.lp-h2, .lp-hero__title {
  --lp-mask: 100%;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .lp-section .lp-h2 {
      animation: lpUnmask linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 26%;
    }

    /* Les barres del grafic creixen segons on ets a la pagina */
    .lp-bar {
      animation: lpGrow linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 40%;
    }

    /* La maqueta s'acosta a mesura que entra */
    .lp-mock {
      animation: lpApproach linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }

    /* Les preguntes entren una darrere l'altra */
    .lp-faq__item {
      animation: lpSlideIn linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 20%;
    }

    .lp-checks li {
      animation: lpSlideIn linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 25%;
    }
  }
}

@keyframes lpUnmask {
  from { opacity: 0; transform: translateY(14px); clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; transform: none;            clip-path: inset(0 0 0 0); }
}

@keyframes lpApproach {
  from { opacity: .4; transform: perspective(1400px) rotateY(-10deg) rotateX(4deg) scale(.94); }
  to   { opacity: 1;  transform: perspective(1400px) rotateY(-6deg)  rotateX(2deg) scale(1); }
}

@keyframes lpSlideIn {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: none; }
}

/* El retrat s'acosta lleugerament */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .lp-about__photo {
      animation: lpZoomIn linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 35%;
    }
  }
}
@keyframes lpZoomIn {
  from { opacity: 0; transform: scale(.9) translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* --- Quan no hi ha animation-timeline, ho fa l'observer --- */
.lp-anim { opacity: 0; transform: translateY(16px); }
.lp-anim.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .55s cubic-bezier(.2,.8,.3,1), transform .55s cubic-bezier(.2,.8,.3,1);
  transition-delay: calc(var(--i, 0) * 80ms);
}

@media (prefers-reduced-motion: reduce) {
  .lp-progress { display: none; }
  .lp-anim { opacity: 1 !important; transform: none !important; }
  .lp-steps::after { transition: none; width: 84%; }
  .lp-hero__preview, .lp-hero__bg { transform: none !important; }
}

/* --- Capcalera que s'aparta quan baixes i torna quan puges --- */
.lp-header {
  transform: translateY(0);
  transition: transform .28s cubic-bezier(.2,.8,.3,1), padding .2s ease, box-shadow .2s ease;
}
.lp-header.is-hidden { transform: translateY(-100%); }

/* Si la capcalera no hi es, el menu ancorat puja a ocupar el seu lloc */
.lp-pills.is-pinned { transition: top .28s cubic-bezier(.2,.8,.3,1), box-shadow .2s ease; }
body.lp-header-hidden .lp-pills.is-pinned { top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  .lp-header { transition: none; }
  .lp-header.is-hidden { transform: none; }
}

/* ============================================================
   Pagines legals
   ============================================================ */

.lg-page { padding: 8rem 1.5rem 4rem; background: var(--nx-canvas); min-height: 70vh; }
.lg-wrap {
  width: 100%; max-width: var(--nx-wrap); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}
@media (min-width: 56rem) { .lg-wrap { grid-template-columns: 15rem 1fr; gap: 3.5rem; } }

.lg-side { position: relative; }
@media (min-width: 56rem) { .lg-side { position: sticky; top: 7rem; align-self: start; } }

.lg-nav { display: flex; flex-wrap: wrap; gap: .375rem; }
@media (min-width: 56rem) { .lg-nav { flex-direction: column; } }

.lg-nav a, .lg-nav__btn {
  display: block; text-align: left;
  padding: .5rem .75rem; border-radius: .5rem;
  font-size: .9375rem; font-weight: 500; color: var(--nx-body);
  border: 0; background: transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.lg-nav a:hover, .lg-nav__btn:hover { background: #F2F0ED; color: var(--nx-ink); }
.lg-nav a.is-current { background: var(--nx-orange-soft); color: var(--nx-orange-dark); font-weight: 600; }

.lg-doc {
  background: #fff; border: 1px solid var(--nx-line);
  border-radius: 1rem; padding: 2.5rem;
}
@media (max-width: 40rem) { .lg-doc { padding: 1.5rem; } }

.lg-doc h1 {
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  font-weight: 600; letter-spacing: -0.03em; color: var(--nx-ink);
  margin: 0 0 .375rem;
}
.lg-updated { font-size: .8125rem; color: var(--nx-muted); margin: 0 0 1.75rem; }

.lg-doc h2 {
  font-size: 1.125rem; font-weight: 600; color: var(--nx-ink);
  margin: 2.25rem 0 .625rem; letter-spacing: -0.01em;
}
.lg-doc h3 { font-size: 1rem; font-weight: 600; color: var(--nx-ink); margin: 1.5rem 0 .5rem; }
.lg-doc p, .lg-doc li { font-size: .9375rem; line-height: 1.7; color: var(--nx-body); }
.lg-doc p { margin: 0 0 .875rem; }
.lg-doc ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.lg-doc li { margin-bottom: .375rem; }
.lg-doc a { color: var(--nx-orange-dark); text-decoration: underline; text-underline-offset: .15em; }
.lg-doc code { font-size: .8125rem; background: #F3F1ED; padding: .1rem .35rem; border-radius: .25rem; }

.lg-note {
  background: #FBFAF8; border-left: 3px solid var(--nx-line);
  padding: .75rem 1rem; font-size: .875rem !important; color: var(--nx-muted) !important;
}

.lg-alert {
  display: flex; flex-direction: column; gap: .25rem;
  background: var(--nx-orange-soft); border: 1px dashed #F0B98B;
  border-radius: .625rem; padding: .875rem 1rem; margin-bottom: 2rem;
  font-size: .875rem; color: #8F4310;
}
.lg-alert strong { color: #8F4310; }

.lg-table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.lg-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.lg-table th {
  text-align: left; padding: .625rem .75rem; background: #FBFAF8;
  border-bottom: 1px solid var(--nx-line); font-size: .75rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--nx-muted); white-space: nowrap;
}
.lg-table td { padding: .625rem .75rem; border-bottom: 1px solid #F2F0ED; color: var(--nx-body); }

/* Enllaços legals al peu */
.lp-footer__legal {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--nx-line);
  font-size: .8125rem; color: var(--nx-muted);
}
.lp-footer__legal a:hover { color: var(--nx-orange-dark); }
.lp-footer__btn {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-decoration: underline; text-underline-offset: .15em;
}
.lp-footer__btn:hover { color: var(--nx-orange-dark); }

/* ============================================================
   Avis de cookies
   ============================================================ */

.ck {
  position: fixed; inset: auto 0 0 0; z-index: 70;
  padding: 1rem;
  animation: ckUp .3s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes ckUp { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }

.ck__box {
  max-width: var(--nx-wrap); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem;
  background: #fff; border: 1px solid var(--nx-line);
  border-radius: .875rem; padding: 1.125rem 1.25rem;
  box-shadow: 0 18px 50px rgba(29, 29, 27, .16);
}
.ck__text { flex: 1 1 20rem; }
.ck__text h2 { font-size: 1rem; font-weight: 600; color: var(--nx-ink); margin: 0 0 .25rem; }
.ck__text p { font-size: .875rem; color: var(--nx-body); margin: 0; }
.ck__text a { color: var(--nx-orange-dark); text-decoration: underline; }
.ck__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.ck-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ck-modal__backdrop { position: absolute; inset: 0; background: rgba(29, 29, 27, .5); backdrop-filter: blur(3px); }
.ck-modal__box {
  position: relative; width: 100%; max-width: 34rem; max-height: 88vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 1rem; overflow: hidden;
  box-shadow: 0 24px 70px rgba(29, 29, 27, .3);
  animation: ckIn .25s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes ckIn { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }

.ck-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.125rem 1.25rem; border-bottom: 1px solid var(--nx-line);
}
.ck-modal__head h2 { margin: 0; font-size: 1.0625rem; font-weight: 600; color: var(--nx-ink); }
.ck-modal__x { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; color: var(--nx-muted); cursor: pointer; }
.ck-modal__x:hover { color: var(--nx-ink); }

.ck-modal__body { padding: 1.25rem; overflow-y: auto; }
.ck-modal__intro { font-size: .875rem; color: var(--nx-muted); margin: 0 0 1.25rem; }

.ck-cat { border: 1px solid var(--nx-line); border-radius: .625rem; padding: .875rem 1rem; margin-bottom: .625rem; }
.ck-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ck-cat h3 { margin: 0; font-size: .9375rem; font-weight: 600; color: var(--nx-ink); }
.ck-cat p { margin: .375rem 0 0; font-size: .8125rem; color: var(--nx-muted); line-height: 1.55; }
.ck-cat__tag { font-size: .6875rem; color: var(--nx-muted); }

.ck-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.ck-switch input { opacity: 0; width: 0; height: 0; }
.ck-switch span {
  position: absolute; inset: 0; cursor: pointer;
  background: #DCD8D2; border-radius: 24px; transition: background-color .2s ease;
}
.ck-switch span::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s ease;
}
.ck-switch input:checked + span { background: var(--nx-orange); }
.ck-switch input:checked + span::before { transform: translateX(18px); }
.ck-switch input:disabled + span { opacity: .55; cursor: not-allowed; }

.ck-modal__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
  padding: 1rem 1.25rem; border-top: 1px solid var(--nx-line); background: #FBFAF8;
}
.ck-modal__link { font-size: .8125rem; color: var(--nx-orange-dark); text-decoration: underline; }

@media (max-width: 40rem) {
  .ck__actions { width: 100%; }
  .ck__actions .lp-btn { flex: 1; }
}

/* L'atribut hidden ha de manar per sobre del display del component:
   sense aixo el modal de cookies es veuria sempre. */
.ck[hidden],
.ck-modal[hidden] { display: none !important; }
