@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Safety net: prevent accidental horizontal scroll from decorative
   absolutely-positioned elements (hero streaks, orbit rings, flares) now
   that layouts reflow across breakpoints. */
html, body { overflow-x: hidden; }

/* ============ Responsive: mobile nav, grid utilities ============
   Added for mobile/tablet support. .nx-rgrid = collection of 2-5 equal
   card/stat columns (collapses to 2 col at tablet, 1 col on phone).
   .nx-rsplit = a two-block asymmetric split (hero text+visual, sidebar+
   content, label+description) that stacks straight to 1 column earlier,
   since the two sides are usually not interchangeable card units. */
@media (max-width: 900px) {
  .nx-rgrid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 860px) {
  .nx-rsplit { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .nx-rgrid { grid-template-columns: 1fr !important; }
}

/* ============ "How it works" step sequence (squdo-ai.html) ============
   Desktop: 5-across row with a horizontal connector line + dot above each
   step. That connector topology only works in a single row, so tablet/phone
   (<=900px, where the row would wrap) switches to a left-side vertical
   timeline instead of letting the horizontal lines overlap the stacked text. */
.nx-howitworks { display: grid; grid-template-columns: repeat(5, 1fr); column-gap: 24px; margin-top: 64px; }
.nx-howitworks-item { position: relative; padding-right: 18px; }
.nx-howitworks-line { position: absolute; top: -33px; left: 0; right: 0; height: 1px; background: var(--border-default); }
.nx-howitworks-item:last-child .nx-howitworks-line { right: 50%; }
.nx-howitworks-dot { position: absolute; top: -38px; left: 0; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--text-accent); background: var(--bg-raised); }
@media (max-width: 900px) {
  .nx-howitworks { grid-template-columns: 1fr; row-gap: 36px; margin-top: 44px; }
  .nx-howitworks-item { padding-right: 0; padding-left: 28px; }
  .nx-howitworks-line { top: 5px; bottom: -36px; left: 4px; right: auto; width: 1px; height: auto; background: var(--border-default); }
  .nx-howitworks-item:last-child .nx-howitworks-line { display: none; }
  .nx-howitworks-dot { top: 0; left: 0; }
}

/* Nav: hamburger toggle hidden on desktop, shown under 860px */
.nx-nav-toggle { display: none; }
@media (max-width: 860px) {
  .nx-nav-desktop { display: none !important; }
  .nx-nav-toggle { display: inline-flex !important; align-items: center; justify-content: center; }
}
.nx-mobile-menu {
  border-top: 1px solid var(--border-subtle);
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-base);
}

/* Homepage: product showcase (tab list + preview panel) mobile reflow.
   Tabs stack as a full-width vertical list (not a horizontally-scrolling
   row) so labels never get clipped mid-word; the preview panel sits below. */
