@import "./tokens.css";

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cta);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

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

/* Wordmark */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark__cone {
  width: 0.72em;
  height: 0.84em;
  margin: 0 0.02em;
  transform: translateY(0.06em);
}

/* Nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(247, 246, 244, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 0.5px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.625rem 1.125rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  color: #fff;
  background: var(--cta);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 1px 3px rgba(26, 24, 22, 0.14);
}

.btn--primary:hover {
  background: var(--cta-hover);
}

.btn--secondary {
  color: var(--text);
  background: var(--surface);
  border: 0.5px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(26, 24, 22, 0.06);
}

.btn--secondary:hover {
  background: var(--surface-muted);
}

.btn--sm {
  padding: 0.45rem 0.875rem;
  font-size: 0.875rem;
}

/* Typography helpers */

.eyebrow {
  display: block;
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.section-lead {
  margin: 0;
  max-width: 38rem;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.section-block {
  padding: 4.5rem 0;
  border-top: 0.5px solid rgba(26, 24, 22, 0.1);
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  padding: 3.5rem 0 4.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10% -5%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 75% at 72% 38%, var(--glow-peach), transparent 68%),
    radial-gradient(ellipse 65% 60% at 22% 55%, var(--glow-amber), transparent 62%),
    radial-gradient(ellipse 55% 45% at 88% 18%, var(--glow-coral), transparent 58%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, rgba(0, 0, 0, 0.35) 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, rgba(0, 0, 0, 0.35) 80%, transparent 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

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

.hero__headline {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
}

.hero__subline {
  margin: 0 0 1.75rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__demo-wrap {
  position: relative;
}

.hero__demo-wrap::before {
  content: "";
  position: absolute;
  inset: -12% -8%;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 55% 45%, var(--glow-peach), transparent 70%),
    radial-gradient(ellipse 50% 45% at 30% 60%, var(--glow-amber), transparent 65%),
    radial-gradient(ellipse 40% 35% at 80% 30%, var(--glow-coral), transparent 60%);
  pointer-events: none;
}

.chat-panel {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.chat-panel__chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-bottom: 0.5px solid var(--border);
  background: var(--surface-muted);
}

.chat-panel__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--border-strong);
}

.chat-panel__title {
  margin-left: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-faint);
}

.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-height: 16.5rem;
  padding: 1.125rem 1rem 1.25rem;
  transition: opacity 0.45s ease;
}

.chat-feed--fade {
  opacity: 0;
}

.chat-msg {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

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

.chat-msg--agent-in {
  animation: agent-in 0.35s ease forwards;
}

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

.chat-msg__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.chat-msg--user .chat-msg__body {
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--surface-muted);
  border-radius: var(--radius-md);
}

.chat-msg--agent .chat-msg__body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Pillars */

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.pillar__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.pillar__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.steps__num {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--cone-end);
}

.steps__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.steps__text {
  margin: 0;
  font-size: 0.875rem;
}

/* Connect */

.connect-prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
}

.connect-prompt__text {
  flex: 1 1 16rem;
  margin: 0;
}

.connect-prompt__copy {
  flex: 0 0 auto;
  align-self: center;
}

.connect-footnote {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.code-block {
  margin: 0.75rem 0 0;
  padding: 0.875rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-muted);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Pricing */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.pricing-item {
  padding: 1.25rem;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
}

.pricing-item__label {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.pricing-item__price {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.pricing-item__detail {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.pricing-note {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
}

/* Footer */

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 0.5px solid rgba(26, 24, 22, 0.1);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer__company {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.site-footer__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
}

.site-footer__links a {
  color: var(--text-muted);
}

.site-footer__links a:hover {
  color: var(--text);
}

/* Legal pages */

.legal-page main {
  padding: 3rem 0 4rem;
}

.legal-card {
  max-width: 48rem;
  padding: 2rem;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.legal-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.legal-card h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.legal-card h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.legal-card p,
.legal-card li {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.legal-card ul {
  padding-left: 1.25rem;
}

.legal-card .text-muted {
  color: var(--text-faint);
}

/* Responsive */

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

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

  .hero {
    padding-top: 2rem;
  }
}

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

  .chat-msg,
  .chat-feed {
    transition: none;
  }
}
