/* ═══════════════════════════════════════════════
   Martics.co — GEO Agency
   Aesthetic: Precision Signal / Editorial Dark
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,600&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&family=JetBrains+Mono:wght@400;500&family=Sarabun:wght@300;400;500;600&display=swap');

/* ─── TOKENS ─── */
:root {
  --bg:         #0b0b0b;
  --bg-2:       #111111;
  --bg-3:       #161616;
  --border:     rgba(255,255,255,0.08);
  --text:       #ece7de;
  --text-2:     #9b9690;
  --text-3:     #5c5852;
  --accent:     #c49a52;
  --accent-2:   #e8c07e;
  --accent-bg:  rgba(196,154,82,0.08);
  --ff-serif:   'Fraunces', Georgia, serif;
  --ff-sans:    'DM Sans', system-ui, sans-serif;
  --ff-mono:    'JetBrains Mono', monospace;
  --ff-thai:    'Sarabun', sans-serif;
  --gap:        clamp(20px, 3vw, 48px);
  --pad-x:      clamp(20px, 5vw, 80px);
  --radius:     2px;
  --trans:      0.2s ease;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ─── BILINGUAL ─── */
[data-th]           { display: none !important; }
body.lang-th [data-en] { display: none !important; }
body.lang-th [data-th] { display: block !important; }
body.lang-th span[data-th] { display: inline !important; }
body.lang-th span[data-en] { display: none !important; }
span[data-th]        { display: none !important; }
body.lang-th li[data-th]   { display: list-item !important; }
body.lang-th li[data-en]   { display: none !important; }

body.lang-th {
  font-family: var(--ff-thai);
}
body.lang-th h1, body.lang-th h2, body.lang-th h3,
body.lang-th h4, body.lang-th p, body.lang-th span,
body.lang-th a, body.lang-th button, body.lang-th li {
  font-family: var(--ff-thai);
}
body.lang-th h1, body.lang-th h2, body.lang-th h3, body.lang-th h4 {
  letter-spacing: 0;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.6rem); }
h4 { font-size: 1rem; font-weight: 500; font-family: var(--ff-sans); letter-spacing: 0; }

.label {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
}

/* ─── LAYOUT ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section {
  padding: clamp(60px, 9vw, 130px) 0;
  border-top: 1px solid var(--border);
}

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(11,11,11,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav__logo {
  font-family: var(--ff-serif);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.nav__logo span { color: var(--accent); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color var(--trans);
}
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__lang {
  display: flex;
  gap: 2px;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.nav__lang button {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 5px 10px;
  border-radius: var(--radius);
  transition: all var(--trans);
}
.nav__lang button.active {
  color: var(--accent);
  background: var(--accent-bg);
}
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s;
}
.nav__mobile {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 24px var(--pad-x) 32px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  font-size: 0.95rem;
  color: var(--text-2);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
}
.nav__mobile__lang {
  display: flex;
  gap: 8px;
  padding-top: 16px;
}
.nav__mobile__lang button {
  font-size: 0.75rem;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-3);
  letter-spacing: 0.06em;
}
.nav__mobile__lang button.active {
  color: var(--accent);
  border-color: rgba(196,154,82,0.3);
  background: var(--accent-bg);
}

/* ─── HERO ─── */
.hero {
  padding-top: 148px;
  padding-bottom: clamp(60px, 9vw, 120px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 900px; height: 700px;
  transform: translate(-30%, -20%);
  background: radial-gradient(ellipse, rgba(196,154,82,0.05) 0%, transparent 65%);
  pointer-events: none;
}
.hero__eyebrow { margin-bottom: 28px; }
.hero__title { max-width: 820px; margin-bottom: 24px; }
.hero__title em { font-style: italic; color: var(--accent); }
.hero__sub {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 44px;
}
.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

/* ─── AI DEMO ─── */
.ai-demo {
  max-width: 660px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--ff-mono);
}
.ai-demo__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.ai-demo__dots { display: flex; gap: 7px; }
.ai-demo__dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.ai-demo__dots span:nth-child(1) { background: #ff5f57; }
.ai-demo__dots span:nth-child(2) { background: #febc2e; }
.ai-demo__dots span:nth-child(3) { background: #28c840; }
.ai-demo__engine {
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.05em;
}
.ai-demo__content { padding: 20px 24px 16px; }
.ai-demo__query {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
}
.ai-demo__query span { color: var(--text-2); }
.ai-demo__response {
  font-size: 0.875rem;
  line-height: 1.85;
  color: var(--text-2);
  font-family: var(--ff-sans);
  min-height: 80px;
}
.ai-demo__response strong { color: var(--text); }
.ai-demo__response mark {
  background: rgba(196,154,82,0.18);
  color: var(--accent-2);
  padding: 1px 5px;
  border-radius: 2px;
}
.ai-demo__sources {
  display: flex;
  gap: 6px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.ai-demo__chip {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-3);
  font-family: var(--ff-mono);
}
.ai-demo__chip.lit {
  border-color: rgba(196,154,82,0.35);
  color: var(--accent);
  background: var(--accent-bg);
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── STATS STRIP ─── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--border);
  gap: 1px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  background: var(--bg);
  padding: 28px 24px 32px;
  transition: background var(--trans);
}
.stat:hover { background: var(--bg-2); }
.stat__num {
  font-family: var(--ff-mono);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
  line-height: 1;
}
.stat__lbl {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.5;
}

/* ─── SECTION HEADER ─── */
.sec-head {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: clamp(40px, 6vw, 68px);
}
.sec-head__n {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--text-3);
  padding-top: 6px;
  flex-shrink: 0;
  width: 24px;
}
.sec-head__body .label { margin-bottom: 14px; }

/* ─── GRID ─── */
.g2 { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--gap); }
.g3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); }

