:root {
  --bg: #f8fafc;
  --bg-alt: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --text-soft: #475569;
  --border: #e2e8f0;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #0ea5e9;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.35);
  --maxw: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-alt: #0f172a;
  --surface: #131c30;
  --surface-2: #1c273f;
  --text: #e7ecf5;
  --text-soft: #9aa7bd;
  --border: #25304a;
  --primary: #818cf8;
  --primary-600: #6366f1;
  --primary-soft: #1e2546;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }

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

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary);
  color: #fff; padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand-mark {
  display: block; width: 34px; height: 34px; border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .35);
}
.brand-text {
  font-size: 17px; letter-spacing: 0.2px; font-weight: 800;
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text .amp { color: var(--primary); }
.main-nav { margin-left: auto; display: flex; gap: 6px; }
.main-nav a {
  padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--text-soft);
  font-weight: 600; font-size: 14px; transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle {
  margin-left: 8px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 18px;
}
.theme-toggle:hover { border-color: var(--primary); }

/* ---------- Hero (banner animat) ---------- */
.hero {
  position: relative; overflow: hidden; min-height: 82vh; display: flex; align-items: center;
  padding: 84px 0 64px;
  background:
    radial-gradient(900px 480px at 85% -10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 60%),
    radial-gradient(700px 420px at 5% 110%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    linear-gradient(160deg, var(--bg), var(--bg-alt));
}
.hero-blobs { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-blobs::before, .hero-blobs::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.hero-blobs::before {
  width: 460px; height: 460px; top: -120px; left: -100px;
  background: radial-gradient(circle, var(--primary), transparent 70%);
  animation: blobA 15s ease-in-out infinite alternate;
}
.hero-blobs::after {
  width: 420px; height: 420px; bottom: -140px; right: -80px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: blobB 17s ease-in-out infinite alternate;
}
@keyframes blobA { from { transform: translate(0,0) scale(1); } to { transform: translate(80px, 50px) scale(1.1); } }
@keyframes blobB { from { transform: translate(0,0) scale(1); } to { transform: translate(-70px,-40px) scale(1.15); } }

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; max-width: 860px; }

.hero-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--primary-600); background: var(--primary-soft); padding: 7px 14px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}
.hero h1 { font-size: clamp(32px, 5vw, 60px); line-height: 1.08; margin: 18px 0 14px; letter-spacing: -1px; }
.grad-text {
  background: linear-gradient(100deg, #f6d365, #e9b646, #fff6c2, #e9b646);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--text-soft); font-size: 18px; max-width: 54ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; margin-top: 30px; list-style: none; padding: 0; flex-wrap: wrap; }
.hero-stats li { display: grid; gap: 2px; }
.hero-stats strong { font-size: 22px; background: linear-gradient(100deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { font-size: 12px; color: var(--text-soft); }

/* Intrare hero (după loader) */
.hero-copy > * { opacity: 0; }
body.loaded .hero-eyebrow { animation: heroUp .6s ease .1s forwards; }
body.loaded .hero h1 { animation: heroUp .7s ease .22s forwards; }
body.loaded .lead { animation: heroUp .7s ease .36s forwards; }
body.loaded .hero-actions { animation: heroUp .7s ease .5s forwards; }
body.loaded .hero-stats { animation: heroUp .7s ease .62s forwards; }
@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-copy > * { opacity: 1 !important; animation: none !important; }
  .hero-blobs::before, .hero-blobs::after { animation: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 11px; font-weight: 700; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -8px var(--primary); }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-link { background: transparent; color: var(--text-soft); text-decoration: underline; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 70ch; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(22px, 3vw, 32px); margin: 0 0 8px; letter-spacing: -0.4px; }
.section-head p { color: var(--text-soft); margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}

/* ---------- Forms ---------- */
.form-card { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 600; font-size: 14px; }
.field .req { color: var(--danger); }
.field input, .field textarea, .field select {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; width: 100%;
}
.field input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }
.field input[type="file"] { padding: 9px; cursor: pointer; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary);
}
.hint { color: var(--text-soft); font-size: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.options { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 14px; }
.options legend { padding: 0 6px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--text-soft); }
.check input { width: auto; }

/* ---------- Preview ---------- */
.preview-card { display: grid; gap: 16px; position: sticky; top: 84px; }
.preview-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.preview-note { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.sig-preview {
  border: 1px dashed #e2e8f0; border-radius: var(--radius-sm); padding: 18px;
  background: #ffffff; min-height: 120px;
}
.qr-preview { display: grid; place-items: center; padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); min-height: 200px; }
.qr-preview img, .qr-preview canvas { max-width: 100%; height: auto; border-radius: 8px; }
.preview-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.msg { font-size: 13px; font-weight: 600; min-height: 18px; margin: 0; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--danger); }

/* ---------- Support ---------- */
.support-inner { display: grid; place-items: center; }
.support-card { max-width: 640px; text-align: center; display: grid; gap: 14px; }
.support-card h2 { margin: 0; }
.kofi-btn {
  display: inline-flex; align-items: center; gap: 10px; justify-self: center;
  background: #29abe0; color: #fff; font-weight: 800; text-decoration: none;
  padding: 13px 22px; border-radius: 12px; box-shadow: 0 10px 24px -10px #29abe0;
}
.kofi-btn:hover { background: #1f9fd6; }
.kofi-cup { font-size: 18px; }

/* ---------- Legal ---------- */
.legal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.legal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: var(--text); transition: transform .12s, border-color .15s, box-shadow .15s;
  display: grid; gap: 6px;
}
.legal-card:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow); }
.legal-card h3 { margin: 0; font-size: 17px; }
.legal-card p { margin: 0; color: var(--text-soft); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-inner p { margin: 0; color: var(--text-soft); font-size: 14px; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--text-soft); text-decoration: none; font-size: 14px; }
.footer-nav a:hover { color: var(--primary); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-lg);
  display: grid; gap: 12px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 14px; color: var(--text-soft); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Support pop-up (din 2 în 2 minute) ---------- */
