/* Boxy Parametric Dieline Studio — Shared Custom Styles */

:root {
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html {
    scroll-behavior: smooth;
}

html, body {
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: transparent;
}

.font-mono-num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* Architectural Drafting Dot-Grid Backdrop */
.cad-backdrop {
    background-color: #f1f5f9;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
}

.dark .cad-backdrop {
    background-color: #090e1a;
    background-image: radial-gradient(#1e293b 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Precision Range Sliders */
.boxy-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dark .boxy-range {
    background: #334155;
}

.boxy-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4f46e5;
    border: 2.5px solid #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.dark .boxy-range::-webkit-slider-thumb {
    border-color: #0f172a;
    background: #6366f1;
}

.boxy-range::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.45);
}

.boxy-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4f46e5;
    border: 2.5px solid #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
    cursor: pointer;
}

@media (max-width: 1023px) {
    .boxy-range {
        height: 8px;
    }
    .boxy-range::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    .boxy-range::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
}

/* Number Input Chrome Cleanup (keep clean compact look while allowing arrow keys) */
.boxy-num-input::-webkit-inner-spin-button,
.boxy-num-input::-webkit-outer-spin-button {
    opacity: 0.45;
    margin-left: 2px;
}

.boxy-num-input:focus {
    outline: none;
}

/* Custom Subtle Scrollbar */
.boxy-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.boxy-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.boxy-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
}

.boxy-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

/* Safe area padding for mobile bottom bar */
.safe-bottom {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Alpine cloak */
[x-cloak] {
    display: none !important;
}

/* Catalog card micro-interactions */
.style-card {
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.style-card:hover {
    transform: translateY(-4px);
}

.style-card:hover .card-svg {
    transform: scale(1.06);
}

.card-svg {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Landing Page Architectural Hero Backdrop */
.hero-cad-surface {
    background-color: #f8fafc;
    background-image:
        radial-gradient(ellipse 70% 55% at 78% 28%, rgba(99, 102, 241, 0.13), transparent 70%),
        radial-gradient(ellipse 55% 45% at 15% 85%, rgba(16, 185, 129, 0.08), transparent 65%),
        linear-gradient(to right, rgba(148, 163, 184, 0.13) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.13) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
}

.dark .hero-cad-surface {
    background-color: #060a14;
    background-image:
        radial-gradient(ellipse 70% 55% at 78% 28%, rgba(99, 102, 241, 0.22), transparent 70%),
        radial-gradient(ellipse 55% 45% at 15% 85%, rgba(16, 185, 129, 0.10), transparent 65%),
        linear-gradient(to right, rgba(30, 41, 59, 0.45) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(30, 41, 59, 0.45) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
}
