/* ==========================================================================
   Testart Studio — Inici (landing)
   Sistema de l'skill landing-page-design: Geist, escala Tailwind,
   espaiat tancat, radis de Tailwind, fons plans.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Colors: fons només de la llista permesa */
  --c-bg: #181818;
  --c-bg-deep: #000000;
  --c-surface: #1f1f1f;
  --c-surface-2: #272727;
  --c-border: #313131;
  --c-text: #ffffff;
  --c-text-muted: #a3a198;
  --c-text-dim: rgba(255, 255, 255, 0.3);
  --c-accent: #ffd400;
  --c-on-accent: #000000;

  /* Espaiat */
  --s-25: 2px;  --s-50: 4px;  --s-75: 8px;  --s-100: 12px;
  --s-200: 16px; --s-300: 24px; --s-400: 32px; --s-500: 40px;
  --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;

  /* Radis (Tailwind) */
  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px;
  --r-full: 9999px;

  /* Moviment */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --container: 1280px;
  --gutter: var(--s-200);
}

@media (min-width: 768px) { :root { --gutter: var(--s-400); } }
@media (min-width: 1280px) { :root { --gutter: var(--s-700); } }

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "Geist", system-ui, sans-serif;
  font-size: 1rem; line-height: 1.5rem;
  font-weight: 400;
  font-style: normal;
  background: var(--c-bg);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3, h4 { font-weight: 600; text-wrap: balance; }
p, li, dd, summary { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: var(--s-50);
  border-radius: var(--r-md);
}

::selection { background: var(--c-accent); color: var(--c-on-accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: var(--s-200); left: var(--s-200); z-index: 100;
  padding: var(--s-75) var(--s-100);
  background: var(--c-accent); color: var(--c-on-accent);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 600;
  border-radius: var(--r-full);
  transform: translateY(-200%);
  transition: transform 500ms var(--ease);
}
.skip-link:focus { transform: none; }

.icon { width: 1em; height: 1em; flex: none; fill: currentColor; }

/* Fons de la pàgina: shader amb el degradat i el patró (js/bg-shader.js). */
.page-bg {
  position: fixed; left: 0; top: 0; z-index: -1;
  width: 100%; height: 100vh; height: 100lvh;
  pointer-events: none;
}

/* 3. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--s-800); }
@media (min-width: 1024px) { .section { padding-block: var(--s-900); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-75);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  color: var(--c-text-muted);
}
.eyebrow::before {
  content: ""; width: var(--s-75); height: var(--s-75);
  background: var(--c-accent); border-radius: var(--r-sm, 2px);
}

.section-head { max-width: 680px; }
.section-title {
  margin-top: var(--s-200);
  font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -0.02em;
}
@media (min-width: 768px) {
  .section-title { font-size: 3rem; line-height: 1; }
}
.section-title .is-dim { color: var(--c-text-muted); }

.lead {
  margin-top: var(--s-300);
  font-size: 1.125rem; line-height: 1.75rem;
  color: var(--c-text-muted);
}

/* 4. Botons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100);
  font-size: 1rem; line-height: 1.5rem; font-weight: 600;
  border-radius: var(--r-full);
  white-space: nowrap;
  transition:
    transform 500ms var(--ease),
    background-color 300ms var(--ease),
    color 300ms var(--ease);
}
.btn .icon { transition: transform 500ms var(--ease); }
.btn:hover .icon { transform: translateX(var(--s-50)); }
.btn:active { transform: scale(0.98); }

.btn--primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn--primary:hover { background: #ffffff; }

.btn--ghost { background: var(--c-surface-2); color: var(--c-text); }
.btn--ghost:hover { background: var(--c-border); }

.btn--sm { font-size: 0.875rem; line-height: 1.25rem; }

.link {
  display: inline-flex; align-items: center; gap: var(--s-75);
  font-weight: 500; color: var(--c-text);
  transition: color 300ms var(--ease);
}
.link .icon { transition: transform 500ms var(--ease); }
.link:hover { color: var(--c-accent); }
.link:hover .icon { transform: translate(var(--s-25), calc(var(--s-25) * -1)); }

/* 5. Marca ----------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: var(--s-75); }
.brand__logo { width: auto; height: 24px; }

/* 6. Navegació ------------------------------------------------------------- */
.nav {
  position: fixed; z-index: 50;
  top: var(--s-200); left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--s-400));
  max-width: max-content;
}

.nav__bar {
  display: flex; align-items: center; gap: var(--s-300);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  background: rgba(31, 31, 31, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-full);
}

.nav__links { display: none; align-items: center; gap: var(--s-50); }
.nav__links a {
  padding: var(--s-75) var(--s-100);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  color: var(--c-text-muted);
  border-radius: var(--r-full);
  transition: color 300ms var(--ease), background-color 300ms var(--ease);
}
.nav__links a:hover { color: var(--c-text); background: var(--c-surface-2); }
.nav__links a[aria-current="page"] { color: var(--c-text); background: var(--c-surface-2); }

.nav__cta { display: none; }

.nav__toggle {
  position: relative;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: var(--c-surface-2);
  transition: background-color 300ms var(--ease);
}
.nav__toggle:hover { background: var(--c-border); }
.nav__toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px;
  background: currentColor; border-radius: var(--r-full);
  transition: transform 500ms var(--ease);
}
.nav__toggle span:nth-child(1) { top: 15px; }
.nav__toggle span:nth-child(2) { top: 23px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
}

/* Panell del menú al mòbil: s'obre amb un cercle que neix del botó (--ox i
   --oy les posa js/site.js) i els enllaços entren un darrere l'altre. */
.menu {
  position: fixed; inset: 0; z-index: 40;
  display: grid; grid-template-rows: 1fr auto; gap: var(--s-500);
  padding: calc(var(--s-900) + var(--s-200)) var(--gutter) max(var(--s-400), env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background:
    radial-gradient(120% 60% at 100% 100%, rgba(255, 212, 0, 0.16), transparent 60%),
    radial-gradient(80% 50% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 70%),
    #141414;
  clip-path: circle(0 at var(--ox, 100%) var(--oy, 0));
  visibility: hidden;
  transition: clip-path 600ms var(--ease), visibility 0s linear 600ms;
}
.menu.is-open {
  clip-path: circle(150vmax at var(--ox, 100%) var(--oy, 0));
  visibility: visible;
  transition: clip-path 800ms var(--ease), visibility 0s;
}
.menu__links { display: grid; align-content: center; }
.menu__links a {
  display: flex; align-items: center; gap: var(--s-200);
  padding-block: var(--s-200);
  font-size: 2.5rem; line-height: 1; font-weight: 600; letter-spacing: -0.035em;
  color: var(--c-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.menu__num {
  align-self: flex-start;
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.75rem; line-height: 1rem; font-weight: 500; letter-spacing: 0;
  color: var(--c-text-muted);
}
.menu__links a .icon { margin-left: auto; font-size: 1.5rem; color: var(--c-text-muted); transition: transform 400ms var(--ease), color 300ms var(--ease); }
.menu__links a:hover .icon, .menu__links a:focus-visible .icon { color: var(--c-accent); transform: translateX(4px); }
.menu__links a[aria-current="page"] .menu__num { color: var(--c-accent); }
.menu__links a[aria-current="page"] .menu__label::after {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-left: var(--s-100);
  vertical-align: middle; border-radius: 2px; background: var(--c-accent);
}
.menu__item {
  opacity: 0; transform: translateY(var(--s-300));
  transition: opacity 500ms var(--ease), transform 600ms var(--ease);
}
.menu.is-open .menu__item { opacity: 1; transform: none; }
.menu__foot { display: grid; gap: var(--s-200); }
.menu__eyebrow { font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.menu__foot .btn { justify-content: center; padding-block: var(--s-150, 12px); }
.menu__contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-200); margin-top: var(--s-100); }
.menu__contact p { display: grid; gap: var(--s-50); font-size: 0.9375rem; line-height: 1.375rem; }
.menu__contact p a { color: var(--c-text-muted); }
.menu__contact p a:hover { color: var(--c-text); }
.menu__social { display: flex; gap: var(--s-75); }
.menu__social a {
  display: grid; place-items: center; width: 44px; height: 44px;
  font-size: 1.25rem;
  border-radius: var(--r-full); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 300ms var(--ease);
}
.menu__social a:hover { background: rgba(255, 255, 255, 0.14); }
@media (prefers-reduced-motion: reduce) {
  .menu { clip-path: none; opacity: 0; transition: opacity 200ms linear, visibility 0s linear 200ms; }
  .menu.is-open { clip-path: none; opacity: 1; transition: opacity 200ms linear, visibility 0s; }
}

@media (min-width: 900px) { .menu { display: none; } }

body.is-locked { overflow: hidden; }

/* 7. Hero ------------------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  width: 100%;
  height: 100vh; height: 100svh;
  min-height: 680px;
  padding-top: var(--s-900); padding-bottom: var(--s-300);
  overflow: hidden;
}
/* Al mòbil el hero creix amb el contingut (mai menys d'una pantalla): així el
   carrusel no queda tallat als telèfons baixos. */
@media (max-width: 767px) {
  .hero { height: auto; min-height: 100svh; padding-top: calc(var(--s-900) + var(--s-200)); padding-bottom: var(--s-400); }
  .hero__content { flex: 1 0 auto; justify-content: flex-start; }
}
/* Pis de dalt: el text, centrat a l'espai que deixa el carrusel. */
.hero__content {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
}

/* Fons 3D a tot l'ample: el pinta js/hero-3d.js. Sense WebGL es veu el
   símbol estàtic. */
.hero__canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  opacity: 0;
  transition: opacity 800ms var(--ease);
}
.hero.has-3d .hero__canvas { opacity: 1; }
.hero__fallback {
  position: absolute; z-index: 0;
  right: var(--gutter); top: 50%;
  width: 40%; max-width: 480px;
  transform: translateY(-50%);
  opacity: 0.9;
}
.hero.has-3d .hero__fallback { display: none; }

@media (max-width: 1023px) {
  .hero__fallback { top: auto; bottom: var(--s-600); left: 50%; right: auto; width: 60%; transform: translateX(-50%); }
}

.hero__title {
  max-width: 680px;
  font-size: 3rem; line-height: 1; letter-spacing: -0.04em;
  font-weight: 600;
  background: linear-gradient(90deg, #ffffff 0%, #9b9b9b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
@media (min-width: 768px) { .hero__title { font-size: 4.5rem; } }
@media (min-width: 1280px) { .hero__title { max-width: 800px; } }

.hero__sub {
  max-width: 680px;
  margin-top: var(--s-300);
  font-size: 1.125rem; line-height: 1.75rem;
  color: var(--c-text-muted);
}
@media (min-width: 768px) { .hero__sub { font-size: 1.25rem; line-height: 1.75rem; } }

.hero__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-300);
  margin-top: var(--s-500);
}

.hero__proof {
  display: flex; align-items: center; gap: var(--s-100);
  font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted);
}
.hero__proof strong { color: var(--c-text); font-weight: 500; }
.hero__avatars { display: flex; }
.hero__avatars img {
  width: 32px; height: 32px; object-fit: cover;
  border-radius: var(--r-full);
  border: 2px solid var(--c-bg);
}
.hero__avatars img + img { margin-left: calc(var(--s-100) * -1); }

