/* ═══════════════════════════════════════════════════
   Bee Hive — Theme Foundation
   Shared design tokens, background effects, and base styles
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Nunito:wght@300;400;600&display=swap');

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

button:focus, a:focus, input:focus {
  outline: none;
}

/* ── Design Tokens ── */
:root {
  --bg: #2a2a2a;
  --card: rgba(255, 248, 230, 0.92);
  --card-shadow: rgba(0, 0, 0, 0.4);
  --text-primary: #3d2e0a;
  --text-muted: #9a8458;
  --honey: #e8a317;
  --honey-dark: #c48a0f;
  --honey-glow: #f5c042;
  --honey-light: rgba(232, 163, 23, 0.15);
  --comb: #f0d68a;
  --comb-stroke: rgba(196, 138, 15, 0.25);
  --input-bg: rgba(240, 214, 138, 0.25);
  --input-border: rgba(196, 138, 15, 0.3);
  --input-focus: #e8a317;
  --divider: rgba(196, 138, 15, 0.25);
}

/* ── Base ── */
html {
  height: 100%;
}

body {
  min-height: 100%;
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text-primary);
  position: relative;
}

/* ── Honeycomb background pattern ── */
.honeycomb-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.honeycomb-bg svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.09;
}

/* ── Ambient honey glow ── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient::before {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: radial-gradient(circle, rgba(232, 163, 23, 0.12) 0%, rgba(245, 192, 66, 0.04) 50%, transparent 80%);
  top: -80px;
  right: -60px;
  animation: drift1 20s ease-in-out infinite;
}

.ambient::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: radial-gradient(circle, rgba(232, 163, 23, 0.09) 0%, rgba(196, 138, 15, 0.03) 50%, transparent 80%);
  bottom: -80px;
  left: -40px;
  animation: drift2 25s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.15); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -50px) scale(1.1); }
}

/* ── Floating hexagons ── */
.hex-float {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

.hex-float .hex {
  position: absolute;
  opacity: 0;
  animation: hexFloat linear infinite;
}

.hex-float .hex svg {
  filter: drop-shadow(0 0 6px rgba(232, 163, 23, 0.3));
}

@keyframes hexFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) rotate(0deg);
  }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% {
    opacity: 0;
    transform: translateY(-100px) rotate(180deg);
  }
}

/* ── Grain texture ── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(42, 42, 42, 0.4);
}

::-webkit-scrollbar-thumb {
  background: var(--honey-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--honey);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--honey-dark) rgba(42, 42, 42, 0.4);
}

/* ── Selection ── */
::selection {
  background: rgba(232, 163, 23, 0.35);
  color: var(--text-primary);
}
