/* The project site (docs/brand-guidelines.md): brand surfaces in Icon Navy with Ember accents, the system font only,
   flat (no shadows, no glows). The phone in the hero uses the app's own dark tokens (packages/web/src/tokens.css). */
:root {
  --navy: #131f2a;
  --navy-card: #1b2b3a;
  --navy-line: #2c3f52;
  --ember: #f7931e;
  --ember-deep: #e85d1c;
  --ember-glow: #fdab1a;
  --smoke: #f8fafc;
  --on-navy-muted: #cbd5e1;

  --bg: #f8fafc;
  --fg: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --line: #e2e8f0;
  /* Ember is never text on a light ground; the icons and links take a darker orange here */
  --mark: #c2410c;
  --code-bg: #131f2a;
  --code-fg: #e2e8f0;
  color-scheme: light;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131f2a;
    --fg: #e2e8f0;
    --muted: #a3b1c2;
    --card: #1b2b3a;
    --line: #2c3f52;
    --mark: #fdab1a;
    --code-bg: #0d161e;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px / 1.55 var(--font);
  -webkit-text-size-adjust: 100%;
}
img,
svg {
  display: block;
}
h1,
h2,
h3 {
  line-height: 1.15;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  margin: 0 0 12px;
}
h3 {
  font-size: 1.1rem;
  margin: 14px 0 6px;
}
p {
  margin: 0 0 12px;
  text-wrap: pretty;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--ember-glow);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
}
.section {
  padding-top: clamp(56px, 9vw, 104px);
  padding-bottom: clamp(56px, 9vw, 104px);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 10px 14px;
  background: var(--smoke);
  color: var(--navy);
  border-radius: 10px;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}
.link {
  color: var(--mark);
  font-weight: 600;
  text-underline-offset: 3px;
}
.defs {
  position: absolute;
  width: 0;
  height: 0;
}
/* Icons follow the mark: Ember gradient line art in one heavy weight, round ends, sharp peaks, a lit point */
.icon {
  width: 28px;
  height: 28px;
  overflow: visible;
  fill: none;
  stroke: url(#ember);
  stroke-width: 3.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* drawn on mark-small.svg's 64 grid, with its gradient and stroke */
.icon.small {
  stroke: url(#ember-box);
  stroke-width: 4.6;
}
.icon .peak {
  stroke-linejoin: miter;
  stroke-miterlimit: 10;
}
.icon .lit {
  fill: var(--ember-glow);
  stroke: none;
}
/* the mark sits on navy, never on a light ground: the light pages put it on a navy tile, like the app icon */
.tile .icon {
  width: 32px;
  height: 32px;
}
.tile {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--navy);
}

/* Hero: a brand surface in both themes */
.hero {
  background: var(--navy);
  color: var(--smoke);
  overflow: hidden;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.nav-home {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav ul a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--on-navy-muted);
  text-decoration: none;
  font-size: 15px;
  border-radius: 10px;
  transition: color 150ms ease-out;
}
.nav ul a:hover {
  color: var(--smoke);
}
/* on a phone, keep only the two links people come for */
@media (max-width: 560px) {
  .nav li:nth-child(-n + 2) {
    display: none;
  }
}
.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(48px, 8vw, 96px);
}
@media (max-width: 860px) {
  .hero-body {
    grid-template-columns: 1fr;
  }
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--navy-line);
  border-radius: 999px;
  color: var(--on-navy-muted);
  font-size: 14px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember-glow);
}
.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 20px 0 20px;
}
.glow {
  color: var(--ember-glow);
}
.lede {
  max-width: 34em;
  color: var(--on-navy-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}
.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 150ms ease-out,
    border-color 150ms ease-out;
}
.btn-ember {
  background: var(--ember);
  color: var(--navy);
}
.btn-ember:hover {
  background: var(--ember-glow);
}
.btn-ghost {
  border: 1px solid var(--navy-line);
  color: var(--smoke);
}
.btn-ghost:hover {
  border-color: var(--on-navy-muted);
}

