/* ============================================================
   CROSSMARK ASIA: Design System
   Values sourced from Crossmark_Brand_Guideline.pdf v1.0
   70% neutral / 20% secondary / 10% red
   ============================================================ */

/* ---------- Fonts ---------- */
/* Self-hosted (see assets/css/fonts.css). Previously loaded from Google's
   CDN, which leaked visitor IPs to Google; now served from this domain. */
@import url('fonts.css');

/* ---------- Tokens ---------- */
:root {
  /* Lock the site to its designed light theme. Prevents mobile browsers
     (Samsung Internet, Xiaomi/Mi, Chrome auto-dark) from force-inverting
     the page, which muddies backgrounds and leaves white boxes around the
     brand logos. The site handles its own dark hero sections by design. */
  color-scheme: only light;

  /* Brand palette (exact) */
  --red:        #ED0005;
  --red-dark:   #C40008;
  --charcoal:   #1C1F26;
  --navy:       #1B2A4A;
  --slate:      #5A6472;
  --off-white:  #F7F6F3;
  --white:      #FFFFFF;
  --stone:      #E8E6E1;
  --brass:      #C9A15B;

  /* Roles */
  --bg:            var(--off-white);
  --ink:           var(--charcoal);
  --ink-soft:      var(--slate);
  --line:          #E2E0DB;
  --line-strong:   #D3D0C9;

  /* Type */
  --font-display: 'Figtree', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Spacing (4pt grid) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-28: 112px;

  /* Radius */
  --r-tile: 14px;
  --r-panel: 28px;
  --r-pill: 999px;

  /* Elevation: layered, low-opacity, charcoal-tinted */
  --shadow-1: 0 1px 2px rgba(28,31,38,.04), 0 2px 8px rgba(28,31,38,.05);
  --shadow-2: 0 6px 14px rgba(28,31,38,.06), 0 18px 40px rgba(28,31,38,.08);
  --shadow-3: 0 20px 50px rgba(28,31,38,.14), 0 6px 16px rgba(28,31,38,.08);

  --maxw: 1400px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s-6); }
/* Prevent grid/flex children from forcing horizontal overflow (min-width:auto default) */
.grid > *, .split > *, .gate > *, .hero__inner > *, .ctaband__inner > *,
.footer-grid > *, .steps, .contrast > *, .form-grid > * { min-width: 0; }
.section { padding-block: clamp(56px, 7vw, 132px); }
.section--tight { padding-block: clamp(44px, 5vw, 88px); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: 62ch; }
.measure-sm { max-width: 46ch; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-4 { gap: var(--s-4); }
.eyebrow--center { justify-content: center; }

/* Surfaces */
.bg-dark   { background: var(--charcoal); color: var(--off-white); }
.bg-navy   { background: var(--navy); color: var(--off-white); }
.bg-stone  { background: var(--stone); }
.bg-white  { background: var(--white); }
.bg-offwhite { background: var(--off-white); }

/* ---------- Typography ---------- */
.display {
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 6vw, 6rem);
}
h1, h2, h3 { font-weight: 800; text-transform: uppercase; line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance; }
h2.section-title { font-size: clamp(1.9rem, 3.4vw, 3.5rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.55rem); }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.1rem, 1.3vw, 1.4rem); line-height: 1.6; color: var(--ink); font-weight: 500; }
.muted { color: var(--ink-soft); }
.on-dark .muted, .bg-dark .muted, .bg-navy .muted, .statband .muted, .page-hero .muted, .site-footer .muted { color: #AEB6C2; }
strong, b { font-weight: 800; }
.text-red { color: var(--red); }

/* Eyebrow / label: mono, with reticle tick */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--slate);
}
.on-dark .eyebrow, .bg-dark .eyebrow, .bg-navy .eyebrow, .statband .eyebrow, .page-hero .eyebrow { color: var(--brass); }
.eyebrow::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background: var(--red);
  -webkit-mask: var(--reticle-mask) center / contain no-repeat;
          mask: var(--reticle-mask) center / contain no-repeat;
}

