/* ============================================
   UK Politics — Stylesheet
   ============================================ */

/* --- Custom Properties --- */
:root {
  --core: #4444CC;
  --core-dark: #3333AA;
  --core-light: #5555DD;
  --auth-right: #42AAFF;
  --auth-left: #FF7575;
  --lib-left: #9AED97;
  --lib-right: #C09AEA;
  --black: #0D0D0D;
  --white: #FFFFFF;
  --white-alpha-10: rgba(255, 255, 255, 0.10);
  --white-alpha-15: rgba(255, 255, 255, 0.15);
  --white-alpha-20: rgba(255, 255, 255, 0.20);
  --white-alpha-50: rgba(255, 255, 255, 0.50);
  --white-alpha-80: rgba(255, 255, 255, 0.80);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  color: var(--white);
  background: var(--core);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }
img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* --- Grid Paper Background --- */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--white-alpha-10) 1px, transparent 1px),
    linear-gradient(90deg, var(--white-alpha-10) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 40%, transparent 100%);
}

/* Subtle animated drift on the grid */
@supports (animation-name: gridDrift) {
  .grid-bg {
    animation: gridDrift 30s linear infinite;
  }
}

@keyframes gridDrift {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 40px 40px, 40px 40px; }
}

/* --- Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(68, 68, 204, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--white-alpha-10);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  z-index: 101;
}

/* Mini compass icon */
.compass-icon {
  width: 28px;
  height: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.compass-icon .q {
  display: block;
  border-radius: 1px;
}

.compass-icon .q-al { background: var(--auth-left); }
.compass-icon .q-ar { background: var(--auth-right); }
.compass-icon .q-ll { background: var(--lib-left); }
.compass-icon .q-lr { background: var(--lib-right); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: opacity var(--transition);
}

.nav-links a:not(.btn):hover {
  opacity: 0.8;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-links a:not(.btn):hover::after {
  width: 100%;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-join {
  background: var(--white);
  color: var(--core);
}

.btn-join:hover {
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
}

/* Nav join link (no highlight) */
.nav-join {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  opacity: 0.9;
  transition: opacity var(--transition);
}

.nav-join:hover {
  opacity: 1;
}

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

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white-alpha-50);
}

.btn-outline:hover {
  background: var(--white-alpha-10);
  border-color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--core);
}

.btn-white:hover {
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.3);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius);
}

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.2));
}

.hero-content {
  flex: 1;
  max-width: 580px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white-alpha-15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--white-alpha-20);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lib-left);
  display: inline-block;
  position: relative;
}

@supports (animation-name: pulse) {
  .pulse-dot::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--lib-left);
    opacity: 0.5;
    animation: pulse 2s ease-in-out infinite;
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.8); opacity: 0; }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--auth-right), var(--lib-left), var(--lib-right));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animated gradient shift */
@supports (animation-name: gradientShift) {
  .gradient-text {
    background-size: 200% 200%;
    animation: gradientShift 6s ease-in-out infinite;
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--white-alpha-80);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Entrance Animations --- */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
}

@supports (animation-name: fadeInUp) {
  .animate-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .delay-1 { animation-delay: 0.15s; }
  .delay-2 { animation-delay: 0.3s; }
  .delay-3 { animation-delay: 0.45s; }
}

/* Fallback for no animation support */
@supports not (animation-name: fadeInUp) {
  .animate-in {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: if JS doesn't load, show content */
.no-js .scroll-reveal {
  opacity: 1;
  transform: none;
}

/* --- Hero Visual / Political Compass --- */
.hero-visual {
  flex: 0 0 auto;
}

/* --- UK Map --- */
.uk-map {
  position: relative;
  width: 360px;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uk-map-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.45;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
}

/* Subtle glow */
@supports (animation-name: mapGlow) {
  .uk-map-img {
    animation: mapGlow 4s ease-in-out infinite;
  }
}

@keyframes mapGlow {
  0%, 100% { opacity: 0.45; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.12)); }
  50%      { opacity: 0.6; filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.2)); }
}

/* Floating animation reuse */
@supports (animation-name: float) {
  .uk-map {
    animation: float 6s ease-in-out infinite;
  }
}

.compass-visual {
  position: relative;
  width: 320px;
  height: 320px;
}

.compass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.compass-quadrant {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
}

.cq-al { background: var(--auth-left); border-radius: var(--radius-lg) 0 0 0; }
.cq-ar { background: var(--auth-right); border-radius: 0 var(--radius-lg) 0 0; }
.cq-ll { background: var(--lib-left); border-radius: 0 0 0 var(--radius-lg); }
.cq-lr { background: var(--lib-right); border-radius: 0 0 var(--radius-lg) 0; }

