/* ============================================================
   Armour Arch X — fintech-clean design system v2 (original)
   Essence: oversized grotesk headlines, tinted rounded panels,
   pill controls, generous whitespace, deep-navy finale band.
   Tokens: ink #00172E · blue #156EF5 · mint #42F0CD ·
           lavender #8358EF · tints E5EFFE/E3FBF3/EFEAFE/FFF1E5
   ============================================================ */
:root {
  --ink: #00172E;
  --text2: #5A6472;
  --bg: #FFFFFF;
  --blue: #156EF5;
  --blue-deep: #0A54C4;
  --mint: #42F0CD;
  --lav: #8358EF;
  --tint-1: #E5EFFE;   /* pale blue    */
  --tint-2: #E3FBF3;   /* pale mint    */
  --tint-3: #EFEAFE;   /* pale lavender*/
  --tint-4: #FFF1E5;   /* pale peach   */
  --tint-soft: #F5F8FC;
  --line: #E4E9F0;
  --svg-box: #29435E;
  --r-lg: 24px;
  --r-md: 16px;
  --font-display: "Space Grotesk", "Segoe UI", Helvetica, sans-serif;
  --font-body: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/space-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/space-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* Tinted panel system — the signature */
.tint-1 { background: var(--tint-1); }
.tint-2 { background: var(--tint-2); }
.tint-3 { background: var(--tint-3); }
.tint-4 { background: var(--tint-4); }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin: 0 0 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-top: 15px; padding-bottom: 15px;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.01em; color: var(--ink);
  display: inline-flex; align-items: center; gap: 9px;
}
.brand svg { flex: 0 0 auto; }
.brand .brand-x { color: var(--blue); }
.brand:hover { text-decoration: none; }

