:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root[data-theme="dark"],
:root {
  color-scheme: dark;
  --bg-primary: #141416;
  --bg-secondary: #1c1c1f;
  --bg-tertiary: #26262a;
  --bg-elevated: #18181b;
  --bg-input: #1c1c1f;
  --bg-hover: #2a2a2f;
  --bg-active: #2a2a2f;
  --bg-modal: #1f1f22;

  --border-primary: #232328;
  --border-secondary: #33333a;
  --border-tertiary: #44444c;
  --border-focus: #55555e;

  --text-primary: #EDEDF0;
  --text-secondary: #C8C8CD;
  --text-tertiary: #A4A4AC;
  --text-muted: #80808A;
  --text-disabled: #5a5a62;
  --text-placeholder: #5a5a62;

  /* Accent: teal/sage */
  --accent-primary: #7DD3C0;
  --accent-primary-bg: #16332E;
  --accent-primary-border: #205049;
  --accent-primary-hover: #5BBFA8;

  --accent-secondary: #c084fc;
  --accent-secondary-bg: #4a1e5f;

  --error: #fa6060;
  --error-bg: #3a1818;
  --error-border: #6a2a2a;

  --warning: #f5b942;
  --warning-bg: #3a2a10;
  --warning-dark: #d97706;

  --success: #4ade80;
  --success-bg: #14361f;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 6px 14px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.36);

  --backdrop: rgba(0, 0, 0, 0.45);
  --border-radius: 8px;
  --border-radius-sm: 6px;
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* ---- Trust page ---- */
.trust-section {
  padding: 6rem 2rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.trust-title {
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
}

.trust-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.trust-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: left;
}

.trust-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.trust-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.trust-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trust-card li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 0.25rem 0;
}

.trust-card li strong {
  color: var(--text-primary);
}

.trust-card a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.trust-card a:hover {
  text-decoration: underline;
}

.trust-footer-links {
  text-align: center;
  padding: 0 2rem 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.trust-footer-links a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.trust-footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .trust-section {
    padding: 4rem 1.5rem 1.5rem;
  }

  .trust-title {
    font-size: 2.25rem;
  }

  .trust-grid {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem 3rem;
  }
}

@media (max-width: 480px) {
  .trust-section {
    padding: 3rem 1rem 1rem;
  }

  .trust-title {
    font-size: 1.85rem;
  }

  .trust-grid {
    padding: 1.5rem 1rem 2.5rem;
  }
}

/* ---- Navbar ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0;
  height: 60px;
  background: transparent;
  transition: height 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-nav-scrolled {
  height: 48px;
  background: rgba(20, 20, 22, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-primary);
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
}

.site-nav-inner {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav-name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-try-wrap {
  position: relative;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-try-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-try-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-tertiary);
}

.nav-try-btn.nav-try-active {
  background: var(--bg-hover);
  border-color: var(--border-tertiary);
}

.nav-try-btn svg {
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.nav-try-btn.nav-try-active svg {
  transform: rotate(180deg);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #f5f5f3;
  border: 1px solid #d8d8d4;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  overflow: hidden;
  z-index: 200;
}

.nav-dropdown.nav-dropdown-open {
  display: block;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: #1a1a18;
  text-decoration: none;
  transition: background 0.12s ease;
}

.nav-dropdown-item:hover {
  background: #ebebea;
}

.nav-dropdown-item-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-dropdown-item svg {
  flex-shrink: 0;
  opacity: 0.45;
  color: #1a1a18;
}

/* ---- Hero ---- */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem 5rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1.5rem;
  max-width: 680px;
  line-height: 1.6;
}

.hero-cta {
  margin-top: 3rem;
}

.hero-loop {
  margin-top: 1.75rem;
  max-width: 680px;
  font-size: 0.95rem;
  color: var(--text-disabled);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.bottom-cta-section {
  text-align: center;
  padding: 3rem 1rem 4rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-primary-bg);
  border: 1px solid var(--accent-primary-border);
  border-radius: var(--border-radius);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.cta-button-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-secondary);
}

