/* ===========================================================
   RSJ SYSTEMS — Design tokens
   =========================================================== */
:root {
  /* Color */
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --blue: #2454e0;
  --blue-deep: #16327f;
  --blue-tint: #eef2fe;
  --green: #16a34a;
  --green-tint: #ecfdf3;

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

  /* Layout */
  --max: 1180px;
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}
p { margin: 0; line-height: 1.6; color: var(--ink-soft); }

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

/* focus states */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===========================================================
   HEADER
   =========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 1px;
}
.brand svg { width: 34px; height: 34px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--blue); }
.main-nav a.active { color: var(--ink); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-actions .btn-ghost { display: none; }
  .nav-toggle { display: block; }
}

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}
.hero .wrap {
  position: relative;
  z-index: 1;
  padding-top: 88px;
  padding-bottom: 88px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--blue-deep);
  background: var(--blue-tint);
  border: 1px solid #d8e2fb;
  padding: 6px 12px;
  border-radius: 100px;
  width: fit-content;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  max-width: 14ch;
}
.hero h1 .accent { color: var(--blue); }
.hero-sub {
  max-width: 46ch;
  font-size: 17px;
}
.hero-ctas { display: flex; gap: 14px; margin-top: 6px; flex-wrap: wrap; }

.trust-strip {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.trust-item svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; }
.trust-item span small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 11.5px;
}

/* ===========================================================
   SECTIONS
   =========================================================== */
section { padding: 84px 0; }
.section-head { max-width: 620px; margin-bottom: 46px; }
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 12px; }
.section-head p { font-size: 16px; }

.alt-bg { background: var(--paper-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* App / solution cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.app-card {
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -14px rgba(15, 23, 42, 0.18);
  border-color: #c7d5fb;
}
.app-icon {
  width: 44px; height: 44px;
  border-radius: 9px;
  background: var(--blue-tint);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.app-icon svg { width: 22px; height: 22px; }
.app-card h3 { font-size: 17px; font-weight: 700; }
.app-card p { font-size: 14px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  width: fit-content;
}
.status-live { background: var(--green-tint); color: var(--green); }
.status-soon { background: #f1f5f9; color: var(--muted); }
.app-card .card-link {
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.app-card.disabled { opacity: 0.65; }
.app-card.disabled:hover { transform: none; box-shadow: none; border-color: var(--line); }

/* Industries */
.industry-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.industry-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.industry-chip svg { width: 16px; height: 16px; color: var(--blue); }

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0;
}
.stat h3 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--ink);
}
.stat span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Feature rows */
.feature-list { display: grid; gap: 26px; }
.feature-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
}
.feature-row .num {
  font-family: var(--font-mono);
  color: var(--blue);
  font-weight: 700;
}
.feature-row h4 { font-size: 15.5px; margin-bottom: 4px; }
.feature-row p { font-size: 14px; }

/* CTA band */
.cta-band {
  background: var(--ink);
  border-radius: 16px;
  padding: 56px;
  text-align: center;
  color: #fff;
}
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta-band p { color: #cbd5e1; max-width: 46ch; margin: 14px auto 26px; }
.cta-band .btn-primary { background: var(--blue); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
  background: var(--paper-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 13.5px; max-width: 32ch; margin-top: 10px; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: var(--ink-soft); }
.footer-col ul li a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

/* Simple page header (used on inner pages) */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.7rem); max-width: 18ch; }
.page-hero p { margin-top: 14px; max-width: 50ch; font-size: 16px; }
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--blue); }

/* Contact form */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.contact-info-card {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-info-row {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.contact-info-row:last-child { border-bottom: none; }
.contact-info-row svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; }
.contact-info-row h4 { font-size: 14px; margin-bottom: 3px; }
.contact-info-row p { font-size: 13.5px; }

/* Values / team grid (company page) */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.value-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.value-card .app-icon { margin-bottom: 14px; }
.value-card h3 { font-size: 16px; margin-bottom: 8px; }
.value-card p { font-size: 14px; }

.timeline { display: grid; gap: 0; }
.timeline-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.timeline-row:first-child { border-top: none; }
.timeline-row .year { font-family: var(--font-mono); font-weight: 700; color: var(--blue); }
.timeline-row h4 { font-size: 15.5px; margin-bottom: 4px; }
.timeline-row p { font-size: 14px; }

/* Responsive */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 20px; }
  .card-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .cta-band { padding: 36px 24px; }
  section { padding: 60px 0; }
}

/* Hero intro animation (plays once on page load) */
.hero-fade {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 0.7s ease forwards;
}
.hero-fade-1 { animation-delay: 0.05s; }
.hero-fade-2 { animation-delay: 0.18s; }
.hero-fade-3 { animation-delay: 0.32s; }
.hero-fade-4 { animation-delay: 0.46s; }
.hero-fade-5 { animation-delay: 0.6s; }
@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.hero-grid path {
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  animation: drawLine 1.6s ease forwards;
}
.hero-grid path:nth-of-type(1) { animation-delay: 0.1s; }
.hero-grid path:nth-of-type(2) { animation-delay: 0.3s; }
.hero-grid path:nth-of-type(3) { animation-delay: 0.5s; }
.hero-grid path:nth-of-type(4) { animation-delay: 0.7s; }
.hero-grid path:nth-of-type(5) { animation-delay: 0.9s; }
.hero-grid path:nth-of-type(6) { animation-delay: 1.05s; }
.hero-grid circle {
  opacity: 0;
  animation: dotIn 0.4s ease forwards;
}
.hero-grid circle:nth-of-type(1) { animation-delay: 1.1s; }
.hero-grid circle:nth-of-type(2) { animation-delay: 1.3s; }
.hero-grid circle:nth-of-type(3) { animation-delay: 1.35s; }
.hero-grid circle:nth-of-type(4) { animation-delay: 1.5s; }
.hero-grid circle:nth-of-type(5) { animation-delay: 1.55s; }
.hero-grid circle:nth-of-type(6) { animation-delay: 1.7s; }
.hero-grid circle:nth-of-type(7) { animation-delay: 1.75s; }
.hero-grid circle:nth-of-type(8) { animation-delay: 1.9s; }
@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}
@keyframes dotIn {
  to { opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-fade { opacity: 1; transform: none; animation: none; }
  .hero-grid path { stroke-dashoffset: 0; animation: none; }
  .hero-grid circle { opacity: 0.9; animation: none; }
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.5);
}
.mobile-nav.open { display: block; }
.mobile-nav-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-panel a {
  padding: 14px 6px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.mobile-nav-close { align-self: flex-end; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-nav-close svg { width: 22px; height: 22px; }
.mobile-nav-panel .btn { margin-top: 16px; }
