/* BrokerOps Landing — custom styles layered on top of Tailwind utilities. */

:root {
  --royal: #003399;
  --royal-700: #002277;
  --royal-50: #eef2fa;
  --royal-25: #f7f9fd;
  --gold: #c9a84c;
  --gold-soft: #e3c87a;
  --gold-50: #faf3df;
  --parchment: #faf8f3;
  --ink: #0a0a0a;
  --ink-2: #1f2433;
  --muted: #5d6479;
  --line: #e6e3da;
  --line-strong: #c8cbd6;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", "Noto Sans HK", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  color: var(--ink-2);
  background: var(--parchment);
}

[data-lang="zh-Hant"] body {
  font-family: "Noto Sans HK", "Inter", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

/* Display type — paired serif for premium fintech feel */
.font-display {
  font-family: "Fraunces", "Source Han Serif TC", "Songti TC", "PingFang TC", serif;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  letter-spacing: -0.02em;
  font-weight: 460;
}
[data-lang="zh-Hant"] .font-display {
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Eyebrow label — tracked-out small caps */
.eyebrow {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--royal);
}
.eyebrow.on-dark { color: var(--gold); }

/* Section badge — large, semantically colored. Cannot be mistaken for product feature. */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: "Inter", "Noto Sans HK", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  border: 1px solid;
  margin-bottom: 18px;
}
.section-badge i { width: 14px; height: 14px; flex-shrink: 0; }
.section-badge-problem    { background: #fdf6e7; color: #8a5a13; border-color: #ecd9a3; }
.section-badge-product    { background: var(--royal-50); color: var(--royal); border-color: #c8d6f0; }
.section-badge-compliance { background: var(--gold-50); color: #7a5a10; border-color: var(--gold-soft); }
.section-badge-commercial { background: #f4f1e8; color: #5d6479; border-color: #d8d2bf; }
.section-badge-faq        { background: #fff; color: var(--ink-2); border-color: var(--line-strong); }

/* Before/After comparison card (used in problem section) */
.ba-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 220ms ease;
}
.ba-card:hover { border-color: #c4cbe0; box-shadow: 0 14px 32px -24px rgba(15,23,42,0.18); }
.ba-card-head {
  padding: 14px 20px;
  background: #fdf6e7;
  border-bottom: 1px solid #ecd9a3;
  display: flex; align-items: center; gap: 14px;
}
.ba-card-head .num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #8a5a13;
}
.ba-card-head h3 { font-size: 15.5px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; }
.ba-cell { padding: 18px 20px 20px; }
.ba-cell.now { background: #fafaf4; border-right: 1px solid var(--line); }
.ba-cell.after { background: #fff; }
.ba-cell .label {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 7px;
  display: inline-block;
}
.ba-cell.now .label { color: #8a5a13; }
.ba-cell.after .label { color: var(--royal); }
.ba-cell p { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.ba-cell.now p { color: #6b7280; }
@media (max-width: 640px) {
  .ba-grid { grid-template-columns: 1fr; }
  .ba-cell.now { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Logo marquee — horizontal continuous scroll */
.logo-marquee {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 6%, black 94%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, black 6%, black 94%, transparent 100%);
}
.logo-marquee-track {
  display: flex;
  width: max-content;
  animation: logo-marquee-scroll 42s linear infinite;
  will-change: transform;
}
.logo-marquee:hover .logo-marquee-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .logo-marquee-track { animation: none; }
}
@keyframes logo-marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.logo-mq-tile {
  flex: 0 0 auto;
  width: 184px;
  min-height: 132px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  border-right: 1px solid var(--line);
  background: #fff;
}
.logo-mq-tile .name {
  font-family: "Fraunces", "Source Han Serif TC", serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}
.logo-mq-tile .name-zh {
  font-size: 11px;
  color: #9aa0b3;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

/* Sticky nav transitions */
#site-nav {
  transition: background 240ms ease, border-color 240ms ease, backdrop-filter 240ms ease;
}
#site-nav.scrolled {
  background: rgba(250, 248, 243, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}

/* Buttons — shadcn-inspired */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 14px;
  line-height: 1;
  transition: transform 120ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
}
.btn-primary:hover {
  background: var(--royal);
  border-color: var(--royal);
}
.btn-royal {
  background: var(--royal);
  color: #fff;
  border: 1px solid var(--royal);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 4px 14px -8px rgba(0,51,153,0.55);
}
.btn-royal:hover { background: var(--royal-700); border-color: var(--royal-700); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}
.btn-ghost:hover { background: #fff; border-color: var(--ink-2); }
.btn-link {
  background: transparent;
  color: var(--ink-2);
  padding: 8px 0;
}
.btn-link:hover { color: var(--royal); }

/* Subtle pixel border */
.pixel-border {
  border: 1px solid var(--line);
  background: #fff;
}

/* Hero background mesh — subtle, geometric, NOT a pastel blob */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(0,51,153,0.06) 0%, transparent 65%),
    radial-gradient(50% 40% at 100% 100%, rgba(201,168,76,0.10) 0%, transparent 60%),
    repeating-linear-gradient(0deg, rgba(10,10,10,0.025) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(10,10,10,0.025) 0 1px, transparent 1px 32px);
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}

/* Dotted accent (used in eyebrow rule) */
.rule-dot {
  height: 1px;
  width: 32px;
  background-image: linear-gradient(to right, var(--royal) 33%, transparent 0%);
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

/* Ledger row look for narrative blocks */
.ledger {
  border-top: 1px solid var(--line);
}
.ledger > * {
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 160ms ease, transform 220ms ease, box-shadow 220ms ease;
}
.card:hover {
  border-color: #c4cbe0;
  box-shadow: 0 18px 40px -28px rgba(15,23,42,0.18);
}

/* Pricing card highlight */
.card-spot {
  background: linear-gradient(180deg, #ffffff 0%, #fdfbf3 100%);
  border-color: var(--gold-soft);
}

/* FAQ accordion */
[data-faq] {
  border-top: 1px solid var(--line);
}
[data-faq]:last-child { border-bottom: 1px solid var(--line); }
[data-faq] button {
  width: 100%;
  text-align: left;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  font-weight: 500;
  color: var(--ink);
  font-size: 16px;
}
[data-faq] [data-faq-body] {
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms ease, padding 320ms ease, opacity 240ms ease;
  opacity: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}
[data-faq].open [data-faq-body] {
  max-height: 360px;
  padding-bottom: 22px;
  opacity: 1;
}
[data-faq] .faq-plus {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 240ms ease, border-color 160ms ease, background 160ms ease;
}
[data-faq].open .faq-plus {
  transform: rotate(45deg);
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Product tabs */
[data-tab] {
  position: relative;
  padding: 12px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: color 160ms ease;
}
[data-tab].active {
  color: var(--ink);
}
[data-tab].active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--royal);
}
[data-panel] { display: none; }
[data-panel].active { display: block; }

/* Scroll fade */
[data-fade] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.6,.2,1);
}
[data-fade].in { opacity: 1; transform: translateY(0); }

/* Mobile nav panel */
#mobile-nav-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms ease;
}
#mobile-nav-panel.open { max-height: 480px; }

/* Logo strip */
.logo-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  background: #fff;
  letter-spacing: 0.02em;
}

/* Stat block */
.stat-value {
  font-family: "Fraunces", serif;
  font-weight: 460;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

/* Dashboard preview frame */
.dash-frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 30px 80px -40px rgba(15,23,42,0.35);
}
.dash-frame .browser-bar {
  height: 36px;
  background: #f5f3ec;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.dash-frame .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #d4d2cb;
}

/* Section spacing */
.section { padding: 96px 0; }
@media (max-width: 768px) { .section { padding: 64px 0; } }

/* Container */
/* Use padding-left/right (not shorthand) so utility classes like pt-* / pb-*
   can layer in vertical padding without being clobbered by the 0 shorthand. */
.container-pg { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 640px) { .container-pg { padding-left: 18px; padding-right: 18px; } }

/* Code-style chip */
.chip-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

/* Top announcement bar */
.announce-bar {
  background: #0e1219;
  color: #d3d6e0;
  font-size: 13px;
  border-bottom: 1px solid #1b2030;
}
.announce-bar a {
  color: var(--gold-soft);
  border-bottom: 1px dotted var(--gold-soft);
}

/* CTA section */
.cta-band {
  background:
    radial-gradient(60% 100% at 100% 0%, rgba(201,168,76,0.18) 0%, transparent 60%),
    radial-gradient(50% 80% at 0% 100%, rgba(0,51,153,0.55) 0%, transparent 60%),
    #0e1219;
  color: #fff;
}

/* Footer */
footer {
  background: #0e1219;
  color: #9ba1b3;
  font-size: 13.5px;
}
footer a:hover { color: #fff; }
footer h4 { color: #fff; font-weight: 500; font-size: 13px; letter-spacing: 0.02em; }

/* Tiny utility icon container */
.icon-wrap {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--royal-50);
  color: var(--royal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-wrap-dark {
  background: rgba(255,255,255,0.06);
  color: var(--gold-soft);
}

/* BrokerCore onboarding waterfall — zig-zag nodes + connecting arrows
   with multi-color animated gradient borders. Always-visible thin border
   via pseudo-element + mask-composite technique. */
.bc-waterfall {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
.bc-wf-row { display: flex; }
.bc-wf-row.left  { justify-content: flex-start; padding-left:  4px; }
.bc-wf-row.right { justify-content: flex-end;   padding-right: 4px; }

/* Node pill — solid gold border, no animation */
.bc-wf-node {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1.2px solid var(--gold-500);
  opacity: 0;
  transform: translateY(6px);
  animation: bc-wf-fade .6s ease forwards;
}
.bc-wf-row:nth-of-type(1) .bc-wf-node { animation-delay: .05s; }
.bc-wf-row:nth-of-type(3) .bc-wf-node { animation-delay: .30s; }
.bc-wf-row:nth-of-type(5) .bc-wf-node { animation-delay: .55s; }
.bc-wf-row:nth-of-type(7) .bc-wf-node { animation-delay: .80s; }
@keyframes bc-wf-fade {
  to { opacity: 1; transform: translateY(0); }
}

.bc-wf-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--royal-50) 0%, var(--gold-50) 100%);
  color: var(--royal-500);
  flex-shrink: 0;
}
.bc-wf-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: -0.005em;
}

/* Connecting arrows — thinner stroke, varied per-arrow gradient via SVG <defs> */
.bc-wf-arrow {
  height: 42px;
  margin: -2px 0;
  position: relative;
  pointer-events: none;
}
.bc-wf-arrow svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bc-wf-arrow-path {
  fill: none;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-dasharray: 3 4;
  animation: bc-wf-flow 1.6s linear infinite;
}
.bc-wf-arrow-head { /* fill set per-arrow inline */ }
@keyframes bc-wf-flow {
  to { stroke-dashoffset: -14; }
}

@media (prefers-reduced-motion: reduce) {
  .bc-wf-node, .bc-wf-node::before { animation: none !important; }
  .bc-wf-node { opacity: 1; transform: none; }
  .bc-wf-arrow-path { animation: none; }
}

/* Subtle gold underline accent for inline emphasis */
.gold-mark {
  background-image: linear-gradient(transparent 68%, rgba(201,168,76,0.30) 68%, rgba(201,168,76,0.30) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 0.05em;
}

/* Honorific kicker rule used in section headers */
.section-rule {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.section-rule .line {
  width: 32px; height: 1px;
  background: var(--royal);
}
.cta-band .section-rule .line,
footer .section-rule .line { background: var(--gold-soft); }
