/* Site shell v3 — structure and rhythm modelled on a modern API-gateway landing page.
   Layout system only: type scale, spacing, grids, radii, dividers. No third-party assets. */

.catalog-home {
  --v3-ink: #14152a;
  --v3-body: #55586e;
  --v3-muted: #8a8ca0;
  --v3-line: #e8e7f2;
  --v3-line-strong: #d9d7ea;
  --v3-violet: #6b4bf5;
  --v3-wash: #f6f4ff;
  --v3-radius: 18px;
  --v3-gutter: 24px;
  --v3-max: 1180px;
  background: #fff;
}

/* ---------- shell section rhythm ---------- */
/* longhands only: the shorthand would zero the .wrap side gutters */
.catalog-home main > section { padding-top: 104px; padding-bottom: 104px; }
.catalog-home main > section + section { border-top: 0; }
.catalog-home .hero-v3 { padding: 76px 0 88px; }
.catalog-home .wrap { max-width: var(--v3-max); }

/* horizontal stat bar: thin dividers, compact numerals */
.catalog-home .hero-stats {
  margin-top: 56px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.catalog-home .hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px;
  border: 0;
  border-left: 1px solid var(--v3-line);
  background: none;
}
.catalog-home .hero-stats > div:first-child { border-left: 0; }
.catalog-home .hero-stats strong {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--v3-ink);
}
.catalog-home .hero-stats span {
  color: var(--v3-muted);
  font-size: 12px;
  line-height: 1.4;
}

.catalog-home .section-heading { gap: 24px; align-items: flex-end; }
.catalog-home .section-kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--v3-violet);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.catalog-home .section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.1vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--v3-ink);
}
.catalog-home .section-heading p {
  max-width: 560px;
  margin: 0;
  color: var(--v3-body);
  font-size: 15.5px;
  line-height: 1.65;
}

/* ---------- quiet logo strip ----------
   One band per row, label in a fixed column so every language starts its list
   at the same x. The names wrapper dissolves (display:contents) so the "···"
   button always flows after the last provider instead of wrapping alone. */
.catalog-home .provider-bands {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding-top: 26px !important;
  padding-bottom: 26px !important;
  border-top: 1px solid var(--v3-line);
  border-bottom: 1px solid var(--v3-line);
}
.catalog-home .provider-band {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  align-items: center;
  gap: 8px 20px;
  padding: 10px 0;
  border: 0;
  background: none;
}
.catalog-home .provider-band + .provider-band { border-top: 1px solid var(--v3-line); }
.catalog-home .provider-band-label {
  flex: 0 0 auto;
  color: var(--v3-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.catalog-home .provider-band-names { display: contents; }
.catalog-home .provider-band > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 22px;
  min-width: 0;
  color: #7d7f94;
  font-size: 13.5px;
  font-weight: 600;
}
.catalog-home .provider-band > div span { opacity: 0.85; }
.catalog-home .provider-band > div span:hover { opacity: 1; color: var(--v3-ink); }
.catalog-home .provider-band button { flex: 0 0 auto; }
/* keep the "browse all" affordance on the right edge of the list line */
.catalog-home .provider-band .provider-band-more { flex: 0 0 auto; align-self: center; margin-left: auto; }


/* ---------- feature grid ---------- */
.v3-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.v3-feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 26px 24px;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.v3-feature:hover {
  border-color: var(--v3-line-strong);
  box-shadow: 0 14px 34px -22px rgba(31, 25, 90, 0.35);
  transform: translateY(-2px);
}
.v3-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--v3-wash);
  color: var(--v3-violet);
}
.v3-feature-icon svg { width: 18px; height: 18px; }
.v3-feature h3 {
  margin: 0;
  color: var(--v3-ink);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.v3-feature p {
  margin: 0;
  color: var(--v3-body);
  font-size: 13.8px;
  line-height: 1.6;
}
.v3-feature a {
  margin-top: auto;
  padding-top: 10px;
  color: var(--v3-violet);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.v3-feature a:hover { text-decoration: underline; }

/* ---------- numbered capability rows ---------- */
.integration-layout { align-items: start; gap: 56px; }
.integration-list { display: grid; gap: 14px; }
.integration-list article {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  background: #fff;
}
.integration-list article:hover { border-color: var(--v3-line-strong); }
.integration-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--v3-wash);
  color: var(--v3-violet);
  font-size: 15px;
}
.integration-list h3 { margin: 0 0 4px; font-size: 15px; color: var(--v3-ink); }
.integration-list p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--v3-body); }
.integration-badge {
  border-radius: 999px;
  padding: 5px 10px;
  background: #edf9f1;
  color: #1c7a45;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.integration-badge.pending { background: #fff5e6; color: #966012; }

/* ---------- onboarding steps ---------- */
.onboarding-steps { gap: 14px; }
.onboarding-steps li {
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  padding: 24px 22px;
  background: #fff;
}
.onboarding-steps li:hover { border-color: var(--v3-line-strong); }
.step-number {
  color: var(--v3-violet);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ---------- pricing ---------- */
.catalog-home .plans { gap: 18px; }
.catalog-home .plan-card {
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-radius);
  box-shadow: none;
}
.catalog-home .plan-card:hover { border-color: var(--v3-line-strong); }
.catalog-home .topup {
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-radius);
  background: #fbfaff;
}

