/* =========================================================
   Clear Trust — Bangkok USDT/USDC Cash Exchange
   清爽金融信任感 · White + Teal
   ========================================================= */
:root {
  --ink: #17202a;
  --ink-2: #243242;
  --muted: #647083;
  --muted-2: #8a94a3;
  --line: #dce3ea;
  --line-2: #e6ecf2;
  --paper: #ffffff;
  --bg: #eef3f7;
  --bg-2: #f5f8fb;
  --teal: #087f68;
  --teal-600: #0a6d5a;
  --teal-050: #e6f5f0;
  --teal-100: #d4efe6;
  --blue: #1f6fd1;
  --gold: #b56b18;
  --red: #c94848;
  --green-up: #0a8a5f;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(23, 37, 54, .06);
  --shadow: 0 14px 40px rgba(23, 37, 54, .10);
  --shadow-lg: 0 24px 60px rgba(15, 40, 34, .16);
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -8%, #e4f4ef 0%, rgba(228, 244, 239, 0) 60%),
    radial-gradient(900px 500px at -5% 5%, #eaf1f8 0%, rgba(234, 241, 248, 0) 55%),
    var(--bg);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-600);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #0b8a70, var(--teal));
  color: #fff;
  box-shadow: 0 10px 24px rgba(8, 127, 104, .28);
}
.btn.primary:hover { box-shadow: 0 14px 30px rgba(8, 127, 104, .36); }
.btn.secondary { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn.secondary:hover { border-color: #c3ccd6; }
.btn.ghost { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.45); color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.18); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; font-size: 13.5px; padding: 0 14px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 750;
  background: var(--teal-050);
  color: var(--teal-600);
  border: 1px solid var(--teal-100);
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--teal);
  box-shadow: 0 0 0 3px rgba(8,127,104,.16);
}
.pill.live .dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 850; font-size: 16.5px; }
.mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(150deg, #0c9077, var(--teal-600));
  color: #fff; font-weight: 850; font-size: 15px;
  box-shadow: 0 6px 16px rgba(8,127,104,.32);
}
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 650;
  transition: background .16s, color .16s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 800;
}
.lang button {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 11px; border-radius: 999px; color: var(--muted);
  font-weight: 800; font-family: inherit; font-size: 12.5px;
  transition: background .16s, color .16s;
}
.lang button.on { background: var(--teal-050); color: var(--teal-600); }

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px;
  background: var(--ink); border-radius: 2px; position: relative;
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 30px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.08;
  font-weight: 820;
  letter-spacing: -.01em;
  margin: 18px 0 16px;
}
.hero h1 .accent { color: var(--teal); }
.hero .lead {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 560px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; }
.trust-item { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 14px; font-weight: 650; }
.trust-item .ic {
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 8px; background: var(--teal-050); color: var(--teal-600);
}

/* Hero rate card */
.rate-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}
.rate-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.rate-card-head h3 { font-size: 15px; font-weight: 800; }
.updated { color: var(--muted-2); font-size: 12px; font-weight: 600; }
.hero-rate-list { margin-top: 8px; }
.hero-rate-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
}
.hero-rate-row:last-child { border-bottom: 0; }
.hero-rate-row .pair { font-weight: 800; font-size: 15px; }
.hero-rate-row .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.hrr-pair .spot { color: var(--muted-2); font-size: 11.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hrr-prices { display: flex; flex-direction: column; gap: 5px; }
.hrr-prices .pr { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; }
.hrr-prices .pl { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.hrr-prices b { font-size: 18px; font-weight: 820; font-variant-numeric: tabular-nums; }
.hrr-prices b.sell { color: var(--teal-600); }
.hrr-prices b.buy { color: var(--ink); }
.chg { font-size: 11px; font-weight: 750; }
.chg.up { color: var(--green-up); }
.chg.down { color: var(--red); }

/* Hero rate legend */
.rate-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin: 2px 0 6px; padding: 9px 12px;
  border-radius: 8px; background: var(--bg-2);
  color: var(--muted); font-size: 12px; font-weight: 650; line-height: 1.4;
}

/* Hero stats strip */
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden;
}
.hs { padding: 16px 20px; border-right: 1px solid var(--line-2); }
.hs:last-child { border-right: 0; }
.hs b { display: block; font-size: 16px; font-weight: 820; color: var(--ink); }
.hs span { font-size: 12.5px; color: var(--muted); }

