/* ==========================================================================
   LEADCON TECH — Design System
   ========================================================================== */

:root {
  /* Colour tokens */
  --ink: #0D1321;
  --ink-soft: #161F33;
  --paper: #F4F5F1;
  --paper-raised: #FFFFFF;
  --line: #DCDED6;
  --line-strong: #C3C6BC;
  --text: #14171C;
  --text-muted: #565F66;
  --teal: #146B64;
  --teal-dark: #0E4F4A;
  --teal-tint: #E4F1EF;
  --gold: #B98A2E;
  --gold-tint: #F6ECD8;
  --focus: #2E7DD1;

  /* Type */
  --font-display: 'Space Grotesk', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 2px rgba(13, 19, 33, 0.06), 0 8px 24px -12px rgba(13, 19, 33, 0.18);
}

* { 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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 62ch; }
p.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 56ch; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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

/* ---------- Section rhythm ---------- */
section { padding: clamp(56px, 9vw, 112px) 0; }
.section-alt { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ink { background: var(--ink); color: #C9CDD6; }
.section-ink h2, .section-ink h3, .section-ink h4 { color: #fff; }
.section-ink p { color: #AEB4C0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 600; color: var(--teal);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; background: var(--gold); display: inline-block;
}

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
  padding: 13px 26px; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  text-decoration: none; line-height: 1.1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); background: rgba(13,19,33,0.03); }
.btn-on-dark { background: #fff; color: var(--ink); }
.btn-on-dark:hover { background: var(--teal-tint); }
.btn-ghost-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost-on-dark:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244,245,241,0.9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 18px -12px rgba(13,19,33,0.3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--gutter); max-width: var(--max-width); margin: 0 auto; }
.brand { display: flex; align-items: center; }
.brand img, .brand svg { height: 34px; width: auto; }

.nav-desktop { display: flex; align-items: center; gap: 34px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text); font-weight: 500; font-size: 0.96rem;
  position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--teal); transition: right 0.2s ease;
}
.nav-links a:hover { text-decoration: none; }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink);
  position: relative; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); top: 0; }

.mobile-panel {
  display: none; position: fixed; inset: 0 0 0 0; top: 66px; background: var(--paper);
  z-index: 99; padding: 24px var(--gutter) 40px; overflow-y: auto;
}
.mobile-panel.open { display: block; }
.mobile-panel .nav-links { flex-direction: column; gap: 4px; }
.mobile-panel .nav-links a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.mobile-panel .btn { margin-top: 20px; width: 100%; }

@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(64px, 10vw, 120px); padding-bottom: clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-copy .btn-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }
.hero-art { position: relative; }
.node-field { width: 100%; height: auto; }
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto 8px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 30px; height: 100%; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.card-icon {
  width: 46px; height: 46px; border-radius: 10px; background: var(--teal-tint);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
  color: var(--teal);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.98rem; margin-bottom: 14px; }
.card-link { font-weight: 600; font-size: 0.94rem; display: inline-flex; align-items: center; gap: 6px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 940px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-tint); color: var(--teal-dark);
  font-size: 0.8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(185,138,46,0.35);
}

/* ---------- Process / sequence ---------- */
.process-track { position: relative; }
.process-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; position: relative; }
.process-step { position: relative; padding-top: 34px; }
.process-step .num {
  position: absolute; top: 0; left: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal); color: #fff; font-family: var(--font-display); font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.process-step h4 { font-size: 0.98rem; margin-bottom: 6px; }
.process-step p { font-size: 0.88rem; color: var(--text-muted); margin: 0; }
.process-line { position: absolute; top: 13px; left: 5%; right: 5%; height: 2px; background: var(--line-strong); z-index: 0; }
@media (max-width: 940px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .process-line { display: none; }
}
@media (max-width: 560px) { .process-steps { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink); color: #fff; border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px); text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #AEB4C0; margin-left: auto; margin-right: auto; }
.cta-band .btn-row { display: flex; justify-content: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.field .hint { font-size: 0.8rem; color: var(--text-muted); }
.field input,
.field select,
.field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: 12px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(20,107,100,0.15);
}
.field textarea { resize: vertical; min-height: 130px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #B3261E; }
.field .error-msg { display: none; color: #B3261E; font-size: 0.82rem; }
.field.invalid .error-msg { display: block; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 24px; }
.checkbox-row input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }
.checkbox-row label { font-size: 0.92rem; color: var(--text-muted); }
.file-drop {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 22px;
  text-align: center; color: var(--text-muted); font-size: 0.92rem; background: var(--paper);
}
.file-drop strong { color: var(--teal); }
.form-status {
  display: none; padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-size: 0.95rem;
}
.form-status.show { display: block; }
.form-status.success { background: var(--teal-tint); color: var(--teal-dark); border: 1px solid rgba(20,107,100,0.25); }
.form-status.error { background: #FBEAE9; color: #8C1D14; border: 1px solid rgba(179,38,30,0.3); }
/* Honeypot */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #AEB4C0; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 48px; }
.footer-grid h4 { color: #fff; font-size: 0.9rem; letter-spacing: 0.02em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: #AEB4C0; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-desc { font-size: 0.92rem; max-width: 32ch; color: #9AA1AD; margin-top: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.84rem; color: #808896;
}
.footer-bottom a { color: #808896; }
@media (max-width: 940px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Table of contents / legal pages ---------- */
.legal-body h2 { margin-top: 2em; font-size: 1.4rem; }
.legal-body h3 { margin-top: 1.4em; font-size: 1.1rem; }
.legal-body p, .legal-body li { color: var(--text-muted); }
.legal-body { max-width: 74ch; }
.updated-note { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 40px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--teal); }

/* ---------- 404 ---------- */
.error-page { min-height: 60vh; display: flex; align-items: center; }
.error-page .btn-row { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.stack-lg > * + * { margin-top: 20px; }

/* Reveal-on-load orchestration (single moment, not per-card) */
.reveal-group [data-reveal] {
  opacity: 0; transform: translateY(14px);
}
.reveal-group.is-ready [data-reveal] {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-group.is-ready [data-reveal="1"] { transition-delay: 0.05s; }
.reveal-group.is-ready [data-reveal="2"] { transition-delay: 0.15s; }
.reveal-group.is-ready [data-reveal="3"] { transition-delay: 0.25s; }
@media (prefers-reduced-motion: reduce) {
  .reveal-group [data-reveal] { opacity: 1; transform: none; }
}
