/* ═══════════════════════════════════════════════════════
   GLOBAL & UTILITY VARIABLES
═══════════════════════════════════════════════════════ */
:root {
    --brand-primary: #5B50F0;
    --brand-secondary: #A855F7;
    --brand-accent: #F4B740;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-padding-top: 80px;
}

body {
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
}

h1, h2, h3, h4, h5, .font-display {
    font-family: 'Sora', sans-serif;
}

a, button {
    touch-action: manipulation;
}

.tap-active:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* ═══════════════════════════════════════════════════════
   CUSTOM DESIGN ELEMENTS
═══════════════════════════════════════════════════════ */
.grad-text {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ambient-glow {
    background: radial-gradient(circle at top right, rgba(91, 80, 240, 0.08), transparent 40%),
                radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.05), transparent 40%);
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Notebook Cards (from homepage) */
.notebook-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1.5rem;
}

@media(hover: hover) {
    .notebook-card:hover {
        transform: translateY(-4px);
        background-color: rgba(248, 250, 252, 0.8);
        border-color: rgba(91, 80, 240, 0.4);
        box-shadow: 0 20px 40px -10px rgba(91, 80, 240, 0.15);
    }
}

/* Scroll Animations */
@media(prefers-reduced-motion: no-preference) {
    .animate-on-scroll {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    .animate-on-scroll.in-view {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Compact adjustments */
@media(max-width: 639px) {
    .mobile-card-compact {
        padding: 1rem !important;
        gap: 0.75rem !important;
    }
    .mobile-card-compact h3 {
        font-size: 0.85rem !important;
    }
    .mobile-card-compact p {
        font-size: 0.75rem !important;
    }
    .mobile-card-compact .card-cta {
        font-size: 0.7rem !important;
        padding-top: 0.5rem !important;
    }
}

/* Feature Detailed Cards for Tools Page */
.tool-detail-card {
    border-radius: 2rem;
    transition: all 0.4s ease;
}
@media(hover: hover) {
    .tool-detail-card:hover {
        border-color: rgba(91, 80, 240, 0.3);
        box-shadow: 0 25px 50px -12px rgba(91, 80, 240, 0.1);
    }
}