/* Features page (BM + EN). Builds on site.css tokens and components; only page-specific layout here.
   Order on the page: centred hero with a phone trio that fans out on scroll (--q from site.js
   [data-scrub]), stats + jump chips, then one rich block per question. */

/* hero: centred proposition, three real screens rising from the bottom edge ------------------ */
.fx-hero { text-align: center; padding-bottom: 0; overflow-x: clip; }
.fx-hero .wrap > * { margin-left: auto; margin-right: auto; }
.fx-hero h1 { max-width: 16ch; }
.fx-hero .answer { margin: 0 auto var(--s6); }
.fx-hero .badges { justify-content: center; }
.fx-hero .note { margin-left: auto; margin-right: auto; }

.fx-stage { --q: 1; position: relative; height: clamp(340px, 30rem + 6vw, 600px); margin-top: var(--s12); clip-path: inset(-120px -100vw 0 -100vw); }
.fx-stage::after { content: ""; position: absolute; left: -50vw; right: -50vw; bottom: 0; height: 18%; background: linear-gradient(rgba(255, 255, 255, 0), var(--bg)); z-index: 4; pointer-events: none; }
.fx-ph { --x: 0%; --r: 0deg; --sc: 1; position: absolute; left: 50%; top: 0; width: clamp(200px, 15rem + 6vw, 310px); transform: translateX(-50%) translateX(calc(var(--q) * var(--x))) translateY(calc((1 - var(--q)) * 40px)) rotate(calc(var(--q) * var(--r))) scale(var(--sc)); transform-origin: 50% 100%; will-change: transform; }
.fx-ph img { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(29, 29, 31, .2)); }
.fx-ph-c { z-index: 3; }
.fx-ph-l, .fx-ph-r { z-index: 2; --sc: .9; top: 6%; }
.fx-ph-l { --x: -78%; --r: -7deg; }
.fx-ph-r { --x: 78%; --r: 7deg; }
@media (max-width: 39.99rem) {
  .fx-stage { height: 400px; margin-top: var(--s10); }
  .fx-ph { width: 190px; }
  .fx-ph-l { --x: -52%; --r: -8deg; }
  .fx-ph-r { --x: 52%; --r: 8deg; }
}

/* stats and jump chips ---------------------------------------------------------------------- */
.fx-stats { padding-top: var(--s12); }
.fx-jump.center-link.more-links { margin-top: var(--s12); }
@media (max-width: 39.99rem) { .fx-jump.center-link.more-links, #selamat .more-links, #safety .more-links { justify-content: flex-start; } }

/* chip link inside tiles (same capsule as .more-links) ----------------------------------------- */
.fx-link { margin: var(--s4) 0 0; }
.fx-link a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s5); border-radius: var(--radius-pill); background: var(--bg); color: var(--text); font-size: var(--t-small); font-weight: var(--wt-medium); text-decoration: none; transition: background .18s var(--ease), transform .18s var(--ease); }
.fx-link a:hover { background: var(--hairline); text-decoration: none; }
.fx-link a:active { transform: scale(.97); }

