/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --m: #7c3aed;        /* morat Mariano */
  --m-light: #ede9fe;
  --a: #0ea5e9;        /* blau NombreAlumno2 */
  --a-light: #e0f2fe;
  --bg: #f8f9fb;
  --surface: #ffffff;
  --border: #e4e7ec;
  --text: #111827;
  --muted: #6b7280;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.07);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  color: #fff;
  padding: 72px 24px 64px;
  text-align: center;
}
.hero-inner { max-width: 720px; margin: auto; }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #c4b5fd;
  border: 1px solid #6d28d9;
  border-radius: 99px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: #a78bfa; }

.hero-sub {
  color: #c4b5fd;
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 32px;
}

.authors-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.chip {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 99px;
}
.chip-m { background: var(--m-light); color: var(--m); }
.chip-a { background: var(--a-light); color: #0369a1; }

/* ─── TOPNAV ─── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topnav a {
  flex-shrink: 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 14px 18px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.topnav a:hover { color: var(--m); border-bottom-color: var(--m); }

/* ─── MAIN ─── */
main { max-width: 960px; margin: 0 auto; padding: 0 20px 60px; }

/* ─── SECTIONS ─── */
.section { padding: 60px 0; border-bottom: 1px solid var(--border); }
.section.alt { background: transparent; }

.sec-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}
.sec-num {
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: #e5e7eb;
  line-height: 1;
  flex-shrink: 0;
}
.sec-head h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.sec-desc { color: var(--muted); font-size: .9rem; }

/* ─── STEPS ─── */
.steps { display: flex; flex-direction: column; gap: 28px; }

.step {
  display: flex;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.sn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--m);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
}
.sb { flex: 1; min-width: 0; }
.sb h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.sb p { color: #374151; font-size: .93rem; margin-bottom: 16px; }
.sb p:empty::before {
  content: "[ Escriu aquí l'explicació d'aquest pas ]";
  color: #d1d5db;
  font-style: italic;
}

/* ─── IMAGES ─── */
.img-wrap {
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}
.img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  background: #f3f4f6;
}
.img-wrap img[src$="capturas/"] { min-height: 160px; }
.cap {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 8px 12px;
  background: #f9fafb;
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ─── TWO COLUMNS ─── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

/* ─── MEMBER CARDS ─── */
.member-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-m { border-top: 4px solid var(--m); }
.card-a { border-top: 4px solid var(--a); }

.member-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 4px 12px;
  margin-bottom: 16px;
}
.label-m { background: var(--m-light); color: var(--m); }
.label-a { background: var(--a-light); color: #0369a1; }

.member-card p:empty::before {
  content: "[ Escriu aquí el text d'aquest apartat ]";
  color: #d1d5db;
  font-style: italic;
}

/* ─── MEMBER FULL-WIDTH BLOCKS ─── */
.member-full {
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card-m.member-full { border-left: 5px solid var(--m); background: #fdfcff; }
.card-a.member-full { border-left: 5px solid var(--a); background: #f0f9ff; }

.big-label {
  font-size: 13px;
  padding: 6px 16px;
  margin-bottom: 24px;
}

/* Step number colors per member block */
.card-a .sn { background: var(--a); }

/* ─── FOOTER ─── */
footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
