/* =============================================================================
   enactive.dev — landing page
   Brand v1.0. Colour, type and geometry come from /brand/brand.css; the tokens
   below are the subset this page needs, copied verbatim. Change one, change both.

   This page deliberately commits to the dark theme: Enactive is a dark desktop
   environment, and the site should look like the product, not like a document.
   Every colour is therefore painted explicitly — nothing is inherited.
   ============================================================================= */

:root {
  /* Ink — the environment */
  --ink-950: #0A0B0D;
  --ink-900: #101216;
  --ink-800: #171A20;
  --ink-700: #21252E;
  --ink-600: #2E3440;
  --ink-500: #414957;
  --ink-400: #5C6575;
  --ink-300: #8A93A3;
  --ink-200: #B9C0CC;
  --ink-100: #DDE2E9;
  --ink-50:  #F2F4F7;

  /* Ember — action, and nothing else */
  --ember-300: #FF9C72;
  --ember-400: #FF7C48;
  --ember-500: #FF5F26;
  --ember-600: #E84A14;
  --amber-400: #FFB020;

  --success: #34D399;
  --warning: #FBBF24;
  --danger:  #FF5D7A;
  --info:    #4C8DFF;

  --grad-ember: linear-gradient(135deg, var(--ember-500) 0%, var(--amber-400) 100%);

  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --ease: cubic-bezier(.2, .6, .2, 1);
  --container: min(1140px, 92vw);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--ink-50);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.0625rem; letter-spacing: -0.02em; }
p { margin: 0; }

code, .mono { font-family: var(--mono); }
code {
  font-size: 0.9em;
  color: var(--ink-100);
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-sm);
  padding: 0.08em 0.36em;
}

:focus-visible { outline: 2px solid var(--ember-500); outline-offset: 3px; }

.container { width: var(--container); margin-inline: auto; }

section { padding: 84px 0; border-top: 1px solid var(--ink-800); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-300);
  margin: 0 0 18px;
}
.section-lead {
  color: var(--ink-300);
  font-size: 1.0625rem;
  max-width: 62ch;
  margin-top: 14px;
}
.fineprint { color: var(--ink-400); font-size: 0.875rem; }

/* ---------- buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.78rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--ember-500);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 140ms var(--ease), transform 140ms var(--ease);
}
.btn:hover { background: var(--ember-600); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink-100); border-color: var(--ink-600); }
.btn--ghost:hover { background: var(--ink-800); border-color: var(--ink-500); }
.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.85rem; }
.btn--wiki { color: var(--ink-950); }
.btn--wiki:hover { background: var(--ember-400); }

/* ---------- nav ----------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-800);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.03em; }
.logo svg { width: 26px; height: 26px; flex: none; }
.logo__tld { color: var(--ink-400); }
.nav__links { display: flex; gap: 26px; margin-left: auto; font-size: 0.9rem; color: var(--ink-300); }
.nav__links a { transition: color 120ms var(--ease); }
.nav__links a:hover { color: var(--ink-50); }

/* ---------- hero ---------------------------------------------------------- */
.hero {
  border-top: 0;
  padding: 76px 0 88px;
  background:
    radial-gradient(58% 46% at 78% 6%, rgba(255, 95, 38, 0.14), transparent 68%),
    radial-gradient(46% 40% at 6% 86%, rgba(255, 176, 32, 0.07), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: 56px; align-items: center; }
.hero h1 .accent {
  background: var(--grad-ember);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { color: var(--ink-200); font-size: 1.14rem; max-width: 52ch; margin-top: 22px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  font-size: 0.85rem;
  color: var(--ink-300);
  font-family: var(--mono);
}
.hero__facts li::before { content: "— "; color: var(--ember-500); }

/* ---------- window mock --------------------------------------------------- */
.window {
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--ink-950);
  border-bottom: 1px solid var(--ink-700);
}
.window__title { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--ink-300); }

/* The app draws its own title bar, Windows-side: minimise, maximise, close. The mock used to show
   macOS traffic lights, which is a different operating system's window and not this product's. */
.window__caption { margin-left: auto; display: flex; gap: 14px; color: var(--ink-400); font-size: 0.72rem; font-style: normal; }
.window__caption i { font-style: normal; }
.window__caption .x { color: var(--ink-300); }

