/* ==========================================================================
   IMVUBU CONNECTIONS — Design System
   Display: Space Grotesk · Body: Inter · Labels/Mono: IBM Plex Mono
   Signature device: circuit/node mesh + notched connector-pin corners
   ========================================================================== */

:root {
  --ink: #0E1830;
  --ink-soft: #16223F;
  --ink-softer: #202E52;
  --paper: #F6F4EF;
  --paper-dim: #ECE7DC;
  --signal: #E5383B;
  --signal-dim: #B8282B;
  --river: #0E7C86;
  --river-dim: #0A5E66;
  --slate: #585E70;
  --slate-soft: #8A8FA0;
  --line: rgba(14, 24, 48, 0.14);
  --line-light: rgba(246, 244, 239, 0.18);
  --notch: 14px;
  --notch-sm: 9px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--slate);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.eyebrow::before { content: '['; color: var(--slate-soft); }
.eyebrow::after { content: ']'; color: var(--slate-soft); }
.eyebrow.on-dark { color: #FF7A7C; }
.eyebrow.river { color: var(--river); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

main { flex: 1; }

/* ---------- Notch utility (the signature shape) ---------- */
.notch {
  clip-path: polygon(
    var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
    calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch)
  );
}
.notch-sm {
  clip-path: polygon(
    var(--notch-sm) 0, 100% 0, 100% calc(100% - var(--notch-sm)),
    calc(100% - var(--notch-sm)) 100%, 0 100%, 0 var(--notch-sm)
  );
}

/* ---------- Buttons ---------- */
.btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: var(--signal);
  color: #fff;
}
.btn-primary:hover { background: var(--signal-dim); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.btn-ghost.on-dark {
  color: #fff;
  border-color: var(--line-light);
}
.btn-ghost.on-dark:hover { border-color: #fff; }

.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-row .btn { margin-right: 0; }

/* ---------- Navbar ---------- */
.navbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .logo { height: 46px; padding: 12px 0; }

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.navbar li { margin-left: 36px; }

.navbar li a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding-bottom: 4px;
  position: relative;
  transition: color 0.2s ease;
}

.navbar li a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 2px;
  background: var(--signal);
  transition: right 0.25s ease;
}
.navbar li a:hover { color: var(--signal); }
.navbar li a:hover::after { right: 0; }
.navbar li a.current { color: var(--signal); }
.navbar li a.current::after { right: 0; }

.navbar li.nav-cta a {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  font-size: 0.85rem;
}
.navbar li.nav-cta a::after { display: none; }
.navbar li.nav-cta a:hover { background: var(--signal); color: #fff; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 19px;
  cursor: pointer;
  z-index: 1001;
}
.bar { width: 100%; height: 2px; background-color: var(--ink); transition: all 0.3s ease-in-out; }
.menu-toggle.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 5px); }
.menu-toggle.active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.active .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -5px); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding: 130px 0 110px;
  overflow: hidden;
}
.hero-mesh, .banner-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-icon-mark {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 620px;
  z-index: 1;
  opacity: 0.16;
  animation: icon-pulse 4.5s ease-in-out infinite;
}
@keyframes icon-pulse {
  0%, 100% { opacity: 0.13; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.2; transform: translateY(-50%) scale(1.03); }
}
.drift-slow { animation: chevron-drift 7s ease-in-out infinite; }
.drift-mid { animation: chevron-drift 5s ease-in-out infinite; }
.drift-fast { animation: chevron-drift-fast 3.4s ease-in-out infinite; }
@keyframes chevron-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(18px); }
}
@keyframes chevron-drift-fast {
  0%, 100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(30px) scale(1.04); }
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.hero h1 {
  color: #fff;
  font-size: 4rem;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 1.2rem;
  color: #C9CEE0;
  max-width: 540px;
  margin-bottom: 38px;
}
.hero-stats {
  display: flex;
  margin-top: 64px;
  flex-wrap: wrap;
}
.hero-stat {
  padding-right: 32px;
  margin-right: 32px;
  border-right: 1px solid var(--line-light);
}
.hero-stat:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.hero-stat .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.9rem;
  color: #fff;
  font-weight: 600;
}
.hero-stat .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--slate-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---------- Page banner (sub-pages) ---------- */
.banner {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding: 86px 0 64px;
  overflow: hidden;
}
.banner-content { position: relative; z-index: 2; max-width: 640px; }
.banner h1 { color: #fff; font-size: 2.5rem; margin-bottom: 10px; }
.banner p { color: #C9CEE0; font-size: 1.08rem; margin-bottom: 0; }

/* ---------- Section rhythm ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--paper-dim); }
.section-dark { background: var(--ink); color: #C9CEE0; }
.section-dark h2 { color: #fff; }

.section-head { max-width: 640px; margin-bottom: 50px; }
.section-head.center { margin: 0 auto 56px; text-align: center; }
.section-title { font-size: 2.1rem; margin-bottom: 16px; }
.section-desc { color: var(--slate); font-size: 1.05rem; }
.section-dark .section-desc { color: #AEB4C6; }

.trace-divider {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto 56px;
  max-width: 220px;
}
.trace-divider span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal); flex-shrink: 0;
}
.trace-divider::before, .trace-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* ---------- Cards (notched) ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 34px 30px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--ink); }

.card .node-icon {
  width: 38px; height: 38px;
  margin-bottom: 22px;
  color: var(--signal);
}

.card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.card p { color: var(--slate); font-size: 0.97rem; margin-bottom: 0; }

/* node-marked list */
.node-list { list-style: none; margin: 0; padding: 0; }
.node-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
  color: var(--slate);
}
.node-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
}
.node-list li::after {
  content: '';
  position: absolute;
  left: 3px; top: 16px;
  width: 1px; height: calc(100% - 8px);
  background: var(--line);
}
.node-list li:last-child::after { display: none; }

