/* ============================================================
   GemBazaar v2 — "The Jewel Box"
   Dark obsidian · emerald/sapphire/ruby/gold · faceted luxury
   ============================================================ */

:root {
  --bg: #0a0a10;
  --bg2: #0e0e18;
  --surface: #12121c;
  --surface2: #1a1a28;
  --line: rgba(255,255,255,0.08);
  --text: #f0ece2;
  --muted: #8a8a9a;
  --emerald: #2dd4a7;
  --sapphire: #5b8cff;
  --ruby: #ff5d73;
  --gold: #e8c15a;
  --gold2: #b8912f;
  --font-display: 'Cormorant Garamond', serif;
  --font-brand: 'Cinzel', serif;
  --font-body: 'Manrope', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 20px 60px rgba(0,0,0,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(232,193,90,0.3); color: #fff; }

/* ---------- grain overlay ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: 999px; font-family: var(--font-body);
  font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: all 0.35s var(--ease); letter-spacing: 0.01em;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #1a1405; box-shadow: 0 8px 30px rgba(232,193,90,0.25);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(232,193,90,0.4); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.07); transform: translateY(-2px); }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.85rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.1rem 0; transition: all 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(10,10,16,0.85); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line); padding: 0.7rem 0;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.brand-gem { color: var(--gold); font-size: 1.1rem; animation: gemPulse 3s ease-in-out infinite; }
.brand-name { font-family: var(--font-brand); font-weight: 600; letter-spacing: 0.12em; font-size: 1.15rem; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.3s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px;
  background: var(--gold); transition: width 0.35s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.lang-toggle {
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--muted);
  padding: 0.4rem 0.8rem; border-radius: 999px; cursor: pointer; font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 600; transition: all 0.3s;
}
.lang-toggle:hover { border-color: rgba(255,255,255,0.25); color: var(--text); }
.lang-toggle .lang-si { color: var(--gold); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding: 7rem 0 4rem; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35; }
.orb-emerald { width: 500px; height: 500px; background: radial-gradient(circle, var(--emerald), transparent 70%); top: -120px; left: -100px; animation: drift 18s ease-in-out infinite; }
.orb-sapphire { width: 600px; height: 600px; background: radial-gradient(circle, var(--sapphire), transparent 70%); bottom: -200px; right: -150px; animation: drift 22s ease-in-out infinite reverse; }
.orb-ruby { width: 300px; height: 300px; background: radial-gradient(circle, var(--ruby), transparent 70%); top: 40%; left: 55%; opacity: 0.18; animation: drift 26s ease-in-out infinite; }
.facet-grid {
  position: absolute; inset: 0; opacity: 0.05;
  background-image:
    linear-gradient(30deg, transparent 48%, rgba(255,255,255,0.4) 50%, transparent 52%),
    linear-gradient(-30deg, transparent 48%, rgba(255,255,255,0.4) 50%, transparent 52%);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero-inner {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; width: 100%;
}
.eyebrow { color: var(--gold); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; margin-bottom: 1.2rem; }
.hero-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(3rem, 6vw, 5.2rem); line-height: 1.02; margin-bottom: 1.5rem; }
.title-line { display: block; }
.title-accent {
  font-style: italic; font-weight: 500;
  background: linear-gradient(120deg, var(--gold), #fff3c4, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: 1.1rem; max-width: 34rem; margin-bottom: 2.2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--text); }
.stat-label { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* hero gem */
.hero-gem-wrap { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gem-halo {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,140,255,0.25), transparent 65%);
  animation: haloPulse 4s ease-in-out infinite;
}
.hero-gem { width: min(340px, 80vw); height: auto; filter: drop-shadow(0 30px 60px rgba(0,0,0,0.6)); animation: gemFloat 6s ease-in-out infinite; }
.sparkle { animation: sparkle 2.4s ease-in-out infinite; }
.sparkle.s2 { animation-delay: 0.8s; }
.sparkle.s3 { animation-delay: 1.6s; }
.gem-caption { margin-top: 1.5rem; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }

.hero-scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2; }
.hero-scroll span {
  display: block; width: 1px; height: 50px; background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ---------- sections ---------- */
section { position: relative; padding: 6rem 0; }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 3.5rem; padding: 0 1.5rem; }
.section-title { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 600; margin-bottom: 1rem; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* ---------- analyzer ---------- */
.analyzer { background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); }
.analyzer-stage { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

.dropzone {
  border: 2px dashed rgba(255,255,255,0.15); border-radius: 24px; padding: 3rem 2rem;
  text-align: center; cursor: pointer; transition: all 0.4s var(--ease);
  background: rgba(255,255,255,0.02); position: relative; overflow: hidden;
}
.dropzone::before {
  content: ''; position: absolute; inset: -2px; border-radius: 24px; padding: 2px;
  background: linear-gradient(135deg, var(--emerald), var(--sapphire), var(--ruby), var(--gold));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s;
}
.dropzone:hover, .dropzone.dragover { border-color: transparent; }
.dropzone:hover::before, .dropzone.dragover::before { opacity: 1; }
.dropzone.dragover { background: rgba(91,140,255,0.06); }
.dz-icon { font-size: 3rem; color: var(--gold); margin-bottom: 1rem; animation: gemPulse 3s ease-in-out infinite; }
.dz-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; margin-bottom: 0.3rem; }
.dz-sub { color: var(--muted); font-size: 0.9rem; }
.dz-preview { margin-top: 1.5rem; position: relative; display: inline-block; }
.dz-preview img { max-height: 260px; max-width: 100%; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.dz-remove {
  position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ruby); color: #fff; border: none; cursor: pointer; font-size: 0.8rem;
  box-shadow: 0 4px 15px rgba(255,93,115,0.4); transition: transform 0.3s;
}
.dz-remove:hover { transform: scale(1.1); }

