/* Features: the #how-it-works intro with its 01 to 04 rail, then four feature rows
   (text on the left, framed film on the right, never alternating). Spec 15 and 16. */

/* 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 a 16:9 box. 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-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--page);
  container-type: size; /* a film can size its 1920x1080 stage in cq units */
}
.feat-media > * {
  position: absolute; /* the imported film fills the box, with or without a wrapper element */
  inset: 0;
}

/* every film says it is a sample */
.feat-media {
  position: relative;
}
/* corner only: .feat-media > * sets inset: 0, which stretched this dark plate over the whole film */
.feat-sample {
  position: absolute;
  z-index: 2;
  inset: 10px 10px auto auto;
  padding: 2px 8px;
  background: rgba(11, 10, 9, 0.88);
  color: var(--text-3);
  text-transform: uppercase;
  pointer-events: none;
}
