/* ── SmartText Website — Global Styles ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

:root {
  --bg: #f7f6f2;
  --bg2: #eeecea;
  --bg3: #e4e2dd;
  --surface: #ffffff;
  --border: #dddbd6;
  --text: #1c1917;
  --text2: #57534e;
  --text3: #a8a29e;
  --accent: #5b21b6;
  --accent2: #7c3aed;
  --accent3: #ede9fe;
  --green: #15803d;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --radius: 12px;
  --radius-sm: 7px;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --t: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #0d0d12;
  --bg2: #13131a;
  --bg3: #1a1a24;
  --surface: #16161f;
  --border: #2a2a3a;
  --text: #f0effe;
  --text2: #9d9ab5;
  --text3: #4a4862;
  --accent: #7c3aed;
  --accent2: #a78bfa;
  --accent3: #1e1a3a;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  transition: background var(--t), color var(--t);
}

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  background: rgba(247,246,242,0.88);
  transition: background var(--t);
}
[data-theme="dark"] .nav { background: rgba(13,13,18,0.9); }
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 24px;
}
.nav-logo {
  font-family: var(--font-display); font-size: 20px;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 9px;
}
.logo-a {
  width: 30px; height: 30px; background: var(--accent); color: #fff;
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link {
  color: var(--text2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 12px; border-radius: var(--radius-sm); transition: all var(--t);
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--bg2); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: all var(--t); border: none;
  font-family: var(--font-body); letter-spacing: 0.1px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,58,237,0.35); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg2); color: var(--text); }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: 10px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

.theme-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text2); width: 34px; height: 34px;
  border-radius: 8px; cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
}
.theme-btn:hover { background: var(--bg2); color: var(--text); }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 740px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 400;
  line-height: 1.18; letter-spacing: -0.02em; color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { color: var(--text2); }

/* ── Badges ── */
.tag {
  display: inline-flex; align-items: center;
  background: var(--accent3); color: var(--accent2);
  padding: 3px 11px; border-radius: 20px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-new { background: #dcfce7; color: #15803d; }
[data-theme="dark"] .badge-new { background: #14532d; color: #4ade80; }

/* ── Code ── */
code {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px;
  font-family: 'SF Mono','Fira Code',monospace; font-size: 0.87em;
  color: var(--accent2);
}
pre {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
  overflow-x: auto; font-size: 14px; line-height: 1.75;
}
pre code { background: none; border: none; padding: 0; color: var(--text); }
kbd {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 7px; font-size: 12px;
  font-family: var(--font-body); font-weight: 600; color: var(--text2);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 52px 0; background: var(--bg);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: start;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-tagline { font-size: 13px; color: var(--text3); max-width: 280px; line-height: 1.5; }
.footer-cols { display: flex; gap: 48px; }
.footer-col h4 {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--text3);
  margin-bottom: 12px;
}
.footer-col a {
  display: block; color: var(--text2); text-decoration: none;
  font-size: 13px; margin-bottom: 8px; transition: color var(--t);
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1100px; margin: 32px auto 0; padding: 24px 24px 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 13px; color: var(--text3); }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 48px 0; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.55s ease both; }
.fade-up-2 { animation: fadeUp 0.55s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.55s 0.2s ease both; }
.fade-up-4 { animation: fadeUp 0.55s 0.3s ease both; }
