/* ------------------------------------------------------------------
   Hand + face interaction layer
   (hero orb, camera dock, gesture cursor, interactive iPhone demo)
------------------------------------------------------------------- */

/* ---------- Hero: split layout ---------- */
.hero.hero-split { text-align: left; width: min(100% - 48px, var(--max-width)); }
.brand { white-space: nowrap; }
@media (max-width: 560px) { .hero.hero-split { width: min(100% - 28px, var(--max-width)); } }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
}

.hero-split .statement { margin-left: 0; margin-right: 0; }
.hero-split .direct-line { margin-left: 0; }
.hero-split .actions { justify-content: flex-start; }

.gesture-card {
  margin-top: 26px;
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.btn.cam-btn {
  justify-self: start;
  background: linear-gradient(180deg, rgba(96, 134, 255, 0.28), rgba(96, 134, 255, 0.14));
  border-color: rgba(150, 185, 255, 0.42);
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
}
.btn.cam-btn[disabled] { opacity: 0.6; cursor: progress; }
.btn.cam-btn svg { width: 18px; height: 18px; }

.cam-status {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-dim);
}
.cam-status.err { color: #ffb4a8; }
.cam-status.ok { color: #b9d0ff; }

.gesture-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gesture-legend li {
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}
.gesture-legend b { color: var(--text-soft); font-weight: 600; }

/* ---------- Camera dock ---------- */
.cam-dock {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  width: 188px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(7, 13, 29, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
.cam-dock[hidden] { display: none; }
.cam-view {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}
.cam-view video,
.cam-view canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.cam-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; flex-wrap: wrap;
}
.cam-pill {
  font-size: 0.68rem; letter-spacing: 0.03em;
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: color 160ms, background 160ms, border-color 160ms;
}
.cam-pill.on {
  color: #d7e4ff;
  background: rgba(96, 134, 255, 0.22);
  border-color: rgba(150, 185, 255, 0.5);
}
.cam-meta .spacer { flex: 1; }
.cam-meta button {
  font: inherit; font-size: 0.68rem;
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent; color: var(--text-soft);
  cursor: pointer;
}
.cam-meta button:hover, .cam-meta button.g-hover { border-color: var(--line-strong); color: var(--text); }

/* ---------- Gesture cursor ---------- */
.g-cursor {
  position: fixed; left: 0; top: 0;
  z-index: 200;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
  will-change: transform;
}
.g-cursor.on { opacity: 1; }
.g-cursor i {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(165, 195, 255, 0.95);
  background: rgba(110, 150, 255, 0.14);
  box-shadow: 0 0 26px rgba(110, 150, 255, 0.55);
  transition: transform 110ms ease, background 110ms ease, border-color 110ms ease;
}
.g-cursor.pinch i { transform: scale(0.5); background: rgba(150, 185, 255, 0.7); }
.g-cursor.drag i { transform: scale(0.62); border-style: dashed; }
.g-cursor.fist i { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.08); }
.g-cursor::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; background: #fff;
}

/* Hover look for gesture-driven "hover" on things that rely on :hover */
.btn.g-hover {
  transform: translateY(-2px);
  border-color: rgba(184, 206, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 24px rgba(96, 134, 255, 0.22), 0 14px 34px rgba(0, 0, 0, 0.2);
}
.card.g-hover { transform: translateY(-4px); border-color: rgba(188, 210, 255, 0.28); }
.menu a.g-hover { color: var(--text); }
.menu a.g-hover::after { transform: scaleX(1); }

/* ---------- KeyAudit demo section ---------- */
.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 52px;
  align-items: center;
}

.demo-steps {
  list-style: none; counter-reset: step;
  margin: 24px 0 0; padding: 0;
  display: grid; gap: 10px;
}
.demo-steps li {
  counter-increment: step;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color 200ms, border-color 200ms, background 200ms;
}
.demo-steps li::before {
  content: counter(step);
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 0.78rem;
  transition: background 200ms, color 200ms;
}
.demo-steps li.active {
  color: var(--text);
  border-color: rgba(150, 185, 255, 0.42);
  background: rgba(110, 150, 255, 0.09);
}
.demo-steps li.active::before { background: rgba(110, 150, 255, 0.4); }
.demo-steps li.done { color: var(--text-soft); }
.demo-steps li.done::before { content: "✓"; background: rgba(120, 220, 160, 0.18); border-color: rgba(120, 220, 160, 0.5); }

.demo-note { margin: 18px 0 0; font-size: 0.84rem; line-height: 1.6; color: var(--text-dim); max-width: 56ch; }

.phone-stage {
  perspective: 1400px;
  display: grid; place-items: center;
  padding: 18px 10px;
  touch-action: pan-y;
}

.phone {
  position: relative;
  width: 322px; height: 672px;
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(145deg, #4a505d 0%, #14171d 38%, #0c0e12 62%, #3a404c 100%);
  box-shadow:
    0 0 0 1.5px #1b1e25,
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.12),
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 70px rgba(80, 120, 255, 0.16);
  transform-style: preserve-3d;
  will-change: transform;
  transform: rotateX(0deg) rotateY(0deg);
}
.phone::before, .phone::after {
  content: ""; position: absolute; width: 3px; border-radius: 2px;
  background: linear-gradient(#59606d, #252932);
}
.phone::before { left: -3px; top: 120px; height: 52px; box-shadow: 0 70px 0 #3a404c; }
.phone::after  { right: -3px; top: 160px; height: 82px; }

.glare {
  position: absolute; inset: 11px;
  border-radius: 43px;
  pointer-events: none;
  z-index: 20;
  background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.10) 46%, rgba(255,255,255,0) 60%);
  background-size: 260% 100%;
  background-position: var(--gx, 50%) 0;
  mix-blend-mode: screen;
}

.screen {
  --ink: #10213f; --muted: #6b7a99; --blue: #0a63ff; --blue-soft: #eef3ff; --blue-line: #d7e2fb;
  --green-bg: #e6f4ea; --green-line: #cfe8d6; --green: #1d6b3a;
  --red-bg: #fde8e8; --red-line: #f6cccc; --red: #b3261e;
  --amber-bg: #fff4de; --amber-line: #f5deb0; --amber: #9a5b00;
  position: relative;
  width: 100%; height: 100%;
  border-radius: 43px;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, "SF Pro Text", Inter, system-ui, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.screen button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.screen button.g-hover { filter: brightness(0.96); outline: 2px solid rgba(10, 99, 255, 0.5); outline-offset: 1px; }

.island { position: absolute; top: 11px; left: 50%; width: 96px; height: 28px; margin-left: -48px; background: #000; border-radius: 20px; z-index: 6; }
.statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 48px; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 28px 0; font-weight: 600; font-size: 13px;
  background: #fff;
}
.statusbar .sb-r { display: flex; align-items: center; gap: 5px; }
.statusbar svg { height: 11px; width: auto; display: block; }
.homebar { position: absolute; bottom: 7px; left: 50%; width: 104px; height: 4px; margin-left: -52px; border-radius: 3px; background: var(--ink); opacity: 0.85; z-index: 6; }

.app { position: absolute; inset: 48px 0 0 0; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; animation: vin 260ms cubic-bezier(.2,.8,.2,1) both; }
.view.back { animation-name: vinBack; }
@keyframes vin { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes vinBack { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }

.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; scroll-behavior: auto; -webkit-overflow-scrolling: touch; padding: 0 14px 22px; }
.scroll::-webkit-scrollbar { display: none; }

/* header */
.app-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 10px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: repeating-linear-gradient(135deg, #ffbf1f 0 5px, #1b5bd6 5px 10px);
}
.logo-mark svg { width: 17px; height: 17px; stroke: #10213f; background: #fff; border-radius: 50%; padding: 2px; }
.who { text-align: right; line-height: 1.2; font-size: 12px; font-weight: 600; }
.chip { display: inline-block; margin-top: 3px; padding: 2px 8px; border-radius: 999px; background: #dfe9ff; color: #1b4fc4; font-size: 10.5px; font-weight: 700; }

.notif { display: block; width: 100%; text-align: center; padding: 8px; border-radius: 12px; background: #dfe9ff; color: #1b4fc4; font-weight: 700; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin: 8px 0 10px; padding: 8px 0; border: 1px solid #e6ecf8; border-radius: 14px; color: var(--muted); font-size: 11px; }
.stats b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 1px; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: 12px; background: var(--blue-soft); border: 1px solid #e1e9fa; margin-bottom: 12px; }
.search svg { width: 15px; height: 15px; stroke: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; width: 100%; color: var(--ink); min-width: 0; }
.search input::placeholder { color: var(--muted); }

.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; padding: 8px 4px; border-radius: 14px; border: 1px solid var(--green-line); background: var(--green-bg); transition: transform 120ms ease; }
.key:active { transform: scale(0.97); }
.key .n { font-size: 27px; font-weight: 800; line-height: 1; }
.key .s { padding: 2px 8px; border-radius: 999px; background: #cfe8d6; color: var(--green); font-size: 10px; font-weight: 700; }
.key .t { font-size: 10px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key.inuse { background: var(--red-bg); border-color: var(--red-line); }
.key.inuse .s { background: #f8d3d3; color: var(--red); }
.key.pending { background: var(--amber-bg); border-color: var(--amber-line); }
.key.pending .s { background: #fbe7bb; color: var(--amber); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 24px 0; }

/* tab bar */
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px 22px; border-top: 1px solid #edf1f8; background: #fff; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0; border-radius: 12px; color: #7d8aa6; font-size: 9.5px; font-weight: 600; }
.tab svg { width: 20px; height: 20px; }
.tab.active { color: var(--blue); }
.tab.active svg { background: #e3ecff; border-radius: 10px; padding: 4px; width: 34px; height: 26px; box-sizing: border-box; }

/* nav header for detail pages */
.pnav { position: relative; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; height: 44px; padding: 0 8px; flex: none; }
.pnav .back { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue); border-radius: 50%; }
.pnav .back svg { width: 20px; height: 20px; }
.pnav .title { text-align: center; font-weight: 700; font-size: 15px; }

/* key detail */
.hero-tile { margin: 4px auto 12px; width: 168px; padding: 16px 10px 14px; border-radius: 20px; text-align: center; border: 1px solid var(--green-line); background: var(--green-bg); }
.hero-tile .n { font-size: 54px; font-weight: 800; line-height: 1; }
.hero-tile .st { margin-top: 6px; font-weight: 700; color: var(--green); }
.hero-tile .who2 { margin-top: 3px; color: var(--ink); }
.hero-tile .since { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.hero-tile.inuse { background: var(--red-bg); border-color: var(--red-line); } .hero-tile.inuse .st { color: var(--red); }
.hero-tile.pending { background: var(--amber-bg); border-color: var(--amber-line); } .hero-tile.pending .st { color: var(--amber); }

.timer-card { text-align: center; padding: 12px 8px; border-radius: 16px; background: var(--blue-soft); margin-bottom: 12px; }
.timer-card .l { color: var(--muted); font-size: 11px; }
.timer-card .v { font-size: 33px; font-weight: 800; letter-spacing: 0.01em; margin: 3px 0 1px; font-variant-numeric: tabular-nums; }
.timer-card .u { color: var(--muted); font-size: 10px; }

.info { border: 1px solid #e6ecf8; border-radius: 16px; padding: 4px 14px; margin-bottom: 14px; }
.info div { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f0f3fa; color: var(--muted); font-size: 11.5px; }
.info div:last-child { border-bottom: 0; }
.info b { color: var(--ink); font-size: 12.5px; font-weight: 600; }

.lead { text-align: center; font-weight: 800; font-size: 15px; margin: 6px 0 6px; }
.sub { text-align: center; color: var(--muted); font-size: 12px; line-height: 1.45; margin: 0 4px 12px; }
.primary { display: block; width: 100%; height: 46px; border-radius: 14px; background: var(--blue); color: #fff !important; font-weight: 700; font-size: 14.5px; }
.primary[disabled] { background: #9bbcff; cursor: default; }
.soft { display: block; width: 100%; height: 40px; border-radius: 12px; background: var(--blue-soft); color: #1b4fc4 !important; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.eyebrow2 { margin: 18px 0 8px; font-size: 10px; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; text-transform: uppercase; }

.code-card { text-align: center; padding: 14px 10px; border-radius: 18px; background: var(--blue-soft); margin-bottom: 12px; }
.code-card h4 { margin: 0 0 8px; font-size: 14px; }
.code { font-size: 38px; font-weight: 800; letter-spacing: 0.28em; margin-right: -0.28em; color: var(--blue); font-variant-numeric: tabular-nums; }
.code-card p { margin: 8px 6px 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }

.confirm-card { padding: 14px 12px 14px; border-radius: 18px; background: var(--blue-soft); margin-bottom: 10px; }
.confirm-card h4 { margin: 0 0 4px; font-size: 16px; }
.confirm-card p { margin: 0 0 10px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.boxes { display: flex; justify-content: center; gap: 8px; margin: 6px 0 4px; }
.box { width: 44px; height: 46px; display: grid; place-items: center; font-size: 22px; font-weight: 800; border-radius: 10px; background: #fff; border: 1.5px solid #c9d6f3; }
.box.cur { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(10, 99, 255, 0.15); }
.boxes.shake { animation: shake 360ms; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.hint { text-align: center; font-size: 10.5px; color: var(--muted); margin-bottom: 8px; min-height: 14px; }
.hint.err { color: var(--red); font-weight: 600; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.pad button { height: 40px; border-radius: 10px; background: #fff; border: 1px solid #dbe5fa; font-size: 17px; font-weight: 700; }
.pad button:active { background: #e8efff; }
.pad button svg { width: 22px; height: 22px; }

.ok-badge { width: 78px; height: 78px; margin: 6px auto 10px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; animation: pop 420ms cubic-bezier(.2,1.4,.4,1) both; }
.ok-badge svg { width: 38px; height: 38px; stroke: #fff; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.big-title { text-align: center; font-size: 22px; font-weight: 800; line-height: 1.15; margin: 0 0 6px; }

.log-row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 2px; border-bottom: 1px solid #f0f3fa; }
.log-row i { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--blue); }
.log-row small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }

.toast { position: absolute; left: 16px; right: 16px; bottom: 74px; z-index: 8; padding: 10px 12px; border-radius: 12px; background: rgba(16, 33, 63, 0.94); color: #fff; font-size: 12px; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity 180ms, transform 180ms; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .demo-grid { grid-template-columns: 1fr; gap: 28px; }
  .phone-stage { order: 2; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 10px; }
  .hero-split .actions .btn { width: 100%; }
  .btn.cam-btn { justify-self: stretch; width: 100%; }
}

@media (max-width: 560px) {
  .cam-dock { width: 128px; left: 10px; bottom: 10px; padding: 6px; border-radius: 14px; }
  .cam-pill { font-size: 0.6rem; padding: 2px 6px; }
  .cam-meta button { font-size: 0.6rem; padding: 2px 6px; }
  .phone { transform-origin: top center; }
}
@media (max-width: 480px) {
  .demo-grid > * { min-width: 0; }
  .phone-stage { zoom: 0.86; padding: 10px 0; }
}
@media (max-width: 360px) {
  .phone-stage { zoom: 0.78; }
}

@media (prefers-reduced-motion: reduce) {
  .view, .ok-badge { animation: none !important; }
}

/* ---------- Bigger camera dock + HUD + page-wide hand skeleton ---------- */
.cam-dock { width: 268px; }
.cam-hud { margin-top: 7px; font: 600 0.68rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.02em; color: #b9d0ff; min-height: 0.8rem; }
.hand-overlay { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 150; }
@media (max-width: 560px) { .cam-dock { width: 150px; } .cam-hud { font-size: 0.58rem; } }

/* keep the slider row usable at small sizes */
@media (max-width: 560px) { .tornado-controls { grid-template-columns: auto 1fr; } .tornado-controls output { grid-column: 2; text-align: left; } }

/* ---------- Dwell ring on the gesture cursor ---------- */
.g-cursor::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(rgba(157, 255, 208, 0.98) var(--progress-angle, 0deg), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  opacity: 0; transition: opacity 120ms;
}
.g-cursor.dwelling::before { opacity: 1; }
.g-cursor.pressed::before { opacity: 1; filter: drop-shadow(0 0 8px rgba(157, 255, 208, 0.9)); }
.g-cursor.pressed i { border-color: #9dffd0; background: rgba(157, 255, 208, 0.38); transform: scale(0.72); }
.cam-meta button.on { background: rgba(110, 150, 255, 0.3); color: #fff; border-color: rgba(150, 185, 255, 0.5); }

/* ======================================================================
   v3: case-study rows, How-it-works, tour
====================================================================== */
.link-btn { justify-self: start; font: inherit; font-size: 0.86rem; color: var(--text-soft); background: none; border: 0; padding: 4px 0; cursor: pointer; border-bottom: 1px dashed var(--line-strong); }
.link-btn:hover, .link-btn.g-hover { color: #fff; border-bottom-color: rgba(190, 210, 255, 0.7); }

/* focus visibility everywhere (keyboard users) */
:where(a, button, input, summary, canvas):focus-visible { outline: 2px solid #9dc0ff; outline-offset: 3px; border-radius: 8px; }

/* ---------- Selected work: numbered case studies ---------- */
#work { padding-top: 40px; }
.work-head { margin-bottom: 18px; }
.work-row {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center;
  padding: 56px 0; border-top: 1px solid var(--line);
}
.work-meta { display: flex; align-items: center; gap: 12px; font: 600 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; color: var(--text-dim); text-transform: uppercase; }
.work-meta .n { color: var(--text); }
.work-meta .rule { flex: 0 0 34px; height: 1px; background: var(--line-strong); }
.work-title { margin: 16px 0 14px; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.25rem); line-height: 1.12; letter-spacing: -0.03em; color: #f6f8ff; }
.work-outcome { margin: 0 0 16px; color: var(--text-soft); line-height: 1.7; font-size: 0.98rem; max-width: 52ch; }
.work-outcome b { color: #fff; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; }
.tags li { font-size: 0.76rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-soft); background: rgba(255, 255, 255, 0.03); }
.work-link { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; padding: 4px 0 6px; border-bottom: 1px solid var(--line-strong); transition: gap 160ms, border-color 160ms; }
.work-link:hover, .work-link.g-hover { gap: 14px; border-color: rgba(190, 210, 255, 0.8); }
.try-label { margin: 26px 0 0; font-size: 0.86rem; color: var(--text-dim); }
.work-text .demo-steps { margin-top: 12px; }

.work-media { position: relative; border-radius: 28px; padding: 34px; min-height: 380px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.09); }
.work-media::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), transparent 55%); pointer-events: none; }
.media-blue   { background: linear-gradient(140deg, #14307f 0%, #2a62f0 55%, #62b8ff 100%); }
.media-indigo { background: linear-gradient(140deg, #2a2a8a 0%, #5a45f0 52%, #b27bff 100%); }
.media-teal   { background: linear-gradient(140deg, #0d3f4d 0%, #157a86 55%, #5cc8b2 100%); }
.media-slate  { background: linear-gradient(140deg, #0e1430 0%, #1f2a58 60%, #364b94 100%); }
.work-media .phone-stage { padding: 0; position: relative; }

.alert-stack { position: relative; display: grid; gap: 12px; width: min(380px, 100%); }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.94); color: #10213f; box-shadow: 0 14px 30px rgba(8, 20, 60, 0.28); }
.alert i { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: #4b83ff; }
.alert b { display: block; font-size: 0.92rem; } .alert span { display: block; font-size: 0.82rem; color: #51607d; margin-top: 2px; line-height: 1.4; }
.alert.a2 i { background: #f0a92a; } .alert.a3 i { background: #e5533e; }
.alert.a1 { transform: scale(0.94); opacity: 0.82; } .alert.a2 { transform: scale(0.97); opacity: 0.92; }

.wants-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: min(380px, 100%); position: relative; }
.wants-list li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; backdrop-filter: blur(6px); }
.wants-list b { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #fff; color: #0d3f4d; font-family: Georgia, serif; font-size: 1.1rem; }
.wants-list span { font-size: 0.95rem; }

.node-grid { position: relative; width: 100%; height: 300px; background: radial-gradient(circle, #b8c8ff 3.2px, transparent 3.8px) 0 0 / 36px 36px;
  -webkit-mask-image: linear-gradient(115deg, #000 0 38%, rgba(0,0,0,0.12) 38% 50%, #000 50%); mask-image: linear-gradient(115deg, #000 0 38%, rgba(0,0,0,0.12) 38% 50%, #000 50%); }
.work-media.media-slate::after { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: linear-gradient(115deg, transparent 39%, rgba(255, 120, 100, 0.22) 44%, transparent 49%); pointer-events: none; }

.work-more { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 34px; border-top: 1px solid var(--line); }
.work-more a { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.88rem; color: var(--text-soft); }
.work-more a:hover, .work-more a.g-hover { color: #fff; border-color: rgba(190, 210, 255, 0.6); }

/* ---------- How this site works ---------- */
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.how-card { border: 1px solid rgba(179, 201, 255, 0.1); border-radius: 20px; padding: 22px; background: rgba(255, 255, 255, 0.02); }
.how-card h3 { margin: 0 0 12px; font-size: 1.05rem; color: #f6f8ff; }
.how-card ul { margin: 0; padding-left: 18px; }
.how-card li { margin: 0 0 12px; color: var(--text-soft); font-size: 0.9rem; line-height: 1.6; }
.how-card li b { color: #fff; font-weight: 600; }
.how-settings { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(110, 150, 255, 0.06); }
.check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: #7ea8ff; cursor: pointer; }
.check b { display: block; } .check small { display: block; color: var(--text-dim); font-size: 0.82rem; margin-top: 2px; }
.how-limits { margin: 18px 0 0; font-size: 0.84rem; line-height: 1.6; color: var(--text-dim); }
.how-limits b { color: var(--text-soft); }

/* ---------- Gesture tour ---------- */
.tour {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 160;
  width: min(560px, calc(100vw - 24px)); display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; padding: 12px;
  border-radius: 22px; border: 1px solid var(--line-strong); background: rgba(7, 13, 29, 0.94);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.tour[hidden] { display: none; }
.tour:focus { outline: none; }
.tour-art canvas { display: block; width: 170px; height: 170px; border-radius: 16px; background: radial-gradient(circle at 50% 80%, rgba(80, 120, 255, 0.22), rgba(255, 255, 255, 0.02)); }
.tour-body { display: grid; align-content: space-between; gap: 8px; min-width: 0; }
.tour-kicker { display: flex; justify-content: space-between; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.tour-cap b { display: block; font-size: 1.05rem; letter-spacing: -0.01em; color: #fff; }
.tour-cap span { display: block; margin-top: 4px; font-size: 0.86rem; line-height: 1.5; color: var(--text-soft); }
.tour-pips { display: flex; gap: 6px; }
.tour-pips i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); transition: background 200ms; }
.tour-pips i.on { background: rgba(150, 190, 255, 0.9); } .tour-pips i.done { background: #7be0ad; }
.tour-actions { display: flex; justify-content: space-between; gap: 8px; }
.tour-actions button { font: inherit; font-size: 0.85rem; padding: 8px 16px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line-strong); background: transparent; color: var(--text-soft); }
.tour-actions .tour-next { background: rgba(110, 150, 255, 0.3); color: #fff; border-color: rgba(150, 185, 255, 0.5); }
.tour-actions button.g-hover { outline: 2px solid rgba(150, 185, 255, 0.7); outline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .work-row { grid-template-columns: 1fr; gap: 28px; padding: 44px 0; }
  .how-grid { grid-template-columns: 1fr; }
  .tornado-card { justify-self: center; }
}
@media (max-width: 560px) {
  .work-media { padding: 20px 8px; min-height: 0; }
    .tour { top: 74px; bottom: auto; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
  .tour-art canvas { width: 96px; height: 96px; }
  .tour-cap b { font-size: 0.95rem; } .tour-cap span { font-size: 0.78rem; }
}
@media (prefers-reduced-motion: reduce) { .work-link, .tour-pips i { transition: none; } }

/* ---------- Shared pill button ---------- */
.pill-btn {
  font: inherit; font-size: 0.88rem; color: var(--text-soft); cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03);
  padding: 9px 18px; border-radius: 999px;
  transition: background 160ms, color 160ms, border-color 160ms;
  -webkit-tap-highlight-color: transparent;
}
.pill-btn:hover, .pill-btn.g-hover { color: #fff; border-color: rgba(190, 210, 255, 0.6); background: rgba(110, 150, 255, 0.16); outline: none; }
.pill-btn[aria-pressed="true"] { background: rgba(110, 150, 255, 0.34); color: #fff; }

/* ======================================================================
   v4: calm first screen. Everything above the fold fits one window.
====================================================================== */
.hero-wrap { padding: 20px 0 24px; align-items: center; min-height: calc(100vh - 72px); }
.hero-split .eyebrow { margin-bottom: 12px; }
.hero-split .role-line { margin-top: 8px; }
.hero-split .statement { margin-top: 14px; font-size: clamp(0.96rem, 1.5vw, 1.1rem); line-height: 1.6; }
.hero-split .actions { margin-top: 20px; gap: 10px; }
.hero-split .actions .btn { height: 44px; min-width: 0; padding: 0 20px; font-size: 0.92rem; }

.gesture-card { margin-top: 16px; gap: 6px; max-width: 460px; }
.gesture-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gesture-card .btn.cam-btn { height: 42px; min-width: 0; font-size: 0.9rem; padding: 0 18px; }
.gesture-card .link-btn { font-size: 0.82rem; }
.cam-status { font-size: 0.78rem; line-height: 1.45; }
.gesture-help { margin-top: 2px; }
.gesture-help summary { display: inline-block; cursor: pointer; font-size: 0.78rem; color: var(--text-dim); list-style: none; padding: 2px 0; border-bottom: 1px dashed var(--line-strong); }
.gesture-help summary::-webkit-details-marker { display: none; }
.gesture-help summary::after { content: " +"; }
.gesture-help[open] summary::after { content: " −"; }
.gesture-help .gesture-legend { margin-top: 8px; }

/* ---------- Camera panel: small, one row of controls ---------- */
.cam-dock { width: 320px; padding: 8px; border-radius: 18px; left: 14px; bottom: 14px; }
.cam-view { border-radius: 10px; }
.cam-hud { margin-top: 6px; font-size: 0.72rem; }
.cam-meta { margin-top: 5px; gap: 4px; flex-wrap: nowrap; }
.cam-meta .cam-pill { display: none; }                       /* the status line above already says Hand ✓ / Face ✓ */
.cam-meta button { flex: 1; padding: 6px 0; font-size: 0.74rem; text-align: center; min-width: 0; }
.cam-meta button#camTour { flex: 0 0 24px; }

/* ---------- The on-page hand outline is opt-in now (the camera panel already shows it) ---------- */
.hand-overlay { opacity: 0.85; }

/* ---------- Tour: a small card in the corner, not a banner across the page ---------- */
.tour { left: auto; right: 14px; bottom: 14px; transform: none; width: min(340px, calc(100vw - 28px)); grid-template-columns: 78px minmax(0, 1fr); gap: 10px; padding: 9px; border-radius: 16px; }
.tour-art canvas { width: 78px; height: 78px; border-radius: 12px; }
.tour-kicker { font-size: 0.6rem; }
.tour-cap b { font-size: 0.9rem; }
.tour-cap span { font-size: 0.76rem; line-height: 1.4; margin-top: 2px; }
.tour-pips i { height: 3px; }
.tour-actions button { padding: 5px 12px; font-size: 0.78rem; }
.tour-body { gap: 6px; }
@media (max-width: 700px) { .tour { right: auto; left: 50%; transform: translateX(-50%); top: 70px; bottom: auto; } }
@media (max-width: 560px), (pointer: coarse) { .cam-dock { width: min(210px, 54vw); padding: 6px; left: 10px; bottom: max(10px, env(safe-area-inset-bottom)); } .cam-hud { font-size: 0.65rem; } .cam-meta button { font-size: 0.65rem; padding: 5px 0; } }

/* ---------- Short screens: tighten further so the hero still fits ---------- */
@media (max-height: 760px) and (min-width: 901px) {
  .hero-split h1 { font-size: clamp(2.3rem, 4vw, 3.3rem); }
  .hero-split .statement { margin-top: 10px; }
  .hero-split .actions { margin-top: 14px; }
  .gesture-card { margin-top: 12px; }
}

/* while the camera panel is up, lift the hero text so its status line never sits under the panel */
html.cam-on .hero-copy { padding-bottom: 64px; }
@media (max-width: 900px) { html.cam-on .hero-copy { padding-bottom: 0; } }

/* phones: keep the camera panel's buttons legible (the on-page hand outline is a desktop nicety) */
@media (max-width: 560px), (pointer: coarse) { #camLines { display: none; } .cam-meta { gap: 6px; } .cam-meta button { padding: 4px 0; } }