.cta-button-secondary:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- Features / Value Props ---- */
.features-section {
  padding: 2rem 2rem 4rem;
  background: var(--bg-primary);
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

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

.feature-row-reverse .feature-text {
  order: 2;
}

.feature-row-reverse .feature-visual,
.feature-row-reverse .feature-carousel {
  order: 1;
}

.feature-text h3 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-text p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
  margin: 0;
}

.feature-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.feature-link:hover {
  color: var(--text-primary);
}

.feature-carousel {
  position: relative;
}

.carousel-track {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-sm);
  background: var(--bg-secondary);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  cursor: zoom-in;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.feature-carousel:hover .carousel-arrow {
  opacity: 1;
}

.carousel-prev {
  left: 0.75rem;
}

.carousel-next {
  right: 0.75rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--border-secondary);
  background: var(--bg-tertiary);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.carousel-dot.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.carousel-track:only-child~.carousel-arrow,
.carousel-dots:has(> :only-child) {
  display: none;
}

.feature-carousel:not(:has(.carousel-slide ~ .carousel-slide)) .carousel-arrow,
.feature-carousel:not(:has(.carousel-slide ~ .carousel-slide)) .carousel-dots {
  display: none;
}

@media (pointer: coarse) {

  .carousel-arrow,
  .lightbox-arrow {
    display: none !important;
  }
}

/* ---- Feature visuals (inline diagrams instead of screenshots) ----
   All four visuals share the same outer aspect ratio as `.carousel-track`
   so feature rows stay vertically balanced when mixed with screenshots. */
.feature-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* --- Models grid (3x2) — logo-only circular tiles --- */
.visual-models {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  place-items: center;
  gap: 1rem;
  padding: 1.5rem;
}

.model-tile {
  aspect-ratio: 1;
  width: 100%;
  max-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: 50%;
  color: var(--text-secondary);
}

.model-tile img {
  width: 56%;
  height: 56%;
  object-fit: contain;
}

.model-tile-custom {
  border-style: dashed;
  color: var(--accent-primary);
}

.model-tile-custom svg {
  width: 40%;
  height: 40%;
}

/* --- Sandbox illustration --- */
.visual-sandbox {
  padding: 1rem;
}

.sandbox-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px dashed var(--border-tertiary);
  border-radius: var(--border-radius-sm);
  background: var(--bg-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  overflow: hidden;
}

.sandbox-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.sandbox-lock {
  display: inline-flex;
  color: var(--accent-primary);
}

.sandbox-title {
  flex: 1;
  color: var(--text-primary);
}

.sandbox-cron {
  font-size: 0.7rem;
  color: var(--accent-primary);
  background: var(--accent-primary-bg);
  border: 1px solid var(--accent-primary-border);
  border-radius: 100px;
  padding: 0.15em 0.6em;
  letter-spacing: 0.02em;
}

.sandbox-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) 1.4fr;
  min-height: 0;
}

.sandbox-tree {
  border-right: 1px solid var(--border-primary);
  padding: 0.6rem 0.75rem;
  color: var(--text-tertiary);
  overflow: hidden;
}

.tree-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.7;
}

.tree-dir {
  color: var(--accent-primary);
}

.tree-indent {
  padding-left: 1rem;
}

.sandbox-term {
  padding: 0.6rem 0.75rem;
  color: var(--text-secondary);
  overflow: hidden;
}

.term-line {
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-prompt {
  color: var(--accent-primary);
  margin-right: 0.4em;
}

.term-out {
  color: var(--success);
}

.term-dim {
  color: var(--text-muted);
  font-style: italic;
}

.term-cursor {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  background: var(--text-primary);
  vertical-align: -0.15em;
  margin-left: 0.1em;
  animation: term-blink 1s steps(2) infinite;
}

@keyframes term-blink {
  to { opacity: 0; }
}

/* --- Channels hub ---
   Flex row: agent circle on the left, three channel pills stacked on the
   right. The gap between them holds the connector lines (drawn as a fixed
   pseudo-element on each pill, sized to span the full gap so they visibly
   meet the agent circle). */
.visual-channels {
  padding: 1.5rem 1.75rem;
}

.channels-hub {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--channel-gap, 3rem);
}