.status { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; }
.status--run { color: var(--ember-500); }
.status--wait { color: var(--amber-400); }
.window__body { padding: 18px; }

/* ---------- the desktop shell -------------------------------------------- */
/* Panels, labels and status words follow src/Enactive.App.Ui/MainWindow.axaml. */
/* The hero column is about 460px wide, so this is drawn for that width and grows with it. The
   first attempt was laid out at desktop-window proportions and pushed its own buttons off the
   card - a mock of a window that does not fit is a worse advertisement than no mock. */
.app__grid { display: grid; grid-template-columns: 132px 1fr; }
.app__rail { padding: 12px 10px; border-right: 1px solid var(--ink-700); background: var(--ink-950); min-width: 0; }
.panelHeader { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-400); margin: 0 0 5px; }
.rail__run + .panelHeader { margin-top: 14px; }
.rail__name { font-size: 0.74rem; font-weight: 600; color: var(--ink-100); margin: 0; overflow-wrap: anywhere; }
.rail__path { font-family: var(--mono); font-size: 0.56rem; color: var(--ink-400); margin: 2px 0 14px; overflow-wrap: anywhere; }
.rail__run { display: flex; flex-direction: column; gap: 2px; padding: 6px 7px; margin-bottom: 5px; border-radius: 6px; border: 1px solid var(--ink-700); background: var(--ink-900); font-size: 0.68rem; line-height: 1.3; color: var(--ink-100); }
.rail__run small { font-family: var(--mono); font-size: 0.56rem; color: var(--ink-400); }
.rail__run--muted { color: var(--ink-300); border-style: dashed; }
.rail__hint { font-family: var(--mono); font-size: 0.56rem; color: var(--ink-500); margin: 14px 0 0; overflow-wrap: anywhere; }

