#features {
  padding-block: 110px 86px;
  border: 0;
  background: none;
}

#features #studio {
  width: min(1104px, calc(100% - 56px));
}

#features .studio-head {
  margin-bottom: 52px;
}

#features .feature-scenes {
  display: grid;
  gap: 120px;
}

#features .scene {
  --scene-tilt: -2deg;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  min-height: 0;
  gap: 56px;
  padding: 0;
  translate: 0 var(--scene-offset, 0px);
}

#features .scene:nth-child(even) {
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  --scene-offset: 26px;
  --scene-tilt: 1.8deg;
}

#features .scene:nth-child(3) {
  --scene-offset: -10px;
  --scene-tilt: -2.4deg;
}

#features .scene:nth-child(4) {
  --scene-tilt: 1.4deg;
}

#features .scene .scene-copy {
  max-width: none;
  padding: 0;
}

#features .scene-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #d5bdf6;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .025em;
  line-height: 1.3;
  text-transform: none;
}

#features .scene-copy .eyebrow img,
#features .feature-demo-glyph img,
#features .room-heading img {
  flex: none;
  filter: invert(85%) sepia(16%) saturate(1116%) hue-rotate(203deg) brightness(107%);
}

#features .scene-copy h3 {
  margin: 0 0 14px;
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.027em;
  line-height: 1.12;
}

#features .scene-copy > p:not(.eyebrow) {
  max-width: 440px;
  margin: 0 0 24px;
  font-size: .9375rem;
  line-height: 1.7;
}

#features .scene-copy ul {
  display: grid;
  gap: 12px;
  margin: 0;
}

#features .scene-copy li {
  align-items: center;
  gap: 11px;
  margin: 0;
  color: #dfd6eb;
  font-size: .875rem;
  line-height: 1.46;
}

#features .scene-copy li::before {
  width: 19px;
  height: 19px;
  border-color: rgb(207 177 250 / 24%);
  background: rgb(198 153 251 / 10%);
  color: #d7b8ff;
}

#features .scene .feature-demo {
  --preview-ink: #f1e9fa;
  --preview-muted: #bfb1cf;
  --preview-line: rgb(212 187 246 / 13%);
  align-self: center;
  order: 0;
  min-width: 0;
  min-height: 0;
  padding: 22px 24px;
  border: 1px solid rgb(222 199 247 / 16%);
  border-radius: 18px;
  background: linear-gradient(155deg, rgb(192 147 250 / 9%), rgb(119 86 190 / 2.5%) 45%, rgb(202 149 252 / 4.5%)), rgb(15 11 27 / 69%);
  box-shadow: inset 0 1px rgb(228 206 255 / 8%), 0 12px 36px rgb(0 0 0 / 40%);
  backdrop-filter: none;
  rotate: var(--scene-tilt);
  color: var(--preview-ink);
  font-size: .84375rem;
  line-height: 1.5;
}

#features .scene .feature-demo:is(:hover, :focus-within) {
  border-color: rgb(222 199 247 / 30%);
  rotate: none;
}

#features .feature-demo p {
  margin: 0;
  color: var(--preview-muted);
}

#features .feature-demo-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  margin-bottom: 16px;
  color: var(--preview-muted);
  font-size: .75rem;
  font-weight: 560;
}

#features .feature-demo-tag,
#features .room-heading output {
  padding: 2px 8px;
  border: 1px solid var(--preview-line);
  border-radius: 999px;
  background: rgb(209 184 244 / 6%);
  color: #d4c4e6;
  font-size: .6875rem;
  font-weight: 600;
  white-space: nowrap;
}

#features .feature-demo-glyph {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgb(206 156 255 / 13%);
}

#features .feature-room-join {
  justify-content: flex-start;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--preview-line);
  border-radius: 12px;
  background: rgb(226 204 248 / 4%);
  color: var(--preview-ink);
  font-size: .875rem;
}

#features .feature-room-join:hover {
  border-color: rgb(208 172 250 / 36%);
  background: rgb(185 134 249 / 11%);
}

#features .feature-room-join small {
  color: var(--preview-muted);
  font-size: .6875rem;
}

#features .feature-room-panel {
  margin: 10px 0 0;
  padding: 10px 8px 8px;
  border: 1px solid var(--preview-line);
  border-radius: 12px;
  background: rgb(223 197 247 / 3%);
}

#features .room-heading {
  justify-content: flex-start;
  gap: 8px;
  padding: 0 8px 7px;
  font-size: .8125rem;
}

