/* ─────────────────────────────────────────────────────────────────────
   FreeHands · Ntizar design system (light mode · liquid glass)
   Brand: blue #1E5BFF · orange #FF7A1A
   ───────────────────────────────────────────────────────────────────── */
:root {
  --blue:        #1E5BFF;
  --blue-soft:   #5B85FF;
  --blue-dark:   #0E3FCC;
  --orange:      #FF7A1A;
  --orange-soft: #FFA365;
  --orange-dark: #CC5C0E;

  --glass:        rgba(255,255,255,0.55);
  --glass-strong: rgba(255,255,255,0.78);
  --glass-border: rgba(255,255,255,0.85);

  --text:    #0B1F4D;
  --text-2:  #3D4E78;
  --text-mu: #7B8AAE;

  --bg-top:    #F4F7FF;
  --bg-bottom: #FFEFE3;

  --radius: 22px;
  --shadow: 0 12px 48px rgba(30,91,255,0.14), 0 4px 16px rgba(255,122,26,0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

/* ── Liquid glass primitive ───────────────────────────────────────── */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow);
}
.card { border-radius: var(--radius); padding: 28px 30px; }

/* ── Floating colour orbs ─────────────────────────────────────────── */
.bg-orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45;
  animation: float 18s ease-in-out infinite;
}
.orb-blue    { width: 520px; height: 520px; background: var(--blue);    top: -120px; left: -120px; }
.orb-orange  { width: 480px; height: 480px; background: var(--orange);  bottom: -140px; right: -120px; animation-delay: -6s; }
.orb-blue-2  { width: 360px; height: 360px; background: var(--blue-soft); top: 40%; left: 55%; opacity: .35; animation-delay: -12s; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(30px,-40px) scale(1.06); }
}

/* ── Nav ──────────────────────────────────────────────────────────── */
.nav {
  margin: 16px; padding: 12px 22px; border-radius: 18px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 16px; z-index: 50;
}
.brand { display: flex; align-items: baseline; gap: 10px; font-weight: 700; }
.brand-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  box-shadow: 0 2px 10px rgba(30,91,255,.4);
}
.brand-name { font-size: 18px; color: var(--text); letter-spacing: -0.3px; }
.brand-by   { font-size: 12px; color: var(--text-mu); font-weight: 500; }
.nav nav { display: flex; gap: 14px; align-items: center; }
.nav nav a { font-size: 14px; font-weight: 500; color: var(--text-2); }
.nav nav a:hover { color: var(--text); }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 14px;
  font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; transition: all .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue);   color: #fff; }
.btn-primary:hover  { background: var(--blue-soft); transform: translateY(-1px); }
.btn-primary:active { background: var(--blue-dark); transform: translateY(0); }

