/* ==========================================================================
   TechGnomeSoft, LLC — Shared Stylesheet
   Design system: navy header/footer bookend a light, high-contrast body.
   One blue accent, used consistently for links, buttons, and small marks —
   never blue text on a blue/navy background.
   Type: Space Grotesk (display), Inter (body), IBM Plex Mono (labels/data)
   ========================================================================== */

:root {
  /* Color tokens */
  --navy: #0b1c33;      /* header, footer, dark surfaces only */
  --navy-2: #12294a;
  --navy-3: #1a3560;
  --white: #ffffff;
  --gray-light: #f5f7fa;   /* light section backgrounds */
  --gray-100: #eaedf1;
  --gray-300: #d7dce3;

  /* Text (always on light backgrounds) */
  --text: #1b2430;
  --text-muted: #5b6472;

  /* Text on dark navy (header/footer only) */
  --text-on-navy: #ffffff;
  --text-on-navy-muted: rgba(255, 255, 255, 0.72);

  /* Accent blue — one accent, used on light backgrounds for buttons, links,
     labels, and underlines. --blue-bright is reserved for the rare case of
     an accent mark sitting on the dark navy header/footer. */
  --blue: #2458d6;
  --blue-dark: #163c96;
  --blue-bright: #6f9bff;
  --blue-light: #eaf1fd;
  --border: #e1e5eb;

  /* Subtle tint used for hero/banner backgrounds — light, not navy */
  --tint-1: #ffffff;
  --tint-2: #eef3fb;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(11, 28, 51, 0.06), 0 1px 1px rgba(11, 28, 51, 0.04);
  --shadow-md: 0 6px 20px rgba(11, 28, 51, 0.08);
  --shadow-lg: 0 16px 40px rgba(11, 28, 51, 0.14);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Type scale */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Layout */
  --container-w: 1180px;
  --gutter: 24px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 3.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em 0; }

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover { color: var(--blue-dark); }

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

ul, ol { padding-left: 1.25em; }

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

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 88px 0;
}

.section--tight { padding: 56px 0; }

.section--gray { background: var(--gray-light); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--blue);
  display: inline-block;
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 62ch;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--blue-dark); color: var(--white); }

/* Secondary action on light backgrounds (hero, CTA cards) */
.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--gray-300);
}
.btn--outline:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

/* Secondary action reserved for the dark navy header/footer */
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn--ghost:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,0.08); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  max-width: var(--container-w);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--white); }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue) 0%, #5b8bff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--white);
  flex-shrink: 0;
}

.brand-name .brand-suffix {
  color: var(--text-on-navy-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-on-navy-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
  position: relative;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-links a[aria-current="page"] { color: var(--white); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  background: var(--blue-bright);
  border-radius: 2px;
}

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  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; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--tint-1) 0%, var(--tint-2) 100%);
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-visual {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}

.hero-visual img {
  border-radius: var(--radius-md);
  width: 100%;
}

.hero-visual figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 12px;
  letter-spacing: 0.04em;
}

.page-hero {
  background: linear-gradient(160deg, var(--tint-1) 0%, var(--tint-2) 100%);
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { max-width: 20ch; }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--gray-300);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); margin-bottom: 0; font-size: 0.96rem; }

/* ---------- Values grid ---------- */
.value-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.value-item:last-child { border-bottom: none; }
.value-index {
  font-family: var(--font-mono);
  color: var(--blue);
  font-size: 0.85rem;
  padding-top: 3px;
  flex-shrink: 0;
  width: 2.2ch;
}
.value-item h4 { margin-bottom: 4px; }
.value-item p { color: var(--text-muted); margin: 0; }

/* ---------- Timeline (engineering lifecycle) ---------- */
.timeline {
  position: relative;
  margin-top: 40px;
  padding-left: 56px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--gray-300) 100%);
}
.timeline-step {
  position: relative;
  padding-bottom: 42px;
}
.timeline-step:last-child { padding-bottom: 0; }
.timeline-node {
  position: absolute;
  left: -56px;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--blue);
}
.timeline-step h3 { margin-bottom: 6px; }
.timeline-step p { color: var(--text-muted); max-width: 60ch; margin: 0; }

/* ---------- Industries / tags ---------- */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gray-light);
  border: 1px solid var(--border);
  color: var(--navy);
}

/* ---------- Industry cards ---------- */
.industry-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 30px;
}
.industry-card {
  background: var(--gray-light);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  border: 1px solid var(--border);
}
.industry-card h4 { margin-bottom: 6px; font-size: 1rem; }
.industry-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* ---------- Principle list (engineering approach) ---------- */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 40px;
  margin-top: 20px;
}
.principle {
  padding-left: 18px;
  border-left: 2px solid var(--blue-light);
}
.principle h4 { margin-bottom: 6px; }
.principle p { color: var(--text-muted); margin: 0; font-size: 0.96rem; }

/* ---------- Tech stack chips ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.stack-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--navy);
}

/* ---------- Project areas ---------- */
.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}
.project-card .eyebrow { margin-bottom: 10px; }
.project-card h3 { margin-bottom: 10px; }
.project-card p { color: var(--text-muted); margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--navy); margin-bottom: 6px; }
.cta-band p { color: var(--text-muted); margin: 0; }

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  gap: 20px;
  max-width: 560px;
}
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--navy);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--text);
  background: var(--white);
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--blue);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.form-status {
  font-size: 0.9rem;
  margin-top: 6px;
  min-height: 1.2em;
}
.form-status.is-success { color: #1a7a4c; }

.contact-info-card {
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
}
.contact-info-card h3 { margin-bottom: 16px; }
.contact-info-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-row:last-child { border-bottom: none; }
.contact-info-row .label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 9ch;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--text-on-navy-muted);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { max-width: 34ch; font-size: 0.92rem; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-on-navy-muted); font-size: 0.92rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.84rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-legal { display: flex; gap: 18px; }

/* ---------- Legal pages ---------- */
.legal-content h2 { margin-top: 2em; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--text-muted); }
.legal-content { max-width: 76ch; }
.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Section heading row ---------- */
.section-head {
  max-width: 700px;
  margin-bottom: 48px;
}
.section-head.text-center { margin-left: auto; margin-right: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .industry-list { grid-template-columns: repeat(2, 1fr); }
  .principle-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links { 
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 8px; }
  .nav-cta { margin-left: 0; margin-top: 8px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section { padding: 64px 0; }
  .cta-band { padding: 36px; flex-direction: column; align-items: flex-start; }
  .industry-list { grid-template-columns: 1fr; }
  .timeline { padding-left: 46px; }
  .timeline-node { left: -46px; width: 34px; height: 34px; }
}