/* MetaBear design system — shared by the site, /learn and the academy.
   The same palette and type the motion lessons are drawn with: deep ink,
   mint for buyers and "go", warm gold for emphasis, amber for sellers. */
:root {
  color-scheme: dark;
  --bg: #05090f;
  --bg-2: #080e18;
  --bg-3: #0c1520;
  --panel: rgba(14, 24, 34, 0.72);
  --panel-solid: #0e1822;
  --line: rgba(120, 160, 190, 0.14);
  --line-2: rgba(120, 160, 190, 0.24);
  --text: #edf2ed;
  --text-2: #c4d0d6;
  --muted: #94a8b9;
  --dim: #5f7486;
  --teal: #78e1d5;
  --teal-2: #3fb8ab;
  --teal-ink: #062521;
  --gold: #e8bd7d;
  --sell: #f09a5a;
  --red: #ef7b76;
  --f-tc: "Noto Sans TC Variable", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --f-display: "Barlow Condensed", "Noto Sans TC Variable", "Noto Sans TC", system-ui, sans-serif;
  --f-mono: "JetBrains Mono Variable", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --r-xl: 32px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow-teal: 0 0 0 1px rgba(120, 225, 213, 0.35), 0 10px 40px -10px rgba(120, 225, 213, 0.45);
  --header-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-tc);
  font-size: 16px;
  line-height: 1.7;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img,
svg,
canvas,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection {
  background: rgba(120, 225, 213, 0.3);
  color: #fff;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--teal-ink);
  font-weight: 800;
  transition: top 0.2s;
}
.skip:focus {
  top: 12px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- atmosphere ---------- */
.mb-grain::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: mb-grain 1.2s steps(4) infinite;
}
@keyframes mb-grain {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-3%, 2%);
  }
  50% {
    transform: translate(2%, -3%);
  }
  75% {
    transform: translate(-2%, -1%);
  }
  100% {
    transform: translate(0, 0);
  }
}
.mb-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% 12%, rgba(120, 225, 213, 0.1), transparent 70%),
    radial-gradient(50% 45% at 88% 30%, rgba(232, 189, 125, 0.07), transparent 70%);
}

/* ---------- type ---------- */
.mb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.mb-eyebrow b {
  color: var(--teal);
  font-weight: 700;
}
.mb-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), transparent);
}
.mb-eyebrow.plain::before {
  display: none;
}
.mb-h1 {
  font-size: clamp(52px, 8.4vw, 132px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.mb-h2 {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.mb-h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.mb-lead {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.8;
  color: var(--text-2);
}
.mb-small {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.mb-num {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.mb-mono {
  font-family: var(--f-mono);
}
.t-teal {
  color: var(--teal);
}
.t-gold {
  color: var(--gold);
}
.t-sell {
  color: var(--sell);
}
.t-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(237, 242, 237, 0.75);
}
.t-grad {
  background: linear-gradient(100deg, var(--teal) 10%, #c9f5ef 45%, var(--gold) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- layout ---------- */
.mb-wrap {
  width: min(100% - var(--gutter) * 2, var(--max));
  margin-inline: auto;
}
.mb-section {
  position: relative;
  padding-block: clamp(80px, 10vw, 140px);
}

/* ---------- buttons ---------- */
.mb-btn {
  --bg-btn: var(--teal);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-btn);
  color: var(--teal-ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 12px 40px -12px rgba(120, 225, 213, 0.7);
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
.mb-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.55) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
}
.mb-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px -12px rgba(120, 225, 213, 0.85);
}
.mb-btn:hover::before {
  transform: translateX(120%);
}
.mb-btn .arrow {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: -12px;
  border-radius: 50%;
  background: rgba(6, 37, 33, 0.14);
  font-size: 14px;
  transition: transform 0.4s var(--ease);
}
.mb-btn:hover .arrow {
  transform: rotate(45deg);
}
.mb-btn.ghost {
  --bg-btn: rgba(237, 242, 237, 0.04);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
  backdrop-filter: blur(10px);
}
.mb-btn.ghost .arrow {
  background: rgba(120, 225, 213, 0.12);
  color: var(--teal);
}
.mb-btn.ghost:hover {
  box-shadow:
    inset 0 0 0 1px rgba(120, 225, 213, 0.5),
    0 18px 50px -20px rgba(120, 225, 213, 0.5);
}
.mb-btn.small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}
.mb-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-weight: 700;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.mb-link:hover {
  background-size: 100% 1px;
}

/* ---------- chips & panels ---------- */
.mb-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(237, 242, 237, 0.03);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.mb-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
}
.mb-panel {
  position: relative;
  border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(20, 33, 45, 0.7), rgba(10, 17, 26, 0.75));
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 30px 80px -40px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
}
/* Cursor spotlight: --mx/--my are set by mb.js on pointer move. */
.mb-spot {
  --mx: 50%;
  --my: 50%;
}
.mb-spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(120, 225, 213, 0.12), transparent 60%);
  transition: opacity 0.4s;
}
.mb-spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(120, 225, 213, 0.75), transparent 60%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 0.4s;
}
.mb-spot:hover::before,
.mb-spot:hover::after {
  opacity: 1;
}

