/* ==========================================================================
   ScalePoint Solutions - shared design tokens, fonts, and base components
   Shared across index.html, privacy.html, terms.html and 404.html so the
   four pages stay visually identical without duplicating the same rules.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/bricolage-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/publicsans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/publicsans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/publicsans-600.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/publicsans-700.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/publicsans-800.woff2") format("woff2");
}

/*
  Token system. Two zones: a light paper zone (header, hero, services,
  industries) and a deep navy zone (process through footer) - one
  deliberate transition down the page, not random alternation. Emerald
  is the single accent, used identically in both zones. Shape lock:
  cards/panels 14px, buttons/controls 10px, small tags 8px. Do not
  introduce a second hue or a different radius scale.
*/
:root {
  --paper: #f7f8fa;
  --paper-raised: #ffffff;
  --paper-sunken: #eef0f3;
  --ink: #161c28;
  --muted: #4b5566;
  --faint: #6b7385;
  --line: rgba(22, 28, 40, .12);
  --line-strong: rgba(22, 28, 40, .22);

  --navy-950: #0a0f1a;
  --navy-900: #0e1526;
  --navy-800: #141d33;
  --navy-700: #1c2942;
  --on-navy: #eef1f6;
  --on-navy-muted: #9aa6bb;
  --line-navy: rgba(238, 241, 246, .14);
  --line-navy-strong: rgba(238, 241, 246, .26);

  --accent: #127a55;
  --accent-deep: #0c6345;
  --accent-bright: #3ecf94;
  --accent-soft: rgba(18, 122, 85, .1);
  --accent-border: rgba(18, 122, 85, .35);
  --accent-soft-dark: rgba(62, 207, 148, .14);
  --accent-border-dark: rgba(62, 207, 148, .38);
  --on-accent: #ffffff;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;

  --font-display: "Bricolage Grotesque", "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1180px;
  --shadow-md: 0 24px 48px -26px rgba(10, 15, 26, .3);
  --shadow-sm: 0 12px 26px -16px rgba(10, 15, 26, .22);
  --shadow-navy: 0 32px 64px -28px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img, svg { max-width: 100%; }

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  border: 0;
  border-radius: var(--radius-md);
  padding: 14px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 700;
  font-size: .96rem;
  white-space: nowrap;
  transition: transform .18s cubic-bezier(.16, 1, .3, 1),
              box-shadow .18s cubic-bezier(.16, 1, .3, 1),
              border-color .18s ease, background-color .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn .icon { width: .95em; height: .95em; transition: transform .18s cubic-bezier(.16, 1, .3, 1); }

.btn-primary {
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset;
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-primary:hover .icon { transform: translateX(3px); }
.btn-primary:active { transform: translateY(1px) scale(.98); box-shadow: none; }

.btn-secondary {
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  background: var(--paper-raised);
}
.btn-secondary:hover { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent-deep); transform: translateY(-2px); }

.zone-navy .btn-secondary,
.contact-copy .btn-secondary {
  color: var(--on-navy);
  border-color: var(--line-navy-strong);
  background: transparent;
}
.zone-navy .btn-secondary:hover,
.contact-copy .btn-secondary:hover {
  border-color: var(--accent-border-dark);
  background: var(--accent-soft-dark);
  color: var(--accent-bright);
}

.btn-small { padding: 11px 18px; font-size: .88rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Shared header ---------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 250, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 1rem;
  color: var(--ink);
  font-family: var(--font-display);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--navy-950);
  color: var(--accent-bright);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
}
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right .2s cubic-bezier(.16, 1, .3, 1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle .icon { width: 20px; height: 20px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding: 10px 0 18px;
}
.mobile-nav a {
  padding: 13px 4px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: 14px; align-self: flex-start; color: var(--on-accent); }

.mobile-nav.is-open { display: flex; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Shared footer ---------- */
footer {
  background: var(--navy-950);
  border-top: 1px solid var(--line-navy);
  padding: 30px 0 44px;
  color: var(--on-navy-muted);
  font-size: .88rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
}
.footer-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-links a { color: var(--on-navy-muted); font-weight: 600; }
.footer-links a:hover { color: var(--accent-bright); }
.footer-dot { opacity: .5; }

/* ---------- Reveal-on-scroll (IntersectionObserver driven, see index.html) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}
