/* Explain: Styles for interactive elements: 3D tilt, cursor glow, and scroll reveal. */
/* ==========================================================
   NexusDirective — interactive depth layer (3D / camo / motion)
   ========================================================== */

/* ---- Camouflage field across the whole site ---- */
html {
    background-color: #090b09;
    background-image:
        radial-gradient(circle at 18% 24%, rgba(44, 58, 34, 0.55) 0 5%, transparent 6%),
        radial-gradient(circle at 62% 12%, rgba(26, 32, 22, 0.75) 0 9%, transparent 10%),
        radial-gradient(circle at 86% 48%, rgba(85, 102, 63, 0.30) 0 6%, transparent 7%),
        radial-gradient(circle at 42% 68%, rgba(44, 58, 34, 0.50) 0 8%, transparent 9%),
        radial-gradient(circle at 8% 86%, rgba(26, 32, 22, 0.70) 0 10%, transparent 11%),
        radial-gradient(circle at 72% 88%, rgba(85, 102, 63, 0.22) 0 5%, transparent 6%),
        radial-gradient(circle at 30% 42%, rgba(58, 58, 42, 0.35) 0 6%, transparent 7%);
    background-size: 540px 540px;
    background-attachment: fixed;
}

body {
    background: transparent;
}

/* ---- Cursor spotlight ---- */
.cursor-glow {
    position: fixed;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(165, 183, 139, 0.07), transparent 62%);
}

/* ---- 3D tilt ---- */
.tilt {
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.3s ease, opacity 0.7s ease, translate 0.7s ease,
        border-color 0.25s ease, box-shadow 0.3s ease;
}

.tilt.is-tilting {
    box-shadow: var(--shadow-deep), 0 0 0 1px rgba(165, 183, 139, 0.28), 0 0 46px -12px var(--glow);
}

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    translate: 0 26px;
    transition: opacity 0.7s ease, translate 0.7s ease, transform 0.3s ease,
        border-color 0.25s ease, box-shadow 0.3s ease;
}

.reveal.is-visible {
    opacity: 1;
    translate: 0 0;
}

/* ---- Glow accents ---- */
.logo {
    box-shadow: 0 0 22px -6px var(--glow);
}

h1,
.dash-title,
.section-heading,
.dash-heading {
    text-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
}

.hero::before {
    animation: ndFloat 13s ease-in-out infinite;
}

@keyframes ndFloat {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(-55%); }
}

/* ---- Button sheen ---- */
.primary-btn {
    position: relative;
    overflow: hidden;
}

.primary-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -130%;
    width: 55%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
    pointer-events: none;
}

.primary-btn:hover::after {
    left: 135%;
}

/* ---- Camo hover wash on cards ---- */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 82% 16%, rgba(85, 102, 63, 0.16) 0 24%, transparent 25%),
        radial-gradient(circle at 14% 88%, rgba(44, 58, 34, 0.20) 0 22%, transparent 23%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

/* ---- Nav + modal motion ---- */
.overlay-link {
    transition: color 0.2s ease, translate 0.25s ease;
}

.overlay-link:hover {
    translate: 8px 0;
}

.nd-modal.open .nd-modal-box {
    animation: modalIn 0.35s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

/* ---- Service-credit controls ---- */
.pts-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.pts-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--green-strong);
    color: var(--green);
    font: 20px var(--font-mono);
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

.pts-btn:hover:not(:disabled) {
    background: var(--green);
    color: var(--ink);
}

.pts-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.pts-control-value {
    min-width: 46px;
    text-align: center;
    font: 800 24px var(--font-heading);
    color: var(--green);
    letter-spacing: 1px;
}

.roster-admin .pts-control {
    margin-top: 0;
    margin-right: auto;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .hero::before { animation: none; }
    .reveal { opacity: 1; translate: 0 0; transition: none; }
    .tilt { transition: none; }
    .primary-btn::after { display: none; }
    .nd-modal.open .nd-modal-box { animation: none; }
}