/* CASS AI PICK kiosk. Design units are 540x960 (Samsung QM65C-ST stood portrait, 2160x3840 at 1/4), scaled to fit the window.
   Follows CASS BrandWorld Toolkit 0605: core blue gradient, Jaso type, wordmark/uplift rules, one Cascade per layout. */
@font-face { font-family: "Jaso"; src: url("brand/fonts/JASOSans-Regular.otf") format("opentype"); font-weight: 400; font-display: block; }
@font-face { font-family: "Jaso"; src: url("brand/fonts/JASOSans-Bold.otf") format("opentype"); font-weight: 700; font-display: block; }
@font-face { font-family: "Jaso"; src: url("brand/fonts/JASOSans-Heavy.otf") format("opentype"); font-weight: 900; font-display: block; }

:root {
  color-scheme: light;
  --primary: #1200e8;   /* PRIMARY BLUE, PANTONE 286, 20% along the gradient */
  --secondary: #00a6ff; /* SECONDARY BLUE, PANTONE 2382, 100% */
  --obppc: #febe10;     /* price promotion yellow, PANTONE 109 */
  --ink: #0a0566;       /* body type on white: a deep core blue */
  --mute: #545a8c;
  --line: #dfe3f3;
  --paper: #fff;
  --veil: rgba(255, 255, 255, 0.16);
  --ease: cubic-bezier(.215, .61, .355, 1);
  --kv: linear-gradient(to top right, var(--primary) 20%, var(--secondary) 100%);
  --fg: #fff;
  /* type scale keeps the guide's 4:2:1 head : sub : body ratio */
  --t-head: 48px;
  --t-sub: 24px;
  --t-body: 13px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: #000;
  font-family: "Jaso", "Malgun Gothic", sans-serif;
  word-break: keep-all;
}
button, input { font: inherit; }