.channel-center {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent-primary-bg);
  border: 1px solid var(--accent-primary-border);
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
}

.channel-center::after {
  /* radial pulse */
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--accent-primary-border);
  opacity: 0.6;
  animation: channel-pulse 2.4s ease-out infinite;
}

@keyframes channel-pulse {
  0%   { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}

.channel-node {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius-sm);
  position: relative;
  min-width: 180px;
}

.channel-node::before {
  /* connector line spanning the gap between agent and pill */
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: var(--channel-gap, 3rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary) 25%, var(--accent-primary));
  opacity: 0.55;
}

/* Wrap the three pills in a column so the agent stays a single sibling */
.channel-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.channel-node img,
.channel-node svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.channel-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.channel-meta strong {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.channel-meta em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- Case studies flow pipeline --- */
.case-studies-intro {
  padding-bottom: 1rem;
}

.case-studies-section {
  padding-top: 2rem;
}

.case-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.case-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 999px;
}

.visual-flow {
  aspect-ratio: auto;
  height: auto;
  min-height: 11rem;
  overflow: visible;
  align-items: stretch;
  padding: 1rem 1.1rem;
}

.flow-pipeline {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
}

.flow-step {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.flow-step-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius-sm);
  width: 100%;
}

.flow-node img,
.flow-node svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

.flow-node-compact img {
  width: 16px;
  height: 16px;
}

.flow-node-icons {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.flow-step-agent {
  flex: 1.05;
}

.flow-agent-center {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-primary-bg);
  border: 1px solid var(--accent-primary-border);
  color: var(--accent-primary);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
}

.flow-agent-center::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--accent-primary-border);
  opacity: 0.5;
  animation: channel-pulse 2.4s ease-out infinite;
}

.flow-arrow {
  flex-shrink: 0;
  align-self: flex-start;
  /* Align with the center of trigger nodes / agent circle (below step label). */
  margin-top: calc(1rem + 0.45rem + 2.25rem - 0.5rem);
  color: var(--accent-primary);
  opacity: 0.65;
  font-size: 1rem;
  line-height: 1;
}

.flow-deliver {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.flow-result {
  width: 100%;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.62rem;
  line-height: 1.4;
  padding: 0.35rem 0.45rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius-sm);
  white-space: normal;
  overflow-wrap: anywhere;
}

.flow-node .channel-meta {
  min-width: 0;
}

.flow-node .channel-meta em {
  overflow-wrap: anywhere;
}

.case-studies-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 2rem 4rem;
}

.case-studies-cta-text {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Case-study flow diagrams: stack before the two-column grid gets too narrow. */
@media (max-width: 960px) {
  .flow-pipeline {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .flow-step {
    width: 100%;
    max-width: 320px;
    align-self: center;
  }

  .flow-arrow {
    align-self: center;
    margin: 0;
    transform: rotate(90deg);
  }

  .flow-step-agent {
    flex: 1;
  }
}

.feature-text code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.9em;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* --- Auth modes --- */
.visual-auth {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem 1.25rem;
}

.auth-tool-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  letter-spacing: 0.01em;
}

.auth-tool-label img {
  width: 18px;
  height: 18px;
}

.auth-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius-sm);
}

.auth-card-highlight {
  border-color: var(--accent-primary-border);
  background: var(--accent-primary-bg);
}

.auth-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.auth-card-highlight .auth-card-icon {
  background: var(--bg-primary);
  color: var(--accent-primary);
}

.auth-card-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  min-width: 0;
}

