/* hero-why.css — 21 Oct (Ali). Two things in the hero:
   1. the stats strip (One-step · $2M+ · 80% · <10ms) moves up into the hero, under the buttons, and
      counts up on load (fx.js [data-count]);
   2. the laptop screen is the "Why options traders pick Strix" panel as live HTML: the "See the plans"
      button and the Trustpilot link work, the numbers count up, and everything is sized in container
      units so it scales with the lid like a picture would. Loaded after pricing.css. */

/* ---------- 1. stats in the hero ---------- */
.hero__proof {
  width: min(1120px, calc(100% - 24px));
  margin: 40px auto 0;
  padding: 0;
  background: transparent;
  color: inherit;
}
.hero__proof .proof__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  border-top: 0;
  padding-top: 0;
  justify-items: center;
  text-align: center;
}
.hero__proof .proof__grid > div {
  display: grid;
  gap: 8px;
  animation: none;
}
.hero__proof .proof__grid b {
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--m-ink, #0a0a0c);
  font-variant-numeric: tabular-nums;
}
.hero__proof .proof__grid span {
  font-size: 15px;
  color: var(--m-ink-2, #5a5c66);
}
/* the Trustpilot link lives in the laptop bar now; keep the element for api.js/tests, out of sight */
.hero__proof .proof__tp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.hero__proof .proof__tp:focus-visible {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  grid-column: 1 / -1;
}
@media (max-width: 820px) {
  .hero__proof .proof__grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px 12px;
  }
}