/* 8. Carrusel de projectes del hero ----------------------------------------
   Bucle infinit (dues còpies de la llista). El mou js/landing.js: la
   velocitat puja amb l'scroll i baixa amb el ratolí a sobre; les targetes
   s'inclinen una mica segons la velocitat. */
.reel {
  position: relative; z-index: 1;
  margin-top: var(--s-300);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.reel__track {
  display: flex; width: max-content;
  transform: translate3d(var(--x, 0px), 0, 0);
  will-change: transform;
}
.reel__list { display: flex; gap: var(--s-200); padding-right: var(--s-200); }
.reel__card {
  position: relative; display: block;
  height: clamp(160px, 26vh, 280px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r-2xl);
  background: var(--c-surface);
  transform: skewX(var(--skew, 0deg));
  transition: transform 500ms var(--ease);
}
.reel__card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 700ms var(--ease);
  user-select: none;
}
.reel__card:hover img { transform: scale(1.12); }
.reel__card:active { transform: skewX(var(--skew, 0deg)) scale(0.98); }
.reel__meta {
  position: absolute; left: var(--s-75); right: var(--s-75); bottom: var(--s-75);
  display: grid;
  padding: var(--s-75) var(--s-100);
  background: rgba(24, 24, 24, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: var(--r-lg); /* 16 − 8 */
  transform: translateY(calc(100% + var(--s-75)));
  transition: transform 500ms var(--ease);
}
.reel__card:hover .reel__meta,
.reel__card:focus-visible .reel__meta { transform: none; }
.reel__name { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.reel__kind { font-size: 0.75rem; line-height: 1rem; color: var(--c-text-muted); }

/* Al mòbil i amb menys moviment, el nom sempre a la vista. */
@media (hover: none), (prefers-reduced-motion: reduce) {
  .reel__meta { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reel { overflow-x: auto; }
  .reel__list[aria-hidden="true"] { display: none; }
}

/* 9. Problema → solució --------------------------------------------------- */
.problem {
  display: grid; gap: var(--s-600);
}
/* 10. Maquetes del procés ------------------------------------------------- */
/* Maquetes dins de cada fase */
.mock {
  width: 100%; max-width: 320px;
  padding: var(--s-200);
  font-size: 0.875rem; line-height: 1.25rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
}
.mock--chat { display: grid; gap: var(--s-75); }
.mock__bubble {
  justify-self: start; max-width: 85%;
  padding: var(--s-75) var(--s-100);
  background: var(--c-surface-2);
  border-radius: var(--r-lg);
}
.mock__bubble--us { justify-self: end; background: var(--c-accent); color: var(--c-on-accent); }
.mock--doc { position: relative; }
.mock__title { font-weight: 600; }
.mock--doc dl { display: grid; gap: var(--s-75); margin-top: var(--s-200); }
.mock--doc dl div {
  display: flex; justify-content: space-between; gap: var(--s-200);
  padding-bottom: var(--s-75); border-bottom: 1px solid var(--c-border);
}
.mock--doc dt { color: var(--c-text-muted); }
.mock--doc dd { margin: 0; font-weight: 500; }
.mock__stamp {
  display: inline-flex; align-items: center; gap: var(--s-50);
  margin-top: var(--s-200);
  padding: var(--s-25) var(--s-75);
  font-size: 0.75rem; line-height: 1rem; font-weight: 600;
  color: var(--c-on-accent); background: var(--c-accent);
  border-radius: var(--r-full);
}
.mock--files { display: grid; gap: var(--s-50); }
.mock--files li {
  display: flex; justify-content: space-between; gap: var(--s-200);
  padding: var(--s-75) var(--s-100);
  background: var(--c-surface-2);
  border-radius: var(--r-md);
}
.mock--files span { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.75rem; line-height: 1rem; }
.mock--files em { font-style: normal; font-size: 0.75rem; line-height: 1rem; color: var(--c-text-muted); }


/* 11. Preguntes ----------------------------------------------------------- */
.faq { display: grid; gap: var(--s-600); }
.faq__list { display: grid; gap: var(--s-100); }
.faq__item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  transition: background-color 300ms var(--ease);
}
.faq__item[open] { background: var(--c-surface-2); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-200);
  padding: var(--s-200) var(--s-300);
  font-size: 1.125rem; line-height: 1.75rem; font-weight: 500;
  cursor: pointer; list-style: none;
  border-radius: var(--r-2xl);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .icon {
  font-size: 1.25rem; color: var(--c-text-muted);
  transition: transform 500ms var(--ease), color 300ms var(--ease);
}
.faq__item summary:hover .icon { color: var(--c-text); }
.faq__item[open] summary .icon { transform: rotate(45deg); color: var(--c-accent); }
.faq__answer {
  padding: 0 var(--s-300) var(--s-300);
  color: var(--c-text-muted);
}
.faq__item[open] .faq__answer { animation: faq-in 500ms var(--ease); }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(calc(var(--s-75) * -1)); }
  to { opacity: 1; transform: none; }
}
.faq__side .lead a { color: var(--c-text); text-decoration: underline; text-underline-offset: 4px; }



/* 12. Peu ----------------------------------------------------------------- */
.footer { padding-top: var(--s-900); padding-bottom: var(--s-500); }
.footer__top { display: grid; gap: var(--s-600); }
.footer__tagline { margin-top: var(--s-200); max-width: 320px; color: var(--c-text-muted); }
.footer__social { display: flex; gap: var(--s-75); margin-top: var(--s-300); }
.footer__social a {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  font-size: 1.25rem;
  background: var(--c-surface-2);
  border-radius: var(--r-full);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.footer__social a:hover { background: var(--c-accent); color: var(--c-on-accent); }
.footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-500); }
.footer__col h2 {
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--c-text-muted);
}
.footer__col ul { display: grid; gap: var(--s-75); margin-top: var(--s-200); }
.footer__col a { transition: color 300ms var(--ease); }
.footer__col a:hover { color: var(--c-accent); }
/* Com el logo: «testart» en negreta i «studio» en light. */
.footer__wordmark {
  margin-top: var(--s-800);
  font-size: 14vw; line-height: 1; font-weight: 600; letter-spacing: -0.04em;
  color: var(--c-text);
  text-align: center; white-space: nowrap;
  user-select: none;
}
.footer__wordmark span { font-weight: 300; }
@media (min-width: 1280px) { .footer__wordmark { font-size: 8rem; } }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-200);
  margin-top: var(--s-300); padding-top: var(--s-300);
  border-top: 1px solid var(--c-border);
  font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-300); }
