:root {
  --bg: #faf8f4;
  --bg-elevated: #ffffff;
  --ink: #1a1f2e;
  --ink-muted: #5a6275;
  --ink-subtle: #8a8f9c;
  --border: #e8e3d9;
  --accent: #8b6d47;
  --accent-hover: #6f5436;
  --max-width: 1080px;
  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(26, 31, 46, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 31, 46, 0.06);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  background: rgba(250, 248, 244, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.nav-cta {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
}
.nav-cta:hover { color: var(--accent); }

/* ---------- typography ---------- */
h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1.1em; }

.eyebrow,
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}

.muted { color: var(--ink-muted); }

/* ---------- hero ---------- */
.hero {
  padding: 96px 0 88px;
  border-bottom: 1px solid var(--border);
}
.hero-headline {
  max-width: 820px;
  margin-bottom: 28px;
}
.hero-sub {
  max-width: 640px;
  font-size: 19px;
  color: var(--ink-muted);
  margin-bottom: 36px;
}
.hero-footnote {
  margin-top: 24px;
  font-size: 13px;
  color: var(--ink-subtle);
}

/* ---------- buttons ---------- */
.button {
  display: inline-block;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.button.primary {
  background: var(--ink);
  color: var(--bg);
}
.button.primary:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: var(--shadow-md);
}

.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- sections shared ---------- */
section { padding: 88px 0; border-bottom: 1px solid var(--border); }
section h2 { max-width: 720px; margin-bottom: 24px; }

/* ---------- problem ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin: 56px 0 48px;
}
.stat-number {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1;
}
.stat-label {
  font-size: 15px;
  color: var(--ink-muted);
  margin: 0;
}

.pullquote {
  margin: 56px 0;
  padding: 32px 0 32px 28px;
  border-left: 2px solid var(--accent);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  max-width: 760px;
  font-style: italic;
}
.pullquote cite {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-subtle);
  font-style: normal;
  letter-spacing: 0.02em;
}

.problem-body {
  max-width: 720px;
  color: var(--ink-muted);
}

/* ---------- solution ---------- */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px 56px;
  margin-top: 56px;
}
.solution-item h3 { margin-bottom: 10px; }
.solution-item p { color: var(--ink-muted); margin: 0; }

.feature-highlight {
  margin-top: 56px;
  padding: 36px 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  max-width: 820px;
}
.feature-tag {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}
.feature-highlight h3 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.feature-highlight p {
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.feature-note {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0 !important;
}

/* ---------- traction ---------- */
.traction-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin: 56px 0 16px;
}
.traction-stat {
  padding-right: 12px;
}
.traction-number {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1;
}
.traction-label {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
}

/* ---------- product gallery ---------- */
.product-gallery h2 { margin-bottom: 0; }
.product-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  max-width: 1000px;
  margin-top: 56px;
}
.product-gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.product-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
  background: #0b0d14;
  box-shadow: 0 12px 32px rgba(26, 31, 46, 0.14);
}
.product-gallery figcaption {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-top: 18px;
  padding: 0 2px;
}
.product-gallery figcaption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}

/* ---------- pilot ---------- */
.pilot-fit {
  margin-top: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 32px 36px;
  max-width: 820px;
}
.pilot-fit h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.pilot-fit-lead {
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.pilot-fit ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--ink);
}
.pilot-fit li {
  margin-bottom: 8px;
  color: var(--ink);
}
.pilot-fit strong {
  font-weight: 600;
  color: var(--ink);
}
.pilot-fit-note {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink-muted);
}

/* ---------- team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 56px;
  margin-top: 56px;
}
.team-card {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.team-role {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.team-bio { color: var(--ink-muted); margin: 0; font-size: 15px; }

/* ---------- footer CTA ---------- */
.footer-cta {
  background: var(--ink);
  color: var(--bg);
  border-bottom: none;
  padding: 104px 0;
}
.footer-cta .section-label { color: var(--accent); }
.footer-cta h2 { max-width: 640px; color: var(--bg); }
.footer-cta-sub {
  max-width: 580px;
  color: rgba(250, 248, 244, 0.72);
  font-size: 18px;
  margin-bottom: 36px;
}
.footer-cta .button.primary {
  background: var(--bg);
  color: var(--ink);
}
.footer-cta .button.primary:hover {
  background: var(--accent);
  color: var(--bg);
}
.footer-cta-alt {
  margin-top: 24px;
  font-size: 14px;
  color: rgba(250, 248, 244, 0.55);
}
.footer-cta-alt a { color: rgba(250, 248, 244, 0.9); border-bottom: 1px solid rgba(250, 248, 244, 0.3); }
.footer-cta-alt a:hover { color: var(--bg); border-bottom-color: var(--bg); }