.compass-quadrant::after {
  content: attr(data-label);
  position: absolute;
  bottom: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compass-axis {
  position: absolute;
  background: var(--white);
  opacity: 0.6;
  border-radius: 2px;
}

.compass-axis-h {
  top: 50%;
  left: 5%;
  right: 5%;
  height: 2px;
  transform: translateY(-50%);
}

.compass-axis-v {
  left: 50%;
  top: 5%;
  bottom: 5%;
  width: 2px;
  transform: translateX(-50%);
}

.compass-center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--white);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
}

/* Animated glow on center dot */
@supports (animation-name: centerGlow) {
  .compass-center-dot {
    animation: centerGlow 3s ease-in-out infinite;
  }
}

@keyframes centerGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 255, 255, 0.4); }
  50%      { box-shadow: 0 0 28px rgba(255, 255, 255, 0.8); }
}

.axis-label {
  position: absolute;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white-alpha-50);
}

.axis-label-top    { top: -24px; left: 50%; transform: translateX(-50%); }
.axis-label-bottom { bottom: -24px; left: 50%; transform: translateX(-50%); }
.axis-label-left   { left: -48px; top: 50%; transform: translateY(-50%); }
.axis-label-right  { right: -48px; top: 50%; transform: translateY(-50%); }

/* Floating animation for compass */
@supports (animation-name: float) {
  .compass-visual {
    animation: float 6s ease-in-out infinite;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* --- Mouse Scroll Indicator --- */
.scroll-indicator {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 32px;
}

.scroll-indicator span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white-alpha-50);
}

.mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--white-alpha-50);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.mouse-wheel {
  width: 3px;
  height: 8px;
  background: var(--white-alpha-80);
  border-radius: 2px;
}

@supports (animation-name: scrollWheel) {
  .mouse-wheel {
    animation: scrollWheel 2s ease-in-out infinite;
  }
}

@keyframes scrollWheel {
  0%   { opacity: 1; transform: translateY(0); }
  50%  { opacity: 0.3; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Sections --- */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}

.section-container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--white-alpha-80);
  max-width: 600px;
  margin: 0 auto 56px;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white-alpha-10);
  border: 1px solid var(--white-alpha-15);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  background: var(--white-alpha-15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--accent, var(--white));
}

/* Fallback for color-mix */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .feature-icon {
    background: var(--white-alpha-15);
  }
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--white-alpha-80);
  line-height: 1.6;
}

/* --- Stats Section --- */
.stats-section {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.15) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-card {
  padding: 40px 20px;
  background: var(--white-alpha-10);
  border: 1px solid var(--white-alpha-15);
  border-radius: var(--radius);
  transition: transform var(--transition);
}

.stat-card:hover {
  transform: scale(1.03);
}

.stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.stat-number::after {
  content: '+';
}

.stat-label {
  font-size: 0.85rem;
  color: var(--white-alpha-50);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Rules Section --- */
.rules-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 28px;
  background: var(--white-alpha-10);
  border: 1px solid var(--white-alpha-15);
  border-radius: var(--radius);
  transition: transform var(--transition), background var(--transition);
}

.rule-item:hover {
  transform: translateX(4px);
  background: var(--white-alpha-15);
}

.rule-number {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white-alpha-20);
  flex-shrink: 0;
  min-width: 36px;
}

.rule-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.rule-item p {
  font-size: 0.9rem;
  color: var(--white-alpha-80);
  line-height: 1.5;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
}

.cta-container {
  position: relative;
  background: var(--white-alpha-10);
  border: 1px solid var(--white-alpha-20);
  border-radius: var(--radius-lg);
  padding: 72px 40px;
  overflow: hidden;
}

.cta-container h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-container p {
  color: var(--white-alpha-80);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

/* Decorative floating quadrant blobs */
.cta-compass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cta-q {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  opacity: 0.12;
  filter: blur(60px);
}

.cta-q-1 { background: var(--auth-right); top: -40px; right: -40px; }
.cta-q-2 { background: var(--auth-left); top: -40px; left: -40px; }
.cta-q-3 { background: var(--lib-left); bottom: -40px; left: -40px; }
.cta-q-4 { background: var(--lib-right); bottom: -40px; right: -40px; }

@supports (animation-name: blobFloat) {
  .cta-q-1 { animation: blobFloat 8s ease-in-out infinite; }
  .cta-q-2 { animation: blobFloat 8s ease-in-out 2s infinite; }
  .cta-q-3 { animation: blobFloat 8s ease-in-out 4s infinite; }
  .cta-q-4 { animation: blobFloat 8s ease-in-out 6s infinite; }
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(20px, -20px) scale(1.1); }
  66%      { transform: translate(-10px, 15px) scale(0.95); }
}