.footer__legal a { transition: color 300ms var(--ease); }
.footer__legal a:hover { color: var(--c-text); }
.footer__legal [aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

@media (min-width: 768px) {
  .footer__top { grid-template-columns: 2fr 3fr; }
  .footer__cols { grid-template-columns: repeat(3, auto); justify-content: space-between; }
}

/* 13. Revelats ------------------------------------------------------------ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--s-400));
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; }
  .js [data-reveal] { transform: none; transition: opacity 700ms var(--ease); }
  .menu__item { transform: none; }
  .btn:hover .icon, .link:hover .icon { transform: none; }
}

/* 14. Text centrat (com iurop) -----------------------------------------------
   Els encapçalaments i les entrades de secció van centrats; el hero no. */
.section-head { margin-inline: auto; text-align: center; }
.section-head .lead { margin-inline: auto; }

.problem { justify-items: center; }

.faq { justify-items: center; }
.faq__side { max-width: 680px; text-align: center; }
.faq__list { width: 100%; max-width: 760px; }


/* 15. Seccions fixades amb scroll ---------------------------------------------
   Cada [data-pin] és alt (n × 100vh) i el seu .pin__stage és sticky a 100vh.
   js/scroll.js hi escriu --p (0 → 1) segons el recorregut. Només s'anima
   transform i opacity. */
.pin { position: relative; }
.pin__stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid; place-items: center;
}

/* A. Frase fixada amb sortida -------------------------------------------- */
.pin--a { height: 300vh; }
.a__text {
  max-width: 1200px;
  text-align: center;
  padding-inline: var(--gutter);
  font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.03em; font-weight: 600;
  /* Sortida: l'últim 25% del recorregut la frase s'encongeix i puja. */
  --out: clamp(0, (var(--p) - 0.75) * 4, 1);
  transform: translateY(calc(var(--out) * -30vh)) scale(calc(1 - var(--out) * 0.35));
  opacity: calc(1 - var(--out));
}
@media (min-width: 768px) { .a__text { font-size: 3.75rem; line-height: 1; } }
.a__word { color: var(--c-text-dim); transition: color 400ms var(--ease); }
.a__word.is-on { color: var(--c-text); }
.a__word.is-accent.is-on { color: var(--c-accent); }

/* B. Projectes en scroll horitzontal ------------------------------------- */
.pin--b { height: 400vh; }
.pin--b .pin__stage { place-items: center start; }
.b__head {
  position: absolute; top: var(--s-900); left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: flex-end;
}
.b__count {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted);
}
.b__track {
  display: flex; gap: var(--s-400);
  padding-left: 50vw;
  /* --p mou la tira de dreta a esquerra; --w el calcula el JS. */
  transform: translate3d(calc(var(--p) * var(--w, 0px) * -1), 0, 0);
  will-change: transform;
}
.b__card {
  flex: none;
  width: min(60vw, 420px);
  /* --c: posició de la targeta respecte al centre (−1 … 1), del JS */
  transform:
    translateY(calc(var(--c, 0) * var(--c, 0) * var(--drop, 48px)))
    rotate(calc(var(--c, 0) * var(--tilt, 6deg)))
    scale(calc(1 - min(1, max(var(--c, 0) * -1, 0)) * 0.25));
  opacity: calc(1 - min(1, max(var(--c, 0) * -1 - 0.4, 0)) * 1.6);
}
.b__media {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-3xl);
  background: var(--c-surface);
}
.b__media img { width: 100%; height: 100%; object-fit: cover; }
.b__meta { display: flex; justify-content: space-between; gap: var(--s-200); margin-top: var(--s-200); }
.b__name { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.02em; }
.b__kind { color: var(--c-text-muted); }
.b__title {
  position: absolute; left: var(--gutter); top: 50%;
  max-width: 40vw;
  font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.03em;
  transform: translateY(-50%) translateX(calc(var(--p) * -60vw));
  opacity: calc(1 - var(--p) * 3);
}
.b__title span { color: var(--c-text-muted); }
@media (min-width: 1280px) { .b__title { font-size: 3rem; line-height: 1; } }

/* C. Disciplines apilades ------------------------------------------------- */
.pin--c { height: 400vh; }
.c__stack { position: relative; width: min(92vw, 880px); height: min(70vh, 520px); }
.c__card {
  position: absolute; inset: 0;
  display: grid; align-content: space-between;
  padding: var(--s-600);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-3xl);
  /* --e: entrada (0 → 1) i --b: quantes targetes té a sobre, del JS */
  transform:
    translateY(calc((1 - var(--e, 0)) * 110vh))
    scale(calc(1 - var(--b, 0) * 0.06))
    translateY(calc(var(--b, 0) * -24px));
}
/* La targeta de sota s'apaga amb una capa fosca, no amb opacity: si fos
   translúcida es veuria el text de la de més avall. */
.c__card::after {
  content: ""; position: absolute; inset: 0;
  background: #000;
  border-radius: inherit;
  opacity: calc(min(var(--b, 0), 1) * 0.55);
  pointer-events: none;
}
.c__card:nth-child(2) { background: var(--c-surface-2); }
.c__card:nth-child(3) { background: #313131; }
.c__card:nth-child(4) { background: var(--c-accent); color: var(--c-on-accent); }
.c__card:nth-child(4) .c__kind, .c__card:nth-child(4) p { color: rgba(0, 0, 0, 0.7); }
.c__num { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.875rem; line-height: 1.25rem; }
.c__kind { color: var(--c-text-muted); }
.c__card h3 { font-size: 3rem; line-height: 1; letter-spacing: -0.03em; max-width: 560px; }
.c__card p { max-width: 480px; margin-top: var(--s-200); color: var(--c-text-muted); font-size: 1.125rem; line-height: 1.75rem; }

/* D. Procés en línia de temps -------------------------------------------- */
.pin--d { height: 400vh; }
.d__grid {
  display: grid; gap: var(--s-600);
  width: min(92vw, 1100px);
  align-items: center;
}
@media (min-width: 900px) { .d__grid { grid-template-columns: 5fr 6fr; } }
.d__left { position: relative; }
.d__nums { position: relative; height: 128px; overflow: hidden; }
.d__num {
  position: absolute; inset: 0;
  font-size: 8rem; line-height: 1; font-weight: 600; letter-spacing: -0.06em;
  color: var(--c-accent);
  /* --s: posició relativa a la fase activa (−1, 0, 1), del JS */
  transform: translateY(calc(var(--s, 1) * 100%));
  opacity: calc(1 - min(1, max(var(--s, 1), var(--s, 1) * -1)));
}
.d__titles { position: relative; height: 96px; margin-top: var(--s-300); }
.d__titles > div {
  position: absolute; inset: 0;
  transform: translateY(calc(var(--s, 1) * 32px));
  opacity: calc(1 - min(1, max(var(--s, 1), var(--s, 1) * -1)) * 1.5);
}
.d__titles h3 { font-size: 1.875rem; line-height: 2.25rem; }
.d__titles p { margin-top: var(--s-75); color: var(--c-text-muted); }
.d__bar { height: 2px; margin-top: var(--s-500); background: var(--c-border); border-radius: var(--r-full); overflow: hidden; }
.d__bar span {
  display: block; height: 100%;
  background: var(--c-accent);
  transform-origin: left;
  transform: scaleX(var(--p));
}
.d__right { position: relative; height: 360px; }
.d__right .mock {
  position: absolute; inset: 0; margin: auto; height: max-content;
  transform: translateX(calc(var(--s, 1) * 60px)) scale(calc(1 - min(1, max(var(--s, 1), var(--s, 1) * -1)) * 0.1));
  opacity: calc(1 - min(1, max(var(--s, 1), var(--s, 1) * -1)) * 1.5);
}

/* E. CTA «El logo s'obre» --------------------------------------------------
   --o (0 → 1) separa les peces; --t (0 → 1) fa entrar el text. Les escriu
   js/scroll.js. */
.pin--e { height: 260vh; }
.lo {
  --pw: clamp(120px, 15vw, 220px);
  --dx: 38vw; --dy: 0px; --grow: 0.9;
  position: absolute; inset: 0;
  display: grid; place-items: center;
  overflow: hidden;
}
.lo__piece {
  position: absolute; top: 50%; left: 50%;
  width: var(--pw); height: auto;
  opacity: calc(1 - var(--o, 0) * 0.3);
  transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(calc(1 + var(--o, 0) * var(--grow)));
  will-change: transform;
}
.lo__piece--w { --x: calc(var(--o, 0) * var(--dx) * -1 - var(--pw) * 0.53); --y: calc(var(--o, 0) * var(--dy) * -1); }
.lo__piece--y { --x: calc(var(--o, 0) * var(--dx) + var(--pw) * 0.53); --y: calc(var(--o, 0) * var(--dy)); }
.lo__body {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: var(--s-300);
  padding-inline: var(--gutter);
  text-align: center;
  opacity: var(--t, 0);
  transform: translateY(calc((1 - var(--t, 0)) * 24px));
  visibility: hidden;
}
.pin--e.is-open .lo__body, .lo__body:focus-within { visibility: visible; }
.lo__body:focus-within { opacity: 1; transform: none; }
.lo__q { font-size: 3rem; line-height: 0.95; letter-spacing: -0.045em; }
@media (min-width: 768px) { .lo__q { font-size: 5.25rem; } }
.lo__text { max-width: 44ch; font-size: 1.125rem; line-height: 1.75rem; color: var(--c-text-muted); }
.lo__mail { color: var(--c-text-muted); font-weight: 500; transition: color 300ms var(--ease); }
.lo__mail:hover { color: var(--c-text); }
/* Al mòbil les peces s'obren cap a les cantonades, no cap als costats. */
@media (max-width: 767px) {
  .lo { --pw: 110px; --dx: 30vw; --dy: 34svh; --grow: 0.25; }
}
.btn--dark { background: #181818; color: #ffffff; }
.btn--dark:hover { background: #000000; }

/* Menys moviment: tot quiet i visible. */
@media (prefers-reduced-motion: reduce) {
  .pin { height: auto !important; }
  .pin__stage { position: relative; height: auto; min-height: 100svh; padding-block: var(--s-900); }
  .a__text, .b__title { transform: none; opacity: 1; }
  .pin--e { --o: 1; --t: 1; }
  .pin--e .lo { position: relative; min-height: 100svh; }
  .pin--e .lo__body { visibility: visible; }
  .a__word { color: var(--c-text); }
  .b__track { transform: none; overflow-x: auto; padding-left: var(--gutter); max-width: 100vw; }
  .b__card { transform: none; opacity: 1; }
  .c__stack { height: auto; display: grid; gap: var(--s-200); }
  .c__card { position: relative; transform: none; opacity: 1; }
}

/* Encapçalament dins de les seccions fixades (C i D) */
.pin--c .pin__stage,
.pin--d .pin__stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-500);
  padding-top: var(--s-700);
}
.pin__head { text-align: center; padding-inline: var(--gutter); }
.pin__title {
  margin-top: var(--s-100);
  font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -0.02em;
}
.pin__title .is-dim { color: var(--c-text-muted); }
@media (min-width: 768px) { .pin__title { font-size: 2.25rem; line-height: 2.5rem; } }
.pin--c .c__stack { height: min(56vh, 480px); }

.b__all { position: absolute; right: var(--gutter); bottom: var(--s-500); }

.cta__actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--s-300);
}




