:root {
  --font-display: "Nunito Sans", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Avenir Next", "Trebuchet MS", sans-serif;
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --line: rgba(17, 24, 39, 0.1);
  --line-strong: rgba(17, 24, 39, 0.16);
  --ink: #121826;
  --muted: #667085;
  --brand: #2563eb;
  --brand-soft: rgba(37, 99, 235, 0.1);
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.05);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.04), transparent 35%),
    linear-gradient(180deg, #f8fafc 0%, #f4f6fb 100%);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 32px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: 164px;
  height: auto;
}

.header-note {
  color: var(--muted);
  font-size: 0.98rem;
}

.hero {
  display: grid;
  gap: 34px;
  justify-items: center;
  text-align: center;
}

.hero-copy {
  max-width: 900px;
  display: grid;
  gap: 14px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.8vw, 3rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.35vw, 1.06rem);
  line-height: 1.65;
}

.chat-stage {
  width: min(760px, 100%);
  display: grid;
  gap: 24px;
}

.prompt-shell,
.chat-bubble,
.notify-form,
.footer-panel,
.choice-group {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.prompt-shell {
  position: relative;
  padding: 24px 88px 24px 24px;
  border-radius: var(--radius-xl);
  text-align: left;
}

.prompt-shell textarea {
  width: 100%;
  min-height: 122px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.7;
  outline: none;
}

.prompt-shell textarea::placeholder,
.notify-form input::placeholder {
  color: #98a2b3;
}

.send-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.send-icon {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

.send-button:hover,
.send-button:focus-visible,
.notify-form button:hover,
.notify-form button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(17, 24, 39, 0.2);
}

.send-button:focus-visible,
.notify-form input:focus-visible,
.choice-card:focus-within,
.footer-panel summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

.prompt-shell textarea:focus,
.prompt-shell textarea:focus-visible {
  outline: none;
  box-shadow: none;
}

.chat-timeline {
  display: grid;
  gap: 16px;
}

.chat-row {
  display: flex;
}

.chat-row.user {
  justify-content: flex-end;
}

.chat-row.assistant {
  justify-content: flex-start;
}

.chat-bubble {
  width: min(100%, 680px);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  text-align: left;
}

.chat-row.user .chat-bubble {
  background: #eef4ff;
  border-color: rgba(37, 99, 235, 0.16);
}

.chat-bubble-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.chat-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand);
  flex: 0 0 auto;
}

.chat-bubble-header strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
}

.chat-bubble p {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.75;
  white-space: pre-wrap;
  min-height: 1.75em;
}

.chat-bubble.assistant.is-empty {
  display: none;
}

.chat-bubble.assistant.is-empty.is-visible {
  display: block;
}

.chat-bubble.typing p::after {
  content: "";
  display: inline-block;
  width: 0.65ch;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.14em;
  border-radius: 2px;
  background: rgba(17, 17, 17, 0.82);
  animation: caret-blink 0.85s steps(1) infinite;
}

.followup-section {
  display: grid;
  gap: 16px;
  text-align: left;
}

.followup-section.is-hidden {
  display: none;
}

.fade-in {
  animation: rise-in 0.36s ease forwards;
}

.choice-group {
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  display: grid;
  gap: 10px;
}

.choice-group legend {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--surface-strong);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.choice-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.choice-card input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.notify-form {
  padding: 14px;
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.notify-form.is-disabled {
  opacity: 0.72;
}

.notify-form input[type="email"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 56px;
  padding: 0 18px;
  background: var(--surface-strong);
  color: var(--ink);
}

.notify-form button {
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  padding: 0 22px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.notify-form button:disabled,
.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.form-status {
  margin: 0;
  min-height: 1.5em;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-status.is-error {
  color: #b42318;
}

.form-status.is-success {
  color: #027a48;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-panel {
  width: min(100%, 360px);
  border-radius: 18px;
  overflow: hidden;
}

.footer-panel summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

.footer-panel summary::-webkit-details-marker {
  display: none;
}

.footer-copy {
  padding: 0 18px 18px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.96rem;
}

.footer-copy p {
  margin: 0 0 12px;
}

@keyframes caret-blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 24px, 100%);
    padding-top: 18px;
  }

  .site-header {
    margin-bottom: 34px;
  }

  .brand-logo {
    width: 142px;
  }

  .prompt-shell {
    padding: 18px 18px 86px;
  }

  .send-button {
    right: 16px;
    bottom: 16px;
  }

  .chat-bubble {
    width: 100%;
  }

  .notify-form {
    grid-template-columns: 1fr;
  }

  .notify-form button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
