/* Shared section shell (reused by #pricing) */
.sec {
  max-width: var(--container);
  margin: 0 auto;
  padding: 118px var(--gutter) 0;
}

/* ── CLI terminal mock (lives in the "CLI for agents" feature cell) ── */
/* The .term-* / .ok / .dim / .warn / .prompt / .cmd / .cursor classes below are
   emitted at runtime by assets/js/terminal-demo.js — do not strip as "unused". */
.fm-term {
  /* Fixed to the tallest transcript frame (8 lines) so the typing animation
     never grows/shrinks the box and shifts the cells below it. */
  height: 204px;
  padding: 14px 16px;
  background: #0c0c0c;
  color: #cfcfcf;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
}

.term-line {
  white-space: pre-wrap;
}

.term-line.out {
  color: #aeb2af;
}

.prompt {
  color: var(--green);
}

.cmd {
  color: #ededed;
}

.ok {
  color: var(--green-soft);
}

.dim {
  color: #767676;
}

.warn {
  color: var(--amber);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-left: 4px;
  background: var(--green);
  vertical-align: -2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* ── feature grid (bordered 2-col "why" section) ── */
.feat2 {
  max-width: min(1080px, calc(100% - 2 * var(--gutter)));
}
.feat2-head {
  text-align: center;
  margin: 0 auto 56px;
}
.kicker-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 9px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 12.5px;
}
.kicker-chip svg {
  width: 14px;
  height: 14px;
  color: var(--green-soft);
}
.feat2-title {
  color: #fff;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.feat2-sub {
  max-width: 540px;
  margin: 18px auto 0;
  color: #9b9b9b;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
}
.feat2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* same latitude-style frosted matte frame as the hero screenshot (--frame-*),
     here built as an ~11px translucent border. The 1px outer hairline is added
     via box-shadow since the border is the ring. background-clip keeps the
     inner wash off the ring. */
  border: 11px solid var(--frame-ring);
  border-radius: var(--frame-radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.012);
  background-clip: padding-box;
  box-shadow:
    0 0 0 1px var(--frame-hairline),
    var(--frame-shadow);
}
.feat2-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.feat2-col:first-child {
  border-right: 1px solid var(--border);
}
.feat2-cell {
  padding: 36px 34px;
  min-width: 0;
  /* reuse the hero film grain, contained inside each card. Same alpha-baked
     noise as .bg-noise, here carried on the card's own background so it's
     clipped to the card and always sits behind the card's content. Kept soft. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
/* let the last card in each column grow to fill the taller sibling column, so
   the grid bottom is even and the grain reaches the bottom edge (no dead gap) */
.feat2-col > .feat2-cell:last-child {
  flex: 1 1 auto;
}
.feat2-cell:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.feat2-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 11px;
  color: #fff;
  /* Uniform grey for every feature icon — no per-feature colour. */
  background: linear-gradient(180deg, #2c2c2c, #161616);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 6px 16px -6px rgba(0, 0, 0, 0.6);
}
.feat2-ic svg {
  width: 22px;
  height: 22px;
}
.feat2-cell h3 {
  color: #f2f2f2;
  font-size: 18px;
  font-weight: 700;
}
.feat2-cell p {
  margin-top: 10px;
  color: #8f8f8f;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.62;
}
.feat2-cell p .mono {
  color: #c7c7c7;
}
/* link inside a feature description (e.g. todo.txt) */
.feat2-cell p a {
  color: var(--green-soft);
}
.feat2-cell p a:hover {
  color: #fff;
}

/* embedded mockups */
.feat2-mock {
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px -22px rgba(0, 0, 0, 0.85);
}
.fm-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  background: #161616;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.fm-bar .d {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.fm-bar .d.r {
  background: #ff605c;
}
.fm-bar .d.y {
  background: #ffbd44;
}
.fm-bar .d.g {
  background: #35c75a;
}
.fm-name {
  margin-left: 6px;
  color: #6f6f6f;
  font-family: var(--mono);
  font-size: 11.5px;
}
.fm-body {
  margin: 0;
  padding: 16px 18px;
  background: #0c0c0c;
  color: #cfcfcf;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.85;
  white-space: pre;
  overflow-x: auto;
}
.fm-body .done {
  color: var(--green-soft);
}
.fm-body .dim {
  color: #6a6a6a;
}
/* todo.txt metadata tokens */
.fm-body .pri {
  color: var(--amber);
}
.fm-body .proj {
  color: var(--green-soft);
}
.fm-body .ctx {
  color: var(--purple);
}
.fm-body .due {
  color: var(--blue);
}
.fm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 11px 16px;
  background: #0c0c0c;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #8b8b8b;
  font-family: var(--mono);
  font-size: 11px;
}
.fm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fm-legend .sw {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
}
.fm-legend .sw.pri {
  background: var(--amber);
}
.fm-legend .sw.proj {
  background: var(--green-soft);
}
.fm-legend .sw.ctx {
  background: var(--purple);
}
.fm-legend .sw.due {
  background: var(--blue);
}

/* file/editor-style mock (markdown file) */
.filecard {
  background: #0c0c0c;
}
.file-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: #141414;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.file-tab .file-ic {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--green-soft);
}
.file-tab .file-name {
  color: #cfcfcf;
  font-family: var(--mono);
  font-size: 12px;
}
.file-tab .file-ext {
  margin-left: auto;
  padding: 2px 8px;
  color: #6a6a6a;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}
.file-body {
  display: flex;
  background: #0c0c0c;
}
.file-nums {
  margin: 0;
  padding: 16px 0;
  flex: 0 0 auto;
  text-align: right;
  user-select: none;
  color: #4a4a4a;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.85;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.file-nums span {
  display: block;
  padding: 0 11px;
}
.fm-body.file-code {
  padding: 16px 16px 16px 13px;
  flex: 1 1 auto;
  min-width: 0;
}

/* command palette mockup */
.cmdk {
  background: #0c0c0c;
}
.cmdk-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #8f8f8f;
  font-family: var(--mono);
  font-size: 13px;
}
.cmdk-in kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: #bdbdbd;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
}
.cmdk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: #cfcfcf;
  font-family: var(--mono);
  font-size: 12.5px;
}
.cmdk-row .ic {
  width: 14px;
  text-align: center;
  color: var(--green-soft);
}
.cmdk-row .k {
  margin-left: auto;
  color: #6f6f6f;
  font-size: 11px;
}
.cmdk-row.sel {
  background: rgba(67, 185, 106, 0.1);
  color: #fff;
}

/* collapse the feature grid to one column early — two columns get cramped on tablets */
@media (max-width: 900px) {
  .feat2-grid {
    grid-template-columns: 1fr;
  }
  .feat2-col:first-child {
    border-right: none;
  }
  .feat2-col:first-child .feat2-cell:last-child {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  .sec {
    padding-top: 88px;
  }
  .feat2-title {
    font-size: 30px;
  }
  .feat2-cell {
    padding: 28px 22px;
  }
  .fm-body,
  .fm-term,
  .file-nums {
    font-size: 11.5px;
  }
}

/* Honour reduced-motion globally. Placed last so it overrides the animations
   defined above (.cursor), in base.css (smooth scroll) and hero.css (hero fade). */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fonts-ready .hero-copy {
    transition: none;
  }
  .cursor {
    animation: none;
  }
}
