body[data-demo-type="avatar"] { --demo-accent: #7997e8; }
body[data-demo-type="video"] { --demo-accent: #d6907d; }
body[data-demo-type="website"] { --demo-accent: #7997e8; }
body[data-demo-type="workflow"] { --demo-accent: #8aa876; }
body[data-demo-type="tool"] { --demo-accent: #8aa876; }

.demo-type-shell > .type-hero {
  min-height: 410px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.type-hero h1 {
  max-width: 760px;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.08;
}

.type-hero-copy > p:not(.portal-eyebrow) {
  max-width: 680px;
  margin: 22px auto 0;
  color: var(--portal-body);
  font-size: 16px;
  line-height: 1.65;
}

.type-demos > header h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(38px, 5vw, 62px);
}

.type-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: clamp(44px, 8vw, 88px) 24px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  color: rgba(255,255,255,.62);
  text-align: center;
}

body[data-demo-type="video"] .type-grid,
body[data-demo-type="workflow"] .type-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 960px;
  margin-right: auto;
  margin-left: auto;
}

body[data-demo-type="video"] .type-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1200px;
}

body[data-demo-type="video"] .example-visual {
  height: auto;
  aspect-ratio: 9 / 14;
}

body[data-demo-type="video"] .example-visual.video-poster > img {
  object-position: center;
}

.demo-example {
  min-width: 0;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  background:
    linear-gradient(155deg, rgba(255,255,255,.025), transparent 42%),
    var(--portal-panel-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.example-visual {
  position: relative;
  height: 230px;
  overflow: hidden;
  border-bottom: 1px solid var(--portal-line);
  background: #0b0b0d;
}

.example-visual > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(.76) brightness(.86);
}

.example-visual.video-poster > img { object-position: center 22%; }
body[data-demo-type="avatar"] .demo-example:nth-child(1) .example-visual.video-poster > img,
body[data-demo-type="avatar"] .demo-example:nth-child(4) .example-visual.video-poster > img,
body[data-demo-type="avatar"] .demo-example:nth-child(6) .example-visual.video-poster > img { object-position: center top; }
.example-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,6,9,.66), transparent 58%); pointer-events: none; }
.example-placeholder { height: 100%; display: grid; place-items: center; background: radial-gradient(300px 180px at 50% 38%, rgba(0,47,167,.18), transparent 72%), #0b0b0d; }
.example-placeholder strong { color: #5c6580; font-size: 48px; font-weight: 700; letter-spacing: -.05em; }

.example-industry {
  position: absolute;
  left: 17px;
  top: 17px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: #deddd8;
  background: rgba(7,7,7,.72);
  font-size: 10px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.example-body {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 34px;
}
.example-body h3 { margin: 0 0 13px; font-size: clamp(21px, 1.8vw, 26px); line-height: 1.14; letter-spacing: -.035em; text-wrap: balance; }
.example-body > p { margin: 0; color: var(--portal-body); font-size: 13px; line-height: 1.7; text-wrap: pretty; word-break: auto-phrase; line-break: strict; }

.example-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: auto;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--portal-blue);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.example-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: auto;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(5,6,9,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.example-actions .example-action {
  min-width: 0;
  min-height: 42px;
  margin-top: 0;
  padding: 0 14px;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  color: #b9bbc3;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  letter-spacing: .015em;
}

.example-actions .example-action.is-primary {
  color: #fff;
  background: var(--portal-blue);
}

.example-actions .example-action.is-secondary:hover {
  color: #fff;
  background: rgba(255,255,255,.065);
}

.example-actions .example-action:focus-visible {
  position: relative;
  z-index: 1;
  outline: 0;
  box-shadow: 0 0 0 2px #0d0e11, 0 0 0 4px rgba(155,194,255,.72);
}

.action-play {
  width: 19px;
  height: 19px;
  display: grid;
  flex: 0 0 19px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 7px;
  line-height: 1;
  opacity: .72;
  text-indent: 1px;
}

.example-action.is-pending { border: 1px solid var(--portal-line); color: #77777d; background: #151516; cursor: default; }

.video-dialog {
  width: min(900px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--portal-radius);
  color: var(--portal-ink);
  background: #0c0c0e;
  box-shadow: 0 34px 100px rgba(0,0,0,.72);
}

.video-dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(9px); }
.dialog-shell { position: relative; display: grid; grid-template-columns: minmax(290px, .8fr) minmax(0, 1.2fr); min-height: 590px; }
.dialog-close { position: absolute; right: 16px; top: 16px; z-index: 4; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; color: #fff; background: rgba(15,15,17,.9); cursor: pointer; font-size: 22px; }
.dialog-media { display: grid; place-items: center; overflow: hidden; background: #050608; }
.dialog-media video { width: 100%; height: 100%; max-height: 82svh; object-fit: contain; background: #050608; }
.dialog-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 5vw, 62px); }
.dialog-copy h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -.04em; text-wrap: balance; }
.dialog-copy > p:not(.portal-eyebrow) { margin: 21px 0 0; color: var(--portal-body); font-size: 14px; line-height: 1.75; text-wrap: pretty; word-break: auto-phrase; line-break: strict; }
.dialog-copy small { margin-top: 30px; color: var(--portal-dim); font-size: 10px; line-height: 1.6; }

@media (hover: hover) {
  .demo-example { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
  .demo-example:hover { transform: translateY(-4px); border-color: rgba(128,163,235,.25); box-shadow: 0 18px 42px rgba(0,0,0,.28); }
}

@media (max-width: 1100px) {
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-demo-type="video"] .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 740px; }
}

@media (max-width: 700px) {
  .demo-type-shell > .type-hero { min-height: 380px; }
  .type-hero h1 { font-size: clamp(34px, 10vw, 42px); }
  .type-hero-copy > p:not(.portal-eyebrow) { font-size: 15px; }
  .type-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 34px; }
  body[data-demo-type="video"] .type-grid,
  body[data-demo-type="workflow"] .type-grid { grid-template-columns: 1fr; }
  body[data-demo-type="video"] .type-grid { max-width: 380px; }
  .example-visual { height: 225px; }
  .example-body { min-height: 230px; padding: 30px 24px 32px; }
  .example-body h3 { font-size: 23px; }
  .video-dialog { overflow: auto; }
  .dialog-shell { grid-template-columns: 1fr; min-height: 0; }
  .dialog-media { height: 58svh; }
  .dialog-copy { padding: 28px 22px 34px; }
  .dialog-copy h2 { font-size: 34px; }
}
