/* ============================================================
   AcceptanceOne shared site styles
   Loaded from every page. Owns the fog background + mobile fixes.
   ============================================================ */

/* Fog / smoke background layer (replaces the old wave-bg canvas) */
.fog-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #000;
}
.fog-puff {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}
.fog-puff-1 { width: 900px; height: 900px; top: -20%; left: -15%;
  background: radial-gradient(circle, rgba(129,140,248,0.55), rgba(129,140,248,0) 65%);
  animation: fog-drift-1 42s ease-in-out infinite alternate; }
.fog-puff-2 { width: 750px; height: 750px; top: 20%; right: -18%;
  background: radial-gradient(circle, rgba(192,132,252,0.5), rgba(192,132,252,0) 65%);
  animation: fog-drift-2 55s ease-in-out infinite alternate; }
.fog-puff-3 { width: 1000px; height: 1000px; top: 45%; left: 25%;
  background: radial-gradient(circle, rgba(139,92,246,0.4), rgba(139,92,246,0) 65%);
  animation: fog-drift-3 60s ease-in-out infinite alternate; }
.fog-puff-4 { width: 700px; height: 700px; top: 65%; left: -10%;
  background: radial-gradient(circle, rgba(168,139,250,0.45), rgba(168,139,250,0) 65%);
  animation: fog-drift-4 48s ease-in-out infinite alternate; }
.fog-puff-5 { width: 820px; height: 820px; top: 5%; left: 35%;
  background: radial-gradient(circle, rgba(99,102,241,0.4), rgba(99,102,241,0) 65%);
  animation: fog-drift-5 52s ease-in-out infinite alternate; }
@keyframes fog-drift-1 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(18vw,12vh) scale(1.2); } }
@keyframes fog-drift-2 { 0% { transform: translate(0,0) scale(1.05); } 100% { transform: translate(-15vw,20vh) scale(0.9); } }
@keyframes fog-drift-3 { 0% { transform: translate(0,0) scale(0.95); } 100% { transform: translate(-22vw,-14vh) scale(1.15); } }
@keyframes fog-drift-4 { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(24vw,-18vh) scale(1.1); } }
@keyframes fog-drift-5 { 0% { transform: translate(0,0) scale(1.1); } 100% { transform: translate(-14vw,16vh) scale(0.85); } }

/* Mobile-friendly overrides — all pages */
@media (max-width: 767px) {
  /* Wide max-width containers should shrink to viewport with padding */
  main.max-w-\[1000px\],
  main.max-w-\[1040px\],
  main.max-w-\[1100px\],
  main.max-w-\[1400px\] {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  /* Long headings shrink on phone */
  h1.text-4xl, h1.text-5xl, h1.text-6xl { font-size: 2.25rem !important; line-height: 1.1 !important; }
  h2.text-3xl, h2.text-4xl { font-size: 1.75rem !important; line-height: 1.2 !important; }
  /* Nav links that overflow on small screens */
  nav .hidden.md\:flex { display: none !important; }
  /* Two-column grids on request-demo, developers, pricing become single */
  main.grid.lg\:grid-cols-2 { grid-template-columns: 1fr !important; gap: 2rem !important; }
}

/* ================================================================
   Node drawer (module detail modal) — MOBILE REDESIGN
   Desktop grid layout (210px rail + 1fr body) is scrapped on <768px.
   Replaced with a top-loading vertical stack: header bar → body → CTA.
   ================================================================ */
@media (max-width: 767px) {
  .node-drawer-backdrop { padding: 10px !important; align-items: flex-end !important; }
  .node-drawer {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh !important;
    border-radius: 22px 22px 18px 18px !important;
    margin-bottom: 4px !important;
  }
  /* Header bar (was the left rail) */
  .nd-rail {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 18px 56px 18px 20px !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    background: linear-gradient(90deg, rgba(99,102,241,0.16), rgba(192,132,252,0.06) 70%, transparent) !important;
  }
  .nd-rail::before { display: none !important; }
  .nd-rail-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 11px !important;
    flex-shrink: 0 !important;
    position: relative !important; z-index: 1 !important;
  }
  .nd-rail-icon i, .nd-rail-icon svg { width: 20px !important; height: 20px !important; }
  .nd-rail > div:nth-of-type(1) { flex: 1 !important; min-width: 0 !important; padding: 0 !important; }
  .nd-rail > div:nth-of-type(1) #nd-category {
    font-size: 9.5px !important;
    letter-spacing: 0.18em !important;
    margin-bottom: 3px !important;
    color: #a5aaff !important;
  }
  .nd-rail > div:nth-of-type(1) #nd-title {
    font-size: 18px !important;
    line-height: 1.15 !important;
    font-weight: 600 !important;
  }
  /* Hide the "AcceptanceOne · Module" footer text in the header */
  .nd-rail > div:last-of-type { display: none !important; }
  .node-drawer-close {
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.15) !important;
    z-index: 5 !important;
  }
  /* Body */
  .nd-body {
    padding: 18px 20px 22px !important;
    overflow-y: auto !important;
    flex: 1 1 auto !important;
  }
  #nd-desc {
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    margin-bottom: 18px !important;
    color: rgba(226,232,240,0.72) !important;
  }
  /* Metrics — 3-col compact */
  #nd-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 18px !important;
  }
  .nd-metric {
    padding: 12px 6px !important;
    text-align: center !important;
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 10px !important;
    min-height: 60px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  .nd-metric > div:first-child {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
  }
  .nd-metric > div:last-child {
    font-size: 9px !important;
    color: rgba(255,255,255,0.55) !important;
    margin-top: 4px !important;
    line-height: 1.2 !important;
  }
  /* Features — single column */
  #nd-features {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    margin-bottom: 18px !important;
  }
  .nd-feature {
    font-size: 13px !important;
    padding: 10px 12px !important;
    line-height: 1.4 !important;
  }
  /* CTA */
  #nd-cta {
    padding: 13px 16px !important;
    font-size: 14px !important;
    border-radius: 999px !important;
  }
}

/* Footer columns on mobile (used everywhere with the same footer pattern) */
@media (max-width: 640px) {
  footer .grid.sm\:grid-cols-2,
  footer .grid.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
  }
  footer .lg\:col-span-2:not(.col-span-3) { grid-column: 1 / -1 !important; }
}
