/* ---------------------------------------------------------------
     TIPOGRAFIA — Neue Haas Grotesk real (fitxers proporcionats)
  ---------------------------------------------------------------- */
  @font-face{
    font-family:'Neue Haas Grotesk Display';
    src:url('../fonts/NeueHaasGroteskDisplay-Light.woff2') format('woff2');
    font-weight:300; font-style:normal; font-display:swap;
  }
  @font-face{
    font-family:'Neue Haas Grotesk Display';
    src:url('../fonts/NeueHaasGroteskDisplay-Roman.woff2') format('woff2');
    font-weight:400; font-style:normal; font-display:swap;
  }
  @font-face{
    font-family:'Neue Haas Grotesk Display';
    src:url('../fonts/NeueHaasGroteskDisplay-Bold.woff2') format('woff2');
    font-weight:700; font-style:normal; font-display:swap;
  }
  @font-face{
    font-family:'Neue Haas Grotesk Display';
    src:url('../fonts/NeueHaasGroteskDisplay-Black.woff2') format('woff2');
    font-weight:900; font-style:normal; font-display:swap;
  }
  @font-face{
    font-family:'Neue Haas Grotesk Text';
    src:url('../fonts/NeueHaasGroteskText-Regular.woff2') format('woff2');
    font-weight:400; font-style:normal; font-display:swap;
  }
  @font-face{
    font-family:'Neue Haas Grotesk Text';
    src:url('../fonts/NeueHaasGroteskText-Bold.woff2') format('woff2');
    font-weight:700; font-style:normal; font-display:swap;
  }
  @font-face{
    font-family:'PP Kyoto';
    src:url('../fonts/PPKyoto-Extralight.woff2') format('woff2');
    font-weight:100 900; font-style:normal; font-display:swap;   /* tota la web en Extralight, sigui quin sigui el pes demanat */
  }

  :root{
    --bg:#0a0a0a;
    --card:#1b1b1b;
    --text:#f3f1ec;
    --text-muted:#f3f1ec;
    --accent:#ff5a36;
    --cream:#f3f1ec;
    --radius-lg:22px;
    --radius-md:16px;
    --radius-chip:12px;
    --radius-pill:999px;
    --font-display:'PP Kyoto', Georgia, 'Times New Roman', serif;
    --font-body:'PP Kyoto', Georgia, 'Times New Roman', serif;
    --font-title:'PP Kyoto', Georgia, 'Times New Roman', serif;
    --gap:24px;
    --pad-page: 24px;
  }

  /* ---------------------------------------------------------------
     LIGHT MODE — paleta gris Braun (no blanc pur)
  ---------------------------------------------------------------- */
  html[data-theme="light"]{
    --bg:#eceeec;        /* gris molt clar, gairebé blanc trencat */
    --card:#f4f5f3;      /* pastilles: encara més clares, gairebé blanques */
    --text:#1a1a18;      /* text principal: gris molt fosc, no negre pur */
    --text-muted:#1a1a18;/* les explicacions, en el mateix negre que el text principal */
    --cream:#e2e4e0;     /* el cream s'enfosqueix una mica per contrastar */
  }

  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  h1,h2,h3,h4,h5,h6,strong,b,th{font-weight:200;}
  button,input,select,textarea{font-weight:inherit;}
  body{
    font-weight:200;
    background:var(--bg);
    color:var(--text);
    font-family:var(--font-body);
    -webkit-font-smoothing:antialiased;
    transition:background .4s ease, color .4s ease;
    min-height:100vh;
    display:flex;
    flex-direction:column;
  }
  footer{ margin-top:auto; }   /* footer sempre a baix (sticky) */
  .card, .chip, .filter-btn, .lang-group, .theme-toggle, .card-media-frame.is-square, .service-body-inner{
    transition:background .4s ease, color .4s ease, border-color .4s ease;
  }
  img{max-width:100%;display:block;}
  button{font-family:inherit;border:none;cursor:pointer;background:none;color:inherit;}
  a{color:inherit;text-decoration:none;}
  :focus-visible{outline:2px solid var(--accent); outline-offset:3px;}

  /* ---------- HEADER ---------- */
  header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px var(--pad-page) 0;
  }
  .logo{
    font-family:var(--font-title);
    font-weight:200;
    font-size:32px;
    line-height:21px;
    letter-spacing:0;
  }
  .header-right{
    display:flex;
    align-items:center;
    gap:18px;
    font-family:var(--font-title);
    font-size:19px;
  }
  .theme-toggle{
    width:30px;
    height:30px;
    border-radius:50%;
    background:var(--text);
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    transition:background .2s ease;
  }
  .theme-toggle svg{ display:none; }
  .theme-toggle:hover{ background:var(--text); color:var(--bg); }
  /* per defecte (fosc) es veu el sol; en light es veu la lluna */
  .theme-icon-moon{ display:none; }
  html[data-theme="light"] .theme-icon-sun{ display:none; }
  html[data-theme="light"] .theme-icon-moon{ display:block; }
  .contacto-link{
    color:var(--text-muted);
    transition:color .2s ease;
  }
  .contacto-link:hover{ color:var(--text); }
  .lang-group{
    display:flex;
    align-items:center;
    gap:4px;
    background:var(--card);
    border-radius:var(--radius-pill);
    padding:4px;
  }
  .lang-btn{
    text-decoration:none; display:inline-block; cursor:pointer;   /* també és <a> amb WPML */
    padding:10px 18px;
    border-radius:var(--radius-pill);
    font-family:var(--font-title);
    font-size:19px;
    line-height:1;
    color:var(--text-muted);
    font-weight:200;
    transition:background .2s ease, color .2s ease;
  }
  .lang-btn.active{
    background:var(--text);
    color:var(--bg);
  }
  .lang-btn:hover:not(.active){ color:var(--text); }

  /* ---------- HIGHLIGHTS — fila estàtica amb efecte Dock al hover ---------- */
  .marquee-wrap{
    margin:14px 0 0;
    overflow:visible;
    padding:14px 0;
  }
  .marquee-track{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:0 var(--pad-page);
  }
  .marquee-track .chip{ flex:1 1 0; min-width:0; }
  .chip{
    display:flex;
    align-items:center;
    height:88px;
    background:var(--card);
    border-radius:var(--radius-chip);
    overflow:hidden;
    flex-shrink:0;
    white-space:nowrap;
    transform-origin:center center;
    will-change:transform;
    position:relative;
  }
  .chip-thumb{
    width:88px;
    height:88px;
    object-fit:cover;
    border-radius:var(--radius-chip);
    flex-shrink:0;
    display:block;
  }
  .chip-text{ padding:0 30px 0 18px; }
  .chip-title{
    font-family:var(--font-title);
    font-weight:200;
    font-size:24px;
    line-height:26px;
    color:var(--text);
  }
  .chip-sub{
    font-family:var(--font-display);
    font-weight:200;
    font-size:17px;
    line-height:22px;
    color:var(--text-muted);
    margin-top:2px;
  }

  /* ---------- FILTER ---------- */
  .filter-contacto{ display:block; }
  .filter-nav{
    display:flex;
    gap:10px;
    padding:14px var(--pad-page) 0;
  }
  /* espai sobre la pastilla del menú = gap logo↔highlights.
     Va per MARGIN (mou tota la pastilla), no per padding, perquè els botons
     quedin centrats dins la pastilla. */
  .site-top .filter-nav{ margin-top:28px; }
  .filter-btn{
    padding:10px 20px;
    border-radius:var(--radius-pill);
    background:var(--card);
    color:var(--text-muted);
    font-family:var(--font-title);
    font-size:19px;
    line-height:1;
    font-weight:200;
    transition:background .25s ease, color .25s ease;
  }
  .filter-btn.active{
    background:var(--text);
    color:var(--bg);
  }
  .filter-btn:hover:not(.active){ color:var(--text); }

  /* xip del filtre actiu (boleta · text · ✕) */
  #tagNote{ display:inline-flex; align-items:center; gap:9px; padding:10px 16px 10px 18px; flex-shrink:0; white-space:nowrap; }
  #tagNote .tagnote-dot{ width:11px; height:11px; border-radius:50%; flex-shrink:0; }
  #tagNote .tagnote-label{ line-height:1; white-space:nowrap; }
  #tagNote .tagnote-x{ margin-left:7px; font-size:14px; line-height:1; opacity:.55; transition:opacity .2s ease; }
  #tagNote:hover .tagnote-x{ opacity:1; }

  /* ---------- GRID (columnes fixes; masonry repartit per JS) ---------- */
  .grid{
    display:flex;
    align-items:flex-start;
    gap:var(--gap);
    padding:42px var(--pad-page) 90px;
  }
  .grid-col{
    flex:1 1 0;
    min-width:0;
    display:flex;
    flex-direction:column;
  }

  .card{
    margin-bottom:var(--gap);
    background:var(--card);
    border-radius:var(--radius-lg);
    overflow:hidden;
  }
  .card.is-hidden{ display:none; }

  /* media card — el fons només l'aguanta la imatge; el text viu fora, sobre el negre */
  .card--media[data-href], .card--about[data-href], .card--news[data-href]{ cursor:pointer; }
  .card--media{ background:transparent; overflow:visible; position:relative; }

  /* ---------------------------------------------------------------
     SISTEMA DE FORMATS DE PASTILLA
     Totes tenen el mateix AMPLE (el de la columna del grid).
     L'ALÇADA s'adapta segons el format triat al gestor:
       (per defecte)  → vertical 4:5
       .is-square     → quadrat 1:1
       .is-round      → cercle 1:1
  ---------------------------------------------------------------- */
  .card-media-frame{
    position:relative;
    border-radius:var(--radius-lg);
    overflow:hidden;
    aspect-ratio:4/5;          /* vertical per defecte */
  }
  .card-media-frame.is-square{
    aspect-ratio:1/1;          /* quadrat */
  }
  .card-media-frame.is-round{
    aspect-ratio:1/1;          /* cercle */
    border-radius:50%;
  }
  /* imatge/vídeo únic amb zoom suau al hover */
  .card-media-frame img,
  .card-media-frame video{
    position:absolute;
    inset:0;
    width:100%; height:100%;
    object-fit:cover;
    display:block;
    transform:scale(1);
    transition:transform .6s cubic-bezier(.2,.7,.2,1);
  }
  .card-media-frame:hover img,
  .card-media-frame:hover video{ transform:scale(1.09); }

  /* Lottie (.json) de la tarjeta: omple el marc com una imatge (cover) */
  .card-media-frame .card-lottie{
    position:absolute;
    inset:0;
    width:100%; height:100%;
    display:block;
    z-index:1;                 /* per sobre del pòster de fons */
    transform:scale(1);
    transition:transform .6s cubic-bezier(.2,.7,.2,1);
  }
  .card-media-frame:hover .card-lottie{ transform:scale(1.09); }
  /* Pòster (imatge) que es veu mentre el Lottie encara no ha carregat */
  .card-media-frame .card-lottie-poster{ z-index:0; }
  .card-media-frame .card-lottie-poster.is-hidden{ opacity:0; }

  /* Pastilla del servei sobre la imatge dels articles individuals (filtre Articles) */
  .article-pill{
    position:absolute; top:18px; left:18px; z-index:2;
    font-family:var(--font-display); font-weight:200; font-size:15px;
    letter-spacing:0.08em; text-transform:uppercase; line-height:1;
    padding:11px 19px; border-radius:999px; white-space:nowrap; pointer-events:none;
  }

  /* Clúster d'articles: llista de fins a 4, ocupa l'espai d'un projecte SENSE pastilla (transparent) */
  .card--articles-group{ background:transparent; overflow:visible; }
  /* rows estil chip dels Highlights: en hover apareix una pastilla (var(--card))
     amb la imatge a l'esquerra (cantons arrodonits) i el text després */
  .ag-list{ display:flex; flex-direction:column; gap:16px; }
  .ag-row{ display:flex; align-items:center; gap:18px; text-decoration:none; padding:0 22px 0 0; border-radius:var(--radius-chip); transition:background .2s ease; }
  .ag-row:hover{ background:var(--card); }
  .ag-thumb{ position:relative; width:88px; height:88px; flex-shrink:0; border-radius:var(--radius-chip); overflow:hidden; }
  .ag-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
  .ag-dot{ position:absolute; top:8px; left:8px; width:10px; height:10px; border-radius:50%; }
  .ag-title{
    font-family:var(--font-title); font-weight:200; font-size:19px; line-height:1.2; color:var(--text);
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }

  /* pastilla "See work" petita amb efecte vidre que segueix el cursor */
  .see-work{
    position:absolute;
    left:0; top:0;
    z-index:3;
    padding:9px 18px;
    border-radius:var(--radius-pill);
    background:rgba(255,255,255,0.16);
    -webkit-backdrop-filter:blur(12px);
    backdrop-filter:blur(12px);
    border:1px solid rgba(255,255,255,0.3);
    color:#fff;
    font-family:var(--font-title);
    font-weight:200;
    font-size:15px;
    line-height:1;
    white-space:nowrap;
    opacity:0;
    pointer-events:none;
    will-change:transform, opacity;
    transition:opacity .25s ease;
  }
  .card-media-frame:hover ~ .see-work{ opacity:1; }

  .card--media .card-caption{ padding:16px 2px 0; }
  .card-caption-title{ font-family:var(--font-title); font-weight:200; font-size:24px; line-height:28px; color:var(--text); margin-bottom:4px; }
  .card-caption-text{ font-family:var(--font-display); font-weight:200; font-size:19px; line-height:25px; color:var(--text-muted); }
  /* boletes de color (tags de servei) al costat del nom del projecte.
     El color l'aplica el JS des de la config única SERVICES (editable al gestor). */
  .tag-dots{ display:inline-flex; gap:5px; margin-left:9px; vertical-align:middle; }
  .tag-dot{ width:11px; height:11px; border-radius:50%; flex-shrink:0; display:inline-block; padding:0; border:0; cursor:pointer; transition:transform .15s ease; }
  button.tag-dot:hover{ transform:scale(1.35); }

  /* text / about card — sense pastilla: text directe sobre el fons, tot l'ample */
  .card--about{ background:transparent; overflow:visible; padding:0; }
  .card--about p{
    font-family:var(--font-title);
    font-weight:200;
    font-size:31px;
    line-height:1.1;
    margin:0;
    letter-spacing:0;
  }
  .card--about strong{ font-weight:200; }
  /* Frases sobre la identitat: mateix cos que el text de l'estudi */
  .card--quote blockquote{ margin:0; }

  /* contact card */
  .card--contact{ padding:30px 30px 34px; display:flex; flex-direction:column; gap:20px; max-width:520px; }
  .contact-big, .contact-info{ overflow-wrap:anywhere; }
  .contact-big{
    font-family:var(--font-title); font-weight:200; font-size:31px; line-height:1.05;
    color:var(--text); transition:opacity .2s ease;
  }
  .contact-big:hover{ opacity:.65; }
  .contact-info{
    font-family:var(--font-display); font-weight:200; font-size:18px; line-height:1.5;
    color:var(--text-muted); display:flex; flex-direction:column; gap:2px;
  }
  .contact-info a{ transition:color .2s ease; }
  .contact-info a:hover{ color:var(--text); }
  .contact-addr{ margin-top:12px; }
  .contact-social{ margin-top:12px; display:flex; flex-wrap:wrap; gap:16px; }

  /* Contacto: columna esquerra formulari (ocupa tot l'ample que queda); dreta newsletter + info.
     Entre columnes, el mateix aire que entre pastilles. */
  .grid.grid--contacto{ display:flex; column-count:auto; gap:var(--gap); align-items:start; }
  .contacto-col{ display:flex; flex-direction:column; gap:var(--gap); min-width:0; }
  .contacto-col--main{ flex:1 1 auto; }
  .contacto-col--info{ flex:0 0 360px; }
  .grid--contacto .card--contact{ max-width:none; margin:0; }
  @media (max-width:880px){
    .grid.grid--contacto{ flex-direction:column; gap:var(--gap); }   /* apilat: mateix aire entre totes les pastilles */
    .contacto-col--main,
    .contacto-col--info{ flex:1 1 auto; width:100%; }
  }

  /* news card */
  /* Articles: pastilla de filet (contorn del color de pastilla), sense fons ple ni imatge */
  .card--news{ padding:28px 28px 30px; background:transparent; border:1.5px solid var(--card); }
  html[data-theme="light"] .card--news{ border-color:#dcdedb; } /* filet visible sobre fons clar */
  .news-eyebrow{ font-family:var(--font-display); font-weight:200; font-size:12px; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); margin-bottom:16px; display:flex; align-items:center; gap:8px; }
  .news-eyebrow::before{ content:""; width:6px; height:6px; border-radius:50%; border:1px solid currentColor; }
  .news-date{ font-family:var(--font-display); font-weight:200; font-size:19px; line-height:25px; color:var(--text-muted); margin-bottom:22px; }
  .news-title{ font-family:var(--font-title); font-weight:200; font-size:24px; line-height:28px; color:var(--text); margin-bottom:22px; }
  .news-excerpt{ font-family:var(--font-display); font-weight:200; font-size:19px; line-height:25px; color:var(--text-muted); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

  /* service accordion card */
  .card--service{ padding:17px 20px; }

  /* ---------------------------------------------------------------
     COLORS BRAUN per a les pastilles de servei (paleta Dieter Rams).
     Al gestor es podrà triar un color per servei → afegeix la classe.
     Per defecte (sense classe) manté el card gris fosc de sempre.
  ---------------------------------------------------------------- */
  .card--service.svc-red{    background:#e1452f; }
  .card--service.svc-yellow{ background:#f2b01e; }
  .card--service.svc-brown{  background:#5a4632; }
  .card--service.svc-green{  background:#1c7a48; }
  .card--service.svc-gray{   background:#d4d8d0; }
  .card--service.svc-dark{   background:#2a2a28; }

  /* color de text segons el fons (clar sobre foscos, fosc sobre clars) */
  .card--service.svc-red,
  .card--service.svc-brown,
  .card--service.svc-green,
  .card--service.svc-dark{ color:#fff; }
  .card--service.svc-red .service-body-inner,
  .card--service.svc-brown .service-body-inner,
  .card--service.svc-green .service-body-inner,
  .card--service.svc-dark .service-body-inner{ color:#fff; }

  .card--service.svc-yellow,
  .card--service.svc-gray{ color:#1a1a1a; }
  .card--service.svc-yellow .service-body-inner,
  .card--service.svc-gray .service-body-inner{ color:#1a1a1a; }

  .card--service{ position:relative; }
  .service-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    width:100%;
    text-align:left;
    margin:0;
    padding:0;
  }
  .service-title{
    font-family:var(--font-title);
    font-weight:200;
    font-size:24px;
    line-height:1.1;
  }
  .service-toggle{
    position:relative;
    flex-shrink:0;
    width:14px;
    height:14px;
    font-size:0;
    transition:transform .35s ease;
  }
  /* el "+" dibuixat (el glif ＋ no és de la PP Kyoto i queia per sota del títol): dues ratlles centrades */
  .service-toggle::before, .service-toggle::after{ content:''; position:absolute; left:50%; top:50%; width:100%; height:1.5px; background:currentColor; transform:translate(-50%,-50%); }
  .service-toggle::after{ transform:translate(-50%,-50%) rotate(90deg); }
  .card--service.is-open .service-toggle{ transform:rotate(135deg); }
  .service-body{
    overflow:hidden;
    height:0;
  }
  .service-body-inner{
    padding-top:14px;
    font-size:19px;
    line-height:25px;
    color:var(--text-muted);
  }
  /* "Qué incluye": pastilles amb contorn, del color del text del servei */
  .svc-items{ list-style:none; margin:16px 0 2px; padding:0; display:flex; flex-wrap:wrap; gap:6px; }
  .svc-items li{ font-family:var(--font-title); font-weight:200; font-size:18px; line-height:1; padding:8px 14px 7px; border:1px solid currentColor; border-radius:var(--radius-pill); white-space:nowrap; }
  .svc-more{ display:none; }   /* «Más info» només a mòbil (allà substitueix el text corregut) */

  /* clock widget — sense pastilla, directament sobre el fons negre */
  .card--clock{
    background:transparent;
    padding:0;
    overflow:visible;
    border-radius:0;
    display:flex;
    flex-direction:column;
  }
  .clock-face-wrap{ display:block; }
  /* el rellotge omple tot l'ample de columna, com les targetes rodones */
  .clock-face-wrap svg{ width:100%; height:auto; display:block; }
  /* color del rellotge segons tema (la maneta groga es manté sempre) */
  #clockFace{ color:#ffffff; }            /* contingut: marques, números, agulles */
  #hourHand, #minuteHand{ stroke:currentColor; } /* agulles hereten el color del tema */
  #clockBase{ fill:#0a0a0a; transition:fill .4s ease; }  /* base fosca en dark */
  html[data-theme="light"] #clockFace{ color:#1a1a18; }  /* contingut fosc en light */
  html[data-theme="light"] #clockBase{ fill:var(--card); } /* base color pastilla en light */

  /* light card (proyecto destacado) — el cream només viu al bloc de la marca */
  .light-mark{
    aspect-ratio:4/5;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--cream);
    border-radius:var(--radius-lg);
  }

  footer{
    padding:28px var(--pad-page) 48px;
    font-family:var(--font-title);
    font-weight:200;
    font-size:20px;
    color:var(--text);
    display:flex;
    justify-content:space-between;
    align-items:center;
  }
  .footer-cta{
    color:var(--text);
    font-family:var(--font-title);
    font-weight:200;
    font-size:20px;
    transition:opacity .2s ease;
  }
  .footer-cta:hover{ opacity:0.7; }


  /* ===============================================================
     MÒBIL  (≤560px)
  =============================================================== */
  @media (max-width:560px){
    :root{ --pad-page:14px; --gap:14px;
      /* cantons menys arrodonits en mòbil */
      --radius-lg:15px; --radius-md:12px; --radius-chip:9px; }

    /* --- HEADER --- */
    header{ padding:20px 14px 0; align-items:center; }
    .logo{ font-size:18px; line-height:1.1; }
    .header-right{ gap:8px; font-size:14px; }
    .theme-toggle{ width:24px; height:24px; }
    .lang-btn{ font-size:14px; padding:5px 10px; }
    .contacto-link{ display:none; } /* Contacto passa al filtre a sota */

    /* --- HIGHLIGHTS: targetes verticals, scroll tàctil amb el dit --- */
    .marquee-wrap{
      margin:20px 0 0;
      padding:8px 0 8px;
      overflow-x:auto;
      overflow-y:hidden;
      -webkit-overflow-scrolling:touch;
      scrollbar-width:none;
    }
    .marquee-wrap::-webkit-scrollbar{ display:none; }
    .marquee-track{
      justify-content:flex-start;
      gap:10px;
      padding:0 14px;
      width:max-content;
      align-items:flex-start;   /* títols de 1 o 2 línies: miniatures alineades per dalt */
    }
    .marquee-track .chip{ flex:0 0 auto; }
    /* el chip passa a vertical: imatge quadrada a dalt, text a sota.
       Més petits que una targeta de projecte: se'n veuen 3 sencers i part del 4t. */
    .chip{
      flex-direction:column;
      align-items:stretch;
      height:auto;
      /* amplada segons la pantalla: 3 sencers + mig 4t tallat a la vora dreta, perquè
         s'intueixi que n'hi ha més (14px marge esquerre + 3 separacions de 10px) */
      width:calc((100vw - 44px) / 3.45);
      background:transparent;
      border-radius:0;
      overflow:visible;
    }
    .chip-thumb{
      width:100%;
      height:auto; aspect-ratio:1;
      border-radius:11px;
    }
    .chip-text{ padding:7px 1px 0; min-width:0; }
    /* si el títol no hi cap, es talla amb … en una sola línia */
    .chip-title{
      font-size:15px; line-height:17px;
      white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
    }
    .chip-sub{
      font-size:13px; line-height:15px; margin-top:2px;
      white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
    }
    /* desactivem l'efecte volant en tàctil (no té sentit sense cursor) */
    .chip{ transform:none !important; }

    /* --- FILTRE: scroll horitzontal tàctil --- */
    .filter-nav{
      padding:26px 14px 0;
      gap:8px;
      overflow-x:auto;
      -webkit-overflow-scrolling:touch;
      scrollbar-width:none;
      flex-wrap:nowrap;
    }
    /* a mòbil el marge de 28px (de desktop) sobra: els gaps es fan amb el padding */
    .site-top .filter-nav{ margin-top:0; }
    .filter-nav::-webkit-scrollbar{ display:none; }
    .filter-btn{ flex:0 0 auto; font-size:17px; padding:9px 14px; }   /* Proyectos · Nosotros · Contacto caben sencers a 375px */
    .filter-contacto{ display:block; }

    /* --- GRID: dues columnes (el repartiment el fa el JS) --- */
    .grid{ gap:14px; padding:34px 14px 70px; }
    .filter-nav, .grid, header{ padding-left:14px; padding-right:14px; }

    /* --- MIDES DE CONTINGUT ajustades a mòbil (2 columnes estretes) --- */
    .card--about{ padding:0; }
    .card--about p{
      font-size:22px;
      line-height:1.15;
      display:-webkit-box;
      -webkit-line-clamp:4;
      -webkit-box-orient:vertical;
      overflow:hidden;
    }
    .service-title{ font-size:18px; line-height:1.15; }
    .service-toggle{ width:13px; height:13px; }
    .card--service{ padding:11px 12px; }
    .card--news{ padding:12px 12px 13px; }
    .news-mini{ max-width:96px; margin-bottom:14px; }
    .card-caption-title{ font-size:18px; line-height:20px; }
    .news-title{ font-size:18px; line-height:20px; }
    .card-caption-text, .news-excerpt, .news-date, .service-body-inner{ font-size:15px; line-height:20px; }
    .svc-items{ gap:5px; margin-top:0; }
    /* serveis a la home en mòbil: sense el text corregut; només les píndoles i,
       a sota, «Más info» cap a Nosotros */
    .card--service .svc-desc{ display:none; }
    .svc-more{
      display:inline-block; margin-top:12px; position:relative;
      font-family:var(--font-title); font-weight:200; font-size:15px; line-height:20px;
      color:inherit; text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px;
    }
    .svc-more::after{ content:""; position:absolute; inset:-10px -8px; }   /* àrea tàctil */
    .svc-items li{ font-size:14px; line-height:1.15; padding:6px 10px 5px; white-space:normal; border-radius:14px; }   /* columnes estretes: que parteixin línia */
    /* descripcions de projecte: senceres a mòbil (abans es tallaven a 2 línies amb …) */
    .service-title, .card-caption-title, .news-title, .card-caption-text, .news-excerpt{ overflow-wrap:break-word; }
    .card--about p{ overflow-wrap:normal; word-break:normal; hyphens:none; }
    /* pastilla de servei sobre els articles: a mòbil la targeta és estreta i el text es tallava */
    .article-pill{ top:10px; left:10px; font-size:12px; letter-spacing:0.05em; padding:7px 11px; max-width:calc(100% - 20px); overflow:hidden; text-overflow:ellipsis; }
    .clock-face-wrap{ justify-content:center; }
    .clock-face-wrap svg{ max-width:100%; }

    /* sense See work en mòbil (no hi ha cursor) */
    .see-work{ display:none !important; }

    /* clúster d'articles en mòbil: miniatures més petites */
    .ag-thumb{ width:64px; height:64px; border-radius:12px; }
    .ag-row{ gap:14px; padding-right:14px; }
    .ag-title{ font-size:16px; }

    /* --- FOOTER --- */
    footer{ font-size:18px; padding:24px 14px 40px; }
    .footer-cta{ font-size:18px; }
  }

/* Capa superior fixa (només desktop): el contingut passa per sota en fer scroll */
@media (min-width:561px){
  .site-top{ position:fixed; top:0; left:0; right:0; z-index:60; background:transparent; pointer-events:none; }
  .site-top a, .site-top button{ pointer-events:auto; }
}

/* Peu: © a l'esquerra, «Términos y Condiciones» al centre i ¿Hablamos? a la dreta (mateix cos i color) */
footer, footer.project-footer{ display:grid; grid-template-columns:1fr auto 1fr; gap:12px 24px; }
footer > span{ justify-self:start; }
footer .footer-cta{ grid-column:3; justify-self:end; }
.footer-terms{ justify-self:center; color:var(--text); font-family:var(--font-title); font-weight:200; font-size:inherit; transition:opacity .2s ease; }
.footer-terms:hover{ opacity:.7; }
@media (max-width:560px){
  /* mòbil: tres línies juntes, alineades a l'esquerra (©, termes, ¿Hablamos?) */
  footer, footer.project-footer{ grid-template-columns:1fr; justify-items:start; text-align:left; gap:3px; line-height:1.2; }
  footer > span, footer .footer-cta, .footer-terms{ grid-column:1; grid-row:auto; justify-self:start; }
  /* mateix cos que la descripció dels projectes relacionats */
  footer, footer.project-footer, footer > span, footer .footer-cta, footer .footer-terms{ font-size:15px; line-height:20px; }
}

/* Pastilles de servei: el títol sempre en una sola línia. Si la pastilla és estreta, la
   lletra es redueix just el que cal (10.7 = amplada del títol més llarg, en cossos de lletra;
   28px = creu + separació). En mòbil, 2 línies: en una sola quedaria a 12px i no es llegiria. */
@media (min-width:561px){
  .card--service{ container-type:inline-size; }
  .service-title, .nos-services .service-title{ white-space:nowrap; font-size:min(24px, calc((100cqi - 28px) / 10.7)); }
}

/* Botó de mode clar/fosc: batega com un cor (dos batecs i pausa), a poc a poc */
@keyframes corvina-latido{
  0%,30%,100%{ transform:scale(1); }
  7%{ transform:scale(1.16); }
  14%{ transform:scale(1); }
  21%{ transform:scale(1.1); }
}
@media (prefers-reduced-motion:no-preference){
  .theme-toggle{ animation:corvina-latido 3.2s ease-in-out infinite; }
}

/* Les frases de la home són curtes: en mòbil no es tallen amb «…» com el text de l'estudi */
@media (max-width:560px){
  .card--quote p{ display:block; -webkit-line-clamp:none; line-clamp:none; overflow:visible; }
}