/* The phone: the item page and its approve bar, in the app's dark theme */
.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px 0;
}
/* the original mark, unaltered, beside the phone with its clear space (a quarter of its height); only where it fits */
.hero-mark {
  display: none;
  position: absolute;
  top: 24px;
  left: 332px;
  width: 120px;
  height: auto;
}
@media (min-width: 1080px) {
  .phone-stage {
    justify-items: start;
  }
  .hero-mark {
    display: block;
  }
}
.phone {
  --app-bg: #0f172a;
  --app-card: #1e293b;
  --app-line: #334155;
  --app-fg: #e2e8f0;
  --app-muted: #94a3b8;
  --app-go: #22c55e;
  --app-on-go: #052e16;
  --app-reel: #a78bfa;
  position: relative;
  width: 300px;
  max-width: 100%;
  border: 1px solid var(--navy-line);
  border-radius: 36px;
  padding: 10px;
  background: #0b1219;
}
.phone > * {
  background: var(--app-bg);
  color: var(--app-fg);
}
.app-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 14px 10px;
  border-radius: 26px 26px 0 0;
  font-size: 14px;
}
.app-back {
  color: var(--app-go);
  font-size: 13px;
}
.app-body {
  padding: 4px 14px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.app-target {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--app-muted);
}
.app-when {
  margin: 0 0 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-reel {
  background: var(--app-reel);
}
.app-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  margin-bottom: 10px;
  border-radius: 12px;
  background: #000;
}
.app-media svg {
  width: 32px;
  fill: none;
  stroke: var(--app-muted);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.app-label {
  margin: 0 0 4px;
  font-weight: 700;
}
.app-caption {
  padding: 8px 10px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: var(--app-card);
}
.app-approve {
  padding: 10px 14px 16px;
  border-top: 1px solid var(--app-line);
  border-radius: 0 0 26px 26px;
  background: var(--app-card);
  font-size: 12px;
}
.app-approve p {
  margin: 0 0 8px;
  color: var(--app-muted);
}
.app-btn {
  display: block;
  padding: 12px;
  border-radius: 10px;
  background: var(--app-go);
  color: var(--app-on-go);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

/* Three promises */
.promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-content: start;
  align-items: center;
  gap: 14px 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
/* the icon sits beside the heading; the text runs the card's full width under both */
.card h3 {
  margin: 0;
}
.card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

/* How it works: the relay of beacons, a brand band */
.band {
  background: var(--navy);
  color: var(--smoke);
}
@media (prefers-color-scheme: dark) {
  .band {
    background: #0d161e;
  }
}
.eyebrow {
  color: var(--ember-glow);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.band-lede {
  max-width: 44em;
  color: var(--on-navy-muted);
}
.relay {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: relay;
}
/* the line the signal travels along, from one tower to the next */
.relay::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 26px;
  right: 26px;
  border-top: 1px dashed var(--ember);
  opacity: 0.6;
}
.relay li {
  position: relative;
}
.relay li > .icon {
  box-sizing: content-box;
  padding: 12px;
  border: 1px solid var(--navy-line);
  border-radius: 50%;
  background: var(--navy);
}
@media (prefers-color-scheme: dark) {
  .relay li > .icon {
    background: #0d161e;
  }
}
.relay-term {
  margin: 16px 0 6px;
  font-weight: 700;
  font-size: 1.1rem;
}
.relay-term span {
  display: block;
  color: var(--ember-glow);
  font-weight: 400;
  font-size: 15px;
}
.relay li > p:last-child {
  color: var(--on-navy-muted);
}
@media (max-width: 860px) {
  .relay {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .relay::before {
    top: 26px;
    bottom: 26px;
    left: 26px;
    right: auto;
    border-top: 0;
    border-left: 1px dashed var(--ember);
  }
  .relay li {
    padding-left: 72px;
  }
  .relay li > .icon {
    position: absolute;
    left: 0;
    top: 0;
  }
  .relay-term {
    margin-top: 0;
  }
}

/* Two-column sections */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}
.section + .section {
  padding-top: 0;
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.split > div > p {
  color: var(--muted);
}
.facts {
  margin: 0;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 560px) {
  .facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
.facts dt {
  font-weight: 700;
}
.facts dd {
  margin: 0;
  color: var(--muted);
}

/* What an agent key can do */
.console {
  padding: 24px;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-fg);
  font-size: 15px;
}
.console-head {
  margin: 0 0 10px;
  color: var(--on-navy-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.console-no {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--navy-line);
  color: var(--ember-glow);
}
.console ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.console li {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 12px;
  padding: 4px 0;
}
@media (max-width: 560px) {
  .console li {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 6px 0;
  }
}
.console code {
  font-family: var(--mono);
  color: var(--smoke);
}
.console-no + ul b {
  color: var(--ember-glow);
}

/* Run your own */
.section-lede {
  max-width: 44em;
  color: var(--muted);
}
.code {
  position: relative;
  max-width: 720px;
  margin-top: 24px;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-fg);
}
.code pre {
  margin: 0;
  padding: 20px 96px 20px 20px;
  overflow-x: auto;
  font: 15px / 1.7 var(--mono);
}
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--navy-line);
  border-radius: 10px;
  background: transparent;
  color: var(--smoke);
  font: 600 14px var(--font);
  cursor: pointer;
}
.copy:hover {
  border-color: var(--on-navy-muted);
}
.next {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.next a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.footer p {
  margin: 0;
}
.footer-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-weight: 700;
}