/* progress */
.progress { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.9rem; }
.progress-stage { display: flex; align-items: center; gap: 0.9rem; color: var(--muted); font-size: 0.95rem; transition: all 0.4s; }
.ps-dot {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line);
  position: relative; flex-shrink: 0; transition: all 0.4s;
}
.progress-stage.active { color: var(--text); }
.progress-stage.active .ps-dot { border-color: var(--gold); }
.progress-stage.active .ps-dot::after {
  content: ''; position: absolute; inset: 2px; border-radius: 50%; background: var(--gold);
  animation: dotPulse 1s ease-in-out infinite;
}
.progress-stage.done { color: var(--emerald); }
.progress-stage.done .ps-dot { border-color: var(--emerald); background: var(--emerald); }
.progress-stage.done .ps-dot::after { display: none; }

/* result */
.result {
  margin-top: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 2rem; box-shadow: var(--shadow); animation: resultIn 0.6s var(--ease);
}
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.8rem; }
.result-gem { display: flex; align-items: center; gap: 1rem; }
.result-gem-icon {
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--sapphire);
  background: linear-gradient(135deg, rgba(91,140,255,0.2), rgba(27,58,143,0.2));
  border: 1px solid rgba(91,140,255,0.3); animation: gemPulse 3s ease-in-out infinite;
}
.result-type { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
.result-sub { color: var(--muted); font-size: 0.85rem; }
.result-score { position: relative; width: 80px; height: 80px; }
.gauge { width: 80px; height: 80px; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 6; }
.gauge-fg {
  fill: none; stroke: url(#gaugeGrad); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 213.6; stroke-dashoffset: 213.6; transition: stroke-dashoffset 1.2s var(--ease);
}
.gauge-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-label span { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.gauge-label small { color: var(--muted); font-size: 0.65rem; }

.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.r-cell { background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.r-label { display: block; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.r-value { font-weight: 600; font-size: 0.95rem; }
.r-value.gold { color: var(--gold); }
.r-value.chip {
  display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.85rem;
  background: rgba(91,140,255,0.12); border: 1px solid rgba(91,140,255,0.3); color: var(--sapphire);
}
.conf-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; margin-bottom: 0.4rem; }
.conf-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--emerald), var(--sapphire)); border-radius: 999px; transition: width 1.2s var(--ease); }

.result-summary { background: rgba(232,193,90,0.05); border: 1px solid rgba(232,193,90,0.15); border-radius: 14px; padding: 1.2rem; margin-bottom: 1.5rem; color: #d8d2c0; font-size: 0.95rem; }
.result-recs { margin-bottom: 1.5rem; }
.recs-title { font-weight: 700; margin-bottom: 0.6rem; font-size: 0.9rem; }
.result-recs ul { list-style: none; }
.result-recs li { color: var(--muted); font-size: 0.9rem; padding: 0.3rem 0 0.3rem 1.4rem; position: relative; }
.result-recs li::before { content: '✦'; position: absolute; left: 0; color: var(--gold); font-size: 0.7rem; top: 0.5rem; }
.obs-list { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; }
.obs-list li.obs-chip { padding: 0.3rem 0.75rem; border: 1px solid rgba(201,162,39,0.35); border-radius: 999px; font-size: 0.8rem; background: rgba(201,162,39,0.08); position: static; }
.obs-list li.obs-chip::before { content: none; }
.risk-low { color: #58c98b !important; }
.risk-moderate { color: #e0b64f !important; }
.risk-high { color: #ff6b81 !important; }
.caveats-note { font-size: 0.78rem; color: var(--muted); border-top: 1px solid rgba(255,255,255,0.08); padding-top: 0.8rem; margin-top: 1rem; }
.result-actions { display: flex; gap: 1rem; justify-content: center; }

/* ---------- how it works ---------- */
.steps { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 2.2rem 1.8rem; transition: all 0.4s var(--ease); overflow: hidden; }
.step::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--emerald), var(--sapphire), var(--ruby), var(--gold));
  opacity: 0.4; transition: opacity 0.4s;
}
.step:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.15); }
.step:hover::before { opacity: 1; }
.step-num { position: absolute; top: 1.2rem; right: 1.4rem; font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: rgba(255,255,255,0.06); }
.step-icon { font-size: 2rem; color: var(--gold); margin-bottom: 1rem; }
.step-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin-bottom: 0.6rem; }
.step-text { color: var(--muted); font-size: 0.92rem; }

