/* Roscripters.com - Main Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('variables.css');

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Global link reset - NO underlines anywhere */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global Design Tokens Override - Rstyle */
/* Global Tokens loaded from variables.css */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #0d0d10;
    /* Math Notebook Grid (Wiskunde schrift) */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

/* Subtle background noise/gradient only */
body::before {
    display: none !important;
}

body::after {
    display: none !important;
}

/* Container Refinement */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    /* Desktop padding */
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
        /* Mobile padding */
    }
}

.container-sm {
    max-width: 800px;
}

.container-lg {
    max-width: 1600px;
}

/* Global Card Token */
.card,
.script-card,
.feature-card {
    background: #18191c;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.card:hover,
.script-card:hover,
.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-scripts {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(1, 1fr);
}

/* Center grid when few items - prevents 1 card floating left */
.grid-scripts.grid-centered,
.grid-scripts:has(:only-child),
.grid-scripts:has(:nth-child(1):last-child),
.grid-scripts:has(:nth-child(2):last-child),
.grid-scripts:has(:nth-child(3):last-child) {
    justify-content: center;
}

@media (min-width: 640px) {
    .grid-scripts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-scripts {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .grid-scripts {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

/* Spacing Utilities */
.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mt-2xl {
    margin-top: var(--spacing-2xl);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.py-sm {
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.py-md {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.py-lg {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.py-xl {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.py-2xl {
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
}

.py-3xl {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-accent {
    color: var(--accent);
}

.text-success {
    color: var(--success);
}

.text-error {
    color: var(--error);
}

.text-sm {
    font-size: var(--text-sm);
}

.text-xs {
    font-size: var(--text-xs);
}

.font-medium {
    font-weight: var(--font-medium);
}

.font-semibold {
    font-weight: var(--font-semibold);
}

.font-bold {
    font-weight: var(--font-bold);
}

/* Main Content Area */
.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    padding-bottom: var(--spacing-3xl);
}

/* Page Header */
.page-header {
    padding: var(--spacing-2xl) 0;
    text-align: center;
    background: var(--gradient-hero);
}

.page-header h1 {
    margin-bottom: var(--spacing-sm);
}

.page-header p {
    color: var(--text-secondary);
    font-size: var(--text-lg);
}

/* Section */
.section {
    padding: var(--spacing-2xl) 0;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}

/* Focus Outline */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-fadeIn {
    animation: fadeIn var(--transition-normal) forwards;
}

.animate-slideUp {
    animation: slideUp var(--transition-normal) forwards;
}

.animate-slideDown {
    animation: slideDown var(--transition-normal) forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: var(--text-2xl);
    }

    .page-header {
        padding: var(--spacing-xl) 0;
    }
}