.app__main { padding: 12px 13px 13px; min-width: 0; }
.app__task { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--ink-700); }
.app__taskTitle { font-size: 0.86rem; font-weight: 600; line-height: 1.25; color: var(--ink-50); margin: 0; }
.app__taskIntent { font-size: 0.7rem; line-height: 1.3; color: var(--ink-400); margin: 3px 0 0; }
.pill { margin-left: auto; flex: none; font-family: var(--mono); font-size: 0.6rem; padding: 3px 9px; border-radius: 999px; background: var(--ember-500); color: #FFFFFF; }
.pill.is-wait { background: var(--amber-400); color: var(--ink-950); }

.app__tabs { display: flex; gap: 14px; border-bottom: 1px solid var(--ink-700); margin-bottom: 10px; }
.app__tabs .tab { font-size: 0.72rem; color: var(--ink-400); padding: 8px 0; border-bottom: 2px solid transparent; }
.app__tabs .tab.on { color: var(--ink-50); border-bottom-color: var(--ember-500); }

/* A step card takes its LEFT EDGE colour from its status, which is what the application does. */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps li {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 6px;
  background: var(--ink-900); border: 1px solid var(--ink-700);
  border-left: 3px solid var(--ink-500);
  font-size: 0.76rem; line-height: 1.3; color: var(--ink-300);
  transition: color 220ms var(--ease), border-left-color 220ms var(--ease);
}
.steps li.done { color: var(--ink-100); border-left-color: var(--success); }
.steps li.run { color: var(--ink-50); border-left-color: var(--ember-500); }
.steps li .st { margin-left: auto; flex: none; font-family: var(--mono); font-size: 0.6rem; color: var(--ink-500); }
.steps li.run .st { color: var(--ember-300); animation: pulse 1.6s var(--ease) infinite; }
.step__title { min-width: 0; }

.app__activity { font-family: var(--mono); font-size: 0.64rem; color: var(--ink-300); margin: 10px 0 0; min-height: 1.3em; overflow-wrap: anywhere; }

/* Input first, then everything that decides what Run does, on one line beneath it - which is the
   arrangement the window uses: the controls that change the next run sit beside the button that
   starts it, not on the far side of the screen. */
.app__command { border-top: 1px solid var(--ink-700); padding: 11px 13px; background: var(--ink-950); display: flex; flex-direction: column; gap: 9px; }
.app__input { font-size: 0.74rem; color: var(--ink-500); margin: 0; padding: 9px 11px; border: 1px solid var(--ink-700); border-radius: 7px; background: var(--ink-900); }
.app__controls { display: flex; flex-direction: column; gap: 4px; flex: 1 1 190px; min-width: 0; }
.app__row { display: flex; gap: 9px; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
.combo { font-size: 0.66rem; color: var(--ink-100); border: 1px solid var(--ink-600); border-radius: 5px; padding: 2px 8px; background: var(--ink-900); }
.check { font-size: 0.66rem; color: var(--ink-300); position: relative; padding-left: 15px; }
.check::before { content: ""; position: absolute; left: 0; top: 2px; width: 10px; height: 10px; border: 1px solid var(--ink-500); border-radius: 3px; }
/* The tier is named on the slider rather than floating above it, and the wording is
   MainWindowViewModel.LevelName verbatim. Warning yellow is that tier's colour in Brand.cs. */
.app__autonomy { font-size: 0.62rem; line-height: 1.3; color: var(--warning); margin: 1px 0 0; }
.slider { display: flex; align-items: center; }
.slider i { height: 2px; flex: 1; background: var(--ink-600); }
.slider i.on { flex: none; width: 10px; height: 10px; border-radius: 999px; background: var(--warning); }
.app__foot { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.app__buttons { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; flex: none; }
.app__buttons .chip { font-size: 0.7rem; padding: 5px 11px; }

.demo__note { font-size: 0.72rem; color: var(--ink-400); margin: 10px 2px 0; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.window__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 0.8rem; font-weight: 600;
  padding: 6px 13px; border-radius: 8px;
  background: var(--ember-500); color: #FFFFFF;
}
.chip--muted { background: transparent; color: var(--ink-200); border: 1px solid var(--ink-600); }
.chip--danger { background: transparent; color: var(--danger); border: 1px solid currentColor; }

@media (max-width: 720px) {
  .app__grid { grid-template-columns: 1fr; }
  .app__rail { display: none; }
  .app__command { grid-template-columns: 1fr; }
  .app__controls { width: auto; }
}

/* ---------- the web panel ------------------------------------------------ */
/* Drawn from the panel the gateway serves: its tabs, its counts, and the permission on the card
   of the task that raised it rather than on a page of its own. */
.panel__live { margin-left: auto; font-size: 0.72rem; color: var(--success); position: relative; padding-left: 14px; }
.panel__live::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 999px; background: var(--success); }
.panel__tabs { display: flex; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--ink-700); background: var(--ink-950); }
.panel__tabs .tab { font-size: 0.78rem; color: var(--ink-400); padding: 11px 0; border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px; }
.panel__tabs .tab.on { color: var(--ink-50); border-bottom-color: var(--ember-500); }
.panel__tabs b { font-size: 0.64rem; font-weight: 600; background: var(--ember-500); color: #FFFFFF; border-radius: 999px; padding: 1px 6px; }
/* Five tabs, as the panel has. On a phone the row was 57px wider than the window drawn around it and the
   last tab was cut off: tighter there, and never past the edge. */
.panel__tabs { overflow-x: auto; scrollbar-width: none; }
.panel__tabs::-webkit-scrollbar { display: none; }
@media (max-width: 480px) {
  .panel__tabs { gap: 9px; padding: 0 12px; }
  .panel__tabs .tab { font-size: 0.69rem; gap: 4px; }
  .panel__tabs b { padding: 1px 5px; }
}
.panel__body { padding: 16px; }
.panel__card { border: 1px solid var(--ink-700); border-radius: var(--radius); background: var(--ink-900); padding: 14px; }
.panel__head { display: flex; align-items: center; gap: 10px; }
.panel__title { font-size: 0.9rem; font-weight: 600; color: var(--ink-50); }
.panel__meta { font-family: var(--mono); font-size: 0.66rem; color: var(--ink-400); margin: 6px 0 12px; overflow-wrap: anywhere; }

/* The question, inset in the card of the task that raised it. Ember-edged because a task waiting
   on an answer should be the loudest thing on the page. */
.ask { margin-top: 14px; padding: 13px; border: 1px solid var(--ember-500); border-left-width: 3px; border-radius: var(--radius); background: var(--ink-950); }
.ask__state { margin-left: auto; font-size: 0.72rem; font-weight: 600; color: var(--warning); }
.ask__topic { font-size: 0.85rem; color: var(--ink-100); margin: 10px 0 0; }

/* ---------- pipeline strip ------------------------------------------------ */
.pipeline { padding: 34px 0; }
.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.flow span { color: var(--ink-300); white-space: nowrap; }
.flow i { color: var(--ink-600); font-style: normal; }
.flow .hot { color: var(--ember-500); font-weight: 500; }

/* ---------- cards --------------------------------------------------------- */
.cards { display: grid; gap: 1px; background: var(--ink-800); border: 1px solid var(--ink-800); border-radius: var(--radius-lg); overflow: hidden; margin-top: 42px; }
.cards--4 { grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); }
.card { background: var(--ink-950); padding: 26px 24px; display: flex; flex-direction: column; gap: 9px; transition: background 160ms var(--ease); }
.card:hover { background: var(--ink-900); }
.card__icon { font-family: var(--mono); font-size: 0.95rem; color: var(--ember-500); }
.card p { color: var(--ink-300); font-size: 0.925rem; }
.card em { color: var(--ink-200); font-style: normal; }
.card strong { color: var(--ink-100); font-weight: 600; }

/* ---------- decision ------------------------------------------------------ */
.decision__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 56px; align-items: center; }
.window--wait { border-color: var(--amber-400); }

