/* ===== HERO ===== */
.hero {
  background: var(--navy);
  color: #fff;
  padding-block: var(--s12);
  position: relative;
  overflow: hidden;
}

.hero__deco {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
}

.hero__deco--1 {
  width: 400px;
  height: 400px;
  background: var(--orange);
  top: -150px;
  right: -100px;
}

.hero__deco--2 {
  width: 300px;
  height: 300px;
  background: var(--navy-light);
  bottom: -120px;
  left: -80px;
}

/* Split-screen: text esquerra + visual dreta */
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__content {
  /* left column */
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  padding: 0.35rem 1rem;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #CBD5E1;
  margin-bottom: var(--s3);
}

.hero__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.05;
  margin-bottom: var(--s2);
}

.hero__title span {
  color: var(--orange-light);
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: #CBD5E1;
  margin-bottom: var(--s5);
  max-width: 52ch;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  gap: var(--s4);
  margin-top: var(--s6);
  flex-wrap: wrap;
}

.hero__stat {
  display: flex;
  flex-direction: column;
}

.hero__stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #fff;
}

.hero__stat-label {
  font-size: var(--text-sm);
  color: #94A3B8;
}

/* ===== HERO VISUAL — Terminal/Chat mockup ===== */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__terminal {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-2xl);
  box-shadow: 0 24px 48px rgba(0,0,0,0.4),
              inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
  width: 100%;
  max-width: 440px;
}

.hero__terminal-dots {
  display: flex;
  gap: 6px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.hero__terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

.hero__terminal-dots span:nth-child(1) { background: #FF5F57; }
.hero__terminal-dots span:nth-child(2) { background: #FEBC2E; }
.hero__terminal-dots span:nth-child(3) { background: #28C840; }

.hero__terminal-body {
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.t-msg {
  padding: 10px 14px;
  border-radius: var(--r-lg);
}

.t-msg__label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
  opacity: 0.6;
}

.t-msg--user {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.t-msg--user p { color: #e2e8f0; }

.t-msg--claude {
  background: rgba(217,119,6,0.12);
  border: 1px solid rgba(217,119,6,0.25);
}

.t-msg--claude .t-msg__label { color: var(--orange-light); }
.t-msg--claude p { color: #fde68a; margin-bottom: 8px; }

.t-code {
  background: rgba(0,0,0,0.4);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 0.75rem;
  line-height: 1.7;
  color: #94a3b8;
}

.t-tag   { color: #f472b6; }
.t-attr  { color: #7dd3fc; }
.t-str   { color: #86efac; }
.t-comment { color: #475569; }
.t-indent  { padding-left: 1em; display: block; }

.t-footer {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
  padding-top: var(--s1);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.t-chip {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.07);
  color: #94a3b8;
}

.t-chip--green {
  background: rgba(16,185,129,0.15);
  color: #34d399;
}

/* ===== OBJECTIUS ===== */
.objectius-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-top: var(--s2);
}

.objectiu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s4);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  will-change: transform;
  cursor: default;
}

.objectiu-card:hover {
  border-color: var(--navy-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.objectiu-card__icon {
  color: var(--navy);
  margin-bottom: var(--s3);
}

.objectiu-card:first-child .objectiu-card__icon {
  color: var(--orange);
}

.objectiu-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--s1);
}

.objectiu-card:first-child {
  border-top: 3px solid var(--orange);
}

.objectiu-card__body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== PROGRAMA ===== */
.programa-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--s6);
  align-items: start;
}

.programa-sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--s3));
}

.programa-sidebar__card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--r-2xl);
  padding: var(--s4);
}

.programa-sidebar__title {
  font-size: var(--text-lg);
  color: #CBD5E1;
  margin-bottom: var(--s3);
  font-weight: 600;
}

.programa-sidebar__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: var(--text-sm);
  color: #E2E8F0;
}

.programa-sidebar__item:last-child {
  border-bottom: none;
}

.programa-sidebar__min {
  font-weight: 700;
  color: var(--orange-light);
  font-family: var(--font-mono);
}

.programa-sidebar__total {
  margin-top: var(--s2);
  padding-top: var(--s2);
  border-top: 2px solid rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #fff;
}

/* ===== MCP VS SKILLS ===== */
.mvs {
  background: var(--surface);
}

.mvs__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--s4);
  font-size: var(--text-md);
}

.mvs__table th,
.mvs__table td {
  padding: var(--s2);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.mvs__table th {
  background: var(--bg);
  font-weight: 700;
  font-size: var(--text-lg);
}

.mvs__table th:first-child { color: var(--navy); }
.mvs__table th:last-child  { color: var(--orange); }

.mvs__table td { color: var(--text-muted); }

/* ===== ICON LIST (substitueix emojis) ===== */
.icon-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.icon-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.icon-list li svg {
  flex-shrink: 0;
  color: var(--navy);
  opacity: 0.7;
}

/* ===== QUIZZ DEMO ===== */
.quizz-section {
  background: var(--bg);
}

.quizz-demo-wrapper {
  max-width: 700px;
  margin-inline: auto;
}

.quizz-cta {
  text-align: center;
  margin-top: var(--s4);
  padding: var(--s3);
  background: var(--navy-muted);
  border-radius: var(--r-xl);
}

.quizz-cta p {
  margin-inline: auto;
  margin-bottom: var(--s2);
  color: var(--navy-dark);
  font-weight: 600;
  max-width: none;
}

/* ===== DESCÀRREGUES ===== */
.descàrregues-section {
  background: var(--navy-dark);
  color: #fff;
}

.descàrregues-section .section-title {
  color: #fff;
}

.descàrregues-section .section-subtitle {
  color: #CBD5E1;
}

.zip-banner {
  background: var(--orange);
  border-radius: var(--r-2xl);
  padding: var(--s4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s5);
  flex-wrap: wrap;
}

.zip-banner__text h3 {
  display: flex;
  align-items: center;
  gap: var(--s1);
  font-size: var(--text-2xl);
  color: #fff;
  margin-bottom: 0.5rem;
}

.zip-banner__text h3 svg { color: #fff; }

.zip-banner__text p {
  color: rgba(255,255,255,0.85);
  font-size: var(--text-md);
  max-width: none;
}

/* Bento grid de descàrregues: 2 columnes, primera fila destacada */
.downloads-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

/* Primera targeta (Presentació) ocupa tota la fila */
.downloads-grid > :first-child {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--s3);
}

.downloads-grid > :first-child .download-card__icon {
  flex-shrink: 0;
}

.download-card {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}

.download-card__title {
  color: #fff;
}

.download-card__desc {
  color: #CBD5E1;
}

.download-card__icon svg {
  color: rgba(255,255,255,0.6);
}

/* ===== CONTACTE ===== */
.contacte-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: start;
}

/* ===== STAGGERED LOAD-IN ===== */
/* .stagger-init s'afegeix via JS — si JS falla, elements visibles per defecte */
.stagger-init {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-init.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--s6);
  }

  .hero__visual {
    display: none; /* Oculta el terminal en tablet/mòbil per estalviar espai */
  }

  .programa-layout {
    grid-template-columns: 1fr;
  }

  .programa-sidebar {
    position: static;
    order: -1;
  }

  .objectius-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .downloads-grid {
    grid-template-columns: 1fr;
  }

  .downloads-grid > :first-child {
    grid-column: 1;
    flex-direction: column;
  }

  .zip-banner {
    flex-direction: column;
    text-align: center;
  }

  .contacte-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .objectius-grid   { grid-template-columns: 1fr; }
  .hero__stats      { gap: var(--s3); }
}