/* 16. Motion design (GSAP, js/motion.js) -------------------------------------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* GSAP porta els revelats: sense la transició CSS, que s'hi barallaria. */
.has-gsap [data-reveal] { transition: none; }

/* Línies dels títols: la màscara amaga la línia mentre puja. */
.split-line { display: block; }
/* Al títol del hero el degradat va a cada línia, perquè les línies es mouen. */
.hero__title.is-split { background: none; -webkit-text-fill-color: currentColor; color: var(--c-text); }
.hero__line {
  background: linear-gradient(90deg, #ffffff 0%, #9b9b9b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-bottom: 0.08em; /* que la màscara no talli els descendents */
}

.hero.is-intro .hero__content, .hero.is-intro .reel { visibility: hidden; }

/* Preloader: les dues peces del logo s'ajunten i el teló puja. */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--c-bg);
}
/* Proporcions del símbol oficial: dues peces de 290 px amb 16 px entre elles. */
.loader__mark { display: flex; justify-content: space-between; width: min(40vw, 220px); }
.loader__mark img { width: 48.66%; height: auto; }
.loader__count {
  position: absolute; right: var(--gutter); bottom: var(--s-400);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted);
}

/* Cursor propi */
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor summary { cursor: none; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 90;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  display: grid; place-items: center;
  background: var(--c-accent);
  border-radius: var(--r-full);
  pointer-events: none;
  mix-blend-mode: difference;
  transition: width 300ms var(--ease), height 300ms var(--ease), margin 300ms var(--ease), background-color 200ms var(--ease), opacity 200ms var(--ease);
  will-change: transform;
}
.cursor.is-link { width: 40px; height: 40px; margin: -20px 0 0 -20px; background: #ffffff; }
.cursor.is-view { width: 88px; height: 88px; margin: -44px 0 0 -44px; mix-blend-mode: normal; }
.cursor.is-down { width: 8px; height: 8px; margin: -4px 0 0 -4px; }
.cursor__label {
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 600;
  color: var(--c-on-accent);
  opacity: 0; transform: scale(0.6);
  transition: opacity 300ms var(--ease), transform 400ms var(--ease);
}
.cursor.is-view .cursor__label { opacity: 1; transform: none; }

/* =============================================================================
   17. Pàgines interiors
   ========================================================================== */

/* Capçalera de pàgina: centrada, com el hero però sense 3D */
.page-hero {
  padding-top: calc(var(--s-900) + var(--s-800));
  padding-bottom: var(--s-800);
  text-align: center;
}
.page-hero__title {
  max-width: 960px; margin: var(--s-300) auto 0;
  font-size: 3rem; line-height: 1; letter-spacing: -0.04em; font-weight: 600;
}
@media (min-width: 768px) { .page-hero__title { font-size: 4.5rem; } }
@media (min-width: 1280px) { .page-hero__title { font-size: 6rem; } }
.page-hero__title .split-line, .page-hero__title:not(.is-split) {
  background: linear-gradient(90deg, #ffffff 0%, #9b9b9b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-bottom: 0.08em;
}
.page-hero__title.is-split { background: none; -webkit-text-fill-color: currentColor; }
.page-hero .lead { max-width: 640px; margin-inline: auto; }
.crumbs {
  display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-75);
  font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted);
}
.crumbs a { transition: color 300ms var(--ease); }
.crumbs a:hover { color: var(--c-text); }
.crumbs span[aria-hidden] { opacity: 0.5; }

/* Filtres */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-75); }
.chip {
  padding: var(--s-75) var(--s-200);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  color: var(--c-text-muted);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  transition: color 300ms var(--ease), background-color 300ms var(--ease), border-color 300ms var(--ease), transform 500ms var(--ease);
}
.chip:hover { color: var(--c-text); border-color: #4a4a4a; }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { color: var(--c-on-accent); background: var(--c-accent); border-color: var(--c-accent); }
.chip__n { margin-left: var(--s-50); opacity: 0.6; font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.75rem; }

/* Graella de projectes */
.work { display: grid; gap: var(--s-300); margin-top: var(--s-600); }
@media (min-width: 640px) { .work { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .work { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-400) var(--s-300); padding-bottom: var(--s-700); }
  /* Ritme: la columna del mig baixa una mica */
  .work__item:nth-child(3n + 2) { margin-top: var(--s-700); margin-bottom: calc(var(--s-700) * -1); }
}
.work__item[hidden] { display: none; }
.work__card { display: block; }
.work__media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-2xl);
  background: var(--c-surface);
}
.work__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.01);
  transition: transform 900ms var(--ease);
}
.work__card:hover .work__media img { transform: scale(1.07); }
.work__meta { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-200); margin-top: var(--s-200); }
.work__name { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.work__kind { font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); text-align: right; }
.work__empty { margin-top: var(--s-600); text-align: center; color: var(--c-text-muted); }

/* Fitxa de projecte */
.case-hero { position: relative; height: 90vh; height: 90svh; min-height: 560px; overflow: hidden; }
.case-hero__img { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; object-fit: cover; }
.case-hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }
.case-hero__content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  max-width: var(--container); margin-inline: auto;
  padding: 0 var(--gutter) var(--s-700);
}
.case-hero__content .crumbs { justify-content: flex-start; color: rgba(255, 255, 255, 0.75); }
.case-hero__title { margin-top: var(--s-200); font-size: 4.5rem; line-height: 1; letter-spacing: -0.04em; }
@media (min-width: 1024px) { .case-hero__title { font-size: 8rem; } }
.case-hero__sub { margin-top: var(--s-200); font-size: 1.25rem; line-height: 1.75rem; color: rgba(255, 255, 255, 0.85); }

