/*
  Luna Sniper — shared design system.
  Loaded by every page (index, dashboard, success, terms, privacy).
  Page-specific rules live in assets/css/<page>.css, loaded after this file.
*/

:root {
    /* Surfaces */
    --bg-body: #050507;
    --bg-card: rgba(20, 20, 25, 0.7);
    --bg-card-solid: #121216;
    --bg-elevated: rgba(255, 255, 255, 0.04);

    /* Brand */
    --accent-primary: #8b5cf6;
    --accent-primary-hover: #7c3aed;
    --accent-secondary: #ec4899;
    --accent-glow: rgba(139, 92, 246, 0.4);

    /* State */
    --state-success: #10b981;
    --state-success-bg: rgba(16, 185, 129, 0.12);
    --state-success-text: #6ee7b7;
    --state-danger: #ef4444;
    --state-danger-bg: rgba(239, 68, 68, 0.12);
    --state-danger-text: #fca5a5;

    /* Text */
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --text-faint: #6b7280;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.18);

    /* Type */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Radii */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 999px;

    /* Misc */
    --twinkle-duration: 4s;
    --nav-height: 68px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}

a {
    color: inherit;
}

/* ---------- NAVIGATION ---------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 40px;
    z-index: 100;
    backdrop-filter: blur(15px);
    background: rgba(3, 3, 4, 0.7);
    border-bottom: 1px solid var(--border-subtle);
}

nav.nav-sticky {
    position: sticky;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-brand svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nav-brand-text {
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #fff, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.25s ease;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
    box-shadow: 0 0 24px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.08);
}

.btn-danger {
    background: var(--state-danger-bg);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fecaca;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.28);
    border-color: var(--state-danger);
}

.btn-lg {
    padding: 17px 38px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------- CARDS ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 0%), rgba(139, 92, 246, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

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

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-main);
    position: relative;
}

.card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    position: relative;
}

/* ---------- BADGES / PILLS ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-success {
    background: var(--state-success-bg);
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--state-success-text);
}

.badge-accent {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
}

/* ---------- FORM CONTROLS ---------- */
.input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: 0.25s;
}

.input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.input::placeholder {
    color: var(--text-faint);
}

/* ---------- FOOTER ---------- */
footer {
    border-top: 1px solid var(--border-subtle);
    padding: 60px 0 30px 0;
    background: #020203;
    text-align: center;
    position: relative;
    z-index: 2;
}

footer .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

footer .footer-brand svg {
    width: 20px;
    height: 20px;
}

footer .footer-brand-text {
    font-weight: 800;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #fff, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    margin: 22px 0;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.25s;
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-copy {
    color: var(--text-faint);
    font-size: 0.85rem;
}

/* ---------- STARFIELD / ORBS (shared primitives) ---------- */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--twinkle-duration) ease-in-out infinite;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
    animation: float 10s infinite alternate;
}

/* ---------- KEYFRAMES ---------- */
@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, -40px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- LAYOUT HELPERS ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.75rem;
    margin-bottom: 14px;
    font-weight: 700;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.accent-text {
    color: var(--accent-primary);
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    nav {
        padding: 12px 18px;
    }

    .nav-actions {
        gap: 8px;
    }

    .btn:not(.btn-lg) {
        padding: 9px 14px;
        font-size: 0.82rem;
    }

    .container {
        padding: 80px 20px;
    }

    .section-header h2 {
        font-size: 2.1rem;
    }
}

@media (max-width: 480px) {
    .nav-brand-text {
        font-size: 1.05rem;
    }

    .nav-link-secondary {
        display: none;
    }
}
