/* ============================================================
   NetSource v2.0 — base.css
   Design tokens, font face rules, reset, shared components.
   Plan 01-C: extracted from inline <style> blocks of all pages.
   Linked by every page (Plan F) BEFORE the page-specific CSS.
   ============================================================ */

/* ------------------------------------------------------------
   Section 1: Font face declarations (8 faces, self-hosted)
   Per D-07..D-11, paths reference Plan A's woff2 outputs.
   font-display: swap + latin-ext unicode-range per D-11.
   ------------------------------------------------------------ */

/* Bebas Neue — Display (D-07, single weight by distribution) */
@font-face {
  font-family: 'Bebas Neue';
  src: url('/assets/fonts/bebas-neue/bebas-neue-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Poppins — Body (D-08: 400 / 400-italic / 600 / 700) */
@font-face {
  font-family: 'Poppins';
  src: url('/assets/fonts/poppins/poppins-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  src: url('/assets/fonts/poppins/poppins-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  src: url('/assets/fonts/poppins/poppins-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  src: url('/assets/fonts/poppins/poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono — Mono accent (D-09: 400, 500) */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Instrument Serif — Serif accent (D-09: 400 italic only) */
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif/instrument-serif-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------
   Section 2: :root design tokens (brand-baked, no JS injection)
   Per D-01..D-05, D-13, D-43, D-44, D-CD-01, D-CD-02, D-CD-03.
   ------------------------------------------------------------ */
:root {
  /* Brand colors (locked) */
  --accent: #00FFE5;                                                      /* D-01 brand cyan */
  --accent-2: #1A68F4;                                                    /* D-02 brand blue */
  --accent-soft: color-mix(in oklab, var(--accent) 14%, transparent);     /* D-CD-03 */
  --gradient-cta: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); /* D-05, D-CD-03 */

  /* Surfaces — uniform dark per user direction (was #2A2F36/#1A1E24/#1F242B; consolidated to darkest) */
  --bg: #1A1E24;
  --bg-2: #1A1E24;
  --bg-3: #1A1E24;

  /* Foreground */
  --fg: #F5F5F5;                                                          /* D-04 brand off-white */
  --fg-dim: #868787;                                                      /* D-04 brand grey */
  --fg-mute: #9A9A9A;                          /* Phase 3 / A11Y-02 / D-CD: bumped from #5C6166 (2.67:1, FAIL AA) to #9A9A9A (5.82:1, PASS AA) against #1A1E24 */

  /* Lines / dividers (preserved from source) */
  --line: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.14);

  /* Typography (D-07, D-08, D-09, D-44, D-CD-02) */
  --font-sans: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-serif: 'Instrument Serif', serif;
  --font-display: 'Bebas Neue', 'Oswald', system-ui, sans-serif;

  /* Spacing (locked cozy density per D-CD-01, density variants dropped per D-14) */
  --pad-section: 9rem;
  --pad-x: 2rem;
}

/* ------------------------------------------------------------
   Section 3: Reset
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
html, body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
::selection { background: var(--accent); color: #1A1E24; }

/* ------------------------------------------------------------
   Section 4: Focus-visible (NEW per UI-SPEC, no analog in source)
   Sets a11y baseline so Phase 3 audit has zero rework.
   ------------------------------------------------------------ */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ------------------------------------------------------------
   Section 4b: Skip-to-content link (Phase 3 / A11Y-07 / D-CD)
   Visually-hidden-until-focus pattern. First focusable element
   on every page; reveals top-left on first Tab keystroke.
   ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--accent);
  color: var(--bg);
  padding: .5rem 1rem;
  border-radius: .4rem;
  font-weight: 600;
  font-size: .875rem;
  z-index: 100;
}
.skip-link:focus,
.skip-link:focus-visible {
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  overflow: visible;
}

/* ------------------------------------------------------------
   Section 5: Typography primitives
   ------------------------------------------------------------ */
.micro { font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-mute); }
.lead  { font-size: clamp(1.0625rem, 1.25vw, 1.25rem); line-height: 1.55; color: var(--fg-dim); text-wrap: pretty; }
.body  { font-size: .9375rem; line-height: 1.65; color: var(--fg-dim); text-wrap: pretty; }

