/* styles.css — the marketing site, on the product's own palette.
 *
 * Every colour here is lifted from DEFAULT_THEME in src/types.ts. The site and
 * the app drifted apart badly (the site was rust-on-cream, the app is forest
 * green on warm white), and a landing page that looks nothing like the product
 * it sells makes the first click feel like a mistake. Change a token in
 * src/types.ts, change it here.
 *
 * Typography is already shared with the app: Fraunces for display, Inter for
 * body, IBM Plex Mono for the small uppercase labels.
 */

:root {
  /* From DEFAULT_THEME — keep in step with src/types.ts */
  --canvas: #f2f0ed;
  --paper: #ffffff;
  --ink: #1c1b19;
  --ink-soft: #5b5853;
  --ink-faint: #8d8a85;
  --accent: #2f6d4e;
  --sidebar: #f5f4f1;
  --node-stroke: #cfcbc4;

  /* Derived, at fixed alphas — same approach as usePreferences in the app */
  --edge: rgba(28, 27, 25, 0.1);
  --edge-soft: rgba(28, 27, 25, 0.06);
  --accent-tint: rgba(47, 109, 78, 0.08);
  --accent-line: rgba(47, 109, 78, 0.28);
  --ink-deep: #14130f;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 13px;
  --radius-sm: 8px;
  --shadow-raised: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--edge);
  --shadow-float: 0 8px 28px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--edge);
  --gutter: 24px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 240, 237, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--edge-soft);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover { color: var(--ink); }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { background: #276042; }

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--node-stroke);
}
.btn-ghost:hover { border-color: var(--ink-faint); }

.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; }

/* ── Type ───────────────────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; }

h1 {
  font-size: clamp(38px, 5.6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(27px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.012em; }

.lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 18px 0 0;
}

.section { padding: 88px 0; }
.section-alt { background: var(--sidebar); border-block: 1px solid var(--edge-soft); }
.section-head { max-width: 62ch; margin-bottom: 44px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero { padding: 76px 0 84px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: 56px;
  align-items: center;
}

.hero-ctas { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

.hero-note {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

/* ── Canvas mock — echoes the real app surface ──────────────────────────── */

.canvas-mock {
  position: relative;
  background: var(--canvas);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  padding: 20px;
  overflow: hidden;
}

.canvas-mock::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(28, 27, 25, 0.13) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.canvas-mock svg { position: relative; display: block; width: 100%; height: auto; }

.mock-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.mock-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-transform: none;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-raised);
}

.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 14.5px; line-height: 1.62; color: var(--ink-soft); }

.card-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

/* ── Agent panel ────────────────────────────────────────────────────────── */

.panel {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--edge-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.panel-body { padding: 18px 16px; display: grid; gap: 16px; }

.msg { display: flex; gap: 11px; align-items: flex-start; }

.avatar {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
}

.avatar-agent { background: var(--accent); }

.msg-who {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.msg-via {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.msg-body { margin: 3px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }

.panel-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--edge-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}

/* ── Tool list ──────────────────────────────────────────────────────────── */

.tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }

.tool {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-soft);
  box-shadow: 0 0 0 1px var(--edge);
}

/* ── Pricing ────────────────────────────────────────────────────────────── */

.price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }

.plan {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.plan-featured { box-shadow: 0 0 0 1.5px var(--accent-line), var(--shadow-float); }

.plan-name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.plan-price {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 10px 0 2px;
  line-height: 1;
}

.plan-price small { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--ink-faint); letter-spacing: 0; }

.plan-note { font-size: 13.5px; color: var(--ink-soft); margin: 8px 0 18px; min-height: 40px; }

.plan ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 9px; }
.plan li { font-size: 14px; color: var(--ink-soft); display: flex; gap: 9px; align-items: flex-start; }
.plan li svg { flex: 0 0 auto; margin-top: 4px; color: var(--accent); }
.plan .btn { margin-top: auto; width: 100%; }

.seat-picker {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--canvas);
  gap: 3px;
  margin-bottom: 14px;
}

.seat-picker button {
  appearance: none;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
}

.seat-picker button[aria-pressed='true'] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-raised);
}

/* ── Closer + footer ────────────────────────────────────────────────────── */

.closer { padding: 90px 0; text-align: center; }
.closer .hero-ctas { justify-content: center; }

.site-footer { border-top: 1px solid var(--edge-soft); padding: 26px 0 40px; }

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
}

.footer-row a { color: var(--ink-faint); text-decoration: none; }
.footer-row a:hover { color: var(--ink); }
.footer-spacer { flex: 1; }

/* ── Prose (privacy) ────────────────────────────────────────────────────── */

.prose { max-width: 46rem; }
.prose h2 { font-size: 25px; margin: 46px 0 14px; }
.prose p { margin: 0 0 16px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.7; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .grid-2, .grid-3, .price-grid { grid-template-columns: minmax(0, 1fr); }
  .site-nav { display: none; }
  .section { padding: 64px 0; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .hero { padding: 48px 0 56px; }
}