#features .room-heading output {
  margin-left: auto;
}

#features .feature-room-members {
  gap: 2px;
  margin: 0;
}

#features .feature-room-members li {
  gap: 10px;
  padding: 5px 8px 5px 28px;
  border-radius: 8px;
  background: transparent;
  color: var(--preview-muted);
  font-size: .8125rem;
}

#features .feature-room-members li:nth-child(1) {
  background: rgb(225 201 245 / 4%);
  color: var(--preview-ink);
}

#features .feature-room-members .feature-room-avatar,
#features .feature-message-avatar {
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: #fff3ff;
  font-size: .6875rem;
  font-weight: 700;
}

#features .feature-room-members .feature-room-avatar {
  width: 24px;
  height: 24px;
  background: linear-gradient(145deg, #8c64c5, #57347e);
}

#features .feature-room-members li:nth-child(2) .feature-room-avatar {
  background: linear-gradient(145deg, #795eb0, #432d6e);
}

#features .feature-room-members li:nth-child(3) .feature-room-avatar {
  background: linear-gradient(145deg, #4e817e, #2d5a61);
}

#features .feature-room-muted {
  flex: none;
  width: 13px;
  height: 13px;
  background: currentColor;
  mask: url("/assets/tools/mic-off.svg") center / contain no-repeat;
}

#features .feature-room-members li button {
  min-height: 26px;
  padding: 2px 7px;
  border-color: var(--preview-line);
  background: rgb(25 19 42 / 74%);
  color: var(--preview-muted);
}

#features .feature-room-members li button:hover {
  border-color: rgb(229 153 172 / 45%);
  color: #ffd7e2;
}

#features .feature-demo :where(.controls) {
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

#features .feature-demo .controls button,
#features .room-settings .copy-command {
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--preview-line);
  border-radius: 7px;
  background: rgb(222 199 247 / 7%);
  color: var(--preview-ink);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.35;
}

#features .feature-demo .controls button:is(:hover, [aria-pressed="true"]):not(:disabled),
#features .room-settings .copy-command:hover {
  border-color: rgb(209 171 251 / 37%);
  background: rgb(182 134 248 / 17%);
}

#features .feature-demo .controls button:disabled {
  cursor: default;
  opacity: .55;
}

#features .feature-room-controls {
  margin: 7px 0 0;
  padding: 8px 8px 0;
  border-top: 1px solid var(--preview-line);
}

#features .feature-room-controls .stepper {
  flex-wrap: nowrap;
  gap: 4px;
  margin-left: auto;
}

#features .feature-room-controls .stepper output {
  min-width: 56px;
  color: var(--preview-muted);
  font-size: .75rem;
}

#features .feature-room-controls .stepper button {
  min-width: 32px;
  padding-inline: 6px;
}

#features .room-settings {
  width: max-content;
  max-width: 100%;
  margin: 9px 1px 0;
  color: var(--preview-muted);
  font-size: .75rem;
}

#features .room-settings summary {
  padding-block: 4px;
}

#features .room-settings input {
  width: min(205px, 100%);
  min-height: 32px;
  border-color: var(--preview-line);
}

#features .feature-transcript {
  display: grid;
  gap: 15px;
}

#features .feature-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

#features .feature-message-avatar {
  width: 34px;
  height: 34px;
  overflow: hidden;
}

#features .feature-guest-avatar {
  background: linear-gradient(145deg, #8f6ca6, #543569);
}

#features .feature-app-avatar {
  border: 1px solid rgb(207 172 250 / 21%);
  background: rgb(166 96 221 / 13%);
}

#features .feature-app-avatar img {
  display: block;
  width: 100%;
  height: auto;
}

#features .feature-message-body {
  min-width: 0;
}

#features .feature-message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}

#features .feature-message-head > strong {
  font-weight: 670;
}

#features .feature-message-meta {
  color: #a99bb8;
  font-size: .6875rem;
}

#features .feature-app-badge {
  padding: 1px 5px;
  border-radius: 4px;
  background: #5946af;
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1.35;
}

#features .feature-message-embed {
  padding: 8px 12px;
  border-left: 3px solid rgb(213 181 255 / 48%);
  border-radius: 4px;
  background: rgb(213 184 253 / 6%);
}

#features .feature-message-embed strong {
  display: block;
  margin-bottom: 2px;
  font-size: .8125rem;
  font-weight: 650;
}

#features .feature-message-embed p {
  font-size: .8125rem;
}

#features :is(.feature-ticket-options, .feature-auto-options) {
  margin: 13px 0 0 46px;
}

