:root {
  --navy: #0b1220;
  --navy-2: #10192b;
  --orange: #f2a25c;
  --teal: #2fb4b0;
  --ink: #f6f1e7;
  --muted: rgba(246, 241, 231, 0.62);
  --glass: rgba(12, 18, 32, 0.55);
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; width: 100%; background: var(--navy); color: var(--ink); font-family: var(--font-body); overflow: hidden; }

/* ---------- AR experience ---------- */
#ar-container { position: fixed; inset: 0; width: 100vw; height: 100vh; background: #000; }
#ar-container video, #ar-container canvas { object-fit: cover; }

#ui { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#ui .panel { pointer-events: auto; }
.hidden { display: none !important; }

/* top brand bar */
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(11,18,32,0.65), rgba(11,18,32,0));
}
.brand-badge {
  font-family: var(--font-display); font-weight: 800; letter-spacing: 1px;
  font-size: 15px; color: var(--navy);
  background: var(--orange); padding: 4px 10px; border-radius: 8px;
}
.brand-text { font-size: 12px; color: var(--muted); line-height: 1.15; }

/* scan hint */
#scan-hint {
  position: absolute; left: 50%; bottom: 132px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 700; font-size: 15px; letter-spacing: 0.2px;
  transition: opacity 0.4s ease; opacity: 0; white-space: nowrap;
}
#scan-hint .reticle {
  width: 18px; height: 18px; border: 2px solid var(--teal); border-radius: 5px;
  position: relative; animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(0.85); opacity: 0.6; } 50% { transform: scale(1.05); opacity: 1; } }

/* corner frame while scanning */
#frame { position: absolute; inset: 8%; pointer-events: none; opacity: 0.9; }
#frame span { position: absolute; width: 42px; height: 42px; border: 3px solid rgba(47,180,176,0.85); }
#frame .tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
#frame .tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
#frame .bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
#frame .br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }

/* bottom controls */
.controls { position: absolute; left: 0; right: 0; bottom: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.pill {
  pointer-events: auto; cursor: pointer; border: none;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-family: var(--font-body);
  font-weight: 800; font-size: 15px; letter-spacing: 0.4px; color: var(--ink);
  background: var(--glass); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform 0.18s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.pill:active { transform: scale(0.96); }
.pill svg { width: 20px; height: 20px; }

#audio-btn.is-on { background: rgba(47,180,176,0.22); border-color: var(--teal); color: #d9fbfa; }
#cta-btn { background: var(--orange); color: #201206; border-color: transparent; box-shadow: 0 10px 30px rgba(242,162,92,0.35); }
#cta-btn:active { transform: scale(0.96); }

/* start screen */
.fullscreen {
  position: absolute; inset: 0; z-index: 30; pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px;
  background: radial-gradient(120% 90% at 50% 0%, #17233c 0%, var(--navy) 60%);
}
.fullscreen h1 { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1.05; margin: 0 0 8px; }
.fullscreen h1 .accent { color: var(--orange); }
.fullscreen p { color: var(--muted); font-size: 15px; max-width: 320px; margin: 6px auto 0; line-height: 1.5; }
.hero-mark { font-family: var(--font-display); font-weight: 800; color: var(--navy); background: var(--orange); padding: 6px 12px; border-radius: 10px; font-size: 18px; letter-spacing: 1px; margin-bottom: 22px; }
.big-btn {
  margin-top: 26px; cursor: pointer; border: none; pointer-events: auto;
  padding: 16px 30px; border-radius: 999px; font-family: var(--font-body);
  font-weight: 800; font-size: 16px; letter-spacing: 0.4px; color: #201206;
  background: linear-gradient(180deg, #ffbf87, var(--orange));
  box-shadow: 0 14px 40px rgba(242,162,92,0.4);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
  display: inline-flex; align-items: center; gap: 10px;
}
.big-btn:active { transform: scale(0.96); }
.perm-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }

/* loading */
#loading .spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.15); border-top-color: var(--teal);
  animation: spin 0.9s linear infinite; margin-bottom: 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#status { color: var(--muted); font-size: 14px; }

@media (min-width: 640px) {
  .fullscreen h1 { font-size: 40px; }
}
