/* ===== Demos + Event Systems pages ===== */

/* ---------- shared ---------- */
.ep-header-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.ep-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.ep-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.ep-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  margin: 0.5rem 0 0.75rem;
}

.ep-head p {
  color: var(--text-muted);
  line-height: 1.7;
}

.ep-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ep-pill--live {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.ep-pill--request {
  background: rgba(167, 139, 250, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.ep-pill--ai {
  background: rgba(236, 72, 153, 0.14);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

/* ---------- Demos: filters ---------- */
.dm-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 2.5rem;
}

.dm-chip {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 50px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dm-chip:hover {
  color: var(--text);
  border-color: rgba(167, 139, 250, 0.45);
}

.dm-chip.active {
  color: #fff;
  background: var(--gradient-cta);
  border-color: transparent;
}

.dm-chip-count {
  opacity: 0.7;
  font-size: 0.8em;
  margin-left: 0.25rem;
}

/* ---------- Demos: cards ---------- */
.dm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.dm-card {
  display: flex;
  flex-direction: column;
  background: var(--gradient-card);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.dm-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 58, 237, 0.38);
  box-shadow: 0 16px 48px rgba(124, 58, 237, 0.18);
}

.dm-card[hidden] {
  display: none;
}

.dm-card--featured {
  border-color: rgba(34, 197, 94, 0.28);
}

.dm-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 3.5rem;
}

.dm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s;
}

.dm-card:hover .dm-thumb img {
  transform: scale(1.04);
}

.dm-thumb .ep-pill {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  backdrop-filter: blur(6px);
  background-color: rgba(15, 10, 30, 0.72);
}

.dm-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}

.dm-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

.dm-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.dm-body > p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.dm-used {
  font-size: 0.82rem;
  color: var(--text-muted);
  border-left: 2px solid rgba(236, 72, 153, 0.5);
  padding-left: 0.7rem;
  margin-bottom: 1rem;
}

.dm-used strong {
  color: var(--text);
  font-weight: 600;
}

.dm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.dm-tags span {
  padding: 0.25rem 0.6rem;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 8px;
  font-size: 0.76rem;
  color: var(--primary-light);
}

.dm-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(34, 197, 94, 0.07);
  border: 1px dashed rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 1rem;
}

.dm-note code {
  color: #4ade80;
  font-weight: 600;
}

.dm-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dm-actions .btn {
  width: 100%;
  justify-content: center;
}

.dm-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0;
}

/* Copilot live-session box inside a demo card */
.dm-card .live-sessions {
  margin-bottom: 1rem;
}

/* ---------- Event Systems: flow ---------- */
.es-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: esstep;
}

.es-step {
  position: relative;
  background: var(--gradient-card);
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 22px;
  padding: 1.75rem;
}

.es-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: var(--gradient-cta);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
}

.es-step h3 {
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
}

.es-step > p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.es-step ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.es-step li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.es-step li::before {
  content: '';
  flex: 0 0 7px;
  height: 7px;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--secondary);
}

.es-step li em {
  font-style: normal;
  color: #f472b6;
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 0.25rem;
}

/* ---------- Event Systems: modules ---------- */
.es-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.es-module {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: 18px;
  padding: 1.4rem;
  transition: border-color 0.3s, background 0.3s;
}

.es-module:hover {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(124, 58, 237, 0.06);
}

.es-module-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.es-module-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: rgba(124, 58, 237, 0.15);
}

.es-module h3 {
  font-size: 1.08rem;
  margin-bottom: 0.4rem;
}

.es-module p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------- Event Systems: AI split ---------- */
.es-ai {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.es-ai-media {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.25);
  box-shadow: 0 24px 60px rgba(124, 58, 237, 0.18);
}

.es-ai-media img {
  display: block;
  width: 100%;
  height: auto;
}

.es-ai h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  margin: 0.5rem 0 1rem;
}

.es-ai > div > p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.es-ai-list {
  display: grid;
  gap: 1rem;
}

.es-ai-item {
  display: flex;
  gap: 0.9rem;
}

.es-ai-item span {
  flex: 0 0 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(236, 72, 153, 0.14);
  font-size: 1.15rem;
}

.es-ai-item strong {
  display: block;
  margin-bottom: 0.15rem;
}