.auth-card-text strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-card-text em {
  font-style: normal;
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-card-highlight .auth-card-text em {
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .feature-visual:not(.visual-flow) { aspect-ratio: 4 / 3; }
  .visual-models { gap: 0.5rem; padding: 0.75rem; }
  .model-tile { font-size: 0.78rem; }
  .channel-node { min-width: 0; }
  .channel-node::before { width: 16px; }
  .channels-hub { gap: 0.4rem; }
  .channel-center { width: 72px; height: 72px; font-size: 0.72rem; }
}

/* ---- Badge ---- */
.badge-closed-beta {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  background: var(--accent-primary-bg);
  border: 1px solid var(--accent-primary-border);
  border-radius: 100px;
  padding: 0.3em 0.9em;
  margin-bottom: 0.75rem;
}

/* ---- Lightbox ---- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-primary);
  font-size: 2.5rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ---- Integrations ---- */
.integrations-section {
  padding: 4rem 0 6rem;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.integrations-title,
.integrations-subtitle,
.integrations-cta {
  padding-left: 2rem;
  padding-right: 2rem;
}

.integrations-title {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.integrations-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Marquee — two duplicated tracks scroll in tandem for a seamless loop.
   Edges fade out via mask. Pauses on hover. Disabled when the user
   prefers reduced motion. */
.logo-marquee {
  display: flex;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.logo-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  /* keeps the gap consistent across the seam */
  animation: marquee-scroll 180s linear infinite;
}

.logo-marquee:hover .logo-track {
  animation-play-state: paused;
}

.logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter 0.25s ease, opacity 0.25s ease;
  white-space: nowrap;
}

.logo-pill:hover,
.logo-pill--lit {
  filter: none;
  opacity: 1;
}

.logo-pill img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-marquee {
    flex-wrap: wrap;
    justify-content: center;
    -webkit-mask-image: none;
    mask-image: none;
    gap: 1rem;
  }

  .logo-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    padding-right: 0;
  }

  .logo-track[aria-hidden="true"] {
    display: none;
  }
}

.integrations-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.integrations-more {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.integration-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  padding: 0.6rem 1.1rem;
}

.integration-pill.custom {
  border-style: dashed;
  border-color: var(--border-secondary);
  color: var(--text-muted);
}

/* ---- Footer ---- */
footer {
  width: 100%;
  padding: 2rem 0;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-primary);
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

footer p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

footer a:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

.footer-cookie-link {
  background: none;
  border: none;
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.footer-cookie-link:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

/* ---- Content pages (privacy, terms) ---- */
.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
  position: relative;
  padding-bottom: 5rem;
}

.has-site-nav .content-container {
  padding-top: 5rem;
  min-height: calc(100vh - 60px);
}

.content-header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-primary);
}

.content-header h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.content-header .last-updated {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.875rem;
}

.content-body h2 {
  color: var(--accent-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-primary);
}

.content-body h3 {
  color: var(--accent-primary);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 2rem 0 1rem 0;
}

.content-body p {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  line-height: 1.7;
}

.content-body ul,
.content-body ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.content-body li {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.content-body a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.content-body a:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

/* ---- Cookie Banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  padding: 1rem 2rem;
  z-index: 1000;
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-banner-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
}

.cookie-banner-content a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-accept-btn,
.cookie-customize-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}

.cookie-accept-btn {
  background: var(--accent-primary-bg);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary-border);
}

.cookie-customize-btn {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

/* ---- Cookie Modal ---- */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--backdrop);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-modal-content {
  background: var(--bg-modal);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-primary);
}

.cookie-modal-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.cookie-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.cookie-category-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.cookie-category-left {
  flex: 1;
}

.cookie-category-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.cookie-category-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.cookie-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  border-radius: 24px;
  border: 1px solid var(--border-primary);
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-disabled);
  border-radius: 50%;
}

.cookie-switch input:checked+.cookie-slider {
  background-color: var(--accent-primary-bg);
  border-color: var(--accent-primary);
}

.cookie-switch input:checked+.cookie-slider:before {
  transform: translateX(24px);
  background-color: var(--accent-primary);
}

.cookie-switch input:disabled+.cookie-slider {
  cursor: not-allowed;
  opacity: 0.8;
}

.cookie-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-primary);
  display: flex;
  justify-content: flex-end;
}