#features .feature-auto-options button[aria-pressed="true"] {
  border-color: rgb(209 171 251 / 44%);
  background: rgb(170 115 245 / 18%);
  color: var(--preview-ink);
}

#features .feature-ticket-stage:not([hidden]) {
  display: grid;
  gap: 9px;
  margin: 13px 0 0 46px;
  padding-top: 10px;
  border-top: 1px solid var(--preview-line);
}

#features .feature-ticket-stage .ticket-progress span {
  padding: 2px 7px;
  border-color: var(--preview-line);
  font-size: .675rem;
}

#features .feature-ticket-stage .ticket-progress span[aria-current="step"],
#features #ticket-next,
#features #quest {
  border-color: rgb(209 171 251 / 36%);
  background: rgb(170 115 245 / 17%);
  color: var(--preview-ink);
}

#features .feature-xp-profile,
#features .feature-demo-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

#features .feature-xp-glyph {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

#features .feature-xp-profile strong,
#features .feature-demo-action strong {
  font-size: .9rem;
}

#features .feature-xp-profile p,
#features .feature-demo-action p {
  font-size: .75rem;
}

#features .feature-xp-progress {
  margin-top: 18px;
  padding: 12px 13px;
  border: 1px solid var(--preview-line);
  border-radius: 11px;
  background: rgb(224 196 244 / 3.5%);
}

#features .feature-xp-progress-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 8px;
  color: var(--preview-muted);
  font-size: .75rem;
}

#features #xp-value {
  color: #dec9f3;
  font-variant-numeric: tabular-nums;
}

#features .xp-demo .meter {
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgb(223 193 255 / 13%);
}

#features #xp-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, #8a65cf, #caa7fb);
}

#features .feature-demo-action {
  justify-content: space-between;
  margin-top: 15px;
}

#features .feature-creator-message {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#features .feature-creator-embed {
  display: flex;
  align-items: center;
  gap: 9px;
}

#features .feature-creator-embed img {
  width: 28px;
  height: 28px;
  flex: none;
  object-fit: contain;
  border-radius: 6px;
}

#features .feature-creator-options {
  margin: 13px 0 0 46px;
}

#features .feature-demo :is(button, summary, input):focus-visible {
  outline: 2px solid #d8b5fc;
  outline-offset: 3px;
}

#features .voice-demo:has(#lock[aria-pressed="true"]) :is(#room-status, .feature-room-panel) {
  border-color: rgb(242 183 132 / 36%);
}

#features .voice-demo:has(#lock[aria-pressed="true"]) #room-status {
  background: rgb(211 135 82 / 13%);
  color: #f1c7a7;
}

#features .ticket-demo:has(#ticket-stage:not([hidden])) .feature-message-embed {
  border-left-color: rgb(218 185 255 / 72%);
}

#features .ticket-demo:has([data-ticket-step="claimed"][aria-current="step"]) #ticket-status {
  border-color: rgb(139 211 186 / 38%);
  background: rgb(117 193 162 / 12%);
  color: #bde9d6;
}

#features .ticket-demo:has([data-ticket-step="closed"][aria-current="step"]) #ticket-status {
  border-color: rgb(185 173 215 / 30%);
  background: rgb(167 151 200 / 10%);
  color: #d1c6e4;
}

#features .xp-demo:has(#quest[data-complete="true"]) .feature-xp-progress {
  border-color: rgb(212 178 255 / 38%);
  box-shadow: 0 0 23px rgb(168 101 234 / 16%);
}

#features .xp-demo:has(#quest[data-complete="true"]) #xp-value {
  color: #e5ceff;
}

#features .creator-demo:has([data-creator-preview="live"][aria-pressed="true"]) .feature-creator-embed {
  border-left-color: rgb(249 144 165 / 66%);
  background: rgb(225 113 163 / 11%);
}

@media (prefers-reduced-motion: no-preference) {
  #features .feature-demo :is(.feature-demo-tag, .feature-room-panel, .feature-message-embed, .ticket-progress span, .feature-xp-progress, #xp-value) {
    transition: border-color .24s ease, background-color .24s ease, color .24s ease, box-shadow .28s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  #features #xp-bar { transition: none; }
}

