/* MotionGen Blog – Base CSS
   Defines design tokens, button system, and mobile nav.
   Loaded before motiongen-article.css in every blog page. */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --font-mono: 'Geist Mono', ui-monospace, 'Courier New', monospace;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mg-color-accent: #ccff00;
  --mg-color-text: #ffffff;
}

html {
  font-family: var(--font-body);
  color: #fff;
  background: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
  white-space: nowrap;
  line-height: 1;
}

.ds-btn-primary {
  background: #ccff00;
  border-color: #ccff00;
  color: #000;
}
.ds-btn-primary:hover {
  background: #d7ff33;
  border-color: #d7ff33;
  transform: translateY(-1px);
  color: #000;
}

.ds-btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.82);
}
.ds-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  transform: translateY(-1px);
}

/* ─── Active nav link ───────────────────────────────────────────────────────── */

.mg-navlink--active {
  color: var(--mg-color-accent, #ccff00) !important;
  border-color: rgba(204, 255, 0, 0.28) !important;
  background: rgba(204, 255, 0, 0.06) !important;
}

/* ─── Mobile hamburger button ───────────────────────────────────────────────── */

.mg-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.15s;
}
.mg-hamburger:hover {
  background: rgba(255, 255, 255, 0.11);
}
@media (min-width: 980px) {
  .mg-hamburger { display: none; }
}
.mg-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.mg-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mg-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.mg-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile overlay ────────────────────────────────────────────────────────── */

.mg-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}
.mg-mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Mobile drawer ─────────────────────────────────────────────────────────── */

.mg-mobile-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #0c0c0c;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transform: translateY(100%);
  transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 20px);
}
.mg-mobile-drawer.open {
  transform: translateY(0);
}

.mg-drawer-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  margin: 14px auto 2px;
}

.mg-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 4px 24px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.mg-drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: color 0.15s;
}
.mg-drawer-nav a:first-child {
  border-top: none;
}
.mg-drawer-nav a:hover {
  color: #fff;
}
.mg-drawer-nav a::after {
  content: '→';
  font-size: 18px;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.15s, transform 0.15s;
}
.mg-drawer-nav a:hover::after {
  color: rgba(255, 255, 255, 0.5);
  transform: translateX(3px);
}

.mg-drawer-footer {
  padding: 16px 24px 8px;
}

.mg-drawer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  background: #ccff00;
  border: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}
.mg-drawer-cta:hover {
  background: #d7ff33;
  color: #000;
}
