/* ------------------------------------------------------
   Global Utilities — BenCode Studio
   Shared root variables + base helper classes
------------------------------------------------------ */

:root {
  --purple: #6a1b9a;
  --purple-dark: #4a148c;
  --gold: #ffdf37;
  --gray: #555;
  --gray-light: #f7f7f7;
  --text-color: #333;
  --bg-color: #ffffff;
  --dark: #333;
  --light: #f9f9f9;
  --font-stack: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --purple-soft: rgba(124, 58, 237, 0.08);
  --shadow-soft: 0 12px 42px rgba(106, 27, 154, 0.15);
}

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

body {
  margin: 0;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-stack);
  line-height: 1.6;
  font-size: 16px;
}

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

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--purple);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6e2cff, #a855f7);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 18px rgba(106, 27, 154, 0.3);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  z-index: 9999;
  white-space: nowrap;
}

#back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#back-to-top:hover {
  box-shadow: 0 10px 28px rgba(106, 27, 154, 0.35);
  transform: translateY(-2px);
}

#back-to-top:focus {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap,
.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

.btn {
  border: none;
  padding: 0.9rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.25s ease;
  font-size: 16px;
}

.btn-primary,
.btn.primary {
  background: var(--purple);
  color: white;
}

.btn-primary:hover,
.btn.primary:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(106, 27, 154, 0.25);
}

.btn-outline,
.btn.ghost {
  border: 2px solid var(--purple);
  color: var(--purple);
  background: transparent;
}

.btn-outline:hover,
.btn.ghost:hover {
  background: var(--purple);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(106, 27, 154, 0.2);
}