/* ─── CARD ─── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 28px 28px 32px;
  border-radius: var(--radius);
  transition: border-color var(--trans), background var(--trans);
}
.card:hover { border-color: rgba(196,154,82,0.28); background: var(--bg-3); }
.card__icon { font-size: 1.3rem; margin-bottom: 18px; display: block; }
.card__title { margin-bottom: 10px; }
.card__body { font-size: 0.875rem; color: var(--text-2); line-height: 1.75; }

/* ─── COMPARE TABLE ─── */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.compare__col { background: var(--bg-2); padding: 24px 24px 28px; }
.compare__col.geo { border-top: 2px solid var(--accent); background: var(--bg-3); }
.compare__head {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: var(--ff-mono);
  margin-bottom: 18px;
}
.compare__col.geo .compare__head { color: var(--accent); }
.compare ul { display: flex; flex-direction: column; gap: 10px; }
.compare li {
  font-size: 0.82rem;
  color: var(--text-2);
  display: flex;
  gap: 10px;
  line-height: 1.5;
}
.compare li::before { content: '—'; color: var(--text-3); flex-shrink: 0; }
.compare__col.geo li::before { content: '→'; color: var(--accent); }

/* ─── TEAM ─── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.team-card {
  background: var(--bg);
  padding: 28px 24px 32px;
  transition: background var(--trans);
}
.team-card:hover { background: var(--bg-2); }
.team-card__av {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 18px;
}
.team-card__name { font-size: 0.9rem; font-weight: 500; margin-bottom: 4px; }
.team-card__role {
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: var(--ff-mono);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  line-height: 1.4;
}
.team-card__bio {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid rgba(196,154,82,0.28);
  border-radius: 100px;
  color: var(--accent);
  background: var(--accent-bg);
  line-height: 1.4;
}

/* ─── CLIENTS ─── */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.client {
  background: var(--bg);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background var(--trans);
}
.client:hover { background: var(--bg-2); }
.client__name { font-size: 0.92rem; font-weight: 500; }
.client__ind {
  font-size: 0.7rem;
  color: var(--text-3);
  font-family: var(--ff-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  font-size: 0.77rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all var(--trans);
  font-weight: 500;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #0b0b0b; }
.btn-primary:hover { background: var(--accent-2); }
.btn-outline { border: 1px solid var(--border); color: var(--text-2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ─── PAGE HERO ─── */
.page-hero {
  padding: 140px 0 68px;
  border-bottom: 1px solid var(--border);
}
.page-hero .label { margin-bottom: 20px; }

/* ─── ARTICLE CARDS ─── */
.article-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.article-item {
  border-bottom: 1px solid var(--border);
}
.article-item:last-child { border-bottom: none; }

details.article-item summary { list-style: none; cursor: pointer; }
details.article-item summary::-webkit-details-marker { display: none; }

.article-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 32px 36px;
  transition: background var(--trans);
}
.article-summary:hover { background: var(--bg-2); }
details[open] .article-summary { background: var(--bg-2); border-bottom: 1px solid var(--border); }

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.article-tag {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.article-read {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  color: var(--text-3);
}
.article-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 10px;
}
.article-excerpt {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 680px;
}
.article-chevron {
  font-size: 0.8rem;
  color: var(--text-3);
  transition: transform 0.3s;
  padding-top: 4px;
  flex-shrink: 0;
}
details[open] .article-chevron { transform: rotate(90deg); color: var(--accent); }

.article-body {
  padding: 40px 36px 48px;
  max-width: 760px;
}
.article-body h2 {
  font-size: 1.3rem;
  font-weight: 400;
  margin: 40px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.article-body h3 { font-size: 1rem; font-weight: 500; margin: 24px 0 10px; font-family: var(--ff-sans); letter-spacing: 0; }
.article-body p { font-size: 0.9rem; color: var(--text-2); line-height: 1.85; margin-bottom: 18px; }
.article-body ul, .article-body ol { padding-left: 20px; margin-bottom: 18px; }
.article-body li { font-size: 0.88rem; color: var(--text-2); line-height: 1.75; margin-bottom: 7px; }
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }
.callout {
  border-left: 2px solid var(--accent);
  padding: 14px 20px;
  background: var(--accent-bg);
  margin: 24px 0;
  border-radius: 0 2px 2px 0;
}
.callout p { margin: 0; color: var(--text); font-size: 0.88rem; }
.article-body strong { color: var(--text); font-weight: 500; }

/* ─── SERVICES ─── */
.svc-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
  padding: clamp(44px, 6vw, 80px) 0;
  border-top: 1px solid var(--border);
}
.svc-block:first-child { border-top: none; }
.svc-num {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--text-3);
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}
.svc-title { margin-bottom: 12px; }
.svc-tag {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-3);
  font-family: var(--ff-mono);
  margin-top: 20px;
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.feature-list li {
  display: flex;
  gap: 14px;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
}
.feature-list li::before { content: '→'; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.svc-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-3);
  font-family: var(--ff-mono);
  letter-spacing: 0.04em;
}

