/* =========================================================
   JB Technologies SA — Design Tokens
   Palette: Ink #16321F · Signal #1F7A3D · Deep #0F4A28
            Mist #E8F3EC · Paper #FFFFFF · Slate #4B5563
   Display: Space Grotesk · Body: Inter · Utility: IBM Plex Mono
   ========================================================= */

:root {
  --ink: #16321F;
  --signal: #1F7A3D;
  --deep: #0F4A28;
  --mist: #E8F3EC;
  --paper: #FFFFFF;
  --slate: #4B5563;
  --slate-light: #8A94A0;
  --border: #DDE6E1;

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --max-width: 1180px;
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(22,50,31,0.06), 0 8px 24px -12px rgba(22,50,31,0.12);
}

/* ---------- 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.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--slate); }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Eyebrow / mono labels (signature device) ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--signal);
  margin: 0 0 12px;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--signal); color: var(--paper); }
.btn-primary:hover { background: var(--deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }
.btn-on-dark.btn-ghost { color: var(--paper); border-color: rgba(255,255,255,0.35); }
.btn-on-dark.btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
.btn-nav { margin-left: 8px; padding: 9px 20px; font-size: 14px; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.brand-tag { font-family: var(--font-mono); font-size: 11px; color: var(--signal); letter-spacing: 0.02em; }

.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav a:not(.btn) {
  text-decoration: none; color: var(--slate); font-size: 14.5px; font-weight: 500;
  position: relative; padding: 4px 0;
}
.primary-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease;
}
.primary-nav a:not(.btn):hover::after { transform: scaleX(1); }
.primary-nav a:not(.btn):hover { color: var(--ink); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding: 76px 0 88px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(38px, 5vw, 58px); line-height: 1.06; color: var(--ink); margin-bottom: 22px;
}
.hero-sub { font-size: 18px; max-width: 46ch; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-badges li {
  font-family: var(--font-mono); font-size: 12px; color: var(--slate);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px;
}

.hero-art { position: relative; }
.network-svg { width: 100%; height: auto; }
.net-lines line {
  stroke: var(--signal); stroke-width: 1.6; opacity: 0.55;
  stroke-dasharray: 320; stroke-dashoffset: 320;
  animation: draw 1.1s ease forwards;
}
.net-nodes circle { fill: var(--paper); stroke: var(--signal); stroke-width: 2.2; opacity: 0; animation: pop 0.4s ease forwards; }
.net-nodes circle:nth-child(1) { fill: var(--signal); animation-delay: 0.9s; }
.net-nodes circle:nth-child(2) { animation-delay: 1.05s; }
.net-nodes circle:nth-child(3) { animation-delay: 1.05s; }
.net-nodes circle:nth-child(4) { animation-delay: 1.2s; }
.net-nodes circle:nth-child(5) { animation-delay: 1.2s; }
.net-nodes circle:nth-child(6) { animation-delay: 1.2s; }
.net-nodes circle:nth-child(7) { animation-delay: 1.2s; }
.net-labels text {
  font-family: var(--font-mono); font-size: 10px; fill: var(--slate-light);
  letter-spacing: 0.04em; opacity: 0; animation: fadeIn 0.5s ease forwards; animation-delay: 1.4s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
@keyframes fadeIn { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .net-lines line, .net-nodes circle, .net-labels text { animation: none; opacity: 1; stroke-dashoffset: 0; }
}
.art-caption { font-family: var(--font-mono); font-size: 12px; color: var(--slate-light); text-align: center; margin-top: 4px; }

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section { padding: 92px 0; }
.section h2 { font-size: clamp(28px, 3.4vw, 38px); color: var(--ink); }
.section-lead { font-size: 17px; max-width: 62ch; margin-bottom: 44px; }

.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow-card); transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--signal); transform: translateY(-3px); }
.card-index { font-family: var(--font-mono); font-size: 12px; color: var(--signal); }
.card h3 { font-size: 17px; margin: 10px 0 8px; color: var(--ink); }
.card p { font-size: 14.5px; margin: 0; }

.value h3 { font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.value p { font-size: 14.5px; margin: 0; }
.value { padding: 4px 0 20px; border-bottom: 1px solid var(--border); }

/* ---------- Documentation feature ---------- */
.section-doc { background: var(--mist); }
.doc-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.doc-copy h2 { color: var(--ink); }
.doc-copy blockquote {
  font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--signal);
  margin: 24px 0; padding-left: 20px; border-left: 3px solid var(--signal);
}
.doc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.doc-list li {
  font-family: var(--font-mono); font-size: 13.5px; color: var(--ink);
  padding: 10px 0 10px 26px; border-bottom: 1px solid rgba(22,50,31,0.12); position: relative;
}
.doc-list li::before {
  content: "\2713"; position: absolute; left: 0; top: 9px; color: var(--signal); font-weight: 700;
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); padding: 76px 0; }
.cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.cta-band h2 { color: var(--paper); font-size: clamp(26px, 3vw, 34px); }
.cta-band p { color: rgba(255,255,255,0.72); font-size: 16.5px; margin-bottom: 30px; }
.cta-band .hero-cta { justify-content: center; margin-bottom: 0; }

