/* 'Piper runs on Claude, ChatGPT or your own API key': the Mac with Piper
 * and your files, and the bar that switches the AI underneath. */

.aiw {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 72px;
  align-items: center;
}
.aiw__t h2 {
  margin: 0;
}
.aiw__t .lead {
  max-width: 30em;
}
.aiv__mark {
  width: 30px;
  height: 30px;
}
#anyai .aiw {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
}
#anyai .aiw__t .lead {
  text-wrap: balance;
}
.kc__top {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}
.kc__top b {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.stk__tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stk__tiles span {
  font-size: 14.5px !important;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px 10px 11px;
  white-space: nowrap;
  border-radius: 12px;
  background: var(--bone);
  border: 1px solid var(--rule-soft);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
.stk__tiles svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.stk__o:hover {
  color: var(--dark-ink);
}
.stk__o.on img,
.stk__o.on svg,
.stk__o:hover img,
.stk__o:hover svg {
  opacity: 1;
}
.stk {
  max-width: 100%;
  justify-self: end;
  width: 580px;
}
.mac2 {
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: 0 26px 52px -34px rgb(var(--shadow) / 0.55);
  overflow: hidden;
}
.mac2__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--bone);
}
.mac2__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rule);
}
.mac2__bar span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.mac2__bar svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.mac2__in {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 34px minmax(0, 1fr);
  align-items: center;
  padding: 18px;
}
.mac2__piper .kc__top {
  margin-bottom: 12px;
}
.mac2__piper .stk__tiles span {
  font-size: 13.5px !important;
  padding: 8px 11px 8px 9px;
  background: var(--surface);
}
.mac2__piper .stk__tiles svg {
  width: 17px;
  height: 17px;
}
.mac2__link {
  display: grid;
  place-items: center;
  color: var(--accent);
}
.mac2__link svg {
  width: 20px;
  height: 20px;
}
.mac2__files {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bone);
  border: 1px solid var(--rule-soft);
}
.mac2__h {
  margin: 0 0 3px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.mac2__files span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}
.mac2__files img {
  width: 18px;
  height: 18px;
}
.mac2__wire {
  position: relative;
  height: 34px;
}
.mac2__wire i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(18px + (100% - 36px - 34px) * 1.35 / 2.35 / 2);
  border-left: 2px dashed color-mix(in srgb, var(--accent) 60%, var(--rule));
  animation: wireflow 1.2s linear infinite;
}
.stk__base {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 20px;
  border-radius: 16px;
  background: var(--surface) !important;
  border: 1px solid var(--rule);
  box-shadow: 0 14px 30px -24px rgb(var(--shadow) / 0.5) !important;
}
.stk__lab {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted) !important;
}
.stk__o {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 8px;
  white-space: nowrap;
  border: 0;
  border-radius: 11px;
  background: transparent;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-2) !important;
  font-size: 15px !important;
  transition:
    background 0.35s,
    box-shadow 0.35s,
    color 0.35s !important;
  position: relative;
  z-index: 1;
}
.stk__o img[src*='openai'] {
  filter: none !important;
}
.stk__opts {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  position: relative;
}
.stk__o.on {
  color: var(--ink) !important;
  background: transparent !important;
  box-shadow: none !important;
}
.stk__pill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent);
  transition:
    left 0.55s cubic-bezier(0.65, 0, 0.25, 1),
    width 0.55s cubic-bezier(0.65, 0, 0.25, 1);
}
.stk__o img,
.stk__o svg {
  width: 19px;
  height: 19px;
  object-fit: contain;
  opacity: 1 !important;
  color: var(--accent) !important;
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) !important;
}
.stk__o.on img,
.stk__o.on svg {
  transform: scale(1.15);
}
.mac2__wire b {
  position: absolute;
  left: calc(18px + (100% - 36px - 34px) * 1.35 / 2.35 / 2 - 4px);
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 3px color-mix(in srgb, var(--accent) 45%, transparent);
  opacity: 0;
}
.mac2__wire b.go {
  animation: pulseup 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.mac2__piper {
  padding: 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--rule));
  transition: box-shadow 0.5s;
}
.mac2__piper.glint {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent),
    0 0 26px -6px color-mix(in srgb, var(--accent) 45%, transparent);
}
@keyframes wireflow {
  from {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
  to {
    opacity: 0.55;
  }
}
@keyframes pulseup {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-34px);
  }
}
@media (max-width: 900px) {
  .aiw,
  #anyai .aiw {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .stk {
    width: 100%;
    justify-self: stretch;
  }
}
@media (max-width: 680px) {
  .mac2__in {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
    gap: 0;
  }
  .mac2__link {
    height: 34px;
    rotate: 90deg;
    order: -1;
  }
  .mac2__files {
    order: -2;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .mac2__h {
    flex-basis: 100%;
  }
  .mac2__wire i,
  .mac2__wire b {
    left: 50%;
  }
  .stk__tiles span {
    font-size: 13px !important;
    padding: 7px 10px 7px 8px;
  }
  .stk__base {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px !important;
  }
  .stk__lab {
    text-align: center;
  }
  .stk__o {
    font-size: 13.5px !important;
    padding: 10px 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mac2__wire i {
    animation: none;
  }
  .stk__pill {
    transition: none;
  }
  .mac2__wire b.go {
    animation: none;
  }
}