.btn-accent  { background: var(--orange); color: #fff; }
.btn-accent:hover  { background: var(--orange-soft); transform: translateY(-1px); }
.btn-accent:active { background: var(--orange-dark); }

.btn-ghost {
  background: var(--glass-strong); color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover { background: #fff; color: var(--blue); }

.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px;
  margin: 28px 24px 56px; align-items: stretch;
}
.hero-text h1 {
  font-size: clamp(40px, 5vw, 64px); line-height: 1.05;
  margin: 12px 0 18px; letter-spacing: -1.5px; font-weight: 800;
}
.grad {
  background: linear-gradient(120deg, var(--blue) 0%, var(--orange) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 17px; color: var(--text-2); line-height: 1.6; max-width: 560px; }
.pill {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: rgba(30,91,255,0.10); color: var(--blue);
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
}
.cta-row { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }
.micro { font-size: 12px; color: var(--text-mu); margin-top: 14px; }

/* ── Hero mock ────────────────────────────────────────────────────── */
.hero-card { display: flex; flex-direction: column; justify-content: space-between; }
.mock {
  position: relative; aspect-ratio: 4 / 3; border-radius: 18px;
  background: linear-gradient(135deg, #EAF1FF, #FFE9D9);
  overflow: hidden; border: 1px solid var(--glass-border);
}
.mock-cursor { position: absolute; left: 55%; top: 48%; }
.mock-cursor span {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 14px rgba(30,91,255,0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
.mock-ring {
  position: absolute; left: calc(55% - 22px); top: calc(48% - 22px);
  width: 50px; height: 50px; border-radius: 50%;
  border: 3px solid var(--orange);
  border-right-color: transparent; border-bottom-color: transparent;
  animation: spin 1.6s linear infinite;
}
.mock-badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,.85); color: var(--blue);
  font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 999px;
  border: 2px solid var(--blue);
}
.mock-target {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 0 8px rgba(255,122,26,.25);
  top: 22%; left: 18%;
}
.mock-target.t2 { top: 70%; left: 30%; opacity: .55; }
.mock-target.t3 { top: 32%; left: 75%; opacity: .55; }
.mock-caption {
  display: flex; gap: 18px; margin-top: 14px; font-size: 12px; color: var(--text-2);
  align-items: center; flex-wrap: wrap;
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-blue   { background: var(--blue); }
.dot-orange { background: var(--orange); }

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 14px rgba(30,91,255,0.10); }
  50%     { box-shadow: 0 0 0 22px rgba(30,91,255,0.22); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Sections ─────────────────────────────────────────────────────── */
section { max-width: 1200px; margin: 0 auto; }
.features, .how, .closing { padding: 40px 24px; }
.features h2, .how h2, .closing h2 {
  font-size: clamp(26px, 3vw, 36px); margin: 0 0 28px; letter-spacing: -.6px;
}
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feat .feat-ico { font-size: 28px; }
.feat h3 { margin: 8px 0 6px; font-size: 17px; }
.feat p { color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 0; }
.feat code { background: rgba(30,91,255,0.08); color: var(--blue); padding: 2px 6px; border-radius: 6px; font-size: 12px; }

.how-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.how-grid .step {
  display: inline-block; font-size: 12px; font-weight: 800; color: var(--orange);
  background: rgba(255,122,26,0.12); padding: 4px 10px; border-radius: 999px;
}
.how-grid h3 { margin: 12px 0 6px; }
.how-grid p { color: var(--text-2); margin: 0; font-size: 14px; }

.closing { text-align: center; margin: 40px 24px; max-width: 880px; }

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 32px; color: var(--text-mu); font-size: 13px;
  border-top: 1px solid rgba(11,31,77,0.08); margin-top: 40px;
  flex-wrap: wrap; gap: 8px;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .nav nav a:not(.btn) { display: none; }
}

/* ─────────────────────────────────────────────────────────────────── */
/*  DEMO PAGE                                                          */
/* ─────────────────────────────────────────────────────────────────── */
.demo-body { min-height: 100vh; }
.demo-main { padding: 24px; max-width: 760px; margin: 0 auto; }
.welcome h1 { margin: 12px 0 10px; font-size: 36px; letter-spacing: -.8px; }
.checklist { margin: 14px 0 22px; padding: 0; list-style: none; color: var(--text-2); }
.checklist li { padding: 6px 0; font-size: 14px; }
.profile-field{display:flex;flex-direction:column;gap:7px;margin:16px 0 8px;font-size:13px;font-weight:800;color:var(--text)}
.profile-field input{width:min(320px,100%);border:1px solid rgba(30,91,255,.24);border-radius:10px;padding:11px 12px;font:inherit;background:rgba(255,255,255,.8);color:var(--text);outline:none}
.profile-field input:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(30,91,255,.12)}

.hidden { display: none !important; }

.arena {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}
.hud {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text);
  display: flex; gap: 10px; align-items: center; z-index: 200;
}
.hud .sep { color: var(--text-mu); }
#hud-state { color: var(--blue); }
.camera-name{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-2)}

.gaze-cursor {
  position: fixed; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(30,91,255,0.85);
  box-shadow: 0 0 0 14px rgba(30,91,255,0.18);
  pointer-events: none; z-index: 150; transform: translate(-50%, -50%);
  transition: top .08s linear, left .08s linear;
}
.target {
  position: fixed; width: 56px; height: 56px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 14px rgba(255,122,26,0.30), 0 12px 30px rgba(255,122,26,.35);
  transform: translate(-50%, -50%);
  cursor: crosshair; z-index: 160;
  display: flex; align-items: center; justify-content: center;
}
.target::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%; background: #fff;
}

.result h2 { margin-top: 0; }

