/* ─────────────────────────────────────────────────────────────────────────
   Section: Made For — two-row infinite marquee heading, decorative
   left-edge S vector, and a right-aligned texts column.

   MARQUEE (the important bit): the two heading lines are NOT a static
   staggered/bleeding layout. Per the design's own animation guide layer in
   Figma (node 1570:201, "All Pages FINAL" page, ref https://yucca.co.za/):

     Row 1 (top):    right → left, ~45s per loop
     Row 2 (bottom): left → right, ~55s per loop (deliberately slower than
                     row 1 to create a parallax feel)

   Both directions are REVERSED from the guide at the user's request — row 1
   runs left → right and row 2 right → left. The guide's timings and its
   opposing-direction parallax are kept.

   The row strings themselves live in made-for.html and are the short split
   the user confirmed ("Made for the good people who run good communities" /
   "community association management."), which differs from the longer
   sentences in the animation guide — see the note there.

   A previous pass read a paused frame of this animation as a static
   asymmetric bleed and hand-tuned per-line `left`/`margin-left` offsets to
   reproduce it. That's why row 2 previously carried a truncated copy of
   row 1's text. Both rows now carry their own full sentence and scroll.

   Marquee mechanics: each row renders its sentence N times inside a flex
   track, and the track translates by exactly -50% (row 1) or from -50% to 0
   (row 2). Identical halves + a 50% shift = a seamless loop with no visible
   jump. N is 6 rather than 2 because half the track has to stay at least as
   wide as the viewport or a gap opens at the trailing edge mid-loop — the
   short row-2 string would otherwise run out past ~2600px. The row clips
   with overflow:hidden, so the text is cut off
   at both viewport edges at every width — including small screens, where it
   just runs at a smaller font size. No per-breakpoint offset tuning needed.

   FLUID SIZING: the row box metrics (height, gap, inter-copy spacing) are
   expressed in `em`, so they scale off font-size alone and stay correct at
   every breakpoint from 360px to 1920px+ with one rule. Only font-size is
   breakpointed, and its lg value uses the project's min(rem, vw) pattern
   (see old-model.css) measured off the 1920px Figma canvas.

   Figma row metrics (1920 canvas): font-size 80px, line-height 50px,
   tracking -0.024em, 125px between the two lines. 50px line-height on 80px
   text clips descenders, so the row box is 1.2em (96px) with the row gap
   reduced to 0.9875em (79px) — 96 + 79 = 175px, which reproduces Figma's
   exact 50 + 125 = 175px baseline-to-baseline rhythm while giving the
   glyphs room to render inside the clipping box.

   NEGATIVE fluid values (the S vector's `left`) use max(rem, vw), not
   min() — CSS min() on two negatives returns the MORE negative one, which
   pins the offset at full 1920px magnitude instead of scaling down.
   Always max() for a fluid negative offset, min() for a positive one.

   Figma source: "Synemi Website (All Pages)" (nJoU040QHzVaE5H2P0q1YI),
   desktop frame "Home Page Improved" 1585:1209 (1920 canvas), mobile frame
   "Mobile Home" 1712:809 (360 canvas). The .figma-cache manifest's
   rpxjqrtmweqJ7XFXDOhNLW node is stale for this section, as it was for
   old-model and built-for.
   ───────────────────────────────────────────────────────────────────────── */

.section-made-for {
  position: relative;
  overflow: hidden; /* contain the marquee overflow + S vector */
}

/* ── Marquee ──────────────────────────────────────────────────────────── */

.section-made-for__heading {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9875em; /* 79px at the 80px Figma font-size */
}

.section-made-for__row {
  overflow: hidden;
  height: 1.2em; /* 96px at the 80px Figma font-size */
  pointer-events: none;
}

.section-made-for__track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  will-change: transform;
}

/* Each copy is identical, so a -50% shift lands exactly on the seam. */
.section-made-for__copy {
  display: block;
  padding-right: 0.4em; /* breathing room between repeats */
  white-space: nowrap;
  line-height: 1.2;
}

/* Direction lives in the keyframe name, duration on the row — so the two
   can be changed independently (swapping a whole shorthand between rows
   silently swaps the speeds too). Directions are reversed relative to the
   animation guide, per the user's request: row 1 now runs left → right and
   row 2 right → left. The opposing-direction parallax is preserved, and
   row 2 stays the slower of the two. */
.section-made-for__track--row1 {
  animation: section-made-for-ltr 45s linear infinite;
}

.section-made-for__track--row2 {
  animation: section-made-for-rtl 55s linear infinite;
}

@keyframes section-made-for-rtl {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes section-made-for-ltr {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

/* Static, readable fallback when the viewer has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
  .section-made-for__track--row1,
  .section-made-for__track--row2 {
    animation: none;
    transform: translateX(0);
  }
}

/* ── Desktop ──────────────────────────────────────────────────────────── */

@media (width >= 64rem) {
  .section-made-for {
    /* Figma 2225:4104: Container sits at y=100 in a 1000-tall frame, so
       100px top and zero bottom. */
    padding-top: min(6.25rem, 5.2083vw);
    min-height: min(56.25rem, 46.875vw);
  }

  .section-made-for__heading {
    font-size: min(5rem, 4.1667vw);
  }

  /* Decorative S vector — bleeds off the left edge, sits behind the text */
  .section-made-for__s-vector {
    position: absolute;
    z-index: 0;
    left: max(-1.875rem, -1.5625vw);
    top: min(6.25rem, 5.2083vw);
    width: min(38.75rem, 32.2917vw);
    height: min(50.5625rem, 42.1354vw);
    pointer-events: none;
    user-select: none;
  }

  .section-made-for__container {
    padding-inline: min(25.625rem, 21.3542vw);
  }

  .section-made-for__texts {
    margin-left: auto;
    width: min(34.375rem, 28.6458vw);
    padding-top: min(7.1875rem, 5.9896vw);
    padding-bottom: min(6.25rem, 5.2083vw);
    gap: min(3.125rem, 2.6042vw);
  }

  .section-made-for__body {
    font-size: min(1.625rem, 1.3542vw);
    line-height: min(2.125rem, 1.7708vw);
  }

  .section-made-for__cta {
    height: min(4.375rem, 3.6458vw);
    width: min(25rem, 20.8333vw);
    font-size: min(1.25rem, 1.0417vw);
    line-height: min(2.5rem, 2.0833vw);
  }
}