/* ---------- Forms ---------- */
.section-form { background: var(--paper); }
.section-assessment { background: var(--mist); }
.form-wrap { max-width: 760px; }
.form { margin-top: 20px; }
.form-subhead {
  font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--signal);
  font-family: var(--font-mono); font-weight: 500; margin: 34px 0 16px;
}
.form-subhead:first-of-type { margin-top: 0; }
.form-hint { font-size: 14px; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field-full { grid-column: 1 / -1; }
.field span { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 15px; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 8px; background: var(--paper); color: var(--ink);
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--signal); }
.field textarea { resize: vertical; }

.tri-grid { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--paper); }
.tri-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; align-items: center;
  padding: 12px 16px; border: none; margin: 0; border-bottom: 1px solid var(--border);
}
.tri-row:last-child { border-bottom: none; }
.tri-head { background: var(--mist); font-family: var(--font-mono); font-size: 12px; color: var(--slate); text-transform: uppercase; letter-spacing: 0.04em; }
.tri-head span:not(:first-child) { padding-left: 24px; }
.tri-row legend { font-size: 14.5px; font-weight: 600; color: var(--ink); padding: 0; }
.tri-row label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--slate); cursor: pointer; }
.tri-row input[type="radio"] { accent-color: var(--signal); width: 16px; height: 16px; }

.form-note[data-success] { color: var(--signal); font-weight: 600; margin-top: 14px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.8); padding: 56px 0 0; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--paper); letter-spacing: 0.02em; }
.footer-tag { font-family: var(--font-mono); font-size: 12.5px; color: var(--signal); }
.footer-contact p, .footer-nav a { font-size: 14px; margin: 0 0 10px; text-decoration: none; display: block; color: rgba(255,255,255,0.72); }
.footer-contact a, .footer-nav a { color: rgba(255,255,255,0.72); }
.footer-contact a:hover, .footer-nav a:hover { color: var(--paper); }
.footer-bottom { padding: 22px 24px; }
.footer-bottom p { font-size: 12.5px; color: rgba(255,255,255,0.5); margin: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .doc-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .primary-nav {
    position: fixed; inset: 76px 0 auto 0; background: var(--paper); flex-direction: column;
    align-items: flex-start; gap: 4px; padding: 16px 24px 24px; border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .primary-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .primary-nav a:not(.btn) { padding: 10px 0; width: 100%; }
  .btn-nav { margin: 10px 0 0; }
  .nav-toggle { display: flex; }

  .hero { padding: 44px 0 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; max-width: 340px; margin: 0 auto; }

  .section { padding: 64px 0; }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .doc-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .tri-row { grid-template-columns: 1fr; gap: 8px; }
  .tri-head { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