.case-intro { display: grid; gap: var(--s-600); }
@media (min-width: 1024px) { .case-intro { grid-template-columns: 7fr 4fr; gap: var(--s-900); } }
.case-intro__text p { font-size: 1.25rem; line-height: 1.75rem; color: var(--c-text-muted); }
.case-intro__text p:first-child { font-size: 1.875rem; line-height: 2.25rem; color: var(--c-text); letter-spacing: -0.02em; }
.case-intro__text p + p { margin-top: var(--s-300); }
.case-facts { display: grid; gap: var(--s-300); align-content: start; }
.case-facts div { padding-bottom: var(--s-200); border-bottom: 1px solid var(--c-border); }
.case-facts dt { font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.case-facts dd { margin: var(--s-50) 0 0; font-weight: 500; }

.case-statement {
  max-width: 1024px; margin-inline: auto;
  font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.03em; text-align: center;
}
@media (min-width: 768px) { .case-statement { font-size: 3.75rem; line-height: 1; } }

.case-gallery { display: grid; gap: var(--s-300); }
.case-gallery figure { margin: 0; }
.case-gallery .frame { overflow: hidden; border-radius: var(--r-3xl); background: var(--c-surface); }
.case-gallery img { width: 100%; height: 100%; object-fit: cover; }
.case-gallery figcaption { margin-top: var(--s-100); font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.case-gallery .is-wide .frame { aspect-ratio: 16 / 9; }
.case-gallery .is-pair { display: grid; gap: var(--s-300); }
@media (min-width: 768px) { .case-gallery .is-pair { grid-template-columns: 1fr 1fr; } }
.case-gallery .is-pair .frame { aspect-ratio: 4 / 5; }

.case-split { display: grid; gap: var(--s-600); align-items: center; }
@media (min-width: 1024px) { .case-split { grid-template-columns: 5fr 7fr; gap: var(--s-900); } }
.case-split h2 { font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.02em; }
.case-split p { margin-top: var(--s-200); color: var(--c-text-muted); font-size: 1.125rem; line-height: 1.75rem; }
.case-split .frame { overflow: hidden; aspect-ratio: 1; border-radius: var(--r-3xl); }
.case-split img { width: 100%; height: 100%; object-fit: cover; }
.case-split figcaption { margin-top: var(--s-100); font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }

.next-case {
  position: relative; display: grid; place-items: center;
  min-height: 70vh;
  overflow: hidden; isolation: isolate;
  border-radius: var(--r-3xl);
  text-align: center;
}
.next-case img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 1200ms var(--ease); }
.next-case::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, 0.5); transition: background-color 600ms var(--ease); }
.next-case:hover img { transform: scale(1.12); }
.next-case:hover::after { background: rgba(0, 0, 0, 0.35); }
.next-case__label { font-size: 0.875rem; line-height: 1.25rem; color: rgba(255, 255, 255, 0.75); }
.next-case__name { display: block; margin-top: var(--s-100); font-size: 4.5rem; line-height: 1; letter-spacing: -0.04em; font-weight: 600; }
@media (min-width: 1024px) { .next-case__name { font-size: 8rem; } }

/* Blog */
.featured {
  display: grid; gap: var(--s-400);
  padding: var(--s-75);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-3xl);
  transition: background-color 300ms var(--ease);
}
.featured:hover { background: var(--c-surface-2); }
@media (min-width: 1024px) { .featured { grid-template-columns: 7fr 5fr; align-items: center; } }
.featured__media { overflow: hidden; aspect-ratio: 16 / 11; border-radius: var(--r-2xl); }
.featured__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.featured:hover .featured__media img { transform: scale(1.05); }
.featured__body { padding: var(--s-300); }
.featured__body h2 { margin-top: var(--s-200); font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.02em; }
.featured__body p { margin-top: var(--s-200); color: var(--c-text-muted); font-size: 1.125rem; line-height: 1.75rem; }
.featured__body .link { margin-top: var(--s-400); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-100); font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.tag {
  display: inline-flex; padding: var(--s-25) var(--s-100);
  font-size: 0.75rem; line-height: 1rem; font-weight: 500;
  color: var(--c-on-accent); background: var(--c-accent);
  border-radius: var(--r-full);
}
.posts { display: grid; gap: var(--s-400) var(--s-300); margin-top: var(--s-600); }
@media (min-width: 640px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post[hidden] { display: none; }
.post a { display: block; }
.post__media { overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--r-2xl); background: var(--c-surface); }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.post a:hover .post__media img { transform: scale(1.06); }
.post h3 { margin-top: var(--s-200); font-size: 1.25rem; line-height: 1.75rem; letter-spacing: -0.01em; transition: color 300ms var(--ease); }
.post a:hover h3 { color: var(--c-accent); }
.post .post-meta { margin-top: var(--s-200); }

/* Article */
.article-head { max-width: 880px; margin-inline: auto; text-align: center; }
.article-head .post-meta { justify-content: center; margin-top: var(--s-300); }
.article-head .page-hero__title { font-size: 3rem; }
@media (min-width: 768px) { .article-head .page-hero__title { font-size: 4.5rem; } }
.article-head .lead { max-width: 640px; margin-inline: auto; }
.author { display: inline-flex; align-items: center; gap: var(--s-100); margin-top: var(--s-400); text-align: left; }
.author__mark { width: 40px; height: 40px; display: grid; place-items: center; background: var(--c-surface-2); border-radius: var(--r-full); flex: none; }
.author__mark img { width: 24px; height: auto; }
.author strong { display: block; font-weight: 600; }
.author span { font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.article-cover { margin-top: var(--s-700); overflow: hidden; aspect-ratio: 21 / 9; border-radius: var(--r-3xl); background: var(--c-surface); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.article-layout { display: grid; gap: var(--s-600); margin-top: var(--s-800); }
@media (min-width: 1024px) { .article-layout { grid-template-columns: 3fr 8fr; gap: var(--s-900); } }
.toc { align-self: start; }
@media (min-width: 1024px) { .toc { position: sticky; top: var(--s-900); } }
.toc__title { font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.toc ol { display: grid; gap: var(--s-50); margin-top: var(--s-200); border-left: 1px solid var(--c-border); }
.toc a {
  display: block; padding: var(--s-50) var(--s-200);
  margin-left: -1px; border-left: 1px solid transparent;
  font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted);
  transition: color 300ms var(--ease), border-color 300ms var(--ease);
}
.toc a:hover { color: var(--c-text); }
.toc a.is-active { color: var(--c-text); border-left-color: var(--c-accent); }

.prose { max-width: 720px; }
.prose h2 { margin-top: var(--s-700); font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -0.02em; scroll-margin-top: var(--s-900); }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-top: var(--s-300); font-size: 1.125rem; line-height: 1.75rem; color: #d0cec6; }
.prose figure { margin: var(--s-600) 0 0; }
.prose figure .frame { overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--r-2xl); }
.prose figure img { width: 100%; height: 100%; object-fit: cover; }
.prose figcaption { margin-top: var(--s-100); font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.prose blockquote {
  margin: var(--s-600) 0 0; padding-left: var(--s-300);
  border-left: 2px solid var(--c-accent);
  font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -0.02em; font-weight: 500;
}
.inline-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-300);
  margin-top: var(--s-600); padding: var(--s-400);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
}
.inline-cta strong { display: block; font-size: 1.25rem; line-height: 1.75rem; }
.inline-cta span { color: var(--c-text-muted); }
.share { display: flex; align-items: center; gap: var(--s-100); margin-top: var(--s-700); padding-top: var(--s-300); border-top: 1px solid var(--c-border); color: var(--c-text-muted); }
.share a { display: grid; place-items: center; width: 40px; height: 40px; font-size: 1.25rem; color: var(--c-text); background: var(--c-surface-2); border-radius: var(--r-full); transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.share a:hover { background: var(--c-accent); color: var(--c-on-accent); }
.share span { margin-right: var(--s-75); }
.bio { display: flex; gap: var(--s-200); margin-top: var(--s-400); padding: var(--s-400); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-2xl); }
.bio p { margin: var(--s-50) 0 0; font-size: 1rem; line-height: 1.5rem; color: var(--c-text-muted); }

