:root {
  --black: #000000;
  --white: #ffffff;
  --agent: #efeff2;
  --agent-text: #080808;
  --blue-top: #5d95ff;
  --blue-bottom: #3c79f4;
  --caption: rgba(255, 255, 255, 0.56);
  --glass: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  --footer-progress: 0;
  --footer-y: 42px;
}

body {
  margin: 0;
  min-height: 142vh;
  min-height: 142svh;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  letter-spacing: 0;
  overflow-x: hidden;
}

.app-shell {
  position: sticky;
  top: 0;
  width: min(1600px, 100%);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 28px 34px 46px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.access-trigger {
  position: absolute;
  top: 26px;
  right: 34px;
  z-index: 3;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.055) 46%, rgba(255, 255, 255, 0.12)),
    color-mix(in srgb, var(--glass) 100%, transparent);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.13),
    inset 1.5px 2px 0 -1px rgba(255, 255, 255, 0.28),
    inset -1px -3px 2px -2px rgba(0, 0, 0, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.3);
  transition:
    transform 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.access-trigger:hover,
.access-trigger:focus-visible {
  transform: translateY(-1px);
  color: var(--white);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 1.5px 2px 0 -1px rgba(255, 255, 255, 0.34),
    inset -1px -3px 2px -2px rgba(0, 0, 0, 0.55),
    0 14px 30px rgba(0, 0, 0, 0.34),
    0 0 26px rgba(93, 149, 255, 0.1);
}

.access-trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 4px;
}

.access-dialog {
  width: min(470px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 0;
  color: var(--white);
  background: transparent;
  overflow: visible;
}

.access-dialog:not([open]) {
  display: none;
}

.access-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 32%, rgba(93, 149, 255, 0.18), rgba(93, 149, 255, 0) 28%),
    rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.access-form {
  position: relative;
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  overflow: visible;
  isolation: isolate;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.055) 42%, rgba(255, 255, 255, 0.12)),
    color-mix(in srgb, var(--glass) 96%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 1.8px 2.5px 0 -1.5px rgba(255, 255, 255, 0.34),
    inset -2px -7px 3px -6px rgba(255, 255, 255, 0.18),
    inset -1px -3px 2px -2px rgba(0, 0, 0, 0.56),
    0 18px 40px rgba(0, 0, 0, 0.34),
    0 10px 24px rgba(0, 0, 0, 0.3);
  animation: accessRise 320ms cubic-bezier(0.19, 1, 0.22, 1) both;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.access-form::before,
.access-form::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.access-form::before {
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 16% 10%, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  opacity: 0.72;
}

.access-form::after {
  top: 9px;
  left: 18px;
  width: 44%;
  height: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  filter: blur(0.4px);
  opacity: 0.6;
}

.access-form:focus-within,
.access-form:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 1.8px 2.5px 0 -1.5px rgba(255, 255, 255, 0.42),
    inset -2px -7px 3px -6px rgba(255, 255, 255, 0.22),
    inset -1px -3px 2px -2px rgba(0, 0, 0, 0.6),
    0 22px 48px rgba(0, 0, 0, 0.4),
    0 0 34px rgba(93, 149, 255, 0.12);
}

.access-form input,
.access-form button[type="submit"] {
  min-width: 0;
  height: 44px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  letter-spacing: 0;
}

.access-form input {
  width: 100%;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(0, 0, 0, 0.12);
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 2px 9px rgba(0, 0, 0, 0.18);
}

.access-form input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.access-form input:focus {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 2px 9px rgba(0, 0, 0, 0.2);
}

.access-form button[type="submit"] {
  padding: 0 24px;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, var(--blue-top) 0%, var(--blue-bottom) 100%);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1;
  text-transform: lowercase;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -8px 16px rgba(20, 65, 170, 0.26),
    0 8px 18px rgba(36, 105, 240, 0.26);
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.access-form button[type="submit"]:hover {
  filter: brightness(1.05);
}

.access-form button[type="submit"]:active {
  transform: translateY(1px);
}

.access-form button[type="submit"]:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.74);
  outline-offset: 2px;
}

.access-close {
  position: absolute;
  top: -16px;
  right: -4px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: none;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

.access-dialog[open] .access-close {
  display: grid;
}

.access-close:hover,
.access-close:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.access-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.access-form input:-webkit-autofill,
.access-form input:-webkit-autofill:hover,
.access-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--white);
  transition: background-color 9999s ease-out;
  caret-color: var(--white);
}

