@media (width > 1100px) {
  .markdown-section .hero {
    margin: 10vh 0 0 !important;
    min-height: 500px;

    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    animation: show-hero 0.8s ease-out;
    perspective: 1200px;
  }

  .markdown-section .hero h1 {
    margin-top: 5vh !important;
    font-size: 3.75rem !important;
    font-weight: 600;
  }

  .markdown-section .hero h1 a:after {
    display: none !important;
  }
}

.mockup {
  padding: 1.5rem;
  margin: -1rem -2.5rem 0 0;

  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  border-radius: 1rem;
  max-width: 440px;
  min-height: 400px;
  width: min(700px, 100%);
  height: auto;
  background: color-mix(in srgb, var(--bg) 10%, var(--bg));

  transform: rotateY(-15deg) rotateX(1.5deg) rotate(0.5deg) scale(1) !important;
  transform-origin: right top;
  background: linear-gradient(
    165deg,
    var(--bg) 0,
    color-mix(in srgb, var(--bg) 50%, var(--gray-100)) 60%
  );
  border: 1px solid var(--gray-300);

  -webkit-mask-image: linear-gradient(
    280deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 1) 30%
  );
  mask-image: linear-gradient(
    280deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 1) 30%
  );

  opacity: 0;
  animation: fade-in 0.8s ease-out forwards;
  animation-delay: 0.4s;
}

[data-theme="dark"] .mockup {
  border: 1px solid transparent;
  background:
    linear-gradient(
        175deg,
        color-mix(in srgb, var(--gray-200) 20%, var(--gray-100)),
        var(--gray-100) 40%
      )
      padding-box,
    linear-gradient(
        160deg,
        var(--color-surface-purple),
        var(--gray-200),
        var(--color-surface-purple)
      )
      border-box;
}

[data-theme="dark"] .mockup .input-area {
  box-shadow: none;
  border: 1px solid var(--light-border);
  background: color-mix(in srgb, var(--gray-950) 15%, var(--gray-100));
}

[data-theme="dark"] .mockup .icon {
  filter: invert(1);
}

@media (width <= 1100px) {
  .mockup {
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin: 2rem -0.5rem;
    width: calc(100% + 1rem);
    display: none;
  }
}

.mockup .chat-name {
  font-weight: 600;
  font-size: 1.1em;
  margin: 0 0 1.25rem;
  text-align: center;
}

.mockup .chat-info {
  font-size: 0.8em;
  opacity: 0.7;
  text-align: center;
  margin: 0.5rem 0 -0.25rem;
  display: block;

  @media (width <= 768px) {
    font-size: 0.7em;
  }
}

.mockup .chat {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2rem;
  flex: 1;

  &:empty {
    display: none;
  }
}

.mockup .spacer {
  flex: 1;
}

/* Typing indicator */
.mockup .mockup-typing {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.mockup .mockup-typing.visible {
  opacity: 1;
}

.mockup .mockup-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-600);
  animation: mockup-dot-bounce 1.4s infinite ease-in-out both;
}

.mockup .mockup-typing span:nth-child(1) { animation-delay: 0s; }
.mockup .mockup-typing span:nth-child(2) { animation-delay: 0.16s; }
.mockup .mockup-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes mockup-dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Bot message in mockup */
.mockup .message.assistant {
  font-size: 0.85em;
  line-height: 1.5;
}

.mockup .input-area {
  border-radius: 99rem;
  background: var(--bg);
  box-shadow:
    rgba(0, 0, 0, 0.04) 0px 3px 6px 0px,
    rgba(0, 0, 0, 0.04) 0px 4px 40px 4px,
    rgba(0, 0, 0, 0.62) 0px 0px 1px 0px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

.mockup .fake-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mockup .fake-input-text {
  display: flex;
  align-items: center;
  gap: 3px;
}

.mockup .text {
  color: var(--gray-950);
}

.mockup .message.user {
  align-self: flex-end;
  background: var(--gray-200);
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-left: auto;
}

.mockup .cursor {
  display: inline-block;
  width: 1px;
  height: 1.1rem;
  margin-top: -1px;
  background: var(--gray-700);
  animation: blink-cursor 1.2s infinite;
}

.mockup:has(.submit[data-state="loading"]) .cursor {
  display: none !important;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: calc(var(--text-length, 20) * 1ch);
  }
}
.mockup:not(:has(.submit[data-state="loading"])) .text:not(:empty) {
  overflow: hidden;
  white-space: nowrap;
  animation: typing 0.5s steps(var(--text-length, 20), end);
}

.mockup .submit {
  background-color: var(--gray-950);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  margin: -0.25rem -0.35rem -0.25rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s ease-out;

  &:hover {
    background-color: var(--gray-800);
    cursor: pointer;
    transform: scale(1.05);
  }

  &[data-state="loading"] {
    pointer-events: none;
  }
}

.mockup .icon {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-size: 18px 18px;
  width: 18px;
  height: 18px;
}

.mockup .icon-plus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E");
}

.mockup .icon-arrow-up {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3Cpath d='M12 19V5'/%3E%3C/svg%3E");
}

@keyframes blink-cursor {
  0% {
    opacity: 0.3;
  }

  49% {
    opacity: 0.3;
  }
  50% {
    opacity: 0;
  }
  99% {
    opacity: 0;
  }
  100% {
    opacity: 0.3;
  }
}

@keyframes show-user-message {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-scale-in {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes show-assistant-message {
  0% {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-900);
  }

  50% {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: scale(1.3);
  }

  99% {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: scale(1);
    background: var(--gray-900);
  }
  99.1% {
    background: transparent;
  }
  100% {
    height: auto;
    width: auto;
    border-radius: 0;
    background: transparent;
    margin-top: 0;
  }
}

@keyframes show-hero {
  0% {
    transform: translateY(0.15rem);
    opacity: 0;
    filter: blur(2px);
  }
  100% {
    transform: none;
    opacity: 1;
    filter: none;
  }
}
