/* ==========================================================================
   Bay Color — custom cursor (dot + ring)
   Brand blue #0953aa, turns brand green #7fbc09 over buttons,
   "View" label over client cards. Fine-pointer devices only (JS gate).
   Script: /js/cursor.js (loaded from the footer snippet).
   ========================================================================== */

:root {
  --bc-cursor-blue: #0953aa;
  --bc-cursor-green: #7fbc09;
  --bc-cursor-halo: #ffffff;
}

/* Hide the native pointer only while the custom one is running
   (class is added by JS after the first mouse move, so a JS failure
   never leaves the visitor without a pointer). */
html.bc-cursor-active,
html.bc-cursor-active * {
  cursor: none !important;
}

/* Text fields, selects and editable areas keep the native I-beam / arrow.
   Mirrors nativeSelector in cursor.js: checkboxes, radios and submit/button
   inputs are NOT listed, so they get the custom cursor and never show both. */
html.bc-cursor-active :is(
  input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
  textarea,
  select,
  [contenteditable="true"]
) {
  cursor: auto !important;
}

.bc-cursor {
  --bc-c: var(--bc-cursor-blue);
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.bc-cursor.is-visible {
  opacity: 1;
}

/* Native pointer takes over (inputs, iframes). */
.bc-cursor[data-state="native"] {
  opacity: 0;
}

.bc-cursor__dot,
.bc-cursor__ring {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

/* ---- Dot ---------------------------------------------------------------- */
.bc-cursor__dot-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bc-c);
  /* White halo keeps the dot visible on the blue hero and footer. */
  box-shadow: 0 0 0 2px var(--bc-cursor-halo);
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

/* ---- Ring --------------------------------------------------------------- */
.bc-cursor__ring-shape {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--bc-c);
  border-radius: 50%;
  background: transparent;
  /* Outer + inner white line so the ring reads on any background. */
  box-shadow: 0 0 0 1px var(--bc-cursor-halo), inset 0 0 0 1px var(--bc-cursor-halo);
  transform: translate(-50%, -50%) scale(1);
  transition:
    width 0.25s ease,
    height 0.25s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.bc-cursor__label {
  font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.25s ease;
  white-space: nowrap;
}

/* ---- States ------------------------------------------------------------- */

/* Link: ring grows a little, stays blue. */
.bc-cursor[data-state="link"] .bc-cursor__ring-shape {
  width: 48px;
  height: 48px;
}

/* Button: everything turns green, ring grows and gets a soft fill. */
.bc-cursor[data-state="button"] {
  --bc-c: var(--bc-cursor-green);
}

.bc-cursor[data-state="button"] .bc-cursor__ring-shape {
  width: 56px;
  height: 56px;
  background: rgba(127, 188, 9, 0.18);
}

/* View: filled blue disc with a label, the dot steps aside. */
.bc-cursor[data-state="view"] .bc-cursor__ring-shape {
  width: 88px;
  height: 88px;
  background: var(--bc-cursor-blue);
  border-color: var(--bc-cursor-halo);
}

.bc-cursor[data-state="view"] .bc-cursor__label {
  opacity: 1;
  transform: scale(1);
}

.bc-cursor[data-state="view"] .bc-cursor__dot-shape {
  transform: translate(-50%, -50%) scale(0);
}

/* Pressed. */
.bc-cursor.is-down .bc-cursor__ring-shape {
  transform: translate(-50%, -50%) scale(0.85);
}

.bc-cursor.is-down .bc-cursor__dot-shape {
  transform: translate(-50%, -50%) scale(0.7);
}

.bc-cursor[data-state="view"].is-down .bc-cursor__dot-shape {
  transform: translate(-50%, -50%) scale(0);
}

@media (prefers-reduced-motion: reduce) {
  .bc-cursor,
  .bc-cursor * {
    transition: none !important;
  }
}
