/* ==========================================================================
   ScriptWEAVER / Wren — site.css
   Custom design system on top of Tailwind CDN.
   Design philosophy: square, grid-aligned, typographically bold.
   Author: Wren (the mascot), ScriptWEAVER team — Maple Grove, MN
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. FONT IMPORTS
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (design tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Color palette — dark (default) */
  --bg:          #09090f;
  --bg-2:        #111118;
  --bg-3:        #18181f;
  --border:      #22222f;
  --border-2:    #2e2e3e;
  --text:        #e8e6f2;
  --text-muted:  #8b8aa0;
  --text-faint:  #4a4a60;

  /* Brand accents */
  --accent:      #8b5cf6;       /* Wren purple */
  --accent-dim:  #6d44d4;
  --accent-glow: rgba(139,92,246,0.25);
  --green:       #4ade80;
  --green-dim:   rgba(74,222,128,0.15);
  --red:         #f87171;
  --amber:       #fbbf24;
  --blue:        #60a5fa;

  /* Typography */
  --font-serif:  'DM Serif Display', 'Georgia', serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', 'Monaco', 'Consolas', monospace;

  /* Spacing unit */
  --unit: 4px;

  /* Border radius — VERY square */
  --r-none:  0px;
  --r-sm:    2px;
  --r-md:    4px;
  --r-lg:    6px;
  --r-xl:    8px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 0 1px var(--accent-glow), 0 4px 24px rgba(139,92,246,0.2);

  /* Transitions */
  --t-fast:   80ms ease;
  --t-mid:    160ms ease;
  --t-slow:   300ms cubic-bezier(0.4,0,0.2,1);

  /* Layout */
  --nav-h: 60px;
  --max-w: 1200px;
  --max-w-narrow: 780px;
}

/* Light theme */
[data-theme="light"] {
  --bg:          #fafaf8;
  --bg-2:        #f3f3ef;
  --bg-3:        #eaeae4;
  --border:      #dededb;
  --border-2:    #c8c8c4;
  --text:        #14141c;
  --text-muted:  #5a5a70;
  --text-faint:  #9898b0;
  --accent:      #7c4fe8;
  --accent-dim:  #6340c8;
  --accent-glow: rgba(124,79,232,0.18);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.10);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  transition: background-color var(--t-slow), color var(--t-slow);
}

::selection {
  background-color: var(--accent);
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.font-serif    { font-family: var(--font-serif); }
.font-sans     { font-family: var(--font-sans); }
.font-mono     { font-family: var(--font-mono); }

/* Heading scale */
.h-display {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.018em;
}
.h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.8vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.h4 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--text-muted);
}

.label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   4. COLOR UTILITIES
   -------------------------------------------------------------------------- */
.text-accent    { color: var(--accent); }
.text-muted     { color: var(--text-muted); }
.text-faint     { color: var(--text-faint); }
.text-green     { color: var(--green); }
.text-red       { color: var(--red); }
.text-amber     { color: var(--amber); }
.text-blue      { color: var(--blue); }
.bg-accent      { background-color: var(--accent); }
.bg-2           { background-color: var(--bg-2); }
.bg-3           { background-color: var(--bg-3); }
.border-col     { border-color: var(--border); }

/* --------------------------------------------------------------------------
   5. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 48px);
}
.container-narrow {
  max-width: var(--max-w-narrow);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 48px);
}

/* Grid column helpers */
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.col-6   { grid-column: span 6; }
.col-4   { grid-column: span 4; }
.col-3   { grid-column: span 3; }
.col-8   { grid-column: span 8; }
@media (max-width: 768px) {
  .grid-12 { grid-template-columns: 1fr; }
  .col-6, .col-4, .col-3, .col-8 { grid-column: span 1; }
}

/* Section spacing */
.section      { padding-block: clamp(64px, 10vw, 120px); }
.section-sm   { padding-block: clamp(40px, 6vw, 72px); }
.section-xs   { padding-block: clamp(24px, 4vw, 48px); }

/* Dividers */
.hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 0;
}

