/* Feature grid — Figma node 12988:3954 "feature" (1200x1558) */

.sec-feature-grid {
  max-width: var(--container);
  margin-inline: auto;
  padding-top: 132px;
}

.sec-feature-grid__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: clip;
  padding: 104px 78px;
  border-radius: 16px;
  background: var(--color-white);
}

.sec-feature-grid__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  width: var(--container-narrow);
  max-width: 100%;
}

.sec-feature-grid__heading {
  width: 464px;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 48px;
  line-height: 1.2;
  letter-spacing: -2px;
  text-align: center;
  color: var(--color-ink);
  overflow-wrap: break-word;
  /*
   * Figma breaks this heading after "without". InterDisplay sets a little
   * narrower than the Inter that Figma measures with, so the natural break
   * falls one word later and leaves a top-heavy first line. Balancing the two
   * lines reproduces the Figma break without hard-coding a narrower box.
   */
  text-wrap: balance;
}

.sec-feature-grid__grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.sec-feature-grid__row {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.sec-feature-grid__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 510px;
  flex: 0 0 auto;
}

/* ---------- Visual card ---------- */

.sec-feature-grid__card {
  position: relative;
  width: 100%;
  height: 445px;
  border-radius: 16px;
  background: var(--color-surface);
  overflow: clip;
}

.sec-feature-grid__card-bg {
  position: absolute;
  left: -46px;
  top: -73px;
  width: 948.8px;
  height: 593px;
  max-width: none;
  object-fit: cover;
  transform: scaleX(-1);
  pointer-events: none;
}

.sec-feature-grid__panel-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  background: var(--color-white);
  overflow: clip;
}

/* ---------- Card 1: gauge ---------- */

.sec-feature-grid__panel-inner--gauge {
  width: 386px;
  height: 281px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.sec-feature-grid__gauge {
  position: absolute;
  left: 184.68px;
  top: 151.47px;
  width: 185.124px;
  height: 250.843px;
  max-width: none;
  transform: translate(-50%, -50%) rotate(-103.61deg);
}

.sec-feature-grid__gauge-value {
  position: absolute;
  left: calc(50% + 2px);
  top: calc(50% + 0.5px);
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.4;
  letter-spacing: -1px;
  text-align: center;
  color: var(--color-ink);
  white-space: nowrap;
}

/* ---------- Card 2: task tiles ---------- */

.sec-feature-grid__panel-inner--tasks {
  width: 399px;
  height: 286px;
  left: calc(50% + 0.5px);
  top: calc(50% - 0.5px);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.sec-feature-grid__tasks {
  position: absolute;
  left: calc(50% + 0.5px);
  top: calc(50% - 0.5px);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.sec-feature-grid__tile {
  position: relative;
  width: 149px;
  height: 117px;
  flex: 0 0 auto;
  border-radius: 7.959px;
  background: var(--color-surface);
  border: 0.995px solid rgba(255, 255, 255, 0.06);
  overflow: clip;
}

.sec-feature-grid__tile-body {
  position: absolute;
  left: calc(50% + 0.5px);
  top: calc(50% + 0.07px);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sec-feature-grid__tile-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
  color: var(--color-ink);
  white-space: nowrap;
}

.sec-feature-grid__tile-badge {
  position: relative;
  display: block;
  width: 37.143px;
  height: 37.143px;
  flex: 0 0 auto;
  border-radius: 66.327px;
  overflow: clip;
  -webkit-backdrop-filter: blur(5.306px);
  backdrop-filter: blur(5.306px);
}

.sec-feature-grid__tile-badge--accent {
  background: var(--color-accent);
}

.sec-feature-grid__tile-badge--ink {
  background: var(--color-ink);
}

.sec-feature-grid__tile-icon {
  position: absolute;
  left: 10.57px;
  top: 11px;
  display: block;
  width: 16px;
  height: 16px;
  overflow: clip;
}

.sec-feature-grid__tile-icon img {
  position: absolute;
  max-width: none;
}

.sec-feature-grid__tile-icon--shield img {
  left: 1.917px;
  top: 0.583px;
  width: 12.833px;
  height: 14.833px;
}

.sec-feature-grid__tile-icon--bell img {
  left: 0.78px;
  top: 0.583px;
  width: 14.44px;
  height: 14.167px;
}

/* ---------- Card 3: sales chart ---------- */

.sec-feature-grid__panel-inner--sales {
  width: 363px;
  height: 309px;
  left: calc(50% + 0.5px);
  top: 50%;
}

.sec-feature-grid__sales-dashed {
  position: absolute;
  left: 0;
  top: 187px;
  width: 328.5px;
  height: 35.356px;
  display: block;
}

.sec-feature-grid__sales-dashed img {
  position: absolute;
  left: 0;
  top: -0.75px;
  width: 329.03px;
  height: 36.85px;
  max-width: none;
}

.sec-feature-grid__sales-area {
  position: absolute;
  left: -49.84px;
  top: 98px;
  width: 420.336px;
  height: 157.5px;
  display: block;
}

.sec-feature-grid__sales-area img {
  position: absolute;
  left: 0;
  top: -0.99px;
  width: 421.18px;
  height: 158.49px;
  max-width: none;
}

.sec-feature-grid__sales-marker {
  position: absolute;
  left: 134px;
  top: 155px;
  width: 224px;
  height: 1.5px;
  display: block;
  transform: translate(-50%, -50%) rotate(90deg);
}

.sec-feature-grid__sales-marker img {
  width: 100%;
  height: 100%;
  max-width: none;
}

.sec-feature-grid__sales-dot {
  position: absolute;
  left: 129px;
  top: 91px;
  width: 12px;
  height: 12px;
  border-radius: 100px;
  background: var(--color-white);
  overflow: clip;
}

.sec-feature-grid__sales-dot span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 100px;
  background: var(--color-accent);
}

.sec-feature-grid__sales-pill {
  position: absolute;
  left: 149px;
  top: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--color-accent);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
  color: var(--color-white);
  white-space: nowrap;
}

.sec-feature-grid__sales-months {
  position: absolute;
  left: 50%;
  top: 273px;
  transform: translateX(-50%);
  width: 299px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(59, 59, 59, 0.72);
  white-space: nowrap;
}

.sec-feature-grid__sales-months .is-active {
  color: var(--color-ink);
}

/* ---------- Card 4: performance chart ---------- */

.sec-feature-grid__panel-inner--perf {
  width: 350px;
  height: 330px;
  top: calc(50% - 0.5px);
}

.sec-feature-grid__perf-chart {
  position: absolute;
  left: 32px;
  top: 56px;
  width: 286.004px;
  height: 149.343px;
  display: block;
}

.sec-feature-grid__perf-chart img {
  position: absolute;
  left: 0;
  top: -1px;
  width: 287px;
  height: 151.34px;
  max-width: none;
}

.sec-feature-grid__perf-days {
  position: absolute;
  left: 33px;
  top: 67px;
  width: 27px;
  height: 149px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(59, 59, 59, 0.72);
}

.sec-feature-grid__perf-days .is-active {
  color: #0b0707;
}

.sec-feature-grid__perf-legend {
  position: absolute;
  left: 33px;
  top: 254px;
  width: 181px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-ink);
  white-space: nowrap;
}

