/* ─────────────────────────────────────────────────────────────────────────
   Section: Features Hero (Header & Hero)
   Page:    Features Overview
   Figma:   2001:2821 — canvas 1440x804 (hero 750 + 54 bleed)

   Fluid model: clamp(min, <intercept>rem + <slope>vw, max), interpolated
   between the 360 (mobile) and 1440 (desktop) anchors.
     slope     = (v1440 - v360) / 1080 * 100 vw
     intercept = v360 - slope * 3.6
   No step at any breakpoint — the only media query here swaps the mockup
   between in-flow (mobile) and canvas-pinned (desktop).

   Figma geometry (1440 canvas):
     side padding   150
     text top       156
     headline       Inter SB 80/1.05, max-width 1017
     "Platform"     Rock Salt 80/1.25, yellow
     subtitle       Inter 22/31, max-width 540
     CTA            414x75
     UI mockup      left 790, width 947, flush to section bottom (372+432=804),
                    clipped by the canvas right edge at 1440.
                    790/1440 = 54.861%   947/1440 = 65.764%
   ───────────────────────────────────────────────────────────────────────── */

.section-features-hero {
  position: relative;
  overflow: hidden;

  /* The nav overlays this section (page-header--overlay), so the hero owns
     the whole 804 "Header & Hero" frame, and Figma's 156 top padding is
     correct as-is: it already reserves the nav band (y 6..109) above the
     headline. The mobile floor is 88, not 56, so the pill/hamburger never
     sits on top of the headline on a narrow screen. */
  min-height: min(50.25rem, 55.833vw);
  /* Below 1440 the side padding is fluid (150 at 1440). At and above 1440 the
     max() takes over and pins the CONTENT BOX to a centred 1140 canvas, so the
     text stops drifting toward the left edge on wide screens — it stays where
     the 1440 design puts it. 35.625rem = 1140/2. */
  padding-inline: max(clamp(1.5rem, -1.125rem + 11.6667vw, 9.375rem), calc(50% - 35.625rem));
  padding-block: clamp(5.5rem, 3.4167rem + 9.2593vw, 9.75rem)
    clamp(3.5rem, 1.4167rem + 9.2593vw, 6.25rem);
}

/* The 1440 canvas itself. The mockup is positioned inside this box and
   clipped to it, so at viewports wider than 1440 the artwork keeps the
   same crop instead of drifting away from the text. */
.section-features-hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.section-features-hero__texts {
  position: relative;
  z-index: 1;
  max-width: min(63.5625rem, 100%);
}

.section-features-hero__heading {
  font-size: clamp(2.25rem, 1.3333rem + 4.0741vw, 5rem);
  line-height: 1.05;
}

.section-features-hero__script {
  display: inline-block;
  font-size: clamp(2.5rem, 1.6667rem + 3.7037vw, 5rem);
  line-height: 1.25;
}

.section-features-hero__subtitle {
  /* 540 at 1440 — the mockup occupies everything to the right of it */
  max-width: clamp(19.5rem, 14.75rem + 21.1111vw, 33.75rem);
  margin-top: clamp(1.5rem, 0.5833rem + 4.0741vw, 4.375rem);
  font-size: clamp(1.0625rem, 0.9583rem + 0.463vw, 1.375rem);
  line-height: clamp(1.5rem, 1.3542rem + 0.6481vw, 1.9375rem);
}

.section-features-hero__cta {
  width: 100%;
  max-width: clamp(19.5rem, 17.375rem + 9.4444vw, 25.875rem);
  height: clamp(3.75rem, 3.4375rem + 1.3889vw, 4.6875rem);
  margin-top: clamp(2rem, 0.9583rem + 4.6296vw, 4.0625rem);
}

.section-features-hero__cta-label {
  font-size: clamp(1.125rem, 1.0417rem + 0.3704vw, 1.375rem);
  line-height: 1.36;
}

/* ── Mockup ──────────────────────────────────────────────────────────────
   Mobile: in flow, full width, below the CTA.
   Desktop: pinned inside the canvas at the Figma offsets. */
/* Visibility is handled here, not with Tailwind's `hidden`/`lg:block`: this
   stylesheet loads after main.css and `.section-features-hero__ui` has the
   same specificity as `.hidden`, so a `display` here would silently win and
   both copies of the mockup would render on mobile. */
.section-features-hero__ui--desktop {
  display: none;
}

.section-features-hero__ui {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  /* No border-radius here: the PNG already carries the panel's rounded
     corner, so adding one clips a second arc over the top of it. */
  margin-top: clamp(2.5rem, 1.4583rem + 4.6296vw, 4.5rem);

  /* The SVG is preserveAspectRatio="none" — without an explicit ratio the
     browser stretches it to whatever box it lands in. */
  aspect-ratio: 947 / 432;
}

@media (width >= 64rem) {
  .section-features-hero__ui--mobile {
    display: none;
  }

  .section-features-hero__ui--desktop {
    display: block;
  }

  .section-features-hero__ui {
    /* Figma places the mockup at left 790 of the 1440 frame, 947 wide:
         left  790/1440 = 54.861%
         width 947/1440 = 65.764%
       Expressed as shares of the viewport the panel holds its position at
       EVERY width, and since left + width > 100% it always runs past the
       right edge, so it bleeds correctly and can never leave a gutter.
       The asset is the whole 947x432 UI 2 node, so the inner artwork offsets
       (882x554 at right:-182 bottom:-144) are already baked into its mask. */
    position: absolute;

    /* Anchored by its RIGHT edge so it always bleeds off screen, as it does
       past Figma's frame. The OVERHANG is the single number that positions
       this panel: a smaller overhang slides the whole panel left without
       resizing it, a larger one slides it right.
         percentage  : -20.625% = Figma's 297 overhang, kept as-is so the
                       panel keeps clear of the subtitle on narrow desktops
         constant    : -13.322rem (213px) — moves the panel left on large
                       screens only, where there is room for it
       The max() of two negatives keeps it proportional below 1440 and frozen
       above, so the visible part of the panel is constant on large screens.
       To retune, change ONLY these two paired numbers (px value and its
       percentage of 1440); to restore Figma exactly use -20.625% / -18.5625rem. */
    right: max(-20.625%, -13.322rem);
    left: auto;
    bottom: 0;
    /* 947/1440 = 65.764% below 1440. Above it the panel must NOT keep
       growing with the viewport — every other element caps at its Figma
       value, so an unbounded panel is what made wide screens look wrong
       (1973px wide at a 3000px viewport). It holds Figma's 947 until the
       viewport is wide enough that 947 would stop short of the right edge,
       then grows only as much as is needed to keep a 100px bleed — so it
       never leaves a gutter and never balloons. */
    /* Caps at Figma's 947. Forcing the panel to always reach the right edge
       was wrong: because the aspect is fixed, widening it also made it
       TALLER, so on a large screen its top rose into the headline. Above
       1440 the hero is a centred 1440 composition on a full-bleed gradient
       — the panel keeps its size and the gradient fills whatever is left. */
    width: min(65.764%, 59.1875rem);
    max-width: none;
    margin-top: 0;
    aspect-ratio: 947 / 432;
  }
}
