/* ===================================================================
   Dual A Solutions — shared chrome (nav, card-nav, aurora, footer)
   Pages include: tokens, base type, navbar, menu button, card-nav
   overlay, aurora bg mount, footer. Page-specific CSS is inline.
   =================================================================== */

:root {
  /* Backgrounds */
  --bg-base: #08090A;
  --bg-raised: #0E0D12;
  --bg-overlay: #14121B;
  /* Borders (hairline shadow pattern, not css border) */
  --b-subtle: rgba(255,255,255,0.05);
  --b-default: rgba(255,255,255,0.08);
  --b-accent: rgba(138,92,246,0.22);
  /* Purple — atmospheric */
  --purple: #8A5CF6;
  --purple-mid: #6D3FD1;
  --purple-dark: #1A1128;
  --purple-glow: rgba(138,92,246,0.08);
  --purple-dim: rgba(138,92,246,0.12);
  --purple-rgb: 138,92,246;
  /* Gold — interactive */
  --gold: #D2AB55;
  --gold-bright: #E8C868;
  --gold-dim: rgba(210,171,85,0.10);
  --gold-glow: rgba(210,171,85,0.05);
  --gold-rgb: 210,171,85;
  /* Text */
  --t1: #F0F1F3;
  --t2: #9BA1AE;
  --t3: #5C6370;
  /* Status */
  --positive: #34D399;
  --negative: #EF4444;
  /* n8n */
  --n8n: #EA4B71;
  --n8n-glow: rgba(234,75,113,0.10);
  /* Fonts */
  --f-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-body: 'DM Sans', system-ui, sans-serif;
  --f-acc: 'Instrument Serif', 'Times New Roman', serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
::selection { background: var(--gold); color: #000; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--purple-mid), var(--gold)); border-radius: 5px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); box-shadow: 0 0 8px rgba(var(--gold-rgb),0.4); }

body {
  font-family: var(--f-body);
  background: var(--bg-base);
  color: var(--t1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
.acc { font-family: var(--f-acc); font-style: italic; font-weight: 400; letter-spacing: -0.015em; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
}

/* =================== BACKGROUND LAYERS =================== */
#starscape {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.55;
}
.bg-atmos {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 18% 12%, var(--purple-glow) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 88% 85%, var(--gold-glow) 0%, transparent 60%);
}

/* Aurora mount — extends 100vw regardless of parent max-width so the
   animated background bleeds edge-to-edge on wide viewports. */
.aurora-mount {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none; overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  opacity: 0.55;
}
.aurora-mount canvas { display: block; width: 100% !important; height: 100% !important; }

/* =================== SCROLL PROGRESS =================== */
#scrollProgress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--purple) 0%, var(--gold) 100%);
  box-shadow: 0 0 8px rgba(var(--gold-rgb),0.45);
  z-index: 10000;
  transition: width 0.08s linear;
}

/* =================== NAVBAR (identical to landing) =================== */
#navbar {
  position: fixed; top: 18px; left: 0; right: 0;
  z-index: 1000;
  transition: top 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  transition: max-width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
#navbar.scrolled .nav-inner,
#navbar.always-pill .nav-inner {
  max-width: 820px;
  padding: 10px 22px;
  background: rgba(14,13,18,0.72);
  border-radius: 100px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 0 0 1px var(--b-default), 0 12px 32px rgba(0,0,0,0.35);
}
.nav-logo { display: flex; align-items: center; gap: 0.65rem; }
.nav-logo img { width: 26px; height: 26px; }
.nav-logo .wordmark {
  font-family: var(--f-head); font-weight: 700; font-size: 15px;
  letter-spacing: -0.015em; color: var(--t1);
}
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a {
  font-family: var(--f-body); font-size: 14px; font-weight: 500;
  color: var(--t2);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--t1); }
