/* ============================================================
   WoodsCop — Design Tokens
   A calm, natural forest palette: pine green, moss, warm paper
   and a soft terracotta accent. No neon, no glow-for-glow's-sake —
   simple, warm and legible in both themes. Token names
   (--accent-purple etc.) are kept from earlier builds so every
   file that references them just picks up these values.
   ============================================================ */

:root,
:root[data-theme="dark"] {
  --bg: #10201a;
  --bg-elevated: #17281f;
  --bg-panel: #1c2f25cc;
  --text: #f3efe3;
  --text-dim: #b7c9bc;
  --text-faint: #74897c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --accent-purple: #6fa87f;
  --accent-blue: #4f8f7a;
  --accent-red: #c65b4e;
  --accent-cyan: #d99a5b;

  --gradient-cosmic: linear-gradient(120deg, #6fa87f 0%, #4f8f7a 50%, #d99a5b 100%);
  --gradient-cosmic-soft: linear-gradient(120deg, rgba(111,168,127,.18) 0%, rgba(79,143,122,.18) 50%, rgba(217,154,91,.18) 100%);
  --gradient-radial-glow: radial-gradient(circle at 50% 30%, rgba(111,168,127,.20), transparent 60%);

  --glow-purple: rgba(111, 168, 127, 0.30);
  --glow-blue: rgba(79, 143, 122, 0.26);
  --glow-red: rgba(198, 91, 78, 0.26);
  --glow-cyan: rgba(217, 154, 91, 0.28);

  --shadow-panel: 0 20px 50px -22px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #faf6ec;
  --bg-elevated: #ffffff;
  --bg-panel: #ffffffe0;
  --text: #23301f;
  --text-dim: #56684f;
  --text-faint: #93a08c;
  --border: rgba(35, 48, 31, 0.09);
  --border-strong: rgba(35, 48, 31, 0.16);

  --accent-purple: #3f6b4a;
  --accent-blue: #3a7a68;
  --accent-red: #b6503f;
  --accent-cyan: #b6763a;

  --gradient-cosmic: linear-gradient(120deg, #3f6b4a 0%, #3a7a68 50%, #b6763a 100%);
  --gradient-cosmic-soft: linear-gradient(120deg, rgba(63,107,74,.12) 0%, rgba(58,122,104,.12) 50%, rgba(182,118,58,.12) 100%);
  --gradient-radial-glow: radial-gradient(circle at 50% 30%, rgba(63,107,74,.10), transparent 60%);

  --glow-purple: rgba(63, 107, 74, 0.16);
  --glow-blue: rgba(58, 122, 104, 0.14);
  --glow-red: rgba(182, 80, 63, 0.14);
  --glow-cyan: rgba(182, 118, 58, 0.16);

  --shadow-panel: 0 20px 50px -24px rgba(30, 40, 25, 0.16);
  color-scheme: light;
}

:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}

::selection { background: var(--accent-purple); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.gradient-text {
  background: var(--gradient-cosmic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Shared black footer — same on every page, independent of light/dark theme */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 26px 8vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  background: #000;
}

/* Theme toggle — shared across all pages */
.theme-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: transform .3s ease, box-shadow .3s ease;
}
.theme-toggle:hover { transform: scale(1.06); box-shadow: 0 6px 20px -6px var(--glow-purple); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* Custom cursor — a trailing ring + a tight core dot */
html.wc-custom-cursor,
html.wc-custom-cursor * { cursor: none !important; }

.wc-cursor-dot, .wc-cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
}
.wc-cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent-purple);
  transition: opacity .2s ease;
}
.wc-cursor-ring {
  width: 30px; height: 30px;
  border: 1.5px solid var(--accent-purple);
  transition: width .25s cubic-bezier(.16,1,.3,1), height .25s cubic-bezier(.16,1,.3,1),
              border-color .25s ease, background .25s ease, opacity .2s ease;
}
.wc-cursor-ring.wc-cursor-hover {
  width: 50px; height: 50px;
  border-color: var(--accent-cyan);
  background: var(--gradient-cosmic-soft);
}
.wc-cursor-ring.wc-cursor-click { width: 22px; height: 22px; }

@media (pointer: coarse) {
  .wc-cursor-dot, .wc-cursor-ring { display: none; }
}

/* Splash screen — shown briefly on every page load */
.wc-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity .6s ease, visibility .6s ease;
}
.wc-splash.wc-splash-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.wc-splash-inner {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wc-splash-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--accent-purple);
  border-right-color: var(--accent-cyan);
  animation: wcSplashSpin 1.1s linear infinite;
}
.wc-splash-logo {
  position: relative;
  width: 56px;
  height: auto;
  z-index: 1;
  animation: wcSplashPulse 1.6s ease-in-out infinite;
}
@keyframes wcSplashSpin { to { transform: rotate(360deg); } }
@keyframes wcSplashPulse {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  50% { transform: scale(1.05); opacity: 1; }
}
