/* Homepage hero: Keluarga Sobat Sehati kitchen scene (preview variants A and B). */

/* ---------- Calmer page palette (both variants) ---------- */
body.calm { --bg: #FFFBF4; --card-bg: #F7F1E6; }
body.calm .reviews { background: #FBF3E3; }
body.calm .fam-tile { background: #F4ECDD; }

/* ---------- Layout ---------- */
.fh-wrap { padding: 0 var(--gutter); margin-top: calc(-1 * var(--header-h)); }
.fh {
  --k: .8;
  position: relative; max-width: calc(var(--container) + 40px); margin-inline: auto; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(20px, 3vw, 40px);
  padding: calc(var(--header-h) + 36px) clamp(24px, 4vw, 56px) 28px;
  border-radius: var(--r-xl); border: 1px solid #F0E5D2;
  background: radial-gradient(900px 420px at 80% 10%, #FFFFFF 0%, transparent 60%), linear-gradient(180deg, #FFF9EE 0%, #FDF2DF 100%);
}
.fh-copy { position: relative; z-index: 2; max-width: 520px; }
.fh-greet { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 14px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line); font-weight: 800; font-size: 14px; color: var(--ink-2); animation: fh-fade .5s var(--ease-out) both; }
.fh h1 { font-size: clamp(38px, 5.2vw, 64px); font-weight: 600; line-height: 1.04; margin: 0; animation: fh-fade .5s .05s var(--ease-out) both; }
.fh h1 .script { color: var(--yellow-600); font-weight: 400; }
.fh-sub { margin: 16px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 460px; animation: fh-fade .5s .1s var(--ease-out) both; }
.fh-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; animation: fh-fade .5s .15s var(--ease-out) both; }
.fh-hint { margin: 18px 0 0; font-size: 14px; font-weight: 700; color: var(--muted); opacity: 0; animation: fh-fade .6s 1.6s var(--ease-out) forwards; }
.fh-hint span { display: inline-block; animation: fh-tap 1.4s 2.2s ease-in-out 3; }

/* ---------- Scene ---------- */
.fh-scene { position: relative; z-index: 1; height: calc(380px * var(--k) + 120px); display: flex; align-items: flex-end; justify-content: center; }
.fh-kitchen { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: calc(380px * var(--k) + 40px); border-radius: var(--r-lg); }
.fh-kitchen .k-wall { fill: #FFF6E7; }
.fh-kitchen .k-window rect { fill: var(--sky, #E7F1F2); stroke: #E6D6BC; stroke-width: 6; }
.fh-kitchen .k-window path { stroke: #E6D6BC; stroke-width: 5; fill: none; }
.fh-kitchen .k-shelf rect, .fh-kitchen .k-shelf circle { fill: #EADCC4; }
.fh-kitchen .k-shelf path { fill: #CFE0C5; }
.fh-kitchen .k-counter rect:first-child { fill: #E2CFAF; }
.fh-kitchen .k-counter rect:nth-child(2) { fill: #F1E4CE; }
.fh-kitchen .k-counter path { stroke: #E2D1B3; stroke-width: 3; stroke-linecap: round; fill: none; }
.fh-kitchen .k-floor { fill: #EFE2CB; }
.fh-scene[data-time="pagi"] { --sky: #E4F1F6; }
.fh-scene[data-time="siang"] { --sky: #DDEFF7; }
.fh-scene[data-time="malam"] .k-window rect { fill: #CBD2EA; }
.fh-scene[data-time="malam"] { --sky: #D9DDF0; }

.fh-family { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding-bottom: 14px; }
.fh-member { position: relative; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transform-origin: 50% 100%; animation: fh-in .55s calc(.35s + var(--d) * .09s) cubic-bezier(.34,1.56,.64,1) both; }
.fh-member img { display: block; height: calc(var(--h) * var(--k)); width: auto; max-width: none; position: relative; z-index: 1; transform-origin: 50% 100%; animation: fh-breathe 4.2s calc(var(--d) * .4s) ease-in-out infinite; transition: filter var(--t-med); }
.fh-member:hover img, .fh-member:focus-visible img { filter: drop-shadow(0 6px 10px rgba(42,27,16,.18)); }
.fh-member:focus-visible { outline: none; }
.fh-scene.is-kb .fh-member:focus-visible { outline: 3px solid var(--yellow-500); outline-offset: 4px; border-radius: 12px; }
.fh-mimin { align-self: flex-start; margin-bottom: calc(110px * var(--k)); margin-right: 6px; }
.fh-mimin img { animation: fh-float 4s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(160,100,0,.18)); }
.fh-spot { position: absolute; left: 50%; bottom: -6px; width: 118%; height: 16px; transform: translateX(-50%); border-radius: 50%; background: rgba(120,85,40,.14); }
.fh-mimin .fh-spot { display: none; }
.fh-pop { position: absolute; left: 50%; top: -8px; z-index: 3; transform: translate(-50%, 0) scale(0); font-size: 26px; line-height: 1; pointer-events: none; }
.fh-member.is-picked img { filter: drop-shadow(0 0 0 transparent) drop-shadow(0 8px 14px rgba(42,27,16,.2)); }

/* Variant B: each character has their own soft colour. */
.fh-b .fh-spot { bottom: 0; width: 140%; height: auto; aspect-ratio: 1; max-width: 170px; transform: translate(-50%, 18%); background: var(--tint); opacity: .85; }
.fh-b .fh-mimin .fh-spot { display: block; bottom: -10px; transform: translate(-50%, 0); max-width: 140px; }
.fh-b .fh-member.is-picked .fh-spot { opacity: 1; box-shadow: 0 0 0 6px color-mix(in srgb, var(--tint) 55%, transparent); }
.fh-b .fh-kitchen .k-wall { fill: #FFF8EC; }

/* ---------- Bubble ---------- */
.fh-bubble { position: absolute; z-index: 5; left: 0; top: 0; width: max-content; max-width: min(340px, calc(100% - 12px)); padding: 10px 16px 11px; border-radius: 22px; background: #fff; border: 1.6px solid #CDB690; box-shadow: 0 8px 22px rgba(42,27,16,.10); }
.fh-bubble.is-in { animation: fh-bubble .26s var(--ease-out); }
.fh-bubble[hidden], .fh-tail[hidden] { display: none; }
.fh-tail { position: absolute; z-index: 6; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fh-tail path { fill: #fff; stroke: #CDB690; stroke-width: 1.6; stroke-linejoin: round; }
.fh-bubble.is-mimin { background: var(--yellow-500); border-color: #D99A12; }
.fh-tail.is-mimin path { fill: var(--yellow-500); stroke: #D99A12; }
.fh-bubble.is-mimin .fh-who b { color: var(--ink); }
.fh-bubble.is-mimin .fh-line { font-weight: 700; }
.fh-bubble.is-mimin .fh-link { text-decoration-color: var(--ink); }
.fh-who { margin: 0; line-height: 1.1; }
.fh-who b { font: 700 12px var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--yellow-600); }
.fh-line { margin: 3px 0 5px; font-size: 14.5px; line-height: 1.45; font-weight: 600; color: var(--ink); }
.fh-link { font-size: 12.5px; font-weight: 800; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--yellow-500); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.fh-sound { position: absolute; z-index: 4; right: 10px; bottom: calc(380px * var(--k) - 6px); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.fh-sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fh-sound svg path:first-child { fill: currentColor; stroke: none; }
.fh-sound .on { display: none; }
.fh-sound[aria-pressed="true"] .on { display: inline; }
.fh-sound[aria-pressed="true"] .off { display: none; }
.fh-sound[aria-pressed="true"] { background: var(--yellow-100); border-color: var(--yellow-400); color: var(--ink); }

/* ---------- Reactions (one per personality) ---------- */
.fh-member.r-mimin img { animation: fh-glow .9s ease-out; }
.fh-member.r-nenek img { animation: fh-puzzled 1s ease-in-out; }
.fh-member.r-papa img { animation: fh-nod .8s ease-in-out; }
.fh-member.r-mama img { animation: fh-tidy .8s ease-in-out; }
.fh-member.r-kakak img { animation: fh-pose .8s var(--ease-out); }
.fh-member.r-adik img { animation: fh-stumble 1s var(--ease-out); }
.fh-member.r-bayi img { animation: fh-wiggle .8s ease-in-out; }
.fh-member.is-popping .fh-pop { animation: fh-popup 1.1s var(--ease-out); }

@keyframes fh-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fh-in { from { opacity: 0; transform: translateY(26px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes fh-breathe { 50% { transform: scaleY(1.012); } }
@keyframes fh-float { 50% { transform: translateY(-8px) rotate(-3deg); } }
@keyframes fh-tap { 50% { transform: translateY(-4px); } }
@keyframes fh-bubble { from { opacity: 0; transform: translateY(6px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fh-notice { 40% { transform: translateY(-6px); } }
.fh-member.is-noticed img { animation: fh-notice .45s var(--ease-out); }
@keyframes fh-popup { 0% { transform: translate(-50%, 0) scale(0); opacity: 0; } 25% { transform: translate(-50%, -22px) scale(1.15); opacity: 1; } 75% { transform: translate(-50%, -30px) scale(1); opacity: 1; } 100% { transform: translate(-50%, -44px) scale(.9); opacity: 0; } }
@keyframes fh-glow { 0% { filter: brightness(1); } 30% { filter: brightness(1.25) drop-shadow(0 0 24px rgba(255,201,51,.95)); transform: scale(1.08); } 100% { filter: brightness(1) drop-shadow(0 8px 14px rgba(160,100,0,.18)); } }
@keyframes fh-puzzled { 20% { transform: rotate(-4deg); } 45% { transform: rotate(3deg); } 70% { transform: rotate(-2deg); } }
@keyframes fh-nod { 25% { transform: scaleY(.97); } 50% { transform: scaleY(1.02); } 75% { transform: scaleY(.985); } }
@keyframes fh-tidy { 20% { transform: rotate(2deg); } 40% { transform: rotate(-2deg); } 60% { transform: rotate(0) scale(1.03); } }
@keyframes fh-pose { 30% { transform: rotate(-5deg) translateY(-6px); } 60% { transform: rotate(3deg); } }
@keyframes fh-stumble { 20% { transform: translateY(-18px); } 40% { transform: translateY(0) rotate(6deg); } 55% { transform: rotate(-5deg); } 70% { transform: rotate(2deg); } }
@keyframes fh-wiggle { 15%, 45%, 75% { transform: translateX(-3px) rotate(-4deg); } 30%, 60%, 90% { transform: translateX(3px) rotate(4deg); } }

/* ---------- Preview switcher ---------- */
.fh-switch { position: fixed; left: 16px; bottom: 16px; z-index: 90; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; box-shadow: var(--shadow-lg); }
.fh-switch span { padding: 0 8px; opacity: .8; }
.fh-switch a { padding: 6px 12px; border-radius: var(--r-pill); color: #fff; text-decoration: none; }
.fh-switch a[aria-current] { background: var(--yellow-500); color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .fh { --k: .68; } }
@media (max-width: 900px) {
  .fh { --k: .6; grid-template-columns: 1fr; padding-top: calc(var(--header-h) + 20px); padding-bottom: 16px; gap: 10px; }
  .fh-copy { max-width: none; }
  .fh-sub { font-size: 15.5px; }
  .fh-hint { margin-top: 12px; }
}
@media (max-width: 560px) {
  .fh { --k: .44; padding-inline: 14px; gap: 0; }
  /* Phone order: greeting, headline, the family, then the buttons (the family is seen in the first screen). */
  .fh-copy { display: contents; }
  .fh-greet { order: 1; justify-self: start; margin-bottom: 10px; font-size: 13px; }
  .fh h1 { order: 2; font-size: 34px; }
  .fh-scene { order: 3; margin: 6px -6px 0; height: calc(380px * var(--k) + 118px); }
  .fh-ctas { order: 4; margin-top: 14px; }
  .fh-sub { order: 5; font-size: 14.5px; margin-top: 14px; }
  .fh-hint { display: none; }
  .fh-family { gap: 1px; }
  .fh-mimin { margin-right: 0; }
    .fh-line { font-size: 13.5px; }
  .fh-bubble { max-width: min(250px, calc(100% - 12px)); padding: 8px 13px 9px; }
  .fh-ctas .btn { flex: 1 1 auto; min-height: 46px; }
  .fh-switch { left: 8px; right: 8px; bottom: 76px; justify-content: center; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .fh *, .fh-member img { animation: none !important; }
  .fh-hint { opacity: 1; }
}
.fh-a /* Touched: the character switches to a new pose (hero-family.js) with a short, soft settle. */
@keyframes fh-posein { from { opacity: .4; transform: scale(.95); } to { opacity: 1; transform: none; } }
.fh-member.is-posed img, .rh-scene.is-ready .fh-member.is-posed .fh-fig, .rh-scene .fh-member.is-posed .fh-fig { animation: fh-posein .28s var(--ease-out); }