/* ---------- header ---------- */
.mb-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding-inline: var(--gutter);
  transition:
    transform 0.5s var(--ease),
    background 0.4s,
    box-shadow 0.4s;
}
.mb-header.is-solid {
  background: rgba(5, 9, 15, 0.72);
  box-shadow: inset 0 -1px 0 var(--line);
  backdrop-filter: blur(18px) saturate(1.3);
}
.mb-header.is-hidden {
  transform: translateY(-100%);
}
.mb-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.mb-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(232, 189, 125, 0.35);
}
.mb-brand small {
  display: block;
  margin-top: -4px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--dim);
}
.mb-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.mb-nav a:not(.mb-btn) {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  transition:
    color 0.3s,
    background 0.3s;
}
.mb-nav a:not(.mb-btn):hover,
.mb-nav a[aria-current] {
  color: var(--text);
  background: rgba(237, 242, 237, 0.06);
}
.mb-nav .mb-btn {
  margin-left: 10px;
}
.mb-menu {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(237, 242, 237, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.mb-menu span,
.mb-menu span::before,
.mb-menu span::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: auto;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.4s var(--ease);
}
.mb-menu span {
  position: relative;
}
.mb-menu span::before,
.mb-menu span::after {
  content: "";
  position: absolute;
  left: 0;
}
.mb-menu span::before {
  transform: translateY(-6px);
}
.mb-menu span::after {
  transform: translateY(6px);
}
.mb-menu[aria-expanded="true"] span {
  background: transparent;
}
.mb-menu[aria-expanded="true"] span::before {
  transform: rotate(45deg);
}
.mb-menu[aria-expanded="true"] span::after {
  transform: rotate(-45deg);
}
@media (max-width: 860px) {
  .mb-menu {
    display: grid;
    place-items: center;
  }
  .mb-nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    padding: 100px var(--gutter) 40px;
    background: rgba(5, 9, 15, 0.96);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.4s var(--ease),
      visibility 0.4s;
  }
  .mb-nav a:not(.mb-btn) {
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: 26px;
    font-weight: 800;
    background: none !important;
  }
  .mb-nav .mb-btn {
    margin: 28px 0 0;
  }
  .mb-header.menu-open .mb-nav {
    opacity: 1;
    visibility: visible;
  }
  .mb-header.menu-open {
    transform: none;
    /* A backdrop-filter would make the header the fixed overlay's containing block. */
    backdrop-filter: none;
    background: transparent;
    box-shadow: none;
  }
}

/* ---------- footer ---------- */
.mb-footer {
  position: relative;
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(8, 14, 24, 0.9));
}
.mb-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.mb-footer h2 {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--dim);
  margin-bottom: 18px;
}
.mb-footer nav {
  display: grid;
  gap: 10px;
}
.mb-footer nav a {
  color: var(--text-2);
  font-weight: 600;
  width: fit-content;
}
.mb-footer nav a:hover {
  color: var(--teal);
}
.mb-footer-brand p {
  margin-top: 16px;
  max-width: 34ch;
  color: var(--muted);
}
.mb-footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
  line-height: 1.8;
}
.mb-footer-legal span {
  font-family: var(--f-mono);
  letter-spacing: 0.2em;
  white-space: nowrap;
}
.mb-wordmark {
  margin-top: 56px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(64px, 17vw, 260px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  text-align: center;
  background: linear-gradient(180deg, rgba(237, 242, 237, 0.12), rgba(237, 242, 237, 0));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}
@media (max-width: 760px) {
  .mb-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mb-footer-brand {
    grid-column: 1 / -1;
  }
  .mb-footer-legal {
    flex-direction: column;
  }
}

/* ---------- reveal (mb.js toggles .is-in) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 1s var(--ease),
    transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- toast ---------- */
.mb-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 150;
  translate: -50% 0;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--teal-ink);
  font-weight: 800;
  box-shadow: 0 20px 50px -10px rgba(120, 225, 213, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