.decision__topic { font-size: 0.95rem; font-weight: 600; color: var(--ink-50); margin: 0; }
.decision__meta { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-400); margin: 4px 0 12px; overflow-wrap: anywhere; }
/* The action is shown whole and scrolls inside its own box. A command that runs off the edge of
   the card is a command nobody read, which is the failure this element exists to prevent. */
.decision__action {
  font-family: var(--mono); font-size: 0.76rem; color: var(--ink-100);
  background: var(--ink-950); border: 1px solid var(--ink-700); border-radius: 8px;
  padding: 11px 12px; margin: 0; max-height: 8.5em; overflow: auto; white-space: pre;
}
.decision__note { font-size: 0.74rem; color: var(--ink-400); margin: 10px 0 14px; }

/* ---------- team of models ------------------------------------------------ */
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 18px; margin-top: 42px; }
.phase { border: 1px solid var(--ink-700); border-left: 2px solid var(--ember-500); border-radius: var(--radius); padding: 20px 22px; background: var(--ink-900); }
.phase__name { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ember-300); margin-bottom: 7px; }
.phase p { color: var(--ink-300); font-size: 0.92rem; }
.providers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tag { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-300); border: 1px solid var(--ink-700); border-radius: 999px; padding: 5px 13px; }
.tag code { background: none; border: 0; padding: 0; color: var(--ink-200); }
.fineprint--note { margin-top: 18px; max-width: 70ch; }

/* ---------- architecture -------------------------------------------------- */
.arch__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; align-items: center; }
.arch__list { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; }
.arch__list li { color: var(--ink-300); font-size: 0.925rem; padding-left: 15px; border-left: 1px solid var(--ink-700); }
.arch__list strong { color: var(--ink-50); font-family: var(--mono); font-size: 0.85rem; font-weight: 500; }
.arch__svg { width: 100%; height: auto; display: block; }

/* ---------- get started --------------------------------------------------- */
.code {
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.75;
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  overflow-x: auto;
  color: var(--ink-100);
  margin: 34px 0 0;
}
.code .c { color: var(--ink-400); }
.code .p { color: var(--ember-300); }

.status-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 34px;
  padding: 16px 18px;
  border: 1px solid var(--ink-700);
  border-left: 2px solid var(--amber-400);
  border-radius: var(--radius);
  background: var(--ink-900);
}
.status-note__k { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--amber-400); padding-top: 3px; white-space: nowrap; }
.status-note p { color: var(--ink-300); font-size: 0.9rem; }

/* ---------- footer -------------------------------------------------------- */
.footer { border-top: 1px solid var(--ink-800); padding: 46px 0 56px; }
.footer__inner { display: flex; flex-direction: column; gap: 14px; }
.footer p { color: var(--ink-300); max-width: 58ch; }

/* ---------- responsive ---------------------------------------------------- */
@media (max-width: 940px) {
  .hero__grid, .decision__grid, .arch__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .nav__links { display: none; }
  .nav .btn--wiki { margin-left: auto; }
  section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .nav__inner { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