/* How it works */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-card {
  position: relative;
  padding: 24px 22px 22px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.how-num {
  display: grid; place-items: center;
  width: 38px; height: 38px; margin-bottom: 14px;
  border-radius: 10px; font-size: 18px; font-weight: 850; color: #fff;
  background: linear-gradient(150deg, #0c9077, var(--teal-600));
  box-shadow: 0 6px 14px rgba(8,127,104,.28);
}
.how-card h4 { font-size: 16.5px; font-weight: 800; margin-bottom: 8px; }
.how-card p { color: var(--muted); font-size: 14px; line-height: 1.65; }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 18px 20px; font-weight: 760; font-size: 16px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: none; color: var(--teal-600); font-size: 24px; font-weight: 400;
  line-height: 1; transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 18px; margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* Segmented control */
.seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 14px;
}
.seg button {
  flex: 1; border: 0; background: transparent;
  padding: 11px 8px; border-radius: 7px;
  font-weight: 760; font-size: 14px; color: var(--muted);
  cursor: pointer; font-family: inherit; transition: background .15s, color .15s, box-shadow .15s;
}
.seg button.on { background: #fff; color: var(--teal-600); box-shadow: 0 1px 3px rgba(23,37,54,.10); }
.seg.small button { padding: 9px 8px; font-size: 14px; letter-spacing: .02em; }

/* Rate table buy/sell coloring */
.rate-table .sell-num { color: var(--teal-600); }
.rate-table .buy-num { color: var(--ink); }
.rate-table .spot-num { color: var(--muted); font-weight: 700; font-size: 14px; }
.mini-reserve { color: var(--gold); font-weight: 700; }

/* ---------- Section shell ---------- */
.section { padding: 46px 0; }
.section-head { max-width: 680px; margin-bottom: 26px; }
.section-head h2 {
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 12px 0 8px;
}
.section-head p { color: var(--muted); font-size: 16px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Rates board ---------- */
.rate-board { overflow: hidden; }
.rate-board-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg-2);
}
.rate-table { width: 100%; border-collapse: collapse; }
.rate-table th, .rate-table td { padding: 15px 22px; text-align: right; }
.rate-table th {
  color: var(--muted); font-size: 12.5px; font-weight: 750;
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--line-2);
}
.rate-table th:first-child, .rate-table td:first-child { text-align: left; }
.rate-table td { border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.rate-table tr:last-child td { border-bottom: 0; }
.rate-table .pair-name { font-weight: 800; font-size: 15px; }
.rate-table .pair-sub { color: var(--muted); font-size: 12px; font-weight: 600; }
.rate-table .num { font-weight: 800; font-size: 16px; }
.rate-table tbody tr:hover { background: var(--bg-2); }
.status-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 750;
  background: var(--teal-050); color: var(--teal-600);
}
.status-tag.reserve { background: #fff4e6; color: var(--gold); }
.rate-note { padding: 14px 22px; color: var(--muted); font-size: 12.5px; background: var(--bg-2); border-top: 1px solid var(--line-2); }

/* ---------- Tools grid (calc + fee) ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: start;
}
.tool { padding: 24px; }
.tool h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.tool .tool-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

.field { margin-bottom: 14px; }
.field > label {
  display: block; color: var(--muted); font-size: 12.5px; font-weight: 750;
  margin-bottom: 7px; letter-spacing: .01em;
}
.control {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .16s, box-shadow .16s;
}
.control:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,104,.14); }
.control input, .control select {
  border: 0; outline: 0; background: transparent; font-family: inherit;
  font-size: 16px; font-weight: 700; color: var(--ink); width: 100%;
}
.control select { cursor: pointer; }
.control .suffix { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.pair-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.swap-btn {
  width: 44px; height: 52px; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius-sm); cursor: pointer; display: grid; place-items: center;
  color: var(--teal-600); font-size: 18px; align-self: end;
  transition: background .16s, transform .2s;
}
.swap-btn:hover { background: var(--teal-050); }
.swap-btn.spin { transform: rotate(180deg); }

.receive-box {
  margin: 4px 0 16px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--teal-050), #f2fbf8);
  border: 1px solid var(--teal-100);
}
.receive-box small { color: var(--teal-600); font-size: 12.5px; font-weight: 750; }
.receive-box .amt { font-size: 30px; font-weight: 850; margin-top: 4px; font-variant-numeric: tabular-nums; }
.receive-box .rate-line { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.fee-result {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px; margin: 4px 0 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line);
}
.fee-result small { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.fee-result .fee-amt { font-size: 30px; font-weight: 850; color: var(--teal); font-variant-numeric: tabular-nums; }
.fee-rules { display: grid; gap: 10px; }
.fee-rule {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line-2);
}
.fee-rule:last-child { border-bottom: 0; }
.fee-rule .rdot { width: 10px; height: 10px; border-radius: 999px; }
.fee-rule strong { font-size: 14px; }
.fee-rule .rsub { color: var(--muted); font-size: 12px; }
.fee-rule b { font-weight: 820; font-variant-numeric: tabular-nums; }
.note { color: var(--muted); font-size: 12.5px; line-height: 1.6; }

/* ---------- Store / map ---------- */
.store-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.map-card { overflow: hidden; padding: 0; min-height: 360px; display: flex; flex-direction: column; }
.map-card iframe { border: 0; width: 100%; flex: 1; min-height: 300px; }
.map-foot { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line-2); }
.store-info { padding: 24px; display: flex; flex-direction: column; }
.store-info h3 { font-size: 20px; font-weight: 820; }
.info-row { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.info-row:last-of-type { border-bottom: 0; }
.info-row .ic {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; background: var(--teal-050); color: var(--teal-600); font-size: 17px;
}
.info-row .k { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.info-row .v { font-size: 15px; font-weight: 750; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .ic {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 12px; background: var(--teal-050); color: var(--teal-600);
  font-size: 22px; margin-bottom: 14px;
}
.feature h4 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* ---------- Contact ---------- */
.contact-band {
  background: linear-gradient(160deg, #0c8f76, var(--teal-600));
  border-radius: var(--radius-lg);
  padding: 34px;
  color: #fff;
  box-shadow: var(--shadow);
}
.contact-band .section-head h2 { color: #fff; }
.contact-band .section-head p { color: rgba(255,255,255,.82); }
.contact-band .eyebrow { color: rgba(255,255,255,.85); }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.contact-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
  transition: background .16s, transform .16s;
}
.contact-card:hover { background: rgba(255,255,255,.2); transform: translateY(-3px); }
.contact-card .ic { font-size: 20px; }
.contact-card .k { font-size: 12.5px; color: rgba(255,255,255,.82); font-weight: 700; }
.contact-card .v { font-size: 16px; font-weight: 800; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0 30px;
  color: var(--muted);
  font-size: 13.5px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner .brand { color: var(--ink); }
.footer-disc { max-width: 560px; margin-top: 14px; line-height: 1.6; font-size: 12.5px; color: var(--muted-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 650; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 100;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* mobile nav drawer */
.mobile-nav { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .header-actions .btn.desktop-only { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding: 34px 0 20px; }
  .tools-grid { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hs:nth-child(2) { border-right: 0; }
  .hs:nth-child(1), .hs:nth-child(2) { border-bottom: 1px solid var(--line-2); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .mobile-nav.open {
    display: block;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.96);
  }
  .mobile-nav a {
    display: block; padding: 14px 20px; font-weight: 700;
    border-bottom: 1px solid var(--line-2); color: var(--ink-2);
  }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .rate-table th, .rate-table td { padding: 13px 14px; }
  .rate-table .hide-sm { display: none; }
  .contact-band { padding: 24px 18px; }
  .brand small { display: none; }
  .receive-box .amt, .fee-result .fee-amt { font-size: 26px; }
  .hero-stats { grid-template-columns: 1fr; }
  .hs { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .hs:last-child { border-bottom: 0; }
}
