/* ============================================================
   Budj — shared base styles
   Used by: index.html, changelog/index.html
   ============================================================ */

:root {
  --bg: #f8f9fe;
  --surface: #ffffff;
  --surface-warm: #eef0fa;
  --text: #1a1a2e;
  --text-muted: #5e5e7a;
  --border: #e0e0ee;
  --accent: #5c6bc0;
  --accent-dark: #3949ab;
  --accent-soft: #e8eaf6;
  --accent-contrast: #ffffff;
  --coral: #7e57c2;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(30, 30, 60, 0.06);
  --shadow-md: 0 12px 32px rgba(30, 30, 60, 0.08);
  --shadow-lg: 0 30px 80px rgba(30, 30, 60, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ NAV ============ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(251, 250, 246, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(92, 107, 192, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast) !important;
  box-shadow: 0 6px 16px rgba(92, 107, 192, 0.28);
}

.btn-primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(92, 107, 192, 0.32);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  text-decoration: none;
}

/* ============ BURGER / MOBILE DRAWER ============ */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}

.nav-drawer {
  display: none;
  flex-direction: column;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
}

.nav-drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 500;
  padding: 13px 8px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.nav-drawer a::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: border-color 0.15s ease;
  opacity: 0.5;
}

.nav-drawer a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-drawer a:hover::after {
  border-color: var(--accent);
}

.nav-drawer a:last-child {
  border-bottom: none;
  padding-top: 16px;
}

/* Open state */
.nav.open .nav-drawer {
  display: flex;
}

.nav.open .nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.open .nav-burger span:nth-child(2) {
  opacity: 0;
}

.nav.open .nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 720px) {
  .nav-links {
    gap: 14px;
    margin-left: auto;
    margin-right: 16px;
  }

  .nav-links a:not(.btn) {
    display: none;
  }

  .nav-burger {
    display: flex;
  }
}

/* ============ LAYOUT ============ */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ FOOTER ============ */

footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}
