/* =========================================================
   UI.CSS — Custom scrollbar + custom cursor
   ========================================================= */

/* ===== 1. Custom Styled Scrollbar (slick + good UX) ===== */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--green) var(--navy);
}

/* WebKit / Blink (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  border-radius: 6px;
  border: 3px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--green-dark), var(--navy));
}

::-webkit-scrollbar-corner {
  background: var(--bg);
}

/* ===== 2. Custom Cursor (dot + ring following pointer) ===== */
body {
  cursor: none;
}

body,
a,
button,
input,
textarea,
select,
label,
summary {
  cursor: none;
}

/* Hide default cursor while custom cursor is active */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1400;
  transform: translate(-50%, -50%);
  will-change: transform;
}

/* Small solid dot — follows pointer exactly */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--navy);
  border-radius: 50%;
}

/* Larger trailing ring — follows with slight lag (nice feel) */
.cursor-ring {
  width: 34px;
  height: 34px;
  border: 2px solid var(--green);
  border-radius: 50%;
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              border-color 0.25s var(--ease), background 0.25s var(--ease);
}

/* Grow ring when hovering interactive elements */
.cursor-ring.hovering {
  width: 52px;
  height: 52px;
  border-color: var(--green-dark);
  background: rgba(105, 159, 71, 0.18);
}

/* Hide custom cursor on touch devices (no mouse) */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot,
  .cursor-ring { display: none; }
}

/* ===== 3. Page Loading Spinner Overlay ===== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}

.page-loader.active {
  opacity: 1;
  visibility: visible;
}

.page-loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: page-loader-spin 0.8s linear infinite;
}

.page-loader-ring {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 2px solid var(--border);
  border-radius: 50%;
  animation: page-loader-pulse 1.2s ease-in-out infinite;
}

@keyframes page-loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes page-loader-pulse {
  0%, 100% { transform: scale(0.85); opacity: 0.4; }
  50% { transform: scale(1); opacity: 0.8; }
}

/* Hide loader on touch devices if needed (optional) */
@media (hover: none), (pointer: coarse) {
  .page-loader { z-index: 1400; }
}

/* ===== 4. Utilities ===== */

/* Accent text — uses Montserrat in an italic/semibold style
   (Autography handwriting font removed). */
.font-hand {
  font-family: var(--font-primary);
  font-style: italic;
  font-weight: 600;
}

/* Gradient text */
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}