/* NI Systems — public site */
:root {
  --bg: #ffffff;
  --bg-muted: #f7f8fa;
  --primary: #1b4fd8;
  --primary-hover: #153db0;
  --accent: #0ea5e9;
  --text: #111827;
  --subtext: #6b7280;
  --border: #e5e7eb;
  --success: #10b981;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
  --radius-card: 12px;
  --radius-control: 8px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: 80px 0;
}

.section--muted {
  background: var(--bg-muted);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header--left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: 720px;
}

.section-header h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0;
  color: var(--subtext);
  font-size: 1.05rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-card);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
}

.brand:hover {
  text-decoration: none;
  color: var(--primary);
}

.brand-icon {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Uses most of the nav bar height; wide logos cap by max-width */
.brand-logo {
  height: 64px;
  width: auto;
  max-width: min(360px, 54vw);
  object-fit: contain;
  object-position: left center;
  display: block;
}

@media (max-width: 768px) {
  .brand-logo {
    height: 54px;
    max-width: min(300px, 72vw);
  }
}

.footer-brand .brand-logo {
  height: 48px;
  max-height: 52px;
  max-width: min(300px, 70vw);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.primary-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.primary-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-control);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-nav-cta {
  margin-left: 0.25rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--text);
  margin: 0 auto;
}

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

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    display: none;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .primary-nav a:last-child {
    border-bottom: none;
  }

  .btn-nav-cta {
    margin: 0.75rem 0 0;
    text-align: center;
  }
}

/* Hero */
.hero {
  padding-top: 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  /* Visual first on phones — visitors see the “product” before the headline */
  .hero-visual {
    order: -1;
  }
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 1.5rem;
  color: var(--subtext);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.hero-link-secondary {
  font-weight: 600;
  color: var(--primary);
}

.trust-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: var(--subtext);
}

.trust-line span {
  white-space: nowrap;
}

.hero-visual {
  position: relative;
  min-height: 280px;
}

.dashboard-card {
  position: absolute;
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
}

.dashboard-card--main {
  inset: 0 12% 18% 0;
  background: linear-gradient(145deg, #f0f4ff 0%, #fff 50%);
  border-color: #dbe4ff;
}

.dashboard-card--small {
  right: 0;
  top: 8%;
  width: 42%;
  min-width: 140px;
}

.dashboard-card--accent {
  left: 8%;
  bottom: 0;
  width: 38%;
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.dash-label {
  color: var(--subtext);
}

.dash-value {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
}

.dashboard-card--accent .dash-label {
  color: rgba(255, 255, 255, 0.85);
}

.dash-metric {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.dash-metric--light {
  color: #fff;
}

.dash-sub {
  font-size: 0.8rem;
  color: var(--subtext);
}

.dash-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100px;
  padding-top: 0.5rem;
}

.dash-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  border-radius: 4px 4px 0 0;
  opacity: 0.85;
}

/* Who strip */
.strip-heading {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
}

.who-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

.who-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.who-emoji {
  font-size: 1.1rem;
}

/* Cards grid */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .card-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .card-grid--3 {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.info-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.info-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.info-card p {
  margin: 0;
  color: var(--subtext);
  font-size: 0.95rem;
}

/* Showcase */
.showcase-empty {
  text-align: center;
  color: var(--subtext);
  padding: 2rem;
}

.showcase-grid {
  display: grid;
  gap: 2rem;
}

/* Stacked: screenshots full width on top, copy below (all breakpoints) */
.showcase-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Screenshot row sits above the text block */
.showcase-media {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  padding: 1rem 1.25rem;
  gap: 0.65rem;
  min-height: 0;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
}

.showcase-thumbs {
  display: grid;
  gap: 0.5rem;
  width: 100%;
  align-content: start;
}

.showcase-thumbs--one {
  grid-template-columns: 1fr;
}

.showcase-thumbs--two {
  grid-template-columns: 1fr 1fr;
}

.showcase-thumbs--three {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 520px) {
  .showcase-thumbs--three {
    gap: 0.35rem;
  }

  .showcase-thumbs--three .showcase-thumb img {
    min-height: 72px;
    max-height: 130px;
  }
}

.showcase-thumb {
  border-radius: var(--radius-control);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  min-height: 0;
}

.showcase-thumb img {
  width: 100%;
  height: auto;
  min-height: 120px;
  max-height: 240px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.showcase-thumbs--one .showcase-thumb img {
  min-height: 180px;
  max-height: 360px;
}

.showcase-placeholder {
  background: var(--bg-muted);
  min-height: 160px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--subtext);
}

.showcase-body {
  padding: 1.5rem 1.5rem 1.75rem;
}

.badge {
  display: inline-block;
  background: rgba(27, 79, 216, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.showcase-head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 480px) {
  .showcase-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.showcase-client-logo {
  flex-shrink: 0;
  max-width: 120px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.showcase-head-text {
  flex: 1;
  min-width: 0;
}

.showcase-head-text .badge {
  margin-bottom: 0.35rem;
}

.showcase-body h3 {
  margin: 0;
  font-size: 1.25rem;
}

.showcase-desc {
  margin: 0 0 1rem;
  color: var(--subtext);
  font-size: 0.95rem;
}

.showcase-built-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.showcase-bullets {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
  font-size: 0.95rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-text {
  color: var(--subtext);
  margin-bottom: 1.5rem;
}

.trust-badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
}

.about-visual {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-card {
  position: relative;
  z-index: 1;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.85rem;
}

.about-orbit {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 2px solid var(--border);
  border-radius: 50%;
  opacity: 0.6;
}

/* Process */
.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .process-steps {
    grid-template-columns: 1fr;
  }
}

.process-steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg);
  padding: 1.25rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.process-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.process-steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.process-steps p {
  margin: 0;
  color: var(--subtext);
  font-size: 0.9rem;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 280px);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}

.field {
  display: block;
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(27, 79, 216, 0.35);
  outline-offset: 1px;
  border-color: var(--primary);
}

.form-message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-control);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.form-message--ok {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.form-message--bad {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.contact-aside {
  color: var(--subtext);
  font-size: 0.95rem;
}

.contact-detail {
  margin: 0 0 0.75rem;
}

.contact-detail a {
  color: var(--primary);
  font-weight: 500;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  background: var(--bg-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-tagline {
  margin: 0.5rem 0 0;
  color: var(--subtext);
  max-width: 320px;
  font-size: 0.95rem;
}

.footer-heading {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--subtext);
  margin: 0 0 0.75rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.35rem;
}

.footer-links a {
  color: var(--text);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--subtext);
}

.footer-bar p {
  margin: 0;
}

.admin-login-link {
  color: var(--subtext);
  font-size: 0.8rem;
}

.admin-login-link:hover {
  color: var(--text);
}
