/* ============================================================
   FUSIONTECHMARK — DESIGN SYSTEM v2.1 (Theme-Enabled)
   Palette: Deep Black / Warm Light · White / Slate · Orange #FF6A00
   Typography: Inter + JetBrains Mono

   base.css — design tokens, reset, base typography, utility classes.
   Linked FIRST in every <head>; styles.css follows for components.
   ============================================================ */

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

:root {
  /* Surface scale — subtle variation creates visual rhythm */
  --bg-hero:    #050506;
  --bg-why:     #000000;
  --bg-work:    #0a0a0c;
  --bg-services:#080809;
  --bg-process: #0b0b0d;
  --bg-quality: #0f0f11;
  --bg-diff:    #080809;
  --bg-metrics: #0c0c0e;
  --bg-testi:   #0a0a0c;
  --bg-cta:     #0d0d0f;

  /* Core palette */
  --white:       #FFFFFF;
  --black:       #080809;
  --dark-1:      #0E0E11;
  --dark-2:      #141418;
  --dark-3:      #1D1D24;
  --dark-4:      #262630;
  --muted:       rgba(255,255,255,0.52);
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.13);

  /* Orange Accent — FTM Signal Orange (#FF6A00) */
  --orange:      #FF6A00;
  --orange-h:    #FF7D1F;
  --orange-d:    #E05800;
  --orange-bg:   rgba(255, 106, 0, 0.08);
  --orange-glow: rgba(255, 106, 0, 0.13);

  /* Explicit Token Aliases */
  --ftm-orange:       var(--orange);
  --ftm-orange-hover: var(--orange-h);
  --ftm-orange-muted: var(--orange-bg);
  --ftm-orange-glow:  var(--orange-glow);

  --font:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  --container: 1240px;
  --gutter:    clamp(20px, 4vw, 48px);
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);

  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-card:  0 1px 2px rgba(0,0,0,0.3), 0 6px 18px rgba(0,0,0,0.18);
  --shadow-float: 0 12px 34px rgba(0,0,0,0.42);

  --nav-bg: rgba(10, 10, 13, 0.92);
  --nav-scrolled: rgba(8, 8, 10, 0.97);

  /* Semantic surface/text aliases used across internal pages */
  --color-surface-card:   var(--dark-2);
  --color-border:         var(--line);
  --color-text-secondary: rgba(255, 255, 255, 0.72);
  --color-text-muted:     var(--muted);

  /* Sendgrove-grade Surface & Depth Tokens */
  --surface-ground:       #060608;
  --surface-panel:        #0c0c10;
  --surface-card:         #121217;
  --surface-float:        #181820;
  --border-subtle:        rgba(255, 255, 255, 0.07);
  --border-card:          rgba(255, 255, 255, 0.12);
  --border-glow:          rgba(255, 106, 0, 0.35);
  --glow-orange:          0 0 36px -10px rgba(255, 106, 0, 0.18);
  --glow-ambient:         0 20px 48px -12px rgba(0, 0, 0, 0.75);
}

/* ============================================================
   LIGHT THEME EXTENSION
   ============================================================ */