.sec-feature-grid__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sec-feature-grid__legend-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 76.596px;
}

.sec-feature-grid__legend-dot--accent {
  background: var(--color-accent);
}

.sec-feature-grid__legend-dot--ink {
  background: var(--color-ink);
}

/* ---------- Titles ---------- */

.sec-feature-grid__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  overflow-wrap: break-word;
}

.sec-feature-grid__title-heading {
  width: 338px;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: -0.5px;
  color: var(--color-ink);
}

.sec-feature-grid__title-copy {
  width: 430px;
  max-width: 100%;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-muted);
}

.sec-feature-grid__title-copy--narrow {
  width: 371px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .sec-feature-grid__panel {
    padding: 64px 24px;
    border-radius: 0;
  }

  .sec-feature-grid__content {
    gap: 40px;
  }

  .sec-feature-grid__heading {
    width: 100%;
    font-size: 34px;
    letter-spacing: -1px;
  }

  .sec-feature-grid__row {
    flex-direction: column;
    align-items: stretch;
  }

  .sec-feature-grid__item {
    width: 100%;
  }

  .sec-feature-grid__card {
    height: 340px;
  }

  .sec-feature-grid__title-heading,
  .sec-feature-grid__title-copy,
  .sec-feature-grid__title-copy--narrow {
    width: 100%;
  }
}

/*
 * Mobile: same rule as the media widgets in more-feature.css.
 *
 * The card drops to 342px wide at 390px while the inner white panel keeps its
 * desktop pixel size, so `overflow: clip` slices the left and right corners off
 * and the pastel photo — the whole point of the card — is squeezed to a sliver.
 *
 * The desktop design keeps the inner panel at 69-78% of the card width and
 * 63-74% of its height, centred, with photo showing on all four sides. Scaling
 * the panel by cardWidth / 510 restores exactly that.
 *
 * As in more-feature.css, `transform` runs after the individual `scale`, so the
 * centring has to move onto the individual `translate` property or the panel
 * lands off-centre and stays clipped by the original amount.
 */

@media (max-width: 560px) {
  .sec-feature-grid__card {
    height: auto;
    aspect-ratio: 510 / 445;
    --fg-scale: 0.84;
  }

  /*
   * The backdrop is a hard 948.8 x 593 pinned at -46 / -73, i.e. ~2x oversized
   * for a ~300px card, so the crop drifts off the artwork and exposes the
   * striped right edge the desktop card never shows. Scaling the whole photo
   * box by the same factor keeps the visible window at the identical fraction
   * of the artwork as desktop (x 4.85-58.6%, y 12.3-87.4%) and keeps the box
   * ratio at 1.6, so `object-fit: cover` crops it the same way.
   * `object-fit` and the scaleX(-1) flip come from the base rule.
   */
  .sec-feature-grid__card-bg {
    left: calc(-46px * var(--fg-scale));
    top: calc(-73px * var(--fg-scale));
    width: calc(948.8px * var(--fg-scale));
    height: calc(593px * var(--fg-scale));
  }

  .sec-feature-grid__panel-inner {
    transform: none;
    translate: -50% -50%;
    scale: var(--fg-scale);
  }
}

@media (max-width: 480px) {
  .sec-feature-grid__card {
    --fg-scale: 0.75;
  }
}

@media (max-width: 430px) {
  .sec-feature-grid__card {
    --fg-scale: 0.67;
  }
}

@media (max-width: 390px) {
  .sec-feature-grid__card {
    --fg-scale: 0.61;
  }
}

@media (max-width: 360px) {
  .sec-feature-grid__card {
    --fg-scale: 0.53;
  }
}

/* Exact, step-free ratio where supported; the steps above are the fallback. */
@supports (scale: calc(1cqw / 1px)) {
  @media (max-width: 560px) {
    .sec-feature-grid__card {
      container-type: inline-size;
    }

    /*
     * Set on the children, not the card: container query units resolve against
     * the nearest *ancestor* container, so the card cannot query itself.
     */
    .sec-feature-grid__panel-inner,
    .sec-feature-grid__card-bg {
      --fg-scale: min(1, calc(100cqw / 510px));
    }
  }
}