/* --------------------------------------------------------------------------
   6. NAVIGATION
   -------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background-color: rgba(9,9,15,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--t-slow), border-color var(--t-slow);
}
[data-theme="light"] .site-nav {
  background-color: rgba(250,250,248,0.88);
}
.site-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-nav__logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: #fff;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.site-nav__logo-text {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
}
.site-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.site-nav__links a {
  display: block;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.site-nav__links a:hover,
.site-nav__links a.active {
  color: var(--text);
  background: var(--bg-2);
}
.site-nav__links a.active {
  color: var(--accent);
}
.site-nav__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.site-nav__signin {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}
.site-nav__signin:hover { color: var(--text); }

/* Mobile nav drawer */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform var(--t-mid), opacity var(--t-mid);
  border-radius: 1px;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  padding: calc(var(--nav-h) + 24px) 24px 24px;
  transform: translateX(100%);
  transition: transform var(--t-slow);
  overflow-y: auto;
}
.mobile-drawer.open {
  transform: translateX(0);
}
.mobile-drawer nav a {
  display: block;
  padding: 14px 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 900px) {
  .site-nav__links { display: none; }
  .nav-hamburger { display: flex; }
}

/* Page offset for fixed nav */
.nav-offset { padding-top: var(--nav-h); }

/* Responsive two-column grid used across all pages */
.grid-responsive { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 900px) {
  .grid-responsive { grid-template-columns: 1fr; gap: 32px; }
  .grid-responsive [style*="order:2"] { order: unset !important; }
}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Primary */
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Secondary / ghost */
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-secondary:hover {
  background: var(--bg-2);
  border-color: var(--text-faint);
}

/* Ghost subtle */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
}
.btn-ghost:hover {
  background: var(--bg-2);
  color: var(--text);
}

/* Outline accent */
.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: #fff;
}

/* Danger */
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}
.btn-danger:hover {
  background: var(--red);
  color: #fff;
}

/* Sizes */
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-xl { padding: 16px 36px; font-size: 1.05rem; }

/* Get Started (Wren-branded) */
.btn-wren {
  background: var(--accent);
  color: #fff;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
}
.btn-wren:hover {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   8. CARDS
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  transition: border-color var(--t-mid), box-shadow var(--t-mid), transform var(--t-mid);
}
.card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-md);
}
.card-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.card-accent {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.card-flush {
  padding: 0;
  border-radius: var(--r-md);
  overflow: hidden;
}

/* Feature cards (icon + title + desc) */
.feat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px 24px;
  transition: border-color var(--t-mid), transform var(--t-mid);
}
.feat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.feat-card__icon {
  width: 40px; height: 40px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--accent);
}

/* Model cards */
.model-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-mid), transform var(--t-mid);
}
.model-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-mid);
}
.model-card:hover::before { transform: scaleX(1); }
.model-card:hover { border-color: var(--border-2); transform: translateY(-2px); }

.model-card--speed::before  { background: var(--green); }
.model-card--balance::before { background: var(--amber); }
.model-card--quality::before { background: var(--accent); }

