* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: #140a0e;
  color: #f5e6e8;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(1.5rem, env(safe-area-inset-top))
    max(1.25rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(214, 61, 82, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(255, 159, 74, 0.12), transparent 55%),
    #140a0e;
}

.hero {
  width: min(100%, 520px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a0a8;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.emoji {
  font-size: 2.8rem;
  line-height: 1;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #ff6b7a, #ff9f4a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #e8c0c8;
}

.bullets {
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: #d8a8b0;
}

.bullets li::before {
  content: "· ";
  color: #ff8a9a;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: block;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #d63d52, #a82840);
  color: #fff;
  border: none;
}

.btn-secondary {
  background: transparent;
  color: #ffb8c4;
  border: 1px solid #6b3a45;
}

.fine {
  margin: 0;
  font-size: 0.75rem;
  color: #8a6068;
}

.fine-link {
  color: #9a7078;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fine-link:hover {
  color: #c9a0a8;
}

.chat-demo {
  margin: 0 0 1.1rem;
  text-align: left;
}

.chat-demo-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(214, 61, 82, 0.28);
  box-shadow:
    0 0 40px rgba(214, 61, 82, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.chat-demo-blur {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 70% 60% at 30% 20%, rgba(255, 107, 122, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(255, 159, 74, 0.1), transparent 50%);
  filter: blur(28px);
  opacity: 0.85;
  animation: demo-glow 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes demo-glow {
  from {
    opacity: 0.55;
    transform: scale(1);
  }
  to {
    opacity: 0.95;
    transform: scale(1.06);
  }
}

.chat-demo-inner {
  position: relative;
  min-height: 200px;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  background: rgba(26, 15, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.chat-demo-messages {
  flex: 1;
  overflow: hidden;
  padding: 0.85rem 0.9rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  mask-image: linear-gradient(180deg, transparent 0%, #000 8%, #000 88%, transparent 100%);
}

.demo-msg {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(8px);
  transition:
    opacity 0.55s ease,
    filter 0.65s ease,
    transform 0.55s ease;
}

.demo-msg.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.demo-who {
  font-weight: 600;
  margin-right: 0.3rem;
}

.demo-msg--assistant .demo-who {
  color: #ff8a9a;
}

.demo-msg--user .demo-who {
  color: #8ab4ff;
}

.demo-text {
  color: #e8c0c8;
}

.chat-demo-compose {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border-top: 1px solid rgba(107, 58, 69, 0.55);
  background: rgba(34, 15, 21, 0.9);
}

.chat-demo-compose-text {
  flex: 1;
  min-height: 1.2rem;
  font-size: 0.76rem;
  color: #fff5f7;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-demo-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  margin-left: 0.15rem;
}

.chat-demo-typing .dot {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: #ff8a9a;
  animation: demo-dot 1.1s ease-in-out infinite;
}

.chat-demo-typing .dot:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-demo-typing .dot:nth-child(3) {
  animation-delay: 0.3s;
}

.chat-demo-typing[data-mode="thinking"] .dot {
  background: #9a8088;
}

@keyframes demo-dot {
  0%,
  70%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.chat-demo-caption {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  color: #8a6068;
  text-align: center;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .page {
    min-height: 100dvh;
    place-items: center;
    padding: max(1rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
  }

  .emoji {
    font-size: 2.4rem;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .lead {
    font-size: 0.98rem;
    margin-bottom: 1rem;
  }

  .bullets {
    margin-bottom: 1.35rem;
    font-size: 0.9rem;
  }

  .btn {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
  }

  .chat-demo-inner {
    min-height: 185px;
    max-height: 200px;
  }

  .demo-msg {
    font-size: 0.74rem;
  }
}

@media (max-width: 360px) {
  .eyebrow {
    font-size: 0.72rem;
  }

  .lead {
    font-size: 0.92rem;
  }
}