/* --- Footer --- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--white-alpha-10);
  padding: 32px 24px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--white-alpha-50);
}

.footer-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--white-alpha-50);
  transition: color var(--transition);
}

.footer-login:hover {
  color: var(--white-alpha-80);
}

/* --- Login Page --- */
.login-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--white-alpha-10);
  border: 1px solid var(--white-alpha-15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
}

.login-compass {
  width: 48px;
  height: 48px;
  margin: 0 auto 24px;
  gap: 3px;
  border-radius: 8px;
}

.login-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--white-alpha-50);
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white-alpha-80);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--white-alpha-10);
  border: 1px solid var(--white-alpha-20);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder {
  color: var(--white-alpha-50);
}

.form-group input:focus {
  border-color: var(--white-alpha-50);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.login-btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--white-alpha-50);
  font-size: 0.8rem;
  font-weight: 500;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--white-alpha-15);
}

.btn-discord {
  width: 100%;
  justify-content: center;
  background: #5865F2;
  color: var(--white);
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-discord:hover {
  transform: none;
  box-shadow: none;
}

/* --- Cursor Flare --- */
.cursor-flare {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

.cursor-flare.visible {
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 140px;
    gap: 48px;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .compass-visual {
    width: 260px;
    height: 260px;
  }

  .compass-about-layout {
    gap: 40px;
  }

  .compass-about-visual {
    position: static;
  }

  .uk-map {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .login-card {
    padding: 36px 24px;
  }

  .login-section {
    padding: 100px 16px 60px;
  }

  .cursor-flare {
    display: none;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(50, 50, 160, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 24px;
    font-size: 1.1rem;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
    z-index: 100;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .compass-visual {
    width: 220px;
    height: 220px;
  }

  .uk-map {
    display: none;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .cta-container {
    padding: 48px 24px;
  }

  .section {
    padding: 72px 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 28px 16px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .rule-full-body {
    padding-left: 0;
  }

  .rule-full-header {
    flex-direction: column;
    gap: 4px;
  }

  .rules-hero {
    padding: 140px 20px 48px;
  }

  .site-banner-inner {
    flex-wrap: wrap;
    font-size: 0.8rem;
    padding: 10px 16px;
    text-align: center;
    gap: 4px;
  }

  .site-banner-close {
    padding: 0 0 0 8px;
  }

  .site-popup {
    padding: 32px 24px;
    margin: 16px;
  }

  .site-popup h2 {
    font-size: 1.1rem;
  }

  .site-popup p {
    font-size: 0.88rem;
  }

  .about-hero {
    padding: 140px 20px 48px;
  }

  .compass-about-layout {
    flex-direction: column;
    align-items: center;
  }

  .compass-about-visual {
    position: static;
  }

  .compass-about-visual .compass-visual {
    width: 220px;
    height: 220px;
    margin: 0 auto;
  }

  .quadrant-display {
    min-height: auto;
    position: relative;
  }

  .quadrant-display .quadrant-card {
    position: relative;
    display: none;
  }

  .quadrant-display .quadrant-card.active {
    display: block;
    opacity: 1;
    transform: none;
  }

  .quadrant-card h3 {
    font-size: 1rem;
  }

  .quadrant-card p {
    font-size: 0.85rem;
  }
}

/* --- About Page --- */
.about-hero {
  position: relative;
  z-index: 1;
  padding: 160px 24px 64px;
  text-align: center;
}

.about-hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.about-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.about-hero-subtitle {
  color: var(--white-alpha-80);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

.about-detail-section .about-block {
  max-width: 700px;
  margin: 0 auto 48px;
}

.about-detail-section .about-block:last-child {
  margin-bottom: 0;
}

.about-block h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.about-block p {
  font-size: 0.95rem;
  color: var(--white-alpha-80);
  line-height: 1.75;
  margin-bottom: 12px;
}

.about-block p:last-child {
  margin-bottom: 0;
}

.about-block a {
  color: var(--auth-right);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity var(--transition);
}

.about-block a:hover {
  opacity: 0.8;
}

/* Compass on About page */
.compass-about-layout {
  display: flex;
  align-items: flex-start;
  gap: 80px;
  margin-top: 48px;
}

.compass-about-visual {
  flex-shrink: 0;
  position: sticky;
  top: 100px;
}

/* Interactive compass quadrant highlighting */
.compass-interactive .compass-quadrant {
  cursor: pointer;
  transition: opacity var(--transition), filter var(--transition);
}

.compass-interactive.has-active .compass-quadrant {
  opacity: 0.4;
  filter: saturate(0.5);
}

.compass-interactive.has-active .compass-quadrant.quadrant-active {
  opacity: 1;
  filter: saturate(1);
}

/* Quadrant display — only show active panel */
.quadrant-display {
  flex: 1;
  position: relative;
  min-height: 320px;
}

.quadrant-display .quadrant-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  background: var(--white-alpha-10);
  border: 1px solid var(--white-alpha-15);
  border-left: 4px solid var(--q-color, var(--white-alpha-50));
  border-radius: var(--radius);
  padding: 28px 28px;
}

.quadrant-display .quadrant-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Progress bar */
.quadrant-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--white-alpha-10);
  border-radius: 2px;
  overflow: hidden;
}

.quadrant-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--white-alpha-50);
  transition: width 0.1s linear;
}

.quadrant-card .quadrant-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--q-color, var(--white));
  margin-bottom: 12px;
}

.quadrant-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.quadrant-card p {
  font-size: 0.9rem;
  color: var(--white-alpha-80);
  line-height: 1.7;
}

/* --- Home page rules CTA --- */
.rules-cta {
  text-align: center;
  margin-top: 40px;
}

/* --- Nav active state --- */
.nav-active {
  opacity: 1;
}

.nav-active::after {
  width: 100% !important;
}

/* --- Rules Page --- */
.rules-hero {
  position: relative;
  z-index: 1;
  padding: 160px 24px 64px;
  text-align: center;
}

.rules-hero-content {
  max-width: 680px;
  margin: 0 auto;
}

.rules-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.rules-hero-subtitle {
  color: var(--white-alpha-80);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

.rules-page-content {
  position: relative;
  z-index: 1;
  padding: 40px 24px 100px;
}

.rules-page-container {
  max-width: 760px;
  margin: 0 auto;
}

.rules-preamble {
  background: var(--white-alpha-10);
  border: 1px solid var(--white-alpha-15);
  border-left: 4px solid var(--auth-right);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  margin-bottom: 48px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--white-alpha-80);
}

/* Individual rule blocks */
.rule-full {
  margin-bottom: 40px;
}

.rule-full-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.rule-full-number {
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--white-alpha-20);
  min-width: 32px;
  padding-top: 3px;
}