.es-ai-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ---------- Event Systems: engagement models ---------- */
.es-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.es-plan {
  display: flex;
  flex-direction: column;
  background: var(--gradient-card);
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 22px;
  padding: 1.9rem;
}

.es-plan--pick {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 18px 50px rgba(236, 72, 153, 0.12);
}

.es-plan-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.es-plan h3 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.es-plan-who {
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.es-plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.5rem;
}

.es-plan li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.5;
}

.es-plan li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: #4ade80;
  font-weight: 700;
}

.es-plan .btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

/* ---------- Event Systems: FAQ ---------- */
.es-faq {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.es-faq details {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: 14px;
  padding: 1rem 1.25rem;
}

.es-faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.es-faq summary::-webkit-details-marker {
  display: none;
}

.es-faq summary::after {
  content: '+';
  color: var(--primary-light);
  font-size: 1.25rem;
  line-height: 1;
}

.es-faq details[open] summary::after {
  content: '\2212';
}

.es-faq details p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-top: 0.75rem;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .es-flow,
  .es-plans {
    grid-template-columns: 1fr;
  }

  .es-ai {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

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

  .dm-chip {
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem;
  }
}

/* ===================== Training page ===================== */
.tr-picker-section { padding-top: 3rem; padding-bottom: 1rem; }

.tr-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.tr-pick {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  text-decoration: none;
  color: #fff;
  border: 1px solid var(--pp-line, #e7e3f3);
  box-shadow: 0 10px 30px rgba(27, 31, 42, 0.08);
}

.tr-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.tr-pick::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 20, 27, 0) 35%, rgba(18, 20, 27, 0.88) 100%);
}

.tr-pick:hover img { transform: scale(1.05); }

.tr-pick-body {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.9rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.tr-pick-body strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; }
.tr-pick-body small { color: #d6d0ea; font-size: 0.8rem; margin-top: 0.15rem; }

.tr-split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3.5rem;
  align-items: center;
}

.tr-split--rev > :first-child { order: 2; }