/* ---------- site footer ---------- */
.site-footer {
  padding: 32px 0;
  font-size: 13px;
  color: var(--ink-subtle);
}
.site-footer p { margin: 0; }

/* ---------- chat widget ---------- */
.chat-widget[hidden] { display: none !important; }
.chat-widget {
  position: fixed;
  inset: 0;
  background: rgba(26, 31, 46, 0.45);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  z-index: 100;
  animation: chat-fade 0.18s ease-out;
}
@keyframes chat-fade {
  from { background: rgba(26, 31, 46, 0); }
}
.chat-panel {
  background: var(--bg);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: chat-slide 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes chat-slide {
  from { transform: translateX(20px); opacity: 0; }
}
@media (min-width: 720px) {
  .chat-widget {
    align-items: flex-end;
    padding: 24px;
  }
  .chat-panel {
    height: 80vh;
    max-height: 720px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }
}
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: 0;
}
.chat-subtitle {
  font-size: 12px;
  color: var(--ink-muted);
  margin: 0;
}
.chat-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 2px 8px;
  border-radius: 3px;
}
.chat-close:hover { color: var(--ink); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  max-width: 85%;
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg-user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--bg);
  border-bottom-right-radius: 3px;
}
.chat-msg-assistant {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 3px;
}
.chat-msg-assistant-error {
  align-self: flex-start;
  background: #fef3ec;
  border: 1px solid #e8b885;
  color: #7a4300;
  border-bottom-left-radius: 3px;
  font-size: 14px;
}
.chat-msg-typing {
  color: var(--ink-subtle);
  font-style: italic;
}
.chat-msg .chat-list {
  margin: 8px 0 4px;
  padding-left: 4px;
  list-style: none;
}
.chat-msg .chat-list li {
  position: relative;
  padding: 3px 0 3px 16px;
  line-height: 1.5;
}
.chat-msg .chat-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.chat-msg-user .chat-list li::before { background: var(--bg); }
.chat-msg strong { font-weight: 600; }
.chat-msg p { margin: 0 0 10px; }
.chat-msg p:last-child { margin-bottom: 0; }
.chat-composer {
  display: flex;
  gap: 8px;
  padding: 14px 24px 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-composer input {
  flex: 1;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.chat-composer input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.chat-composer input:disabled { opacity: 0.6; }
.chat-send {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 500;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.chat-send:hover:not(:disabled) { background: var(--accent); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-footer-note {
  padding: 0 24px 14px;
  font-size: 12px;
  color: var(--ink-subtle);
  margin: 0;
}
.chat-footer-note a {
  color: var(--ink-subtle);
  border-bottom: 1px solid var(--border);
}
.chat-footer-note a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
body.chat-open { overflow: hidden; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .stat-grid { grid-template-columns: 1fr; gap: 28px; }
  .solution-grid { grid-template-columns: 1fr; gap: 36px; }
  .traction-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
  .team-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding: 72px 0 64px; }
  section { padding: 64px 0; }
  .footer-cta { padding: 80px 0; }
  .pullquote { font-size: 19px; padding-left: 20px; }
  .pilot-fit { padding: 24px; }
  .feature-highlight { padding: 28px 24px; }
  .product-gallery .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 260px;
    gap: 40px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .container { padding: 0 22px; }
  .nav-inner { padding: 14px 22px; }
  .nav-cta { display: none; }
  .traction-grid { grid-template-columns: 1fr; }
  .button { width: 100%; text-align: center; }
  .hero-sub { font-size: 17px; }
  .product-gallery .gallery-grid { max-width: 220px; gap: 32px; }
  .product-gallery img { border-radius: 20px; }
}
