:root {
  --bg: #000000;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --surface-elevated: #1f1f1f;
  --border: #2e2e2e;
  --text: #f5f5f5;
  --muted: #737373;
  --accent: #dc2626;
  --accent-hover: #ef4444;
  --accent-muted: rgba(220, 38, 38, 0.12);
  --accent-glow: rgba(220, 38, 38, 0.35);
  --ok: #22c55e;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 1120px;
  --nav-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(ellipse 120% 80% at 70% -20%, rgba(220, 38, 38, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 10% 100%, rgba(220, 38, 38, 0.04) 0%, transparent 50%),
    var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Nav */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-height);
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
}

.site-nav.is-scrolled {
  background: rgba(0, 0, 0, 0.85);
  border-color: var(--border);
  backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 1rem;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.btn-lg {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  padding: calc(var(--nav-height) + 4rem) 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/dashboard/assets/grid-tile.svg');
  background-size: 56px 56px;
  opacity: 0.55;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.eyebrow-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  line-height: 1.2;
}

.eyebrow-label {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-vertical-wrap {
  display: inline-block;
  vertical-align: bottom;
  white-space: nowrap;
}

.hero-vertical {
  display: inline-block;
  color: var(--accent);
  font-style: normal;
  transition: opacity 0.35s ease;
}

.hero-vertical.is-changing {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-vertical {
    transition: none;
  }
}

.hero-lead {
  font-size: 1.15rem;
  color: #a3a3a3;
  max-width: 34rem;
  margin: 0 0 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.hero-voice-sample-note {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-voice-sample {
  position: relative;
  min-width: 12.5rem;
}

.hero-voice-sample.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

.hero-voice-sample.is-playing {
  border-color: rgba(220, 38, 38, 0.45);
  color: #fca5a5;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.12);
}

.hero-voice-sample-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.hero-voice-sample-bars span {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 999px;
  background: currentColor;
  transform-origin: bottom;
  animation: voice-bar 0.9s ease-in-out infinite;
}

.hero-voice-sample-bars span:nth-child(2) {
  animation-delay: 0.15s;
}

.hero-voice-sample-bars span:nth-child(3) {
  animation-delay: 0.3s;
}

.hero-voice-sample-bars span:nth-child(4) {
  animation-delay: 0.45s;
}

@keyframes voice-bar {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-voice-sample-bars span {
    animation: none;
    transform: scaleY(0.65);
  }
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-trust span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-trust svg {
  color: var(--ok);
  flex-shrink: 0;
}

/* Dashboard mock */
.hero-visual {
  position: relative;
}

.mock-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(220, 38, 38, 0.08);
}

.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #404040;
}

.mock-dot:nth-child(1) {
  background: #ef4444;
}
.mock-dot:nth-child(2) {
  background: #f59e0b;
}
.mock-dot:nth-child(3) {
  background: #22c55e;
}

.mock-title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.mock-body {
  padding: 1.25rem;
}

.mock-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mock-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
}

.mock-stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.mock-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
}

.mock-stat-value.accent {
  color: var(--accent);
}

.mock-call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}

.mock-call:last-child {
  margin-bottom: 0;
}

.mock-call-name {
  font-weight: 600;
}

.mock-call-meta {
  color: var(--muted);
  font-size: 0.75rem;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.pill-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.mock-glow {
  position: absolute;
  inset: 20% -10% -10% -10%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.15) 0%, transparent 65%);
  pointer-events: none;
  z-index: -1;
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  font-weight: 800;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* Problem */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.problem-card:hover {
  border-color: rgba(220, 38, 38, 0.35);
}

.problem-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.problem-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.problem-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(220, 38, 38, 0.3);
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-card ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.feature-card li {
  margin-bottom: 0.25rem;
}

/* Agent types */
.agents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.agent-card {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

.agent-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.agent-card h3 {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
}

.agent-card p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.agent-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #a3a3a3;
  font-size: 0.9rem;
}

/* Agency band */
.agency-band {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.agency-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.agency-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.agency-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  color: #a3a3a3;
  font-size: 0.95rem;
}

.agency-list li:last-child {
  border-bottom: none;
}

.agency-list li::before {
  content: '✓';
  color: var(--ok);
  font-weight: 700;
  flex-shrink: 0;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.audience-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.audience-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.audience-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Compare */
.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.compare-table th,
.compare-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.compare-table th {
  background: var(--surface-2);
  font-weight: 600;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table td:first-child {
  color: var(--muted);
}

.compare-table td:last-child {
  color: var(--text);
  font-weight: 500;
}

.compare-table .highlight {
  color: var(--accent);
}

/* Integrations */
.integrations-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.integration-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #d4d4d4;
}

/* Early access */
.early-access {
  padding-bottom: 6rem;
}

.early-access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.perks-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.perks-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: #a3a3a3;
}