/* ------------------------------------------------------------
   Section 6: Frame (max-width content container)
   ------------------------------------------------------------ */
.frame { max-width: 72rem; margin: 0 auto; padding: 0 var(--pad-x); }

/* ------------------------------------------------------------
   Section 7: Topbar (sticky nav header — used on all 5 pages)
   ------------------------------------------------------------ */
.topbar { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px) saturate(140%); background: color-mix(in oklab, var(--bg) 80%, transparent); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .95rem; letter-spacing: -.02em; }
.logo-img { height: 2.5rem; width: auto; display: block; transition: opacity .2s; }
.logo-text { font-family: var(--font-sans); font-weight: 700; font-size: 1.25rem; line-height: 1; letter-spacing: -.025em; color: var(--fg); }
.logo:hover .logo-img { opacity: .8; }
.nav { display: flex; gap: .25rem; }
.nav a { font-size: .8125rem; font-weight: 500; color: var(--fg-dim); padding: .5rem .85rem; border-radius: .4rem; transition: background .15s, color .15s; }
.nav a:hover, .nav a.cur { color: var(--fg); background: rgba(255,255,255,0.04); }
.top-cta { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border: 1px solid var(--line-2); border-radius: .45rem; font-size: .8125rem; font-weight: 600; transition: all .15s; }
.top-cta:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Phase 5: language switcher (D-16, D-17, I18N-06) ───────────────────── */
/* nav-group wrapper — keeps .nav and .lang-switcher together in topbar flex row */
.nav-group { display: flex; align-items: center; gap: 1rem; }

/* lang-switcher chips — same size/weight as .nav a, distinguished by color only */
.lang-switcher { display: flex; align-items: center; gap: .25rem; }
.lang-switcher a { font-size: .8125rem; font-weight: 500; color: var(--fg-dim); padding: .5rem .75rem; border-radius: .4rem; transition: color .15s, background .15s; }
.lang-switcher a:hover { color: var(--fg); background: rgba(255,255,255,0.04); }
.lang-switcher a.on { color: var(--accent); }
.lang-switcher a.on:hover { color: var(--accent); background: rgba(255,255,255,0.04); }
.lang-sep { font-size: .8125rem; color: var(--line-2); user-select: none; }

/* ─── Mobile nav hamburger (Quick 260429-0nh) ──────────────────────────────
   Desktop: hidden. Mobile (<900px): replaces the hidden .nav with a panel.
   .topbar is position: sticky (line 187) which establishes a containing
   block for absolute children, so .nav-mobile anchors to topbar bottom. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line-2);
  border-radius: .4rem;
  color: var(--fg);
  background: transparent;
  transition: border-color .15s, color .15s, background .15s;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle .nav-toggle-bars { display: block; width: 1rem; height: 1rem; }
.nav-toggle .nav-toggle-bars line { stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.nav-mobile {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: color-mix(in oklab, var(--bg) 96%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding: .75rem var(--pad-x) 1rem;
  flex-direction: column;
  gap: .25rem;
}
.nav-mobile a {
  display: block;
  padding: .85rem 1rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--fg-dim);
  border-radius: .4rem;
  transition: background .15s, color .15s;
}
.nav-mobile a:hover, .nav-mobile a.cur { color: var(--fg); background: rgba(255,255,255,0.04); }
.nav-mobile a.nav-mobile-cta { margin-top: .5rem; color: var(--fg); border: 1px solid var(--line-2); font-weight: 600; }
.nav-mobile a.nav-mobile-cta:hover { color: var(--accent); border-color: var(--accent); background: transparent; }
.nav-mobile.open { display: flex; }

/* mobile (max-width: 900px): .nav hides per page-*.css; .lang-switcher stays visible.
   .top-cta hides on mobile — the same Parliamone/contact link lives inside .nav-mobile
   so the hamburger has room and the topbar doesn't overflow. */