.rule-full-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

.rule-full-body {
  padding-left: 48px;
}

.rule-full-body p {
  font-size: 0.93rem;
  color: var(--white-alpha-80);
  line-height: 1.75;
  margin-bottom: 12px;
}

.rule-full-body p:last-child {
  margin-bottom: 0;
}

.rule-full-body ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.rule-full-body ul li {
  position: relative;
  padding-left: 20px;
  font-size: 0.93rem;
  color: var(--white-alpha-80);
  line-height: 1.75;
  margin-bottom: 6px;
}

.rule-full-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white-alpha-50);
}

.rule-full-body a {
  color: var(--auth-right);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity var(--transition);
}

.rule-full-body a:hover {
  opacity: 0.8;
}

.rule-full-body strong {
  color: var(--white);
  font-weight: 600;
}

/* Enforcement section */
.rules-enforcement {
  background: var(--white-alpha-10);
  border: 1px solid var(--white-alpha-15);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin-top: 56px;
  margin-bottom: 48px;
}

.rules-enforcement h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.rules-enforcement p {
  font-size: 0.93rem;
  color: var(--white-alpha-80);
  line-height: 1.75;
  margin-bottom: 10px;
}

.rules-enforcement p:last-child {
  margin-bottom: 0;
}

/* Rules page CTA */
.rules-join-cta {
  text-align: center;
  padding: 56px 0 0;
}

.rules-join-cta h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.rules-join-cta p {
  color: var(--white-alpha-80);
  margin-bottom: 24px;
  font-size: 1rem;
}

/* Stagger reveal for rule articles */
.rule-full:nth-child(odd) .rule-full-header {
  border-left: 0;
}

/* --- Announcement Banner --- */
.site-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
}

.site-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.site-banner-inner strong {
  font-weight: 700;
}

.site-banner-inner a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.site-banner-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 0 0 16px;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.site-banner-close:hover {
  opacity: 1;
}

/* --- Announcement Popup --- */
.site-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.site-popup {
  background: var(--core);
  border: 1px solid var(--white-alpha-20);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
  position: relative;
  text-align: center;
}

.site-popup h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.site-popup p {
  font-size: 0.95rem;
  color: var(--white-alpha-80);
  line-height: 1.7;
  margin-bottom: 20px;
}

.site-popup-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--white);
  color: var(--core);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: box-shadow var(--transition);
}

.site-popup-link:hover {
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
}

.site-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--white-alpha-50);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition);
}

.site-popup-close:hover {
  color: var(--white);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
  }

  .animate-in {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