/* Demo additions */
.btn-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}
.diag{margin-top:18px;padding:14px 18px;border-radius:14px;font-size:14px;line-height:1.55;backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.5)}
.diag-info{background:rgba(30,91,255,.10);color:#0b2d80}
.diag-success{background:rgba(46,160,67,.12);color:#1a5b1a}
.diag-warn{background:rgba(255,170,0,.15);color:#7a4a00}
.diag-error{background:rgba(255,80,80,.12);color:#8a1c1c}
.diag code{background:rgba(0,0,0,.06);padding:1px 6px;border-radius:6px;font-size:12.5px}
.webcam-preview{position:fixed;right:18px;bottom:18px;width:160px;height:120px;object-fit:cover;border-radius:14px;border:1px solid rgba(255,255,255,.6);box-shadow:0 8px 24px rgba(30,91,255,.18);z-index:5;background:#000}


/* Phase 2 - gesture round */
.gesture-arena{max-width:680px;margin:32px auto;padding:28px 32px;display:flex;flex-direction:column;gap:16px}
.gesture-head h2{margin:0 0 6px 0;font-size:32px}
.gesture-camera-panel{position:relative;width:100%;aspect-ratio:16/9;min-height:260px;border-radius:16px;overflow:hidden;background:#0b1022;border:1px solid rgba(255,255,255,.7);box-shadow:0 12px 34px rgba(30,91,255,.16)}
.gesture-video,.gesture-canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.gesture-canvas{pointer-events:none}
.gesture-live{position:absolute;left:12px;bottom:12px;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.86);color:var(--text);font-size:12px;font-weight:700;box-shadow:0 6px 18px rgba(0,0,0,.12)}
.gesture-progress{height:10px;border-radius:6px;background:rgba(30,91,255,.08);overflow:hidden}
.gesture-bar{height:100%;width:0%;background:linear-gradient(90deg,#1E5BFF,#FF7A1A);transition:width .12s linear;border-radius:6px}
.gesture-checklist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.gesture-item{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-radius:12px;background:rgba(255,255,255,.55);border:1px solid rgba(255,255,255,.6);font-size:15px}
.gesture-item.in-progress{background:rgba(30,91,255,.12);border-color:rgba(30,91,255,.35)}
.gesture-item.ok{background:rgba(46,160,67,.14);border-color:rgba(46,160,67,.35)}
.gesture-item.fail{background:rgba(255,80,80,.12);border-color:rgba(255,80,80,.35)}
.gesture-item.skip{opacity:.65}
.gesture-item .badge{font-weight:600;font-size:14px}
.gesture-item .badge i{font-style:italic;color:#445;font-weight:500;margin-left:6px}

/* Duck Hunt prototype */
.duck-body{overflow:hidden;background:linear-gradient(180deg,#dce9ff 0%,#fff3e8 100%)}
.duck-nav{position:fixed;left:0;right:0;top:0;margin:12px;z-index:20}
.duck-game{position:fixed;inset:0;overflow:hidden}
.duck-retro-bg{position:absolute;inset:0;overflow:hidden;background:#62a8ee;z-index:0}
.duck-sky{position:absolute;inset:0 0 24%;background:linear-gradient(#5ba5ed,#86c5ff)}
.duck-grass{position:absolute;left:0;right:0;bottom:0;height:24%;background:repeating-linear-gradient(90deg,#2f8a20 0 12px,#4fb728 12px 24px);box-shadow:0 -18px 0 #5fc838 inset,0 -34px 0 rgba(28,96,20,.35) inset}
.duck-tree{position:absolute;left:7%;bottom:20%;width:150px;height:310px}
.duck-tree::before{content:"";position:absolute;left:54px;bottom:0;width:32px;height:220px;background:#57331f;border-radius:16px 16px 6px 6px;transform:rotate(7deg)}
.duck-tree span{position:absolute;border-radius:50%;background:#2f9f24;box-shadow:0 6px 0 #1e7418 inset,0 0 0 3px rgba(0,0,0,.08)}
.duck-tree span:nth-child(1){width:82px;height:54px;left:4px;top:34px}.duck-tree span:nth-child(2){width:86px;height:56px;left:58px;top:68px}.duck-tree span:nth-child(3){width:96px;height:62px;left:34px;top:132px}
.duck-bush{position:absolute;bottom:20%;width:120px;height:64px;border-radius:64px 64px 14px 14px;background:#2d9a25;box-shadow:0 8px 0 #1e7119 inset}
.bush-a{right:13%}.bush-b{right:5%;transform:scale(.75);bottom:18%}
#duck-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:2}
#duck-video{position:fixed;right:18px;bottom:18px;width:180px;height:135px;object-fit:cover;border-radius:14px;border:1px solid rgba(255,255,255,.75);box-shadow:0 12px 34px rgba(30,91,255,.16);transform:scaleX(-1);z-index:18;background:#000}
.duck-gesture{position:fixed;right:18px;bottom:166px;z-index:18;padding:7px 12px;border-radius:999px;font-size:12px;font-weight:800;color:var(--text);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.duck-help{position:fixed;left:18px;top:156px;z-index:22;width:min(360px,calc(100vw - 36px));padding:12px 14px;border-radius:12px;display:flex;flex-direction:column;gap:6px;color:var(--text);font-size:13px;line-height:1.35}
.duck-help strong{color:var(--blue);font-size:14px}.duck-help span{color:var(--text-2)}
.duck-hud{position:fixed;left:50%;top:86px;transform:translateX(-50%);z-index:22;display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:999px;color:var(--text)}
.duck-hud strong{min-width:62px;color:var(--blue)}
.duck-hud span{font-size:13px;color:var(--text-2);max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.duck-crosshair{position:fixed;left:50%;top:50%;width:42px;height:42px;border-radius:50%;border:3px solid var(--blue);box-shadow:0 0 0 12px rgba(30,91,255,.14);transform:translate(-50%,-50%);z-index:21;pointer-events:none}
.duck-crosshair.snap{border-color:var(--orange);box-shadow:0 0 0 16px rgba(255,122,26,.2),0 0 28px rgba(255,122,26,.38)}
.duck-crosshair::before,.duck-crosshair::after{content:"";position:absolute;background:var(--orange);left:50%;top:50%;transform:translate(-50%,-50%)}
.duck-crosshair::before{width:22px;height:3px}.duck-crosshair::after{width:3px;height:22px}
.duck-result{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:25;max-width:520px;text-align:center}
.duck-result h1{margin:0 0 10px;font-size:34px}
.duck-shot-layer{position:fixed;inset:0;z-index:23;pointer-events:none}
.duck-shot{position:absolute;width:82px;height:82px;border-radius:50%;transform:translate(-50%,-50%);animation:duck-shot .52s ease-out forwards}
.duck-shot::before,.duck-shot::after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:50%}
.duck-shot::before{width:20px;height:20px;background:rgba(255,122,26,.95)}
.duck-shot::after{width:82px;height:82px;border:4px solid rgba(255,122,26,.9)}
.duck-shot.hit::before{background:rgba(30,91,255,.95)}
.duck-shot.hit::after{border-color:rgba(30,91,255,.9)}
@keyframes duck-shot{0%{opacity:1;scale:.35}100%{opacity:0;scale:1.35}}

@media (max-width:620px){
  .duck-nav{margin:8px}
  .duck-nav .brand-by{display:none}
  .duck-nav nav{gap:6px}
  .duck-nav .btn{padding:10px 12px}
  .duck-hud{top:82px;width:calc(100% - 24px);justify-content:space-between;gap:8px;padding:8px 10px;border-radius:22px}
  .duck-hud strong{min-width:52px;font-size:16px}
  .duck-hud span{max-width:104px;font-size:12px}
  .duck-hud .btn-sm{padding:6px 8px;font-size:11px}
  .duck-help{left:12px;top:132px;width:calc(100% - 24px);padding:10px 12px;font-size:12px}
  .duck-help span:last-child{display:none}
  #duck-video{right:10px;bottom:10px;width:120px;height:90px;border-radius:10px}
  .duck-gesture{right:10px;bottom:108px;max-width:120px;font-size:11px;padding:6px 9px}
  .duck-crosshair{width:34px;height:34px;box-shadow:0 0 0 9px rgba(30,91,255,.14)}
  .duck-result{width:calc(100% - 32px)}
  .duck-result h1{font-size:28px}
}
