/* Ajica site. Colours mirror config/ui-colors.toml; no external assets, no third-party scripts. */

:root {
  --bg-base: #140d0e;
  --bg-surface: #1b1214;
  --bg-raised: #26191b;
  --bg-card: #221517;
  --border-subtle: #382427;
  --border-medium: #54373b;
  --text-main: #faf4ee;
  --text-muted: #c4aba1;
  --text-dim: #8c746b;
  --accent: #e05342;
  --accent-hover: #f26453;
  --accent-ink: #ffffff;
  --accent-soft: #381d1f;
  --tone-green: #52c484;
  --tone-amber: #e5a93c;
  --col-backlog: #c98564;
  --shadow-lg: 0 18px 60px rgb(20 13 14 / 70%);
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --page: 1080px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-base: #fbf7f2;
    --bg-surface: #ffffff;
    --bg-raised: #f3ebe1;
    --bg-card: #ffffff;
    --border-subtle: #e6dacf;
    --border-medium: #c9b5a3;
    --text-main: #211412;
    --text-muted: #5e4a45;
    --text-dim: #8b756f;
    --accent: #bf3626;
    --accent-hover: #9e291b;
    --accent-soft: #fae8e5;
    --tone-green: #1b7346;
    --tone-amber: #9c6615;
    --col-backlog: #8c5638;
    --shadow-lg: 0 18px 60px rgb(33 20 18 / 18%);
    color-scheme: light;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

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

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand .mark {
  width: 40px;
  height: 40px;
}

.brand .wordmark {
  height: 30px;
  width: auto;
}

.brand picture {
  display: flex;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* Hero */

.hero {
  padding-top: 56px;
  padding-bottom: 40px;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 14px;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone-amber);
}

h1 {
  max-width: 17ch;
  margin: 22px auto 18px;
  font-size: clamp(2.2rem, 6vw, 3.9rem);
  font-weight: 750;
  line-height: 1.07;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.button.quiet {
  border-color: var(--border-medium);
  color: var(--text-main);
}

.button.quiet:hover {
  background: var(--bg-raised);
  color: var(--text-main);
}

.hero .soon {
  margin-top: 12px;
}

.fine {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 14px;
}

/* Board illustration */

.board-figure {
  margin: 0;
  padding-bottom: 24px;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 4px 2px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.column-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot);
}

.column-title .count {
  margin-left: auto;
  color: var(--text-dim);
  font-weight: 500;
}

.card {
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: 14px;
  line-height: 1.4;
}

.card-title {
  margin: 0 0 9px;
  font-weight: 600;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 12px;
}

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.agent {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.badge.human {
  background: color-mix(in srgb, var(--tone-green) 14%, transparent);
  color: var(--tone-green);
}

.badge.waiting {
  background: color-mix(in srgb, var(--tone-amber) 16%, transparent);
  color: var(--tone-amber);
}

.progress {
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--bg-raised);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.card.is-waiting {
  border-color: color-mix(in srgb, var(--tone-amber) 55%, var(--border-subtle));
}

.card.is-done .card-title {
  color: var(--text-muted);
}

.board-figure figcaption {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

/* Sections */

section.wrap {
  padding-top: 64px;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-lede {
  max-width: 62ch;
  margin: 0 0 30px;
  color: var(--text-muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  padding: 22px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.features h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 650;
}

.features p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15.5px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 16px;
  border-top: 2px solid var(--border-medium);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15.5px;
}

/* Pricing */

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

.plan {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.plan.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-surface) 46%);
}

.plan h3 {
  margin: 0;
  font-size: 1.15rem;
}

.price {
  margin: 10px 0 2px;
  font-size: 2.6rem;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.price small {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}

.plan .note {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 15px;
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15.5px;
}

.plan li {
  position: relative;
  padding: 6px 0 6px 26px;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.82em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--tone-green);
  border-bottom: 2px solid var(--tone-green);
  transform: rotate(-45deg);
}

.pricing-note {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 14px;
}

.plan .plan-action {
  margin: 22px 0 0;
}

.plan .soon {
  margin-top: 10px;
}

/* FAQ */

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 40px;
  margin: 0;
}

.faq div {
  padding: 16px 0;
  border-top: 1px solid var(--border-subtle);
}

.faq dt {
  font-weight: 650;
}

.faq dd {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 15.5px;
}

/* Contact and footer */

.contact {
  margin-top: 64px;
  padding: 34px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  text-align: center;
}

.contact h2 {
  margin-bottom: 8px;
}

.contact p {
  margin: 0 auto;
  max-width: 54ch;
  color: var(--text-muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 56px;
  padding-top: 22px;
  padding-bottom: 36px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  color: var(--text-muted);
}

/* Legal pages */

.legal {
  max-width: 72ch;
  padding-top: 28px;
}

.legal h1 {
  max-width: none;
  margin: 0 0 6px;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  text-align: left;
}

.legal .updated {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 14px;
}

.legal .notice {
  margin: 18px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 15.5px;
}

.legal h2 {
  margin: 34px 0 8px;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.legal p,
.legal li {
  color: var(--text-muted);
}

.legal ul {
  padding-left: 22px;
}

/* Legal and documentation pages rendered from Markdown (scripts/build_site.py) */

.legal blockquote {
  margin: 18px 0 8px;
  padding: 6px 16px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 15.5px;
}

.legal blockquote p {
  margin: 10px 0;
}

.legal h3 {
  margin: 26px 0 6px;
  font-size: 1.1rem;
}

.legal h4 {
  margin: 20px 0 4px;
  font-size: 1rem;
}

.legal ol {
  padding-left: 24px;
}

.legal li {
  margin: 3px 0;
}

.legal code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-raised);
  color: var(--text-main);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.legal pre {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}

.legal pre code {
  padding: 0;
  background: none;
  overflow-wrap: normal;
}

.legal hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--border-subtle);
}

