/* ==========================================================================
   ConnectIQ Global — Design System
   Display: Space Grotesk · Mono/Label: IBM Plex Mono · Body: Inter
   ========================================================================== */

:root {
  /* Color tokens — ConnectIQ Global brand system
     60% Pearl White · 25% Emerald Green · 8% Dark Charcoal · 5% Golden Yellow · 2% Copper/Bronze */
  --emerald: #0E6B4E;        /* Primary — headers, key sections, buttons, nav */
  --emerald-deep: #0A5239;   /* hover / pressed states on emerald */
  --emerald-tint: #E8F3EE;   /* light emerald tint for alternating section backgrounds */
  --gold: #D9A62B;           /* Secondary — CTAs, highlights, numbers, icons (use sparingly) */
  --gold-deep: #B9891E;      /* hover state for gold elements */
  --pearl: #FAF8F4;          /* Supporting — main background */
  --paper: #FFFFFF;          /* card surfaces layered above pearl */
  --copper: #B8743A;         /* Accent — subtle borders, premium highlights only */
  --charcoal: #242621;       /* text, footer, secondary backgrounds */
  --charcoal-deep: #1A1B15;  /* footer-bottom / deepest contrast */
  --slate: #5B5D52;          /* secondary text on light backgrounds */
  --haze: #CFE0D5;           /* secondary text on emerald/charcoal backgrounds */
  --line: #E5E1D3;           /* hairline dividers on light backgrounds */
  --wire: #1F5A40;           /* hairline dividers on emerald/charcoal backgrounds */
  --wire-bright: #2E7A57;    /* brighter border / hover accent on dark backgrounds */
  --error: #B23B24;          /* functional alert state — distinct from brand gold */

  /* Legacy aliases (so component styles referencing the old names still resolve) */
  --ink: var(--emerald);
  --ink-deep: var(--charcoal);
  --mist: var(--emerald-tint);
  --signal: var(--gold);
  --signal-dim: var(--gold-deep);

  /* Type */
  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --max-w: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 14px;
  --radius-sm: 8px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--pearl);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--signal); }

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.06;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--slate);
  line-height: 1.6;
  max-width: 42em;
}
.on-dark .lede, .lede.on-dark { color: var(--haze); }
p.body-text { color: var(--slate); line-height: 1.65; }
.on-dark p.body-text { color: var(--haze); }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--slate);
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
section { position: relative; }
.section-pad { padding-block: clamp(4rem, 8vw, 7rem); }
.on-dark { background: var(--ink); color: var(--paper); }
.on-mist { background: var(--mist); }
.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}
.on-dark .divider { background: var(--wire); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--signal);
  color: #fff;
}
.btn-primary:hover { background: var(--signal-dim); }
.btn-ghost-dark {
  border-color: var(--wire-bright);
  color: var(--paper);
  background: transparent;
}
.btn-ghost-dark:hover { border-color: var(--signal); }
.btn-ghost-light {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-ghost-light:hover { border-color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 107, 78, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--wire);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 0.65em;
}
.nav-logo .dot { color: var(--signal); }
.logo-mark {
  height: 32px;
  width: auto;
  display: block;
}
.logo-chip {
  background: var(--pearl);
  border-radius: 8px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--haze);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--paper); }
.nav-cta { display: flex; align-items: center; gap: 1.5rem; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--paper);
  padding: 0.4em;
}
.nav-toggle svg { width: 24px; height: 24px; }

.nav-cta .btn span.short { display: none; }
.nav-links.is-open {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  height: calc(100vh - 72px);
  background: var(--ink);
  padding: 2rem var(--gutter);
  gap: 1.75rem;
  z-index: 9999;
  isolation: isolate;
}
.nav-links.is-open a { font-size: 1rem; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-cta .btn span.long { display: none; }
  .nav-cta .btn span.short { display: inline; }
}

@media (max-width: 480px) {
  .nav-logo { font-size: 0.92rem; gap: 0.5em; }
  .logo-mark { height: 26px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--haze);
  padding-block: 3.5rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--wire);
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--haze);
  margin-bottom: 1rem;
}
.footer-grid a, .footer-grid li { font-size: 0.92rem; color: var(--haze); margin-bottom: 0.6rem; display: block; }
.footer-grid a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--wire-bright);
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Utility ---------- */
.center { text-align: center; margin-left: auto; margin-right: auto; }
.stack-gap-sm > * + * { margin-top: 0.75rem; }
.stack-gap-md > * + * { margin-top: 1.5rem; }
.stack-gap-lg > * + * { margin-top: 2.5rem; }
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
