/*
 * Visual system for the AgentaWorks public and dashboard surfaces.
 * The palette avoids generic AI startup tropes in favor of grounded graphite,
 * mineral green, brass, and ember accents.
 */

:root {
  color-scheme: dark;
  --bg: #121411;
  --bg-elevated: #191d18;
  --bg-soft: #212720;
  --line: rgba(221, 228, 210, 0.14);
  --line-strong: rgba(221, 228, 210, 0.24);
  --text: #f2f2eb;
  --text-soft: #c4c7bc;
  --text-muted: #909789;
  --accent: #8ad1a4;
  --accent-strong: #5bb67e;
  --brass: #d6b26f;
  --ember: #d97852;
  --blocked: #b95b43;
  --review: #cfab60;
  --trace: #8ad1a4;
  --active: #6cbf8b;
  --complete: #dce3c2;
  --radius: 8px;
  --content-width: 1240px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, "SF Pro Text", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(138, 209, 164, 0.15), transparent 30%),
    radial-gradient(circle at top right, rgba(217, 120, 82, 0.12), transparent 22%),
    linear-gradient(180deg, #121411 0%, #10120f 100%);
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.is-hidden {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  background: rgba(18, 20, 17, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.preview-strip {
  border-bottom: 1px solid var(--line);
  background: rgba(214, 178, 111, 0.08);
}

.preview-strip__inner {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.preview-strip__inner strong {
  color: var(--brass);
  white-space: nowrap;
}

.brandmark {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brandmark__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #f3ebcf, transparent 25%),
    linear-gradient(135deg, var(--accent), var(--brass));
  box-shadow: 0 0 0 6px rgba(138, 209, 164, 0.08);
}

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

.brandmark__wording strong {
  font-size: 1rem;
  letter-spacing: 0;
}

.brandmark__wording span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.surface-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.surface-switcher__button,
.secondary-button,
.primary-button {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.surface-switcher__button {
  padding: 10px 14px;
  background: transparent;
  color: var(--text-soft);
}

.surface-switcher__button:hover,
.secondary-button:hover,
.primary-button:hover,
.workspace-nav__item:hover {
  transform: translateY(-1px);
  border-color: rgba(138, 209, 164, 0.4);
}

.surface-switcher__button.is-active {
  background: rgba(138, 209, 164, 0.1);
  color: var(--text);
  border-color: rgba(138, 209, 164, 0.42);
}

.hero {
  min-height: calc(100svh - 77px - 88px);
  display: flex;
  align-items: center;
  padding: 20px 24px 12px;
}

.hero__grid,
.band__inner,
.workspace-shell {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero__copy {
  padding: 12px 0 24px;
  animation: rise-in 640ms ease;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.hero h1,
.section-intro h2,
.split-media__copy h2,
.cta-strip h2,
.workspace-header h2 {
  margin: 0;
  max-width: 14ch;
  line-height: 0.96;
  font-size: clamp(2.8rem, 5vw, 5.3rem);
}

.hero__summary,
.section-intro p,
.split-media__copy p,
.workspace-header p,
.workspace-shell__sidebar-head p,
.cta-strip p {
  color: var(--text-soft);
  line-height: 1.55;
  max-width: 62ch;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.primary-button,
.secondary-button {
  padding: 13px 18px;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #b4d78a);
  color: #122118;
  border-color: transparent;
  font-weight: 700;
}

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

.secondary-button--full {
  width: 100%;
}

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

.hero__principles li {
  color: var(--text-soft);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.provenance-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 18px;
}

.provenance-note span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.hero__visual {
  position: relative;
  animation: rise-in 720ms ease;
}

.hero__image,
.split-media__image {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.hero__image {
  min-height: 420px;
  object-fit: cover;
  object-position: top center;
}

.hero__image-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #eef0e7;
}

.hero__image-caption span,
.workspace-header__status span {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.hero__image-caption strong,
.workspace-header__status strong {
  font-size: 0.95rem;
}

.band {
  padding: 92px 24px;
  border-top: 1px solid var(--line);
}

.band--proof {
  padding-top: 52px;
}

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

.proof-item,
.metric-tile,
.workspace-panel {
  background: rgba(28, 32, 27, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.proof-item,
.metric-tile {
  padding: 18px;
}

.proof-item span,
.metric-tile span {
  display: block;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.proof-item strong,
.metric-tile strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.proof-item p,
.metric-tile p,
.workspace-panel p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.section-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
}

.capability-list {
  display: grid;
  gap: 18px;
}

.capability-row {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.capability-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.capability-row h3,
.workspace-panel__head h3 {
  margin: 0 0 8px;
  font-size: 1.24rem;
}

.capability-row p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.split-media {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: center;
}

.split-media__copy h2 {
  max-width: 11ch;
  font-size: clamp(2.2rem, 4vw, 4.1rem);
}

.table-section {
  display: grid;
  gap: 28px;
}

.comparison-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.comparison-table__header,
.comparison-table__row {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1fr;
  gap: 20px;
  padding: 18px 20px;
}

.comparison-table__header {
  background: rgba(214, 178, 111, 0.08);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.comparison-table__row {
  border-top: 1px solid var(--line);
  align-items: start;
}

.comparison-table__row span {
  color: var(--text-soft);
  line-height: 1.55;
}

.comparison-table__row span:first-child {
  color: var(--text);
}

.education-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 16px;
  color: var(--text-soft);
  line-height: 1.55;
}

.cta-strip {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
}

.workspace-surface {
  min-height: calc(100svh - 77px);
  padding: 24px;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  min-height: calc(100svh - 125px);
}

.workspace-shell__sidebar,
.workspace-shell__main {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 28, 23, 0.85);
}

.workspace-shell__sidebar {
  display: flex;
  flex-direction: column;
  padding: 22px;
  gap: 18px;
}

.workspace-shell__sidebar-head h1 {
  margin: 0;
  font-size: 2rem;
}

.workspace-nav {
  display: grid;
  gap: 8px;
}

.workspace-nav__item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.workspace-nav__item.is-active {
  background: rgba(138, 209, 164, 0.12);
  color: var(--text);
  border-color: rgba(138, 209, 164, 0.34);
}

.workspace-shell__sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.workspace-shell__main {
  padding: 22px;
  display: grid;
  gap: 20px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.workspace-header h2 {
  font-size: clamp(2rem, 3vw, 3.1rem);
  max-width: 14ch;
}

.workspace-header__status {
  min-width: 240px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

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

.workspace-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.workspace-columns--callouts {
  grid-template-columns: 1fr 1fr;
}

.workspace-panel {
  padding: 18px;
}

.workspace-panel__head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.workspace-panel__head p {
  margin: 0;
}

.highlight-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.55;
}

.ledger-table {
  display: grid;
  gap: 12px;
}

.ledger-table__row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.ledger-table__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ledger-table__row strong,
.ledger-table__row span {
  display: block;
}

.ledger-table__row > div > span {
  color: var(--text-muted);
  margin-top: 4px;
}

.state-pill {
  padding: 6px 10px;
  border-radius: 999px;
  text-transform: capitalize;
  font-size: 0.82rem;
  border: 1px solid currentColor;
}

.state-pill--review {
  color: var(--review);
}

.state-pill--blocked {
  color: var(--blocked);
}

.state-pill--trace {
  color: var(--trace);
}

.state-pill--active {
  color: var(--active);
}

.state-pill--complete {
  color: var(--complete);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .hero__grid,
  .section-grid,
  .split-media,
  .workspace-shell,
  .workspace-columns {
    grid-template-columns: 1fr;
  }

  .proof-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: auto;
    padding-top: 40px;
  }

  .hero h1,
  .section-intro h2,
  .split-media__copy h2,
  .cta-strip h2,
  .workspace-header h2 {
    max-width: none;
  }

  .workspace-shell {
    min-height: auto;
  }

  .workspace-header,
  .cta-strip {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .topbar,
  .preview-strip__inner,
  .hero,
  .band,
  .workspace-surface {
    padding-left: 16px;
    padding-right: 16px;
  }

  .proof-grid,
  .metric-grid,
  .workspace-columns--callouts,
  .hero__principles,
  .comparison-table__header,
  .comparison-table__row {
    grid-template-columns: 1fr;
  }

  .surface-switcher {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar {
    flex-direction: column;
    align-items: start;
  }

  .hero__image {
    min-height: 300px;
  }

  .hero__image-caption {
    position: static;
    padding-top: 14px;
    margin-top: 14px;
  }

  .workspace-shell__sidebar,
  .workspace-shell__main {
    padding: 16px;
  }
}