html[data-theme="light"] {
  --bg-hero:    #f8f9fa;
  --bg-why:     #ffffff;
  --bg-work:    #f1f3f5;
  --bg-services:#ffffff;
  --bg-process: #f8f9fa;
  --bg-quality: #ffffff;
  --bg-diff:    #f1f3f5;
  --bg-metrics: #ffffff;
  --bg-testi:   #f8f9fa;
  --bg-cta:     #f1f3f5;

  --white:       #0f172a;
  --black:       #f8f9fa;
  --dark-1:      #ffffff;
  --dark-2:      #ffffff;
  --dark-3:      #f1f3f5;
  --dark-4:      #e2e8f0;
  --muted:       #64748b;
  --line:        rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.16);

  --orange:      #E65A00;
  --orange-h:    #D14D00;
  --orange-d:    #B83E00;
  --orange-bg:   rgba(230, 90, 0, 0.08);
  --orange-glow: rgba(230, 90, 0, 0.10);

  --shadow-card:  0 1px 3px rgba(15,23,42,0.04), 0 6px 16px rgba(15,23,42,0.05);
  --shadow-float: 0 12px 30px rgba(15,23,42,0.10);

  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-scrolled: rgba(255, 255, 255, 0.98);

  /* Semantic aliases (light) — surface/border/muted inherit theme tokens above */
  --color-surface-card:   var(--dark-1);
  --color-text-secondary: #475569;

  /* Sendgrove-grade Surface & Depth Tokens (Light) */
  --surface-ground:       #f8f9fa;
  --surface-panel:        #ffffff;
  --surface-card:         #ffffff;
  --surface-float:        #f1f3f5;
  --border-subtle:        rgba(15, 23, 42, 0.07);
  --border-card:          rgba(15, 23, 42, 0.12);
  --border-glow:          rgba(230, 90, 0, 0.35);
  --glow-orange:          0 0 36px -10px rgba(230, 90, 0, 0.12);
  --glow-ambient:         0 16px 36px -10px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .nav-mark,
html[data-theme="light"] .nav-brand-logo,
html[data-theme="light"] .footer-brand-logo {
  filter: brightness(0);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; color: var(--white); }
button { font-family: var(--font); }

/* Skip Link */
.skip-link {
  position: absolute; left: -9999px; top: 0; padding: 12px 20px;
  background: var(--orange); color: #fff; font-size: 13px; font-weight: 700; z-index: 9999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Cursor Glow */
.cursor-glow {
  position: fixed; width: 400px; height: 400px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(255,85,0,0.05) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: left 0.12s ease, top 0.12s ease;
}

/* Section Container */
.section {
  position: relative;
  padding: clamp(64px, 9vw, 128px) 0;
}
.inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}
.inner--reading { max-width: 820px; margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

.section-head { margin-bottom: clamp(40px, 5.5vw, 72px); }
.label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; color: var(--orange);
  text-transform: uppercase; margin-bottom: 14px;
}
.label::before {
  content: '';
  display: inline-block; width: 14px; height: 1.5px;
  background: var(--orange); border-radius: 2px; flex-shrink: 0;
}

/* Symmetric Eyebrow Dashes for Centered Sections */
.text-center .label,
.section-head.text-center .label {
  justify-content: center;
}
.text-center .label::after,
.section-head.text-center .label::after {
  content: '';
  display: inline-block; width: 14px; height: 1.5px;
  background: var(--orange); border-radius: 2px; flex-shrink: 0;
}

.section-title {
  font-size: clamp(30px, 4.2vw, 54px);
  color: var(--white); max-width: 22ch;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.section-sub {
  font-size: clamp(15px, 1.35vw, 17.5px);
  color: var(--muted);
  margin-top: 16px; max-width: 54ch; line-height: 1.7;
}

/* Ensure Centered Headings are Mathematically Centered */
.text-center .section-title,
.section-head.text-center .section-title,
.text-center .section-sub,
.section-head.text-center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* ── BUTTONS ── */
.btn-orange {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--r-pill);
  background: var(--orange); color: #ffffff !important;
  font-size: 14.5px; font-weight: 700;
  transition: background 0.25s, transform 0.2s var(--ease), box-shadow 0.25s;
  box-shadow: 0 4px 14px rgba(255,85,0,0.14);
  cursor: pointer; border: none; white-space: nowrap;
}
.btn-orange:hover {
  background: var(--orange-h); transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,85,0,0.22);
}
.btn-orange:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.btn-sm { padding: 9px 18px; font-size: 13px; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--r-pill);
  background: var(--dark-1);
  border: 1px solid var(--line-strong);
  color: var(--white); font-size: 14.5px; font-weight: 600;
  transition: border-color 0.25s, background 0.25s, transform 0.2s var(--ease);
  cursor: pointer; white-space: nowrap;
}
.btn-outline:hover {
  border-color: var(--orange);
  background: var(--dark-2);
  transform: translateY(-2px);
}
.btn-outline:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