@media (min-width: 1440px) {
  #features {
    padding-top: 140px;
  }

  #features #studio {
    width: min(1224px, calc(100% - 96px));
  }

  #features .studio-head {
    margin-bottom: 64px;
  }

  #features .feature-scenes {
    gap: 150px;
  }

  #features .scene {
    gap: 96px;
  }

  #features .scene-copy h3 {
    font-size: clamp(2.25rem, 2.8vw, 3.125rem);
  }

  #features .scene-copy > p:not(.eyebrow) {
    max-width: 540px;
    font-size: 1.0625rem;
  }

  #features .scene-copy li {
    font-size: .96875rem;
  }

  #features .scene .feature-demo {
    zoom: 1.18;
  }
}

@media (min-width: 1800px) {
  #features #studio {
    width: min(1384px, calc(100% - 96px));
  }
}

@media (max-width: 780px) {
  #features {
    padding-block: 68px;
  }

  #features .studio-head {
    margin-bottom: 42px;
  }

  #features .feature-scenes {
    gap: 56px;
  }

  #features .scene,
  #features .scene:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    translate: none;
  }

  #features .scene-copy > p:not(.eyebrow) {
    max-width: none;
  }

  #features .scene .feature-demo {
    width: 100%;
    padding: 18px;
    rotate: none;
  }

  #features .scene:nth-child(even) .feature-demo {
    order: -1;
  }

  #features .feature-room-join small {
    display: none;
  }

  .reveal-ready #features .scene.visible .feature-demo {
    animation: none;
  }
}

@media (max-width: 420px) {
  #features .scene .feature-demo {
    padding: 16px;
  }

  #features .feature-room-members li {
    padding-left: 12px;
  }

  #features .feature-room-controls .stepper {
    margin-left: 0;
  }

  #features .feature-ticket-options,
  #features .feature-auto-options,
  #features .feature-ticket-stage:not([hidden]),
  #features .feature-creator-options {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #features .voice-demo.in-viewport:not(:hover, :focus-within) .feature-room-members li:nth-child(-n+2) .feature-room-avatar {
    animation: feature-voice-activity 3.4s ease infinite;
  }

  #features .voice-demo.in-viewport:not(:hover, :focus-within) .feature-room-members li:nth-child(2) .feature-room-avatar {
    animation-delay: -1.7s;
  }
}

@keyframes feature-voice-activity {
  0%, 35% { box-shadow: 0 0 0 2px #67b895, 0 0 10px rgb(91 176 138 / 46%); }
  51%, 100% { box-shadow: 0 0 0 2px transparent, 0 0 10px transparent; }
}


#features .feature-ticket-stage > .controls[hidden] {
  display: none;
}

#features .feature-ticket-confirm:not([hidden]) {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgb(234 143 177 / 25%);
  border-radius: 9px;
  background: rgb(159 74 120 / 10%);
}

#features .feature-ticket-confirm h4 {
  margin: 0;
  color: var(--preview-ink);
  font-size: .875rem;
  line-height: 1.35;
}

#features .feature-ticket-confirm p {
  color: var(--preview-muted);
  font-size: .75rem;
  line-height: 1.5;
}

#features .feature-ticket-confirm .controls {
  margin-top: 3px;
}

#features .feature-ticket-confirm #ticket-archive {
  border-color: rgb(241 139 174 / 42%);
  background: rgb(208 86 134 / 20%);
  color: #ffdaea;
}

#features .feature-ticket-confirm #ticket-archive:hover {
  border-color: rgb(241 139 174 / 64%);
  background: rgb(208 86 134 / 30%);
}

#responders .feature-auto-response {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

#responders .feature-auto-response > * {
  grid-area: 1 / 1;
}

#responders #responder-answer[hidden] {
  display: block;
  visibility: hidden;
}

#responders .feature-auto-typing:not([hidden]),
#responders .feature-auto-dots {
  display: inline-flex;
  align-items: center;
}

#responders .feature-auto-typing:not([hidden]) {
  align-self: start;
  gap: 8px;
  min-height: 20px;
  color: var(--preview-muted);
  font-size: .75rem;
}

#responders .feature-auto-dots {
  gap: 3px;
}

#responders .feature-auto-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d6b5f1;
}

@media (prefers-reduced-motion: no-preference) {
  #responders .feature-auto-typing:not([hidden]) .feature-auto-dots i {
    animation: feature-auto-typing .9s ease-in-out infinite;
  }

  #responders .feature-auto-dots i:nth-child(2) { animation-delay: .14s; }
  #responders .feature-auto-dots i:nth-child(3) { animation-delay: .28s; }
}

@keyframes feature-auto-typing {
  0%, 70%, 100% { opacity: .4; translate: 0 0; }
  34% { opacity: 1; translate: 0 -3px; }
}