.tr-band {
  max-width: none;
  background: #fff;
  border-top: 1px solid var(--pp-line, #e7e3f3);
  border-bottom: 1px solid var(--pp-line, #e7e3f3);
}

.tr-media {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(27, 31, 42, 0.16);
  aspect-ratio: 16 / 10;
  background: #1b1f2a;
}

.tr-media img,
.tr-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tr-badge {
  position: absolute;
  left: 1rem;
  top: 1rem;
  background: #fff;
  color: var(--pp-ink, #1b1f2a);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.tr-h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin: 0.25rem 0 1rem;
}

.tr-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.tr-checks {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.6rem;
}

.tr-checks li {
  position: relative;
  padding-left: 1.75rem;
  line-height: 1.55;
  color: var(--text);
  font-size: 0.95rem;
}

.tr-checks li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: rgba(124, 77, 255, 0.12);
  color: var(--pp-purple, #7c4dff);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tr-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
}

.tr-topics span {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  background: #fff;
  border: 1px solid var(--pp-line, #e7e3f3);
  color: #3d4152;
}

.tr-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .tr-picker { grid-template-columns: repeat(2, 1fr); }
  .tr-split { grid-template-columns: 1fr; gap: 2rem; }
  .tr-split--rev > :first-child { order: 0; }
}

/* ===================== Downloads page ===================== */
.dl-section { padding-top: 3rem; }

.dl-toolbar {
  position: sticky;
  top: 84px;
  z-index: 5;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: rgba(246, 245, 251, 0.92);
  backdrop-filter: blur(10px);
  padding: 0.75rem 0;
  margin-bottom: 2rem;
}

.dl-search {
  flex: 1 1 360px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--pp-line, #e7e3f3);
  border-radius: 50px;
  padding: 0.7rem 1.1rem;
  box-shadow: 0 6px 18px rgba(27, 31, 42, 0.05);
}

.dl-search:focus-within { border-color: var(--pp-purple, #7c4dff); }

.dl-search input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 0.95rem;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

.dl-jump { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.dl-jump a {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: #3d4152;
  padding: 0.5rem 0.9rem;
  border-radius: 50px;
  border: 1px solid var(--pp-line, #e7e3f3);
  background: #fff;
}

.dl-jump a:hover { border-color: var(--pp-purple, #7c4dff); color: var(--pp-purple-deep, #5b2ee6); }

.dl-block { margin-bottom: 3.5rem; scroll-margin-top: 160px; transition: opacity 0.2s; }
.dl-block--dim { opacity: 0.45; }

.dl-block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.dl-block-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0.2rem 0 0.4rem; }
.dl-block-head p { color: var(--text-muted); max-width: 640px; }

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}

.dl-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--pp-line, #e7e3f3);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.dl-card[hidden] { display: none; }

.dl-card:hover {
  border-color: var(--pp-purple, #7c4dff);
  box-shadow: 0 10px 26px rgba(124, 77, 255, 0.14);
  transform: translateY(-2px);
}

.dl-icon {
  flex: 0 0 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(124, 77, 255, 0.1);
}

.dl-icon--pdf { background: rgba(244, 63, 94, 0.1); }
.dl-icon--docx, .dl-icon--doc { background: rgba(59, 130, 246, 0.1); }
.dl-icon--pptx, .dl-icon--ppt { background: rgba(249, 115, 22, 0.12); }

.dl-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dl-title { font-weight: 600; font-size: 0.93rem; line-height: 1.35; }
.dl-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }

.dl-go {
  flex: 0 0 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pp-ink, #1b1f2a);
  color: #fff;
  font-weight: 700;
  transition: background 0.2s;
}

.dl-card:hover .dl-go { background: var(--pp-purple, #7c4dff); }

.dl-loading, .dl-none { color: var(--text-muted); font-size: 0.9rem; }

.dl-note {
  text-align: center;
  color: var(--text-muted);
  margin-top: 1rem;
}

.dl-note a { color: var(--pp-purple-deep, #5b2ee6); font-weight: 600; }

@media (max-width: 520px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-toolbar { top: 70px; }
}

/* ===================== Services overview groups ===================== */
.sv-group { margin-bottom: 4rem; }

.sv-group-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.sv-group-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.sv-group-head p { color: var(--text-muted); }

.sv-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  background: var(--pp-ink, #1b1f2a);
  border-radius: 8px;
  padding: 0.2rem 0.55rem;
}

/* ===================== Event-flow images ===================== */
.es-step-art {
  margin: -1.75rem -1.75rem 1.25rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
}

.es-step-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sv-group .experiences-grid {
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.25rem;
}

.sv-group .experience-thumb { height: 170px; }
.sv-group .experience-card-body { padding: 1.35rem; }
.sv-group .experience-card-body h3 { font-size: 1.2rem; }
.sv-group .experience-card-body p { font-size: 0.9rem; margin-bottom: 1.1rem; }
.sv-group .experience-card { display: flex; flex-direction: column; }
.sv-group .experience-card-body { display: flex; flex-direction: column; flex: 1; }
.sv-group .experience-card-body > .btn:first-of-type { margin-top: auto; }

/* ===================== Services: strict alignment =====================
   Every card in a group shares the same row tracks (CSS subgrid), so the
   badge, title, description, tags and buttons sit on one line across the
   whole row, however long each card's copy is. */
.sv-group-head { align-items: center; }
.sv-group-head p { margin: 0; }
.sv-group .experience-card-body > .btn { font-size: 0.92rem; padding-left: 0.9rem; padding-right: 0.9rem; text-wrap: balance; text-align: center; min-width: 0; }
@supports (grid-template-rows: subgrid) {
  .sv-group .experiences-grid { grid-template-rows: repeat(7, auto); row-gap: 0; }
  .sv-group .experience-card { display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 0; }
  .sv-group .experience-thumb { grid-row: 1; }
  .sv-group .experience-card-body { grid-row: 2 / span 6; display: grid; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 0.75rem; min-width: 0; }
  .sv-group .experience-card-body > * { margin-top: 0 !important; margin-bottom: 0 !important; }
  .sv-group .experience-badge { grid-row: 1; justify-self: start; align-self: start; }
  .sv-group .experience-card-body > h3 { grid-row: 2; align-self: start; }
  .sv-group .experience-card-body > p { grid-row: 3; align-self: start; }
  .sv-group .experience-features { grid-row: 4; align-self: start; }
  .sv-group .experience-card-body > .btn { grid-row: 5; align-self: end; margin-top: 0.5rem !important; }
  .sv-group .experience-card-body > .btn ~ .btn { grid-row: 6; margin-top: 0 !important; }
}