.legal .table-wrap {
  margin: 14px 0;
  overflow-x: auto;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.legal th,
.legal td {
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 650;
}

.legal .plain-link {
  color: var(--text-main);
}

/* Download and documents */

.download {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.download h2 {
  margin-bottom: 8px;
}

.download p {
  margin: 0 0 10px;
  color: var(--text-muted);
}

.download .actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.download ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 15.5px;
}

.download li {
  padding: 5px 0 5px 26px;
  position: relative;
}

.download li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.78em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--tone-green);
  border-bottom: 2px solid var(--tone-green);
  transform: rotate(-45deg);
}

.docs-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-list a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 600;
  text-decoration: none;
}

.docs-list a:hover {
  border-color: var(--border-medium);
  background: var(--bg-raised);
}

.docs-list span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 400;
}

/* A link that is not configured yet (site/links.js): shown, not clickable */

.button.is-unavailable {
  border-color: var(--border-medium);
  background: transparent;
  color: var(--text-dim);
  cursor: not-allowed;
}

.button.primary.is-unavailable:hover,
.button.is-unavailable:hover {
  background: transparent;
  color: var(--text-dim);
}

.soon {
  display: block;
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 13.5px;
}

.site-nav .lang {
  padding: 0 0 0 22px;
  border-left: 1px solid var(--border-medium);
}

/* Narrow screens */

@media (max-width: 860px) {
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .features,
  .steps {
    grid-template-columns: 1fr;
  }

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

  .download,
  .docs-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-nav {
    gap: 14px;
    font-size: 14px;
  }

  .site-nav .nav-extra {
    display: none;
  }

  .site-nav .lang {
    padding-left: 14px;
  }

  .brand .wordmark {
    height: 24px;
  }

  .brand .mark {
    width: 32px;
    height: 32px;
  }

  .hero {
    padding-top: 34px;
  }

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

  .board {
    padding: 10px;
    gap: 8px;
  }

  .card.extra {
    display: none;
  }

  section.wrap {
    padding-top: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