.nav-cta {
  padding: 9px 18px;
  background: var(--gold);
  color: #121014 !important;
  border-radius: 100px;
  font-weight: 600 !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 6px 18px rgba(var(--gold-rgb),0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
.nav-cta:hover { background: var(--gold-bright); transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 10px 28px rgba(var(--gold-rgb),0.35); color: #121014 !important; }

/* Menu button (new) — hamburger icon that sits between the links and the CTA */
.menu-btn {
  position: relative;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none; cursor: pointer;
  border-radius: 100px;
  transition: background 0.22s ease, box-shadow 0.22s ease;
  box-shadow: inset 0 0 0 1px var(--b-default);
}
.menu-btn:hover { background: rgba(var(--purple-rgb), 0.08); box-shadow: inset 0 0 0 1px var(--b-accent); }
.menu-btn:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.menu-btn .menu-lines {
  display: flex; flex-direction: column; gap: 5px;
  width: 18px;
}
.menu-btn .menu-line {
  width: 18px; height: 1.5px;
  background: var(--t1);
  border-radius: 2px;
  transform-origin: 50% 50%;
  transition: transform 0.28s cubic-bezier(0.6, 0, 0.3, 1), opacity 0.2s ease, width 0.28s ease;
}
.menu-btn .menu-line:nth-child(2) { width: 12px; align-self: flex-end; }
.menu-btn.open .menu-line:nth-child(1) { transform: translateY(3.25px) rotate(45deg); width: 18px; }
.menu-btn.open .menu-line:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); width: 18px; }

/* =================== CARD NAV OVERLAY =================== */
.card-nav-overlay {
  position: fixed; inset: 0; z-index: 999;
  pointer-events: none;
  opacity: 0;
  background: rgba(8,9,10,0.55);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-nav-overlay.open { opacity: 1; pointer-events: auto; }

.card-nav-panel {
  position: fixed;
  top: 88px; left: 50%;
  transform: translate(-50%, -20px) scale(0.985);
  width: min(1060px, calc(100vw - 40px));
  z-index: 1001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.44s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-nav-panel.open {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.card-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  background: rgba(14,13,18,0.82);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-radius: 22px;
  padding: 14px;
  box-shadow:
    0 0 0 1px var(--b-default),
    0 32px 80px rgba(0,0,0,0.55),
    0 0 0 1px rgba(var(--purple-rgb),0.04);
}
.nav-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 28px 26px 24px;
  min-height: 260px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(138,92,246,0.08) 0%, rgba(14,13,18,0.6) 80%);
  box-shadow: inset 0 0 0 1px var(--b-subtle);
  overflow: hidden;
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s ease, background 0.3s ease;
}
.card-nav-panel.open .nav-card { opacity: 1; transform: translateY(0); }
.card-nav-panel.open .nav-card:nth-child(2) { transition-delay: 0.06s; }
.card-nav-panel.open .nav-card:nth-child(3) { transition-delay: 0.12s; }
.nav-card:hover {
  background: linear-gradient(165deg, rgba(138,92,246,0.12) 0%, rgba(14,13,18,0.6) 80%);
  box-shadow: inset 0 0 0 1px var(--b-accent);
}
.nav-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(var(--gold-rgb),0.10) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.32s ease;
  pointer-events: none;
}
.nav-card:hover::after { opacity: 1; }
.nc-eyebrow {
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 14px;
}
.nc-label {
  font-family: var(--f-head); font-weight: 700;
  font-size: 1.55rem; letter-spacing: -0.028em; line-height: 1.05;
  color: var(--t1);
  margin-bottom: 22px;
}
.nc-label .acc { color: var(--gold); font-size: 1.08em; }
.nc-links { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.nc-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-body); font-size: 15px; font-weight: 500;
  color: var(--t2);
  padding: 8px 0;
  border-top: 1px solid var(--b-subtle);
  transition: color 0.22s ease, padding-left 0.22s ease;
}
.nc-link:first-child { border-top: 0; }
.nc-link svg { width: 14px; height: 14px; color: var(--gold); transition: transform 0.28s ease; }
.nc-link:hover { color: var(--t1); padding-left: 3px; }
.nc-link:hover svg { transform: translate(2px, -2px); }

/* Small footer strip inside the panel */
.card-nav-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px 4px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--t3);
}
.card-nav-foot .cnf-right { display: flex; gap: 18px; }
.card-nav-foot a { transition: color 0.22s ease; }
.card-nav-foot a:hover { color: var(--gold); }

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--f-body); font-weight: 600; font-size: 14px;
  padding: 13px 24px;
  border-radius: 100px;
  cursor: pointer; border: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}
.btn-primary {
  background: var(--gold); color: #121014;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 10px 28px rgba(var(--gold-rgb),0.24);
}
.btn-primary:hover { background: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 14px 38px rgba(var(--gold-rgb),0.40); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.btn-primary svg { width: 14px; height: 14px; transition: transform 0.22s ease; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-secondary {
  background: transparent; color: var(--t1);
  box-shadow: inset 0 0 0 1px var(--b-default);
}
.btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--b-accent); background: rgba(var(--purple-rgb),0.04); transform: translateY(-1px); }
.btn-secondary:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }

/* =================== PAGE HERO (shared shell) =================== */
.page-hero {
  position: relative; z-index: 2;
  padding: 180px 40px 110px;
  max-width: 1440px; margin: 0 auto;
  overflow: visible;
}
.page-hero-inner {
  position: relative; z-index: 3;
  max-width: 1100px;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 0.98;
  margin-bottom: 1.5rem;
}
.page-hero h1 .acc { color: var(--gold); font-size: 1.08em; }
.page-hero .lede {
  font-size: 1.125rem; line-height: 1.65; color: var(--t2);
  max-width: 640px; font-weight: 400;
}
.page-hero .lede strong { color: var(--t1); font-weight: 600; }
.page-hero .eyebrow-row { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.75rem; }
.page-hero .eyebrow-row .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(var(--gold-rgb),0.16);
  animation: pulseDot 2.4s cubic-bezier(0.4,0,0.6,1) infinite;
}
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 4px rgba(var(--gold-rgb),0.16); } 50% { box-shadow: 0 0 0 8px rgba(var(--gold-rgb),0.04); } }

/* =================== SECTION HEADER (shared) =================== */
.section {
  position: relative; z-index: 2;
  padding: 90px 40px;
  max-width: 1440px; margin: 0 auto;
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr);
  gap: 3rem; margin-bottom: 3.5rem; align-items: flex-end;
}
.section-head .eyebrow { align-self: flex-start; padding-top: 6px; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.04;
}
.section-head h2 .acc { color: var(--gold); font-size: 1.08em; }
.section-head p {
  grid-column: 2; margin-top: 1.25rem;
  color: var(--t2); font-size: 1.02rem; max-width: 580px; line-height: 1.65;
}

/* =================== FOOTER =================== */
footer {
  position: relative; z-index: 2;
  background: var(--bg-base);
  padding: 80px 40px 38px;
  box-shadow: inset 0 1px 0 var(--b-subtle);
}
.footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 50px;
}
.footer-brand .nav-logo { margin-bottom: 18px; }
.footer-brand p {
  color: var(--t2); font-size: 0.95rem; max-width: 320px; line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--f-mono); font-size: 11px; font-weight: 700;
  color: var(--t3); text-transform: uppercase; letter-spacing: 0.18em;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  color: var(--t2); font-size: 14px;
  transition: color 0.22s ease;
}
.footer-col a:hover { color: var(--t1); }
.footer-bottom {
  max-width: 1440px; margin: 0 auto;
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 10px;
  color: var(--t3); letter-spacing: 0.16em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 var(--b-subtle);
}
.footer-bottom .fb-meta { display: flex; gap: 20px; }

/* =================== RESPONSIVE =================== */
@media (max-width: 991px) {
  #navbar { top: 12px; }
  .nav-inner { padding: 10px 18px; }
  #navbar.scrolled .nav-inner, #navbar.always-pill .nav-inner { max-width: 94%; }
  .nav-links { gap: 1.1rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .card-nav-panel { top: 76px; }
  .card-nav-grid { grid-template-columns: 1fr; gap: 10px; padding: 10px; }
  .nav-card { min-height: 180px; padding: 22px 22px 20px; }
}
@media (max-width: 767px) {
  .page-hero { padding: 140px 20px 80px; }
  .section { padding: 70px 20px; }
  footer { padding: 70px 20px 30px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .nav-cta { display: none; }
}
@media (max-width: 479px) {
  .menu-btn { width: 34px; height: 34px; }
}

/* =================== CARD GRID (reusable for pages) =================== */
.stack { display: grid; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 991px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.card {
  position: relative;
  background: var(--bg-raised);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 0 0 1px var(--b-subtle);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--b-accent), 0 24px 48px rgba(0,0,0,0.35); }
.card h3 {
  font-family: var(--f-head); font-weight: 700; font-size: 1.3rem;
  letter-spacing: -0.025em; line-height: 1.2;
  margin-bottom: 10px; color: var(--t1);
}
.card h3 .acc { color: var(--gold); font-size: 1.06em; }
.card p { color: var(--t2); font-size: 0.96rem; line-height: 1.65; }
.card .card-num {
  font-family: var(--f-mono); font-size: 10px;
  color: var(--t3); letter-spacing: 0.22em;
  margin-bottom: 18px;
}
.card .card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(var(--purple-rgb), 0.08);
  box-shadow: inset 0 0 0 1px var(--b-subtle);
  color: var(--gold);
  margin-bottom: 18px;
}
.card .card-icon svg { width: 18px; height: 18px; }