/* Contacte */
.contact { display: grid; gap: var(--s-600); }
@media (min-width: 1024px) { .contact { grid-template-columns: 7fr 4fr; gap: var(--s-800); align-items: start; } }
.form {
  display: grid; gap: var(--s-300);
  padding: var(--s-400);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-3xl);
}
@media (min-width: 768px) { .form { grid-template-columns: 1fr 1fr; padding: var(--s-600); } }
.field { display: grid; gap: var(--s-75); align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.field .opt { color: var(--c-text-muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: var(--s-100) var(--s-200);
  font: inherit; font-size: 1rem; line-height: 1.5rem;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  transition: border-color 300ms var(--ease);
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #4a4a4a; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-accent); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #ff6b5a; }
.field__error { display: none; font-size: 0.875rem; line-height: 1.25rem; color: #ff8b7d; }
.field.has-error .field__error { display: block; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: var(--s-75); margin-top: var(--s-50); }
.check { position: relative; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span {
  display: inline-flex; padding: var(--s-75) var(--s-200);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  color: var(--c-text-muted); background: var(--c-bg);
  border: 1px solid var(--c-border); border-radius: var(--r-full);
  cursor: pointer;
  transition: color 300ms var(--ease), background-color 300ms var(--ease), border-color 300ms var(--ease);
}
.check input:checked + span { color: var(--c-on-accent); background: var(--c-accent); border-color: var(--c-accent); }
.check input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.consent { display: flex; gap: var(--s-100); align-items: flex-start; font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.consent input { width: 18px; height: 18px; margin-top: 1px; accent-color: #ffd400; flex: none; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-300); }
.form__note { font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.form__status {
  grid-column: 1 / -1;
  display: none; padding: var(--s-200) var(--s-300);
  border-radius: var(--r-xl);
  background: rgba(255, 212, 0, 0.12); color: var(--c-text);
}
.form__status.is-visible { display: block; }
.contact-info { display: grid; gap: var(--s-300); }
.contact-info div { padding-bottom: var(--s-200); border-bottom: 1px solid var(--c-border); }
.contact-info dt { font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.contact-info dd { margin: var(--s-50) 0 0; font-size: 1.25rem; line-height: 1.75rem; font-weight: 500; }
.contact-info a { transition: color 300ms var(--ease); }
.contact-info a:hover { color: var(--c-accent); }
.after { display: grid; gap: var(--s-200); margin-top: var(--s-600); }
@media (min-width: 900px) { .after { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-300); } }
.after li { padding: var(--s-400); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-2xl); }
.after__num {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.875rem;
  color: var(--c-on-accent); background: var(--c-accent); border-radius: var(--r-full);
}
.after p { margin-top: var(--s-300); color: var(--c-text-muted); font-size: 1.125rem; line-height: 1.75rem; }

/* Dues maneres de treballar */
.modes { display: grid; gap: var(--s-300); margin-top: var(--s-600); }
@media (min-width: 900px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode {
  padding: var(--s-600);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-3xl);
}
.mode__letter {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  font-size: 1.25rem; font-weight: 600;
  color: var(--c-on-accent); background: var(--c-accent); border-radius: var(--r-xl);
}
.mode h3 { margin-top: var(--s-500); font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -0.02em; }
.mode p { margin-top: var(--s-200); color: var(--c-text-muted); font-size: 1.125rem; line-height: 1.75rem; }
.c__card ul { display: flex; flex-wrap: wrap; gap: var(--s-75); margin-top: var(--s-300); }
.c__card li { padding: var(--s-50) var(--s-100); font-size: 0.75rem; line-height: 1rem; background: rgba(0, 0, 0, 0.25); border-radius: var(--r-full); }
.c__card:nth-child(4) li { background: rgba(0, 0, 0, 0.12); }

/* Revelat d'imatges (js/motion.js): la màscara s'obre i la foto s'assenta */
[data-img-reveal] { overflow: hidden; }

/* 404 */
.notfound { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--s-900) var(--gutter); }
.notfound__code { font-size: 8rem; line-height: 1; font-weight: 600; letter-spacing: -0.06em; color: var(--c-accent); }
@media (min-width: 768px) { .notfound__code { font-size: 9rem; } }
.notfound h1 { margin-top: var(--s-300); font-size: 2.25rem; line-height: 2.5rem; }
.notfound p { max-width: 480px; margin: var(--s-200) auto var(--s-500); color: var(--c-text-muted); }

/* Esquelet de càrrega: el bloc batega suaument fins que la foto ha baixat;
   llavors la foto hi entra fonent-se. */
.is-loading { animation: skeleton 1.4s var(--ease) infinite alternate; }
@keyframes skeleton { from { opacity: 1; } to { opacity: 0.55; } }
.is-loading img { opacity: 0; }
.is-loaded img { transition: opacity 600ms var(--ease), transform 900ms var(--ease); }
@media (prefers-reduced-motion: reduce) { .is-loading { animation: none; } }

/* Projectes en horitzontal, al mòbil: el títol a dalt (no darrere la primera
   targeta), targetes més amples i centrades, menys inclinació, i el nom a
   sobre del tipus. */
@media (max-width: 767px) {
  .pin--b .pin__stage { align-items: end; padding-bottom: calc(var(--s-900) + var(--s-200)); }
  .b__title {
    top: calc(var(--s-900) + var(--s-300)); left: var(--gutter); right: var(--gutter);
    max-width: none;
    font-size: 1.875rem; line-height: 2.25rem;
    transform: translateX(calc(var(--p) * -60vw));
  }
  .b__head { top: calc(var(--s-900) + var(--s-50)); }
  .b__track { gap: var(--s-200); padding-left: 14vw; }
  .b__card { width: 72vw; --tilt: 2.5deg; --drop: 12px; }
  .b__meta { flex-direction: column; gap: var(--s-25); margin-top: var(--s-100); }
  .b__name { font-size: 1.25rem; line-height: 1.75rem; }
  .b__kind { font-size: 0.875rem; line-height: 1.25rem; }
  .b__all { bottom: var(--s-400); }
}

/* =============================================================================
   18. Serveis: índex, detall, productes i selector
   ========================================================================== */

/* A. Índex tipogràfic */
.svc-index { border-top: 1px solid var(--c-border); }
.svc-row { border-bottom: 1px solid var(--c-border); }
.svc-row__trigger {
  width: 100%;
  display: flex; align-items: baseline; gap: var(--s-300);
  padding-block: var(--s-300);
  text-align: left;
}
.svc-row__num { flex: none; width: var(--s-400); font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.svc-row__name {
  font-size: 3rem; line-height: 1; letter-spacing: -0.045em; font-weight: 600;
  color: var(--c-text-muted);
  transition: color 400ms var(--ease), transform 600ms var(--ease);
}
@media (min-width: 768px) { .svc-row__name { font-size: 4.5rem; } }
@media (min-width: 1280px) { .svc-row__name { font-size: 6rem; } }
.svc-row.is-open .svc-row__name, .svc-row__trigger:hover .svc-row__name { color: var(--c-text); transform: translateX(var(--s-200)); }
.svc-row__plus { margin-left: auto; align-self: center; font-size: 1.5rem; color: var(--c-text-muted); transition: transform 500ms var(--ease), color 300ms var(--ease); }
.svc-row.is-open .svc-row__plus { transform: rotate(45deg); color: var(--c-accent); }
.svc-row__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 600ms var(--ease); }
.svc-row.is-open .svc-row__body { grid-template-rows: 1fr; }
.svc-row__body > div { overflow: hidden; }
.svc-row__inner { display: grid; gap: var(--s-200); justify-items: start; padding: 0 0 var(--s-400) calc(var(--s-400) + var(--s-300)); }
.svc-row__inner p { max-width: 560px; font-size: 1.125rem; line-height: 1.75rem; color: var(--c-text-muted); }
.svc-chips { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.svc-chips li { padding: var(--s-50) var(--s-100); font-size: 0.875rem; line-height: 1.25rem; background: var(--c-surface-2); border-radius: var(--r-full); }
@media (max-width: 767px) { .svc-row__inner { padding-left: 0; } }

/* La foto que segueix el cursor (només amb ratolí) */
.svc-cursor {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: 240px; aspect-ratio: 4 / 5;
  overflow: hidden; border-radius: var(--r-2xl);
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.svc-cursor img { width: 100%; height: 100%; object-fit: cover; }
.svc-cursor.is-on { opacity: 1; }
@media (hover: none) { .svc-cursor { display: none; } }

/* C. Selector «Què necessites?» */
.picker__opts {
  display: grid; gap: var(--s-100);
  max-width: 1024px; margin: var(--s-600) auto 0;
}
@media (min-width: 640px) { .picker__opts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .picker__opts { grid-template-columns: repeat(3, 1fr); } }
.picker__opt {
  display: grid; gap: var(--s-50);
  padding: var(--s-200) var(--s-300);
  text-align: left;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  transition: border-color 300ms var(--ease), background-color 300ms var(--ease), transform 500ms var(--ease);
}
.picker__opt:hover { border-color: #4a4a4a; transform: translateY(-2px); }
.picker__opt:active { transform: scale(0.98); }
.picker__opt[aria-pressed="true"] { border-color: var(--c-accent); background: var(--c-surface-2); }
.picker__opt strong { font-weight: 600; }
.picker__opt span { font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.picker__result {
  display: grid; gap: var(--s-400);
  max-width: 1024px; margin: var(--s-300) auto 0;
  padding: var(--s-400);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-3xl);
}
@media (min-width: 900px) { .picker__result { grid-template-columns: 1fr 1fr; padding: var(--s-600); } .picker__cta { grid-column: 1 / -1; } }
.picker__label { margin-bottom: var(--s-100); font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.picker__svcs { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.picker__svcs li {
  padding: var(--s-75) var(--s-200);
  font-size: 0.875rem; line-height: 1.25rem;
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  transition: color 400ms var(--ease), background-color 400ms var(--ease), border-color 400ms var(--ease);
}
.picker__svcs li.is-on { color: var(--c-on-accent); background: var(--c-accent); border-color: var(--c-accent); font-weight: 500; }
.picker__plan { display: grid; counter-reset: plan; }
.picker__plan li { display: flex; gap: var(--s-200); align-items: baseline; padding-block: var(--s-100); border-top: 1px solid var(--c-border); animation: picker-in 600ms var(--ease) both; }
.picker__plan li::before { counter-increment: plan; content: counter(plan, decimal-leading-zero); font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.75rem; line-height: 1rem; color: var(--c-accent); }
@keyframes picker-in { from { opacity: 0; transform: translateY(var(--s-100)); } to { opacity: 1; transform: none; } }
.picker__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-200); }
.picker__note { font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
@media (prefers-reduced-motion: reduce) {
  .picker__plan li { animation: none; }
}

/* Variant del hero amb el text centrat (index-centrat.html). El logo 3D
   passa a sobre del títol (js/hero-3d.js, data-layout="center"). */
.hero--center .hero__content { align-items: center; text-align: center; justify-content: flex-end; padding-bottom: var(--s-500); }
.hero--center .hero__title { max-width: none; margin-inline: auto; }
.hero--center .hero__sub { margin-inline: auto; }
.hero--center .hero__actions { justify-content: center; }
.hero--center .hero__line { background-position: center; }
@media (max-width: 767px) { .hero--center .hero__content { justify-content: flex-start; padding-bottom: 0; } }

/* =============================================================================
   19. Components amb llum (fets a casa, sense llicències)
   ========================================================================== */

/* Vora de llum: una línia groga que dona la volta a la targeta, amb un halo
   difuminat. La rotació ha de ser constant, per això és lineal. */
@property --halo-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.halo { position: relative; isolation: isolate; }
.halo::before, .halo::after {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--halo-angle), transparent 0deg, transparent 250deg, rgba(255, 212, 0, 0.9) 320deg, #ffffff 335deg, transparent 350deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: halo-spin 6s linear infinite;
  pointer-events: none;
}
.halo::after { filter: blur(10px); opacity: 0.6; padding: 2px; }
.halo:hover::before, .halo:hover::after { animation-duration: 3s; }
@keyframes halo-spin { to { --halo-angle: 360deg; } }

/* Botó de vidre: una llum que segueix el cursor dins el botó groc i, als
   botons principals, una passada de llum cada pocs segons. */
.btn--primary { position: relative; overflow: hidden; isolation: isolate; }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.85), transparent 70%);
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.btn--primary:hover::before { opacity: 1; }
.btn--primary:hover { background: var(--c-accent); }
.btn--sheen::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sheen 5s var(--ease) infinite 2.5s;
}
@keyframes sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* Captures de Xerra i Kèrix dins la targeta */
.product__shot {
  width: 100%; overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: var(--s-100);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  background: var(--c-bg);
}
.product__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 900ms var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .halo::before, .halo::after, .btn--sheen::after { animation: none; }
}


/* Repàs del responsive al mòbil ------------------------------------------- */
@media (max-width: 767px) {
  /* Projectes en horitzontal: targetes més estretes perquè no tapin el títol. */
  .b__card { width: 60vw; }
  .pin--b .pin__stage { padding-bottom: calc(var(--s-900) + var(--s-100)); }
  /* Índex de serveis: noms en una línia. */
  .svc-row__name { font-size: 2.25rem; line-height: 2.5rem; }
  .svc-row__trigger { gap: var(--s-200); padding-block: var(--s-200); }
}


/* Targetes del blog: la foto ocupa tota la targeta i el títol hi va a sobre,
   amb el tema a dalt i una fletxa que gira en passar-hi el ratolí. */
.post a {
  position: relative; display: block; isolation: isolate;
  aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--r-3xl);
  background: var(--c-surface);
}
.post .post__media { position: absolute; inset: 0; z-index: -2; aspect-ratio: auto; border-radius: 0; }
.post a::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0) 100%);
}
.post__tag { position: absolute; top: var(--s-200); left: var(--s-200); }
.post__arrow {
  position: absolute; top: var(--s-200); right: var(--s-200);
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color 300ms var(--ease), color 300ms var(--ease), transform 500ms var(--ease);
}
.post a:hover .post__arrow { background: var(--c-accent); color: var(--c-on-accent); transform: rotate(45deg); }
.post__body { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: var(--s-75); padding: var(--s-300); }
.post .post__body h3 { margin: 0; font-size: 1.25rem; line-height: 1.75rem; letter-spacing: -0.02em; color: var(--c-text); }
.post a:hover .post__body h3 { color: var(--c-text); }
.post__mins { font-size: 0.875rem; line-height: 1.25rem; color: rgba(255, 255, 255, 0.72); }

/* Portada: serveis en graella de 2 × 2 ----------------------------------------- */
.svc-grid { display: grid; gap: var(--s-300); margin-top: var(--s-600); }
@media (min-width: 768px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
.svc-card {
  display: grid; align-content: space-between; gap: var(--s-500);
  min-height: 320px; padding: var(--s-500);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-3xl);
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease), transform 600ms var(--ease);
}
.svc-card:hover { background: var(--c-surface-2); border-color: #4a4a4a; transform: translateY(calc(var(--s-50) * -1)); }
.svc-card:nth-child(4) { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.svc-card:nth-child(4) .c__kind, .svc-card:nth-child(4) p { color: rgba(0, 0, 0, 0.7); }
.svc-card .c__num { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.875rem; line-height: 1.25rem; }
.svc-card .c__kind { color: var(--c-text-muted); }
.svc-card h3 { font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.03em; max-width: 460px; }
.svc-card p { margin-top: var(--s-200); max-width: 460px; color: var(--c-text-muted); font-size: 1.125rem; line-height: 1.75rem; }
.svc-grid__more { margin-top: var(--s-500); text-align: center; }
@media (max-width: 767px) { .svc-card { min-height: 0; padding: var(--s-400); } .svc-card h3 { font-size: 1.875rem; line-height: 2.25rem; } }

/* Portada: showreel ----------------------------------------------------------- */
.reel-video {
  position: relative; width: 100%; max-width: 1100px; margin: 0;
  overflow: hidden; aspect-ratio: 16 / 9;
  border: 1px solid var(--c-border); border-radius: var(--r-3xl);
  background: var(--c-surface);
}
.reel-video__media { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-video__sound {
  position: absolute; right: var(--s-200); bottom: var(--s-200);
  padding: var(--s-75) var(--s-200);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 600;
  color: var(--c-text); background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: var(--r-full);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.reel-video__sound:hover { background: var(--c-accent); color: var(--c-on-accent); }
.reel-video__off { display: none; }
.reel-video__sound[aria-pressed="true"] .reel-video__on { display: none; }
.reel-video__sound[aria-pressed="true"] .reel-video__off { display: inline; }
@media (max-width: 767px) { .reel-video { aspect-ratio: 9 / 16; max-width: 420px; margin-inline: auto; } }

/* Seqüència controlada per scroll (del caos a la marca) ---------------------- */
.pin--seq { height: 300vh; }
.seq__canvas, .seq__fallback {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* S'esvaeix cap als marges; les dues màscares arriben a zero a dalt i a baix
     perquè no es vegi cap línia contra la secció veïna. */
  -webkit-mask-image:
    radial-gradient(ellipse 72% 68% at 50% 48%, #000 52%, transparent 100%),
    linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(ellipse 72% 68% at 50% 48%, #000 52%, transparent 100%),
    linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-composite: intersect;
}
.seq__fallback { display: none; }
.pin--seq .pin__stage::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  -webkit-mask-image:
    radial-gradient(ellipse 66% 62% at 50% 48%, transparent 45%, #000 90%),
    linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(ellipse 66% 62% at 50% 48%, transparent 45%, #000 90%),
    linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-composite: intersect;
}
.seq__line {
  position: absolute; left: 50%; bottom: 14vh; z-index: 2;
  width: min(92vw, 880px);
  font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -0.02em; font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.6);
  /* --v (0 → 1 → 0) l'escriu js/scroll.js: entra pujant i surt pujant. */
  opacity: var(--v, 0);
  transform: translate(-50%, calc((1 - var(--v, 0)) * 24px * var(--dir, 1)));
}
.seq__line--final { bottom: 10vh; }
.seq__accent { color: var(--c-accent); }
@media (min-width: 768px) { .seq__line { font-size: 3rem; line-height: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pin--seq { height: auto; }
  .seq__canvas { display: none; }
  .seq__fallback { display: block; }
  .seq__line:not(.seq__line--final) { display: none; }
  .seq__line--final { opacity: 1; transform: translateX(-50%); }
}

/* Hero: el fons 3D s'esvaeix cap avall i una franja el desenfoca, perquè no
   quedi cap tall recte contra el contingut. */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 0;
  height: 40%;
  pointer-events: none;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 50%, transparent);
}

/* Vidre: les targetes de tota la web --------------------------------------------
   Fons molt translúcid amb desenfocament, perquè s'hi vegi el patró i la llum
   de la pàgina, una vora clara fina i un reflex a la vora de dalt. */
:root {
  --glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.04));
  --glass-bg-hover: linear-gradient(160deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.06));
  --glass-line: rgba(255, 255, 255, 0.12);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.g3card, .svc-card, .problem__card, .faq__item, .picker__opt, .picker__result,
.form, .mode, .after li, .featured, .inline-cta, .bio, .svc-chips li, .chip, .mock {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shine);
}
.svc-card:hover, .faq__item[open], .picker__opt:hover, .featured:hover, .chip:hover { background: var(--glass-bg-hover); }
.picker__opt[aria-pressed="true"] { background: var(--glass-bg-hover); border-color: var(--c-accent); }
.chip[aria-pressed="true"] { background: var(--c-accent); border-color: var(--c-accent); }
.svc-card:nth-child(4) { background: var(--c-accent); border-color: var(--c-accent); }
.field input, .field select, .field textarea, .check span { background: rgba(0, 0, 0, 0.25); }

/* Productes propis: targeta de vidre per fila */
.g3list { display: grid; gap: var(--s-300); margin-top: var(--s-600); }
.g3card {
  position: relative; isolation: isolate;
  display: grid; gap: var(--s-500); align-items: center;
  padding: var(--s-400);
  border-radius: var(--r-3xl);
  box-shadow: var(--glass-shine), 0 30px 60px rgba(0, 0, 0, 0.25);
}
@media (min-width: 900px) {
  .g3card { grid-template-columns: 6fr 5fr; padding: var(--s-600); }
  .g3card:nth-child(2) .g3card__text { order: 2; }
}
.g3card__text { display: grid; gap: var(--s-200); justify-items: start; min-width: 0; }
.g3card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-200); width: 100%; margin-bottom: var(--s-100); }
.product__logo { width: auto; }
.product__logo--xerra { height: 36px; }
.product__logo--kerix { height: 44px; }
.product__beta {
  padding: var(--s-25) var(--s-100);
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.75rem; line-height: 1rem;
  color: var(--c-accent); border: 1px solid var(--c-accent); border-radius: var(--r-full);
}
.g3card h3 { font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.03em; }
.g3card__lead { font-size: 1.125rem; line-height: 1.75rem; color: rgba(255, 255, 255, 0.72); }
.g3card__label { margin-top: var(--s-100); font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }
.g3card__btn { margin-top: var(--s-200); }
.g3card__frame {
  padding: var(--s-100);
  border-radius: var(--r-3xl);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 30px 60px rgba(0, 0, 0, 0.4);
  transform: perspective(1000px) rotateY(var(--ry, -8deg)) rotateX(4deg);
  transition: transform 700ms var(--ease);
}
.g3card:nth-child(2) .g3card__frame { --ry: 8deg; }
.g3card:hover .g3card__frame { transform: perspective(1000px) rotateY(0deg) rotateX(0deg); }
.g3card__frame img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: var(--r-2xl); }
@media (max-width: 899px) {
  .g3card h3 { font-size: 1.875rem; line-height: 2.25rem; }
  .g3card__frame { transform: none; }
  .g3card:hover .g3card__frame { transform: none; }
}