.site-nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.site-nav a { font-size: 15px; font-weight: 600; color: var(--ink); padding-bottom: 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--blue); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--blue-deep); border-bottom-color: var(--blue); }
.site-nav a.btn { color: #FFFFFF; border-bottom: 0; padding-bottom: 12px; }
.site-nav a.btn:hover { color: #FFFFFF; }

.btn {
  display: inline-block; background: var(--ink); color: #FFFFFF;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 12px 26px; border-radius: 999px; border: 0; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--blue); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--tint-1); color: var(--ink); }
.btn-mint { background: var(--mint); color: var(--ink); }
.btn-mint:hover { background: #FFFFFF; color: var(--ink); }

.text-link { font-weight: 600; font-size: 15px; }

/* ---------- Hero: split grid ---------- */
.hero { padding: 84px 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 44px;
  align-items: center;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 6.4vw, 82px);
  line-height: 1.02; letter-spacing: -0.03em;
  margin: 0 0 22px;
}
.hero .lede { font-size: 18px; color: var(--text2); max-width: 480px; margin: 0 0 8px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 0; }
.hero-panel { border-radius: var(--r-lg); padding: 26px 20px; }
@media (max-width: 900px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* legacy hero-diagram (inner pages regenerated content) */
.hero-diagram { margin-top: 26px; background: var(--tint-soft); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }

/* Diagram text */
.svg-label { font-family: var(--font-body); font-size: 11px; fill: var(--text2); }
.svg-box-text { font-family: var(--font-body); font-size: 12px; fill: var(--svg-box); }
.svg-box-text-sm { font-family: var(--font-body); font-size: 11px; fill: var(--svg-box); }
.svg-amber-text { font-family: var(--font-body); font-size: 12px; fill: #0E8A6C; }
.svg-white-text { font-family: var(--font-body); font-size: 13px; fill: #FFFFFF; }
.svg-white-text-sm { font-family: var(--font-body); font-size: 11px; fill: #AFC6E8; }

.flow-draw { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1.4s ease-out 0.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow-draw { animation: none; stroke-dashoffset: 0; }
  .btn:hover { transform: none; }
}

/* ---------- Stats band ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--tint-soft); }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; padding-top: 38px; padding-bottom: 38px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-n {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(40px, 4.6vw, 58px); line-height: 1; letter-spacing: -0.03em;
}
.stat-l { font-size: 14px; color: var(--text2); font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 84px 0 20px; }
.section-title, h2 {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -0.025em; margin: 0 0 14px;
}
.section-title { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.06; margin-bottom: 40px; }
h2 { font-size: 28px; }
h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin: 0 0 8px; }

.section-label {
  font-size: 13px; font-weight: 600; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--blue-deep); margin: 0 0 16px;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.section-head .more { font-size: 15px; font-weight: 600; }

/* ---------- Capability cards: tinted, oversized ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.cap-card { border-radius: var(--r-lg); padding: 30px 28px; }
.cap-card h3 { font-size: 22px; }
.cap-card p { margin: 0; font-size: 15px; color: #33414F; }

/* legacy tile grid (subpages) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.tile { border-radius: var(--r-md); background: var(--tint-soft); padding: 22px 12px; text-align: center; border: 1px solid var(--line); }
.tile p { margin: 10px 0 0; font-size: 14px; font-weight: 600; }

/* ---------- Feature rows: alternating media/copy ---------- */
.feature {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 44px; align-items: center; margin: 0 0 56px;
}
.feature-flip .feature-media { order: 2; }
.feature-flip .feature-copy { order: 1; }
.feature-media { border-radius: var(--r-lg); padding: 34px; }
.feature-media img { display: block; width: 100%; border-radius: var(--r-md); }
.feature-copy h3 { font-size: clamp(24px, 2.6vw, 32px); }
.feature-copy p { color: var(--text2); font-size: 16px; margin: 0 0 16px; }
.all-work { text-align: center; padding: 8px 0 24px; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 20px; }
  .feature-flip .feature-media { order: 0; }
}

/* ---------- Work grid cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }
.card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #FFFFFF; padding: 14px 22px 22px;
  display: flex; flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 10px 32px rgba(0, 23, 46, 0.08); transform: translateY(-2px); }
.card h3 { font-size: 19px; }
.card .problem { font-weight: 600; font-size: 14px; margin: 0 0 6px; color: var(--ink); }
.card p { margin: 0 0 10px; font-size: 14px; color: var(--text2); }
.card .cta { margin-top: 0; font-size: 15px; font-weight: 600; align-self: center; }

/* thumbnail sits on a tinted pad; tints rotate per card */
.card > img {
  width: calc(100% + 16px); margin: 0 -8px 14px;
  border: 0; border-radius: var(--r-md);
  padding: 12px; background: var(--tint-1);
}
.card-grid > .card:nth-child(4n+2) > img { background: var(--tint-2); }
.card-grid > .card:nth-child(4n+3) > img { background: var(--tint-3); }
.card-grid > .card:nth-child(4n+4) > img { background: var(--tint-4); }

/* ---------- Credentials ---------- */
.cert-top { border: 0; background: var(--tint-1); }
.cred-grid > .card:nth-child(4n+2).cert-top { background: var(--tint-2); }
.cred-grid > .card:nth-child(4n+3).cert-top { background: var(--tint-3); }
.cred-grid > .card:nth-child(4n+4).cert-top { background: var(--tint-4); }
.cert-id { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--text2); }
.cred-grid .card { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 24px; }
.cred-grid .card p { margin-bottom: 6px; }
.cred-grid .card .show-cert { margin-top: 16px; }
.cred-footnote { font-size: 13px; color: var(--text2); margin-top: 22px; }
.show-cert { align-self: center; margin-top: auto; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(0, 23, 46, 0.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(960px, 94vw); max-height: 84vh; width: auto; height: auto; background: #fff; border-radius: var(--r-md); }
.lightbox-hint { color: #AFC6E8; font-size: 13px; margin: 14px 0 0; }
.section h2 { margin-top: 30px; }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; padding: 0; list-style: none; }
.card > .tags { margin-top: auto; padding-top: 12px; }
.tags li {
  font-size: 11px; font-weight: 600; color: var(--svg-box);
  background: var(--tint-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 11px;
}
.tags li.tag-client { background: var(--tint-1); border-color: var(--blue); color: var(--blue-deep); }

/* ---------- Filter chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 6px; }
.chip {
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  color: var(--ink); background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 19px; cursor: pointer; transition: all 0.15s ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.card.is-hidden { display: none; }

/* ---------- CTA band ---------- */
.contact-strip { background: var(--ink); color: #FFFFFF; margin-top: 72px; }
.contact-strip .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; padding-top: 72px; padding-bottom: 72px;
}
.contact-strip p { margin: 0; font-size: 18px; font-weight: 600; }
.cta-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08;
  letter-spacing: -0.025em; margin: 0; color: #FFFFFF;
}
.contact-strip .btn { background: var(--mint); color: var(--ink); }
.contact-strip .btn:hover { background: #FFFFFF; color: var(--ink); }

/* ---------- Page heads (inner pages) ---------- */
.page-head { padding: 64px 0 18px; }
.page-head h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(36px, 5.4vw, 58px); letter-spacing: -0.03em; line-height: 1.04;
  margin: 0 0 12px;
}
.page-head .lede { color: var(--text2); font-size: 17px; max-width: 680px; margin: 0; }
.prose { max-width: 780px; }
.prose p { color: #33414F; }
.diagram-panel { border: 0; border-radius: var(--r-lg); background: var(--tint-soft); padding: 24px; margin: 12px 0 8px; }
.pn-links {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 44px; padding: 20px 0 0;
  font-size: 14px; font-weight: 600;
}

/* ---------- Contact page ---------- */
.contact-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 26px 0; }
.contact-actions .card { text-align: left; padding: 26px; border: 0; }
.contact-actions .card:nth-child(1) { background: var(--tint-1); }
.contact-actions .card:nth-child(2) { background: var(--tint-2); }
.contact-actions .card:nth-child(3) { background: var(--tint-3); }
.contact-actions .card p { min-height: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 13px; color: var(--text2); }
.site-footer .container { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { font-weight: 600; }

@media (max-width: 480px) {
  .section { padding-top: 52px; }
  .contact-strip .container { padding-top: 48px; padding-bottom: 48px; }
}