/* ---------- Reticle (the signature mark) ---------- */
:root {
  --reticle-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23000' stroke-width='9'%3E%3Ccircle cx='50' cy='50' r='30'/%3E%3C/g%3E%3Cg stroke='%23000' stroke-width='9'%3E%3Cline x1='50' y1='1' x2='50' y2='15'/%3E%3Cline x1='50' y1='85' x2='50' y2='99'/%3E%3Cline x1='1' y1='50' x2='15' y2='50'/%3E%3Cline x1='85' y1='50' x2='99' y2='50'/%3E%3C/g%3E%3Cpath d='M62 39 A15 15 0 1 0 62 61' fill='none' stroke='%23000' stroke-width='10'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--red); --btn-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 13px 26px; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1.5px solid var(--btn-bd);
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
/* Focus rings use red, not brass: brass is only ~2.3:1 against the site's light
   backgrounds (fails WCAG 3:1 non-text contrast); red clears 3:1 on every surface. */
.btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.btn--primary { box-shadow: 0 8px 20px rgba(237,0,5,.22); }
.btn--primary:hover { background: var(--red-dark); box-shadow: 0 12px 26px rgba(237,0,5,.28); }

.btn--dark { --btn-bg: var(--charcoal); --btn-fg: #fff; }
.btn--dark:hover { background: #2a2e38; }

.btn--outline { --btn-bg: transparent; --btn-fg: var(--charcoal); --btn-bd: var(--line-strong); }
.btn--outline:hover { --btn-bd: var(--charcoal); background: rgba(28,31,38,.04); }
.on-dark .btn--outline, .bg-dark .btn--outline, .bg-navy .btn--outline,
.hero .btn--outline, .page-hero .btn--outline, .ctaband .btn--outline, .statband .btn--outline { --btn-fg: #fff; --btn-bd: rgba(255,255,255,.32); }
.on-dark .btn--outline:hover, .bg-dark .btn--outline:hover, .bg-navy .btn--outline:hover,
.hero .btn--outline:hover, .page-hero .btn--outline:hover, .ctaband .btn--outline:hover, .statband .btn--outline:hover { background: rgba(255,255,255,.08); --btn-bd: rgba(255,255,255,.6); }

.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--sm { padding: 9px 18px; font-size: 0.86rem; }
.btn--wide { width: 100%; }

/* Text link with arrow */
.tlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--red);
}
.tlink .arrow { transition: transform .2s var(--ease); }
.tlink:hover .arrow { transform: translateX(4px); }
.tlink:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247,246,243,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: var(--s-6); height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.brand__mark { width: 20px; height: 20px; flex: none; }
.brand__word {
  font-weight: 500; letter-spacing: 0.12em; font-size: 1.06rem;
  text-transform: uppercase; color: var(--charcoal); line-height: 1;
  margin-left: -5px;      /* fuse the open reticle-C against the R so the lockup reads CROSSMARK */
  margin-right: -0.12em;  /* cancel trailing tracking space */
}
.brand:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 6px; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  font-size: 0.92rem; font-weight: 600; color: var(--ink-soft);
  padding: 8px 13px; border-radius: 8px; position: relative;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.nav a:hover { color: var(--charcoal); background: rgba(28,31,38,.04); }
.nav a:focus-visible, .footer-links a:focus-visible, .crumbs a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.nav a[aria-current="page"] { color: var(--charcoal); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px;
  background: var(--red); border-radius: 2px;
}
.nav__cta { margin-left: var(--s-4); }

.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--white); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--charcoal);
  border-radius: 2px; transition: transform .22s var(--ease), opacity .18s var(--ease);
}
.nav-toggle span::before { position: absolute; transform: translateY(-6px); }
.nav-toggle span::after { position: absolute; transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 4px; background: var(--off-white); border-bottom: 1px solid var(--line);
    padding: var(--s-4) var(--s-6) var(--s-8); margin: 0;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .24s var(--ease), opacity .2s var(--ease);
    box-shadow: var(--shadow-2);
  }
  .nav[data-open="true"] { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 12px 8px; font-size: 1.05rem; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav__cta { margin: var(--s-3) 0 0; }
  .nav__cta .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #C9CFD8; padding-block: var(--s-16) var(--s-8); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s-8); }
.site-footer .brand__word { color: #fff; }
.site-footer .footer-head {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--brass); font-weight: 500; margin-bottom: var(--s-4);
}
/* Mono micro-label (non-heading), e.g. the "Direct" label on contact */
.microlabel {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--slate); font-weight: 500;
}
.site-footer a { color: #C9CFD8; font-size: 0.95rem; transition: color .15s var(--ease); }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-bottom {
  margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); align-items: center;
  justify-content: space-between; font-size: 0.82rem; color: #8A93A0;
}
.footer-entities { display: flex; flex-wrap: wrap; gap: var(--s-6); }
.footer-entities span strong { color: #C9CFD8; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reusable components ---------- */

/* Card */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-panel);
  box-shadow: var(--shadow-1); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card--pad { padding: clamp(24px, 3vw, 38px); }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--line-strong); }

