/* global.css — InvoicePath shared design system.
   Adapted from the Panoptic parent site (visual-asset-builder) so InvoicePath
   reads as a member of the same brand family: Geist type, off-white canvas,
   deep-navy dark sections, mono eyebrows, aurora-outline CTA, dark CTA band
   and the full site footer.

   Loaded by every page (with page.css). Header + footer markup is injected
   client-side by scripts/chrome.js into the data-include placeholders. */

/* =====================================================================
   Design tokens
   ===================================================================== */
:root {
  --canvas:           #fafaf8;
  --canvas-soft:      #f6f6f4;
  --canvas-cool:      #f4f6fa;

  --terminal:         #0c0c29;       /* ink / body text */
  --terminal-light:   #181834;
  --terminal-deep:    #060b1f;       /* navbar / footer anchor navy */

  --surface-dark:      #0f1d40;      /* dark hero / dark sections */
  --surface-dark-soft: #121a3a;      /* CTA card, banded surfaces */

  --brand-dark-blue:  #0143fe;
  --brand-blue:       #0079ca;
  --brand-purple:     #bc4bff;
  --brand-pink:       #da4bfe;
  --brand-violet:     #715cff;
  --brand-coral:      #ff8c6c;
  --brand-green:      #4bd783;
  --accent-blue:      #5fc3eb;       /* eyebrow / heading accent on dark */

  --ink-soft:         #5e6890;       /* muted ink on light */
  --ink-on-dark:      #e3ecf7;       /* primary ink on dark */
  --ink-on-dark-soft: #8b95b8;       /* muted ink on dark */
  --rule-light:       rgba(12, 12, 41, 0.10);
  --rule-dark:        rgba(255, 255, 255, 0.08);

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", "PT Mono", "Roboto Mono", "JetBrains Mono", monospace;

  --radius-lg: 0.5rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-3xl: 1.5rem;
  --container-9xl: 90rem;

  --nav-h: clamp(4.5rem, 5vw, 6rem);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: var(--nav-h); scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--terminal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h1 { letter-spacing: -0.04em; }
p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 1.25rem; border-radius: var(--radius-lg);
  font-size: 0.875rem; font-weight: 500; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: opacity 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
  border: 1px solid transparent; font-family: inherit;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terminal); color: #fff; border-color: var(--terminal); }