/* ---------- gems ---------- */
.gem-grid { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.gem-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem;
  transition: all 0.4s var(--ease); position: relative; overflow: hidden; cursor: default;
}
.gem-card::after {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 30% 20%, var(--gem), transparent 60%);
  transition: opacity 0.4s;
}
.gem-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.15); }
.gem-card:hover::after { opacity: 0.15; }
.gem-dot {
  display: block; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--gem), var(--gem2));
  box-shadow: 0 8px 25px color-mix(in srgb, var(--gem) 40%, transparent);
  animation: gemPulse 3s ease-in-out infinite;
}
.gem-card h4 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.2rem; }
.gem-card p { color: var(--muted); font-size: 0.85rem; }

/* ---------- features ---------- */
.features { background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%); }
.feat-grid { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 2rem;
  transition: all 0.4s var(--ease);
}
.feat-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.15); box-shadow: var(--shadow); }
.feat-icon { font-size: 1.8rem; color: var(--sapphire); display: block; margin-bottom: 1rem; }
.feat-card:nth-child(2) .feat-icon { color: var(--emerald); }
.feat-card:nth-child(3) .feat-icon { color: var(--ruby); }
.feat-card:nth-child(4) .feat-icon { color: var(--gold); }
.feat-card:nth-child(5) .feat-icon { color: var(--emerald); }
.feat-card:nth-child(6) .feat-icon { color: var(--ruby); }
.feat-card h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: 0.5rem; }
.feat-card p { color: var(--muted); font-size: 0.9rem; }

/* ---------- market ---------- */
.market { text-align: center; }
.market-inner { max-width: 44rem; margin: 0 auto; padding: 3rem 1.5rem; }
.market-gem {
  font-size: 3.5rem; color: var(--gold); margin-bottom: 1.5rem; display: inline-block;
  animation: gemPulse 3s ease-in-out infinite;
}
.market-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; margin-bottom: 1rem; }
.market-sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 2rem; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 3rem 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.footer-brand .brand-name { font-size: 1.3rem; }
.footer-tag { color: var(--muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--gold); }
.footer-note { color: var(--muted); font-size: 0.85rem; }

/* ---------- reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.hero .reveal { animation: heroIn 0.9s var(--ease) forwards; }
.hero .reveal:nth-child(1) { animation-delay: 0.1s; }
.hero .reveal:nth-child(2) { animation-delay: 0.25s; }
.hero .reveal:nth-child(3) { animation-delay: 0.4s; }
.hero .reveal:nth-child(4) { animation-delay: 0.55s; }
.hero .reveal:nth-child(5) { animation-delay: 0.7s; }
.hero-gem-wrap.reveal { animation-delay: 0.3s; }

/* ---------- keyframes ---------- */
@keyframes heroIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gemFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-18px) rotate(2deg); } }
@keyframes gemPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes haloPulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes sparkle { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -30px); } }
@keyframes scrollPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes dotPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.6; } }
@keyframes resultIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-stats { justify-content: center; }
  .hero-gem-wrap { order: -1; }
  .hero-gem { width: min(240px, 60vw); }
  .gem-halo { width: 300px; height: 300px; }
  .nav-links { display: none; }
  .steps { grid-template-columns: 1fr; }
  .gem-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .gem-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .btn-lg { padding: 0.85rem 1.6rem; font-size: 0.95rem; }
}