/* ---------- FAQ ---------- */
.home-faq .faq-layout { gap: 56px; align-items: start; }
.home-faq .faq { border-top: 1px solid var(--v3-line); }
.home-faq .faq-item {
  border: 0;
  border-bottom: 1px solid var(--v3-line);
  border-radius: 0;
  background: none;
  padding: 0;
}
.home-faq .faq-item summary {
  padding: 20px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--v3-ink);
}
.home-faq .faq-item .ans { padding: 0 4px 20px; font-size: 14px; line-height: 1.7; color: var(--v3-body); }

/* ---------- closing CTA ---------- */
.home-final {
  margin: 0 auto 40px;
  max-width: var(--v3-max);
  border-radius: 24px;
  background: #14152a;
  color: #fff;
  padding: 56px 48px;
}
.home-final .section-kicker { color: #a99cf0; }
.home-final h2 { color: #fff; margin: 0 0 10px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.02em; }
.home-final p { color: #b9b7cf; margin: 0; }
.home-final .btn-primary { background: #fff; color: #14152a; }
.home-final .btn-ghost { border-color: rgba(255, 255, 255, 0.32); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .catalog-home main > section { padding-top: 64px; padding-bottom: 64px; }
  .catalog-home .provider-bands { padding-top: 12px !important; padding-bottom: 12px !important; }
  .catalog-home .provider-band { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 12px 0; }
  .catalog-home .provider-band-label { font-size: 10.5px; letter-spacing: 0.11em; }
  .v3-features { grid-template-columns: 1fr 1fr; }
  .home-final { margin: 0 16px 32px; padding: 36px 24px; }
  .integration-layout, .home-faq .faq-layout { gap: 28px; }
}
@media (max-width: 640px) {
  .catalog-home .hero-stats { grid-template-columns: 1fr 1fr; }
  .catalog-home .hero-stats > div:nth-child(3) { border-left: 0; }
  .catalog-home .hero-stats > div:nth-child(n+3) { border-top: 1px solid var(--v3-line); }
  .v3-features { grid-template-columns: 1fr; }
  .integration-list article { grid-template-columns: 40px 1fr; }
  .integration-badge { grid-column: 2; justify-self: start; }
  .shell-announce { font-size: 11.5px; padding: 8px 14px; }
  .shell-announce span { display: none; }
}

/* ---------- long-translation adaptations (6 locales) ----------
   Longer Thai / Vietnamese / Malay strings must wrap, never squeeze a fixed
   track or paint outside the viewport. */
.catalog-home .hero-v3-grid { grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); }
.catalog-home .hero-copy,
.catalog-home .hero-explorer { min-width: 0; }
.catalog-home .hero-v3 .explorer-top { flex-wrap: wrap; row-gap: 4px; }
.catalog-home .hero-v3 .explorer-model > div { min-width: 0; }
.catalog-home .hero-v3 .explorer-model h2 { overflow-wrap: break-word; }
.catalog-home .hero-v3 .explorer-bottom { flex-wrap: wrap; row-gap: 6px; }
.catalog-home .hero-v3 .explorer-bottom a { white-space: nowrap; }
.catalog-home .hero-v3 .explorer-rates span { line-height: 1.45; }
.catalog-home .hero-stats span { line-height: 1.45; }
/* family card: let the title block shrink so the region badge never stacks */
.catalog-home .family-card header > div { min-width: 0; }
.catalog-home .family-region { flex: 0 0 auto; white-space: nowrap; }
.catalog-home .home-final .hero-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1024px) {
  .catalog-home .hero-v3-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .catalog-home .home-final .hero-actions { justify-content: flex-start; }
  .lang-picker select { max-width: 124px; }
}
/* phones: tighten the provider row so the name list and "···" stay on one line */
@media (max-width: 440px) {
  .catalog-home .provider-band > div { gap: 2px 12px; }
  .catalog-home .provider-band button { font-size: 12.5px; padding: 5px 0; min-height: 32px; }
  .catalog-home .provider-band .provider-band-more { width: 28px; font-size: 20px; letter-spacing: 1px; }
}
/* Thai stacks vowel and tone marks above/below the baseline: give headings and
   small labels a little more leading so lines never touch. */
html:lang(th) .catalog-home .section-heading h2,
html:lang(th) .catalog-home .home-final h2 { line-height: 1.22; }
html:lang(th) .catalog-home .v3-feature h3,
html:lang(th) .catalog-home .integration-list h3,
html:lang(th) .catalog-home .onboarding-steps h3 { line-height: 1.5; }
/* CJK and Thai do not need Latin uppercase tracking on kickers. */
html:lang(zh-CN) .catalog-home .section-kicker,
html:lang(zh-TW) .catalog-home .section-kicker,
html:lang(th) .catalog-home .section-kicker,
html:lang(th) .catalog-home .provider-band-label { letter-spacing: 0.05em; }

/* ---------- shared public-page shell ---------- */
.info-page {
  --v3-ink: #14152a;
  --v3-body: #55586e;
  --v3-line: #e8e7f2;
  --v3-violet: #6b4bf5;
  background: #fff;
}
.info-page .info-shell { background: #fff; padding: 56px 0 80px; }
.info-page .info-wrap { max-width: 1180px; }
.info-page .info-hero h1 { font-size: clamp(30px, 3.2vw, 40px); letter-spacing: -0.025em; }
.info-page .info-article { box-shadow: none; }
.info-page .info-section h2 { letter-spacing: -0.01em; }
.info-page h1 { letter-spacing: -0.02em; }
.info-page .info-card,
.info-page .policy-block {
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  box-shadow: none;
}
.info-page a { color: var(--v3-violet); }
