:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --background: #f4f5f7;
  --background-elevated: rgba(255, 255, 255, 0.72);
  --background-strong: rgba(255, 255, 255, 0.9);
  --surface-border: rgba(15, 23, 42, 0.08);
  --surface-border-strong: rgba(15, 23, 42, 0.12);
  --text-primary: #16181d;
  --text-secondary: #5f6b7a;
  --text-tertiary: #8693a3;
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, 0.12);
  --accent-strong: #6d28d9;
  --accent2: #f43f5e;
  --accent2-soft: rgba(244, 63, 94, 0.1);
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-focus: 0 0 0 4px rgba(124, 58, 237, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.1), transparent 26%),
    radial-gradient(circle at top right, rgba(244, 63, 94, 0.08), transparent 28%),
    linear-gradient(180deg, #f7f8fa 0%, #eef1f5 100%);
}

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

button,
input,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.page-shell {
  padding: 20px;
}

.glass-panel,
.glass-panel-strong {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.glass-panel {
  background: var(--background-elevated);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-soft);
}

.glass-panel-strong {
  background: var(--background-strong);
  border: 1px solid var(--surface-border-strong);
  box-shadow: var(--shadow-card);
}

/* ── Header ── */

.site-header {
  position: sticky;
  top: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1340px;
  margin: 0 auto 22px;
  padding: 16px 20px;
  border: 1px solid var(--surface-border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(255, 255, 255, 0.92));
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 0.98rem;
  letter-spacing: -0.03em;
}

.brand-text span {
  color: var(--text-tertiary);
  font-size: 0.76rem;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text-primary);
}

.header-cta,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.header-cta,
.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.25);
}

.header-cta:hover,
.primary-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(124, 58, 237, 0.32);
}

.secondary-button {
  border: 1px solid var(--surface-border-strong);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
}

.secondary-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
}

/* ── Layout ── */

main {
  max-width: 1340px;
  margin: 0 auto;
}

/* ── Hero ── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 170px);
  padding: 18px 0 34px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 640px;
  animation: fade-up 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1,
.section-intro h2,
.principles-copy h2,
.beta-copy h2 {
  margin: 0;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.hero h1 {
  max-width: none;
  font-size: clamp(1.9rem, 3vw, 3.4rem);
}

.hero-subheading {
  margin: 10px 0 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.02em;
}

.hero-text {
  max-width: 42rem;
  margin: 24px 0 0;
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.85;
}

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

.hero-highlights {
  display: grid;
  gap: 12px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
}

.hero-highlights li {
  position: relative;
  padding-left: 20px;
}

.hero-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.1);
}

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
  border-radius: 34px;
  overflow: hidden;
  animation: fade-up 820ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  pointer-events: none;
}

.hero-visual::before {
  inset: auto auto -64px -32px;
  width: 180px;
  height: 180px;
  background: rgba(124, 58, 237, 0.13);
}

.hero-visual::after {
  inset: 14px -30px auto auto;
  width: 140px;
  height: 140px;
  background: rgba(244, 63, 94, 0.12);
}

.visual-topline {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.83rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.12);
}

.conversation-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
}

.role-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.message-row {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(246, 248, 251, 0.92);
}

.message-row.user {
  margin-right: 38px;
}

.message-row.assistant {
  margin-left: 22px;
  background: rgba(124, 58, 237, 0.07);
}

.avatar {
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.message-row p,
.memory-pulse p,
.feature-item p,
.principles-copy p,
.principle p,
.beta-copy p,
.beta-list,
.form-note {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.memory-pulse {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  color: var(--accent);
}

.memory-pulse span {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 10px rgba(124, 58, 237, 0.08);
  animation: pulse-memory 1.8s ease-in-out infinite;
}

.toggle-preview {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 23, 42, 0.08);
  width: fit-content;
}

.toggle-pill {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.toggle-pill.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.22);
}

/* ── Sections shared ── */

.section-grid,
.demo-section,
.usecases-section,
.beta-section {
  margin-top: 64px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 34px;
  align-items: start;
}

.section-intro h2,
.principles-copy h2,
.beta-copy h2,
.demo-intro h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 0;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.section-intro h2 {
  max-width: 12ch;
}

.feature-flow {
  display: grid;
  gap: 28px;
}

.feature-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.feature-index {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.feature-item h3,
.principle h3 {
  margin: 0 0 10px;
  font-size: 1.22rem;
  letter-spacing: -0.04em;
}

/* ── Demo section ── */

.demo-section {
  display: grid;
  gap: 34px;
}

.demo-intro {
  max-width: 640px;
}

.demo-intro p {
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.demo-tabs {
  display: inline-flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 23, 42, 0.08);
  width: fit-content;
  margin-bottom: 4px;
}

.demo-tab {
  padding: 10px 20px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.demo-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.22);
}

.demo-tab:not(.active):hover {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.06);
}

.demo-panels {
  position: relative;
}

