/* ================= PRODUCT-UI LOOK =================
   Active when <html> has .look-product (set by product-ui.js). */

.app, .presenter { display: none; }
.look-product .app { display: grid; }
.look-product .presenter { display: block; }

/* ---------- mini product screen (sized in em) ---------- */
.app {
  grid-template-rows: 2.4em 1fr; overflow: hidden;
  background: #fff; color: #111; text-align: left; letter-spacing: -.01em; line-height: 1.25;
  border-radius: 1.1em; box-shadow: 0 1.4em 2.8em -1.6em rgba(0, 0, 0, .55);
}
.app-bar { display: flex; align-items: center; gap: .8em; padding: 0 1em; border-bottom: 1px solid #ececE7; }
.app-bar b { font-weight: 600; font-size: 1.05em; letter-spacing: -.03em; }
.app-dots { display: flex; gap: .35em; }
.app-dots i { width: .55em; height: .55em; border-radius: 50%; background: #e1e1db; }
.app-body { display: grid; grid-template-columns: 4.4em 1fr; min-height: 0; }
.app-side { background: #f6f6f3; padding: 1em .9em; display: grid; gap: .75em; align-content: start; }
.app-side i { height: .55em; border-radius: .3em; background: #e2e2dc; }
.app-side i.on { background: var(--c); }
.app-main { position: relative; min-width: 0; padding: 1em 1.2em 1.1em; display: flex; flex-direction: column; align-items: flex-start; gap: .65em; }
.app-main h5 { margin: 0; font-size: 1.3em; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }

.fld { align-self: stretch; padding: .55em .8em; border-radius: .6em; background: #f2f2ee; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld small { display: block; font-size: .75em; color: #7a7a74; font-weight: 400; margin-bottom: .1em; }
.tiles { align-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; }
.tiles i { aspect-ratio: 1.25; border-radius: .6em; background: #f2f2ee; border: .14em solid transparent; }
.tiles i.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, #fff); }
.rows2 { align-self: stretch; display: grid; gap: .4em; }
.rows2 div { display: flex; align-items: center; justify-content: space-between; gap: .6em; padding: .45em .7em; border-radius: .55em; background: #f2f2ee; font-weight: 500; white-space: nowrap; }
.rows2 em { position: relative; flex: none; width: 3.6em; height: .4em; border-radius: .3em; background: #deded8; overflow: hidden; }
.rows2 em::after { content: ""; position: absolute; inset: 0; width: var(--p); background: var(--c); }
.tog { flex: none; position: relative; display: inline-block; width: 2em; height: 1.1em; border-radius: 1em; background: #d6d6d0; }
.tog::after { content: ""; position: absolute; top: .15em; left: .15em; width: .8em; height: .8em; border-radius: 50%; background: #fff; }
.tog.on { background: var(--c); }
.tog.on::after { left: 1.05em; }

.app-btn {
  position: relative; margin-top: auto; padding: .55em 1.15em; border-radius: 99px;
  background: var(--c); color: var(--on, #fff); font-weight: 600; white-space: nowrap;
}
.app-btn.press { animation: appPress 3.2s infinite; }
.app-cursor {
  position: absolute; z-index: 3; right: -1.2em; bottom: -2.3em; width: 2.8em; height: 2.8em;
  filter: drop-shadow(0 .25em .35em rgba(0, 0, 0, .35));
  animation: appCursor 3.2s var(--ease) infinite; pointer-events: none;
}
.app-cursor svg { width: 100%; height: 100%; display: block; }
.app-cursor::after { /* click ripple */
  content: ""; position: absolute; left: .47em; top: .35em; width: 1.6em; height: 1.6em; margin: -.8em 0 0 -.8em;
  border-radius: 50%; border: .14em solid var(--c, #111); opacity: 0;
  animation: appRipple 3.2s infinite;
}
@keyframes appRipple { 0%, 58% { transform: scale(.2); opacity: 0; } 62% { opacity: .9; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

/* per-screen actions, all on the same 3.2s beat (click lands at ~62%) */
.type { display: inline-block; animation: appType 3.2s steps(16) infinite; }
@keyframes appType { 0% { clip-path: inset(0 100% 0 0); } 40%, 100% { clip-path: inset(0 0 0 0); } }
.tiles i.pick { position: relative; animation: appPick 3.2s infinite; }
.tiles i.pick .app-cursor { right: -.6em; bottom: -1.4em; }
@keyframes appPick { 0%, 60% { border-color: transparent; background: #f2f2ee; } 64%, 100% { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, #fff); } }
.tog.flip .app-cursor { right: -1.5em; bottom: -2.1em; }
.tog.flip { animation: appTogBg 3.2s infinite; }
.tog.flip::after { animation: appTogKnob 3.2s var(--ease) infinite; }
@keyframes appTogBg { 0%, 60% { background: #d6d6d0; } 64%, 100% { background: var(--c); } }
@keyframes appTogKnob { 0%, 60% { left: .15em; } 68%, 100% { left: 1.05em; } }
.rows2 div.hov { position: relative; animation: appHov 3.2s infinite; }
.rows2 div.hov .app-cursor { right: 1.2em; bottom: -1.9em; }
.rows2 em.grow::after { animation: appGrow 3.2s var(--ease) infinite; }
@keyframes appHov { 0%, 55% { background: #f2f2ee; box-shadow: none; } 62%, 100% { background: #fff; box-shadow: 0 0 0 .12em var(--c); } }
@keyframes appGrow { 0%, 62% { width: var(--p); } 90%, 100% { width: 100%; } }
@keyframes appCursor {
  0% { transform: translate(5em, 3.5em); opacity: 0; }
  15% { opacity: 1; }
  55% { transform: none; }
  62% { transform: scale(.82); }
  68%, 100% { transform: none; opacity: 1; }
}
@keyframes appPress { 0%, 58% { transform: none; } 62% { transform: scale(.93); filter: brightness(.9); } 68%, 100% { transform: none; filter: none; } }

.chk { align-self: stretch; display: grid; gap: .3em; }
.chk div { display: flex; align-items: center; gap: .6em; padding: .45em .6em; border-radius: .55em; color: #55554f; }
.chk b { flex: none; display: grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: 50%; border: .1em solid #dcdcd6; font-size: .75em; }
.chk .done b { background: #12a05c; border-color: #12a05c; color: #fff; }
.chk .now { background: color-mix(in srgb, var(--c) 14%, #fff); color: #111; font-weight: 600; }
.chk .now b { background: var(--c); border-color: var(--c); color: var(--on, #fff); }
.ok { align-self: stretch; flex: 1; display: grid; place-items: center; align-content: center; gap: .35em; text-align: center; }
.ok i { display: grid; place-items: center; width: 2.8em; height: 2.8em; border-radius: 50%; background: #12a05c; color: #fff; font-style: normal; font-size: 1.2em; animation: appPop .7s var(--ease) both; }
.ok strong { font-size: 1.2em; letter-spacing: -.03em; }
.ok small { color: #7a7a74; }
@keyframes appPop { from { transform: scale(.3); opacity: 0; } }

/* ---------- circular presenter ---------- */
.presenter {
  position: absolute; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: var(--c); border: 3px solid #fff;
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .55);
  animation: talk 2.4s ease-out infinite;
}
.presenter img, .card .presenter img, .use-visual .presenter img, .use:hover .use-visual .presenter img, .page-video .presenter img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 4%;
  transform: scale(1.9); transform-origin: 50% 14%;
  -webkit-mask-image: none; mask-image: none;
}
@keyframes talk {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55), 0 12px 24px -10px rgba(0, 0, 0, .55); }
  70%, 100% { box-shadow: 0 0 0 .7em rgba(255, 255, 255, 0), 0 12px 24px -10px rgba(0, 0, 0, .55); }
}

/* ---------- hero cards ---------- */
.look-product .card > img { opacity: 0; }
.look-product .card::after { background: none; }
.look-product .card .card-top { color: var(--on, #fff); }
.look-product .card .card-time { background: rgba(0, 0, 0, .16); }
/* resting cards show a light glass play button so they read as videos; it hides when a card pops up */
.look-product .card .card-play {
  z-index: 5; top: 44%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.7);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(17,17,17,.14); color: #111; font-size: 11px;
  opacity: 1; transform: scale(1); pointer-events: none;
}
.look-product .card.active .card-play, .look-product .card:hover .card-play { opacity: 0; transform: scale(.6); }
.card .app { position: absolute; z-index: 1; top: 34px; left: 9px; right: 9px; height: calc(var(--w) * .58); font-size: calc(var(--w) * .03); }
.card .app-main { gap: .5em; }
/* the lifted card zooms into its screen so the text, button and cursor are readable */
.card .app { transition: font-size .6s var(--ease), height .6s var(--ease); }
.card .app-body { transition: grid-template-columns .6s var(--ease); }
.card .presenter { transition: top .6s var(--ease); }
.card.active .app, .card:hover .app { font-size: calc(var(--w) * .038); height: calc(var(--w) * .72); }
.card.active .presenter, .card:hover .presenter { top: calc(34px + var(--w) * .72 - var(--w) * .27); }
.card.active .app-body, .card:hover .app-body { grid-template-columns: 0 1fr; }
.card.active .app-side, .card:hover .app-side { padding: 0; overflow: hidden; }
.card.active .app-main, .card:hover .app-main { padding: .8em .9em .9em; }
/* hero: only the lifted (active / hovered) card plays its animation; the rest sit still */
.card:not(.active):not(:hover) .app *,
.card:not(.active):not(:hover) .app *::after,
.card:not(.active):not(:hover) .presenter { animation: none; }
.card .presenter { z-index: 2; width: calc(var(--w) * .25); right: 6px; top: calc(34px + var(--w) * .58 - var(--w) * .2); border-width: 2px; }

/* ---------- demo player ---------- */
.player { container-type: inline-size; }
.look-product .player-portrait, .look-product .mock-ui { display: none; }
.look-product .player-copy { width: min(40%, 330px); }
.player-app-wrap { display: none; }
.look-product .player-app-wrap { display: block; position: absolute; right: 26px; top: 62px; width: 51%; font-size: 1.55cqw; }
.player-app { min-height: 31cqw; }
.player-app.s1 .app-main, .player-app.s0 .app-main { justify-content: flex-start; }
.look-product .player > .presenter { width: 14cqw; right: 18px; top: calc(62px + 25cqw); z-index: 2; border-width: 4px; }
.player.light .presenter { border-color: #111; }

/* ---------- use-case cards ---------- */
.look-product .use-visual > img { display: none; }
.look-product .use-ui { top: 58px; bottom: auto; width: min(70%, 250px); }
.use-visual .presenter { width: 27%; right: 16px; bottom: 16px; z-index: 2; }

/* ---------- delivery page video ---------- */
.page-video { container-type: inline-size; }
.look-product .page-video > img { display: none; }
.page-video .app { position: absolute; right: 5%; top: 15%; width: 54%; font-size: 2.05cqw; }
.page-video .presenter { width: 15cqw; right: 2.5%; bottom: 13%; z-index: 2; border-width: 2px; }
.look-product .pv-play {
  left: 50%; top: 50%; z-index: 4; width: 64px; height: 64px; margin: -32px 0 0 -32px; font-size: 16px;
  background: rgba(17, 17, 17, .32); color: #fff; border: 1.5px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .45);
}
.page-video .app-cursor { width: 3.4em; height: 3.4em; }

/* ---------- use-case cards: product screen behind ---------- */
.use-visual { container-type: inline-size; }
.use-visual .bg-app {
  position: absolute; left: 24%; top: 30%; width: 96%; height: 90%;
  font-size: 3.6cqw;
  box-shadow: 0 2em 4em -2em rgba(0, 0, 0, .5);
  transition: transform 1.1s var(--ease);
}
/* background screen reads as context: frosted and tinted so the white card in front owns the focus */
.use-visual .bg-app { opacity: .55; }
.look-product .use-ui {
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .04);
}
.use-visual .bg-app .app-main { gap: .8em; }
.use:hover .use-visual .bg-app { transform: translate(-2%, -2%); }

/* ---------- hero: live status chips ---------- */
.deck-wrap { position: relative; }
.hero-chip {
  position: absolute; z-index: 40; display: none; align-items: center; gap: 10px;
  padding: 9px 14px 9px 10px; border-radius: 14px; background: #fff; color: var(--ink);
  font-size: 12.5px; font-weight: 500; letter-spacing: -.01em; text-align: left; line-height: 1.25;
  box-shadow: 0 18px 34px -18px rgba(20, 20, 30, .45), 0 0 0 1px rgba(0, 0, 0, .04);
  opacity: 0; animation: chipIn .8s var(--ease) 1.9s forwards, chipBob 5s ease-in-out 2.7s infinite;
}
@keyframes chipIn { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } to { opacity: 1; } }
.look-product .hero-chip { display: flex; }
.hero-chip b { font-weight: 600; }
.hero-chip small { display: block; font-size: 11px; color: var(--ink-2); font-weight: 400; margin-top: 1px; }
.chip-sent { right: max(1%, calc(50% - 590px)); bottom: -22px; animation-delay: 2.3s, 4.2s; }
.spin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #e6e6e0; border-top-color: var(--ink); animation: spin .9s linear infinite; }
.c-bar { display: block; width: 130px; height: 3px; margin-top: 6px; border-radius: 3px; background: #ececE7; overflow: hidden; }
.c-bar i { display: block; height: 100%; width: 0; background: var(--ink); animation: progress 2600ms linear forwards; }
.tick { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #12a05c; color: #fff; font-size: 11px; }
.chip-sent.pop { opacity: 1; animation: chipPop .6s var(--ease), chipBob 5s ease-in-out .6s infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes chipBob { 50% { transform: translateY(-6px); } }
@keyframes chipPop { from { transform: scale(.85) translateY(6px); opacity: .3; } }
@media (max-width: 900px) { .look-product .hero-chip { display: none; } }

/* ---------- responsive ---------- */
@media (max-width: 560px) {
  .card .app { top: 30px; height: calc(var(--w) * .5); }
  .card .presenter { width: calc(var(--w) * .22); top: calc(30px + var(--w) * .5 - var(--w) * .24); }
}
@media (max-width: 640px) {
  .look-product .player-copy { width: auto; right: 24cqw; }
  .look-product .player-app-wrap { left: 16px; right: 16px; top: auto; bottom: 74px; width: auto; font-size: 3.2cqw; }
  .look-product .player > .presenter { width: 21cqw; right: 14px; top: 58px; }
  .look-product .use-ui { width: min(72%, 260px); }
}
@media (prefers-reduced-motion: reduce) {
  .app-btn, .app-cursor, .presenter, .ok i, .spin, .c-bar i { animation: none; }
  .hero-chip, .chip-sent.pop { animation: none; opacity: 1; }
}