/* Logos de les integracions, amb el nom en un tooltip */
.logos { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.logo-chip {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease), transform 500ms var(--ease);
}
.logo-chip svg { width: 22px; height: 22px; }
.logo-chip:not(.is-color) svg, .logo-chip:not(.is-color) svg path { fill: currentColor; }
.logo-chip:hover, .logo-chip:focus-visible { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
.logo-chip::after {
  content: attr(data-name);
  position: absolute; left: 50%; bottom: calc(100% + var(--s-75)); z-index: 2;
  padding: var(--s-50) var(--s-100);
  font-size: 0.75rem; line-height: 1rem; font-weight: 600; white-space: nowrap;
  color: #000000; background: #ffffff;
  border-radius: var(--r-lg);
  opacity: 0; transform: translate(-50%, 4px);
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 300ms var(--ease);
}
.logo-chip:hover::after, .logo-chip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.logos-more { align-self: center; padding-left: var(--s-50); font-size: 0.875rem; line-height: 1.25rem; color: var(--c-text-muted); }

/* Ajustos del vidre: una mica de to fosc perquè el text es llegeixi sobre
   qualsevol llum del fons, i el marc de la captura sense desenfocament propi
   (un vidre dins d'un altre fa franges). */
.g3card { background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.04)), rgba(24, 24, 24, 0.35); -webkit-backdrop-filter: blur(24px) saturate(120%); backdrop-filter: blur(24px) saturate(120%); }
.g3card__frame { -webkit-backdrop-filter: none; backdrop-filter: none; }
.g3card__label { color: rgba(255, 255, 255, 0.55); }
.logo-chip { width: auto; min-width: 44px; padding: 0 var(--s-100); }
.logo-chip svg { width: auto; height: 22px; max-width: 72px; }