.demo-panel {
  display: none;
  gap: 18px;
  padding: 28px;
  border-radius: 30px;
  animation: fade-up 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.demo-panel.active {
  display: grid;
}

.demo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.demo-label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-memory 1.8s ease-in-out infinite;
}

.demo-context-badge {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.demo-messages {
  display: grid;
  gap: 14px;
}

.demo-msg {
  display: grid;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 380ms ease, transform 380ms ease;
}

.demo-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-msg.user .msg-bubble {
  margin-right: 48px;
  background: rgba(246, 248, 251, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.07);
}

.demo-msg.recall .msg-bubble {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.14);
  color: var(--accent);
}

.demo-msg.recall .recall-dot {
  flex-shrink: 0;
  margin-top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.09);
  animation: pulse-memory 1.8s ease-in-out infinite;
}

.demo-msg.assistant .msg-bubble {
  margin-left: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.msg-sender {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0 4px;
}

.demo-msg.recall .msg-sender {
  color: var(--accent);
}

.msg-bubble {
  padding: 14px 18px;
  border-radius: 18px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.7;
}

.msg-bubble strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Use cases ── */

.usecases-section {
  display: grid;
  gap: 34px;
}

.usecases-intro {
  max-width: 560px;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.usecase-card {
  display: grid;
  gap: 12px;
  padding: 26px;
  border-radius: 26px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.usecase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.1);
}

.usecase-card h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.usecase-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.7;
}

/* ── Comparison ── */

.compare-section {
  margin-top: 64px;
  display: grid;
  gap: 34px;
}

.compare-intro {
  max-width: 560px;
}

.compare-table-wrap {
  border-radius: 28px;
  overflow: hidden;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.compare-table thead tr {
  border-bottom: 1px solid var(--surface-border-strong);
}

.compare-table th {
  padding: 18px 22px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
}

.compare-table th.feature-col {
  text-align: left;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compare-table th.col-highlight {
  color: var(--accent);
  background: var(--accent-soft);
}

.compare-table td {
  padding: 16px 22px;
  text-align: center;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--surface-border);
}

.compare-table td.feature-col,
.compare-table td:first-child {
  text-align: left;
  color: var(--text-primary);
  font-weight: 500;
}

.compare-table td.col-highlight {
  background: rgba(124, 58, 237, 0.04);
}

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

.compare-table tbody tr:hover td {
  background: rgba(15, 23, 42, 0.02);
}

.compare-table tbody tr:hover td.col-highlight {
  background: rgba(124, 58, 237, 0.07);
}

.cmp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.cmp.yes {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.cmp.no {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-tertiary);
}

.cmp.partial {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.free-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .compare-table th,
  .compare-table td {
    padding: 14px 12px;
    font-size: 0.84rem;
  }

  .compare-table th:first-child,
  .compare-table td:first-child {
    font-size: 0.8rem;
  }
}

/* ── Beta ── */

.beta-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.9fr);
  gap: 32px;
  padding: 34px;
  border-radius: 34px;
}

.beta-copy {
  max-width: 560px;
}

.beta-copy p {
  margin-top: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.beta-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-left: 18px;
}

.beta-form {
  display: grid;
  gap: 16px;
}

.beta-form label {
  display: grid;
  gap: 8px;
}

.beta-form span {
  color: var(--text-tertiary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.beta-form input,
.beta-form textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-primary);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.beta-form input:hover,
.beta-form textarea:hover {
  transform: translateY(-1px);
}

.beta-form textarea {
  resize: vertical;
  min-height: 132px;
}

.form-note {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0;
}

.form-feedback {
  min-height: 24px;
  margin: 0;
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 600;
}

.form-feedback.success {
  color: #059669;
}

.form-feedback.error {
  color: #e11d48;
}

/* ── Footer ── */

.site-footer {
  max-width: 1340px;
  margin: 64px auto 0;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-tertiary);
  font-size: 0.84rem;
  flex-wrap: wrap;
}

/* ── Animations ── */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-memory {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.75;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* ── Responsive ── */

@media (max-width: 1080px) {
  .hero,
  .section-grid,
  .beta-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .page-shell {
    padding: 12px;
  }

  .site-header {
    top: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: 22px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    font-size: 0.86rem;
  }

  .hero,
  .section-grid,
  .beta-section {
    gap: 22px;
  }

  .hero-visual,
  .principles-panel,
  .beta-section {
    border-radius: 26px;
  }

  .hero-copy,
  .hero-visual,
  .beta-section {
    padding-left: 0;
    padding-right: 0;
  }

  .hero-visual,
  .principles-panel,
  .beta-section {
    padding: 22px;
  }

  .feature-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .demo-panel {
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .brand-text span,
  .site-nav {
    display: none;
  }

  .header-cta {
    width: 100%;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .message-row.user,
  .message-row.assistant {
    margin-left: 0;
    margin-right: 0;
  }

  .demo-msg.user .msg-bubble {
    margin-right: 0;
  }

  .demo-msg.assistant .msg-bubble {
    margin-left: 0;
  }

  .demo-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .demo-tab {
    flex: 1;
    text-align: center;
  }
}