@media (max-width: 760px) {
  .nx-product-showcase { grid-template-columns: 1fr !important; height: auto !important; }
  .nx-product-showcase .nx-product-tabs {
    flex-direction: column !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nx-product-showcase .nx-product-tab { flex: 0 0 auto !important; padding: 14px 18px !important; }
  .nx-product-showcase .nx-product-panel { padding: 32px 24px !important; min-height: 320px; }

  /* Console chrome header: let the badge drop to its own row instead of
     colliding with the title, and drop the redundant "/ products" path. */
  .nx-console-header { flex-wrap: wrap; row-gap: 8px; }
  .nx-console-path { display: none; }
  .nx-console-badge { margin-left: 0 !important; flex: 1 1 100%; }
}

/* Accessibility: skip-to-content link (WCAG 2.2 "Bypass Blocks").
   Hidden off-screen until it receives keyboard focus. */
.nx-skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 1000;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.nx-skip-link:focus-visible,
.nx-skip-link:focus {
  top: 12px;
  outline: none;
  box-shadow: var(--ring-accent, 0 0 0 3px rgba(52,104,192,0.32));
}

/* Site-wide body copy: Inter for readability (SQUDO AI page sets its own font stack) */
:root, [data-theme="dark"] {
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Product mock animations: typing indicator, fade-in answer, live pulse dot */
@keyframes nx-typing-dot { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes nx-fade-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes nx-livedot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.nx-livedot { animation: nx-livedot-pulse 1.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .nx-livedot { animation: none !important; } }

/* Success Stories: flare + modal animations */
.nx-flare { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.35; }
.nx-flare-a { width: 420px; height: 420px; top: -160px; right: 8%; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); animation: nx-flare-drift-a 14s ease-in-out infinite; }
.nx-flare-b { width: 320px; height: 320px; bottom: -140px; left: 12%; background: radial-gradient(circle, #C9A6FF 0%, transparent 70%); animation: nx-flare-drift-b 18s ease-in-out infinite; }
@keyframes nx-flare-drift-a { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-40px, 30px) scale(1.12); } }
@keyframes nx-flare-drift-b { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -20px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .nx-flare { animation: none !important; } }
.nx-story-card { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.nx-story-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,0.35)); }
@keyframes nx-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nx-modal-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Scroll-reveal (Company page and beyond) */
.nx-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.nx-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .nx-reveal { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* Company hero orbit visual */
.nx-orbit-wrap { position: relative; width: 100%; aspect-ratio: 1; max-width: 320px; margin: 0 auto; }
.nx-orbit-ring { position: absolute; top: 50%; left: 50%; border: 1px solid var(--border-subtle); border-radius: 50%; }
.nx-orbit-ring.r1 { width: 100%; height: 100%; margin: -50% 0 0 -50%; animation: nx-orbit-spin 46s linear infinite; }
.nx-orbit-ring.r2 { width: 70%; height: 70%; margin: -35% 0 0 -35%; animation: nx-orbit-spin-rev 32s linear infinite; border-style: dashed; }
.nx-orbit-core { position: absolute; top: 50%; left: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; background: var(--accent-soft); border: 1px solid rgba(59,130,246,0.35); box-shadow: var(--glow-accent, 0 0 32px rgba(59,130,246,0.35)); display: grid; place-items: center; }
.nx-orbit-node { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.nx-orbit-node.pulse { animation: nx-livedot-pulse 2.4s ease-in-out infinite; }
@keyframes nx-orbit-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes nx-orbit-spin-rev { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .nx-orbit-ring { animation: none !important; } .nx-orbit-node.pulse { animation: none !important; } }

.nx-principle-card { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.nx-principle-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,0.35)); }
.nx-principle-card:hover > div:first-child > div:first-child { background: var(--accent); border-color: var(--accent); }
.nx-principle-card:hover > div:first-child > div:first-child span { color: var(--text-on-accent, #0A0F1F); }

/* Homepage: general card lift-on-hover */
.nx-hover-lift { transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), border-color 0.25s ease, box-shadow 0.25s ease; }
.nx-hover-lift:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg, 0 16px 36px rgba(0,0,0,0.4)); }

/* Homepage: product cards */
.nx-product-icon { transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease; }
.nx-product-card:hover .nx-product-icon { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.nx-product-card:hover .nx-product-icon span { color: var(--text-on-accent, #0A0F1F); }
.nx-product-arrow { transition: transform 0.25s ease; }
.nx-product-card:hover .nx-product-arrow { transform: translateX(3px); }

/* Nav: "Get a demo" CTA, gentle arrow nudge to draw the eye */
@keyframes nx-cta-nudge { 0%, 80%, 100% { transform: translateX(0); } 90% { transform: translateX(3px); } }
.nx-cta-demo-arrow { display: inline-flex; animation: nx-cta-nudge 2.4s ease-in-out infinite; }
.nx-cta-demo:hover .nx-cta-demo-arrow { animation-play-state: paused; transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .nx-cta-demo-arrow { animation: none !important; } }

/* Homepage: one continuous backdrop (grid + wash + light streak) behind Hero
   through the Contact band, so sections read as one surface, not stacked panels. */
.nx-page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg-base);
}
.nx-page-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--grid-pattern);
  background-size: var(--grid-size);
  opacity: 0.4;
  mask-image: linear-gradient(180deg, #000, transparent 82%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 82%);
}
.nx-page-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--gradient-hero);
}
.nx-page-bg-streak-a {
  position: absolute; top: -10%; left: 58%; width: 46%; height: 90%;
  background: linear-gradient(200deg, rgba(59,130,246,0.12), transparent 55%);
  transform: rotate(-8deg); filter: blur(2px);
}
.nx-page-bg-streak-b {
  position: absolute; top: -4%; left: 68%; width: 2px; height: 70%;
  background: linear-gradient(180deg, transparent, rgba(110,168,255,0.28), transparent);
  transform: rotate(-14deg);
}

/* Homepage: interactive product showcase panel */
@keyframes nx-panel-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.nx-product-panel { animation: nx-panel-fade 0.35s ease; }
@media (prefers-reduced-motion: reduce) { .nx-product-panel { animation: none; } }

