/* Nash Pay — public site.
   Paper and ink, one vermilion accent. Serif display for an institutional
   voice; no third-party fonts are fetched, so the stacks below lean on the
   best faces each OS already ships (Songti / Noto Serif CJK for Chinese,
   Hind Siliguri / Noto Bengali for Bangla). */
:root {
  --paper: #f5f3ee;
  --paper-2: #ece9e1;
  --ink: #111418;
  --ink-2: #2a2f36;
  --muted: #5d636d;
  --rule: #d8d3c7;
  --rule-strong: #b9b2a3;
  --red: #c23a1e;
  --red-ink: #9e2c14;
  --night: #0f1215;
  --night-2: #171b20;
  --night-rule: #2a3038;

  /* NP * faces are self-hosted (assets/fonts.css); each is limited by
     unicode-range, so the stack falls through per script: Latin, then
     Chinese, then Bangla, then whatever the OS has. */
  --serif: "NP Serif", "NP Serif SC", "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
  --sans: "NP Sans", "NP Bangla", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
::selection { background: var(--red); color: #fff; }
/* One visible focus style for keyboard users, on light and dark sections. */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.ink :focus-visible, .footer :focus-visible { outline-color: #f0b49f; }

.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 10; background: var(--ink); color: var(--paper); padding: 6px 10px; }

/* ---------------------------------------------------------------- nav --- */
.nav { position: sticky; top: 0; z-index: 5; background: rgba(245, 243, 238, 0.92); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--rule); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand .mark { width: 26px; height: 26px; color: var(--ink); }
.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a { text-decoration: none; font-size: 14.5px; color: var(--ink-2); }
.nav-links a:hover { color: var(--red); }
.lang { display: flex; margin-left: auto; gap: 2px; }
.lang button { background: none; border: 0; padding: 4px 7px; font: 13px var(--sans); color: var(--muted); cursor: pointer; border-bottom: 1.5px solid transparent; }
.lang button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--red); }
.nav-cta { text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 14px; border: 1px solid var(--ink); border-radius: 3px; white-space: nowrap; }
.nav-cta:hover { background: var(--ink); color: var(--paper); }

/* --------------------------------------------------------------- hero --- */
.hero { padding: 72px 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 64px; align-items: end; }
.kicker { margin: 0 0 22px; font-size: 14px; color: var(--red-ink); font-weight: 600; }
.kicker::before { content: ""; display: inline-block; width: 22px; height: 1.5px; background: var(--red); vertical-align: middle; margin-right: 10px; }
h1 { font: 400 clamp(40px, 5.6vw, 72px)/1.04 var(--serif); letter-spacing: -0.022em; margin: 0 0 26px; max-width: 13ch; }
h2 { font: 400 clamp(30px, 3.4vw, 42px)/1.1 var(--serif); letter-spacing: -0.015em; margin: 0 0 14px; }
h3 { font: 600 17px/1.35 var(--sans); margin: 0; }
/* Even line lengths in headings, no one-word last lines. */
h1, h2, .rows h3 { text-wrap: balance; }
.lead, .sec-sub { text-wrap: pretty; }
.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 34em; margin: 0 0 34px; }
.cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; padding: 14px 22px; border-radius: 3px; font-weight: 600; font-size: 15px; }
.btn:hover { background: var(--red); }
.link { text-decoration: none; font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; }
.link:hover { color: var(--red); border-bottom-color: var(--red); }
.hero-foot { margin: 64px 0 0; padding: 18px 0; border-top: 1px solid var(--ink); font: 13px var(--mono); color: var(--muted); letter-spacing: 0.04em; }
.hero-foot span { color: var(--rule-strong); margin: 0 10px; }

