/* ==========================================================================
   kosmos.coop · web públic beta
   Sistema visual editorial blanc & negre + accent verd cooperatiu
   Mobile-first · compilat pel projecte beta
   ========================================================================== */

:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --muted: #6a6a6a;
  --line: rgba(10, 10, 10, 0.14);
  --line-soft: rgba(10, 10, 10, 0.08);
  --accent: #0a8f5b;          /* verd llegible sobre blanc */
  --accent-ink: #063d28;
  --accent-bright: #8fff85;   /* verd neó de marca sobre negre */
  --accent-teal: #4fdab4;
  --accent-rgb: 10, 143, 91;  /* --accent en RGB per a rgba() */
  --maxw: 1220px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* clip (no 'hidden') per no trencar el position:sticky de la capçalera */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Motiu de reixa fina reutilitzat del site */
.grid-motif {
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* --------------------------------------------------------------------------
   Botons
   -------------------------------------------------------------------------- */
.btn {
  --btn-cut: 11px;            /* mida del tall diagonal */
  --btn-bw: 2px;             /* gruix del contorn */
  --btn-cut-in: calc(var(--btn-cut) - 0.5858 * var(--btn-bw));  /* tall interior compensat: gruix uniforme també a la diagonal */
  --btn-border: var(--ink);  /* color del contorn */
  --btn-fill: var(--ink);    /* color d'emplenat */
  --btn-text: var(--paper);
  /* Cantonades esquinçades: tall a dalt-dreta i a baix-esquerra */
  --btn-clip: polygon(0 0, calc(100% - var(--btn-cut)) 0, 100% var(--btn-cut), 100% 100%, var(--btn-cut) 100%, 0 calc(100% - var(--btn-cut)));
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font); font-weight: 600; font-size: 16px;
  padding: 15px 26px;
  cursor: pointer; color: var(--btn-text); white-space: nowrap;
  background: var(--btn-fill);
  clip-path: var(--btn-clip);
  transition: color .25s, background .25s;
}
/* Contorn esquinçat CONNECTAT i de gruix uniforme (també a la diagonal):
   anella retallada = contorn exterior esquinçat menys el mateix esquinçat compensat cap endins.
   Centre buit (transparent) → funciona també amb botons ghost sobre la nebulosa. */
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--btn-border);
  transition: background .25s;
  clip-path: polygon(
    /* contorn exterior (horari) */
    0 0,
    calc(100% - var(--btn-cut)) 0,
    100% var(--btn-cut),
    100% 100%,
    var(--btn-cut) 100%,
    0 calc(100% - var(--btn-cut)),
    0 0,
    /* contorn interior compensat (antihorari) → forat */
    var(--btn-bw) var(--btn-bw),
    var(--btn-bw) calc(100% - var(--btn-bw) - var(--btn-cut-in)),
    calc(var(--btn-bw) + var(--btn-cut-in)) calc(100% - var(--btn-bw)),
    calc(100% - var(--btn-bw)) calc(100% - var(--btn-bw)),
    calc(100% - var(--btn-bw)) calc(var(--btn-bw) + var(--btn-cut-in)),
    calc(100% - var(--btn-bw) - var(--btn-cut-in)) var(--btn-bw),
    var(--btn-bw) var(--btn-bw)
  );
}
.btn:hover { transform: none; }
.btn--ghost  { --btn-border: var(--ink); --btn-fill: transparent; --btn-text: var(--ink); }
.btn--ghost:hover  { --btn-fill: var(--ink); --btn-text: var(--paper); }
.btn--accent { --btn-border: var(--accent); --btn-fill: var(--accent); --btn-text: #fff; }
.btn--accent:hover { --btn-border: var(--accent-ink); --btn-fill: var(--accent-ink); }
.btn--lg { padding: 18px 34px; font-size: 18px; }
.btn i { font-size: 15px; }

/* On dark backgrounds */
.on-dark .btn { --btn-border: #fff; --btn-fill: #fff; --btn-text: #000; }
.on-dark .btn--ghost { --btn-border: #fff; --btn-fill: transparent; --btn-text: #fff; }
.on-dark .btn--ghost:hover { --btn-fill: #fff; --btn-text: #000; }
.on-dark .btn--accent { --btn-border: var(--accent-bright); --btn-fill: var(--accent-bright); --btn-text: #06231a; }
.on-dark .btn--accent:hover { filter: brightness(1.08); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 26px; width: auto; }
/* Logo v2 (src conté -v2.svg): mida i alineació pròpies */
.brand img[src*="-v2.svg"] { height: 28px; margin-top: -5px; }
.header-nav { display: flex; align-items: center; gap: 28px; padding-top: 5px; }
.header-nav a.navlink {
  font-size: 15px; font-weight: 500; color: var(--muted);
  transition: color .2s; position: relative;
}
.header-nav a.navlink:hover { color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: flex; gap: 2px; font-size: 13px; font-weight: 600; }
.lang-switch a { padding: 4px 7px; color: var(--muted); border-radius: 3px; }
.lang-switch a.active { color: var(--ink); background: var(--line-soft); }

/* Botons rodons del header: pastilla amb border normal, SENSE tall esquinçat */
.header-cta { font-size: 14px; padding: 10px 18px; border-radius: 999px; clip-path: none; border: var(--btn-bw) solid var(--btn-border); }
.header-cta::before { content: none; }
/* Opcions de registre/accés: només dins del menú hamburguesa (mòbil) */
.navlink--mobonly { display: none; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* --------------------------------------------------------------------------
   Seccions genèriques
   -------------------------------------------------------------------------- */
section { position: relative; }
.section { padding: clamp(64px, 10vw, 130px) 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .eyebrow { color: var(--accent-bright); }
.section--dark .lead { color: rgba(255,255,255,.72); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 22px;
}
.eyebrow .num {
  font-variant-numeric: tabular-nums; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 999px; padding: 2px 9px; font-size: 12px;
}
.section--dark .eyebrow .num { color: #fff; border-color: rgba(255,255,255,.3); }

.section-title {
  font-size: clamp(30px, 5.4vw, 62px); letter-spacing: -0.03em;
  max-width: 18ch;
}
.lead {
  font-size: clamp(17px, 2.1vw, 21px); color: #333; line-height: 1.55;
  max-width: 60ch; margin-top: 22px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  background: #000; color: var(--paper);
  padding: clamp(60px, 12vw, 140px) 0 clamp(48px, 8vw, 96px);
  position: relative; overflow: hidden;
}
/* Efecte de colors del landing kosmos.coop: glows orbitals magenta + blau */
.hero::before, .hero::after {
  content: ''; position: absolute; top: -100%; left: -100%;
  width: 300%; height: 300%; z-index: 0; pointer-events: none;
}
/* Glow 1 — verd corporatiu kosmos (#8fff85) + verd profund */
.hero::before {
  background:
    radial-gradient(ellipse 130% 120% at 50% 40%, rgba(143,255,133,0.34) 0%, rgba(95,205,130,0.22) 14%, rgba(55,150,100,0.13) 25%, rgba(28,90,62,0.06) 36%, rgba(12,45,32,0.02) 47%, rgba(0,0,0,0) 58%),
    radial-gradient(ellipse 120% 130% at 50% 40%, rgba(79,218,180,0.26) 0%, rgba(52,155,128,0.15) 16%, rgba(30,100,82,0.09) 28%, rgba(16,55,45,0.05) 40%, rgba(8,26,22,0.02) 52%, rgba(0,0,0,0) 63%);
  opacity: 0;
  animation: fadeInLights 2s ease-out forwards .2s, orbit1 25s linear infinite .2s;
}
/* Glow 2 — tons propers: cian-verd (#68f8cb) + blau-teal (#3db9f3) */
.hero::after {
  background:
    radial-gradient(ellipse 130% 130% at 50% 40%, rgba(104,248,203,0.24) 0%, rgba(70,185,155,0.14) 16%, rgba(42,120,100,0.08) 27%, rgba(20,60,50,0.04) 38%, rgba(8,24,20,0.01) 49%, rgba(0,0,0,0) 60%),
    radial-gradient(ellipse 120% 140% at 50% 40%, rgba(61,185,243,0.22) 0%, rgba(45,140,188,0.13) 18%, rgba(28,92,125,0.07) 30%, rgba(15,50,68,0.03) 42%, rgba(6,22,30,0.01) 54%, rgba(0,0,0,0) 65%);
  opacity: 0;
  animation: fadeInLights 2.2s ease-out forwards .3s, orbit2 30s linear infinite .3s;
}
/* Quadrícula fina del landing (6px) per sobre dels glows */
.hero .grid-motif {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(180,155,155,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,155,155,0.12) 1px, transparent 1px);
  background-size: 6px 6px;
  -webkit-mask-image: radial-gradient(ellipse 110% 90% at 50% 45%, #000 58%, transparent 100%);
          mask-image: radial-gradient(ellipse 110% 90% at 50% 45%, #000 58%, transparent 100%);
}
/* Estrelles fugaces / cometes (canvas) — dins el hero, sota el contingut */
.hero #shooting-stars-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; }

@keyframes fadeInLights { to { opacity: 1; } }
@keyframes orbit1 {
  0%   { transform: rotate(0deg)   translateX(500px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(500px) rotate(-360deg); }
}
@keyframes orbit2 {
  0%   { transform: rotate(180deg) translateX(600px) rotate(-180deg); }
  100% { transform: rotate(540deg) translateX(600px) rotate(-540deg); }
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  padding: 7px 15px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.8);
  margin-bottom: 30px;
}
.hero-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 12px var(--accent-bright); }
.hero h1 {
  font-size: clamp(38px, 7.6vw, 92px); letter-spacing: -0.035em; line-height: 0.98;
  max-width: 15ch;
}
.hero h1 .hl { color: var(--accent-bright); }
.hero-sub {
  font-size: clamp(18px, 2.4vw, 25px); color: rgba(255,255,255,.72);
  max-width: 46ch; margin-top: 28px; line-height: 1.5;
}
.hero-free {
  margin-top: 26px; display: inline-flex; align-items: baseline; gap: 12px;
  font-weight: 700; font-size: clamp(16px,2vw,19px);
}
.hero-free b { color: var(--accent-bright); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* Flux "el que hi pots fer" — constel·lació de nodes interrelacionats */
.flow-wrap { margin-top: clamp(44px,6vw,68px); }
.flow-intro { text-align: center; margin-bottom: 30px; }

/* Mòbil (per defecte): nodes apilats */
.flow-mesh { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.flow-links { display: none; }
.flow-step {
  display: flex; flex-direction: column; align-items: center; gap: 11px; text-align: center;
  background: none; border: 0; padding: 0; font-family: inherit; color: inherit; cursor: pointer;
}
.flow-ic {
  width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #f2f8f4; border: 1.5px solid rgba(var(--accent-rgb),.28); flex: 0 0 auto;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.flow-ic i { color: var(--accent); font-size: 23px; transition: color .2s; }
.flow-step:hover .flow-ic { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb),.10); }
.flow-step.active .flow-ic { background: var(--accent); border-color: var(--accent); }
.flow-step.active .flow-ic i { color: #fff; }
.flow-step.active .flow-lbl { color: var(--accent-ink); }
.flow-lbl { font-size: 14px; font-weight: 600; max-width: 16ch; line-height: 1.3; }
/* Node destinació (Transforma): sempre destacat com a la imatge */
.flow-step.is-goal .flow-ic { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(var(--accent-rgb),.14); }
.flow-step.is-goal .flow-ic i { color: #fff; }
.flow-step.is-goal .flow-lbl { color: var(--accent-ink); font-weight: 700; }

/* Visor de captura del flux (base) */
.flow-viewer { margin-top: 32px; }
.flow-screen {
  max-width: 920px; margin: 0 auto; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.14); background: #fff;
  aspect-ratio: 16 / 9.35; /* per defecte; el JS l'ajusta a la captura real */
}
.flow-screen img {
  display: block; width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity .2s var(--ease);
}
.flow-screen img.fade { opacity: 0; }

/* Escriptori/tauleta: constel·lació absoluta amb malla de línies */
@media (min-width: 721px) {
  .flow-mesh { display: block; margin: 0 auto; }
  .flow-links { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
  .flow-links line { stroke: rgba(var(--accent-rgb),.22); stroke-width: 1; vector-effect: non-scaling-stroke; }
  /* la caixa del botó = només la icona (l'etiqueta es posiciona absoluta a sota),
     així translate(-50%,-50%) centra la .flow-ic exactament a (--x,--y) = on connecten les línies */
  .flow-step { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%,-50%); width: 190px; z-index: 1; display: block; }
  .flow-step .flow-ic { margin: 0 auto; }
  .flow-step .flow-lbl { position: absolute; left: 50%; top: calc(100% + 11px); transform: translateX(-50%); width: 100%; margin: 0; }
}

/* Flux elèctric subtil: petites espurnes que viatgen per les línies de la malla (només escriptori) */
/* espurna dirigida: un punt lluminós que viatja del node anterior cap al que s'il·lumina (només escriptori) */
.flow-beam { display: none; }
@media (min-width: 721px) {
  .flow-beam {
    display: block; position: absolute; left: 0; top: 0;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 4px 1px rgba(var(--accent-rgb), .9), 0 0 11px 3px rgba(var(--accent-rgb), .55);
    transform: translate(-50%, -50%); opacity: 0; z-index: 0; pointer-events: none;
  }
}
@media (prefers-reduced-motion: reduce) { .flow-beam { display: none !important; } }

/* iPad vertical (721–899): apilat però compacte, perquè es vegi la malla + el visor sense scroll */
@media (min-width: 721px) and (max-width: 899px) {
  .flow-mesh { height: 400px; max-width: 560px; }
  .flow-ic { width: 52px; height: 52px; }
  .flow-ic i { font-size: 20px; }
  .flow-lbl { font-size: 13px; max-width: 15ch; }
  .flow-step { width: 168px; }
  .flow-viewer { margin-top: 16px; }
  .flow-screen { max-height: 44vh; }
}

/* iPad apaïsat + escriptori (≥900): malla i visor un al costat de l'altre.
   La malla es fa més estreta per deixar més espai al screenshot. */
@media (min-width: 900px) {
  /* El bloc malla+visor s'eixampla més enllà del contingut (.wrap) per donar
     més píxels al screenshot; centrat respecte al viewport. */
  .flow-stage {
    display: flex; align-items: center; gap: clamp(20px,2.4vw,34px);
    width: min(1360px, 92vw); margin-left: 50%; transform: translateX(-50%);
  }
  .flow-mesh { flex: 0 0 38%; height: 460px; max-width: 400px; margin: 0; }
  .flow-ic { width: 54px; height: 54px; }
  .flow-ic i { font-size: 20px; }
  .flow-lbl { font-size: 13px; max-width: 15ch; }
  .flow-step { width: 152px; }
  .flow-viewer { flex: 1 1 62%; margin-top: 0; min-width: 0; }
  .flow-screen { max-width: none; max-height: 74vh; }
}

/* Mòbil: mantenim la constel·lació de 2 columnes (com desktop) però compacta */
@media (max-width: 720px) {
  .flow-mesh { display: block; position: relative; margin: 0 auto 44px; height: 360px; max-width: 300px; }
  .flow-links { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
  .flow-links line { stroke: rgba(var(--accent-rgb),.22); stroke-width: 1; vector-effect: non-scaling-stroke; }
  .flow-step {
    position: absolute; left: var(--x); top: var(--y); transform: translate(-50%,-50%);
    width: 124px; z-index: 1; display: block;
  }
  .flow-step .flow-ic { margin: 0 auto; width: 46px; height: 46px; }
  .flow-step .flow-ic i { font-size: 18px; }
  .flow-step .flow-lbl {
    position: absolute; left: 50%; top: calc(100% + 7px); transform: translateX(-50%);
    width: 100%; margin: 0; font-size: 11.5px; line-height: 1.2; max-width: none;
  }
  .flow-viewer { margin-top: 8px; }
}

/* --------------------------------------------------------------------------
   Hero roadmap — timeline "missió a l'espai"
   -------------------------------------------------------------------------- */
.hero-roadmap {
  margin-top: 58px; padding-top: 32px; border-top: 1.5px solid rgba(255,255,255,.9);
}
.rm-title {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin-bottom: 30px;
}
.rm-title i { color: rgba(255,255,255,.55); }
.rm-track {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 6px; list-style: none; margin: 0; padding: 0; position: relative;
}
/* trajectòria de fons (línia de punts que uneix les fases) */
.rm-track::before {
  content: ""; position: absolute; left: 5%; right: 5%; top: 27px;
  border-top: 2px dashed rgba(255,255,255,.18); z-index: 0;
}
/* progrés completat: línia sòlida blanca de l'inici fins al punt actual (3a fase) */
.rm-track::after {
  content: ""; position: absolute; left: 5%; right: 50%; top: 27px;
  border-top: 2px solid #fff; z-index: 0;
}
.rm-step {
  position: relative; z-index: 1; flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
}
.rm-node {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #101010; border: 1.5px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.55); font-size: 22px;
  transition: transform .2s var(--ease), border-color .2s, color .2s, box-shadow .3s;
}
.rm-date { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.9); letter-spacing: -0.01em; }
.rm-label { font-size: 12.5px; color: rgba(255,255,255,.5); max-width: 16ch; line-height: 1.35; }

/* fases completades — node ple en blanc */
.rm-step.is-done .rm-node { background: #fff; border-color: #fff; color: #0a0a0a; }
.rm-step.is-done .rm-date { color: #fff; }
.rm-step.is-done .rm-label { color: rgba(255,255,255,.7); }

/* fase actual — destacada en blanc */
.rm-step.is-current .rm-node {
  background: #fff; border-color: #fff; color: #0a0a0a;
  box-shadow: 0 0 0 5px rgba(255,255,255,.14);
  animation: rmPulse 2.6s ease-in-out infinite;
}
.rm-step.is-current .rm-date { color: #fff; }
.rm-step.is-current .rm-label { color: rgba(255,255,255,.75); }
.rm-flag {
  position: absolute; top: -33px; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #0a0a0a; background: #fff; padding: 3px 9px; border-radius: 999px;
}
.rm-flag::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%) rotate(45deg);
  width: 7px; height: 7px; background: #fff;
}

/* destinació — el llançament */
.rm-step.is-goal .rm-node {
  background: #101010; border-color: rgba(255,255,255,.6); color: #fff;
}
.rm-step.is-goal .rm-node i { animation: rmHover 3s ease-in-out infinite; }
.rm-step.is-goal .rm-date { color: #fff; }

@keyframes rmPulse {
  0%,100% { box-shadow: 0 0 0 5px rgba(255,255,255,.14); }
  50%     { box-shadow: 0 0 0 9px rgba(255,255,255,.05); }
}
@keyframes rmHover {
  0%,100% { transform: translateY(0) rotate(-45deg); }
  50%     { transform: translateY(-3px) rotate(-45deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rm-step.is-current .rm-node, .rm-step.is-goal .rm-node i { animation: none; }
}

/* mòbil: la missió passa a vertical */
@media (max-width: 720px) {
  .rm-track { flex-direction: column; align-items: flex-start; gap: 22px; }
  .rm-track::before {
    left: 27px; right: auto; top: 8%; bottom: 8%;
    border-top: 0; border-left: 2px dashed rgba(255,255,255,.22);
  }
  .rm-track::after {
    left: 27px; right: auto; top: 8%; bottom: 50%;
    border-top: 0; border-left: 2px solid #fff;
  }
  .rm-step { flex-direction: row; align-items: center; text-align: left; gap: 16px; width: 100%; }
  .rm-node { width: 52px; height: 52px; flex: 0 0 auto; }
  .rm-label { max-width: none; }
  .rm-flag { position: static; margin-left: 8px; }
  .rm-flag::after { display: none; }
  /* pas actual: node · data · label en línia (nodes alineats); el flag "SOM AQUÍ" va a sobre de la data */
  .rm-step.is-current { flex-wrap: nowrap; }
  .rm-step.is-current .rm-node  { order: 1; }
  .rm-step.is-current .rm-date  { order: 2; }
  .rm-step.is-current .rm-label { order: 3; }
  .rm-step.is-current .rm-flag  { position: absolute; top: -14px; left: 66px; margin: 0; }
}

/* --------------------------------------------------------------------------
   Manifest
   -------------------------------------------------------------------------- */
.manifest .big {
  font-size: clamp(24px, 4vw, 44px); font-weight: 500; letter-spacing: -0.025em;
  line-height: 1.22; max-width: 24ch;
}
.manifest .big em { font-style: normal; color: var(--accent); }
.manifest-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin-top: 56px; background: var(--line); border: 1px solid var(--line);
}
.manifest-grid .cell { background: var(--paper); padding: 30px; }
.manifest-grid .cell h4 { font-size: 18px; margin-bottom: 8px; }
.manifest-grid .cell p { font-size: 15px; color: var(--muted); }
.manifest-grid .cell .ic { color: var(--accent); font-size: 22px; margin-bottom: 16px; }

/* --------------------------------------------------------------------------
   Economia regenerativa (bullets simples)
   -------------------------------------------------------------------------- */
.regen-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px;
}
.regen-card {
  border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 30px;
  background: rgba(255,255,255,.02); transition: border-color .3s, transform .3s var(--ease);
}
.regen-card:hover { border-color: var(--accent-bright); transform: translateY(-4px); }
.regen-card .k {
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-bright); margin-bottom: 18px;
}
.regen-card h3 { font-size: 22px; margin-bottom: 18px; }
.regen-card li {
  position: relative; padding-left: 26px; margin-bottom: 12px;
  font-size: 15.5px; color: rgba(255,255,255,.82); line-height: 1.45;
}
.regen-card li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-bright);
}
.regen-punch {
  margin-top: 50px; font-size: clamp(20px, 3vw, 34px); font-weight: 600;
  letter-spacing: -0.02em; max-width: 30ch; line-height: 1.2;
}
.regen-punch b { color: var(--accent-bright); }

/* --------------------------------------------------------------------------
   Gratuït ara i sempre
   -------------------------------------------------------------------------- */
.free-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.free-plans { display: grid; gap: 18px; }
.plan {
  border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px; background: #fff;
  position: relative;
}
.plan--free { border-color: var(--ink); border-width: 2px; }
.plan-badge {
  position: absolute; top: -11px; left: 24px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
}
.plan h4 { font-size: 22px; display: flex; align-items: baseline; gap: 10px; }
.plan .price { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: auto; }
.plan .price b { color: var(--ink); font-size: 20px; }
.plan ul { margin-top: 16px; display: grid; gap: 9px; }
.plan li { position: relative; padding-left: 26px; font-size: 15px; color: #333; }
.plan li::before {
  content: '\2713'; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700;
}
.plan--premium li::before { content: '\2726'; color: var(--muted); }

/* --------------------------------------------------------------------------
   Funcionalitats
   -------------------------------------------------------------------------- */
/* Fons de patró de missatgeria (com #msg-main de l'app de xat) a la secció Funcionalitats */
.funcs { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.funcs::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(130deg, #8b5cf6 0%, #6366f1 17%, #3b82f6 34%, #22d3ee 50%, #e879f9 67%, #fb7185 83%, #ef4444 100%);
  opacity: 0.14;
  -webkit-mask: url(/launching/img/msg-pattern.svg) repeat;
          mask: url(/launching/img/msg-pattern.svg) repeat;
  -webkit-mask-size: 440px 440px;
          mask-size: 440px 440px;
}
.funcs > .wrap { position: relative; z-index: 1; }

.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin-top: 56px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.feature {
  --pc: var(--accent);   /* mosaic: cada targeta agafa un color de la paleta */
  background: var(--paper); padding: 34px 30px; transition: background .3s;
  position: relative;
}
.feature:nth-child(3n+2) { --pc: var(--accent-teal); }
.feature:nth-child(3n+3) { --pc: var(--accent-ink); }
.feature:hover { background: color-mix(in srgb, var(--pc) 6%, var(--paper)); }
.feature .ic {
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  border: 1px solid color-mix(in srgb, var(--pc) 30%, var(--line)); border-radius: 10px; margin-bottom: 20px;
  background: color-mix(in srgb, var(--pc) 10%, transparent);
  transition: background .3s, border-color .3s;
}
.feature:hover .ic { background: color-mix(in srgb, var(--pc) 18%, transparent); border-color: color-mix(in srgb, var(--pc) 45%, var(--line)); }
.feature .ic i { font-size: 20px; color: var(--pc); }
.feature .ic img, .feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.feature .tagpill {
  display: inline-block; margin-top: 14px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: var(--pc);
  background: color-mix(in srgb, var(--pc) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--pc) 28%, transparent); border-radius: 999px; padding: 3px 10px;
}
.features-more { margin-top: 40px; }

/* --------------------------------------------------------------------------
   Qui hi ha (valors)
   -------------------------------------------------------------------------- */
.values-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,6vw,72px); align-items: start; }
.values-note {
  border-left: 3px solid var(--accent); padding: 6px 0 6px 22px; margin-top: 26px;
  font-size: 17px; color: #222; font-weight: 500;
}
.criteria { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.criteria .chip {
  font-size: 13.5px; font-weight: 500; color: #222;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; background: #fff;
  transition: border-color .2s, color .2s;
}
.criteria .chip:hover { border-color: var(--accent); color: var(--accent); }
.who-types { display: grid; gap: 14px; margin-top: 8px; }
.who-type {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.who-type .n { font-size: 22px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.who-type h4 { font-size: 16px; }
.who-type p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Mapa (sense registre)
   -------------------------------------------------------------------------- */
.map-band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,6vw,64px); align-items: center; }
.map-preview {
  position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.14);
  aspect-ratio: 4 / 3; background: #111;
}
.map-preview picture { display: block; width: 100%; height: auto; }
.map-preview .map-frame { width: 100%; height: 100%; border: 0; display: block; object-fit: cover; object-position: top center; }
.map-preview .map-overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 22px; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55));
}
.map-preview .map-cta-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  background: #fff; color: #000; padding: 10px 16px; border-radius: 999px;
}
.map-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; }
.map-legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255,255,255,.75); }
.map-legend .d { width: 12px; height: 12px; border-radius: 50%; }

/* --------------------------------------------------------------------------
   Per què hi has de ser
   -------------------------------------------------------------------------- */
#per-que { padding-bottom: clamp(96px, 13vw, 180px); }
#per-que .wrap { padding-left: 0; padding-right: 0; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 50px; background: var(--line); border: 1px solid var(--line); }
.why { background: var(--paper); padding: 34px 32px; }
.why-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.why-illustration { width: 62px; height: 62px; flex: 0 0 auto; }
.why-illustration svg { width: 100%; height: 100%; display: block; color: var(--accent); transition: transform .4s var(--ease); }
.why:hover .why-illustration svg { transform: translateY(-3px); }
.why .n { font-size: 14px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.why h3 { font-size: 22px; margin: 10px 0 10px; }
.why p { font-size: 15px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Registre (CTA + formulari)
   -------------------------------------------------------------------------- */
.register { background: var(--ink); color: #fff; }
.register-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px,6vw,72px); align-items: start; }
.register h2 { font-size: clamp(30px,5vw,56px); letter-spacing: -0.03em; line-height: 1.12; min-height: 2.24em; }
.register .lead { color: rgba(255,255,255,.72); }
.register-points { margin-top: 30px; display: grid; gap: 14px; }
.register-points li { position: relative; padding-left: 28px; color: rgba(255,255,255,.85); font-size: 15.5px; }
.register-points li::before { content: '\2713'; position: absolute; left: 0; color: var(--accent-bright); font-weight: 700; }

.reg-form {
  background: #fff; color: var(--ink); border-radius: 14px; padding: clamp(24px, 4vw, 38px);
}
.reg-form h3 { font-size: 22px; margin-bottom: 6px; }
.reg-form .sub { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.field { margin-bottom: 18px; position: relative; }

/* Selector de tipus de registre (organització / autònom) */
.reg-type { display: flex; gap: 10px; flex-wrap: wrap; }
.rt-opt {
  flex: 1 1 0; min-width: 150px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  font-size: 14.5px; font-weight: 500; color: var(--ink); user-select: none;
  transition: border-color .2s, background .2s, color .2s;
}
.rt-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.rt-opt i { opacity: .55; }
.rt-opt:hover { border-color: var(--accent); }
.rt-opt.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent-ink); font-weight: 600; }
.rt-opt.is-on i { opacity: 1; color: var(--accent); }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.field input {
  width: 100%; padding: 14px 15px; font-family: var(--font); font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  transition: border-color .2s;
}
.field select, .field textarea {
  width: 100%; padding: 14px 15px; font-family: var(--font); font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14); }
