/* =====================================================================
   WATZLY ENTERPRISE DESIGN SYSTEM — PREMIUM SAAS REDESIGN
   Clean Enterprise Aesthetic · Slate, Blue & Emerald Palette · Mobile-First
   ===================================================================== */

:root {
  --primary-blue:       #0066FF;
  --primary-blue-hover: #0052cc;
  --primary-blue-light: #e8f0fe;
  --emerald-primary:    #059669;
  --emerald-hover:      #047857;
  --emerald-light:      #f0fdf4;
  --emerald-border:     #a7f3d0;
  --slate-dark:         #0f172a;
  --slate-body:         #334155;
  --slate-muted:        #64748b;
  --slate-border:       #e2e8f0;
  --bg-page:            #f8fafc;
  --font-main:          'Cairo', sans-serif;
  --font-mono:          'JetBrains Mono', 'Cairo', monospace;
  --transition-base:    0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-card:        1.25rem;
  --radius-btn:         10px;
  --shadow-card:        0 4px 20px -2px rgba(0,0,0,0.06);
  --shadow-blue:        0 10px 25px -4px rgba(29,78,216,0.25);
  --shadow-lg:          0 20px 40px -15px rgba(15,23,42,0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  font-family: var(--font-main) !important;
  background-color: var(--bg-page);
  color: var(--slate-dark);
  overflow-x: hidden !important;
  text-rendering: optimizeLegibility;
}
  width: 100% !important;
  max-width: 100vw !important;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
p, span, a, div, li {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── SPA View Animation ───────────────────────────────────────────── */
#app-view {
  transition: opacity 0.18s ease, transform 0.18s ease;
  min-height: 65vh;
}
.spa-page-exit {
  opacity: 0;
  transform: translateY(4px);
}
.spa-page-enter {
  animation: spaFadeIn 0.25s ease-out forwards;
}

@keyframes spaFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Primary Buttons & CTAs ────────────────────────────────────────── */
.positivus-btn-green {
  background: #0066FF !important;
  background-color: #0066FF !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 0.8rem 1.6rem !important;
  font-size: 0.9rem !important;
  border-radius: 10px !important;
  transition: all var(--transition-base) !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.3) !important;
  border: none !important;
  cursor: pointer !important;
}
.positivus-btn-green:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
  box-shadow: 0 8px 24px rgba(29,78,216,0.4) !important;
  transform: translateY(-2px);
}

.positivus-btn-secondary {
  background: #ffffff !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  padding: 0.8rem 1.6rem !important;
  font-size: 0.9rem !important;
  border-radius: var(--radius-btn) !important;
  transition: all var(--transition-base) !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
  cursor: pointer !important;
  text-decoration: none !important;
}
.positivus-btn-secondary:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  transform: translateY(-1px);
}

.header-cta-desktop {
  display: none !important;
}
@media (min-width: 1024px) {
  .header-cta-desktop {
    display: inline-flex !important;
  }
}

/* ── Bento & Feature Cards ───────────────────────────────────────── */
.bento-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-card);
  padding: 1.75rem;
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
}
.bento-card:hover {
  border-color: #93c5fd;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -10px rgba(29, 78, 216, 0.12);
}