.support-popup {
  position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px);
}
.support-popup[hidden] { display: none; }
.support-popup-card {
  position: relative; max-width: 420px; width: 100%; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-lg); animation: popIn .3s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
.support-popup-close {
  position: absolute; top: 10px; right: 12px; border: none; background: transparent;
  font-size: 24px; line-height: 1; color: var(--text-soft); cursor: pointer;
}
.support-popup-close:hover { color: var(--text); }
.support-popup-cup { font-size: 40px; line-height: 1; }
.support-popup-card h2 { margin: 10px 0 8px; font-size: clamp(20px, 3vw, 26px); }
.support-popup-card p { color: var(--text-soft); margin: 0 0 16px; }
.support-popup-card .kofi-btn { justify-content: center; }
.support-popup-handle { margin: 10px 0 0; font-size: 13px; color: var(--text-soft); }
.support-popup-handle a { color: var(--primary); }
.support-popup-later { margin-top: 12px; width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .preview-card { position: static; }
  .legal-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px;
    transform: translateY(-14px); opacity: 0; pointer-events: none;
    transition: transform .28s ease, opacity .28s ease;
    box-shadow: var(--shadow);
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 12px; font-size: 15px; }
  .main-nav a::after { left: 12px; right: auto; bottom: 8px; width: 24px; }
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .section { padding: 44px 0; }
}

/* ===================== Componente moderne / animații ===================== */

/* Hamburger animat */
.menu-toggle {
  display: none; margin-left: 8px; width: 42px; height: 42px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  position: relative; z-index: 60;
}
.menu-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* Indicator underline nav (scrollspy) */
.main-nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

/* Bară progres scroll */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 70;
  background: linear-gradient(90deg, var(--primary), var(--accent), #22d3ee);
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 60%, transparent);
}

/* Hero — gradient animat */
.hero {
  background:
    radial-gradient(1000px 460px at 82% -12%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 60%),
    radial-gradient(760px 420px at 8% 110%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%);
  background-size: 200% 200%;
  animation: heroFloat 14s ease-in-out infinite alternate;
}
@keyframes heroFloat {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* Buton înapoi sus */
.to-top {
  position: fixed; left: 18px; bottom: 18px; z-index: 60;
  width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 20px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(12px) scale(.9);
  pointer-events: none; transition: opacity .25s ease, transform .25s ease, background .15s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--primary); color: #fff; }

/* Card hover modern */
.card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Butoane cu strălucire la hover */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-120%); transition: transform .6s ease;
}
.btn-primary:hover::after { transform: translateX(120%); }

/* Respetează preferințele de mișcare redusă */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero { animation: none; }
  * { scroll-behavior: auto; }
}