/* ============ GEM EXPERT CHAT ============ */
.chat-launcher {
  position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 200;
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.3rem; border-radius: 999px; border: 1px solid var(--gold, #c9a227);
  background: linear-gradient(135deg, #1a1a2e, #12121f); color: #f0e6c8;
  font-family: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45), 0 0 18px rgba(201,162,39,0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}
.chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 26px rgba(201,162,39,0.3); }
.chat-launcher span[aria-hidden] { color: #c9a227; }
.chat-panel {
  position: fixed; bottom: 5.6rem; right: 1.4rem; z-index: 201;
  width: min(380px, calc(100vw - 2rem)); height: min(560px, calc(100vh - 8rem));
  display: flex; flex-direction: column;
  background: #14141f; border: 1px solid rgba(201,162,39,0.35); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6); overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #1a1a2e, #12121f); border-bottom: 1px solid rgba(201,162,39,0.25);
}
.chat-head-gem { color: #c9a227; font-size: 1.2rem; }
.chat-head-txt { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.chat-head-txt strong { color: #f0e6d2; font-size: 0.95rem; }
.chat-free-chip {
  font-size: 0.72rem; color: #58c98b; background: rgba(88,201,139,0.12);
  padding: 0.1rem 0.5rem; border-radius: 999px; align-self: flex-start;
}
.chat-free-chip.low { color: #e0b64f; background: rgba(224,182,79,0.12); }
.chat-free-chip.unlimited { color: #58c98b; }
.chat-close { background: none; border: none; color: #888; font-size: 1rem; cursor: pointer; padding: 0.2rem; }
.chat-close:hover { color: #fff; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.chat-msg {
  max-width: 85%; padding: 0.6rem 0.85rem; border-radius: 12px;
  font-size: 0.88rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word;
}
.chat-msg-bot { background: rgba(201,162,39,0.1); color: #e8e0cc; align-self: flex-start; border: 1px solid rgba(201,162,39,0.18); }
.chat-msg-user { background: rgba(61,110,240,0.18); color: #dce6ff; align-self: flex-end; border: 1px solid rgba(61,110,240,0.3); }
.chat-typing { opacity: 0.6; font-style: italic; }
.chat-auth { padding: 0.9rem 1rem; background: rgba(201,162,39,0.06); border-top: 1px solid rgba(201,162,39,0.2); }
.chat-auth-title { font-size: 0.84rem; color: #e0c97f; margin: 0 0 0.6rem; }
.chat-auth form { display: flex; flex-direction: column; gap: 0.5rem; }
.chat-auth input {
  padding: 0.55rem 0.8rem; border-radius: 8px; border: 1px solid rgba(201,162,39,0.3);
  background: #0e0e18; color: #eee; font-size: 0.88rem;
}
.chat-auth input:focus { outline: none; border-color: #c9a227; }
.chat-auth .btn { width: 100%; }
.chat-auth-toggle { background: none; border: none; color: #9a9078; font-size: 0.78rem; margin-top: 0.55rem; cursor: pointer; text-decoration: underline; }
.chat-auth-toggle:hover { color: #c9a227; }
.chat-input-row { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid rgba(201,162,39,0.2); background: #10101a; }
.chat-input-row input {
  flex: 1; padding: 0.6rem 0.85rem; border-radius: 999px;
  border: 1px solid rgba(201,162,39,0.3); background: #0e0e18; color: #eee; font-size: 0.88rem;
}
.chat-input-row input:focus { outline: none; border-color: #c9a227; }
.chat-send {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #c9a227, #a8811c); color: #14141f; font-size: 1rem;
  transition: transform 0.15s;
}
.chat-send:hover { transform: scale(1.08); }
.chat-send:disabled { opacity: 0.5; transform: none; }
@media (max-width: 520px) {
  .chat-launcher { bottom: 1rem; right: 1rem; padding: 0.7rem 1rem; }
  .chat-launcher-txt { display: none; }
  .chat-panel { bottom: 4.4rem; right: 1rem; }
}

/* ============ FAQ ============ */
.faq { padding: 6rem 1.5rem; max-width: 860px; margin: 0 auto; }
.faq-list { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 2.5rem; }
.faq-item {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(201,162,39,0.18);
  border-radius: 12px; padding: 0; overflow: hidden; transition: border-color 0.25s;
}
.faq-item:hover { border-color: rgba(201,162,39,0.45); }
.faq-item summary {
  cursor: pointer; padding: 1.05rem 1.3rem; font-weight: 600; font-size: 0.98rem;
  color: #e8e0cc; list-style: none; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 1.3rem; top: 50%; transform: translateY(-50%);
  color: #c9a227; font-size: 1.3rem; transition: transform 0.25s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 1.3rem 1.15rem; color: #b0aa98; font-size: 0.9rem; line-height: 1.65; margin: 0; }
.faq-item strong { color: #e0c97f; }

/* ============ Accessibility / SEO helpers ============ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
noscript .noscript-content h2, noscript .noscript-content h3 { color: #e0c97f; }
noscript .noscript-content strong { color: #e0c97f; }