/* ── Watzly Dashboard Mockup Frame ────────────────────────────────── */
.watzly-dashboard-frame {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.watzly-dashboard-frame:hover {
  box-shadow: 0 30px 60px -15px rgba(29, 78, 216, 0.18), 0 0 0 1px rgba(29, 78, 216, 0.2);
}

.watzly-window-header {
  background: #f8fafc;
  border-b: 1px solid #e2e8f0;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Audio Wave Animation ─────────────────────────────────────────── */
@keyframes soundWave {
  0%, 100% { height: 6px; }
  50%       { height: 24px; }
}
.wave-bar {
  width: 3px;
  height: 6px;
  background-color: #1d4ed8;
  border-radius: 9999px;
  display: inline-block;
  animation: soundWave 1.1s infinite ease-in-out;
}
.wave-bar:nth-child(1) { animation-delay: 0.0s; }
.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.1s; }
.wave-bar:nth-child(4) { animation-delay: 0.4s; }
.wave-bar:nth-child(5) { animation-delay: 0.3s; }

/* ── Form Inputs ──────────────────────────────────────────────────── */
.form-input-crisp {
  width: 100%;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.75rem;
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
input.form-input-crisp,
select.form-input-crisp {
  height: 50px;
  padding: 0 1rem;
}
textarea.form-input-crisp {
  width: 100% !important;
  min-height: 130px !important;
  height: 135px !important;
  padding: 0.85rem 1rem !important;
  line-height: 1.6 !important;
  resize: vertical !important;
}
.form-input-crisp:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

/* ── Hub Orbit Stage & Multi-Channel Connectors ────────────────────── */
.hub-orbit-stage {
  position: relative;
  width: 100%;
  max-width: 580px;
  height: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(219, 234, 254, 0.45) 0%, rgba(241, 245, 249, 0.25) 55%, transparent 75%);
  border-radius: 2rem;
}

.hub-core-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 35px rgba(37, 99, 235, 0.5), 0 0 0 8px rgba(219, 234, 254, 0.6);
  z-index: 10;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.hub-core-circle:hover {
  transform: scale(1.06);
}
.hub-core-circle svg {
  width: 36px;
  height: 36px;
  animation: spinHub 20s linear infinite;
}

@keyframes spinHub {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hub-channel-node {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hub-channel-node:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

/* LTR Positions */
html[dir="ltr"] .node-pos-1, .hub-orbit-stage:not(.rtl-mode) .node-pos-1 { top: 14%; left: 15%; }
html[dir="ltr"] .node-pos-2, .hub-orbit-stage:not(.rtl-mode) .node-pos-2 { top: 14%; left: 32%; }
html[dir="ltr"] .node-pos-3, .hub-orbit-stage:not(.rtl-mode) .node-pos-3 { top: 42%; left: 20%; }
html[dir="ltr"] .node-pos-4, .hub-orbit-stage:not(.rtl-mode) .node-pos-4 { top: 72%; left: 22%; }

/* RTL Positions */
html[dir="rtl"] .node-pos-1, .hub-orbit-stage.rtl-mode .node-pos-1 { top: 14%; right: 15%; left: auto; }
html[dir="rtl"] .node-pos-2, .hub-orbit-stage.rtl-mode .node-pos-2 { top: 14%; right: 32%; left: auto; }
html[dir="rtl"] .node-pos-3, .hub-orbit-stage.rtl-mode .node-pos-3 { top: 42%; right: 20%; left: auto; }
html[dir="rtl"] .node-pos-4, .hub-orbit-stage.rtl-mode .node-pos-4 { top: 72%; right: 22%; left: auto; }

/* Floating Elements */
.hub-chat-bubble-top {
  position: absolute;
  top: 12%;
  right: 10%;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 8px 16px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  font-size: 13px;
  font-weight: 700;
  z-index: 6;
  color: #0f172a;
  white-space: nowrap;
}
html[dir="rtl"] .hub-chat-bubble-top, .hub-orbit-stage.rtl-mode .hub-chat-bubble-top {
  right: auto;
  left: 10%;
}

.hub-chat-bubble-right {
  position: absolute;
  top: 38%;
  right: 14%;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 10px 18px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  font-size: 13.5px;
  font-weight: 600;
  z-index: 6;
  color: #0f172a;
  white-space: nowrap;
}
html[dir="rtl"] .hub-chat-bubble-right, .hub-orbit-stage.rtl-mode .hub-chat-bubble-right {
  right: auto;
  left: 14%;
}

.hub-verified-card {
  position: absolute;
  bottom: 12%;
  right: 8%;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 6;
  text-align: left;
}
html[dir="rtl"] .hub-verified-card, .hub-orbit-stage.rtl-mode .hub-verified-card {
  right: auto;
  left: 8%;
  text-align: right;
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

@keyframes floatRevGentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(7px); }
}

@keyframes pulseHaloHub {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5), 0 0 0 4px rgba(219, 234, 254, 0.8); }
  70% { box-shadow: 0 0 0 20px rgba(37, 99, 235, 0), 0 0 0 10px rgba(219, 234, 254, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0), 0 0 0 0 rgba(219, 234, 254, 0); }
}

.anim-float { animation: floatGentle 5s ease-in-out infinite; }
.anim-float-rev { animation: floatRevGentle 6s ease-in-out infinite; }
.anim-pulse { animation: pulseHaloHub 2.8s infinite; }

/* ── Mobile Responsive Hub & Layout Adjustments ───────────────────── */
@media (max-width: 640px) {
  .hub-orbit-stage {
    height: 360px;
    max-width: 100%;
    overflow: visible;
  }
  .hub-core-circle {
    width: 60px;
    height: 60px;
  }
  .hub-core-circle svg {
    width: 24px;
    height: 24px;
  }
  .hub-channel-node {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .hub-channel-node svg {
    width: 16px;
    height: 16px;
  }
}


/* Smooth Data Connector Line Animation */
.engine-connector-line {
  stroke-dasharray: 6 6;
  animation: engineFlow 15s linear infinite;
}

@keyframes engineFlow {
  from { stroke-dashoffset: 120; }
  to { stroke-dashoffset: 0; }
}


/* Continuous Architecture Flow Lines */
.arch-flow-line {
  stroke: #3b82f6;
  stroke-width: 2.5px;
  fill: none;
  stroke-linecap: round;
}

.arch-flow-animated {
  stroke-dasharray: 8 6;
  animation: flowDash 12s linear infinite;
}

@keyframes flowDash {
  from { stroke-dashoffset: 140; }
  to { stroke-dashoffset: 0; }
}


/* Solid + Animated SVG Flow Lines */
.arch-flow-solid {
  stroke: #60a5fa;
  stroke-width: 1.8px;
  fill: none;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

.arch-flow-pulse {
  stroke: #3b82f6;
  stroke-width: 1.8px;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 4 10;
  opacity: 0.6;
  animation: subtlePulseFlow 10s linear infinite;
}

@keyframes subtlePulseFlow {
  from { stroke-dashoffset: 120; }
  to { stroke-dashoffset: 0; }
}

@keyframes pulseFlow {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}


/* CTA ACTION BUTTONS ONLY */
.positivus-btn-green, a.positivus-btn-green, .btn-primary {
  border-radius: 10px !important;
}