/* Grid utilities */
.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }

/* Section head */
.section-head { max-width: 56ch; }
.section-head.center { margin-inline: auto; }
.section-head .eyebrow { margin-bottom: var(--s-4); }
.section-head p { margin-top: var(--s-4); color: var(--ink-soft); font-size: 1.075rem; }

/* Icon tile (line icons on soft stone) */
.icon-tile {
  width: 52px; height: 52px; border-radius: var(--r-tile); flex: none;
  background: var(--stone); display: grid; place-items: center; color: var(--charcoal);
}
.icon-tile svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-tile--red { color: var(--red); }

/* Reticle bullet */
.rlist { list-style: none; padding: 0; }
.rlist li { position: relative; padding-left: 30px; margin-bottom: var(--s-3); }
.rlist li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 16px; height: 16px;
  background: var(--red);
  -webkit-mask: var(--reticle-mask) center / contain no-repeat; mask: var(--reticle-mask) center / contain no-repeat;
}

/* Pill / tag */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 14px; border-radius: var(--r-pill); background: var(--stone); color: var(--slate);
}
.tag--red { background: rgba(237,0,5,.08); color: var(--red); }
.on-dark .tag { background: rgba(255,255,255,.08); color: #D7DDE4; }

/* Stat */
.stat__num { font-weight: 900; font-size: clamp(2.4rem, 4vw, 4.1rem); line-height: 1; letter-spacing: -0.02em; }
.stat__label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate); margin-top: 10px; }
.on-dark .stat__label, .bg-navy .stat__label, .statband .stat__label { color: #9FB0C4; }

/* Logo cell (brand logos on white) */
.logo-cell {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-tile);
  display: grid; place-items: center; padding: 22px; min-height: 120px;
}
.logo-cell img { max-height: 62px; width: auto; object-fit: contain; }

/* Divider */
.rule { height: 1px; background: var(--line); border: 0; }
.on-dark .rule { background: rgba(255,255,255,.12); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); font-weight: 500; }
.field label .req { color: var(--red); }
.input, .select, .textarea {
  font-family: var(--font-display); font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line-strong); border-radius: 12px;
  padding: 13px 15px; width: 100%; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.textarea { min-height: 130px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--charcoal); box-shadow: 0 0 0 4px rgba(28,31,38,.08);
}
.input:user-invalid, .select:user-invalid, .textarea:user-invalid {
  border-color: var(--red); box-shadow: 0 0 0 4px rgba(237,0,5,.08);
}
.input::placeholder, .textarea::placeholder { color: #6B7280; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5, 20px); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

/* Checkbox chips (multi-select interest) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 9px 16px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong); font-size: 0.88rem; font-weight: 600; color: var(--slate);
  transition: all .15s var(--ease); cursor: pointer;
}
@media (pointer: coarse) {
  .chip span { padding: 12px 18px; }
  .chips { gap: 12px; }
}
.chip input:hover + span { border-color: var(--charcoal); color: var(--charcoal); }
.chip input:checked + span { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

/* Note / callout */
.note {
  border: 1px solid rgba(201,161,91,.45); background: rgba(201,161,91,.08);
  padding: var(--s-4) var(--s-6); border-radius: var(--r-tile);
  font-size: 0.95rem; color: var(--ink-soft);
}
.note strong { color: var(--ink); }

/* Breadcrumb */
.crumbs { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); display: flex; gap: 10px; align-items: center; }
.crumbs a:hover { color: var(--charcoal); }
.crumbs .sep { color: var(--line-strong); }

/* Grid backdrop (subtle, for dark heroes) */
.grid-bg { position: absolute; inset: 0; pointer-events: none; opacity: .5; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .07s; }
.reveal[data-delay="2"] { transition-delay: .14s; }
.reveal[data-delay="3"] { transition-delay: .21s; }
.reveal[data-delay="4"] { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Visually hidden (kept in the a11y tree, e.g. form spam-honeypot fields) */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--charcoal); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }
