:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-raised: #fafaf8;
  --text: #141413;
  --text-muted: #5a5954;
  --text-subtle: #8a8983;
  --border: #e3e1da;
  --border-strong: #cdcbc2;
  --accent-oe: #2d6a4f;
  --accent-oe-light: #e8f5ec;
  --accent-oe-dark: #1b4332;
  --accent-cb: #8b4513;
  --accent-cb-light: #f5ebe0;
  --shadow-sm: 0 1px 2px rgba(20, 20, 19, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 20, 19, 0.08), 0 1px 3px rgba(20, 20, 19, 0.04);
  --shadow-lg: 0 12px 40px rgba(20, 20, 19, 0.1), 0 2px 8px rgba(20, 20, 19, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --header-height: 3.25rem;
  --font-sans: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;
  --max-width: 72rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + var(--space-4)); }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 0.9375rem;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ── Sticky header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-height);
  background: rgba(244, 243, 239, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}

.site-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--accent-oe-dark);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
}

.site-nav {
  display: flex;
  gap: var(--space-1);
}

.site-nav a {
  padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: var(--accent-oe);
  background: var(--accent-oe-light);
}

.nav-demo {
  font-weight: 600;
}

.nav-demo--customer:hover {
  color: #5c4d9e;
  background: #ede9fe;
}

.nav-demo--citebench:hover {
  color: var(--accent-cb);
  background: var(--accent-cb-light);
}

/* ── Page intro (compact) ── */
.page-intro {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  padding: var(--space-5) var(--space-6) var(--space-5);
}

.page-intro-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-oe);
  margin-bottom: var(--space-3);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.375rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.page-lead {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 42rem;
  line-height: 1.6;
}

/* ── Main layout ── */
.hub-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-5) var(--space-6) var(--space-8);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-5);
}

.section-head h2 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.section-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 28rem;
  text-align: right;
}

.featured-section { margin-bottom: var(--space-6); }

/* ── Featured card ── */
.featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.featured-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.featured-thumb-link {
  display: block;
  text-decoration: none;
  background: #eef2ef;
}

.featured-frame {
  height: 100%;
  min-height: 16rem;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.featured-frame img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.featured-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-left: 1px solid var(--border);
}

/* ── Demo grid ── */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.demo-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.demo-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.demo-card-thumb {
  display: block;
  text-decoration: none;
  background: var(--surface-raised);
}

.demo-card-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

/* ── Screenshot frames ── */
.screenshot-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eaeae6;
  border-bottom: 1px solid var(--border);
}

.screenshot-frame--warm { background: #f0ebe4; }

.screenshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.frame-badge {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* ── Card content ── */
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.product-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.product-tag--ordereasy {
  color: var(--accent-oe);
  background: var(--accent-oe-light);
}

.product-tag--citebench {
  color: var(--accent-cb);
  background: var(--accent-cb-light);
}

.journey-tag {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.card-title a {
  text-decoration: none;
  transition: color 0.15s;
}

.card-title a:hover { color: var(--accent-oe); }

.demo-card--citebench .card-title a:hover { color: var(--accent-cb); }

.card-blurb {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.guardrail-line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-subtle);
  line-height: 1.45;
  padding: var(--space-3);
  background: var(--surface-raised);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.guardrail-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.55;
}

.step-preview {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.step-preview li {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-oe);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-oe-dark); }

.btn-citebench {
  background: var(--accent-cb);
}

.btn-citebench:hover { background: #6d370f; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

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

/* ── Hub note ── */
.hub-note {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.hub-note strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: var(--space-5) var(--space-6) var(--space-6);
  font-size: 0.8125rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
}

.footer-links {
  margin-top: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--accent-oe); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-body {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .featured-frame {
    min-height: 12rem;
    aspect-ratio: 16 / 10;
  }

  .demo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-desc { text-align: left; }
}

@media (max-width: 640px) {
  .site-header-inner,
  .page-intro,
  .hub-main {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .page-intro { padding-top: var(--space-6); }

  .demo-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .featured-body,
  .demo-card-body {
    padding: var(--space-4);
  }

  .site-nav { display: none; }
}