/* Phone checkout mock — the one picture on the page, so it is a real screen. */
.phone { margin: 0; justify-self: end; width: 100%; max-width: 300px; background: var(--ink); border-radius: 38px; padding: 10px; box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 40px 80px -30px rgba(17,20,24,0.55), 0 18px 30px -18px rgba(17,20,24,0.4); transform: translateY(24px); }
.phone-screen { background: #fff; border-radius: 30px; padding: 16px 18px 20px; color: var(--ink); font-size: 13px; }
.ph-top { display: flex; justify-content: space-between; font-weight: 600; font-size: 12px; margin-bottom: 18px; }
.ph-bars { width: 34px; height: 10px; background: linear-gradient(90deg, var(--ink) 0 22%, transparent 22% 28%, var(--ink) 28% 50%, transparent 50% 56%, var(--ink) 56% 78%, transparent 78% 84%, #c9c9c9 84%); border-radius: 2px; }
.ph-merchant { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid #ececec; }
.ph-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #1f5a45; color: #fff; font: 700 15px var(--serif); }
.ph-name { font-weight: 600; font-size: 14px; }
.ph-order { color: #6b6b6b; font-size: 12px; }
.ph-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; }
.ph-total span { color: #6b6b6b; }
.ph-total b { font: 600 24px var(--sans); letter-spacing: -0.02em; }
.ph-label { color: #6b6b6b; font-size: 12px; margin-bottom: 8px; }
.ph-methods { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.ph-methods li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e6e6e6; border-radius: 10px; font-weight: 600; }
.ph-methods li i { width: 18px; height: 18px; border-radius: 5px; }
.ph-methods .radio { margin-left: auto; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c8c8c8; }
.ph-methods li.on { border-color: var(--ink); }
.ph-methods li.on .radio { border: 5px solid var(--ink); }
.ph-pay { background: var(--ink); color: #fff; text-align: center; padding: 12px; border-radius: 10px; font-weight: 600; }
.ph-secured { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 12px; color: #737373; font-size: 11px; }
.ph-secured svg { width: 10px; height: 10px; }

/* ----------------------------------------------------------- sections --- */
.section { padding: 104px 0; border-top: 1px solid var(--rule); }
.section.tint { background: var(--paper-2); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: end; margin-bottom: 48px; }
.sec-sub { color: var(--muted); font-size: 17px; max-width: 30em; margin: 0 0 24px; }
.sec-head .sec-sub { margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 80px; align-items: start; }
.fine { color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* Numbered rows instead of a card grid */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.rows li { display: grid; grid-template-columns: 72px minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.rows .num { font: 13px var(--mono); color: var(--red); }
.rows h3 { font: 400 24px/1.2 var(--serif); letter-spacing: -0.01em; }
.rows p { margin: 0; color: var(--ink-2); }

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 16px 12px 16px 0; border-bottom: 1px solid var(--rule); }
.table thead th { font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--ink); padding-top: 0; }
.table tbody th { font-weight: 600; }
.table tbody th i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 10px; }
.table td.yes::before { content: "●"; color: #2f7d4f; font-size: 9px; margin-right: 8px; vertical-align: 2px; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.timeline li { padding: 22px 28px 0 0; position: relative; }
.timeline li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 50%; }
.timeline li:first-child::before { background: var(--red); border-color: var(--red); }
.timeline .num { display: block; font: 13px var(--mono); color: var(--muted); margin-bottom: 10px; }
.timeline h3 { margin-bottom: 6px; }
.timeline p { margin: 0; color: var(--ink-2); font-size: 15px; }

.defs { margin: 0; border-top: 1px solid var(--ink); }
.defs > div { padding: 22px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; }
.defs dt { font-weight: 600; }
.defs dd { margin: 0; color: var(--ink-2); }

/* Developers — the one dark block */
.ink { background: var(--night); color: #e7e4dc; border-top: 0; }
.ink .sec-sub, .ink .fine { color: #9aa0a8; }
.list { list-style: none; padding: 0; margin: 28px 0; border-top: 1px solid var(--night-rule); }
.list li { padding: 14px 0 14px 22px; border-bottom: 1px solid var(--night-rule); position: relative; }
.list li::before { content: ""; position: absolute; left: 0; top: 23px; width: 8px; height: 1.5px; background: var(--red); }
.code { border: 1px solid var(--night-rule); border-radius: 4px; background: var(--night-2); overflow: hidden; }
.code-tabs { font: 12px var(--mono); color: #8a919a; padding: 10px 16px; border-bottom: 1px solid var(--night-rule); }
.code pre { margin: 0; padding: 18px 16px; overflow-x: auto; font: 13px/1.7 var(--mono); color: #c9cdd3; }
.code pre + .code-tabs { border-top: 1px solid var(--night-rule); }
.code b { color: #f0b49f; font-weight: 600; }

.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.contact-list li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.contact-list .label { font-size: 13.5px; color: var(--muted); }
.contact-list .value { font: 400 22px/1.35 var(--serif); text-decoration: none; word-break: break-word; }
.contact-list a.value[href]:hover { color: var(--red); }
.contact-list .value.pending { color: var(--muted); font-style: italic; }

/* ------------------------------------------------------------- footer --- */
.footer { background: var(--ink); color: #c9c6be; padding: 64px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer .brand, .footer .brand .mark { color: var(--paper); }
.footer .foot-h { margin: 0 0 14px; font: 600 13px/1.4 var(--sans); letter-spacing: 0; color: var(--paper); }
.footer a:not(.brand) { display: block; text-decoration: none; font-size: 14px; margin-bottom: 8px; color: #a7a49c; }
.footer a:not(.brand):hover { color: var(--paper); }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 20px; border-top: 1px solid #2c3036; font-size: 12.5px; color: #8b8881; }

/* ------------------------------------------------------------- motion --- */
.reveal { opacity: 0; animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.hero-copy .reveal:nth-child(2) { animation-delay: 0.06s; }
.hero-copy .reveal:nth-child(3) { animation-delay: 0.12s; }
.hero-copy .reveal:nth-child(4) { animation-delay: 0.18s; }
.phone.reveal { animation-delay: 0.22s; }
@keyframes rise { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* -------------------------------------------------------- languages --- */
html[data-lang="zh"] body, html[data-lang="bn"] body { line-height: 1.75; }
html[data-lang="zh"] h1, html[data-lang="bn"] h1 { line-height: 1.22; max-width: 15ch; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] .rows h3 { font-weight: 600; letter-spacing: 0; }
html[data-lang="bn"] h1, html[data-lang="bn"] h2, html[data-lang="bn"] .rows h3,
html[data-lang="bn"] .contact-list .value { font-family: var(--sans); font-weight: 600; letter-spacing: 0; }

/* ------------------------------------------------------------ layout --- */
@media (max-width: 960px) {
  .wrap { padding: 0 24px; }
  .hero-grid, .split, .sec-head { grid-template-columns: 1fr; gap: 40px; }
  .phone { justify-self: start; transform: none; }
  .nav-links { display: none; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 0; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .nav-inner { gap: 12px; }
  .nav-cta { display: none; }
  .hero { padding-top: 48px; }
  .rows li { grid-template-columns: 40px minmax(0, 1fr); }
  .rows li p { grid-column: 2; }
  .defs > div, .contact-list li { grid-template-columns: 1fr; gap: 6px; }
  .timeline { grid-template-columns: 1fr; }
  .hero-foot span { margin: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; }
}
