/* =========================================================
   /marca/ — la identidad de ProWideWeb
   ---------------------------------------------------------
   Un manual de marca en una página: portada, idea, sistema de logo, la
   marca, color, tipografía, el clic y movimiento. Usa las fuentes, la
   paleta y la animación del logo de styles.css (las clases .intro-* e
   .ip-* son las de la entrada de la web).
   ========================================================= */
.m-pagina { background: var(--paper); }
.m-etiqueta, .m-num { font-stretch: 75%; font-weight: 700; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- Cabecera ---------- */
.m-cap {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: clamp(1.2rem, 3vh, 2rem) var(--pad);
  color: rgba(243, 241, 234, .78);
}
.m-cap-tornar { color: var(--paper); font-weight: 600; font-size: .9rem; border-bottom: 1px solid rgba(243, 241, 234, .4); padding-bottom: 2px; transition: color .25s, border-color .25s; }
.m-cap-tornar:hover { color: var(--groc); border-color: var(--groc); }

/* ---------- Portada: el blau con cuadrícula y el logo que se monta ---------- */
.m-hero {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto;
  padding: 6rem var(--pad) clamp(2rem, 6vh, 4rem);
  background-color: var(--blau); color: var(--paper);
  background-image: linear-gradient(rgba(243, 241, 234, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(243, 241, 234, .08) 1px, transparent 1px);
  background-size: 72px 72px; background-position: center;
}
/* Dos cursores sueltos, como las chispas de un manual de marca. */
.m-hero::before, .m-hero::after {
  content: ""; position: absolute; width: 34px; height: 46px;
  background: url("/assets/img/marca/pww-clic.svg") no-repeat center / contain;
}
.m-hero::before { right: 14%; top: 20%; }
.m-hero::after { left: 9%; top: 46%; width: 22px; height: 30px; opacity: .8; }
.m-hero-logo { display: grid; place-items: center; }
.m-hero .intro-logo { font-size: clamp(2.2rem, 7vw, 6.5rem); }
.m-hero .ip-cinta { stroke: var(--paper); }
.m-hero .ip-mascara { stroke: #fff; }
.m-hero .ip-marques { stroke: var(--blau); }
.m-hero-peu { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; }
.m-hero-titol { font-size: clamp(2.4rem, 6.2vw, 6rem); font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.m-hero-titol span { display: block; }
.m-hero-titol span + span { color: var(--groc); }
.m-hero-nota { max-width: 22rem; font-size: .9rem; color: rgba(243, 241, 234, .82); }

/* ---------- Secciones ---------- */
.m-seccio { padding: clamp(4rem, 12vh, 8rem) var(--pad); }
.m-paper { background: var(--paper); }
.m-blanc { background: #fff; }
.m-num { color: var(--tinta-m); margin-bottom: clamp(1.5rem, 4vh, 2.5rem); }
.m-seccio h2, .m-marca h2, .m-tipo h2 { font-size: clamp(2.2rem, 5.4vw, 5.2rem); font-weight: 800; letter-spacing: -.045em; line-height: .98; }
.m-text { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); line-height: 1.6; color: #55535E; max-width: 34rem; }
.m-dues { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem 4rem; align-items: end; margin-bottom: clamp(2rem, 6vh, 3.5rem); }

/* 01 · Idea */
.m-idea { display: grid; grid-template-columns: 1fr 2.4fr; }
.m-idea-cos { grid-column: 2; }
.m-pastilla {
  display: inline-block; margin-bottom: 1.4rem; padding: .5rem 1.05rem; border-radius: 99px;
  background: var(--groc); color: var(--tinta-m);
  font-stretch: 75%; font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(-3deg);
}
.m-idea h2 { font-size: clamp(2.6rem, 6.4vw, 6.4rem); }
.m-acc { color: var(--blau); }
.m-idea .m-text { margin-top: 2.2rem; }
/* la cinta de "a mida" se desenrolla cuando la sección entra */
.m-anima .m-idea-cos:not(.vist) .cinta-mida::after { transform: scaleX(0); }
.m-anima .m-idea-cos:not(.vist) .cinta-mida::before { transform: scale(0); }

/* 02 · Sistema de logo */
.m-gran {
  position: relative; display: grid; place-items: center; overflow: hidden;
  margin: 0 0 1rem; min-height: clamp(260px, 40vw, 520px); border-radius: 10px;
  background-color: var(--blau);
  background-image: linear-gradient(rgba(243, 241, 234, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(243, 241, 234, .08) 1px, transparent 1px);
  background-size: 72px 72px; background-position: center;
}
.m-gran img { width: min(62%, 640px); height: auto; }
.m-gran figcaption { position: absolute; left: 1.4rem; bottom: 1.2rem; color: rgba(243, 241, 234, .75); font-stretch: 75%; font-weight: 700; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }
.m-versions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.m-versio { display: grid; grid-template-rows: 1fr auto; overflow: hidden; border-radius: 10px; background: #F6F5F1; }
.m-versio-fons { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 1.5rem; }
.m-versio-fons img { width: 72%; height: auto; }
.m-v-simbol .m-versio-fons img { width: auto; height: 64%; }
.m-v-paper .m-versio-fons { background: var(--paper); }
.m-v-blau .m-versio-fons { background: var(--blau); }
.m-v-groc .m-versio-fons { background: var(--groc); }
.m-v-tinta .m-versio-fons { background: var(--tinta-m); }
.m-v-gris .m-versio-fons { background: #E6E3DA; }
.m-versio-peu { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; padding: 1rem 1.2rem; border-top: 1px solid rgba(11, 12, 18, .08); }
.m-versio-peu b { display: block; font-weight: 700; font-size: .95rem; }
.m-versio-peu p > span { display: block; font-size: .8rem; color: #6A6873; }
.m-formats { display: flex; align-items: center; gap: .45rem; }
.m-formats span { font-stretch: 75%; font-weight: 700; font-size: .7rem; letter-spacing: .12em; color: #6A6873; margin-left: .35rem; }
.m-baixa { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tinta-m); color: var(--paper); transition: background-color .2s, color .2s, transform .2s var(--ease); }
.m-baixa:hover { background: var(--groc); color: var(--tinta-m); transform: translateY(-2px); }

/* 03 · La marca: la P en el blau, el texto en el groc */
.m-marca { display: grid; grid-template-columns: 1fr 1fr; min-height: 88vh; }
.m-marca-esq { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--blau); }
.m-marca-esq > * { grid-area: 1 / 1; }
.m-marca-esq img { position: relative; width: 30%; height: auto; }
.m-cercle { border: 1px solid rgba(243, 241, 234, .25); border-radius: 50%; aspect-ratio: 1; }
.m-c1 { width: 66%; }
.m-c2 { width: 112%; }
.m-marca-clic { position: relative; width: 9%; height: auto; overflow: visible; transform: translate(95%, 55%); }
.m-marca-clic .cr-rajos { stroke: var(--groc); }
.m-marca-dre { display: flex; flex-direction: column; justify-content: center; padding: clamp(3rem, 8vw, 7rem) clamp(2rem, 6vw, 6rem); background: var(--groc); color: var(--tinta-m); }
.m-marca-dre .m-text { color: #3E3720; margin-top: 1.4rem; }
.m-equacio { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 2.5rem; }
.m-equacio li { display: grid; gap: .5rem; min-width: 0; padding: .85rem 1rem; border: 1px solid rgba(11, 12, 18, .35); }
.m-equacio small { font-size: .7rem; opacity: .7; }
.m-equacio b { font-weight: 700; }
.m-equacio .m-op { min-width: 0; padding: 0; border: 0; font-weight: 700; }
.m-equacio .m-resultat { background: var(--tinta-m); border-color: var(--tinta-m); color: var(--paper); }

/* 04 · Color */
.m-mostres { display: flex; height: clamp(260px, 34vw, 420px); }
.m-mostres li { flex: 1; }
.m-mostres .m-blau { flex: 3; }
.m-mostres .m-groc { flex: 2; }
.m-mostres .m-tinta { flex: 1.6; }
.m-mostres .m-paperc, .m-mostres .m-neo { flex: 1.3; }
.m-mostres button {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; height: 100%;
  padding: 1.2rem; text-align: left; cursor: copy;
  transition: transform .3s var(--ease);
}
.m-mostres button:hover { transform: translateY(-6px); }
.m-mostres small { font-size: .75rem; opacity: .75; }
.m-mostres b { margin-top: auto; font-weight: 700; }
.m-mostres code { font-family: inherit; font-size: .78rem; letter-spacing: .04em; opacity: .8; }
.m-mostres .copiat code::after { content: " · copiat"; }
.m-blau button { background: var(--blau); color: var(--paper); }
.m-groc button { background: var(--groc); color: var(--tinta-m); }
.m-tinta button { background: var(--tinta-m); color: var(--paper); }
.m-paperc button { background: var(--paper); color: var(--tinta-m); box-shadow: inset 0 0 0 1px rgba(11, 12, 18, .12); }
.m-neo button { background: var(--neo); color: var(--tinta-m); }
.m-avis { min-height: 1.4em; margin-top: .6rem; font-size: .85rem; color: var(--blau); }
.m-proporcio { display: flex; height: 46px; margin-top: 2rem; overflow: hidden; border-radius: 8px; font-size: .78rem; font-weight: 700; }
.m-proporcio span { display: flex; align-items: center; padding: 0 .9rem; white-space: nowrap; overflow: hidden; }
.m-p-paper { flex: 55; background: #E8E5DC; }
.m-p-tinta { flex: 25; background: var(--tinta-m); color: var(--paper); }
.m-p-blau { flex: 15; background: var(--blau); color: var(--paper); }
.m-proporcio .m-p-groc { flex: 5; justify-content: center; padding: 0; background: var(--groc); }
.m-peu-color { margin-top: .7rem; font-size: .85rem; color: #6A6873; }

/* 05 · Tipografía */
.m-tipo { display: grid; grid-template-columns: 1fr 1fr; background: var(--tinta-m); color: var(--paper); }
.m-tipo-text { padding: clamp(4rem, 12vh, 8rem) var(--pad); border-right: 1px solid rgba(243, 241, 234, .12); }
.m-tipo .m-num, .m-moviment .m-num { color: var(--neo); }
.m-tipo .m-text, .m-moviment .m-text { color: rgba(243, 241, 234, .75); }
.m-tipo .m-text { margin-top: 1.2rem; }
.m-pesos { display: grid; gap: .45rem; margin-top: 2.2rem; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.1; }
.m-pesos li { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: .45rem; border-bottom: 1px solid rgba(243, 241, 234, .12); }
.m-pesos small { font-size: .75rem; font-weight: 400; font-stretch: 100%; letter-spacing: 0; text-transform: none; color: rgba(243, 241, 234, .55); }
.m-pes-800 { font-weight: 800; }
.m-pes-400 { font-weight: 400; }
.m-pes-300 { font-weight: 300; }
.m-pes-estreta { font-weight: 700; font-stretch: 75%; letter-spacing: .08em; text-transform: uppercase; }
.m-controls { display: grid; gap: .9rem; max-width: 24rem; margin-top: 2rem; }
.m-controls label { display: grid; grid-template-columns: 6rem 1fr; align-items: center; font-size: .85rem; color: rgba(243, 241, 234, .75); }
.m-controls input { width: 100%; accent-color: var(--groc); }
.m-tipo-aa { display: grid; place-items: center; overflow: hidden; }
.m-tipo-aa span { --pes: 800; --ample: 100%; font-size: clamp(9rem, 25vw, 23rem); font-weight: var(--pes); font-stretch: var(--ample); line-height: .8; letter-spacing: -.04em; color: var(--groc); }
@media (prefers-reduced-motion: no-preference) {
  .m-tipo-aa span:not(.quiet) { animation: m-respira 4.5s ease-in-out infinite alternate; }
}
@keyframes m-respira { from { font-weight: 300; font-stretch: 75%; } to { font-weight: 800; font-stretch: 100%; } }

/* 06 · El clic */
.m-clic-usos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.m-us { margin: 0; }
.m-us-fons { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 10px; }
.m-us-paper { background: var(--paper); }
.m-us-tinta { background: var(--tinta-m); }
.m-us-blau { background: var(--blau); }
.m-us figcaption { margin-top: .7rem; font-size: .85rem; color: #6A6873; }
.m-us-boto { height: 54px; font-size: .92rem; white-space: nowrap; overflow: visible; }
.m-segell { width: 60%; height: auto; overflow: visible; }
.m-segell-vora { fill: none; stroke: rgba(243, 241, 234, .3); stroke-width: 1; }
.m-segell-text { fill: var(--paper); font-family: var(--sans); font-size: 13.5px; font-weight: 700; font-stretch: 75%; letter-spacing: .2em; transform-box: view-box; transform-origin: 100px 100px; }
@media (prefers-reduced-motion: no-preference) { .m-segell-text { animation: m-gira 26s linear infinite; } }
@keyframes m-gira { to { transform: rotate(360deg); } }
.m-us-clic { width: 22%; height: auto; }

/* 07 · Movimiento */
.m-moviment { background: var(--tinta-m); color: var(--paper); }
.m-escenari {
  position: relative; display: grid; place-items: center; overflow: hidden;
  min-height: clamp(280px, 40vw, 460px); border-radius: 12px;
  background-color: #101119;
  background-image: linear-gradient(rgba(243, 241, 234, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(243, 241, 234, .05) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center;
}
.m-escenari .intro-logo { font-size: clamp(1.8rem, 5vw, 4.4rem); }
.m-repeteix { position: absolute; right: 1rem; bottom: 1rem; padding: .6rem 1rem; border-radius: 99px; background: rgba(243, 241, 234, .08); color: var(--paper); font-size: .85rem; font-weight: 600; transition: background-color .25s, color .25s; }
.m-repeteix:hover { background: var(--groc); color: var(--tinta-m); }
.m-principis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2rem; margin-top: 2rem; }
.m-principis li { display: grid; gap: .35rem; padding-top: 1rem; border-top: 1px solid rgba(243, 241, 234, .16); }
.m-principis small { color: var(--groc); font-weight: 700; font-size: .75rem; }
.m-principis b { font-size: 1.3rem; font-weight: 800; }
.m-principis span { font-size: .95rem; color: rgba(243, 241, 234, .7); }

/* ---------- Revelar al bajar (solo con JS y movimiento) ---------- */
.m-anima .m-revela { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.m-anima .m-revela.vist { opacity: 1; transform: none; }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  .m-dues, .m-idea, .m-marca, .m-tipo, .m-hero-peu { grid-template-columns: 1fr; }
  .m-idea-cos { grid-column: 1; }
  .m-versions, .m-clic-usos, .m-principis { grid-template-columns: 1fr; }
  .m-mostres { flex-direction: column; height: auto; }
  .m-mostres li { min-height: 92px; }
  .m-marca-esq { min-height: 80vw; }
  .m-tipo-text { border-right: 0; }
  .m-tipo-aa { padding: 1rem 0 4rem; }
  .m-hero::after { display: none; }
  .m-proporcio span { padding: 0 .5rem; font-size: .7rem; }
}
