/* Stripe-style hero app window */
.app-window {
  display: flex;
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 50px 100px -20px rgba(50, 50, 93, 0.25),
    0 30px 60px -30px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(0,0,0, 0.05);
  width: 100%;
  max-width: 900px;
  height: 600px;
  margin: 0 auto;
  transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.app-window:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.app-sidebar {
  width: 280px;
  background: #faf9f6;
  border-right: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.app-main {
  flex: 1;
  position: relative;
  background: #e9ece5;
  overflow: hidden;
}

.app-chat-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: rgba(250,249,246,0.8);
  backdrop-filter: blur(10px);
}
.app-chat-header strong { font-size: 13px; font-weight: 600; display: block; color: var(--ink); }
.app-chat-header span { font-size: 11px; color: var(--muted); }
.chat-star { margin-left: auto; color: var(--green); }

.app-chat-messages {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.chat-msg {
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 90%;
  opacity: 0;
  transform: translateY(10px);
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideIn {
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.user {
  background: #e4e9df;
  color: var(--ink);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant {
  background: transparent;
  color: var(--ink);
  align-self: flex-start;
  padding-left: 0;
}
.chat-msg.assistant::before {
  content: '✦';
  display: block;
  color: var(--green);
  font-size: 16px;
  margin-bottom: 4px;
}

.app-composer {
  padding: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.send-arrow {
  width: 28px;
  height: 28px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: bold;
}

.app-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.app-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-img.visible { opacity: 1; }

.app-img-after-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.5s cubic-bezier(0.76, 0, 0.24, 1);
}
.app-img-after-layer.revealed {
  clip-path: inset(0 0 0 0);
}

.app-bento {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.1),
    inset 0 0 0 1px rgba(255,255,255,0.5);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-bento.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.bento-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.bento-header h3 { font-size: 14px; font-weight: 600; margin: 0; color: var(--ink); }
.bento-header span { font-size: 14px; font-weight: 700; color: var(--green); }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}
.bento-card {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s;
}
.bento-card:hover { transform: translateY(-2px); }
.bento-card img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  background: #f9f9f9;
  border-radius: 4px;
}
.bento-card strong { font-size: 11px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.bento-card span { font-size: 12px; font-weight: 700; }

@media(max-width:850px) {
  .app-window { flex-direction: column-reverse; height: auto; transform: none; }
  .app-window:hover { transform: none; }
  .app-sidebar { width: 100%; border-right: none; border-top: 1px solid rgba(0,0,0,0.06); }
  .app-chat-messages { max-height: 250px; }
  .app-stage { position: relative; padding-bottom: 100%; }
  .app-bento { left: 12px; right: 12px; bottom: 12px; padding: 12px; }
}
