:root {
  --ink: #07131f;
  --ink-2: #0d2236;
  --mist: #c9e8e0;
  --foam: #eef8f5;
  --teal: #1ad4b0;
  --teal-deep: #0f9f86;
  --coral: #ff6b4a;
  --amber: #f0b429;
  --line: rgba(201, 232, 224, 0.16);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--foam);
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(26, 212, 176, 0.18), transparent 55%),
    radial-gradient(900px 600px at -10% 80%, rgba(255, 107, 74, 0.12), transparent 50%),
    linear-gradient(165deg, #041018 0%, var(--ink) 45%, #0a1c2e 100%);
  overflow-x: hidden;
}

#orb {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.top,
main,
.bot-shell {
  position: relative;
  z-index: 2;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--foam);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

nav a {
  color: var(--mist);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.hero {
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 4rem;
  max-width: 760px;
  animation: rise 1s ease both;
}

.brand-mark {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: linear-gradient(120deg, var(--foam) 20%, var(--teal) 70%, #7cf0d8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 38ch;
  color: var(--mist);
  font-size: 1.08rem;
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
  align-items: center;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #042019;
  box-shadow: 0 10px 30px rgba(26, 212, 176, 0.28);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(26, 212, 176, 0.38);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--foam);
  border: 1px solid var(--line);
}

.btn.text {
  background: transparent;
  color: var(--mist);
  padding-inline: 0.4rem;
}

.btn.compact {
  padding: 0.75rem 1.1rem;
  border-radius: 14px;
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 clamp(1.25rem, 4vw, 3rem) 4rem;
  border: 1px solid var(--line);
  background: var(--line);
  backdrop-filter: blur(16px);
}

.step {
  background: rgba(7, 19, 31, 0.72);
  padding: 1.4rem 1.35rem;
}

.step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--teal);
  margin-bottom: 0.45rem;
}

.step p {
  margin: 0;
  color: var(--mist);
  line-height: 1.45;
  font-size: 0.98rem;
}

.bot-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: end;
  padding: 1rem;
  background: rgba(2, 8, 14, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.bot-shell.open {
  opacity: 1;
  pointer-events: auto;
}

.bot-panel {
  width: min(420px, 100%);
  height: min(680px, calc(100vh - 2rem));
  background: linear-gradient(180deg, rgba(13, 34, 54, 0.96), rgba(7, 19, 31, 0.98));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bot-shell.open .bot-panel {
  transform: translateY(0) scale(1);
}

.bot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.bot-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.bot-status {
  margin: 0.2rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--teal);
  font-size: 0.82rem;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(26, 212, 176, 0.7);
  animation: pulse 1.8s infinite;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--foam);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.bot-stream {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.msg {
  max-width: 92%;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  line-height: 1.45;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(26, 212, 176, 0.28), rgba(15, 159, 134, 0.35));
  border: 1px solid rgba(26, 212, 176, 0.35);
}

.msg.result {
  border-color: rgba(26, 212, 176, 0.35);
  background:
    linear-gradient(145deg, rgba(26, 212, 176, 0.12), rgba(255, 255, 255, 0.04));
}

.msg .amt {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--teal);
}

.msg .amt.debt {
  color: var(--coral);
}

.msg .meta {
  display: block;
  margin-top: 0.55rem;
  color: var(--mist);
  font-size: 0.86rem;
}

.typing {
  display: inline-flex;
  gap: 4px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mist);
  animation: blink 1.1s infinite ease-in-out;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

.bot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  padding: 0.85rem;
  border-top: 1px solid var(--line);
}

.bot-form input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--foam);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  font: inherit;
  outline: none;
}

.bot-form input:focus {
  border-color: rgba(26, 212, 176, 0.55);
  box-shadow: 0 0 0 3px rgba(26, 212, 176, 0.15);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 212, 176, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(26, 212, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 212, 176, 0); }
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 800px) {
  .strip {
    grid-template-columns: 1fr;
  }

  nav a:first-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
