/* ============================================================
   Templado System — site.css
   Local design system layered on Bootstrap 5.
   All fonts, colors, and graphics are self-hosted; no CDN calls.
   ============================================================ */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibmplex/ibmplex-400.woff2") format("woff2"),
       url("../fonts/ibmplex/ibmplex-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibmplex/ibmplex-500.woff2") format("woff2"),
       url("../fonts/ibmplex/ibmplex-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibmplex/ibmplex-600.woff2") format("woff2"),
       url("../fonts/ibmplex/ibmplex-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibmplex/ibmplex-700.woff2") format("woff2"),
       url("../fonts/ibmplex/ibmplex-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #10151a;
  --ink-soft: #3c454b;
  --paper: #ffffff;
  --surface: #ffffff;
  --trace: #1f6f63;
  --trace-bright: #3fa98f;
  --trace-deep: #123f38;
  --copper: #b4762f;
  --copper-soft: #e7c99a;
  --line: #d8dccf;
  --line-strong: #b7bcac;
  --navy: #3263A5;
  --navy-bright: #274E80;

  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

/* -------------------- Base -------------------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: #161616;
  font-weight: 400;
  background: var(--paper);
  font-size: 1.02rem;
  line-height: 1.6;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@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; }
}

h1, h2, h3, h4, .display-face {
  font-family: var(--font);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.18rem;
  line-height: 1.55;
  max-width: 40ch;
}

a { color: var(--trace-deep); }
a:hover { color: var(--trace); }

::selection { background: var(--copper-soft); color: var(--ink); }

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--trace);
  outline-offset: 3px;
}

.container-narrow { max-width: 1160px; margin-inline: auto; }

/* -------------------- Nav -------------------- */
.site-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-nav .navbar-brand {
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.site-nav .brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.site-nav .nav-link {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.86rem;
  white-space: nowrap;
  padding: 0.5rem 0.6rem !important;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  color: var(--navy-bright);
}

.site-nav .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 6px 16px rgba(16, 21, 26, 0.08);
  padding: 0.4rem 0;
  margin-top: 0.4rem;
}

.site-nav .dropdown-item {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.94rem;
  padding: 0.5rem 1.1rem;
}

.site-nav .dropdown-item:hover,
.site-nav .dropdown-item:focus {
  background: #f2f5f9;
  color: var(--navy-bright);
}

.site-nav .dropdown-toggle::after {
  vertical-align: 0.15em;
}

.btn-trace {
  background: var(--trace-deep);
  border: 1px solid var(--trace-deep);
  color: #fff;
  font-weight: 600;
  font-size: 0.86rem;
  white-space: nowrap;
  padding: 0.5rem 1.05rem;
  border-radius: 3px;
}
.btn-trace:hover { background: var(--trace); border-color: var(--trace); color: #fff; }

.btn-copper {
  background: transparent;
  border: 1px solid var(--copper);
  color: var(--copper);
  font-weight: 600;
  padding: 0.58rem 1.25rem;
  border-radius: 3px;
}
.btn-copper:hover { background: var(--copper); color: #fff; }

.btn-outline-ink {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-weight: 500;
  padding: 0.58rem 1.25rem;
  border-radius: 3px;
}
.btn-outline-ink:hover { border-color: var(--ink); background: var(--surface); }

.btn-apply {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1.5px solid rgb(0, 109, 246);
  color: rgb(0, 109, 246);
  font-weight: 600;
  padding: 0.58rem 1.25rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-apply svg { flex-shrink: 0; }
.deploy-card .btn-apply svg,
.merchant-section .btn-apply svg,
.quote-panel .btn-apply svg {
  width: 14px;
  height: 14px;
  margin-bottom: 0;
}
.btn-apply:hover,
.btn-apply:focus-visible {
  background: rgb(0, 109, 246);
  color: #ffffff;
}

.btn-nav-apply {
  background: rgb(0, 109, 246);
  border: 1.5px solid rgb(0, 109, 246);
  color: #ffffff;
  font-weight: 600;
  padding: 0.5rem 1.05rem;
  font-size: 0.86rem;
  white-space: nowrap;
  border-radius: 3px;
  text-decoration: none;
}
.btn-nav-apply:hover,
.btn-nav-apply:focus-visible {
  background: rgb(0, 90, 210);
  border-color: rgb(0, 90, 210);
  color: #ffffff;
}

/* -------------------- Hero -------------------- */
.hero {
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.hero .kicker {
  font-weight: 600;
  color: var(--trace-deep);
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.15rem);
  max-width: 15ch;
  color: #3263A5;
}

.hero .lede { margin-top: 1.1rem; }

.hero-ctas { margin-top: 1.8rem; display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* Pipeline diagram */
.pipeline-wrap { margin-top: 3rem; }

.pipeline-svg { width: 100%; height: auto; display: block; }

.pipeline-node-label {
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  fill: var(--ink);
}
.pipeline-node-sub {
  font-family: var(--font);
  font-weight: 400;
  font-size: 12px;
  fill: var(--ink-soft);
}

.pipeline-trace {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 2;
}

.pipeline-pulse {
  fill: rgb(0, 109, 246);
}
.pipeline-pulse-red {
  fill: #DC3545;
}

@keyframes travel {
  0%   { offset-distance: 0%; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* forward loop: Merchant -> ARM Gateway -> Acquiring Bank -> Card Network */
.pulse-a { offset-path: path("M124,64 L470,64"); animation: travel 2.6s ease-in-out infinite; }
.pulse-b { offset-path: path("M522,130 L522,340"); animation: travel 2.6s ease-in-out infinite; animation-delay: 0.87s; }
.pulse-c { offset-path: path("M470,372 L150,372"); animation: travel 2.6s ease-in-out infinite; animation-delay: 1.74s; }

/* return loop: Card Network -> Acquiring Bank -> ARM Gateway -> Merchant */
.pulse-back-a { offset-path: path("M150,388 L470,388"); animation: travel 2.6s ease-in-out infinite; }
.pulse-back-b { offset-path: path("M538,340 L538,130"); animation: travel 2.6s ease-in-out infinite; animation-delay: 0.87s; }
.pulse-back-c { offset-path: path("M470,80 L124,80"); animation: travel 2.6s ease-in-out infinite; animation-delay: 1.74s; }

/* Circular 5-step loop (merchant-account.html "How merchant accounts work" diagram) */
.ma-loop-pulse-1 { offset-path: path("M335,85 H390 V175"); animation: travel 3.2s ease-in-out infinite; }
.ma-loop-pulse-2 { offset-path: path("M390,245 V410"); animation: travel 3.2s ease-in-out infinite; animation-delay: 0.64s; }
.ma-loop-pulse-3 { offset-path: path("M300,444 H160"); animation: travel 3.2s ease-in-out infinite; animation-delay: 1.28s; }
.ma-loop-pulse-4 { offset-path: path("M90,410 V245"); animation: travel 3.2s ease-in-out infinite; animation-delay: 1.92s; }
.ma-loop-pulse-5 { offset-path: path("M90,175 V85 H145"); animation: travel 3.2s ease-in-out infinite; animation-delay: 2.56s; }

.pipeline-stats { margin-top: 1.6rem; display: flex; gap: 2.4rem; flex-wrap: wrap; }
.pipeline-stat .num {
  font-weight: 700;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--trace-deep);
}
.pipeline-stat .label { font-size: 0.85rem; color: var(--ink-soft); }

/* -------------------- Section shells -------------------- */
.section { padding: 4rem 0; }
.section-border-top { border-top: 1px solid var(--line); }
.section-alt { background: var(--surface); }

.section-head { max-width: 60ch; margin-bottom: 2.4rem; }
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.section-head p { color: var(--ink-soft); margin-top: 0.7rem; }

/* -------------------- Spec sheet (Why ARM) -------------------- */
.spec-row {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
}
.spec-row:last-child { border-bottom: 1px solid var(--line); }

.spec-figure { font-weight: 700; font-size: 2rem; color: var(--trace-deep); font-variant-numeric: tabular-nums; }
.spec-figure-unit { font-size: 1.05rem; font-weight: 600; color: var(--ink-soft); }
.spec-title { font-weight: 600; margin-bottom: 0.35rem; }
.spec-body { color: var(--ink-soft); font-size: 0.98rem; }

@media (max-width: 767.98px) {
  .spec-row { grid-template-columns: 1fr; }
}

/* -------------------- Deployment diagrams -------------------- */
.deploy-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.6rem 1.6rem 1.8rem;
  height: 100%;
}
.deploy-card svg { width: 100%; height: auto; margin-bottom: 1.1rem; }
.deploy-card h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.deploy-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }

/* -------------------- Merchant intake -------------------- */
.merchant-section {
  background: var(--ink);
  color: #eef0ea;
}
.merchant-section .section-head p { color: #b9c2b6; }
.merchant-section .kicker { color: var(--copper-soft); font-weight: 600; font-size: 0.92rem; margin-bottom: 0.6rem; }
.merchant-section h2 { color: #fff; }

.intake-panel {
  background: #171d20;
  border: 1px solid #2a3236;
  padding: 2rem;
}

.intake-panel label {
  font-weight: 600;
  font-size: 0.88rem;
  color: #c9d0c6;
  margin-bottom: 0.35rem;
}

.intake-panel .form-control,
.intake-panel .form-select {
  background: #10151a;
  border: 1px solid #333c40;
  color: #eef0ea;
  border-radius: 2px;
  padding: 0.62rem 0.8rem;
}
.intake-panel .form-control::placeholder { color: #6c7570; }
.intake-panel .form-control:focus,
.intake-panel .form-select:focus {
  background: #10151a;
  border-color: var(--copper);
  color: #eef0ea;
  box-shadow: none;
}

.intake-meta {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid #2a3236;
}
.intake-meta .num { font-weight: 700; color: var(--copper-soft); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.intake-meta .label { font-size: 0.82rem; color: #9aa39a; }

/* -------------------- Merchant Account (alternating feature rows) -------------------- */
.ma-row {
  padding: 2.4rem 0;
  border-top: 1px solid var(--line);
}
.ma-row h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.ma-body { color: var(--ink-soft); max-width: 52ch; margin-bottom: 0; }

.ma-cta {
  margin-top: 1rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.ma-cta p {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto 1.1rem;
}

/* -------------------- Overview cards (icon + text) -------------------- */
.overview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  height: 100%;
  padding: 2rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.overview-card-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.3rem;
}
.overview-card-icon-wrap svg {
  width: 68px;
  height: 68px;
}
.overview-card p {
  color: var(--ink-soft);
  text-align: center;
  margin-bottom: 1.75rem;
}
.overview-card .btn-apply {
  margin-top: auto;
}

/* -------------------- Quote form -------------------- */
.quote-panel {
  max-width: 640px;
  margin: 0 auto;
}
.quote-panel h2 {
  text-align: center;
  margin-bottom: 1.8rem;
}
.quote-panel .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.quote-panel .form-control {
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 0.6rem 0.8rem;
}
.quote-panel .form-control:focus {
  border-color: var(--trace);
  box-shadow: none;
}
.quote-panel .was-validated .form-control:invalid,
.quote-panel .was-validated .form-select:invalid {
  border-color: #b3261e;
}
.quote-panel .was-validated .form-control:valid,
.quote-panel .was-validated .form-select:valid {
  border-color: var(--trace);
}
.quote-disclaimer {
  margin-top: 1.4rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  text-align: center;
}

/* -------------------- Pull quote -------------------- */
.pull-quote {
  border-left: 4px solid rgb(0, 109, 246);
  background: #F0F1EC;
  padding: 1.6rem 1.8rem;
  margin: 0;
  border-radius: 0 4px 4px 0;
}
.pull-quote p {
  font-size: 1.28rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 0.9rem;
}
.pull-quote footer {
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.pull-quote footer::before { content: "— "; }

/* -------------------- Simple page header (empty/interior pages) -------------------- */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: #3263A5;
}

/* -------------------- Scalability section (plain flex, no grid) -------------------- */
.scalability-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}
.scalability-text {
  flex: 0 0 320px;
  max-width: 320px;
}
.scalability-image {
  flex: 1 1 0%;
  min-width: 0;
}
.scalability-image svg {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 767.98px) {
  .scalability-flex {
    flex-direction: column;
    align-items: stretch;
  }
  .scalability-text {
    flex: 1 1 auto;
    max-width: 100%;
  }
}

/* -------------------- Multicore CPU diagram (Technology page) -------------------- */
.cpu-diagram {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
  margin: 0 auto;
}
@keyframes cpuCorePulse {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 1; }
}
.cpu-core {
  animation: cpuCorePulse 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .cpu-core { animation: none; opacity: 0.7; }
}

/* -------------------- Footer -------------------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--ink);
  padding: 2.6rem 0 1.8rem;
  font-size: 0.92rem;
  color: #b7bcac;
}
.site-footer h4 { font-size: 0.85rem; font-weight: 600; color: #ffffff; margin-bottom: 0.9rem; }
.site-footer a { color: #b7bcac; text-decoration: none; }
.site-footer a:hover { color: var(--trace-bright); }
.site-footer .footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.social-icon { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; margin-right: 0.5rem; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid #2a323a;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #8b9199;
}

/* -------------------- Utility -------------------- */
.text-trace { color: var(--trace-deep); }
.text-copper { color: var(--copper); }
.bg-paper { background: var(--paper); }
.hairline-divider { border: none; border-top: 1px solid var(--line); margin: 0; }
