/* SemAI — shared tokens & components */
:root {
  --navy: #0b1533;
  --navy-2: #13204a;
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e6e9f2;
  --bg: #f7f8fc;
  --white: #fff;
  --blue: #1d5cff;
  --blue-2: #2563eb;
  --mint: #19c6a7;
  --mint-soft: #e3f8f3;
  --lilac: #8b5cf6;
  --lilac-soft: #efeafe;
  --amber: #f59e0b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 24px rgba(15, 23, 42, .06);
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.gradient-text {
  background: linear-gradient(90deg, #19c6a7 0%, #3b82f6 55%, #8b5cf6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap; transition: .18s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #1b2a5c; }
.btn-outline { background: #fff; border-color: #cfd5e3; color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-blue { background: var(--blue); color: #fff; border-radius: 10px; }
.btn-blue:hover { background: #1747cc; }
.btn-mint { background: #2ee0bd; color: var(--navy); }
.btn-mint:hover { background: #1fcfac; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 13.5px; font-weight: 500; transition: .15s;
}
.chip:hover { border-color: #b9c2d8; }
.chip.is-on { border-color: var(--mint); background: var(--mint-soft); color: #0f766e; }

.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; background: #e8eefe; color: var(--blue-2);
}

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; }
.logo img { height: 46px; width: auto; }

/* ---------- shared top bar (rendered by assets/js/layout.js) ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; height: 68px;
  display: flex; align-items: center; gap: 36px; padding: 0 28px; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.tb-logo { display: inline-flex; flex: none; }
.tb-logo img { height: 38px; width: auto; }
.tb-nav { display: flex; gap: 10px; align-self: stretch; flex: 1; justify-content: center; }
.tb-nav a {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 15px; font-weight: 500; color: #1e293b;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tb-nav a svg { width: 18px; height: 18px; }
.tb-nav a:hover { color: var(--ink); }
.tb-nav a.is-active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.tb-nav .tb-cta-m { display: none; }
.tb-right { display: flex; align-items: center; gap: 18px; flex: none; }
.tb-lang { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #94a3b8; }
.tb-lang button { border: 0; background: none; padding: 2px 3px; color: #94a3b8; font-weight: 600; font-size: 13px; }
.tb-lang button.is-on { color: var(--blue); }
.tb-sep { width: 1px; height: 26px; background: #e2e6ef; }
.tb-cta { border-radius: 8px; height: 40px; }
.tb-menu { display: none; border: 0; background: none; width: 40px; height: 40px; place-items: center; color: var(--ink); border-radius: 10px; }
.tb-menu svg { width: 24px; height: 24px; }
.tb-nav a:focus-visible, .tb-menu:focus-visible, .tb-lang button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 860px) {
  .topbar { gap: 12px; padding: 0 16px; height: 60px; }
  .tb-logo img { height: 32px; }
  .tb-right { margin-left: auto; gap: 8px; }
  .tb-cta, .tb-sep { display: none !important; }
  .tb-menu { display: grid; }
  .tb-nav {
    justify-content: flex-start;
    display: none; position: absolute; top: 100%; left: 12px; right: 12px; flex-direction: column; gap: 2px; padding: 10px;
    background: #fff; border-radius: 16px; box-shadow: 0 16px 40px rgba(15,23,42,.14); align-self: auto;
  }
  .tb-nav.is-open { display: flex; }
  .tb-nav a { padding: 12px; border-radius: 10px; border-bottom: 0; margin: 0; }
  .tb-nav a.is-active { background: #eef3ff; }
  .tb-nav .tb-cta-m { display: inline-flex; margin-top: 6px; color: #fff; justify-content: center; }
}

/* ---------- small shared bits ---------- */
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: #334155; }
.icon-btn:hover { background: #f1f3f8; }
.icon-btn svg { width: 22px; height: 22px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--blue); color: #fff; font-weight: 700; font-size: 14px; }

/* ---------- toggles ---------- */
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { appearance: none; margin: 0; width: 100%; height: 100%; border-radius: 99px; background: #d7dce7; cursor: pointer; transition: .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.switch input:checked { background: var(--mint); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.field-select {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font-size: 14px; color: var(--ink);
}
.field-select select { appearance: none; border: 0; outline: 0; background: transparent; font: inherit; color: inherit; flex: 1; cursor: pointer; }
.field-select svg { width: 18px; height: 18px; color: var(--muted); flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
