/* ════════════════════════════════════════════════════════════════════════════
   OWLDID — PREMIUM LAYER (standalone)
   Mirror of the floating-cluster / cursor / grain / stagger block that lives in
   assets/css/main.css. Loaded ONLY by pages on the app asset tree (e.g. /system)
   that use /css/main.css instead of the marketing main.css, so they still get
   the unified Owl + WhatsApp cluster and motion polish. Uses the shared design
   tokens (--sage, --navy, …) which both stylesheets define identically.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Floating action cluster: Owl + WhatsApp, unified bottom-right ── */
.fab-cluster {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: flex; flex-direction: column; gap: 14px;
  align-items: center;
}
.fab {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy);
  color: var(--sage);
  border: 1.5px solid var(--sage);
  box-shadow: 0 12px 30px rgba(3,11,17,0.42);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1), background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.fab:hover { transform: scale(1.07); background: var(--navy-2); }
.fab:active { transform: scale(0.97); }
.fab svg { width: 26px; height: 26px; }
.fab-owl { background: var(--navy) center / 84% no-repeat; }
.fab::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 1.5px solid var(--sage);
  opacity: 0; pointer-events: none;
  animation: fabPulse 3.4s cubic-bezier(0.2,0.8,0.2,1) infinite;
}
.fab-wa::after { animation-delay: 1.7s; }
@keyframes fabPulse {
  0%   { transform: scale(1);   opacity: 0.5; }
  60%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
.fab-tip {
  position: absolute; right: calc(100% + 12px); top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: var(--navy); color: var(--sage);
  border: 1px solid var(--line-navy-2);
  font-family: var(--f-mono); font-size: 12px; white-space: nowrap;
  padding: 7px 11px; border-radius: var(--r-pill);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.fab:hover .fab-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 600px) {
  .fab { width: 54px; height: 54px; }
  .fab-tip { display: none; }
  .fab-cluster { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Owl chat panel ── */
.owl-panel {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  width: min(380px, calc(100vw - 40px));
  height: min(560px, 68vh);
  background: var(--navy-2);
  border: 1px solid var(--line-navy-2);
  border-radius: 20px;
  z-index: 201;
  display: none; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px rgba(3,11,17,0.5);
  font-family: var(--f-ui);
}
.owl-panel.open { display: flex; animation: owlIn 0.32s cubic-bezier(0.2,0.8,0.2,1); }
@keyframes owlIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.owl-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--navy-3); border-bottom: 1px solid var(--line-navy); }
.owl-head .av { width: 34px; height: 34px; border-radius: 50%; background: var(--navy) center / 80% no-repeat; flex: none; }
.owl-head b { color: var(--sage); font-size: 14px; }
.owl-head small { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--on-navy-3); }
.owl-x { margin-left: auto; font-size: 22px; line-height: 1; color: var(--sage); background: none; border: none; cursor: pointer; }
.owl-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.owl-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.owl-msg.bot { background: rgba(192,208,192,0.10); color: var(--on-navy); align-self: flex-start; border-bottom-left-radius: 4px; }
.owl-msg.me  { background: var(--sage); color: var(--navy); align-self: flex-end; border-bottom-right-radius: 4px; }
.owl-foot { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-navy); }
.owl-foot input { flex: 1; padding: 11px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-navy-2); background: rgba(192,208,192,0.06); color: var(--sage); font-family: var(--f-ui); font-size: 14px; }
.owl-foot input::placeholder { color: var(--on-navy-3); }
.owl-foot input:focus { outline: none; border-color: var(--sage); }
.owl-foot button { border: none; border-radius: var(--r-pill); padding: 0 16px; background: var(--sage); color: var(--navy); font-weight: 700; cursor: pointer; }
.owl-cta { display: inline-block; margin-top: 8px; background: var(--sage); color: var(--navy); font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: var(--r-pill); text-decoration: none; }
.owl-cta:hover { background: var(--sage-3); }
@media (max-width: 600px) {
  .owl-panel { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 16px; left: 16px; width: auto; }
}

/* ── Custom cursor (desktop only; enabled by premium.js) ── */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9999;
  border-radius: 50%; pointer-events: none;
  mix-blend-mode: difference; will-change: transform;
}
.cursor-dot { width: 7px; height: 7px; background: #fff; margin: -3.5px 0 0 -3.5px; }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1.5px solid rgba(255,255,255,0.6);
  transition: width 0.22s ease, height 0.22s ease, margin 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}
.cursor-ring.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(255,255,255,0.12); border-color: transparent; }
body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor .faq-item, body.has-cursor [data-hover] { cursor: none; }

/* ── Hero grain + headline stagger ── */
.hero-grain {
  position: absolute; inset: -50%;
  z-index: 0; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainDrift 18s linear infinite;
}
@keyframes grainDrift {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(-2.5%, 2%); }
  100% { transform: translate(0, 0); }
}
.hero > .page-wrap { position: relative; z-index: 1; }
.hero-title .word { display: inline-block; }
.hero-title.stagger .word {
  opacity: 0; transform: translateY(0.5em);
  animation: wordRise 0.7s cubic-bezier(0.2,0.85,0.25,1) forwards;
}
@keyframes wordRise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-title.stagger .word { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero-grain { display: none; }
  .cursor-dot, .cursor-ring { display: none; }
  .fab::after { display: none; }
}
@media print {
  .fab-cluster, .owl-panel, .cursor-dot, .cursor-ring { display: none !important; }
}