/* --------------------------------------------------------------------------
   9. BADGES & TAGS
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.badge-accent  { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(139,92,246,0.3); }
.badge-green   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(74,222,128,0.25); }
.badge-amber   { background: rgba(251,191,36,0.12); color: var(--amber); border: 1px solid rgba(251,191,36,0.25); }
.badge-gray    { background: var(--bg-3); color: var(--text-muted); border: 1px solid var(--border); }
.badge-blue    { background: rgba(96,165,250,0.12); color: var(--blue); border: 1px solid rgba(96,165,250,0.25); }
.badge-red     { background: rgba(248,113,113,0.12); color: var(--red); border: 1px solid rgba(248,113,113,0.25); }

/* Pill badges (for hero) */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}
.pill-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   10. HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(80px, 14vw, 160px);
  text-align: center;
}
.hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero__gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(139,92,246,0.18) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 20% 80%, rgba(96,165,250,0.10) 0%, transparent 60%),
              var(--bg);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.45;
}
.hero__content {
  position: relative;
  z-index: 1;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero__title {
  max-width: 820px;
  margin-inline: auto;
  margin-bottom: 24px;
}
.hero__sub {
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 40px;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.7;
}
.hero__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero__pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   11. SECTION HEADERS
   -------------------------------------------------------------------------- */
.section-header {
  margin-bottom: clamp(40px, 6vw, 64px);
}
.section-header--center { text-align: center; }
.section-header .label {
  display: inline-block;
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   12. ACCORDION
   -------------------------------------------------------------------------- */
.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-item:first-child { border-top: 1px solid var(--border); }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--t-fast);
}
.accordion-trigger:hover { color: var(--accent); }
.accordion-trigger .acc-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  color: var(--text-faint);
  transition: transform var(--t-mid), border-color var(--t-mid), color var(--t-mid);
}
.accordion-trigger[aria-expanded="true"] .acc-icon {
  transform: rotate(45deg);
  border-color: var(--accent);
  color: var(--accent);
}
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-slow);
}
.accordion-content.open {
  grid-template-rows: 1fr;
}
.accordion-inner {
  overflow: hidden;
  padding-bottom: 18px;
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   13. TABS
   -------------------------------------------------------------------------- */
.tab-bar {
  display: flex;
  gap: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  width: fit-content;
}
.tab-btn {
  padding: 7px 16px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --------------------------------------------------------------------------
   14. PLUGIN UI MOCK
   -------------------------------------------------------------------------- */
.plugin-mock {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.plugin-mock__titlebar {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plugin-mock__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.plugin-mock__body {
  padding: 16px;
  min-height: 320px;
  max-height: 440px;
  overflow-y: auto;
}
/* Custom scrollbar */
.plugin-mock__body::-webkit-scrollbar { width: 4px; }
.plugin-mock__body::-webkit-scrollbar-track { background: transparent; }
.plugin-mock__body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

/* Chat messages in mock */
.mock-msg {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-sans);
}
.mock-msg--user { flex-direction: row-reverse; }
.mock-avatar {
  width: 26px; height: 26px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}
.mock-avatar--wren { background: var(--accent); color: #fff; }
.mock-avatar--user { background: var(--bg-3); color: var(--text-muted); border: 1px solid var(--border-2); }
.mock-bubble {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  max-width: 84%;
  font-size: 0.845rem;
  line-height: 1.6;
  color: var(--text);
}
.mock-bubble--wren { border-color: var(--border-2); }
.mock-bubble--user { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Diff snippet */
.diff-line {
  display: block;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  border-radius: var(--r-sm);
}
.diff-line--add {
  background: rgba(74,222,128,0.10);
  color: var(--green);
}
.diff-line--remove {
  background: rgba(248,113,113,0.10);
  color: var(--red);
  text-decoration: line-through;
  opacity: 0.7;
}
.diff-line--ctx { color: var(--text-muted); }
.diff-filename {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  padding: 6px 10px 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

/* Tool call chips */
.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-block: 4px;
}
.tool-chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 1.4s ease infinite;
}

/* --------------------------------------------------------------------------
   15. ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateX(-8px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.anim-fade-up { animation: fadeUp 0.5s ease both; }
.anim-fade-in { animation: fadeIn 0.4s ease both; }

/* Staggered children */
.stagger > * { animation: fadeUp 0.5s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* Typing indicator */
.typing-dots span {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  margin: 0 1.5px;
  animation: typingDot 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0.32s; }

/* Gradient accent text */
.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 40%, var(--blue) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
}

/* --------------------------------------------------------------------------
   16. TABLES
   -------------------------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table tr td:first-child { color: var(--text); font-weight: 500; }
.data-table tbody tr:hover td { background: var(--bg-2); color: var(--text); }
.data-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow-x: auto;
  overflow: hidden;
}

/* Check / X icons in tables */
.check-yes { color: var(--green); font-weight: 700; }
.check-no  { color: var(--text-faint); }

/* --------------------------------------------------------------------------
   17. FORMS & INPUTS
   -------------------------------------------------------------------------- */
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.field-input,
.field-select {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  width: 100%;
}
.field-input:focus,
.field-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-select { appearance: none; cursor: pointer; }

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 6px var(--accent-glow);
  transition: transform var(--t-fast);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

/* --------------------------------------------------------------------------
   18. MODAL
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-slow);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 32px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(8px);
  transition: transform var(--t-slow), opacity var(--t-slow);
  box-shadow: var(--shadow-lg);
}
.modal-backdrop.open .modal-box {
  transform: scale(1) translateY(0);
}

/* --------------------------------------------------------------------------
   19. STEPPERS
   -------------------------------------------------------------------------- */
.step-list { list-style: none; position: relative; }
.step-list::before {
  content: '';
  position: absolute;
  left: 18px; top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.step-item {
  display: flex;
  gap: 20px;
  padding-bottom: 36px;
  position: relative;
}
.step-item:last-child { padding-bottom: 0; }
.step-num {
  width: 36px; height: 36px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  z-index: 1;
  position: relative;
}
.step-body { padding-top: 4px; }
.step-body h4 { font-weight: 600; margin-bottom: 6px; }
.step-body p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* --------------------------------------------------------------------------
   20. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding-block: 64px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
.footer-col h5 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-faint);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   21. ANNOUNCEMENT BANNER
   -------------------------------------------------------------------------- */
.announcement-bar {
  background: var(--accent);
  padding: 9px 16px;
  text-align: center;
  font-size: 0.825rem;
  font-weight: 500;
  color: #fff;
}
.announcement-bar a {
  color: #fff;
  text-decoration: underline;
  margin-left: 6px;
}

/* --------------------------------------------------------------------------
   22. COMPARISON TABLE (for vs. page)
   -------------------------------------------------------------------------- */
.vs-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.vs-card--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.vs-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   23. PRICING CARDS
   -------------------------------------------------------------------------- */
.pricing-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 32px 28px;
  position: relative;
  transition: border-color var(--t-mid), transform var(--t-mid);
}
.pricing-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}
.pricing-card--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.pricing-card--featured::after {
  content: 'Most Popular';
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 100px;
}
.price-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--text);
  line-height: 1;
}
.price-period { font-size: 0.85rem; color: var(--text-faint); }
.pricing-features { list-style: none; margin-top: 20px; }
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features .chk { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.pricing-features .na  { color: var(--text-faint); flex-shrink: 0; margin-top: 2px; }

/* --------------------------------------------------------------------------
   24. DEMO PAGE
   -------------------------------------------------------------------------- */
.demo-video-wrap {
  aspect-ratio: 16/9;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.demo-video-wrap .play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: background var(--t-mid);
}
.demo-video-wrap:hover .play-btn { background: rgba(0,0,0,0.18); }
.play-circle {
  width: 72px; height: 72px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 0 40px rgba(139,92,246,0.5);
  transition: transform var(--t-mid);
}
.demo-video-wrap:hover .play-circle { transform: scale(1.08); }

/* --------------------------------------------------------------------------
   25. THEME TOGGLE
   -------------------------------------------------------------------------- */
.theme-toggle {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.theme-toggle:hover { background: var(--bg-3); color: var(--text); }

/* --------------------------------------------------------------------------
   26. MISC UTILITIES + RESPONSIVE
   -------------------------------------------------------------------------- */
.hidden { display: none !important; }
.vis-hidden { visibility: hidden; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

/* Notification dot */
.notif-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
  animation: pulse 2s ease infinite;
}

/* Code inline */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: var(--r-sm);
  color: var(--accent);
}

/* Code block */
pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text);
}
pre code { background: none; border: none; padding: 0; font-size: 1em; color: inherit; }

/* Scroll to top button */
#scroll-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 40px; height: 40px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-mid), transform var(--t-fast);
  z-index: 50;
}
#scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}
#scroll-top:hover {
  background: var(--bg-3);
  color: var(--text);
  transform: translateY(-2px);
}

/* Alpha banner */
.alpha-strip {
  padding: 10px 0;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  border-top: 1px solid rgba(139,92,246,0.2);
  border-bottom: 1px solid rgba(139,92,246,0.2);
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
}
.alpha-strip strong { color: var(--accent); }

/* Minnesota map little decoration */
.mn-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* Wren signature quote */
.wren-quote {
  position: relative;
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 20px 24px;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.7;
}
.wren-quote::before {
  content: '"';
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.25;
  position: absolute;
  top: -10px; left: 16px;
  line-height: 1;
}
.wren-quote .wren-sig {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* 30-character line clamp for cards */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Print */
@media print {
  .site-nav, .site-footer, #scroll-top { display: none !important; }
  body { background: #fff; color: #000; }
}