.perks-list li::before {
  content: '→';
  color: var(--accent);
  font-weight: 700;
}

.waitlist-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.06);
}

.waitlist-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.waitlist-card > p {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.waitlist-card .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.form-success {
  text-align: center;
  padding: 2rem 1rem;
}

.form-success-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.form-success h3 {
  margin: 0 0 0.5rem;
}

.form-success p {
  color: var(--muted);
  margin: 0;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.form-error {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.85rem;
  text-align: center;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-question:hover {
  color: var(--accent-hover);
}

.faq-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  border-color: var(--accent);
  color: var(--accent);
}

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-item.is-open .faq-answer {
  display: block;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 280px;
  margin: 0.75rem 0 0;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #a3a3a3;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

/* Mobile nav */
@media (max-width: 900px) {
  .hero-grid,
  .agency-inner,
  .early-access-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .agents-grid,
  .audience-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem;
    border-radius: 8px;
  }

  .nav-links a:hover {
    background: var(--surface);
  }

  .nav-toggle {
    display: block;
  }

  .nav-actions .btn-secondary {
    display: none;
  }
}

@media (max-width: 540px) {
  .problem-grid {
    grid-template-columns: 1fr;
  }

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

  .mock-stats {
    grid-template-columns: 1fr;
  }

  section {
    padding: 3.5rem 0;
  }
}

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

/* Landing chat widget */
.landing-chat-root {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 200;
  font-family: var(--sans);
}

.landing-chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.landing-chat-launcher:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px var(--accent-glow);
}

.landing-chat-launcher-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.landing-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(380px, calc(100vw - 2rem));
  max-height: min(560px, calc(100vh - 6rem));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.landing-chat-panel[hidden] {
  display: none !important;
}

.landing-chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  z-index: -1;
}

.landing-chat-backdrop[hidden] {
  display: block !important;
  visibility: hidden;
}

.landing-chat-root.is-open .landing-chat-backdrop {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

body.landing-chat-open {
  overflow: hidden;
}

.landing-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.landing-chat-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.landing-chat-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.landing-chat-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.landing-chat-close:hover {
  color: var(--text);
  border-color: var(--muted);
}

.landing-chat-messages {
  flex: 1;
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.landing-chat-bubble {
  max-width: 92%;
}

.landing-chat-bubble--user {
  align-self: flex-end;
}

.landing-chat-bubble--assistant {
  align-self: flex-start;
}

.landing-chat-bubble-label {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.landing-chat-bubble--user .landing-chat-bubble-label {
  text-align: right;
}

.landing-chat-bubble-body {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.landing-chat-bubble--user .landing-chat-bubble-body {
  background: var(--accent-muted);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-bottom-right-radius: 4px;
}

.landing-chat-bubble--assistant .landing-chat-bubble-body {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.landing-chat-bubble-body p {
  margin: 0;
}

.landing-chat-bubble-body p + p {
  margin-top: 0.5rem;
}

.landing-chat-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.5rem;
}

.landing-chat-starter {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.landing-chat-starter:hover:not(:disabled) {
  border-color: var(--accent);
}

.landing-chat-starter:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.landing-chat-cta {
  margin: 0;
  padding: 0 1rem 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.landing-chat-cta a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.landing-chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.landing-chat-form input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
}

.landing-chat-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.landing-chat-form .btn {
  flex-shrink: 0;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

.landing-chat-error {
  margin: 0;
  padding: 0 1rem 0.75rem;
  font-size: 0.8rem;
  color: var(--accent-hover);
}

@media (min-width: 541px) {
  .landing-chat-backdrop {
    display: none !important;
  }
}

@media (max-width: 540px) {
  .landing-chat-root {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
  }

  .landing-chat-launcher {
    width: 100%;
    justify-content: center;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  }

  .landing-chat-root.is-open .landing-chat-launcher {
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.5rem);
  }

  .landing-chat-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
  }

  .landing-chat-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    transform: translateY(100%);
    transition: transform 0.24s ease-out;
    z-index: 1;
  }

  .landing-chat-root.is-open .landing-chat-panel {
    transform: translateY(0);
  }

  .landing-chat-messages {
    max-height: none;
    flex: 1;
    min-height: 0;
  }

  .landing-chat-starters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .landing-chat-starters::-webkit-scrollbar {
    display: none;
  }

  .landing-chat-form {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .landing-chat-form input {
    font-size: 16px;
  }

  .landing-chat-error {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
}