/* stage */
.stage { position: fixed; left: 0; top: 0; width: 540px; height: 960px; transform-origin: 0 0; }
.scr { position: relative; width: 540px; height: 960px; overflow: hidden; color: #fff; background: #000; }
#screen { position: absolute; inset: 0; }

/* key visual ground: gradient + a single Cascade */
.kv { position: absolute; left: 0; top: 0; width: 540px; overflow: hidden; background: var(--kv); color: var(--fg); }
.cascade {
  position: absolute; pointer-events: none;
  background: url("brand/ai/cascade-core-n.png") center / 100% 100% no-repeat;
  animation: cascadeIn .9s var(--ease) both;
}
@keyframes cascadeIn { from { opacity: 0; transform: scale(1.08) } to { opacity: 1; transform: none } }

/* range colour themes (variant comms keep core blue in type and the uplift device) */
.kv.t-light { --kv: linear-gradient(to top right, #0087ec 20%, #bce7ff 100%); --fg: #fff; }
.kv.t-silver { --kv: linear-gradient(to top right, #929aa9 20%, #eceff0 100%); --fg: #fff; }
.kv.t-lemon { --kv: linear-gradient(to top right, #ffda00 20%, #fdff67 100%); --fg: var(--primary); }
.kv.t-allzero { --kv: linear-gradient(to top right, #a0cdff 20%, #ffffff 100%); --fg: var(--primary); }
.kv.t-light .cascade { background-image: url("brand/ai/cascade-light-n.png"); }
.kv.t-silver .cascade { background-image: url("brand/ai/cascade-silver-n.png"); }
.kv.t-lemon .cascade { background-image: url("brand/ai/cascade-lemon-n.png"); }
.kv.t-allzero .cascade { background-image: url("brand/ai/cascade-light-n.png"); }

/* products: always a pair meeting at the Cascade centre */
.pair { position: absolute; left: 0; top: 0; pointer-events: none; }
.pair img { position: absolute; display: block; transform-origin: 50% 100%; }
.pair .a { z-index: 1; animation: pairA .9s var(--ease) both; }
.pair .b { animation: pairB .9s var(--ease) .08s both; }
@keyframes pairA { from { transform: translateX(-120px) rotate(-10deg); opacity: 0 } to { transform: rotate(14deg); opacity: 1 } }
@keyframes pairB { from { transform: translateX(120px) rotate(10deg); opacity: 0 } to { transform: rotate(-14deg); opacity: 1 } }
.pair.zzan .a { animation: zzanA 1s var(--ease) both; }
.pair.zzan .b { animation: zzanB 1s var(--ease) .05s both; }
@keyframes zzanA { 0% { transform: translateX(-140px) rotate(-6deg); opacity: 0 } 70% { transform: translateX(6px) rotate(19deg); opacity: 1 } 100% { transform: rotate(14deg) } }
@keyframes zzanB { 0% { transform: translateX(140px) rotate(6deg); opacity: 0 } 70% { transform: translateX(-6px) rotate(-19deg); opacity: 1 } 100% { transform: rotate(-14deg) } }

.rise { animation: rise .6s var(--ease) both; }
.d1 { animation-delay: .2s } .d2 { animation-delay: .35s } .d3 { animation-delay: .5s }
.d4 { animation-delay: .65s } .d5 { animation-delay: .8s } .d6 { animation-delay: .95s }
@keyframes rise { from { transform: translate3d(0, 40px, 0); opacity: 0 } to { transform: none; opacity: 1 } }

/* type: Jaso Heavy headlines are always oblique; KV titles also slant up 18deg */
.h { font-weight: 900; font-style: oblique 12deg; font-stretch: 96%; letter-spacing: -.005em; line-height: 1.2; }
.sub { font-weight: 700; font-style: oblique 12deg; letter-spacing: -.005em; line-height: 1.3; }
.body { font-weight: 400; font-size: var(--t-body); line-height: 1.4; }
.slant { transform: rotate(-18deg); transform-origin: 0 50%; }
.themed > .status, .kv[class*="t-"] > .status { top: 158px; }
.label { font-weight: 700; font-size: var(--t-body); letter-spacing: .04em; }
.mute { color: var(--mute); }

/* headline highlight box: white or blue only, one box per line, max two lines */
.hl { display: inline; padding: .04em .28em .1em; line-height: 1.5; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: #fff; color: var(--primary); }
.hl.blue { background: var(--primary); color: #fff; }
.hl.promo { background: var(--obppc); color: var(--primary); }

/* header: wordmark top-left with clear space, AI PICK! kept apart on the right */
.hdr { position: absolute; left: 0; top: 0; right: 0; height: 96px; padding: 22px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; z-index: 5; }
.wordmark { display: block; width: 118px; height: auto; }
.uplift { display: block; width: 140px; height: auto; margin: -10px 0 0 -8px; }
.side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.aipick { font-weight: 900; font-style: oblique 12deg; font-size: 22px; line-height: 1; color: var(--fg); }
.pills { display: flex; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
.veil { background: var(--veil); color: #fff; }
/* light grounds (lemon, all zero) take core blue type; light and silver keep white type with blue header labels */
.kv.t-lemon .veil, .kv.t-allzero .veil, .kv[class*="t-"] .hdr .veil { background: rgba(18, 0, 232, .12); color: var(--primary); }
.kv.t-light .aipick, .kv.t-silver .aipick { color: var(--primary); }
.kv.t-light .bar, .kv.t-silver .bar { background: rgba(18, 0, 232, .28); }
.tag-trial { background: #fff; color: var(--primary); }

/* status */
.status { position: absolute; left: 24px; top: 112px; z-index: 5; font-size: 14px; padding: 9px 14px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: #fff; animation: blink 1.2s ease-in-out infinite; }
.dot.rec { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.dot.off { background: rgba(255,255,255,.45); animation: none; }
@keyframes blink { 50% { opacity: .25 } }
.status .count { position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; }
.countdown { position: absolute; left: 24px; right: 24px; z-index: 5; }

/* answer sheet */
.sheet { position: absolute; left: 0; right: 0; background: var(--paper); color: var(--ink); border-radius: 28px 28px 0 0; padding: 24px 24px 0; display: flex; flex-direction: column; gap: 14px; z-index: 4; animation: sheetUp .6s var(--ease) .3s both; }
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0 } to { transform: none; opacity: 1 } }
.q { align-self: flex-start; max-width: 100%; font-size: var(--t-body); color: var(--mute); padding: 6px 12px; border-radius: 14px; background: #f0f2fb; }
.q.on-kv { color: #fff; background: var(--veil); }
.speech { font-size: 17px; font-weight: 400; line-height: 1.45; color: var(--ink); }
.price s { color: #8c90b0; font-weight: 400; }
.price b { color: var(--primary); font-weight: 900; font-style: oblique 12deg; }
.price b.sale { background: var(--obppc); padding: 0 .25em; }
.rows { display: flex; flex-direction: column; flex-shrink: 0; border-top: 2px solid var(--primary); }
.lineup { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 16px; background: #f0f2fb; }
.tile .thumb { width: 44px; height: 44px; background: #fff; }
.tile .thumb img { height: 50px; }
.tile .name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tile .name b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .name span { font-size: 12px; color: var(--mute); }
.tile em { font-style: normal; font-size: 14px; font-weight: 700; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.thumb { width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; background: #eef1ff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb img { height: 56px; width: auto; }
.row .name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.row .name b { font-size: 17px; font-weight: 700; }
.row .name span { font-size: var(--t-body); color: var(--mute); }
.row .price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.row .price s { font-size: var(--t-body); }
.row .price b { font-size: 20px; }
.row .price em { font-style: normal; font-size: 17px; font-weight: 700; }
.spec { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); font-size: 15px; border-top: 2px solid var(--primary); flex-shrink: 0; }
.spec span { padding: 10px 0; border-bottom: 1px solid var(--line); }
.spec .k { color: var(--mute); }

/* voice prompts (no touch on the kiosk) */
.says { display: flex; flex-wrap: wrap; gap: 8px; }
.say-label { width: 100%; font-size: var(--t-body); font-weight: 700; letter-spacing: .02em; }
.say { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 16px; border-radius: 21px; font-size: 15px; font-weight: 400; line-height: 1.3; }
.say::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 3px; background: currentColor; opacity: .6; }
.say.light { background: #f0f2fb; color: var(--ink); }
.say.veiled { background: var(--veil); color: #fff; }
.kv.t-lemon .say.veiled, .kv.t-allzero .say.veiled { background: rgba(18, 0, 232, .12); color: var(--primary); }
[data-say] { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s ease, filter .12s ease; }
[data-say]:active { transform: scale(.96); filter: brightness(.9); }
.dev .say, .dev [data-say] { outline: 1px dashed rgba(255, 90, 90, .8); }

/* bottom bar on full KV screens */
.bar { position: absolute; left: 16px; right: 16px; top: 784px; height: 80px; border-radius: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px; z-index: 5; }

/* legal band */
.legal { position: absolute; left: 0; right: 0; bottom: 0; height: 80px; padding: 8px 24px; background: #000; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.4; display: flex; flex-direction: column; justify-content: center; gap: 2px; z-index: 6; }

/* voice */
.ring { position: absolute; border-radius: 50%; border: 2px solid rgba(255,255,255,.75); animation: ring 2.2s var(--ease) infinite; }
.ring.r2 { animation-delay: .7s } .ring.r3 { animation-delay: 1.4s }
@keyframes ring { from { transform: scale(1); opacity: .85 } to { transform: scale(1.75); opacity: 0 } }
.orb { position: absolute; border-radius: 50%; background: #fff; color: var(--primary); display: flex; align-items: center; justify-content: center; }
.spark { position: absolute; display: block; height: auto; animation: sparkIn .9s var(--ease) both; }
@keyframes sparkIn { from { transform: scale(.2) rotate(-90deg); opacity: 0 } 60% { opacity: 1 } to { transform: none; opacity: 1 } }
.count { height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.count i { display: block; height: 100%; background: #fff; transform-origin: left; animation: count 8s linear both; }
@keyframes count { from { transform: scaleX(1) } to { transform: scaleX(0) } }
.caret { display: inline-block; width: 3px; height: .9em; background: currentColor; vertical-align: -.08em; margin-left: 4px; animation: blink 1s steps(1) infinite; }
.bounce { display: flex; gap: 10px; }
.bounce i { display: inline-block; width: 12px; height: 12px; border-radius: 6px; background: currentColor; animation: bounce 1s var(--ease) infinite; }
.bounce i:nth-child(2) { animation-delay: .15s } .bounce i:nth-child(3) { animation-delay: .3s }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4 } 40% { transform: translateY(-12px); opacity: 1 } }
.shimmer { background: linear-gradient(90deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.7) 50%, rgba(255,255,255,.12) 100%); background-size: 200% 100%; animation: shim 1.4s linear infinite; }
@keyframes shim { from { background-position: 200% 0 } to { background-position: -200% 0 } }

.ind { position: absolute; left: 24px; top: 756px; display: flex; gap: 6px; align-items: center; z-index: 5; }
.ind i { display: block; width: 6px; height: 6px; border-radius: 3px; background: currentColor; opacity: .45; }
.ind i.on { width: 22px; opacity: 1; }

.pop { animation: pop .5s var(--ease) .8s both; }
@keyframes pop { from { transform: scale(.4); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.badge { position: absolute; z-index: 3; padding: 10px 14px 12px; background: var(--obppc); color: var(--primary); display: flex; flex-direction: column; align-items: flex-start; font-size: var(--t-body); font-weight: 700; transform: rotate(-18deg); }
.badge b { font-weight: 900; font-style: oblique 12deg; font-size: 26px; line-height: 1.1; }

/* route map */
.kmap { position: relative; height: 244px; flex-shrink: 0; border-radius: 20px; background: #f0f2fb; overflow: hidden; }
.kzone { position: absolute; border: 1px dashed #b9c0e0; border-radius: 8px; font-size: 12px; color: var(--mute); padding: 4px 6px; }
.kzone.on { border: 2px solid var(--primary); background: rgba(18, 0, 232, .07); color: var(--primary); font-weight: 700; }
.kpath { position: absolute; background-repeat: repeat; }
.kpath.v { width: 3px; background-image: linear-gradient(180deg, var(--primary) 0 6px, transparent 6px 12px); background-size: 3px 12px; animation: flowV .8s linear infinite; }
.kpath.hz { height: 3px; background-image: linear-gradient(90deg, var(--primary) 0 6px, transparent 6px 12px); background-size: 12px 3px; animation: flowH .8s linear infinite; }
.kpath.hz.back { animation-direction: reverse; }
@keyframes flowV { to { background-position: 0 -12px } }
@keyframes flowH { to { background-position: 12px 0 } }
.kgate { position: absolute; transform: translate(-50%, -50%); padding: 4px 14px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.kpin { position: absolute; transform: translate(-16px, -16px); display: flex; align-items: center; gap: 6px; }
.kpin > span:first-child { width: 32px; height: 32px; border-radius: 16px; background: var(--primary); color: #fff; font-weight: 900; font-size: 15px; display: flex; align-items: center; justify-content: center; animation: pulse 1.6s ease-out 1.8s infinite; }
.kpin > span + span { padding: 5px 10px; border-radius: 12px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.kpin-drop { animation: drop .8s var(--ease) 1s both; }
@keyframes drop { from { transform: translate(-16px, -56px); opacity: 0 } 60% { opacity: 1 } to { transform: translate(-16px, -16px); opacity: 1 } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18,0,232,.5) } 100% { box-shadow: 0 0 0 18px rgba(18,0,232,0) } }
.kmap .note { position: absolute; right: 12px; bottom: 8px; font-size: 11px; color: var(--mute); }

/* operator start screen */
.gate { position: absolute; inset: 0 0 80px 0; z-index: 7; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 0 40px; background: var(--kv); color: #fff; }
.gate .wordmark { width: 140px; margin-bottom: 18px; }
.gate h1 { margin: 0; font-size: var(--t-head); font-weight: 900; font-style: oblique 12deg; line-height: 1.2; }
.gate p { margin: 0; font-size: 15px; line-height: 1.6; opacity: .9; }
.gate button { align-self: flex-start; height: 60px; padding: 0 28px; border: 0; border-radius: 30px; background: #fff; color: var(--primary); font-size: 18px; font-weight: 700; cursor: pointer; }

/* developer panel: ?dev=1 only, outside the customer screen */
.devpanel { position: fixed; top: 0; right: 0; bottom: 0; width: 320px; overflow: auto; padding: 16px; background: #14161c; color: #e7eaf0; font-size: 13px; display: flex; flex-direction: column; gap: 12px; font-family: "Malgun Gothic", sans-serif; }
.devpanel h2 { margin: 0; font-size: 14px; color: #ff8a8a; }
.devpanel .row-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.devpanel button { border: 1px solid #3a3f4b; background: #22252e; color: #e7eaf0; border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 12px; }
.devpanel button:hover { background: var(--primary); border-color: var(--primary); }
.devpanel form { display: flex; gap: 6px; }
.devpanel input { flex: 1; min-width: 0; border: 1px solid #3a3f4b; background: #0d0f14; color: #fff; border-radius: 8px; padding: 8px 10px; }
.devpanel a { color: #8fb8ff; }
.devpanel .log { color: #9aa3b2; line-height: 1.5; white-space: pre-wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
}

/* official two-can splash shot: one image, so it scales in instead of the two-can swing */
.pair.shot img { transform-origin: 50% 70%; animation: shotIn .9s var(--ease) both; }
@keyframes shotIn { from { transform: scale(.86) translateY(24px); opacity: 0 } to { transform: none; opacity: 1 } }

/* product lockup in the wordmark slot, Cold Brewed emblem on Fresh key visuals */
.lockup { display: block; height: auto; margin-top: -4px; }
.emblem { position: absolute; display: block; height: auto; pointer-events: none; }

/* dev only: live camera preview used by the presence check */
.devcam { width: 100%; border-radius: 8px; transform: scaleX(-1); background: #000; }

/* presence detected, dwell not yet met: the bar fills over the minimum dwell time */
.detect .count i { animation-direction: reverse; }
/* sits below the tallest product lockup (CASS FRESH) */
.kv > .status.detect { top: 172px; }
