/* =========================================================================
   Home C · «Blanca»
   Base blanca. El color són seccions senceres: groc quan parla el disseny,
   navy quan parla la tecnologia. El fons de la pàgina es fon d'un to a
   l'altre amb l'scroll (js/home-c.js escriu --page-bg i la classe t-w, t-d
   o t-e a <html>), i els colors del text hi passen amb una transició suau.
   Contrastos (WCAG 2.2): #181818/#fff 17,8:1 · #5f5d55/#fff 6,6:1 ·
   #181818/#ffd400 12,4:1 · #4d4400/#ffd400 6,9:1 · #fff/#14306b 12,6:1 ·
   #b6c2dc/#14306b 7,1:1.
   ========================================================================= */
@property --c-text { syntax: "<color>"; inherits: true; initial-value: #181818; }
@property --c-text-muted { syntax: "<color>"; inherits: true; initial-value: #5f5d55; }
@property --line { syntax: "<color>"; inherits: true; initial-value: rgba(24, 24, 24, 0.12); }
@property --nav-bg { syntax: "<color>"; inherits: true; initial-value: rgba(24, 24, 24, 0.9); }
@property --mk-a { syntax: "<color>"; inherits: true; initial-value: #181818; }
@property --mk-b { syntax: "<color>"; inherits: true; initial-value: #ffd400; }
@property --tint-a { syntax: "<color>"; inherits: false; initial-value: rgba(24, 24, 24, 0.45); }
@property --tint-b { syntax: "<color>"; inherits: false; initial-value: rgba(24, 24, 24, 0.82); }
@property --nav-acc { syntax: "<color>"; inherits: true; initial-value: #ffd400; }
@property --nav-on { syntax: "<color>"; inherits: true; initial-value: #181818; }

:root {
  --yellow: #ffd400;
  --navy: #14306b;
  --navy-ink: #0f2347;
  --navy-link: #1d3f8a;
  --sky: #8fb0ff;

  --page-bg: #ffffff;
  --c-bg: #ffffff;
  --c-surface: #f4f4f1;
  --c-surface-2: #ecebe7;
  --c-border: #e2e1dc;
  --c-text: #181818;
  --c-text-muted: #5f5d55;
  --c-text-dim: rgba(24, 24, 24, 0.3);
  --c-accent: #ffd400;
  --c-on-accent: #181818;
  --line: rgba(24, 24, 24, 0.12);
  --nav-bg: rgba(24, 24, 24, 0.9);
  --mk-a: #181818;
  --mk-b: #ffd400;
  --nav-acc: #ffd400;
  --nav-on: #181818;
  --focus: #181818;
  transition: --c-text 600ms var(--ease), --c-text-muted 600ms var(--ease), --line 600ms var(--ease),
              --nav-bg 600ms var(--ease), --mk-a 600ms var(--ease), --mk-b 600ms var(--ease),
              --nav-acc 600ms var(--ease), --nav-on 600ms var(--ease);
}
html.t-d {
  --c-text-muted: #4d4400;
  --c-surface: rgba(24, 24, 24, 0.06);
  --c-surface-2: rgba(24, 24, 24, 0.08);
  --c-border: rgba(24, 24, 24, 0.16);
  --line: rgba(24, 24, 24, 0.2);
  --mk-b: #ffffff;
  --nav-acc: #ffffff;
}
html.t-e {
  --c-text: #ffffff;
  --c-text-muted: #b6c2dc;
  --c-text-dim: rgba(255, 255, 255, 0.35);
  --c-surface: rgba(255, 255, 255, 0.07);
  --c-surface-2: rgba(255, 255, 255, 0.1);
  --c-border: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.2);
  --nav-bg: rgba(12, 30, 70, 0.92);
  --mk-b: var(--sky);
  --nav-acc: var(--sky);
  --nav-on: #0f2347;
  --focus: #ffffff;
}

body { background: var(--page-bg); color: var(--c-text); }
:focus-visible { outline-color: var(--focus); }
::selection { background: var(--yellow); color: #181818; }

/* Sense JS, cada secció porta el seu color; amb JS el posa el fons de la pàgina. */
html:not(.js) [data-theme="d"] { background: var(--yellow); }
html:not(.js) [data-theme="e"] { background: var(--navy); }
html:not(.js) [data-theme="e"] { --c-text: #ffffff; --c-text-muted: #b6c2dc; --line: rgba(255, 255, 255, 0.2); color: #ffffff; }
html:not(.js) [data-theme="d"] { --c-text-muted: #4d4400; --line: rgba(24, 24, 24, 0.2); }

/* El peu i el menú del mòbil continuen foscos. */
.footer, .menu {
  --c-bg: #181818; --c-surface: #1f1f1f; --c-surface-2: #272727; --c-border: #313131;
  --c-text: #ffffff; --c-text-muted: #a3a198; --c-accent: #ffd400; --c-on-accent: #000000;
  --line: rgba(255, 255, 255, 0.14); --focus: #ffd400;
  color: var(--c-text);
}
.footer { background: #181818; }

/* Menú: la píndola fosca de sempre, amb el logotip oficial. */
.nav {
  --c-surface-2: #272727; --c-border: #313131;
  --c-text: #ffffff; --c-text-muted: #a3a198; --c-accent: var(--nav-acc); --c-on-accent: var(--nav-on);
  --focus: var(--nav-acc);
  color: var(--c-text);
}
/* Sobre blanc, la píndola una mica més opaca perquè es vegi negra com abans.
   El símbol segueix el to de la secció: groc al blanc i al groc, blau cel al
   navy (i allà la píndola també es torna navy fosc). */
.nav__bar { background: var(--nav-bg); }
/* Al mòbil, plegat, el menú es fa petit i discret (de 58 a uns 42 px, i més
   transparent), lligat a l'scroll igual que el plegat. Es queda a la dreta
   perquè s'encongeix cap a la vora. Obert, o amb el focus, torna a ser sencer. */
@media (max-width: 899px) {
  /* Va a .nav i no a .nav__bar: l'entrada de GSAP deixa scale i opacity en línia a la barra. */
  .nav {
    --fold-s: calc(1 - var(--c, 0) * 0.28);
    transform-origin: 100% 50%;
    transform: translateX(calc(-50% + var(--shift, 0px))) scale(var(--fold-s));
    opacity: calc(1 - var(--c, 0) * 0.3);
    transition: opacity 250ms var(--ease);
  }
  .nav__toggle { background: color-mix(in srgb, var(--c-surface-2) calc(100% - var(--c, 0) * 100%), transparent); }
  .nav:has(.nav__toggle[aria-expanded="true"]), .nav:focus-within { --fold-s: 1; opacity: 1; }
}
.brand--c { display: inline-flex; align-items: center; gap: 7px; }
.brand__mark { height: 24px; width: auto; }
.brand__mark .mk__a { fill: #ffffff; }
.brand__mark .mk__b { fill: var(--mk-b); }
.brand__word {
  width: 103px; height: 24px; flex: none; background: #ffffff;
  -webkit-mask: url("../img/c/logo-lletres.png") center / contain no-repeat;
  mask: url("../img/c/logo-lletres.png") center / contain no-repeat;
}

/* Títols i enllaços sobre clar */
.hero__title, .hero__line { background-image: linear-gradient(90deg, #181818 0%, #5f5d55 100%); }
.hero__title.is-split { background: none; }
.link:hover { color: var(--c-text); text-decoration: underline; text-underline-offset: 4px; }
.btn--primary::before { background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.6), transparent 70%); }

/* Etiquetes: el símbol en petit --------------------------------------- */
.motif { width: 1.5em; height: auto; flex: none; }
.who {
  display: inline-flex; align-items: center; gap: var(--s-75);
  padding: 5px 12px 5px 9px;
  font-size: 0.8125rem; line-height: 1.25rem; font-weight: 500;
  border-radius: var(--r-full); white-space: nowrap;
}
.who--d { color: #181818; background: var(--yellow); box-shadow: inset 0 0 0 1px rgba(24, 24, 24, 0.14); }
.who--d .mk__a { fill: #181818; }
.who--d .mk__b { fill: #ffffff; }
.who--e { color: #ffffff; background: var(--navy); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }
.who--e .mk__a { fill: #ffffff; }
.who--e .mk__b { fill: var(--sky); }
.eyebrow-who { margin: 0; }

/* Seccions: més aire i sense vores */
/* Un sol ritme entre seccions: ~88px a l'escriptori, ~56px al mòbil. */
main .section { padding-block: clamp(56px, 6vw, 88px); }

/* Manifest ------------------------------------------------------------- */
.manifest__text {
  margin-top: var(--s-300); max-width: 20ch;
  font-size: clamp(2.25rem, 5vw, 4.25rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: 600;
}
.manifest__text .is-dim { color: var(--c-text-muted); }
/* P1 · Tres panells que s'obren */
.acc { display: flex; gap: var(--s-100); height: 380px; margin-top: var(--s-700); }
.acc__i {
  position: relative; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  padding: var(--s-400) var(--s-300); border-radius: var(--r-3xl);
  text-align: left; color: #181818; background: var(--c-surface);
  overflow: hidden; cursor: pointer;
  transition: flex-grow 700ms cubic-bezier(.2, .7, .2, 1), background-color 500ms var(--ease), color 500ms var(--ease);
}
.acc__i[aria-expanded="true"] { flex-grow: 3.2; }
.acc__i.is-s[aria-expanded="true"] { background: #181818; color: #ffffff; }
.acc__i.is-d[aria-expanded="true"] { background: var(--yellow); }
.acc__i.is-e[aria-expanded="true"] { background: var(--navy); color: #ffffff; }
.acc__n { font: 500 0.8125rem/1 "Geist Mono", ui-monospace, monospace; opacity: 0.7; }
.acc__b { display: grid; gap: var(--s-100); }
.acc__more { display: grid; grid-template-rows: 1fr; }
.acc__in { display: grid; gap: var(--s-100); min-height: 0; overflow: hidden; }
.acc__w { font-size: clamp(1.5rem, 3vw, 2.75rem); line-height: 1; letter-spacing: -0.04em; font-weight: 600; }
.acc__t { max-width: 28ch; font-size: 1.125rem; line-height: 1.5; opacity: 0; transform: translateY(10px); transition: opacity 400ms 150ms, transform 400ms 150ms; }
.acc__tags { display: flex; flex-wrap: wrap; gap: 6px; opacity: 0; transition: opacity 400ms 250ms; }
.acc__tags span { padding: 3px 10px; font-size: 0.8125rem; border-radius: var(--r-full); box-shadow: inset 0 0 0 1px currentColor; opacity: 0.85; }
.acc__i[aria-expanded="true"] .acc__t, .acc__i[aria-expanded="true"] .acc__tags { opacity: 1; transform: none; }
.acc__i:focus-visible { outline-offset: 4px; }
@media (max-width: 799px) {
  .acc { flex-direction: column; height: auto; }
  .acc__i { flex: none; min-height: 96px; gap: var(--s-200); }
  /* Al mòbil el panell creix i s'encongeix suau: la capsa del text s'obre
     d'alçada (0fr → 1fr) i el contingut s'esvaeix cap a dins. */
  .acc__more { grid-template-rows: 0fr; transition: grid-template-rows 650ms cubic-bezier(.2, .7, .2, 1); }
  .acc__i[aria-expanded="true"] .acc__more { grid-template-rows: 1fr; }
  .acc__in { padding-top: 0; transition: padding-top 650ms cubic-bezier(.2, .7, .2, 1); }
  .acc__i[aria-expanded="true"] .acc__in { padding-top: var(--s-100); }
  .acc__t, .acc__tags { transition: opacity 250ms, transform 250ms; }
  .acc__i[aria-expanded="true"] .acc__t, .acc__i[aria-expanded="true"] .acc__tags { transition: opacity 450ms 220ms, transform 450ms 220ms; }
  .acc__i { transition: min-height 650ms cubic-bezier(.2, .7, .2, 1), color 500ms var(--ease); }
}
@media (prefers-reduced-motion: reduce) { .acc__i, .acc__t, .acc__tags, .acc__i::before, .acc__i::after { transition: none !important; } }
.manifest__n { font: 500 0.8125rem/1 "Geist Mono", ui-monospace, monospace; color: var(--c-text-muted); }

/* Disseny ---------------------------------------------------------------- */
.sec-d__grid { display: grid; gap: var(--s-700); }
@media (min-width: 1000px) { .sec-d__grid { grid-template-columns: 5fr 7fr; align-items: start; } }
.disc { list-style: none; padding: 0; counter-reset: none; }
.disc li {
  display: grid; grid-template-columns: 3rem 1fr; gap: var(--s-50) var(--s-200); align-items: baseline;
  padding: var(--s-300) 0; border-top: 1px solid var(--line);
}
.disc li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .disc li { grid-template-columns: 3rem 1fr auto; } }
.disc__n { font: 500 0.8125rem/1 "Geist Mono", ui-monospace, monospace; color: var(--c-text-muted); }
.disc__name { font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; transition: transform 500ms var(--ease); }
.disc__what { color: var(--c-text-muted); grid-column: 2; }
@media (min-width: 700px) { .disc__what { grid-column: auto; text-align: right; } }
.disc li:hover .disc__name { transform: translateX(8px); }

/* Projectes destacats -------------------------------------------------- */
.feat__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-300); }
.feat__count { font: 500 0.75rem/1 "Geist Mono", ui-monospace, monospace; padding: 3px 7px; border-radius: var(--r-full); background: var(--c-surface-2); }
.feat__grid { list-style: none; padding: 0; display: grid; gap: var(--s-600) var(--s-300); margin-top: var(--s-600); }
@media (min-width: 900px) {
  .feat__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .feat__item { grid-column: span 5; }
  .feat__item.is-big { grid-column: span 7; }
  .feat__item.is-big .feat__media { aspect-ratio: 1.1; }
}
.feat__card { display: grid; gap: var(--s-200); }
.feat__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-3xl); background: var(--c-surface); }
.feat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.feat__card:hover .feat__media img { transform: scale(1.04); }
.feat__card:focus-visible { outline-offset: 6px; border-radius: var(--r-3xl); }
.feat__meta { display: grid; grid-template-columns: 1fr auto; gap: var(--s-25) var(--s-200); align-items: center; }
.feat__name { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.02em; }
.feat__kind { grid-row: 2; color: var(--c-text-muted); }
.feat__tags { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: var(--s-75); }

/* Tecnologia -------------------------------------------------------------- */
.eng-grid { display: grid; gap: var(--s-200); margin-top: var(--s-600); }
@media (min-width: 700px) { .eng-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .eng-grid { grid-template-columns: repeat(4, 1fr); } }
.eng-card {
  display: grid; align-content: start; gap: var(--s-100);
  padding: var(--s-400) var(--s-300);
  background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-2xl);
}
.eng-card__num { font: 500 0.8125rem/1 "Geist Mono", ui-monospace, monospace; color: var(--c-text-muted); margin-bottom: var(--s-500); }
.eng-card h3 { font-size: 1.375rem; line-height: 1.75rem; letter-spacing: -0.02em; }
.eng-card p { color: var(--c-text-muted); }

.prods { margin-top: var(--s-800); display: grid; gap: var(--s-300); }
.prods__title { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; }
@media (min-width: 900px) { .prods { grid-template-columns: 1fr 1fr; } .prods__title { grid-column: 1 / -1; } }
.prod { display: grid; grid-template-rows: auto 1fr; background: #ffffff; color: var(--navy-ink); border-radius: var(--r-3xl); overflow: hidden; }
.prod__body { display: grid; justify-items: start; gap: var(--s-100); padding: var(--s-400) var(--s-400) var(--s-300); }
.prod__logo { height: 30px; width: auto; margin-bottom: var(--s-200); }
.prod h4 { font-size: 1.25rem; line-height: 1.6rem; letter-spacing: -0.015em; }
.prod__link {
  display: inline-flex; align-items: center; gap: var(--s-50);
  color: var(--navy-link); font-weight: 500;
  text-decoration: underline; text-decoration-color: rgba(29, 63, 138, 0.35); text-underline-offset: 4px;
}
.prod__link:hover { text-decoration-color: currentColor; }
.prod__link:focus-visible { outline-color: var(--navy); outline-offset: 3px; }
.prod__shot { align-self: end; padding: 0 var(--s-400); }
.prod__shot img { display: block; width: 100%; height: auto; border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 20px 40px -20px rgba(15, 35, 71, 0.4); }

/* Com treballem ------------------------------------------------------- */
.d__num { color: var(--c-text); }
.d__titles { height: 136px; }
.d__who { display: flex; flex-wrap: wrap; gap: var(--s-75); margin-bottom: var(--s-200); }
.mock { box-shadow: 0 24px 48px -24px rgba(24, 24, 24, 0.25); }

/* Preguntes ----------------------------------------------------------- */
.faq .faq__item { border-top-color: var(--line); }
.faq .faq__item:last-child { border-bottom-color: var(--line); }
.faq .faq__item summary .icon { border-color: var(--line); color: var(--c-text); }
.faq .faq__item[open] summary .icon { color: #181818; }
.faq .faq__item summary:hover { color: var(--c-text-muted); }
.faq .faq__answer { color: var(--c-text-muted); }

/* CTA: la peça blanca, en negre sobre blanc */
.lo__piece--w path { fill: var(--c-text); }

@media (max-width: 699px) {
  .eng-card { padding: var(--s-300); }
  .eng-card__num { margin-bottom: var(--s-200); }
  .feat__meta { grid-template-columns: 1fr; }
  .feat__tags { grid-row: auto; grid-column: auto; }
}

.sec-d .section-head { text-align: left; margin-inline: 0; }
.sec-d .section-head .lead { margin-inline: 0; }

/* Disseny: la foto del projecte que segueix el cursor */
.disc-cursor {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: 240px; aspect-ratio: 4 / 5;
  border-radius: var(--r-2xl); overflow: hidden;
  pointer-events: none; opacity: 0;
  box-shadow: 0 30px 60px -20px rgba(24, 24, 24, 0.45);
  transition: opacity 300ms var(--ease);
}
.disc-cursor.is-on { opacity: 1; }
.disc-cursor img { width: 100%; height: 100%; object-fit: cover; }
.disc-cursor__name {
  position: absolute; left: var(--s-100); bottom: var(--s-100);
  padding: 4px 10px; font-size: 0.75rem; line-height: 1rem; font-weight: 500;
  color: #ffffff; background: rgba(24, 24, 24, 0.72); border-radius: var(--r-full);
}
.disc.is-hovering li { opacity: 0.45; transition: opacity 300ms var(--ease); }
.disc.is-hovering li.is-on { opacity: 1; }
.disc__thumb { display: none; }
@media (hover: none), (pointer: coarse) {
  .disc-cursor { display: none; }
  .disc li { grid-template-columns: 3rem 1fr 56px; }
  .disc__thumb { display: block; grid-row: 1 / span 2; grid-column: 3; width: 56px; height: 70px; object-fit: cover; border-radius: var(--r-lg); }
  .disc__what { grid-column: 2; text-align: left; }
}

/* Pantalla de càrrega sobre blanc: la peça blanca del símbol, en negre. */
.loader { background: #ffffff; }
.loader__w { filter: brightness(0); opacity: 0.92; }
.loader__count { color: #5f5d55; }


/* Com treballem: el circuit en nodes ----------------------------------- */
.circuit__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-300); }
.circuit__hint { font-size: 0.875rem; color: var(--c-text-muted); }
.board {
  position: relative; margin-top: var(--s-600);
  height: 580px; border-radius: var(--r-3xl);
  background-color: var(--c-surface);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.board__wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wire-under { fill: none; stroke: #ffffff; stroke-width: 9; stroke-linecap: round; }
.wire { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.wire--d { stroke: #f2c400; }
.wire--e { stroke: var(--navy); }
.wire--de { stroke: var(--navy); }
.wire--loop { stroke: #f2c400; stroke-width: 2.5; stroke-dasharray: 2 9; }
.board.is-drawn .wire--loop { animation: wire-flow 1.2s linear infinite; }
@keyframes wire-flow { to { stroke-dashoffset: -22; } }
.wire-arrow { stroke: #ffffff; stroke-width: 2; stroke-linejoin: round; paint-order: stroke; opacity: 0; transition: opacity 300ms var(--ease); }
.board.is-drawn .wire-arrow { opacity: 1; }
.wire-arrow--d, .wire-arrow--loop { fill: #f2c400; }
.wire-arrow--e, .wire-arrow--de { fill: var(--navy); }
.wire-dot { stroke: #ffffff; stroke-width: 2; opacity: 0; }
.wire-dot--d, .wire-dot--loop { fill: #ffd400; filter: drop-shadow(0 0 5px rgba(255, 212, 0, 0.9)); }
.wire-dot--e { fill: var(--navy); filter: drop-shadow(0 0 5px rgba(20, 48, 107, 0.6)); }
.wire-dot--de { fill: var(--yellow); filter: drop-shadow(0 0 6px rgba(143, 176, 255, 0.9)); }
.board__nodes { list-style: none; padding: 0; margin: 0; }
.cnode {
  position: absolute; left: var(--x); top: var(--y);
  width: 16.5%; min-width: 160px;
  display: grid; gap: 4px; padding: 14px 16px 16px;
  background: #ffffff; color: #181818;
  border-radius: var(--r-2xl);
  box-shadow: 0 0 0 1px rgba(24, 24, 24, 0.08), 0 18px 34px -20px rgba(24, 24, 24, 0.45);
  z-index: 1;
}
.cnode::before, .cnode::after {
  content: ""; position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: #ffffff; border: 2px solid var(--c-text-muted);
}
.cnode::before { left: -6px; } .cnode::after { right: -6px; }
.cnode__n { font: 500 0.75rem/1 "Geist Mono", ui-monospace, monospace; color: #5f5d55; }
.cnode h3 { font-size: 1.125rem; line-height: 1.4rem; letter-spacing: -0.015em; }
.cnode p { font-size: 0.875rem; line-height: 1.3rem; color: #5f5d55; }
.cnode__who { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cnode__who .who { padding: 2px 8px 2px 6px; font-size: 0.6875rem; line-height: 1rem; }
.board__loop {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: 0.8125rem; font-weight: 500; color: #181818;
  padding: 3px 10px; border-radius: var(--r-full); background: var(--yellow);
}
html:not(.js) .board { height: auto; padding: var(--s-300); }
html:not(.js) .cnode { position: static; width: auto; margin-bottom: var(--s-200); }
@media (max-width: 899px) {
  .board { height: 1420px; }
  .cnode { left: var(--mx); top: var(--my); width: 54%; min-width: 0; }
  .board__loop { bottom: 10px; }
}

/* Tecnologia: el que veu el client ------------------------------------ */
.sees { margin-top: var(--s-700); }
.sees__title { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: var(--s-300); }
.sees__note { margin-top: var(--s-200); font-size: 0.8125rem; color: var(--c-text-muted); }
.ctabs { display: grid; gap: var(--s-300); }
@media (min-width: 960px) { .ctabs { grid-template-columns: 340px 1fr; align-items: stretch; } }
.ctabs__list { display: grid; gap: var(--s-100); align-content: start; }
.ctab {
  position: relative; display: flex; align-items: center; gap: var(--s-200);
  padding: 14px 16px 18px 14px; border-radius: var(--r-2xl);
  text-align: left; color: var(--c-text);
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: background-color 400ms var(--ease), box-shadow 400ms var(--ease), color 400ms var(--ease), transform 400ms var(--ease);
}
.ctab:hover { background: rgba(255, 255, 255, 0.09); transform: translateX(4px); }
.ctab[aria-selected="true"] { background: #ffffff; color: var(--navy-ink); box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.6); transform: translateX(8px); }
.ctab__ico {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(143, 176, 255, 0.16); color: var(--sky);
  transition: background-color 400ms var(--ease), color 400ms var(--ease), transform 500ms cubic-bezier(.2, 1.6, .4, 1);
}
.ctab__ico svg { width: 22px; height: 22px; fill: currentColor; }
.ctab[aria-selected="true"] .ctab__ico { background: var(--yellow); color: #181818; transform: rotate(-8deg) scale(1.06); }
.ctab__txt { display: grid; gap: 2px; }
.ctab__kick { font: 500 0.6875rem/1.2 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-text-muted); }
.ctab[aria-selected="true"] .ctab__kick { color: var(--navy-link); }
.ctab__name { font-size: 1.125rem; line-height: 1.4rem; font-weight: 600; letter-spacing: -0.015em; }
.ctab__bar { position: absolute; left: 74px; right: 18px; bottom: 9px; height: 3px; border-radius: 3px; background: rgba(20, 48, 107, 0.12); overflow: hidden; opacity: 0; }
.ctab[aria-selected="true"] .ctab__bar { opacity: 1; }
.ctab__bar i { display: block; width: 0; height: 100%; background: var(--navy); }
.ctabs.is-auto .ctab[aria-selected="true"] .ctab__bar i { animation: ctab-fill 8s linear forwards; }
.ctabs.is-paused .ctab__bar i { animation-play-state: paused !important; }
@keyframes ctab-fill { to { width: 100%; } }
@media (max-width: 959px) {
  .ctabs__list { grid-auto-flow: column; grid-auto-columns: minmax(220px, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .ctab { scroll-snap-align: start; }
  .ctab:hover, .ctab[aria-selected="true"] { transform: none; }
}
/* Titular de cada panell */
.cpanel__copy { display: grid; gap: var(--s-100); }
.cpanel__kick { display: inline-flex; align-items: center; gap: 8px; font: 500 0.75rem/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.05em; text-transform: uppercase; color: var(--navy-link); }
.cpanel__kick::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--yellow); }
.cpanel__head { font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 600; color: #181818; }
.cpanel.is-play .cpanel__head { animation: rise 600ms var(--ease) both; }
.cpanel.is-play .cpanel__text { animation: rise 600ms var(--ease) .12s both; }
.ctabs__stage { background: #ffffff; color: #181818; border-radius: var(--r-3xl); padding: var(--s-400); min-height: 420px; }
.cpanel[hidden] { display: none; }
.cpanel { display: grid; gap: var(--s-300); animation: cpanel-in 500ms var(--ease); }
@keyframes cpanel-in { from { opacity: 0; transform: translateY(8px); } }
.cpanel__text { max-width: 54ch; font-size: 1rem; line-height: 1.6; color: #5f5d55; }
.cpanel__mock { font-size: 0.875rem; }
/* finestra de navegador */
.bw { border-radius: var(--r-xl); overflow: hidden; box-shadow: 0 0 0 1px #e2e1dc, 0 30px 50px -28px rgba(15, 35, 71, 0.5); background: #ffffff; }
.bw__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #f1f1ee; font: 500 0.75rem/1 "Geist Mono", ui-monospace, monospace; color: #5f5d55; }
.bw__bar i { width: 9px; height: 9px; border-radius: 50%; background: #d6d5cf; }
.bw__bar span { margin-left: 8px; padding: 4px 10px; border-radius: var(--r-full); background: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw__shot { position: relative; overflow: hidden; }
.bw__shot img { display: block; width: 100%; height: auto; }
.bw__shot--fig { background: #2c2c2c; }
.bw__shot--web { height: var(--frame, 300px); }
.bw__shot--web .scrollimg { position: absolute; left: 0; top: 0; }
.mpin { position: absolute; display: grid; place-items: center; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50% 50% 50% 4px; background: var(--yellow); color: #181818; font-size: 0.75rem; font-weight: 700; box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.35), 0 8px 16px -6px rgba(0, 0, 0, 0.6); }
.note { position: absolute; left: 36%; top: 14%; width: 230px; display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r-lg); background: #ffffff; color: #181818; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.55); }
.note b { font-size: 0.75rem; color: #5f5d55; font-weight: 500; }
.note em { font-style: normal; font-size: 0.75rem; color: #1b6b3d; font-weight: 500; }
.bw__flag { position: absolute; left: 14px; top: 12px; padding: 4px 10px; border-radius: var(--r-full); background: var(--navy); color: #ffffff; font-size: 0.75rem; font-weight: 500; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5); }
.bw__ok { position: absolute; right: 16px; bottom: 16px; display: grid; padding: 10px 16px; border-radius: var(--r-full); background: #181818; color: #ffffff; font-size: 0.8125rem; font-weight: 600; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.6); }
.bw__ok > span { grid-area: 1 / 1; transition: opacity 250ms; }
.bw__ok .t2 { opacity: 0; }
.cursor-fake { position: absolute; width: 22px; height: 22px; left: 40%; top: 40%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
/* informes */
.rep { border-radius: var(--r-xl); padding: 18px 20px; background: #f7f7f5; box-shadow: inset 0 0 0 1px #e2e1dc; }
.rep__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding-bottom: 12px; }
.rep__head span { color: #5f5d55; font-size: 0.8125rem; font-family: "Geist Mono", ui-monospace, monospace; }
.rep__prog { height: 4px; border-radius: 4px; background: #e2e1dc; overflow: hidden; margin-bottom: 6px; }
.rep__prog i { display: block; height: 100%; width: 100%; background: var(--navy); transform-origin: left; }
.rep ul { list-style: none; padding: 0; margin: 0; }
.rep li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #ecebe7; }
.rep li:last-child { border-bottom: 0; }
.st { display: grid; font-style: normal; text-align: right; }
.st > * { grid-area: 1 / 1; font-size: 0.8125rem; font-weight: 500; white-space: nowrap; }
.st s { text-decoration: none; color: #5f5d55; }
.st s::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; border-radius: 50%; border: 2px solid #c9c8c2; border-top-color: var(--navy); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.st b { padding: 2px 10px; border-radius: var(--r-full); justify-self: end; }
.st b.ok { background: #dcf5e6; color: #1b6b3d; }
.st b.warn { background: #fff3b0; color: #5a4f00; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 10px; }
.kpis b { display: block; font-size: 2.25rem; line-height: 1; letter-spacing: -0.04em; font-weight: 600; color: var(--navy); }
.kpis span { font-size: 0.8125rem; color: #5f5d55; }
.spark { width: 100%; height: 60px; margin-bottom: 8px; overflow: visible; }
.spark path { fill: none; stroke: var(--yellow); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.bars { display: grid; gap: 10px; }
.bars span { display: grid; grid-template-columns: 9.5rem 1fr 3rem; align-items: center; gap: 10px; }
.bars span::after { content: ""; grid-column: 2; grid-row: 1; height: 12px; width: var(--v); border-radius: 6px; background: var(--navy); transform-origin: left; }
.bars b { font-weight: 500; } .bars i { font-style: normal; grid-column: 3; text-align: right; color: #5f5d55; font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.8125rem; }
.chatm { display: grid; gap: 10px; padding: 18px; border-radius: var(--r-xl); background: #f7f7f5; box-shadow: inset 0 0 0 1px #e2e1dc; min-height: 300px; align-content: start; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #ffffff; box-shadow: 0 0 0 1px #e2e1dc; }
.msg small { display: block; margin-top: 4px; font-size: 0.75rem; color: #5f5d55; }
.msg--me { justify-self: end; border-radius: 16px 16px 4px 16px; background: var(--navy); color: #ffffff; box-shadow: none; }
.typing { display: inline-flex; gap: 4px; width: max-content; padding: 12px 14px; border-radius: 16px; background: #ffffff; box-shadow: 0 0 0 1px #e2e1dc; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #9a988f; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-3px); opacity: .5; } }
.acts { display: flex; gap: 8px; }
.act { padding: 7px 14px; border-radius: var(--r-full); font-size: 0.8125rem; font-weight: 600; background: #ffffff; box-shadow: inset 0 0 0 1px #d6d5cf; }
.act--ok { background: var(--navy); color: #ffffff; box-shadow: none; }

/* Animacions de cada pestanya: només amb .is-play (el JS la torna a posar
   cada cop que s'obre una pestanya). Sense moviment, tot queda a l'estat final. */
@media (prefers-reduced-motion: no-preference) {
  .cpanel.is-play .mpin { animation: pop 450ms cubic-bezier(.2, 1.6, .4, 1) both; }
  .cpanel.is-play .a1 { animation-delay: .3s; } .cpanel.is-play .a2 { animation-delay: .7s; } .cpanel.is-play .a3 { animation-delay: 1.1s; }
  .cpanel.is-play .note { animation: rise 500ms var(--ease) 1.6s both; }
  .cpanel.is-play .note em { animation: fade 400ms var(--ease) 3s both; }
  .cpanel.is-play .scrollimg { animation: page-scroll 5s cubic-bezier(.45, 0, .2, 1) .4s both; }
  .cpanel.is-play .cursor-fake { animation: cur 1.4s var(--ease) 4.6s both; }
  .cpanel.is-play .bw__ok { animation: press 300ms ease 6s both; }
  .cpanel.is-play .bw__ok { background: #181818; }
  .cpanel.is-play .bw__ok .t1 { animation: fade-out 200ms 6.1s both; }
  .cpanel.is-play .bw__ok .t2 { animation: fade 200ms 6.1s both; }
  .cpanel.is-play .bw__ok { animation: press 300ms ease 6s both, go-green 300ms 6.1s both; }
  .cpanel.is-play .rep__prog i { animation: grow 3.6s linear .2s both; }
  .cpanel.is-play .st s { animation: fade-out 200ms both; }
  .cpanel.is-play .st b { animation: pop 400ms cubic-bezier(.2, 1.6, .4, 1) both; }
  .cpanel.is-play .r1 s, .cpanel.is-play .r1 b { animation-delay: 1s; }
  .cpanel.is-play .r2 s, .cpanel.is-play .r2 b { animation-delay: 1.9s; }
  .cpanel.is-play .r3 s, .cpanel.is-play .r3 b { animation-delay: 2.8s; }
  .cpanel.is-play .r4 s, .cpanel.is-play .r4 b { animation-delay: 3.7s; }
  .cpanel.is-play .spark path { animation: draw 1.6s var(--ease) .2s both; }
  .cpanel.is-play .bars span::after { animation: grow 900ms var(--ease) both; }
  .cpanel.is-play .bars span:nth-child(2)::after { animation-delay: .15s; }
  .cpanel.is-play .bars span:nth-child(3)::after { animation-delay: .3s; }
  .cpanel.is-play .bars span:nth-child(4)::after { animation-delay: .45s; }
  .cpanel.is-play .m1 { animation: blink-in 1.2s .2s both; }
  .cpanel.is-play .m2 { animation: rise 400ms var(--ease) 1.4s both; }
  .cpanel.is-play .m3 { animation: rise 400ms var(--ease) 1.9s both; }
  .cpanel.is-play .m3 .act--ok { animation: press 300ms ease 3s both; }
  .cpanel.is-play .m4 { animation: rise 400ms var(--ease) 3.3s both; }
  .cpanel.is-play .m5 { animation: blink-in 1.2s 3.9s both; }
  .cpanel.is-play .m6 { animation: rise 400ms var(--ease) 5.1s both; }
}
@keyframes pop { from { transform: scale(0); opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes press { 50% { transform: scale(0.92); } }
@keyframes go-green { to { background: #1b6b3d; } }
@keyframes page-scroll { from { transform: translateY(0); } to { transform: translateY(calc(-100% + var(--frame, 300px))); } }
@keyframes cur { from { left: 40%; top: 40%; opacity: 0; } 20% { opacity: 1; } to { left: calc(100% - 70px); top: calc(100% - 34px); opacity: 1; } }
@keyframes blink-in { 0% { opacity: 0; max-height: 0; padding-block: 0; } 10%, 85% { opacity: 1; max-height: 40px; } 100% { opacity: 0; max-height: 0; padding-block: 0; margin-block: -5px; } }
/* Estat final sense animació */
@media (prefers-reduced-motion: reduce) {
  .st s, .typing { display: none; }
  .bw__ok .t1 { opacity: 0; } .bw__ok .t2 { opacity: 1; } .bw__ok { background: #1b6b3d; }
  .cursor-fake { display: none; }
}
.cpanel:not(.is-play) .typing { display: none; }
@media (max-width: 699px) {
  .ctabs__stage { padding: var(--s-300); min-height: 0; }
  .bw__page { max-width: 100%; }
  .note { left: auto; right: 10px; top: 10px; width: 180px; padding: 10px 12px; font-size: 0.75rem; }
  .bw__shot--web { --frame: 240px; }
  .bars span { grid-template-columns: 6.5rem 1fr 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wire { animation: none; }
  .cpanel, .bars span::after { animation: none; }
}


/* P1 amb foto de fons: tancat es veu fosc; obert, el color del pilar deixa
   veure la foto a través. El text sempre va sobre una capa opaca de color. */
.acc__i { isolation: isolate; color: #ffffff; background: #181818; }
.acc__i::before, .acc__i::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.acc__i::before { background: var(--acc-img, none) center / cover no-repeat; filter: grayscale(1) contrast(1.05); transform: scale(1.06); transition: filter 700ms var(--ease), transform 1200ms var(--ease); }
.acc__i::after { --tint-a: rgba(24, 24, 24, 0.45); --tint-b: rgba(24, 24, 24, 0.82); background: linear-gradient(180deg, var(--tint-a) 0%, var(--tint-b) 70%); transition: --tint-a 600ms var(--ease), --tint-b 600ms var(--ease); }
.acc__i[aria-expanded="true"]::before { filter: grayscale(0); transform: scale(1); }
.acc__i.is-s[aria-expanded="true"] { background: #181818; }
.acc__i.is-s[aria-expanded="true"]::after { --tint-a: rgba(24, 24, 24, 0.35); --tint-b: rgba(24, 24, 24, 0.88); }
.acc__i.is-d[aria-expanded="true"] { color: #181818; }
.acc__i.is-d[aria-expanded="true"]::after { --tint-a: rgba(255, 212, 0, 0.45); --tint-b: rgba(255, 212, 0, 0.94); }
.acc__i.is-e[aria-expanded="true"]::after { --tint-a: rgba(20, 48, 107, 0.4); --tint-b: rgba(20, 48, 107, 0.92); }
.acc__n { opacity: 0.85; }

/* Hero amb el carrusel: exactament una pantalla, a qualsevol alçada.
   El text i les targetes s'adapten a l'alçada (svh) perquè tot hi càpiga. */
.hero { height: 100vh; height: 100svh; min-height: 0; padding-top: clamp(72px, 11svh, 96px); padding-bottom: clamp(16px, 3svh, 32px); }
.hero__content { flex: 1 1 auto; min-height: 0; justify-content: center; }
.hero__title { font-size: clamp(2.25rem, min(6.2vw, 8.4svh), 4.5rem); }
.hero__sub { margin-top: clamp(10px, 2.4svh, 24px); font-size: clamp(1rem, 2.2svh, 1.25rem); line-height: 1.45; }
.hero__actions { margin-top: clamp(14px, 3.6svh, 40px); row-gap: var(--s-150, 12px); }
.reel { flex: none; margin-top: clamp(12px, 2.6svh, 24px); }
.reel__card { height: clamp(104px, 25svh, 280px); }
@media (max-width: 767px) {
  .hero { height: 100svh; min-height: 0; padding-top: clamp(76px, 12svh, 104px); }
  .hero__content { justify-content: center; }
  .hero__title { font-size: clamp(2rem, min(10vw, 6svh), 3rem); }
  .hero__sub { font-size: clamp(0.9375rem, 2.1svh, 1.125rem); }
  .reel__card { height: clamp(96px, 21svh, 220px); }
}
@media (max-height: 620px) and (max-width: 767px) { .hero__proof { display: none; } }

/* El hero és un full de color «boira» (gris amb un punt de navy) amb les
   cantonades de baix arrodonides; a sota, la web continua en blanc. El 3D
   llegeix el mateix --hero-bg per pintar el fons del patró. */
:root { --hero-bg: #ebeff5; }
.hero { background: var(--hero-bg); border-radius: 0 0 clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px); }

/* =============================================================================
   Pàgines interiors (Projectes, Blog, Contacte i la resta)
   ========================================================================== */

/* Capçalera de pàgina: el mateix full «boira» del hero de la portada, però
   curt i alineat a l'esquerra. */
.page-hero {
  background: var(--hero-bg);
  border-radius: 0 0 clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px);
  text-align: left;
  padding-top: calc(var(--s-900) + var(--s-600));
  padding-bottom: clamp(48px, 6vw, 88px);
}
.page-hero__title {
  max-width: 900px; margin: var(--s-300) 0 0;
  font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -0.045em;
}
.page-hero__title .split-line, .page-hero__title:not(.is-split) {
  background: none; -webkit-text-fill-color: currentColor; color: var(--c-text);
}
.page-hero__title .is-dim { color: var(--c-text-muted); -webkit-text-fill-color: currentColor; }
.page-hero .lead { max-width: 620px; margin: var(--s-300) 0 0; color: var(--c-text-muted); }
.crumbs { justify-content: flex-start; }
main .page-hero + .section { padding-top: clamp(40px, 5vw, 72px); }

/* Filtres: píndoles clares; la de cada disciplina porta el punt del seu color
   i, activa, s'omple del color (groc disseny, navy tecnologia). */
.chips--c { justify-content: flex-start; }
.chip, .chip:hover { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.chip { color: var(--c-text); background: #ffffff; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 8px; }
.chip:hover { background: var(--c-surface); border-color: rgba(24, 24, 24, 0.24); }
.chip__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip--d .chip__dot { background: var(--yellow); box-shadow: inset 0 0 0 1px rgba(24, 24, 24, 0.2); }
.chip--e .chip__dot { background: var(--navy); }
.chip__n { margin-left: 0; opacity: 0.75; }
.chip[aria-pressed="true"] { color: #ffffff; background: #181818; border-color: #181818; }
.chip--d[aria-pressed="true"] { color: #181818; background: var(--yellow); border-color: var(--yellow); }
.chip--e[aria-pressed="true"] { color: #ffffff; background: var(--navy); border-color: var(--navy); }
.chip--d[aria-pressed="true"] .chip__dot { background: #ffffff; }
.chip--e[aria-pressed="true"] .chip__dot { background: var(--sky); }
.work__empty { margin-top: var(--s-600); color: var(--c-text-muted); }

/* Projectes: graella de tres, amb les mateixes targetes de la portada. */
.pj-grid { list-style: none; padding: 0; margin-top: var(--s-500); display: grid; gap: var(--s-600) var(--s-300); }
@media (min-width: 640px) { .pj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .pj-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pj[hidden] { display: none; }
.pj .feat__name { font-size: 1.25rem; line-height: 1.75rem; }
.pj .feat__tags { flex-wrap: wrap; justify-content: flex-end; }

/* Blog */
.featured--c, .featured--c:hover {
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
  padding: 0; background: transparent; border: 0; border-radius: 0;
}
.featured--c { gap: var(--s-400) var(--s-600); }
@media (min-width: 1024px) { .featured--c { grid-template-columns: 7fr 5fr; } }
.featured--c .featured__media { display: block; border-radius: var(--r-3xl); aspect-ratio: 16 / 11; }
.featured--c .featured__body { display: grid; gap: var(--s-200); align-content: center; justify-items: start; padding: 0; }
.featured__title { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; transition: color 300ms var(--ease); }
.featured__text { color: var(--c-text-muted); font-size: 1.125rem; line-height: 1.65; }
.featured--c .link { margin-top: var(--s-200); }
.featured--c:hover .featured__title { color: var(--navy-link); }
.tag { color: #181818; }
.tag--d { color: #181818; background: var(--yellow); }
.tag--e { color: #ffffff; background: var(--navy); }
.blog-bar { margin-top: clamp(64px, 8vw, 112px); padding-top: var(--s-500); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-300); }
.blog-bar__title { font-size: 1.5rem; line-height: 2rem; letter-spacing: -0.02em; font-weight: 600; }
.posts--c { margin-top: var(--s-500); }
.post--c a { display: grid; gap: var(--s-200); aspect-ratio: auto; overflow: visible; border-radius: 0; background: transparent; isolation: auto; }
.post--c a::after { content: none; }
.post--c .post__media { position: static; z-index: auto; display: block; aspect-ratio: 4 / 3; border-radius: var(--r-3xl); overflow: hidden; background: var(--c-surface); }
.post--c .post__media img { transition: transform 900ms var(--ease); }
.post--c a:hover .post__media img { transform: scale(1.05); }
.post--c .post__body { position: static; padding: 0; gap: var(--s-100); }
.post__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-100); }
.post--c .post__mins { color: var(--c-text-muted); }
.post__title { font-size: 1.25rem; line-height: 1.6rem; letter-spacing: -0.02em; font-weight: 600; transition: color 300ms var(--ease); }
.post--c a:hover .post__title { color: var(--navy-link); }

/* Contacte: el formulari en un full clar; a la dreta, les altres vies. */
.form--c, .form--c:hover {
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
  background: var(--c-surface); border: 0;
}
.form--c .field input, .form--c .field select, .form--c .field textarea {
  color: #181818; background: #ffffff; border: 1px solid var(--line);
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.form--c .field input:hover, .form--c .field select:hover, .form--c .field textarea:hover { border-color: rgba(24, 24, 24, 0.3); }
.form--c .field input:focus, .form--c .field select:focus, .form--c .field textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20, 48, 107, 0.14); }
.form--c .field.has-error input, .form--c .field.has-error textarea, .form--c .field.has-error select { border-color: #b42318; }
.form--c .field__error { color: #b42318; }
.form--c .check span { color: #181818; background: #ffffff; border: 1px solid var(--line); }
.form--c .check span:hover { border-color: rgba(24, 24, 24, 0.3); }
.form--c .check--d input:checked + span { color: #181818; background: var(--yellow); border-color: var(--yellow); }
.form--c .check--e input:checked + span { color: #ffffff; background: var(--navy); border-color: var(--navy); }
.form--c .check input:focus-visible + span { outline-color: #181818; }
.form--c .consent input { accent-color: #181818; }
.form--c .form__status { background: rgba(20, 48, 107, 0.08); color: #181818; }
.contact-side { display: grid; gap: var(--s-200); align-content: start; }
.contact-side__kick { font: 500 0.75rem/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-text-muted); }
.contact-side__lead { color: var(--c-text-muted); font-size: 1.0625rem; line-height: 1.6; max-width: 34ch; }
.contact--c .contact-info { margin-top: var(--s-200); }
.contact--c .contact-info div { border-bottom-color: var(--line); }
.contact--c .contact-info a { background-image: linear-gradient(var(--yellow), var(--yellow)); background-size: 0 3px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 400ms var(--ease); }
.contact--c .contact-info a:hover { color: inherit; background-size: 100% 3px; }

/* Què passa quan ens escrius: la secció navy, tres passos amb fletxa. */
.after--c li, .after--c li:hover {
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
  position: relative; display: grid; gap: var(--s-100); align-content: start;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16);
}
.after--c .after__num { background: var(--sky); color: var(--navy-ink); margin-bottom: var(--s-300); }
.after--c h3 { font-size: 1.375rem; line-height: 1.75rem; letter-spacing: -0.02em; font-weight: 600; }
.after--c p { margin-top: 0; color: var(--c-text-muted); font-size: 1rem; line-height: 1.6; }
@media (min-width: 900px) {
  .after--c li:not(:last-child)::after {
    content: ""; position: absolute; top: 48px; right: calc(var(--s-300) * -1); width: var(--s-300); height: 2px;
    background: linear-gradient(90deg, rgba(143, 176, 255, 0), var(--sky));
  }
  .after--c li:not(:last-child)::before {
    content: ""; position: absolute; top: 44px; right: calc(var(--s-300) * -1 - 2px); width: 0; height: 0;
    border-left: 8px solid var(--sky); border-top: 5px solid transparent; border-bottom: 5px solid transparent; z-index: 1;
  }
}

/* Article i fitxa de projecte (encara amb l'estructura d'abans): colors
   pensats per al fosc, passats a clar. */
.prose p { color: #3d3b35; }
.prose blockquote { border-left-color: var(--yellow); }
.inline-cta, .bio { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; background: var(--c-surface); border-color: transparent; }
.case-hero { color: #ffffff; }
.case-hero__title, .case-hero__title .split-line { background: none; color: #ffffff; -webkit-text-fill-color: #ffffff; }
.case-hero__content .crumbs a:hover { color: #ffffff; }

/* Fitxa de projecte -------------------------------------------------------- */
.cs-head { padding-bottom: clamp(120px, 14vw, 200px); }
.cs-head .crumbs { margin-bottom: var(--s-300); }
.cs-head__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-300); }
.cs-head .page-hero__title { margin-top: 0; font-size: clamp(3rem, 9vw, 8rem); }
.cs-head__tags { display: flex; gap: var(--s-75); }
/* La imatge principal puja damunt del full boira. */
main .cs-intro-sec { padding-top: 0; }
.cs-cover { margin: calc(clamp(96px, 12vw, 168px) * -1) 0 0; position: relative; z-index: 1; overflow: hidden; border-radius: var(--r-3xl); aspect-ratio: 16 / 8; background: var(--c-surface); box-shadow: 0 40px 80px -48px rgba(24, 24, 24, 0.5); }
.cs-cover img { width: 100%; height: 100%; object-fit: cover; }
.cs-intro { display: grid; gap: var(--s-600); margin-top: clamp(48px, 6vw, 88px); }
@media (min-width: 1024px) { .cs-intro { grid-template-columns: 7fr 4fr; gap: var(--s-900); } }
.cs-intro__text p { color: var(--c-text-muted); font-size: 1.125rem; line-height: 1.7; }
.cs-intro__text p + p { margin-top: var(--s-200); }
.cs-intro__text .cs-intro__lead { color: var(--c-text); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.25; letter-spacing: -0.025em; font-weight: 500; margin-bottom: var(--s-300); }
.cs-facts div { border-bottom-color: var(--line); }
/* La frase clau, a la secció de color del projecte, amb tres xifres. */
.cs-statement { max-width: 18ch; font-size: clamp(2.25rem, 5vw, 4.25rem); line-height: 1.02; }
.cs-stats { list-style: none; padding: 0; margin-top: clamp(40px, 5vw, 72px); display: grid; gap: var(--s-300); }
@media (min-width: 768px) { .cs-stats { grid-template-columns: repeat(3, 1fr); } }
.cs-stats li { display: grid; gap: var(--s-75); padding-top: var(--s-300); border-top: 1px solid var(--line); }
.cs-stat__n { font-size: clamp(3rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.05em; font-weight: 600; }
.cs-stat__l { color: var(--c-text-muted); }
/* Galeria */
.cs-gal-sec .case-gallery { gap: clamp(16px, 2vw, 24px); }
.cs-split { margin-block: clamp(48px, 7vw, 112px); }
.cs-split__title { margin-top: var(--s-200); font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -0.03em; }
.case-gallery figure { margin: 0; }
/* Següent projecte: targeta ampla amb la foto i el nom. */
.cs-next { display: grid; overflow: hidden; border-radius: var(--r-3xl); background: var(--c-surface); }
@media (min-width: 768px) { .cs-next { grid-template-columns: 5fr 7fr; min-height: 360px; } }
.cs-next__media { display: block; overflow: hidden; aspect-ratio: 4 / 3; }
@media (min-width: 768px) { .cs-next__media { aspect-ratio: auto; } }
.cs-next__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.cs-next:hover .cs-next__media img { transform: scale(1.05); }
.cs-next__body { position: relative; display: grid; align-content: end; gap: var(--s-100); padding: clamp(24px, 4vw, 56px); }
.cs-next__label { font: 500 0.75rem/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-text-muted); }
.cs-next__name { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.05em; font-weight: 600; }
.cs-next__kind { color: var(--c-text-muted); }
.cs-next__tags { display: flex; gap: var(--s-75); margin-top: var(--s-100); }
.cs-next__arrow { position: absolute; top: clamp(24px, 4vw, 48px); right: clamp(24px, 4vw, 48px); display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #181818; color: #ffffff; transition: transform 500ms var(--ease), background-color 300ms var(--ease); }
.cs-next__arrow .icon { width: 22px; height: 22px; }
.cs-next:hover .cs-next__arrow { transform: translateX(6px); background: var(--yellow); color: #181818; }
.cs-all { margin-top: var(--s-400); }

/* Capçalera amb foto (Projectes, Blog): la foto a la dreta, fosa cap al
   boira a l'esquerra perquè el text es llegeixi sempre sobre color pla. */
.ph--img { position: relative; isolation: isolate; overflow: hidden; }
.ph__bg { position: absolute; z-index: -2; top: 0; right: 0; width: 56%; height: 100%; object-fit: cover; }
.ph--img::before { content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(90deg, var(--hero-bg) 0%, var(--hero-bg) 46%, rgba(235, 239, 245, 0.6) 60%, rgba(235, 239, 245, 0) 80%); }
@media (max-width: 767px) {
  .ph--img { padding-bottom: 260px; }
  .ph__bg { top: auto; bottom: 0; width: 100%; height: 240px; }
  .ph--img::before { background: linear-gradient(180deg, var(--hero-bg) 0%, var(--hero-bg) calc(100% - 240px), rgba(235, 239, 245, 0) calc(100% - 150px)); }
}

/* CTA «El logo s'obre»: més curt (160vh) i amb l'escenari al 70 % de la
   pantalla, perquè no quedi tant de buit abans ni després. El progrés el
   calcula js/scroll.js (adaptat a cta_c.py). */
.pin--e { height: 160vh; }
.pin--e .pin__stage { top: 15vh; top: 15svh; height: 70vh; height: 70svh; }
@media (max-width: 767px) {
  .pin--e .pin__stage { top: 10svh; height: 80svh; }
  .pin--e .lo { --dy: 28svh; }
}
@media (prefers-reduced-motion: reduce) {
  .pin--e .pin__stage { top: 0; height: auto; min-height: 100svh; }
}

/* Projectes · variants A, B i D ------------------------------------------- */
.pv-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-200) var(--s-400); }
.pv-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--r-full); background: var(--c-surface); font-size: 0.8125rem; }
.pv-switch > span { padding: 0 8px 0 10px; font: 500 0.6875rem/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-text-muted); }
.pv-switch a { padding: 6px 12px; border-radius: var(--r-full); color: var(--c-text-muted); transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.pv-switch a b { font-weight: 600; color: var(--c-text); }
.pv-switch a:hover { background: #ffffff; color: var(--c-text); }
.pv-switch a[aria-current="page"] { background: #181818; color: #ffffff; }
.pv-switch a[aria-current="page"] b { color: var(--yellow); }

/* A · Masonry: columnes, cada projecte amb la seva alçada. */
.pm { list-style: none; padding: 0; margin-top: var(--s-500); columns: 1; column-gap: var(--s-300); }
@media (min-width: 600px) { .pm { columns: 2; } }
@media (min-width: 1000px) { .pm { columns: 3; } }
.pm__i { break-inside: avoid; margin-bottom: var(--s-500); }
.pm__i[hidden] { display: none; }
.pm__card { display: grid; gap: var(--s-150, 12px); }
.pm__media { position: relative; display: block; overflow: hidden; border-radius: var(--r-3xl); background: var(--c-surface); }
.pm__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1000ms var(--ease); }
.pm__card:hover .pm__media img { transform: scale(1.05); }
.pm__go { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #ffffff; color: #181818; opacity: 0; transform: scale(0.6); transition: opacity 300ms, transform 500ms var(--ease); }
.pm__card:hover .pm__go, .pm__card:focus-visible .pm__go { opacity: 1; transform: none; }
.pm__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-200); }
.pm__name { display: block; font-size: 1.1875rem; line-height: 1.5rem; font-weight: 600; letter-spacing: -0.015em; }
.pm__kind { display: block; color: var(--c-text-muted); font-size: 0.9375rem; }
.pm__tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

/* B · Bento: graella fixa amb peces grans i petites; el text sobre la foto. */
.pb { list-style: none; padding: 0; margin-top: var(--s-500); display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; grid-auto-flow: dense; }
@media (min-width: 900px) { .pb { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 220px; gap: 16px; } }
.pb__i[hidden] { display: none; }
.pb__card { position: relative; display: block; height: 100%; overflow: hidden; isolation: isolate; border-radius: var(--r-3xl); background: var(--c-surface); color: #ffffff; }
.pb__card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1100ms var(--ease); }
.pb__card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0) 55%); }
.pb__card:hover img { transform: scale(1.06); }
.pb__card:focus-visible { outline-offset: 4px; }
.pb__cap { position: absolute; left: 18px; right: 18px; bottom: 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.pb__name { display: block; font-size: 1.125rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; }
.pb__kind { display: block; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.8); }
.pb__tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pb__i.s1 { grid-column: span 2; grid-row: span 2; }
.pb__i.s2 { grid-column: span 2; }
.pb__i.s3 { grid-row: span 2; }
@media (min-width: 900px) {
  .pb__i.s1 { grid-column: span 3; grid-row: span 2; }
  .pb__i.s2 { grid-column: span 3; }
  .pb__i.s3 { grid-column: span 2; grid-row: span 2; }
  .pb__i.s4 { grid-column: span 2; }
  .pb__i.s1 .pb__name { font-size: clamp(1.375rem, 2vw, 1.875rem); }
  .pb__i.s5 .pb__tags, .pb__i.s5 .pb__kind { display: none; }
}
@media (max-width: 899px) { .pb__i:not(.s1) .pb__tags { display: none; } }

/* D · Graella arrossegable: un mosaic sense vores. */
.pd { position: relative; height: min(78vh, 760px); margin-top: var(--s-500); overflow: hidden; border-radius: var(--r-3xl); background: var(--hero-bg); }
.pd.is-live { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.pd.is-down { cursor: grabbing; }
.pd__plane { position: absolute; left: 0; top: 0; will-change: transform; }
.pd__t { position: absolute; width: 240px; overflow: hidden; border-radius: 20px; background: var(--c-surface); box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.45); transition: opacity 400ms var(--ease), filter 400ms var(--ease); }
.pd__t img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.pd__lab { position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.94); color: #181818; font-size: 0.875rem; font-weight: 600; line-height: 1.25; opacity: 0; transform: translateY(6px); transition: opacity 300ms, transform 300ms var(--ease); }
.pd__lab small { font-size: 0.75rem; font-weight: 400; color: #5f5d55; }
.pd__t:hover .pd__lab, .pd__t:focus-visible .pd__lab { opacity: 1; transform: none; }
.pd__t:focus-visible { outline: 3px solid #181818; outline-offset: 3px; }
.pd__t.is-dim { opacity: 0.16; filter: grayscale(1); }
.pd__hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 8px 14px; border-radius: var(--r-full); background: #181818; color: #ffffff; font-size: 0.8125rem; font-weight: 500; pointer-events: none; }
html:not(.js) .pd__hint { display: none; }
@media (hover: none) { .pd__lab { opacity: 1; transform: none; } }

/* Fitxa amb captures de pantalla (Hub): totes amples, a la seva proporció. */
.cs-shots { display: grid; gap: clamp(32px, 4vw, 56px); }
.cs-shot { margin: 0; }
.cs-shot .frame { overflow: hidden; border-radius: var(--r-2xl); background: #181818; box-shadow: 0 0 0 1px var(--line), 0 40px 80px -50px rgba(0, 0, 0, 0.55); }
.cs-shot img { display: block; width: 100%; height: auto; }
.cs-shot figcaption { margin-top: var(--s-150, 12px); color: var(--c-text-muted); font-size: 0.9375rem; }
.cs-note { margin-top: var(--s-500); padding: var(--s-200) var(--s-300); border-radius: var(--r-xl); background: var(--c-surface); color: var(--c-text-muted); font-size: 0.9375rem; }
.cs-cover img[width="1568"] { object-position: left top; }

/* Portades fetes per a Xerra, Kèrix i el Hub: el logo és a dalt. */
.is-cover img { object-position: 50% 0; }

.pv-switch a { white-space: nowrap; }
@media (max-width: 699px) { .pv-switch .pv-n { display: none; } }