.btn-primary-inverse { background: #fff; color: var(--terminal); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--terminal); border-color: rgba(12,12,41,0.12); }
.btn-ghost-inverse { background: transparent; color: #fff; border-color: rgba(255,255,255,0.30); }
.btn-ghost-inverse:hover { border-color: rgba(255,255,255,0.6); opacity: 1; }
.btn-light { background: #fff; color: var(--terminal); border-color: #fff; }
.btn-purple { background: var(--brand-purple); color: #fff; border-color: var(--brand-purple); }
.btn-purple:hover { opacity: 0.9; }

/* Aurora outline — rotating conic ring, the signature CTA treatment. */
@property --aurora-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.btn-aurora {
  position: relative; color: #f1ecff; border-color: rgba(140,100,255,0.55);
  background: rgba(140,100,255,0.06); isolation: isolate; padding: 1rem 1.5rem; font-size: 0.9375rem;
}
.btn-aurora:hover { border-color: rgba(140,100,255,0.85); background: rgba(140,100,255,0.10); opacity: 1; }
.btn-aurora::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--aurora-angle),
    rgba(218,75,254,0.95) 0deg, rgba(113,92,255,0.95) 90deg, rgba(1,67,254,0.95) 180deg,
    rgba(0,121,202,0.95) 270deg, rgba(218,75,254,0.95) 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: aurora-rotate 6s linear infinite; pointer-events: none;
}
@keyframes aurora-rotate { to { --aurora-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .btn-aurora::before { animation: none; } html { scroll-behavior: auto; } }

/* =====================================================================
   Site header (sticky dark navbar)
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: var(--terminal-deep); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08); isolation: isolate;
}
.site-header-inner {
  width: 100%; max-width: var(--container-9xl); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
@media (min-width: 1024px) { .site-header-inner { padding: 0 3rem; } }
@media (min-width: 1280px) { .site-header-inner { padding: 0 5rem; } }

.site-logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  height: clamp(40px, 3vw, 52px); flex: 0 0 auto; transition: opacity 150ms ease;
}
.site-logo:hover { opacity: 0.85; }
.site-logo .logo-mark { height: 60%; width: auto; flex: 0 0 auto; }
.site-logo .logo-word {
  font-size: clamp(1.15rem, 1.5vw, 1.35rem); font-weight: 600;
  letter-spacing: -0.03em; color: #fff;
}
.site-logo .logo-word b { font-weight: 600; color: var(--accent-blue); }

.site-nav { display: none; align-items: center; gap: 2rem; font-size: 0.875rem; color: rgba(255,255,255,0.7); }
@media (min-width: 900px) { .site-nav { display: flex; } }
.site-nav a { color: rgba(255,255,255,0.7); transition: color 150ms ease, opacity 150ms ease; }
.site-nav a:hover { color: #fff; opacity: 1; }
.site-nav a.current, .nav-dropdown-toggle.current { color: #fff; }

/* CSS-only nav dropdown */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 0.3rem; color: rgba(255,255,255,0.7); transition: color 150ms ease; }
.nav-dropdown-toggle:hover { color: #fff; }
.nav-chevron { transition: transform 200ms ease; opacity: 0.7; }
.nav-dropdown:hover .nav-chevron, .nav-dropdown:focus-within .nav-chevron { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, 6px);
  min-width: 240px; display: flex; flex-direction: column; padding: 0.5rem;
  background: #0d1531; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.7);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms; z-index: 60;
}
.nav-dropdown-menu::before { content: ""; position: absolute; bottom: 100%; left: 0; right: 0; height: 12px; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 10px);
}
.nav-dropdown-menu a {
  display: block; padding: 0.55rem 0.75rem; border-radius: 8px; font-size: 0.875rem;
  color: rgba(255,255,255,0.72); white-space: nowrap; transition: background 140ms ease, color 140ms ease;
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.07); color: #fff; opacity: 1; }

.site-header .header-cta { flex: 0 0 auto; }
@media (max-width: 560px) { .site-header .header-cta { display: none; } }

/* Mobile menu */
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.18); border-radius: 10px; background: transparent; color: #fff; cursor: pointer; }
@media (min-width: 900px) { .nav-toggle { display: none; } }
.nav-mobile {
  position: absolute; top: var(--nav-h); left: 0; right: 0; background: #0d1531;
  border-bottom: 1px solid rgba(255,255,255,0.1); padding: 1rem 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.25rem; box-shadow: 0 24px 40px -20px rgba(0,0,0,0.7);
}
.nav-mobile a { color: rgba(255,255,255,0.82); font-size: 1rem; padding: 0.7rem 0.25rem; }
.nav-mobile a:hover { color: #fff; }
@media (min-width: 900px) { .nav-mobile { display: none !important; } }

/* =====================================================================
   Closing CTA band — shared site-wide
   ===================================================================== */
.cta-band { background: var(--canvas); padding: clamp(40px, 6vh, 80px) clamp(24px, 5vw, 80px) clamp(64px, 10vh, 120px); }
.cta-card {
  max-width: var(--container-9xl); margin: 0 auto; background: var(--surface-dark-soft); color: #fff;
  border-radius: clamp(20px, 2.5vw, 32px); padding: clamp(64px, 11vh, 130px) clamp(32px, 6vw, 96px);
  text-align: center; position: relative; overflow: hidden; isolation: isolate;
}
.cta-card-mesh { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0.4; }
.cta-card h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.05; letter-spacing: -0.02em; color: #fff; max-width: 18ch; margin: 0 auto; }
.cta-card-desc { margin: clamp(16px, 2.4vh, 24px) auto 0; max-width: 40rem; color: rgba(255,255,255,0.7); font-size: clamp(15px, 1.3vw, 17px); line-height: 1.55; }
.cta-card-buttons { margin-top: clamp(28px, 3.6vh, 40px); display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

/* =====================================================================
   Site footer (full)
   ===================================================================== */
.site-footer {
  background: var(--terminal-deep); color: rgba(255,255,255,0.7);
  padding: clamp(48px, 6vh, 80px) clamp(24px, 5vw, 80px) 0;
}
.footer-inner { max-width: var(--container-9xl); margin: 0 auto; }

.footer-newsletter {
  display: grid; grid-template-columns: 1fr; gap: clamp(24px, 3vh, 36px);
  padding-bottom: clamp(40px, 6vh, 64px); border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (min-width: 768px) { .footer-newsletter { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); align-items: end; column-gap: clamp(32px,5vw,80px); } }
.footer-newsletter-text h3 { font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -0.02em; color: #fff; }
.footer-newsletter-text p { margin-top: 12px; color: rgba(255,255,255,0.6); font-size: clamp(14px,1.3vw,16px); line-height: 1.5; max-width: 36rem; }
.footer-newsletter-form { display: flex; gap: 8px; max-width: 480px; width: 100%; }
.footer-newsletter-input {
  flex: 1; min-width: 0; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-lg); color: #fff; font: inherit; font-size: 0.875rem; padding: 0.875rem 1rem;
  outline: none; transition: border-color 150ms ease, background 150ms ease;
}
.footer-newsletter-input:focus { border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.07); }
.footer-newsletter-input::placeholder { color: rgba(255,255,255,0.35); }
.footer-newsletter-status { margin-top: 10px; font-size: 0.8125rem; color: var(--accent-blue); }

.footer-columns {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(28px,3vw,40px);
  padding: clamp(40px,6vh,64px) 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (min-width: 768px) { .footer-columns { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.4); font-weight: 500; margin: 0 0 clamp(14px,2vh,20px); }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 15px; color: rgba(255,255,255,0.78); transition: color 150ms ease; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(20px,3vh,28px) 0 clamp(28px,4vh,40px);
  font-size: 13px; color: rgba(255,255,255,0.45);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal a { color: rgba(255,255,255,0.55); transition: color 150ms ease; }
.footer-legal a:hover { color: #fff; }
