/* Features: the #how-it-works intro with its 01 to 04 rail, then four feature rows (text on the left, the framed
   bot card on the right, never alternating). Spec 15 and 16; the films became the crew's cards on October 29. */

/* Intro: 48 / 64 (768+) / 96 (1024+) on top, nothing below; the row ends on a 1px rule */
.intro {
  background: var(--page);
  padding-top: 48px;
}
@media (min-width: 768px) {
  .intro { padding-top: 64px; }
}
@media (min-width: 1024px) {
  .intro { padding-top: 96px; }
}

.intro-row {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--surface-2);
}
@media (min-width: 1024px) {
  .intro-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 64px;
  }
}

.intro-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 672px;
}
.intro-eyebrow {
  color: var(--accent);
}
.intro-title {
  white-space: pre-line; /* the line break after "company" is in the markup */
  text-wrap: balance;
}
.intro-text {
  max-width: 576px;
  color: var(--text-2);
}

/* Rail: two columns on phones, one row from 640, a 2x2 grid from 1024.
   The 24px gaps at 1024+ reproduce the measured link positions (x1136 / x1268, y1931 / y1999). */
.intro-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 32px;
}
@media (min-width: 640px) {
  .intro-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
  }
}
@media (min-width: 1024px) {
  .intro-rail {
    flex: none;
    padding-bottom: 4px;
  }
  .intro-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

/* Feature rows: 652px tall at 1440 (80 + 492 + 80) */
.feat {
  background: var(--page);
  padding-block: 48px;
}
@media (min-width: 768px) {
  .feat { padding-block: 64px; }
}
@media (min-width: 1024px) {
  .feat { padding-block: 80px; }
}

.feat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}
@media (min-width: 1024px) {
  .feat-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 40px;
  }
  .feat-text { grid-column: span 4; }
  .feat-figure { grid-column: span 8; }
}
@media (min-width: 1280px) {
  .feat-grid { gap: 56px; }
}

.feat-text {
  display: grid;
  gap: 24px;
}
.feat-eyebrow {
  display: flex;
  gap: 12px;
  color: var(--accent);
}
.feat-num {
  color: var(--text-3);
}
.feat-title {
  text-wrap: balance;
}
.feat-copy {
  max-width: 512px;
  color: var(--text-2);
  text-wrap: pretty;
}
.feat-cta {
  justify-self: start;
  min-height: 44px; /* the face stretches to 44 */
  margin-top: 8px;
}

/* Figure: a 12px variant-A frame in #292623 around the bot's card: its portrait, then its real rules.
   No radius, glow, shadow or hover. */
.feat-figure {
  position: relative;
  z-index: 45; /* above the CRT overlay */
  min-width: 0;
}
.feat-frame {
  position: relative;
  padding: 12px;
}
.feat-frame > .pframe {
  color: var(--surface-2);
}
.feat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface);
}
@media (min-width: 640px) {
  .feat-card { grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); }
}

.feat-bot {
  display: grid;
  align-content: start;
  background: #0a0a0a;
}
.feat-bot-art {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
}
@media (max-width: 639px) {
  .feat-bot { grid-template-columns: 112px minmax(0, 1fr); align-items: center; }
  .feat-bot-art { width: 112px; }
}
.feat-bot-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
  padding: 14px 16px;
}
.feat-bot-name .t-cap-sm {
  color: var(--copper-400);
  text-transform: uppercase;
}
.feat-bot-also {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 16px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-2);
}
@media (max-width: 639px) {
  .feat-bot-also { grid-column: 1 / -1; }
}
.feat-bot-also-art {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}
.feat-bot-also p {
  margin: 0;
  color: var(--text-2);
}
.feat-bot-also b {
  color: #fff;
  font-weight: inherit;
}

/* Logbook has no figure: a named panel under the bots */
.feat-bot-log {
  margin: 0 16px 16px;
  padding: 10px 12px;
  border: 1px dashed var(--stone-600);
}
@media (max-width: 639px) {
  .feat-bot-log { grid-column: 1 / -1; }
}
.feat-bot-log p {
  margin: 0;
  color: var(--text-2);
}
.feat-bot-log b {
  color: var(--copper-400);
  font-weight: inherit;
}

.feat-rules {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
  padding: 24px;
}
@media (max-width: 639px) {
  .feat-rules { padding: 20px 16px; }
}
.feat-rule {
  display: grid;
  gap: 10px;
}
.feat-rule-h {
  margin: 0;
  color: var(--text-3);
  text-transform: uppercase;
}
.feat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feat-tags li {
  padding: 3px 10px;
  background: var(--surface-2);
  color: var(--text);
}
.feat-rule-note {
  margin: 0;
  color: var(--text-3);
  text-wrap: pretty;
}

/* one example decision, styled like a row of the desk's feed and marked Sample */
.feat-dec {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding: 12px;
  border: 1px dashed var(--stone-600);
}
.feat-dec-tag {
  position: absolute;
  inset: -9px auto auto 10px;
  padding: 0 6px;
  background: var(--surface);
  color: var(--text-3);
  text-transform: uppercase;
}
.feat-dec-who {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  background: #0a0a0a;
}
.feat-dec-txt {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
}
.feat-dec-line b {
  color: var(--copper-400);
  font-weight: inherit;
}
.feat-dec-sym {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: #fff;
}
.feat-dec-why {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
