:root {
  --background: #faf8f4;
  --surface: #ffffff;
  --surface-soft: #f3f4f6;
  --border: #e5e7eb;
  --foreground: #0f172a;
  --muted: #475569;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: rgba(15, 118, 110, 0.1);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top center, rgba(15, 118, 110, 0.08), transparent 28%),
    linear-gradient(180deg, #fcfbf8 0%, #f6f5f1 100%);
  color: var(--foreground);
  font-family: Inter, "Segoe UI", sans-serif;
}

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

button,
textarea {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(250, 248, 244, 0.84);
  backdrop-filter: blur(18px);
}

.topbar-inner,
.footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}

.brand-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.status-chip,
.meta-text,
.primary-link,
.ghost-button,
.primary-button {
  border-radius: 999px;
}

.status-chip,
.meta-text {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.status-chip.online {
  color: var(--primary-dark);
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.08);
}

.status-chip.offline {
  color: #9a3412;
  border-color: rgba(154, 52, 18, 0.22);
  background: rgba(251, 146, 60, 0.1);
}

.hero {
  padding: 72px 0 32px;
}

.hero-grid,
.chat-grid,
.feature-grid {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 18px 0 0;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 720px;
  margin: 20px 0 0;
  font-size: 20px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

.primary-link,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, opacity 120ms ease;
}

.primary-link,
.primary-button {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 16px 36px rgba(15, 118, 110, 0.2);
}

.ghost-button {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--foreground);
  font-weight: 600;
}

.primary-link:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.hero-metrics,
.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.feature-card,
.info-panel,
.chat-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.metric-card,
.feature-card {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  display: block;
  margin-top: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.feature-strip {
  padding: 24px 0 32px;
}

.feature-card h2,
.info-panel h2,
.chat-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.feature-card p,
.info-panel li,
.info-panel p,
.chat-header p {
  color: var(--muted);
  line-height: 1.7;
}

.chat-section {
  padding: 36px 0 72px;
}

.chat-grid {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
}

.info-panel,
.chat-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.info-panel ul {
  margin: 20px 0;
  padding-left: 18px;
}

.subtle-box {
  padding: 18px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.subtle-label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.messages {
  min-height: 420px;
  max-height: 58vh;
  margin-top: 24px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
}

.message {
  width: min(86%, 760px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px 18px;
  background: #fff;
}

.message.user {
  margin-left: auto;
  border-bottom-right-radius: 8px;
  background: linear-gradient(180deg, #0f766e 0%, #115e59 100%);
  color: #fff;
}

.message.assistant {
  border-bottom-left-radius: 8px;
  background: #ffffff;
}

.message-role {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.message.user .message-role {
  color: rgba(255, 255, 255, 0.76);
}

.message-content {
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 15px;
}

.composer {
  margin-top: 24px;
}

.composer-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 130px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--foreground);
  line-height: 1.6;
  outline: none;
}

textarea:focus {
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.footer {
  border-top: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(255, 255, 255, 0.72);
}

.footer p {
  color: var(--muted);
}

@media (max-width: 960px) {
  .hero-grid,
  .chat-grid,
  .feature-grid,
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .topbar-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 16px, 1120px);
  }

  .topbar-inner,
  .footer-inner,
  .chat-header,
  .composer-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .status-chip,
  .primary-link,
  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .message {
    width: 100%;
  }
}
