/* Halaman pasukan (HealthyBite, Gainix, VitaTrack): tab ciri dengan demo hidup, dan kad pasukan yang dipusing.
   Warna ikut pembolehubah setiap halaman: --acc, --acc-ink, --card, --line, dan pilihan --view-bg, --flip-back, --flip-back-fg, --tnum. */
/* Cincin kemajuan (demo ciri dan telefon hero HealthyBite) */
.ring { position: relative; width: 104px; height: 104px; flex: none; }
.ring svg { width: 104px; height: 104px; transform: rotate(-90deg); }
.ring .track { stroke: #26262c; } .ring .bar { stroke: var(--acc); }
.ring .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring .num b { font-family: var(--display); font-size: 28px; font-weight: 800; }
.ring .num span { font-size: 11px; color: #a9a7b0; }

/* Demo ciri: tab di kiri, paparan hidup di kanan */
.fx { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px; }
.fx-list { display: grid; gap: 1px; align-content: start; background: var(--line); border: 1px solid var(--line); }
.fx-tab { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; font: inherit; color: var(--fg); background: var(--bg); border: 0; padding: 18px 20px; cursor: pointer; transition: background .25s; }
.fx-tab i { font-family: var(--mono); font-style: normal; font-size: 13px; font-weight: 700; color: var(--acc); letter-spacing: .12em; }
.fx-tab b { display: block; font-family: var(--display); font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1; }
.fx-tab small { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fx-tab:hover { background: var(--card); }
.fx-tab[aria-selected="true"] { background: var(--acc); color: var(--acc-ink); }
.fx-tab[aria-selected="true"] i, .fx-tab[aria-selected="true"] small { color: var(--acc-ink); }
.fx-view { background: var(--view-bg, #0b0b0d); color: var(--view-fg, #f3f1ec); border: 1px solid var(--line); padding: 34px; min-height: 540px; display: grid; }
.fx-panel { grid-area: 1 / 1; display: none; align-content: start; gap: 14px; }
.fx-panel.on { display: grid; }
.fx-panel h3 { font-size: clamp(32px, 3.4vw, 48px); margin: 0; }
.fx-panel > p { color: #b9b7bf; max-width: 46ch; }
.fx-panel .tag { justify-self: start; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); border: 1px solid var(--acc); padding: 3px 10px; }
.demo { margin-top: 8px; display: grid; gap: 10px; align-content: start; }
.d-box { border: 1px solid #2a2a30; padding: 13px 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 15px; }
.d-box b { color: var(--acc); white-space: nowrap; }
.d-chip { justify-self: start; background: var(--acc); color: var(--acc-ink); font-family: var(--display); font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; padding: 6px 14px; }
.d-chip.ghost { background: transparent; color: var(--acc); border: 1px solid var(--acc); }
.d-cam { position: relative; height: 180px; overflow: hidden; background: radial-gradient(circle at 45% 50%, #fff 0 7%, transparent 7.5%), radial-gradient(circle at 57% 60%, #c2411f 0 6%, transparent 6.5%), radial-gradient(circle at 57% 42%, #b8742b 0 7%, transparent 7.5%), radial-gradient(circle at 43% 62%, #3f7d2a 0 4%, transparent 4.5%), radial-gradient(circle at 50% 52%, #fbf6e6 0 22%, #e8d6a2 22.5% 25%, transparent 25.5%), repeating-linear-gradient(45deg, #1a1a1f 0 10px, #202026 10px 20px); }
.d-cam::before { content: ""; position: absolute; inset: 16px; background:
    linear-gradient(var(--acc), var(--acc)) top left / 26px 3px no-repeat, linear-gradient(var(--acc), var(--acc)) top left / 3px 26px no-repeat,
    linear-gradient(var(--acc), var(--acc)) top right / 26px 3px no-repeat, linear-gradient(var(--acc), var(--acc)) top right / 3px 26px no-repeat,
    linear-gradient(var(--acc), var(--acc)) bottom left / 26px 3px no-repeat, linear-gradient(var(--acc), var(--acc)) bottom left / 3px 26px no-repeat,
    linear-gradient(var(--acc), var(--acc)) bottom right / 26px 3px no-repeat, linear-gradient(var(--acc), var(--acc)) bottom right / 3px 26px no-repeat; }
.d-cam::after { content: ""; position: absolute; left: 16px; right: 16px; top: 16px; height: 3px; background: var(--acc); box-shadow: 0 0 18px var(--acc); }
.d-code { position: relative; height: 130px; background: #f3f1ec; overflow: hidden; }
.d-code::before { content: ""; position: absolute; inset: 22px 30px; background: repeating-linear-gradient(90deg, #0b0b0d 0 3px, transparent 3px 6px, #0b0b0d 6px 7px, transparent 7px 11px, #0b0b0d 11px 15px, transparent 15px 17px); }
.d-code::after { content: ""; position: absolute; top: 12px; bottom: 12px; left: 20px; width: 3px; background: var(--acc); box-shadow: 0 0 14px var(--acc); }
.d-ring { display: flex; align-items: center; gap: 18px; }
.d-q { justify-self: end; background: var(--acc); color: var(--acc-ink); padding: 10px 14px; max-width: 80%; font-weight: 600; font-size: 15px; }
.d-a { justify-self: start; border: 1px solid #2a2a30; padding: 10px 14px; max-width: 88%; font-size: 15px; }
.d-row { display: flex; align-items: center; gap: 12px; }
.d-row > span:last-child { display: grid; line-height: 1.3; }
.d-row small { color: #a9a7b0; }
.d-av { width: 34px; height: 34px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 18px; flex: none; }
.d-sleep { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 150px; }
.d-sleep i { display: block; height: var(--h); background: var(--acc); transform-origin: bottom; }
.d-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; text-align: center; font-family: var(--mono); font-size: 11px; color: #a9a7b0; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 900px) {
  .fx { grid-template-columns: minmax(0, 1fr); }
  .fx-list { grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; }
  .fx-tab { scroll-snap-align: start; }
  .fx-view { padding: 22px; min-height: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .fx-panel.on .pop { animation: pop .6s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i, 0) * .12s); }
  .d-cam::after { animation: scan 2.2s ease-in-out infinite alternate; }
  .d-code::after { animation: scanx 1.8s ease-in-out infinite alternate; }
  .fx-panel.on .d-ring .bar { animation: ringfill 1.4s .2s cubic-bezier(.16,1,.3,1) both; }
  .fx-panel.on .d-sleep i { animation: grow .9s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i) * .07s); }
}
@keyframes pop { from { opacity: 0; translate: 0 14px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes scan { to { top: calc(100% - 19px); } }
@keyframes scanx { to { left: calc(100% - 23px); } }
@keyframes ringfill { from { stroke-dasharray: 0 263.9; } }
@keyframes grow { from { scale: 1 0; } }

/* Kad ID dipusing */
.flip { margin-top: 32px; max-width: 420px; perspective: 1200px; cursor: pointer; rotate: -2deg; outline-offset: 6px; }
.flip-in { position: relative; display: grid; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.7,.2,1); transform: rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) + var(--fl, 0deg))); }
.flip.flipped .flip-in { --fl: 180deg; }
.flip-face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; min-height: 300px; padding: 26px; display: grid; gap: 14px; align-content: start; position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--acc); }
.flip-face.back { transform: rotateY(180deg); background: var(--flip-back, linear-gradient(150deg, #ff2a1f, #8f0400)); color: var(--flip-back-fg, #fff); border-color: transparent; }
.flip-face .tnum { position: absolute; top: 12px; right: 18px; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 64px; line-height: 1; color: var(--tnum, var(--acc)); opacity: .9; }
.flip-face .crest-sm { width: 120px; height: 100px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.4)); }
.flip-face .sum { color: var(--muted); font-size: 15px; }
.flip-face .photo { width: 104px; height: 104px; object-fit: cover; object-position: center 30%; border: 3px solid var(--acc); }
.flip-face .role { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tnum, var(--acc)); }
.flip-face .who { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; text-transform: uppercase; }
.flip-face .hint { margin-top: auto; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.flip-face.back .hint { color: inherit; opacity: .75; }
.flip-face dl { margin: 0; display: grid; gap: 12px; font-size: 15px; }
.flip-face dt { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.flip-face dd { margin: 0; font-weight: 700; }
.glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.18), transparent 45%); opacity: 0; transition: opacity .3s; }
.flip:hover .glare { opacity: 1; }
@media (max-width: 900px) { .flip { rotate: none; } }
@media (prefers-reduced-motion: reduce) { .flip-in { transition: none; } }
