/* ---------------------------------------------------------------
     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;
  }
  .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 (igual que a la home) */
  .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); }

  /* ---------- GRID ---------- */
  .grid{
    column-count:4;
    column-gap:var(--gap);
    padding:32px var(--pad-page) 90px;
  }
  @media (max-width:1240px){ .grid{ column-count:3; } }
  @media (max-width:880px){ .grid{ column-count:2; } }


  .card{
    break-inside:avoid;
    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{ 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 única amb zoom suau al hover */
  .card-media-frame img{
    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{ transform:scale(1.09); }

  /* 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); }

  /* text / about card */
  .card--about{ padding:36px 32px; }
  .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; }

  /* news card */
  .card--news{ padding:28px 28px 30px; }
  .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); }

  /* service accordion card */
  .card--service{ padding:22px 26px; }

  /* ---------------------------------------------------------------
     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:flex-start;
    gap:12px;
    width:100%;
    text-align:left;
  }
  .service-title{
    font-family:var(--font-title);
    font-weight:200;
    font-size:31px;
    line-height:1.1;
    padding-right:34px; /* espai per al + absolut */
  }
  .service-toggle{
    position:absolute;
    top:14px;
    right:16px;
    flex-shrink:0;
    width:26px;
    height:26px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.3rem;
    transition:transform .35s ease;
  }
  .card--service.is-open .service-toggle{ transform:rotate(135deg); }
  .service-body{
    overflow:hidden;
    height:0;
  }
  .service-body-inner{
    padding-top:18px;
    font-size:19px;
    line-height:25px;
    color:var(--text-muted);
  }

  /* 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:flex; justify-content:center; }
  .clock-face-wrap svg{ width:100%; height:auto; max-width:340px; }
  /* 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 */
    .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; }
    .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:24px 14px 0;
      gap:8px;
      overflow-x:auto;
      -webkit-overflow-scrolling:touch;
      scrollbar-width:none;
      flex-wrap:nowrap;
    }
    .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 --- */
    .grid{ column-count:2; column-gap:14px; padding:24px 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:12px 12px; }
    .card--about p{
      font-size:22px;
      line-height:1.15;
      display:-webkit-box;
      -webkit-line-clamp:3;
      -webkit-box-orient:vertical;
      overflow:hidden;
    }
    .service-title{ font-size:18px; line-height:1.15; }
    .service-toggle{ font-size:18px; }
    .card--service{ padding:11px 12px; }
    .card--news{ padding:12px 12px 13px; }
    .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; }
    /* 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; }
    .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; }

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

/* ===== bloc ===== */