.brand-stack {
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.brand-mark {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #706a93 0%, #524b78 46%, #2f2a4e 100%);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -14px 24px rgba(19, 15, 37, 0.34),
    0 18px 40px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-mark::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  content: "";
}

.brand-mark::after {
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  content: "";
}

.brand-initial {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-size: 2.8rem;
  font-weight: 720;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.brand-chip {
  padding: 8px 16px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.94);
  background: color-mix(in srgb, var(--glass) 100%, transparent);
  font-size: 0.88rem;
  font-weight: 650;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 1.5px 2px 0 -1px rgba(255, 255, 255, 0.24),
    inset -1px -3px 2px -2px rgba(0, 0, 0, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.24);
}

.demo-thread {
  display: grid;
  align-content: center;
  gap: 14px;
  width: 100%;
  padding: 34px 0 20px;
}

.message-row {
  width: 100%;
}

.message-row.left {
  justify-content: flex-start;
}

.message-row.right {
  justify-content: flex-end;
}

.message-row[hidden] {
  display: none !important;
}

.message-row.is-visible {
  display: flex;
}

.message {
  max-width: min(760px, 84vw);
  padding: 22px 40px;
  border-radius: 40px;
  box-shadow: var(--shadow);
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1.42;
  animation: bubblePop 520ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.agent {
  background: var(--agent);
  color: var(--agent-text);
}

.user {
  background: linear-gradient(180deg, var(--blue-top) 0%, var(--blue-bottom) 100%);
  color: var(--white);
}

.pay {
  width: fit-content;
  display: grid;
  gap: 8px;
  background: var(--agent);
  color: var(--agent-text);
}

.pay-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  opacity: 0.56;
}

.pay strong {
  font-size: 1rem;
  line-height: 1.32;
}

.typing-bubble {
  width: 136px;
  min-height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
}

.typing-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(132, 132, 132, 0.9);
  animation: typingPulse 1.05s infinite ease-in-out;
}

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

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

.demo-caption {
  margin: 0;
  padding-top: 14px;
  text-align: center;
  color: var(--caption);
  font-size: 0.98rem;
}

.scroll-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  min-height: clamp(260px, 38vh, 430px);
  display: flex;
  align-items: flex-end;
  opacity: var(--footer-progress);
  pointer-events: none;
  transform: translate3d(0, var(--footer-y), 0);
  transition:
    opacity 120ms linear,
    transform 120ms linear;
}

.scroll-footer::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.46) 14%,
      rgba(0, 0, 0, 0.92) 34%,
      rgba(0, 0, 0, 0.99) 64%,
      #000000 100%
    );
  content: "";
}

.scroll-footer__inner {
  position: relative;
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 0 34px 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.scroll-footer__brand {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  font-weight: 760;
  line-height: 0.92;
}

.scroll-footer__line {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.95rem;
  font-weight: 620;
}

.scroll-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px 28px;
}

.scroll-footer__links a {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
  font-weight: 620;
  text-decoration: none;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.scroll-footer__links a:hover {
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

body.is-footer-visible .scroll-footer {
  pointer-events: auto;
}

@keyframes bubblePop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    filter: blur(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes typingPulse {
  0%,
  80%,
  100% {
    opacity: 0.34;
    transform: translateY(0) scale(0.9);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px) scale(1);
  }
}

@keyframes accessRise {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    filter: blur(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 980px) {
  .message {
    max-width: min(640px, 86vw);
    font-size: 1.02rem;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 20px 16px 34px;
  }

  .access-trigger {
    top: 18px;
    right: 16px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.84rem;
  }

  .access-form {
    min-height: 54px;
    gap: 6px;
    padding: 6px;
  }

  .access-form input,
  .access-form button[type="submit"] {
    height: 42px;
  }

  .access-form input {
    padding: 0 14px;
    font-size: 0.9rem;
  }

  .access-form button[type="submit"] {
    padding: 0 18px;
    font-size: 0.84rem;
  }

  .brand-mark {
    width: 82px;
    height: 82px;
  }

  .brand-initial {
    font-size: 2.3rem;
  }

  .brand-chip {
    padding: 7px 13px 9px;
    font-size: 0.8rem;
  }

  .demo-thread {
    padding-top: 26px;
    gap: 12px;
  }

  .message {
    max-width: 100%;
    padding: 18px 22px;
    border-radius: 30px;
    font-size: 0.92rem;
  }

  .typing-bubble {
    width: 116px;
    min-height: 60px;
    gap: 10px;
  }

  .typing-dot {
    width: 11px;
    height: 11px;
  }

  .demo-caption {
    font-size: 0.9rem;
  }

  .scroll-footer {
    min-height: 330px;
  }

  .scroll-footer__inner {
    padding: 0 16px 30px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .scroll-footer__brand {
    font-size: clamp(3rem, 18vw, 4.8rem);
  }

  .scroll-footer__line {
    margin-top: 14px;
  }

  .scroll-footer__links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-footer__links a:hover {
    transform: none;
  }
}