.cookie-save-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  background: var(--accent-primary-bg);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary-border);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-section {
    padding: 5rem 1.5rem 3rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .hero-loop {
    font-size: 0.85rem;
    padding: 0 0.5rem;
  }

  .features-section {
    padding: 2rem 1.5rem 3rem;
    gap: 3rem;
  }

  .feature-row,
  .feature-row-reverse {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    direction: ltr;
  }

  .site-nav-inner {
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .site-nav-actions {
    gap: 0.625rem;
    flex-shrink: 1;
    min-width: 0;
  }

  .nav-link {
    font-size: 0.8125rem;
  }

  .nav-try-btn,
  .nav-try-btn-link {
    padding: 0.35rem 0.7rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .feature-visual.visual-flow {
    min-height: 0;
  }

  .integrations-section {
    padding: 3rem 1.5rem 4rem;
  }

  .cookie-banner {
    padding: 1rem 1.5rem;
  }

  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-accept-btn,
  .cookie-customize-btn {
    flex: 1;
  }

  .cookie-modal-content {
    width: 95%;
  }

  .cookie-modal-header {
    padding: 1.25rem 1.5rem;
  }

  .cookie-modal-header h2 {
    font-size: 1.25rem;
  }

  .cookie-modal-body {
    padding: 1.5rem;
  }

  .cookie-category-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cookie-modal-footer {
    padding: 1.25rem 1.5rem;
  }

  .content-container {
    padding: 1.5rem;
    padding-bottom: 5rem;
  }

  .content-header h1 {
    font-size: 2rem;
  }

  footer {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 4rem 1rem 2.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .features-section {
    padding: 1.5rem 1rem 2.5rem;
    gap: 2.5rem;
  }

  .site-nav-inner {
    padding: 0 0.75rem;
  }

  .site-nav-name {
    font-size: 0.9rem;
  }

  .site-nav-actions {
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.75rem;
  }

  .nav-try-btn,
  .nav-try-btn-link {
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
  }

  .feature-text h3 {
    font-size: 1.25rem;
  }

  .carousel-track {
    aspect-ratio: 4 / 3;
  }

  .integrations-section {
    padding: 2rem 1rem 3.5rem;
  }

  .content-container {
    padding: 1rem;
    padding-bottom: 5rem;
  }

  .content-header h1 {
    font-size: 1.75rem;
  }

  .content-body h2 {
    font-size: 1.25rem;
  }
}

/* ---- Download page ---- */
.nav-try-btn-link {
  text-decoration: none;
  border: 1px solid var(--border-secondary);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.nav-try-btn-link:hover {
  background: var(--bg-hover);
  border-color: var(--border-tertiary);
}

.download-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  text-align: center;
}

.has-site-nav .download-page {
  padding-top: 4rem;
}

.download-title {
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.download-subtitle {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.download-primary {
  margin-top: 2rem;
}

.download-btn {
  cursor: pointer;
  border: 1px solid var(--accent-primary-border);
  font-family: inherit;
}

.download-meta {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-disabled);
}

.download-unsupported,
.download-error {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
}

.download-unsupported-text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.download-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.download-link:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

.download-install {
  margin-top: 3rem;
  text-align: left;
}

.download-install h2,
.download-other h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.download-steps {
  padding-left: 1.25rem;
  color: var(--text-tertiary);
}

.download-steps li {
  margin-bottom: 0.5rem;
}

.download-steps code {
  font-size: 0.875em;
  background: var(--bg-tertiary);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.download-other {
  margin-top: 2.5rem;
  text-align: left;
}

.download-other-list {
  list-style: none;
}

.download-other-list li {
  margin-bottom: 0.5rem;
}

.download-other-link {
  color: var(--accent-primary);
  text-decoration: none;
}

.download-other-link:hover {
  text-decoration: underline;
}

.download-other-link[aria-current="true"] {
  color: var(--text-primary);
  font-weight: 600;
}

.download-other-size {
  color: var(--text-muted);
  font-weight: 400;
}

.download-footer-note {
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.download-footer-note a {
  color: var(--accent-primary);
  text-decoration: none;
}

.download-footer-note a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .download-page {
    padding: 2rem 1.25rem 3rem;
  }

  .download-title {
    font-size: 1.75rem;
  }
}