/* Company: operating principles grid */
.nx-principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.nx-principle-cell {
  position: relative;
  padding: 36px 32px;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: background 0.25s ease;
}
.nx-principle-cell:nth-child(3n) { border-right: none; }
.nx-principle-cell:nth-last-child(-n+3) { border-bottom: none; }
.nx-principle-cell:hover { background: var(--bg-inset); }
.nx-principle-ghost {
  position: absolute; top: 8px; right: 16px;
  font-family: var(--font-mono); font-weight: 700; font-size: 64px;
  color: var(--text-primary); opacity: 0.04; line-height: 1; pointer-events: none;
  transition: opacity 0.25s ease;
}
.nx-principle-cell:hover .nx-principle-ghost { opacity: 0.07; }
.nx-principle-icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid rgba(59,130,246,0.25);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.nx-principle-cell:hover .nx-principle-icon { background: var(--accent); border-color: var(--accent); }
.nx-principle-cell:hover .nx-principle-icon span { color: var(--text-on-accent, #0A0F1F); }
.nx-principle-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent);
  transition: width 0.3s ease;
}
.nx-principle-cell:hover .nx-principle-bar { width: 100%; }
@media (max-width: 860px) {
  .nx-principle-grid { grid-template-columns: repeat(2, 1fr); }
  .nx-principle-cell:nth-child(3n) { border-right: 1px solid var(--border-subtle); }
  .nx-principle-cell:nth-child(2n) { border-right: none; }
  .nx-principle-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--border-subtle); }
  .nx-principle-cell:nth-last-child(-n+2) { border-bottom: none; }
}

/* Nexulis custom palette override
 * Primary  Deep Navy     #0A192F
 * Secondary Charcoal     #111827
 * Accent   Electric Cyan #00D9FF
 * CTA      Neon Green    #00FF88
 * Text     Soft White    #E5E7EB
 */
:root,
[data-theme="dark"] {
  /* Surfaces — deep navy → charcoal stack */
  --bg-base: #0A192F;
  --bg-raised: #071022;
  --bg-card: #111827;
  --bg-inset: #0B1626;

  /* Text */
  --text-primary: #E5E7EB;
  --text-secondary: rgba(229, 231, 235, 0.72);
  --text-muted: rgba(229, 231, 235, 0.5);
  --text-on-accent: #0A192F;
  --ink-400: rgba(229, 231, 235, 0.55);
  --ink-750: #0E2440;

  /* Accent = deep, muted blue (toned down from electric cyan) */
  --accent: #3468C0;
  --accent-hover: #4A7CD1;
  --accent-press: #2A56A0;
  --accent-soft: rgba(52, 104, 192, 0.14);
  --text-accent: #6FA0E8;

  /* Borders */
  --border-subtle: rgba(229, 231, 235, 0.08);
  --border-default: rgba(229, 231, 235, 0.14);
  --border-strong: rgba(229, 231, 235, 0.22);

  /* Gradients & glows — muted, less neon */
  --gradient-accent: linear-gradient(135deg, #3468C0 0%, #2A56A0 100%);
  --gradient-hero: radial-gradient(900px 500px at 85% -10%, rgba(52, 104, 192, 0.14), transparent 60%),
                   radial-gradient(700px 420px at 10% 110%, rgba(239, 85, 44, 0.05), transparent 60%);
  --glow-accent: 0 0 0 1px rgba(52, 104, 192, 0.28), 0 8px 32px rgba(52, 104, 192, 0.2);
  --ring-accent: 0 0 0 3px rgba(52, 104, 192, 0.32);

  /* CTA = Orange (overrides primary button only) */
  --cta: #EF552C;
  --cta-hover: #F3703F;
  --cta-press: #D1441F;
  --cta-on: #0A192F;
}

/* Primary button = orange CTA with gradient sheen */
.nx-btn--primary {
  background: linear-gradient(135deg, #F3703F 0%, #EF552C 45%, #D1441F 100%) !important;
  border-color: rgba(239, 85, 44, 0.5) !important;
  color: #fff !important;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 10px 24px rgba(239, 85, 44, 0.3) !important;
  transition: transform var(--duration-fast, 0.15s) var(--ease-standard, ease), box-shadow var(--duration-fast, 0.15s) var(--ease-standard, ease), filter var(--duration-fast, 0.15s) var(--ease-standard, ease);
}
.nx-btn--primary:hover {
  background: linear-gradient(135deg, #F5824F 0%, #F3703F 45%, #E14E24 100%) !important;
  border-color: rgba(239, 85, 44, 0.7) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 4px 0 rgba(0,0,0,0.08), 0 14px 34px rgba(239, 85, 44, 0.4) !important;
  transform: translateY(-1.5px);
}
.nx-btn--primary:active {
  background: linear-gradient(135deg, #DB4A22 0%, #C33F1C 100%) !important;
  border-color: rgba(209, 68, 31, 0.7) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 4px 12px rgba(239, 85, 44, 0.28) !important;
  transform: translateY(0.5px);
}

/* Status info → use muted blue to harmonize */
:root, [data-theme="dark"] {
  --status-info: #3468C0;
}

/* Subtle vertical fade on the page background so it reads as depth, not flat black/navy (SQUDO AI page overrides this back to flat in its own <style>) */
html body { background: linear-gradient(180deg, var(--bg-base) 0%, #071022 55%, #05080f 100%) fixed; }