/* ─── PROCESS ─── */
.process {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.step {
  background: var(--bg);
  padding: 28px 24px 32px;
}
.step__n {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}
.step__title { font-size: 0.92rem; font-weight: 500; margin-bottom: 10px; }
.step__body { font-size: 0.8rem; color: var(--text-2); line-height: 1.65; }

/* ─── CTA ─── */
.cta-sec {
  text-align: center;
  padding: clamp(72px, 11vw, 150px) 0;
  position: relative;
  overflow: hidden;
}
.cta-sec::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 700px; height: 400px;
  transform: translate(-50%, 40%);
  background: radial-gradient(ellipse, rgba(196,154,82,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-sec h2 { margin-bottom: 18px; }
.cta-sec p { color: var(--text-2); max-width: 460px; margin: 0 auto 36px; font-size: 1rem; }

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__logo { font-family: var(--ff-serif); font-size: 1.05rem; }
.footer__logo span { color: var(--accent); }
.footer__links { display: flex; gap: 24px; }
.footer__links a {
  font-size: 0.75rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
  transition: color var(--trans);
}
.footer__links a:hover { color: var(--text); }
.footer__copy { font-size: 0.7rem; color: var(--text-3); font-family: var(--ff-mono); }

/* ─── FADE ANIMATION ─── */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.hero__eyebrow { animation: fadeUp 0.55s ease 0.1s both; }
.hero__title   { animation: fadeUp 0.55s ease 0.22s both; }
.hero__sub     { animation: fadeUp 0.55s ease 0.34s both; }
.hero__ctas    { animation: fadeUp 0.55s ease 0.44s both; }
.ai-demo       { animation: fadeUp 0.55s ease 0.54s both; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .team-grid { grid-template-columns: repeat(2,1fr); }
  .g3 { grid-template-columns: repeat(2,1fr); }
  .stats-strip { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .svc-block { grid-template-columns: 1fr; gap: 24px; }
  .process { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: repeat(2,1fr); }
  .sec-head { flex-direction: column; gap: 8px; }
  .sec-head__n { padding-top: 0; }
  .article-summary { padding: 24px 20px; }
  .article-body { padding: 28px 20px 36px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .footer__links { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .stats-strip { grid-template-columns: repeat(2,1fr); }
  .clients-grid { grid-template-columns: 1fr; }
  .hero__ctas { flex-direction: column; }
  .btn { justify-content: center; }
  .process { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   MARTICS AI CHATBOT WIDGET
   ═══════════════════════════════════════════════ */

#mc-chat {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  font-family: var(--ff-sans);
}

/* ── Bubble button ── */
.mc-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(196,154,82,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 1;
}
.mc-bubble:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 32px rgba(196,154,82,0.5);
}
.mc-bubble svg {
  width: 22px;
  height: 22px;
  color: #0b0b0b;
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mc-icon-close { opacity: 0; transform: rotate(-45deg); }
.mc-bubble--open .mc-icon-chat  { opacity: 0; transform: rotate(45deg); }
.mc-bubble--open .mc-icon-close { opacity: 1; transform: rotate(0deg); }

/* ── Panel ── */
.mc-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 340px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  transform-origin: bottom right;
}
.mc-panel--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ── Header ── */
.mc-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.mc-header__info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(74,222,128,0.6);
}
.mc-header__name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.mc-header__sub {
  font-size: 0.7rem;
  color: var(--text-3);
  font-family: var(--ff-mono);
  letter-spacing: 0.03em;
}

/* ── Messages ── */
.mc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  max-height: 320px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.mc-msg {
  display: flex;
  max-width: 88%;
}
.mc-msg--user {
  align-self: flex-end;
}
.mc-msg--bot {
  align-self: flex-start;
}
.mc-msg__bubble {
  padding: 9px 13px;
  border-radius: 4px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
}
.mc-msg--user .mc-msg__bubble {
  background: var(--accent);
  color: #0b0b0b;
  font-weight: 500;
  border-radius: 4px 4px 0 4px;
}
.mc-msg--bot .mc-msg__bubble {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px 4px 4px 0;
}

/* ── Thinking dots ── */
.mc-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 16px;
}
.mc-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  animation: mc-bounce 1.2s infinite ease-in-out;
}
.mc-dots span:nth-child(2) { animation-delay: 0.2s; }
.mc-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mc-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ── Input row ── */
.mc-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-3);
}
.mc-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 0.8rem;
  padding: 8px 10px;
  outline: none;
  transition: border-color var(--trans);
}
.mc-input::placeholder { color: var(--text-3); }
.mc-input:focus { border-color: var(--accent); }
.mc-send {
  width: 34px;
  height: 34px;
  border-radius: 3px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--trans);
}
.mc-send:hover { background: var(--accent-2); }
.mc-send:disabled { opacity: 0.4; cursor: not-allowed; }
.mc-send svg { width: 15px; height: 15px; color: #0b0b0b; }

/* ── Footer note ── */
.mc-footer-note {
  text-align: center;
  font-size: 0.62rem;
  color: var(--text-3);
  font-family: var(--ff-mono);
  padding: 6px 0 8px;
  letter-spacing: 0.03em;
}

/* ── Mobile ── */
@media (max-width: 520px) {
  #mc-chat { bottom: 18px; right: 16px; }
  .mc-panel { width: calc(100vw - 32px); right: 0; }
}