/* Menú lligat a l'scroll (js/site.js) ---------------------------------------
   --c (0 → 1) va lligat a l'scroll, sense transicions: el moviment és el del
   dit o la roda. Al mòbil la barra es plega fins a les dues ratlles i --shift
   la porta cap a la dreta; a l'escriptori només puja i s'amaga. */
.nav { transform: translateX(calc(-50% + var(--shift, 0px))); }
.nav__bar {
  gap: calc(var(--s-300) * (1 - var(--c, 0)));
  padding-left: calc(var(--s-75) * (2 - var(--c, 0)));
}
.nav__bar > .brand, .nav__links, .nav__cta {
  flex-shrink: 0;
  max-width: calc(var(--w, 640px) * (1 - var(--c, 0)));
  white-space: nowrap;
  opacity: clamp(0, 1 - var(--c, 0) * var(--k, 1.1), 1);
  translate: calc(var(--c, 0) * -10px) 0;
}
.nav__links { --k: 1.3; }
.nav__cta { --k: 1.2; padding-inline: calc(var(--s-100) * (1 - var(--c, 0))); }
/* Només es retalla mentre es plega, perquè el contorn del focus no quedi tallat. */
.nav.is-folding .nav__bar > .brand, .nav.is-folding .nav__links, .nav.is-folding .nav__cta { overflow: hidden; }
.nav.is-folded .nav__bar > .brand, .nav.is-folded .nav__links, .nav.is-folded .nav__cta { visibility: hidden; }
@media (min-width: 900px) {
  /* A l'escriptori no es plega: la barra puja i s'amaga mentre baixes i torna
     a baixar quan puges, també lligada a l'scroll. Si s'hi arriba amb el
     teclat, torna a sortir. */
  .nav { transform: translate(-50%, calc(var(--c, 0) * (-100% - var(--s-200) - 12px))); }
  .nav:focus-within { transform: translate(-50%, 0); }
  .nav__bar { gap: var(--s-300); padding-left: var(--s-200); }
  .nav__bar > .brand, .nav__links, .nav__cta { max-width: none; opacity: 1; translate: none; }
  .nav__cta { padding-inline: var(--s-100); }
  .nav.is-folding .nav__bar > .brand, .nav.is-folding .nav__links, .nav.is-folding .nav__cta { overflow: visible; }
  .nav.is-folded .nav__bar > .brand, .nav.is-folded .nav__links, .nav.is-folded .nav__cta { visibility: visible; }
  .nav__toggle { display: none; }
}

/* Ou de Pasqua del peu (js/site.js) */
.egg {
  position: fixed; left: 50%; bottom: var(--s-300); z-index: 60;
  max-width: min(92vw, 520px);
  padding: var(--s-150, 12px) var(--s-200);
  font-size: 0.9375rem; line-height: 1.4; font-weight: 500;
  color: #000000; background: var(--c-accent);
  border-radius: var(--r-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 400ms var(--ease), transform 600ms var(--ease);
}
.egg.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Preguntes «Llista neta» (F1): títol fix a l'esquerra, preguntes separades
   només per línies fines, sense caixes. */
.faq { justify-items: stretch; }
.faq__side { max-width: none; text-align: left; }
.faq__list { max-width: none; gap: 0; }
@media (min-width: 900px) {
  .faq { grid-template-columns: 4fr 7fr; gap: var(--s-800); align-items: start; }
  .faq__side { position: sticky; top: var(--s-900); }
}
.faq .faq__item {
  padding: 0;
  background: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 0; border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  box-shadow: none;
}
.faq .faq__item:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.faq .faq__item[open] { background: none; }
.faq .faq__item summary {
  padding: var(--s-250, 20px) 0;
  font-size: 1.1875rem; line-height: 1.5rem; font-weight: 500; letter-spacing: -0.01em;
  transition: color 300ms var(--ease);
}
.faq .faq__item summary:hover { color: var(--c-accent); }
.faq .faq__item summary .icon {
  flex: none;
  box-sizing: content-box;
  width: 0.875rem; height: 0.875rem; padding: 0.4375rem;
  color: var(--c-text);
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: var(--r-full);
  transition: transform 500ms var(--ease), background-color 300ms var(--ease), border-color 300ms var(--ease), color 300ms var(--ease);
}
.faq .faq__item[open] summary .icon { color: var(--c-on-accent); background: var(--c-accent); border-color: var(--c-accent); }
.faq .faq__answer { padding: 0 var(--s-600) var(--s-300) 0; color: rgba(255, 255, 255, 0.72); max-width: 62ch; }
.mock--status em { white-space: nowrap; }

/* Carrusel del hero: es pot arrossegar cap als costats. */
.reel { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.reel.is-dragging { cursor: grabbing; }
.reel.is-dragging .reel__card { pointer-events: none; }
