/* Software KVM glass card — native HTML/CSS rebuild of "Feature 4.svg".
 *
 * The visual is authored on the original 405 × 315 canvas. `--u` is one canvas
 * unit and scales with the card width (container query), so every number below
 * is the original SVG coordinate: `52em` on a box == x = 52 in the SVG.
 * Text is real Manrope text (not outlines), so copy can be edited freely.
 */

.kvm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 28rem;
  width: 100%;
  min-width: 0;
  padding-top: 3rem;
  overflow: clip;
  border: 1px solid #ffffff14;
  border-radius: var(--roundness--box-xl, 1.5rem);
  background: #ffffff0a;
  font-family: Manrope, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.kvm-card__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-inline: 2rem;
  text-align: center;
}

.kvm-card__title {
  margin: 0;
  color: transparent;
  background: linear-gradient(to right, #fff, #ffffffb3);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: var(--_typography---h4--font-size, 1.9375rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.03875rem;
}

.kvm-card__description {
  margin: 0;
  color: #c3c3c3;
  font-size: 1rem;
  line-height: 1.5;
}

/* ---- Visual ------------------------------------------------------------ */

.kvm-visual {
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 405 / 315;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 24px;
  /* Fade in at the top, slight fade out at the bottom (original mask). */
  -webkit-mask-image: linear-gradient(to bottom, #d9d9d900 0, #d9d9d9 15.8654%, #d9d9d9 85.5769%, #73737333 100%);
          mask-image: linear-gradient(to bottom, #d9d9d900 0, #d9d9d9 15.8654%, #d9d9d9 85.5769%, #73737333 100%);
}

.kvm-stage {
  --u: calc(100cqw / 405);
  position: absolute;
  inset: 0;
  font-size: var(--u);          /* 1em == 1 canvas unit inside the stage */
  font-weight: 400;
  letter-spacing: 0;
  font-kerning: normal;
}

/* Blurred code sitting behind everything. */
.kvm-code {
  position: absolute;
  left: calc(62 * var(--u));
  top: 0;
  margin: 0;
  color: #808080;
  font: inherit;
  font-size: calc(13 * var(--u));
  line-height: calc(21 * var(--u));
  white-space: pre;
  filter: blur(calc(2 * var(--u)));
}

/* ---- Prompt box -------------------------------------------------------- */

.kvm-prompt {
  position: absolute;
  left: 32em;
  top: 144em;
  width: 433em;                 /* runs past the right edge; clipped by the card */
  height: 128em;
  border-radius: 16em;
  background: #080808;
}

/* Glass fill + hairline border sit 1 unit above the opaque base, as in the SVG. */
.kvm-prompt::before,
.kvm-prompt::after {
  content: "";
  position: absolute;
  inset: -1em 0 auto 0;
  box-sizing: border-box;
  height: 128em;
  border-radius: 16em;
  pointer-events: none;
}

.kvm-prompt::before {
  inset: -.5em .5em auto .5em;   /* the fill is the stroke's centre line: .5 inside the border */
  height: 127em;
  border-radius: 15.5em;
  background: linear-gradient(#ffffff1a -.5em, #ffffff0a 127.5em);
}

.kvm-prompt::after {
  padding: 1em;
  background: linear-gradient(70.5066deg, #ffffff1f -2.67em, #ffffff08 193.27em, #ffffff05 324.15em, #ffffff1f 400.92em);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.kvm-prompt__placeholder {
  position: absolute;
  left: calc(20 * var(--u));
  top: calc(35 * var(--u));
  margin: 0;
  color: #808080;
  font-size: calc(16 * var(--u));
  line-height: calc(20 * var(--u));
  white-space: nowrap;
}

.kvm-prompt__icon {
  position: absolute;
  top: 91em;
  width: 16em;
  height: 16em;
  opacity: .44;
  overflow: visible;
}

.kvm-prompt__icon--attach { left: 20em; }
.kvm-prompt__icon--mic { left: 42em; }

/* ---- Model menu -------------------------------------------------------- */

.kvm-menu {
  position: absolute;
  left: 52em;
  top: 52em;
  box-sizing: border-box;
  width: 149em;
  height: 116em;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1em solid #ffffff14;
  border-radius: 8em;
  background: linear-gradient(#ffffff1a, #ffffff0a), #080808;
  background-origin: border-box;
}

.kvm-menu__item {
  position: absolute;
  left: 5em;                    /* 58 - 52 - border */
  width: 137em;
  height: 21em;
  padding-left: 8em;
  box-sizing: border-box;
  border-radius: 8em;
  color: #bfbfbf;
  line-height: 21em;
  white-space: nowrap;
}

.kvm-menu__item > span { position: relative; top: -.05em; font-size: 10em; }

.kvm-menu__item:nth-child(1) { top: 8.5em; }
.kvm-menu__item:nth-child(2) { top: 28.5em; }
.kvm-menu__item:nth-child(3) { top: 48.5em; }
.kvm-menu__item:nth-child(4) { top: 68.5em; }
.kvm-menu__item:nth-child(5) { top: 88.5em; }

.kvm-menu__item.is-active {
  background: #ffffff05;
  color: #fff;
}

.kvm-menu__chevron {
  position: absolute;
  left: 131em;
  top: 96.5em;
  width: 6em;
  height: 3em;
  overflow: visible;
}

/* ---- Cursor ------------------------------------------------------------ */

.kvm-cursor {
  position: absolute;
  left: 133em;
  top: 100em;
  width: 16em;
  height: 16em;
  overflow: visible;
}