/* ===================== Avocat Virtual (AI) — ștampilă/semnătură ===================== */
.lawyer-stamp {
  display: flex; gap: 16px; align-items: flex-start; margin: 30px 0 10px;
  padding: 18px 20px; border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--border));
  border-radius: var(--radius); background: var(--surface-2);
}
.stamp-seal { color: var(--primary); flex: 0 0 auto; line-height: 0; animation: sealPop .5s ease; }
@keyframes sealPop { from { transform: scale(.8) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.stamp-body { display: grid; gap: 4px; }
.stamp-body strong { font-size: 15px; }
.stamp-body > span { color: var(--text-soft); font-size: 13px; }
.sig-line { font-size: 13px; color: var(--text); margin-top: 4px; }
.sig-script {
  font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 20px;
  color: var(--primary-600); font-style: italic; letter-spacing: .3px;
}
.stamp-note { color: var(--text-soft); font-size: 11px; line-height: 1.45; margin-top: 6px; max-width: 60ch; }

/* ===================== Agent AI flotant (stânga jos) ===================== */
.ai-agent-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 95;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 16px 10px 10px; border-radius: 999px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  box-shadow: var(--shadow-lg); font-weight: 700; font-size: 14px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ai-agent-btn:hover { transform: translateY(-2px); }
.ai-agent-btn .ava {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: grid; place-items: center; font-size: 18px;
}
.ai-agent-btn::after {
  content: ""; position: absolute; right: 14px; top: 8px; width: 9px; height: 9px;
  border-radius: 50%; background: #22e07a; box-shadow: 0 0 0 0 rgba(34,224,122,.6);
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(34,224,122,.6); }
  70% { box-shadow: 0 0 0 8px rgba(34,224,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,224,122,0); }
}

.ai-agent-panel {
  position: fixed; right: 18px; bottom: 74px; z-index: 96; left: auto;
  width: min(360px, calc(100vw - 36px)); max-height: min(70vh, 520px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden;
}
.ai-agent-panel.open { display: flex; animation: panelUp .25s ease; }
@keyframes panelUp { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.ai-agent-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
}
.ai-agent-head .ava { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 16px; }
.ai-agent-head strong { font-size: 14px; display: block; }
.ai-agent-head small { font-size: 11px; opacity: .85; font-weight: 500; }
.ai-agent-close { margin-left: auto; background: transparent; border: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }

.ai-agent-msgs {
  padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface-2); flex: 1;
}
.msg-bubble { padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; max-width: 92%; }
.msg-bot { background: var(--surface); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-bubble a { color: var(--primary); }

.ai-agent-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); }
.ai-agent-input input {
  flex: 1; font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px;
}
.ai-agent-input input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  .ai-agent-btn::after { animation: none; }
  .ai-agent-panel.open { animation: none; }
}

/* Suggestion chips + typing indicator */
.ai-agent-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; background: var(--surface-2); }
.ai-agent-chips .chip {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); transition: border-color .15s, color .15s;
}
.ai-agent-chips .chip:hover { border-color: var(--primary); color: var(--primary); }
.msg-bubble.typing { opacity: .7; }
.msg-bubble.typing::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 5px; border-radius: 50%;
  background: currentColor; animation: typingDot 1s infinite;
}
@keyframes typingDot { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* ===================== Intro loader — semnătură cu stilou de aur ===================== */
.intro-loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(circle at 50% 38%, #1c2747 0%, #0b1120 70%);
  transition: opacity .6s ease;
}
.intro-loader.hide { opacity: 0; pointer-events: none; }

.sig-wrap { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.sig-stage { position: relative; display: inline-block; padding: 10px 6px; }
.sig-stage-2 { margin-top: 4px; }
.sigword {
  font: italic 700 clamp(62px, 13vw, 128px) "Brush Script MT", "Segoe Script", "Snell Roundhand", cursive;
  line-height: 1;
  padding: 0 0.35em;
  background: linear-gradient(100deg, #f6d365, #e9b646, #fff6c2, #e9b646, #f6d365);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(233, 182, 70, .35));
  clip-path: inset(0 100% 0 0);
  animation: sigWrite 3.4s cubic-bezier(.55,.1,.3,1) .2s forwards;
}
.sigword-2 {
  font-size: clamp(36px, 7vw, 68px);
  padding: 0 0.35em;
  animation: sigWrite 2.2s cubic-bezier(.55,.1,.3,1) 3.3s forwards;
}
@keyframes sigWrite { to { clip-path: inset(0 -12% 0 0); } }

.pen {
  position: absolute; top: 0; left: 0; z-index: 2; will-change: transform;
  font-size: clamp(26px, 5vw, 44px);
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.45));
  transform: translate(0, 0);
}

.sig-tag {
  color: #cbd5e1; font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
  opacity: 0; animation: sigTagIn 1s ease 5.4s forwards;
}
@keyframes sigTagIn { to { opacity: .8; } }

@media (prefers-reduced-motion: reduce) {
  .intro-loader { display: none; }
}