/* ====================== PÀGINA NOSOTROS ====================== */
  .nos-cta{ color:var(--text); font-family:var(--font-title); font-weight:200; font-size:19px; transition:opacity .2s ease; }
  .nos-cta:hover{ opacity:.6; }

  /* DUES COLUMNES INDEPENDENTS: cada columna flueix pel seu compte, així desplegar
     l'about (esq.) o un servei (dreta) només mou la SEVA columna, no l'altra.
     Esq.: about → clients+contacte → FAQ · Dreta: serveis → fotos → YEAHRS */
  .nos-grid{ display:grid; grid-template-columns:1fr 1fr;
    gap:var(--gap); padding:32px var(--pad-page) 0; align-items:stretch; }   /* les dues columnes acaben igual: l'última pastilla de cada una creix fins a baix */
  .nos-col{ display:flex; flex-direction:column; gap:var(--gap); }
  .nos-services{ order:1; }
  .nos-pair--media{ order:2; grid-template-columns:1fr; }   /* fotos: una sola columna */
  .nos-parallel{ order:3; flex:1 0 auto; display:flex; flex-direction:column; }   /* YEAHRS a baix a la dreta */
  .nos-pair{ display:grid; grid-template-columns:1fr 1fr; gap:var(--gap); align-items:start; }
  .nos-pair--info{ align-items:stretch; }                   /* clients i contacte, sempre de la mateixa alçada */

  .nos-card{ background:var(--card); border-radius:var(--radius-lg); padding:34px 36px; }
  /* About / explicació de l'estudi: sense pastilla, text directe sobre el fons.
     padding-left:20px = el text entra igual que el text del botó "Todo" (que té
     20px de padding intern), així queda alineat amb la seva "T". */
  .nos-card.nos-about{ position:relative; background:transparent; border-radius:0; padding:0 52px 0 20px; }

  .nos-h{ font-family:var(--font-title); font-weight:200; font-size:31px; line-height:1.1; margin:0 0 26px; }

  /* Pastilla YEAHRS (sobre els serveis) */
  .nos-yeahrs{ flex:1 0 auto; display:flex; flex-direction:column; gap:24px; }
  .yeahrs-logo{ width:170px; max-width:62%; height:auto; color:var(--text); display:block; }
  .yeahrs-text{ font-family:var(--font-display); font-weight:200; font-size:19px; line-height:1.5; color:var(--text-muted); }
  .yeahrs-text p{ margin:0 0 1em; }
  .yeahrs-text p:last-child{ margin-bottom:0; }
  .yeahrs-link{ align-self:flex-start; font-family:var(--font-display); font-weight:200; font-size:17px; color:var(--text); text-decoration:none; transition:opacity .2s ease; }
  .yeahrs-link:hover{ opacity:.6; }

  /* ---- About ---- */
  .nos-about-body{ font-family:var(--font-display); font-weight:200; font-size:30px; line-height:1.22; color:var(--text); }
  .nos-about-body p{ margin:0 0 1em; }
  .nos-about-body p:last-child{ margin-bottom:0; }
  .nos-about-more{ max-height:0; overflow:hidden; opacity:0; transition:max-height .55s cubic-bezier(.22,1,.36,1), opacity .4s ease-out .1s; }
  .nos-about.is-open .nos-about-more{ opacity:1; }
  .nos-plus{
    position:absolute; top:-4px; right:0;
    width:32px; height:32px; display:flex; align-items:center; justify-content:center;
    font-size:1.9rem; line-height:1; font-family:var(--font-title); font-weight:200;
    transition:transform .35s ease;
  }
  .nos-about.is-open .nos-plus{ transform:rotate(135deg); }

  /* ---- Services ---- */
  /* Serveis (qué hacemos): mateixes pastilles de color de la home, desplegables */
  /* Dues columnes INDEPENDENTS: cada columna és un flux flex propi, així desplegar
     un servei només empeny els de la seva columna i no afecta la del costat. */
  .nos-serv-list{ display:grid; grid-template-columns:1fr 1fr; gap:var(--gap); align-items:stretch; }
  .nos-serv-col{ display:flex; flex-direction:column; gap:var(--gap); min-width:0; }
  /* foto(s) enganxades a la columna esquerra dels serveis: una sola columna */
  .nos-serv-col .nos-pair--media{ grid-template-columns:1fr; margin-top:var(--gap); }

  /* ---- FAQ (acordió, 2 columnes internes, dins la columna esquerra) ---- */
  .nos-faq{ margin-top:0; flex:1 0 auto; }   /* el row-gap de la graella ja dóna l'aire */
  .nos-faq-h{ margin-bottom:24px; }
  .nos-faq-list{ display:flex; flex-direction:column; }
  .nos-faq-item{ border-top:1px solid rgba(255,255,255,0.14); }
  html[data-theme="light"] .nos-faq-item{ border-top-color:rgba(0,0,0,0.14); }
  .nos-faq-q{ width:100%; display:flex; justify-content:space-between; align-items:center; gap:20px; text-align:left; background:none; border:0; color:var(--text); cursor:pointer; padding:22px 2px; margin:0; font-family:var(--font-title); font-weight:200; font-size:24px; line-height:1.2; }
  .nos-faq-toggle{ flex-shrink:0; font-size:1.3rem; line-height:1; transition:transform .35s ease; }
  .nos-faq-item.is-open .nos-faq-toggle{ transform:rotate(135deg); }
  .nos-faq-a-wrap{ overflow:hidden; max-height:0; transition:max-height .45s cubic-bezier(.22,1,.36,1); }
  .nos-faq-a{ padding:0 2px 24px; font-family:var(--font-display); font-weight:200; font-size:18px; line-height:1.6; color:var(--text-muted); }
  .nos-services .card--service{ position:relative; padding:17px 20px; border-radius:var(--radius-lg); overflow:hidden; }
  .nos-services .service-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; text-align:left; margin:0; padding:0; background:none; border:0; color:inherit; cursor:pointer; }
  /* pastilles idèntiques a les de la home (mateixa mida de tipo, padding i toggle) */
  .nos-services .service-title{ font-family:var(--font-title); font-weight:200; font-size:24px; line-height:1.1; }
  .nos-services .service-toggle{ position:relative; top:auto; right:auto; flex-shrink:0; width:16px; height:16px; 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 */
  .nos-services .service-toggle::before, .nos-services .service-toggle::after{ content:''; position:absolute; left:50%; top:50%; width:100%; height:1.5px; background:currentColor; transform:translate(-50%,-50%); }
  .nos-services .service-toggle::after{ transform:translate(-50%,-50%) rotate(90deg); }
  .nos-services .card--service.is-open .service-toggle{ transform:rotate(135deg); }
  /* mateix lliscament que a la home (GSAP .4s power2.inOut ≈ aquesta corba) */
  .nos-svc-body{ overflow:hidden; max-height:0; transition:max-height .4s cubic-bezier(.45,0,.55,1); }
  .nos-svc-desc{ padding-top:14px; font-family:var(--font-display); font-weight:200; font-size:19px; line-height:25px; }
  /* "Qué incluye": pastilles amb contorn, del color del text del servei */
  .svc-items{ list-style:none; margin:16px 0 4px; padding:0; display:flex; flex-wrap:wrap; gap:6px; }
  .svc-items li{ font-family:var(--font-title); font-weight:200; font-size:19px; line-height:1; padding:9px 15px 8px; border:1px solid currentColor; border-radius:var(--radius-pill); white-space:nowrap; }

  /* ---- Persona: foto + pastilla de bio separades ----
     (selectors compostos .nos-card.nos-img / .nos-card.nos-bio perquè el
     padding guanyi el .nos-card genèric del mòbil) */
  .nos-person{ flex:1 0 auto; display:flex; flex-direction:column; gap:var(--gap); }   /* la bio més curta creix fins a igualar l'altra */
  .nos-card.nos-img{ border-radius:var(--radius-lg); overflow:hidden; padding:0; margin:0; }
  .nos-card.nos-img img{ width:100%; aspect-ratio:1/1; object-fit:cover; display:block; }
  .nos-card.nos-bio{ flex:1 0 auto; border-radius:var(--radius-lg); padding:26px 28px 30px; margin:0; display:flex; flex-direction:column; }
  .nos-bio-name{ font-family:var(--font-title); font-weight:200; font-size:26px; line-height:1.1; }
  .nos-bio-role{ font-family:var(--font-display); font-weight:200; font-size:17px; color:var(--text-muted); margin-top:4px; }
  .nos-bio-text{ font-family:var(--font-display); font-weight:200; font-size:17px; line-height:24px; color:var(--text-muted); margin:16px 0 0; }

  /* ---- Newsletter ---- */
  .nos-news{ background:var(--card); color:var(--text); }
  .nos-news .nos-h{ color:inherit; }
  .nos-news-field{ margin-top:38px; }
  .nos-news-input{
    width:100%; background:transparent; border:none; border-bottom:1px solid currentColor;
    color:inherit; font-family:var(--font-display); font-weight:200; font-size:21px;
    padding:0 0 12px; outline:none;
  }
  .nos-news-input::placeholder{ color:currentColor; opacity:.65; }
  .nos-news-row{ display:flex; justify-content:space-between; align-items:center; margin-top:26px; font-family:var(--font-display); font-weight:200; font-size:18px; }
  .nos-news-check{ display:flex; align-items:center; gap:12px; }
  .nos-news-check input,
  .brief-check input{
    -webkit-appearance:none; appearance:none; margin:0; flex-shrink:0; cursor:pointer;
    width:15px; height:15px; border-radius:50%;
    background:transparent; border:1.5px solid var(--text-muted);
    position:relative; transition:background .15s ease, border-color .15s ease;
  }
  .nos-news-check input:checked,
  .brief-check input:checked{ background:var(--text); border-color:var(--text); }
  .nos-news-check input:focus-visible,
  .brief-check input:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
  .nos-send{ font-family:var(--font-display); font-weight:200; font-size:18px; }
  button.nos-send{ background:none; border:0; padding:0; color:inherit; cursor:pointer; }
  .nos-send:hover{ opacity:.6; }
  .nos-news-msg{ margin:18px 0 0; font-family:var(--font-display); font-weight:200; font-size:16px; line-height:1.4; }
  .nos-news-msg.is-loading{ opacity:.7; }
  .nos-news-msg.is-ok{ color:#1c7a48; }
  html[data-theme="light"] .nos-news-msg.is-ok{ color:#1c7a48; }
  .nos-news-msg.is-err{ color:#e1452f; }

  /* Els estils del formulari brief són a brief.css (compartit home + Nosotros) */

  /* ---- Selected Clients ---- */
  .nos-clients ul{ margin:0; padding:0; }
  .nos-clients li{ list-style:none; font-family:var(--font-display); font-weight:200; font-size:19px; line-height:1.5; color:var(--text-muted); }

  /* ---- Contact ---- */
  .nos-contact{ background:var(--card); color:var(--text); }
  .nos-contact .nos-h{ color:inherit; }
  .nos-contact-block{ font-family:var(--font-display); font-weight:200; font-size:19px; line-height:1.45; color:var(--text-muted); }
  .nos-contact-block a:hover{ color:var(--text); }
  .nos-contact-block + .nos-contact-block{ margin-top:22px; }
  .nos-contact a:hover{ opacity:.65; }

  /* Contacte i Premsa, apilats a la mateixa columna (al costat de Clients) */
  .nos-stack{ display:flex; flex-direction:column; gap:var(--gap); min-width:0; }
  .nos-stack > .nos-card:last-child{ flex:1 0 auto; }
  .nos-press-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:16px; }
  .nos-press-list a{ display:block; font-family:var(--font-display); font-weight:200; font-size:19px; line-height:1.3; color:var(--text); transition:opacity .2s ease; }
  .nos-press-list a:hover{ opacity:.65; }
  .nos-press-t, .nos-press-m{ display:block; }
  .nos-press-m{ font-size:15px; margin-top:2px; opacity:.55; }

  /* ---------- responsive provisional (mòbil pendent de disseny) ---------- */
  @media (max-width:980px){
    /* una sola columna: dissolem les columnes perquè totes les seccions s'ordenin juntes */
    .nos-grid{ grid-template-columns:1fr; }
    .nos-col{ display:contents; }
    .nos-about-body{ font-size:26px; }
    .nos-about{ order:1; }        /* 1r: explicació de l'estudi */
    .nos-services{ order:2; }     /* 2n: serveis */
    .nos-pair--media{ order:3; }  /* 3r: fotos de l'equip */
    .nos-parallel{ order:4; }     /* 4t: YEAHRS */
    .nos-pair--info{ order:5; }   /* 5è: clients + contacte */
    .nos-faq{ order:6; }          /* 6è i últim: FAQs */
  }
  @media (max-width:560px){
    .svc-items li{ font-size:16px; padding:7px 12px 6px; }
    .nos-grid{ padding:24px var(--pad-page) 0; }
    .nos-card{ padding:22px 18px; }
    /* a mòbil el botó "Todo" té un altre padding: cal entrar 25px per alinear amb la seva "T" */
    .nos-card.nos-about{ padding:0 40px 0 25px; }
    .nos-about-body{ font-size:21px; }
    .nos-h{ font-size:24px; margin-bottom:18px; }
    .nos-serv-list{ grid-template-columns:1fr; }   /* serveis en una sola columna */
    /* les fotos viuen dins les columnes de serveis (desktop); a mòbil, totes darrere els serveis */
    .nos-serv-col{ display:contents; }
    .nos-serv-col .nos-person{ order:1; }
    .nos-faq-list{ grid-template-columns:1fr; gap:0; }
    .nos-faq-q{ font-size:20px; }
    .nos-services .card--service{ padding:11px 12px; }
    .nos-services .service-title{ font-size:18px; line-height:1.15; }
    .nos-services .service-toggle{ width:13px; height:13px; }
    /* interlineat de mòbil: tots els textos llargs a ~1.35 (abans n'hi havia a 1.5–1.6) */
    .nos-faq-a, .nos-clients li, .yeahrs-text, .nos-contact-block{ line-height:1.35; }
    .nos-bio-text{ line-height:22px; }
    .nos-pair{ grid-template-columns:1fr; }
    .nos-plus{ top:-2px; right:0; }
  }

/* 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; }
}

/* ---------- Pàgina simple (404, política de privacitat, plantilla de reserva) ----------
   Mateixa escala que AI Tools. */
.page-simple{ padding:76px calc(var(--pad-page) + 20px) 120px; }
.page-simple-title{ font-family:var(--font-title); font-weight:200; color:var(--text); font-size:clamp(40px,6vw,76px); line-height:1.04; margin:0 0 28px; max-width:16ch; text-wrap:balance; }
.page-simple-intro{ font-family:var(--font-display); font-weight:200; font-size:22px; line-height:1.55; color:var(--text-muted); max-width:640px; margin:0; }
.page-simple-actions{ display:flex; flex-wrap:wrap; gap:10px; margin:40px 0 0; }
.page-simple-content{ font-family:var(--font-display); font-weight:200; font-size:19px; line-height:1.6; color:var(--text-muted); max-width:68ch; }
.page-simple-content h2, .page-simple-content h3{ font-family:var(--font-title); font-weight:200; color:var(--text); line-height:1.15; margin:2em 0 .6em; }
.page-simple-content a{ color:var(--text); text-decoration:underline; text-underline-offset:3px; }
.page-simple-list{ list-style:none; padding:0; margin:0; font-family:var(--font-title); font-weight:200; font-size:28px; line-height:1.4; }
@media (max-width:560px){
  .page-simple{ padding:40px 16px 80px; }
  .page-simple-intro{ font-size:19px; }
}

/* 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; }
}

/* Pàgines legals: fitxa del titular i llistes del contingut */
.page-simple-content ul{ padding-left:1.1em; }
.page-simple-content li{ margin:0 0 .5em; }
.page-simple-content strong{ font-weight:200; color:var(--text); }
.page-simple-content ul.legal-datos{ list-style:none; padding:0; }
.legal-datos li{ margin:0 0 .3em; }
.legal-datos span{ color:var(--text); }
.legal-datos span::after{ content:":"; }

/* Términos y Condiciones (page-terminos.php): Aviso legal · Privacidad · Cookies en tres
   columnes que omplen la pantalla entre la capçalera fixa (~260px) i el peu (~110px),
   cadascuna amb el seu scroll: la pàgina no es mou i res passa per sota de la capçalera.
   Per sota de 900px s'apilen i fan scroll amb la pàgina. */
.legal-cols{
  --legal-rule:color-mix(in srgb, var(--text) 14%, transparent);
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  height:calc(100svh - var(--top-h, 260px) - 110px);
  min-height:420px;
  box-sizing:border-box;
  padding:48px var(--pad-page) 0;
}
.legal-col{
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:0 clamp(20px,2.4vw,40px) 96px;
  border-left:1px solid var(--legal-rule);
  scrollbar-width:thin;
  scrollbar-color:var(--legal-rule) transparent;
  /* el text s'esvaeix a la vora de baix en lloc de tallar-se en sec */
  -webkit-mask-image:linear-gradient(to bottom, #000 calc(100% - 48px), transparent);
          mask-image:linear-gradient(to bottom, #000 calc(100% - 48px), transparent);
}
.legal-col:first-of-type{ border-left:0; padding-left:0; }
.legal-col:last-of-type{ padding-right:0; }
.legal-col:focus-visible{ outline:1px solid var(--text-muted); outline-offset:-1px; }
.legal-col-title{
  position:sticky; top:0; z-index:1;
  margin:0; padding:0 0 24px;
  background:var(--bg);
  font-family:var(--font-title); font-weight:200;
  font-size:clamp(30px,2.8vw,44px); line-height:1.05;
  color:var(--text);
}
.legal-col-body{ font-size:16px; line-height:1.6; max-width:none; }
.legal-col-body > :first-child{ margin-top:0; }
.legal-col-body h2{ font-size:22px; margin:1.9em 0 .5em; }
@media (max-width:900px){
  .legal-cols{ display:block; height:auto; min-height:0; padding:48px var(--pad-page) 40px; }
  .legal-col{ overflow:visible; border-left:0; padding:0 0 56px; -webkit-mask-image:none; mask-image:none; }
  .legal-col + .legal-col{ border-top:1px solid var(--legal-rule); padding-top:40px; }
  .legal-col-title{ position:static; }
}
@media (max-width:560px){
  .legal-cols{ padding-top:40px; }
  .legal-col-body{ font-size:17px; }
}

/* 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)); }
  .nos-services .service-title{ padding-right:0; }
}

/* Finestres estretes amb la pàgina a dues columnes: els serveis no hi cabrien de dos en dos */
@media (min-width:981px) and (max-width:1240px){
  .nos-serv-list{ grid-template-columns:1fr; }
  .nos-serv-col{ display:contents; }
  .nos-serv-col .nos-person{ order:1; }
}

/* Finestres entre mòbil i tauleta: els correus de contacte i les etiquetes dels serveis eixamplaven la pàgina */
@media (min-width:561px) and (max-width:700px){
  .nos-grid{ grid-template-columns:minmax(0,1fr); }
  .nos-pair--info{ grid-template-columns:1fr; }
  .nos-services .svc-items li{ white-space:normal; border-radius:14px; }
}

/* 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; }
}