@media (max-width: 900px) {
  .nav-group { gap: 0; }
  .nav-toggle { display: inline-flex; }
  .top-cta { display: none; }
}

/* ------------------------------------------------------------
   Section 8: Section heading shells
   ------------------------------------------------------------ */
section { padding: var(--pad-section) 0; }
.sec-label { display: block; text-align: center; margin-bottom: 1.25rem; }
.sec-h { text-align: center; font-weight: 600; letter-spacing: -.03em; line-height: 1.04; font-size: clamp(2rem, 4vw, 3.25rem); max-width: 22ch; margin: 0 auto; text-wrap: balance; }
.sec-h em { font-style: italic; font-family: var(--font-serif); font-weight: 400; color: var(--accent); letter-spacing: -.01em; }
.sec-sub { margin: 1.25rem auto 0; max-width: 40rem; text-align: center; }

/* ------------------------------------------------------------
   Section 9: Buttons (.btn / .btn-primary / .btn-ghost)
   .btn-primary updated to gradient per D-05.
   ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.25rem; border-radius: .5rem; font-weight: 600; font-size: .875rem; transition: transform .15s, background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--gradient-cta); color: #1A1E24; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary::after { content: "→"; font-family: var(--font-mono); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg-dim); }

/* ------------------------------------------------------------
   Section 10: Footer (shared shell — page-specific layout
   variations stay in page-{slug}.css if needed)
   ------------------------------------------------------------ */
footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.foot-cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.foot-cols div h5 { font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: .85rem; }
.foot-cols div a { display: block; font-size: .8125rem; color: var(--fg-dim); padding: .2rem 0; }
.foot-cols div a:hover { color: var(--fg); }
.foot-bottom { padding-top: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.foot-bottom span { font-family: var(--font-mono); font-size: .6875rem; color: var(--fg-mute); letter-spacing: .06em; }
.foot-logo-img { height: 2.25rem; width: auto; display: block; }

/* ------------------------------------------------------------
   Section 11: Logo strip primitive (.client-mk--img)
   D-34 drops the previous typographic placeholder children.
   Only the image-based mark style remains.
   D-35 layout: flex, gap 3rem, centered, opacity .85 → 1 hover.
   ------------------------------------------------------------ */
.logos-strip { display: flex; gap: 3rem; justify-content: center; align-items: center; flex-wrap: wrap; opacity: 0.85; }
.logos-strip:hover { opacity: 1; }
.logos-strip .lbl { width: 100%; text-align: center; font-size: .6875rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: .25rem; font-family: var(--font-mono); }
.client-mk--img { display: inline-flex; align-items: center; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--bg); transition: border-color .15s, background .15s; }
.client-mk--img:hover { border-color: var(--accent); background: var(--bg-2); }
.logos-strip .client-mk--img .cm-img { height: 44px; width: auto; display: block; transition: opacity .15s, filter .15s; }

/* ------------------------------------------------------------
   Section 12: Pulse keyframe (used by hero tag dot, status dots,
   map pin — appears on multiple pages)
   ------------------------------------------------------------ */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.85); }
}

/* ------------------------------------------------------------
   Section 13: Reduced-motion gate (Phase 3 / A11Y-05 / D-CD)
   Disables pulse keyframe, transitions, and smooth scroll-behavior
   when the OS-level prefers-reduced-motion preference is set.
   Companion: js/site.js smooth-scroll handler queries
   window.matchMedia and passes behavior: 'auto' under reduce.
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .pulse,
  .hero-tag .dot,
  .status .dot {
    animation: none !important;
  }
}