/* ---------- 2. the laptop screen ---------- */
.laptop__lid {
  container-type: inline-size;
}
.laptop .hero__still,
.laptop .hero__pic {
  display: none !important;
}
.why {
  display: flex;
  flex-direction: column;
  gap: 1.6cqw;
  aspect-ratio: 1395 / 680; /* shorter since 21 Oct: the stat tiles left the panel */
  padding: 4.2cqw 3.4cqw 3.6cqw;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(43, 60, 190, 0.35), transparent 70%),
    linear-gradient(180deg, #050816 0%, #04060f 100%);
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  text-align: left;
}
.why__eyebrow {
  margin-bottom: 1.2cqw;
  text-align: center;
  font-size: 1.45cqw;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8b9bff;
}
.why__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4cqw;
}
.why__stat,
.why__card {
  border-radius: 1.4cqw;
  border: 1px solid rgba(118, 136, 255, 0.22);
  background: linear-gradient(180deg, rgba(20, 30, 80, 0.55), rgba(10, 16, 48, 0.55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.why__stat {
  padding: 2.4cqw 2.2cqw;
  display: grid;
  gap: 0.8cqw;
  align-content: start;
}
.why__stat b {
  font-size: 3.6cqw;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.why__stat b.why__txt {
  font-size: 2.5cqw;
  line-height: 1.1;
}
.why__stat span {
  font-size: 1.5cqw;
  color: #c9d1ff;
  line-height: 1.3;
}
.why__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4cqw;
}
.why__card {
  display: flex;
  gap: 1.6cqw;
  padding: 2cqw;
}
.why__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 4.6cqw;
  height: 4.6cqw;
  border-radius: 1cqw;
  background: linear-gradient(160deg, #3d55ff, #1f2fd6);
  color: #fff;
}
.why__ico svg {
  width: 2.2cqw;
  height: 2.2cqw;
}
.why__card h3 {
  margin: 0 0 0.6cqw;
  font-size: 1.6cqw;
  font-weight: 700;
  line-height: 1.25;
}
.why__card p {
  margin: 0;
  font-size: 1.3cqw;
  line-height: 1.45;
  color: #c9d1ff;
}
.why__bar {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  padding: 1cqw 1cqw 1cqw 2.2cqw;
  border-radius: 999px;
  background: #0f1fb0;
  box-shadow: 0 1.5cqw 4cqw -1cqw rgba(15, 31, 176, 0.6);
  font-size: 1.2cqw;
  color: #e4e8ff;
}
.why__from,
.why__rix,
.why__tp,
.why__btn {
  white-space: nowrap;
}
.why__from b {
  font-size: 2.6cqw;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0.4cqw;
  color: #fff;
}
.why__rix {
  padding-left: 1.4cqw;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}
.why__tp {
  padding-left: 1.4cqw;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.why__tp:hover {
  color: #c9d1ff;
}
.why__btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.8cqw;
  flex: none;
  padding: 0 1.8cqw;
  height: 4.4cqw;
  border-radius: 999px;
  background: #fff;
  color: #0b1a4a;
  font-size: 1.4cqw;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.why__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.8cqw 2cqw rgba(0, 0, 0, 0.35);
}
.why__btn:focus-visible,
.why__tp:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- phones: the panel leaves the laptop and becomes a readable card ---------- */
@media (max-width: 768px) {
  .laptop {
    width: 100%;
    animation: none;
  }
  .laptop__lid {
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    container-type: normal;
  }
  .laptop__cam,
  .laptop__base {
    display: none;
  }
  .why {
    aspect-ratio: auto;
    gap: 12px;
    padding: 22px 16px 18px;
    border-radius: 18px;
  }
  .why__eyebrow {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .why__stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .why__stat,
  .why__card {
    border-radius: 14px;
  }
  .why__stat {
    padding: 14px 14px;
    gap: 6px;
  }
  .why__stat b {
    font-size: 26px;
  }
  .why__stat b.why__txt {
    font-size: 18px;
  }
  .why__stat span {
    font-size: 14px;
  }
  .why__cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .why__card {
    gap: 12px;
    padding: 14px;
  }
  .why__ico {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .why__ico svg {
    width: 20px;
    height: 20px;
  }
  .why__card h3 {
    font-size: 16px;
    margin-bottom: 4px;
  }
  .why__card p {
    font-size: 14px;
  }
  .why__bar {
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 14px;
  }
  .why__from b {
    font-size: 24px;
    margin: 0 4px;
  }
  .why__from,
  .why__rix,
  .why__tp {
    white-space: normal;
    padding-left: 0;
    border-left: 0;
  }
  .why__tp {
    display: inline-flex;
    align-items: center;
    min-height: 44px; /* phone tap target */
  }
  .why__btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    height: 48px;
    font-size: 16px;
    gap: 8px;
    padding: 0 18px;
  }
}

/* ---------- 21 Oct (Ali, 15:38): the numbers strip sits just above the laptop, so the panel's own
   stat tiles were repetition and are gone; the three cards and the bar remain ---------- */
.why__cards {
  margin-top: 0.6cqw;
}
.why__card {
  padding: 2.6cqw 2.2cqw;
}
.why__card p {
  font-size: 1.45cqw;
}
.why__card h3 {
  font-size: 1.8cqw;
}
.why__ico {
  width: 5.2cqw;
  height: 5.2cqw;
}
@media (max-width: 768px) {
  .why__card {
    padding: 14px;
  }
  .why__card p {
    font-size: 14px;
  }
  .why__card h3 {
    font-size: 16px;
  }
  .why__ico {
    width: 40px;
    height: 40px;
  }
}

/* ---------- 3. 21 Oct (Ali, 17:20): the photographed laptop ----------
   assets/img/laptop.webp is a 2000x1184 photo of a space-grey laptop on white, seen from slightly above
   with the lid tilted back (generated to match Ali's reference, then upscaled to 2K). Its display is the
   trapezoid TL (307,50) TR (1689,50) BR (1755,916) BL (245,916) in picture pixels (BL was 239 until 7 Nov). .laptop__screen is a flat
   1448x866 rectangle (in picture units) placed at the display's top-left corner; hero-laptop.js maps it onto
   the trapezoid with a matrix3d so the live .why panel sits on the tilted screen. The screen is narrower than
   the old CSS lid, so the container-unit sizes below are the section-2 ones scaled up ~1.2x; the panel is
   also taller (1448:866 instead of 1395:680), so the three cards stretch. */
.laptop--photo {
  width: min(1240px, calc(100% - 24px));
  /* 23 Oct: the laptop follows the pointer again (Ali's Figma "Add Hero Animation": a small shift and
     tilt toward the cursor, easing back when it leaves), driven by hero-laptop.js through the four
     custom properties below, not by fx.js's --rx/--ry. The 21 Oct flicker was the 3-D screen plane
     (matrix3d) z-fighting the photo plane while the laptop tilted; hero-laptop.js now lifts the screen
     2px off the photo (translateZ), which settles it without flattening the context (flattening forced
     the whole laptop to re-render every frame). The entrance (fade + rise, hero-motion.css) runs
     first; its keyframes own the transform until it ends. */
  transform: translate3d(var(--lx, 0px), var(--ly, 0px), 0) rotateX(var(--lrx, 0deg)) rotateY(var(--lry, 0deg));
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* no will-change: a permanently composited 1240px layer plus the matrix3d screen made frames crawl
     in the test browser (the Discord button's 200ms fade stalled at 0); the transition is rare enough */
}
.laptop--photo[data-interacting] {
  transition-duration: 0.12s;
}
@media (prefers-reduced-motion: reduce) {
  .laptop--photo {
    transform: none !important;
    transition: none;
  }
}
.laptop--photo .laptop__img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  pointer-events: none;
  user-select: none;
}
.laptop--photo .laptop__screen {
  position: absolute;
  left: 15.35%; /* 307 / 2000 */
  top: 4.22%; /* 50 / 1184 */
  width: 72.4%; /* 1448 / 2000 */
  height: 73.14%; /* 866 / 1184 */
  transform-origin: 0 0;
  backface-visibility: hidden;
  container-type: size;
}
.laptop--photo .why {
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0.3cqw;
  gap: 1.8cqw;
  padding: 4.6cqw 4cqw 4cqw;
}
.laptop--photo .why__eyebrow {
  font-size: 1.9cqw;
  margin-bottom: 1cqw;
}
.laptop--photo .why__cards {
  flex: 1;
  margin-top: 0;
  gap: 1.8cqw;
  align-items: stretch;
}
.laptop--photo .why__card {
  flex-direction: column; /* icon above the text: the three columns are narrow on the laptop screen */
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.6cqw;
  padding: 2.4cqw 2.4cqw;
  border-radius: 1.8cqw;
}
.laptop--photo .why__ico {
  width: 6.4cqw;
  height: 6.4cqw;
  border-radius: 1.4cqw;
}
.laptop--photo .why__ico svg {
  width: 3cqw;
  height: 3cqw;
}
.laptop--photo .why__card h3 {
  font-size: 2.1cqw;
  margin-bottom: 0.8cqw;
}
.laptop--photo .why__card p {
  font-size: 1.62cqw;
  line-height: 1.45;
}
.laptop--photo .why__bar {
  gap: 1.3cqw;
  padding: 1cqw 1cqw 1cqw 2.2cqw;
  font-size: 1.35cqw;
  box-shadow: 0 1.8cqw 4.8cqw -1.2cqw rgba(15, 31, 176, 0.6);
}
.laptop--photo .why__from b {
  font-size: 2.8cqw;
}
.laptop--photo .why__rix,
.laptop--photo .why__tp {
  padding-left: 1.3cqw;
}
.laptop--photo .why__btn {
  gap: 0.8cqw;
  padding: 0 1.8cqw;
  height: 5cqw;
  font-size: 1.55cqw;
}
@media (prefers-reduced-motion: reduce) {
  .laptop--photo {
    animation: none;
  }
}
/* phones: the photo goes, the panel is the readable card from section 2 */
@media (max-width: 768px) {
  .laptop--photo .laptop__img {
    display: none;
  }
  .laptop--photo .laptop__screen {
    position: static;
    width: auto;
    height: auto;
    transform: none !important;
    container-type: normal;
  }
  .laptop--photo .why {
    height: auto;
    border-radius: 18px;
    gap: 12px;
    padding: 22px 16px 18px;
  }
  .laptop--photo .why__eyebrow {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .laptop--photo .why__cards {
    gap: 10px;
  }
  .laptop--photo .why__card {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
  }
  .laptop--photo .why__ico {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .laptop--photo .why__ico svg {
    width: 20px;
    height: 20px;
  }
  .laptop--photo .why__card h3 {
    font-size: 16px;
    margin-bottom: 4px;
  }
  .laptop--photo .why__card p {
    font-size: 14px;
  }
  .laptop--photo .why__bar {
    gap: 10px 14px;
    padding: 14px 16px;
    font-size: 14px;
    box-shadow: none;
  }
  .laptop--photo .why__from b {
    font-size: 24px;
  }
  .laptop--photo .why__rix,
  .laptop--photo .why__tp {
    padding-left: 0;
  }
  .laptop--photo .why__btn {
    height: 48px;
    font-size: 16px;
    gap: 8px;
    padding: 0 18px;
  }
}

/* ---------- 4. 21 Oct (Ali, 17:58): the numbers strip moves to the top of the laptop screen ----------
   White text on the dark panel; sized in container units like the rest of the screen. The figures count
   up (fx.js) and rise in when the laptop scrolls into view. */
.why .hero__proof {
  flex: none; /* never squeezed by the flex column: the cards give way instead */
  width: auto;
  margin: 0;
  padding: 0 0 2cqw;
  border-bottom: 1px solid rgba(118, 136, 255, 0.22);
}
.why .hero__proof .proof__grid {
  gap: 1.4cqw;
}
.why .hero__proof .proof__grid > div {
  gap: 0.6cqw;
}
/* hero-laptop.js adds .will-rise at start and .is-in when the screen scrolls into view, so the rise-in and
   the count-up happen together, in front of the visitor */
.why .hero__proof.will-rise .proof__grid > div {
  opacity: 0;
}
.why .hero__proof.will-rise.is-in .proof__grid > div {
  animation: stat-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.why .hero__proof .proof__grid > div:nth-child(2) { animation-delay: 0.1s; }
.why .hero__proof .proof__grid > div:nth-child(3) { animation-delay: 0.2s; }
.why .hero__proof .proof__grid > div:nth-child(4) { animation-delay: 0.3s; }
@keyframes stat-rise {
  from { opacity: 0; transform: translateY(1.5cqw); }
  to { opacity: 1; transform: translateY(0); }
}
.why .hero__proof .proof__grid b {
  font-size: 4cqw;
  font-weight: 600;
  color: #fff;
}
.why .hero__proof .proof__grid span {
  font-size: 1.45cqw;
  color: #c9d1ff;
}
.laptop--photo .why {
  gap: 1.5cqw;
  padding-top: 3.4cqw;
}
.laptop--photo .why__eyebrow {
  margin-top: 0.2cqw;
  margin-bottom: 0;
}
.laptop--photo .why__cards {
  min-height: 0;
}
.laptop--photo .why__card {
  padding: 2cqw 2.2cqw;
  gap: 1.3cqw;
}
.laptop--photo .why__card p {
  line-height: 1.4;
}
@media (max-width: 768px) {
  .why .hero__proof {
    padding: 0 0 14px;
  }
  .why .hero__proof .proof__grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
  }
  .why .hero__proof .proof__grid > div,
  .why .hero__proof.will-rise .proof__grid > div {
    gap: 4px;
    opacity: 1;
    animation: none;
  }
  .why .hero__proof .proof__grid b {
    font-size: 30px;
  }
  .why .hero__proof .proof__grid span {
    font-size: 14px;
  }
  .laptop--photo .why {
    padding-top: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .why .hero__proof .proof__grid > div,
  .why .hero__proof.will-rise .proof__grid > div {
    opacity: 1;
    animation: none;
  }
}

/* with the numbers on the screen the cards get less height: icon and title side by side, text below */
@media (min-width: 769px) {
  .laptop--photo .why__card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    align-content: start;
    column-gap: 1.4cqw;
    row-gap: 1cqw;
    padding: 1.8cqw 2cqw;
  }
  .laptop--photo .why__card > div {
    display: contents;
  }
  .laptop--photo .why__card h3 {
    margin: 0;
    font-size: 1.9cqw;
  }
  .laptop--photo .why__card p {
    grid-column: 1 / -1;
    font-size: 1.5cqw;
    line-height: 1.4;
  }
  .laptop--photo .why__ico {
    width: 5cqw;
    height: 5cqw;
    border-radius: 1.2cqw;
  }
  .laptop--photo .why__ico svg {
    width: 2.4cqw;
    height: 2.4cqw;
  }
  .why .hero__proof .proof__grid b {
    font-size: 3.6cqw;
  }
  .why .hero__proof .proof__grid span {
    font-size: 1.35cqw;
  }
  .why .hero__proof {
    padding-bottom: 1.6cqw;
  }
  .laptop--photo .why {
    padding-top: 3cqw;
    padding-bottom: 3cqw;
  }
}

/* 28 Oct (Ali): the "payouts in the last 7 days" tile is hidden while the live count is 0; the other
   three then share the row (display:grid above would otherwise beat the hidden attribute) */
.hero__proof .proof__grid > div[hidden] {
  display: none;
}
.hero__proof .proof__grid:has(> div[hidden]) {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
  .hero__proof .proof__grid:has(> div[hidden]) {
    grid-template-columns: 1fr 1fr;
  }
}