/* split feature tile: words on one side, a real phone rising from the bottom on the other ------ */
.fx-split { display: grid; background: var(--tile); border-radius: var(--radius-card); overflow: hidden; margin-bottom: var(--s5); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.fx-split:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(29, 29, 31, .3); }
.fx-copy { padding: var(--s10) var(--s6) 0; align-self: center; }
.fx-copy h3 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.08; letter-spacing: -.02em; margin-bottom: var(--s4); }
.fx-copy > p:not(.fx-link) { color: var(--muted); font-size: var(--t-lead); line-height: 1.5; max-width: 34ch; margin-bottom: 0; }
.fx-num { color: #b8458a; }
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .fx-num { background: linear-gradient(90deg, #d4582a, #b8458a 55%, #5b4bd8); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.fx-art { height: 380px; overflow: hidden; padding-top: var(--s10); }
.fx-art img { display: block; width: min(300px, 78%); height: auto; margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(29, 29, 31, .18)); transition: transform .6s var(--ease); }
.fx-split:hover .fx-art img { transform: translateY(-12px); }
@media (min-width: 52rem) {
  .fx-split { grid-template-columns: 1fr 1fr; min-height: 520px; }
  .fx-copy { padding: var(--s16) 0 var(--s16) var(--s16); }
  .fx-art { height: 100%; max-height: 560px; padding-top: var(--s16); align-self: end; }
  .fx-art img { width: min(320px, 80%); }
}

/* dark variant (allowance): flat list inside, never a card in a card */
.fx-dark { background: var(--text); color: var(--on-primary); }
.fx-dark .fx-copy > p:not(.fx-link) { color: rgba(255, 255, 255, .72); }
.fx-dark .fx-link a { background: rgba(255, 255, 255, .14); color: var(--on-primary); }
.fx-dark .fx-link a:hover { background: rgba(255, 255, 255, .24); }
.fx-list { list-style: none; padding: 0; margin: var(--s8) 0 0; max-width: 40ch; }
.fx-list li { display: grid; grid-template-columns: 48px 1fr; gap: var(--s4); align-items: start; margin: 0; padding: var(--s4) 0; border-top: 1px solid var(--hairline); }
.fx-list img { width: 48px; height: 48px; transition: transform .5s var(--ease); }
.fx-list li:hover img { transform: translateY(-3px) rotate(-6deg) scale(1.06); }
.fx-list b { display: block; font-weight: var(--wt-strong); margin-bottom: var(--s1); }
.fx-list span { display: block; color: var(--muted); font-size: var(--t-small); }
/* On the dark allowance card the list reads light. */
.fx-dark .fx-list li { border-top-color: rgba(255, 255, 255, .14); }
.fx-dark .fx-list span { color: rgba(255, 255, 255, .72); }

/* tile grids (one card level, equal heights) -------------------------------------------------- */
.fx-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 40rem) { .fx-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) {
  .fx-grid { gap: var(--s5); }
  .fx-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .fx-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .fx-grid .clay { width: 80px; height: 80px; }
}
.fx-grid > .cell { grid-column: auto; grid-row: auto; }
.fx-band .cell { background: var(--bg); }
.fx-grid > .cell { padding-bottom: var(--s8); }

/* motivation: statement head, then the goal tile with real widgets and a clay loop tile */
.fx-statement { margin-bottom: var(--s12); }
.fx-statement p { margin-bottom: 0; }
.fx-goal .fx-widgets { display: grid; grid-template-columns: 1fr 2.09fr; gap: var(--s3); align-items: end; margin-top: auto; padding-top: var(--s8); transition: transform .5s var(--ease); }
.fx-goal .fx-widgets img { display: block; width: 100%; height: auto; filter: drop-shadow(0 12px 20px rgba(29, 29, 31, .12)); }
.fx-goal:hover .fx-widgets { transform: translateY(-6px); }
.fx-loop-art { display: block; width: calc(100% + var(--pad-card) * 2); height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin: calc(var(--s8) * -1) calc(var(--pad-card) * -1) var(--s5); background: #ece9e5; }
@media (min-width: 64rem) { .fx-grid > .fx-goal { grid-column: span 2; } }
@media (min-width: 40rem) and (max-width: 63.99rem) { .fx-grid > .fx-goal { grid-column: 1 / -1; } }

/* seasons: generated clay still beside the copy */
.fx-grid > .cell.fx-season-main { padding: 0; }
.fx-band .fx-link a { background: var(--tile); }
.fx-band .fx-link a:hover { background: var(--hairline); }
.fx-season-art { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 68%; background: #d0cdca; transition: transform .8s var(--ease); }
.fx-season-main:hover .fx-season-art { transform: scale(1.03); }
.fx-season-main > picture { display: block; overflow: hidden; }
.fx-season-copy { padding: var(--s6) var(--s6) var(--s8); }
.fx-season-copy h3 { margin-bottom: var(--s2); }
@media (min-width: 40rem) and (max-width: 63.99rem) { .fx-grid > .fx-season-main { grid-column: 1 / -1; } }
@media (min-width: 64rem) {
  .fx-season { grid-template-columns: 2fr 1fr; }
  .fx-grid > .fx-season-main { grid-row: span 2; }
  .fx-season-main { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .fx-season-copy { align-self: center; }
  .fx-season-main > picture { height: 100%; }
  .fx-season-art { height: 100%; aspect-ratio: auto; min-height: 420px; }
  .fx-season-copy { padding: var(--s10) var(--s10) var(--s10) var(--s8); }
}

/* phones: the rich tiles keep their stacked layout (site.css turns plain tiles into icon rows) */
@media (max-width: 39.99rem) {
  .fx-grid > .cell.fx-goal, .fx-grid > .cell.fx-loop { display: flex; padding: var(--s6) var(--s5); }
  .fx-grid > .cell.fx-season-main { display: block; padding: 0; }
  .fx-loop-art { width: calc(100% + var(--s5) * 2); margin: calc(var(--s6) * -1) calc(var(--s5) * -1) var(--s5); }
  .fx-copy { padding: var(--s8) var(--s5) 0; }
  .fx-season-copy { padding: var(--s5) var(--s5) var(--s6); }
}

/* weekly home carousel: raw screens and a clay card beside the framed phones */
.hl-head .section-intro { margin: var(--s4) 0 0; }
.fx-screen { display: block; width: 80%; height: auto; margin: var(--s8) auto 0; border: 1px solid var(--hairline); border-bottom: 0; border-radius: var(--radius-shot) var(--radius-shot) 0 0; box-shadow: var(--shadow-shot); transition: transform .5s var(--ease); }
.hl-card:hover .fx-screen { transform: translateY(-10px); }
.fx-card-clay > picture { margin: auto auto var(--s16); }
.fx-big-clay { display: block; width: 144px; height: 144px; transition: transform .6s var(--ease); }
.fx-card-clay:hover .fx-big-clay { transform: translateY(-8px) rotate(-6deg) scale(1.04); }
.hl-card .hl-widgets { padding-top: var(--s8); }

.fx-end { padding-top: calc(var(--sec) * .5); }

@media (prefers-reduced-motion: reduce) {
  .fx-split, .fx-art img, .fx-goal .fx-widgets, .fx-season-art, .fx-screen, .fx-big-clay, .fx-list img { transition: none; }
}

/* TV split: the wide living-room picture fills its half instead of a floating phone */
.fx-art.fx-art-wide { height: auto; padding: 0; align-self: stretch; }
.fx-art-wide picture { display: block; height: 100%; }
.fx-art-wide img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 70% 50%; filter: none; }
.fx-split:hover .fx-art-wide img { transform: none; }
@media (min-width: 52rem) { .fx-art.fx-art-wide { position: relative; max-height: none; min-height: 360px; padding: 0; } .fx-art-wide img { position: absolute; inset: 0; aspect-ratio: auto; } }

/* Now widget (1.0.5): a widget capture, shown whole, not cropped like the phone screens above. */
.fx-art.fx-art-widget { height: auto; overflow: visible; padding-block: var(--s8) var(--s10); }
.fx-split-widget { margin-top: var(--s5); }
.fx-art-widget img { width: min(340px, 86%); }
@media (min-width: 64rem) { .fx-art.fx-art-widget { max-height: none; align-self: center; padding-block: var(--s10); } }
/* A fourth season card runs the full width, the clay beside the words, so the grid keeps no hole. */
@media (min-width: 40rem) {
  .fx-grid > .cell.fx-season-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: var(--s6); align-items: center; align-content: center; }
  .fx-season-wide > picture { grid-row: 1 / span 2; }
}