/* ---------- Why-us / stat band ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border: 1px solid var(--line-light);
}
.why-item {
  padding: 38px 32px;
  border-right: 1px solid var(--line-light);
}
.why-item:last-child { border-right: none; }
.why-item .idx {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--river);
  font-size: 0.8rem;
  margin-bottom: 16px;
  display: block;
}
.why-item h3 { color: #fff; font-size: 1.15rem; margin-bottom: 10px; }
.why-item p { color: #AEB4C6; font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Logo marquee ---------- */
.marquee-wrap {
  overflow: hidden;
  position: relative;
  padding: 28px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee {
  display: flex;
  width: max-content;
  animation: scroll-logos 32s linear infinite;
}
.marquee img {
  height: 38px;
  margin: 0 38px;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.marquee img:hover { filter: grayscale(0%); opacity: 1; }
@keyframes scroll-logos {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Testimonials ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
}
.quote {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  padding: 32px;
}
.quote p.q {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 18px;
}
.quote .who {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--slate-soft);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; font-size: 2rem; margin-bottom: 14px; }
.cta-band p { color: #C9CEE0; max-width: 520px; margin: 0 auto 30px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #fff; padding: 64px 0 0; margin-top: auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 50px;
}
.footer .f-logo { height: 40px; margin-bottom: 18px; }
.f-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}
.f-wordmark .f-icon { height: 26px; width: auto; }
.f-wordmark .dot { color: var(--signal); }
.footer-col h4 {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--slate-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}
.footer-col p, .footer-col ul { font-size: 0.93rem; color: #AEB4C6; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { text-decoration: none; color: #AEB4C6; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--signal); }
.footer-bottom {
  border-top: 1px solid var(--line-light);
  text-align: center;
  font-size: 0.82rem;
  color: var(--slate-soft);
  padding: 20px 24px;
}
.footer-bottom .mono { color: var(--slate-soft); }

/* ---------- Forms ---------- */
.form-shell {
  background: #fff;
  border: 1px solid var(--line);
  padding: 44px;
  max-width: 600px;
}
.form-group { margin-bottom: 22px; text-align: left; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--river);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-submit {
  width: 100%;
  background: var(--signal);
  color: #fff;
  border: none;
  padding: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.form-submit:hover { background: var(--signal-dim); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-privacy { font-size: 0.8rem; color: var(--slate-soft); margin-top: 16px; margin-bottom: 0; }
.form-status { font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; margin: 14px 0 0; min-height: 1.2em; }
.form-status.ok { color: var(--river); }
.form-status.err { color: var(--signal); }
.form-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.contact-info-list { list-style: none; padding: 0; margin: 36px 0 0; }
.contact-info-list li {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
  font-size: 0.98rem;
}
.contact-info-list .k {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  color: var(--signal);
  text-transform: uppercase;
  min-width: 78px;
  padding-top: 3px;
}
.contact-info-list .v { color: var(--ink); }
.contact-info-list .v a { color: var(--ink); text-decoration: none; }
.contact-info-list .v a:hover { color: var(--signal); }

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.about-grid .about-img { border: 1px solid var(--line); }
.about-grid p { text-align: left; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 24px; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 64px 0;
}
.stat-strip div { padding: 28px 10px; text-align: center; border-right: 1px solid var(--line); }
.stat-strip div:last-child { border-right: none; }
.stat-strip .num { font-family: 'Space Grotesk', sans-serif; font-size: 2.1rem; color: var(--ink); font-weight: 600; }
.stat-strip .lab { font-family: 'IBM Plex Mono', monospace; font-size: 0.74rem; color: var(--slate-soft); text-transform: uppercase; }

/* ---------- Services page ---------- */
.service-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.service-row:first-of-type { border-top: 1px solid var(--line); }
.service-row .tag {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--signal);
  font-size: 0.85rem;
}
.service-row h3 { font-size: 1.4rem; margin-bottom: 10px; }
.service-row p { margin-bottom: 0; max-width: 640px; }

/* ---------- Partners page ---------- */
.partner-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px;
  text-align: left;
}
.partner-card img { height: 40px; width: auto; max-width: 140px; margin-bottom: 18px; object-fit: contain; filter: grayscale(100%); opacity: 0.75; transition: filter 0.3s ease, opacity 0.3s ease; }
.partner-card:hover img { filter: grayscale(0%); opacity: 1; }
.partner-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.partner-card p { font-size: 0.92rem; margin-bottom: 0; }

/* ---------- Fade-in ---------- */
.fade-in { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar ul {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    position: absolute;
    top: 100%;
    left: 0;
    padding: 10px 24px 26px;
  }
  .navbar ul.active { display: flex; }
  .navbar li { margin: 12px 0; margin-left: 0; }
  .navbar li.nav-cta { margin-top: 8px; }
  .menu-toggle { display: flex; }

  .hero { padding: 90px 0 70px; }
  .hero h1 { font-size: 2.3rem; }
  .hero-sub { font-size: 1.05rem; }
  .hero-stats { gap: 26px; }

  .banner h1 { font-size: 1.9rem; }

  .section { padding: 64px 0; }
  .section-title { font-size: 1.7rem; }

  .why-item { border-right: none; border-bottom: 1px solid var(--line-light); }
  .why-item:last-child { border-bottom: none; }

  .service-row { grid-template-columns: 1fr; gap: 8px; }

  .footer-grid { grid-template-columns: 1fr; padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
  .pulse-dot { animation: none !important; opacity: 0.9; }
  html { scroll-behavior: auto; }
}