.field input.err, .field select.err, .field textarea.err { border-color: #d33; }
.req { color: var(--accent); font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row .field { margin-bottom: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; gap: 0; } }
/* Honeypot anti-bots: sempre invisible i fora de flux (no dins .field) */
.hp {
  position: absolute !important; left: -9999px !important; top: -9999px !important;
  width: 1px !important; height: 1px !important; opacity: 0 !important;
  pointer-events: none !important;
}

/* Autocomplete */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.14); max-height: 300px; overflow-y: auto; display: none;
}
.ac-list.open { display: block; }
.ac-item { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.active { background: #f4f8f5; }
.ac-item .nm { font-size: 15px; font-weight: 600; }
.ac-item .mt { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; margin-top: 2px; }
.ac-item .badge-active { color: var(--accent); font-weight: 600; }
.ac-empty { padding: 14px 15px; font-size: 14px; color: var(--muted); }
.ac-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.selected-org {
  display: none; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 4px;
  background: #f4f8f5; border: 1px solid rgba(var(--accent-rgb),.3); border-radius: 8px;
}
.selected-org.show { display: flex; }
.selected-org .so-nm { font-weight: 600; font-size: 15px; }
.selected-org .so-x { margin-left: auto; cursor: pointer; color: var(--muted); border: 0; background: none; font-size: 18px; }

.reg-submit { width: 100%; justify-content: center; margin-top: 6px; }
.reg-msg { margin-top: 16px; padding: 14px 16px; border-radius: 8px; font-size: 14.5px; display: none; }
.reg-msg.ok { display: block; background: #eefaf3; border: 1px solid rgba(var(--accent-rgb),.35); color: var(--accent-ink); }
.reg-msg.ko { display: block; background: #fdeeee; border: 1px solid rgba(200,40,40,.35); color: #a11; }
.reg-success { display: none; text-align: center; padding: 10px 0; }
.reg-success.show { display: block; }
.reg-success .check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 20px;
}
.reg-success h3 { font-size: 24px; margin-bottom: 10px; }
.reg-success p { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.consent { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.consent a { color: var(--accent); text-decoration: underline; }

/* Casella d'acceptació de termes */
.consent-check {
  display: flex; align-items: flex-start; gap: 11px; margin: 4px 0 18px;
  font-size: 13px; line-height: 1.5; color: #444; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px;
  transition: border-color .2s, background .2s;
}
.consent-check:hover { border-color: var(--accent); }
.consent-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: 0 0 auto; cursor: pointer; }
.consent-check a { color: var(--accent); text-decoration: underline; font-weight: 600; }
.consent-check.err { border-color: #d33; background: #fdeeee; }

/* --------------------------------------------------------------------------
   Barra de suport (sota el header) + pàgina de mecenatge
   -------------------------------------------------------------------------- */
.support-bar {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 8px 18px; padding: 11px var(--pad); background: #0a0a0a; color: #fff;
  font-size: 14px; text-align: center; transition: background .25s;
}
.support-bar:hover { background: #161616; }
.support-bar-txt { color: rgba(255,255,255,.9); }
.support-bar-txt i { color: var(--accent-bright); margin-right: 6px; }
.support-bar-cta {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 700;
  color: #06231a; background: var(--accent-bright); border-radius: 999px; padding: 5px 14px; font-size: 13px;
}
@media (max-width: 640px) { .support-bar { font-size: 13px; padding: 10px 16px; } }

.suport-wrap { padding-top: clamp(30px,5vw,54px); }
.suport-block { margin-top: 22px; }
.suport-block h3 { font-size: 18px; margin-bottom: 6px; }
.suport-block p { font-size: 15px; color: var(--muted); line-height: 1.6; }
.suport-note {
  display: flex; gap: 12px; margin-top: 26px; padding: 16px 18px;
  background: #f5f5f5; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px;
}
.suport-note i { color: var(--accent); margin-top: 3px; }
.suport-note div { font-size: 13.5px; color: #333; line-height: 1.55; }

/* Segments (tipus d'aportació) */
.seg { display: flex; gap: 8px; }
.seg-btn {
  flex: 1; padding: 12px; font-family: var(--font); font-size: 15px; font-weight: 600;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.seg-btn.active { border-color: var(--accent); color: var(--accent-ink); background: #f4f8f5; }

/* Imports */
.amt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amt-btn {
  padding: 13px 8px; font-family: var(--font); font-size: 15px; font-weight: 700;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.amt-btn.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.amt-custom {
  width: 100%; margin-top: 8px; padding: 12px 14px; font-family: var(--font); font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 8px;
}
.amt-custom:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14); }

/* Pàgina legal (termes.php) */
.legal-wrap { max-width: 820px; margin: 0 auto; padding: clamp(40px,7vw,80px) var(--pad) 80px; }
.legal-eyebrow { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 16px; }
.legal-h1 { font-size: clamp(28px, 4.6vw, 46px); letter-spacing: -0.03em; }
.legal-intro { font-size: 17px; color: #333; margin-top: 22px; line-height: 1.6; }
.legal h2 { font-size: 20px; margin: 38px 0 10px; letter-spacing: -0.01em; }
.legal p { font-size: 15.5px; color: #333; line-height: 1.7; margin-bottom: 10px; }
.legal ul { margin: 8px 0 10px; display: grid; gap: 8px; }
.legal li { position: relative; padding-left: 22px; font-size: 15.5px; color: #333; line-height: 1.6; }
.legal li::before { content: ''; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.legal a { color: var(--accent); text-decoration: underline; }
.legal-foot { margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Targeta "un projecte de" (Sobre nosaltres) */
.og-card { max-width: 820px; margin: 48px auto 0; padding: 40px 30px; border: 1px solid var(--line); border-radius: 14px; text-align: center; background: #fafafa; }
.og-label { display: block; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.og-logo { height: 58px; width: auto; margin: 0 auto 26px; display: block; }
.og-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid transparent; transition: border-color .2s; }
.og-link:hover { border-bottom-color: var(--accent); }
.og-link i { font-size: .85em; }

/* Pàgina de verificació (verify.php) */
.verify-wrap { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 40px var(--pad); }
.verify-card { max-width: 520px; text-align: center; }
.verify-icon { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 26px; }
.verify-icon.ok, .verify-icon.already { background: var(--accent); color: #fff; }
.verify-icon.invalid { background: #fdeeee; color: #d33; border: 1px solid rgba(200,40,40,.35); }
.verify-card h1 { font-size: clamp(26px, 4.4vw, 40px); letter-spacing: -0.03em; }
.verify-card p { font-size: 16.5px; color: #444; line-height: 1.6; margin: 18px 0 30px; }

/* Pàgina Explora (mapa integrat + maximitzar) */
.explora-wrap { max-width: none; margin: 0; padding: clamp(28px,5vw,54px) 0 40px; }
.explora-head { margin-bottom: 26px; }
.explora-head .map-legend span { color: #333; }
/* Mapa a tot l'ample de la pantalla */
.explora-wrap .map-embed { border-left: 0; border-right: 0; border-radius: 0; }
.map-embed {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: #0f0f0f; height: 78vh; min-height: 480px;
}
.map-toolbar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 14px; background: #fff; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.map-toolbar .mt-title { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 9px; }
.map-toolbar .mt-title i { color: var(--accent); }
.map-maximize {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--ink); color: #fff; border: 0; border-radius: 999px;
  padding: 9px 16px; font-family: var(--font); font-size: 13.5px; font-weight: 600;
  transition: transform .2s var(--ease);
}
.map-maximize:hover { transform: none; }
.map-embed-body { position: relative; flex: 1 1 auto; min-height: 0; }
.map-embed-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #0f0f0f; color: rgba(255,255,255,.7); font-size: 15px; z-index: 2;
}
.map-loading .spin {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--accent-bright);
  border-radius: 50%; animation: mapspin .8s linear infinite;
}
@keyframes mapspin { to { transform: rotate(360deg); } }

/* Maximitzat: fullscreen natiu o fallback CSS */
.map-embed:fullscreen, .map-embed:-webkit-full-screen { height: 100vh; width: 100vw; border-radius: 0; border: 0; }
.map-embed.css-max {
  position: fixed; inset: 0; z-index: 9999; height: 100vh; width: 100vw;
  border-radius: 0; border: 0;
}

@media (max-width: 560px) {
  .map-embed { height: 72vh; min-height: 420px; }
  .map-toolbar .mt-title span { display: none; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: #000; color: #fff; padding: clamp(50px,7vw,80px) 0 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 30px; margin-bottom: 18px; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: 14.5px; max-width: 34ch; }
.footer-col h5 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255,255,255,.82); font-size: 15px; margin-bottom: 11px; transition: color .2s; }
.footer-col a:hover { color: var(--accent-bright); }
.footer-sponsors-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px;
  margin-top: 50px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.14);
}
.footer-sponsors-row .lbl { font-size: 12.5px; color: rgba(255,255,255,.5); }
.footer-sponsors-row a { display: inline-flex; align-items: center; }
.footer-sponsors-row .spon-logo { width: auto; opacity: .55; transition: opacity .2s; }
.footer-sponsors-row a:hover .spon-logo { opacity: .85; }
.footer-sponsors-row .spon-bcn { height: 44px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 30px; font-size: 13px; color: rgba(255,255,255,.5);
}
.footer-bottom .foot-copy { display: inline-flex; align-items: center; gap: 9px; }
.footer-bottom .foot-og { display: inline-flex; align-items: center; opacity: .8; transition: opacity .2s; }
.footer-bottom .foot-og:hover { opacity: 1; }
.footer-bottom .foot-og img { height: 28px; width: auto; display: block; margin-top: -15px; }
.footer-bottom a { color: rgba(255,255,255,.6); }

/* Desplegable d'idioma al footer */
.lang-dd { position: relative; display: inline-block; }
.lang-dd summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #fff;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 14px;
}
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary i { color: var(--accent-bright); }
.lang-dd[open] summary { border-color: var(--accent-bright); }
.lang-dd-menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20; min-width: 150px;
  background: #111; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.lang-dd-menu a { display: block; padding: 11px 15px; font-size: 14px; color: rgba(255,255,255,.85); }
.lang-dd-menu a:hover { background: rgba(255,255,255,.06); color: var(--accent-bright); }
.lang-dd-menu a.active { color: var(--accent-bright); font-weight: 600; }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,.62); opacity: 0; transition: opacity .3s;
}
.modal.show { display: flex; }
.modal.fade { opacity: 1; }
.modal-card {
  background: #fff; border-radius: 16px; width: 100%; max-width: 480px;
  max-height: 92vh; overflow-y: auto; padding: clamp(24px, 4vw, 36px);
  transform: translateY(14px) scale(.98); transition: transform .3s var(--ease);
}
.modal.fade .modal-card { transform: none; }
.modal-close {
  position: absolute; top: 18px; right: 20px; background: none; border: 0; cursor: pointer;
  font-size: 30px; line-height: 1; color: #fff;
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .manifest-grid { grid-template-columns: repeat(3, 1fr); }
  .regen-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 880px) {
  .header-nav { display: none; }
  .burger { display: block; }
  /* Els botons de registre i accés passen a dins del menú hamburguesa */
  .header-cta { display: none; }
  .navlink--mobonly { display: flex; align-items: center; }
  .navlink--mobonly i { margin-left: auto; }
  .site-header.nav-open .header-nav {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0;
  }
  .site-header.nav-open .header-nav a.navlink { padding: 14px var(--pad); width: 100%; }
  .free-band, .values-wrap, .map-band, .register-inner { grid-template-columns: 1fr; }
  .regen-cards { grid-template-columns: 1fr; }
  .manifest-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .map-preview { aspect-ratio: 16 / 10; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
  @keyframes orbit1 {
    0%   { transform: rotate(0deg)   translateX(210px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(210px) rotate(-360deg); }
  }
  @keyframes orbit2 {
    0%   { transform: rotate(180deg) translateX(250px) rotate(-180deg); }
    100% { transform: rotate(540deg) translateX(250px) rotate(-540deg); }
  }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  @keyframes orbit1 {
    0%   { transform: rotate(0deg)   translateX(150px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
  }
  @keyframes orbit2 {
    0%   { transform: rotate(180deg) translateX(180px) rotate(-180deg); }
    100% { transform: rotate(540deg) translateX(180px) rotate(-540deg); }
  }
  .header-cta span.cta-long { display: none; }
  .header-access { display: none; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .criteria .chip { font-size: 12.5px; padding: 6px 12px; }
  /* CTA "Descobreix l'economia regenerativa": més petit i que pugui plegar-se en comptes de sobresortir */
  .btn--lg { padding: 12px 18px; font-size: 14px; white-space: normal; max-width: 100%; }
}

/* Cursor del typewriter del títol de registre (bloc 08) */
.typewriter-cursor {
  display: inline-block; margin-left: 3px; font-weight: 300;
  color: var(--accent-bright); animation: tw-blink 0.8s infinite;
}
@keyframes tw-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .typewriter-cursor { display: none; }
}

/* ============================================================
   PALETES 2..5 — TOTES comparteixen el mateix FONS del hero (nebulosa
   magenta+blau exacta del landing original kosmos.coop, veure a sota).
   Cada paleta només canvia els ACCENTS, triats per lluir sobre el nebulós:
     2 Or · 3 Aqua · 4 Coral · 5 Lima
   Per defecte (data-palette="1") s'aplica el verd corporatiu de :root.
   ============================================================ */
/* PALETA 2 — OR: destacat groc estel·lar (càlid, complementari del fons fred) */
html[data-palette="2"] {
  --accent:        #6e48a4;   /* violeta-porpra llegible sobre blanc (~6.7:1) */
  --accent-ink:    #3d2fb5;   /* indi mitjà (text/hover) */
  --accent-bright: #ffdc52;   /* groc estel·lar (destacats sobre fosc) */
  --accent-teal:   #4d9bff;   /* blau secundari */
  --accent-rgb:    108, 92, 231;
}
/* Fons del hero — MAGENTA + BLAU exactes del landing original kosmos.coop.
   Compartit per TOTES les paletes de color (2..5): el fons és sempre el mateix,
   les paletes només canvien els accents (--accent / --accent-bright). */
html:not([data-palette="1"]) .hero::before {
  background:
    radial-gradient(ellipse 130% 120% at 50% 40%, rgba(180,50,140,0.62) 0%, rgba(135,38,105,0.38) 14%, rgba(90,25,70,0.18) 25%, rgba(45,13,35,0.07) 36%, rgba(22,6,18,0.02) 47%, rgba(0,0,0,0) 58%),
    radial-gradient(ellipse 120% 130% at 50% 40%, rgba(160,40,150,0.47) 0%, rgba(120,30,112,0.24) 16%, rgba(80,20,75,0.12) 28%, rgba(40,10,38,0.06) 40%, rgba(20,5,19,0.02) 52%, rgba(0,0,0,0) 63%);
}
html:not([data-palette="1"]) .hero::after {
  background:
    radial-gradient(ellipse 130% 130% at 50% 40%, rgba(30,110,200,0.40) 0%, rgba(22,82,150,0.22) 16%, rgba(15,55,100,0.12) 27%, rgba(8,28,50,0.04) 38%, rgba(4,14,25,0.01) 49%, rgba(0,0,0,0) 60%),
    radial-gradient(ellipse 120% 140% at 50% 40%, rgba(50,140,220,0.28) 0%, rgba(38,105,165,0.16) 18%, rgba(25,70,110,0.08) 30%, rgba(13,35,55,0.04) 42%, rgba(6,18,28,0.01) 54%, rgba(0,0,0,0) 65%);
}

/* PALETA 3 — NEGRE + OR: accent negre, contrapunt blanc (--accent-ink), destacat or */
html[data-palette="3"] {
  --accent:        #000;      /* negre (enllaços/botons sobre blanc) */
  --accent-ink:    #fff;      /* blanc (hover/contrapunt) */
  --accent-bright: #ffdc52;   /* groc estel·lar (destacats sobre fosc) */
  --accent-teal:   #e57aa0;   /* secundari (heretat) */
  --accent-rgb:    178, 62, 116;
}
html[data-palette="3"] .hero h1 .hl {
  line-height: 100%;
}

/* PALETA 4 — VERMELL: accent vermell, destacats vermell clar, botó CTA blanc */
html[data-palette="4"] {
  --accent:        #e04a4a;   /* vermell (enllaços/botons sobre blanc) */
  --accent-ink:    #7e2650;   /* gerd profund (text/hover) */
  --accent-bright: #ff7979;   /* vermell-salmó clar (destacats sobre fosc) */
  --accent-teal:   #e57aa0;   /* rosa-gerd clar secundari */
  --accent-rgb:    178, 62, 116;
}
html[data-palette="4"] .hero h1 .hl {
  line-height: 100%;
}
/* Botó CTA sobre fosc: blanc (en comptes del --accent-bright) */
html[data-palette="4"] .on-dark .btn--accent {
  --btn-border: #fff;
  --btn-fill: #fff;
}

/* PALETA 5 — LIMA: destacat verd-llima elèctric (pop sobre magenta i blau) */
html[data-palette="5"] {
  --accent:        #7a3fd0;   /* violeta llegible sobre blanc */
  --accent-ink:    #47207e;   /* violeta profund (text/hover) */
  --accent-bright: #c6f24d;   /* verd-llima elèctric (destacats sobre fosc) */
  --accent-teal:   #b98fe0;   /* malva clar secundari */
  --accent-rgb:    122, 63, 208;
}

/* --------------------------------------------------------------------------
   Hero — en desktop sempre visible complet (s'ajusta a l'alçada del viewport)
   El header sticky ocupa 68px; el hero omple la resta i centra el contingut.
   Les mides escalen també per alçada (min(px, vh)) perquè en pantalles baixes
   el hero es redueixi i mai quedi tallat.
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .hero {
    min-height: calc(100vh - 68px);
    min-height: calc(100svh - 68px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: clamp(28px, 6vh, 140px);
    padding-bottom: clamp(24px, 5vh, 96px);
    box-sizing: border-box;
  }
  .hero-inner { width: 100%; }

  .hero-tag     { margin-bottom: min(30px, 3.2vh); }
  .hero h1      { font-size: min(clamp(38px, 7.6vw, 92px), 10.5vh); }
  .hero-sub     { margin-top: min(28px, 3vh); font-size: min(clamp(18px, 2.4vw, 25px), 2.9vh); }
  .hero-free    { margin-top: min(26px, 2.8vh); }
  .hero-actions { margin-top: min(40px, 4.2vh); }
  .hero-metrics { margin-top: min(60px, 6vh); padding-top: min(34px, 3.4vh); }
  .metric .n    { font-size: min(clamp(28px, 4vw, 42px), 5vh); }
}

/* Graella "why" de 3 columnes (p.ex. els 3 anells del model de governança) */
.why-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .why-grid--3 { grid-template-columns: 1fr; } }
