/* ========================================
   COINBAX DESIGN SYSTEM
   Brutalist Minimal × Functional Color
   Inspired by: Teenage Engineering, Dieter Rams, BIG
   Updated: October 2025
   ======================================== */

/* ========== CSS RESET ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ========== COLOR SYSTEM ========== */
:root[data-theme="dark"] {
    /* Accent Colors - Functional Use ONLY (2% of design) */
    --accent-orange: #ff5705;          /* Primary action color */
    --accent-blue: #05adff;            /* Complementary - links, info */
    --accent-green: #00ff88;           /* Success, positive indicators */
    --accent-yellow: #ffd905;          /* Warning, highlights */
    --accent-red: #ff0557;             /* Error, urgent */
    --accent-purple: #ad05ff;          /* Triadic accent */
    
    /* Pure Monochrome Scale (98% of design) */
    --pure-white: #ffffff;
    --pure-black: #000000;
    --grey-50: #fafafa;
    --grey-100: #f5f5f5;
    --grey-200: #e8e8e8;
    --grey-300: #d1d1d1;
    --grey-400: #b0b0b0;
    --grey-500: #888888;
    --grey-600: #5a5a5a;
    --grey-700: #3a3a3a;
    --grey-800: #1f1f1f;
    --grey-900: #0f0f0f;
    
    /* Applied Colors - DARK THEME */
    --text-primary: var(--pure-white);
    --text-secondary: var(--grey-400);
    --text-muted: var(--grey-500);
    --background: var(--pure-black);
    --background-elevated: var(--grey-900);
    --background-card: var(--grey-800);
    --background-card-hover: #2a2a2a;
    --border: #2a2a2a;
    --border-subtle: var(--grey-800);
}

:root[data-theme="light"] {
    /* Accent Colors - Functional Use ONLY */
    --accent-orange: #ff5705;          /* Primary action color */
    --accent-blue: #05adff;            /* Complementary - links, info */
    --accent-green: #00ff88;           /* Success, positive indicators */
    --accent-yellow: #ffd905;          /* Warning, highlights */
    --accent-red: #ff0557;             /* Error, urgent */
    --accent-purple: #ad05ff;          /* Triadic accent */
    
    /* Pure Monochrome Scale */
    --pure-white: #ffffff;
    --pure-black: #000000;
    --grey-50: #fafafa;
    --grey-100: #f5f5f5;
    --grey-200: #e8e8e8;
    --grey-300: #d1d1d1;
    --grey-400: #b0b0b0;
    --grey-500: #888888;
    --grey-600: #5a5a5a;
    --grey-700: #3a3a3a;
    --grey-800: #1f1f1f;
    --grey-900: #0f0f0f;
    
    /* Applied Colors - LIGHT THEME */
    --text-primary: var(--pure-black);
    --text-secondary: var(--grey-600);
    --text-muted: var(--grey-500);
    --background: var(--pure-white);
    --background-elevated: var(--grey-50);
    --background-card: var(--grey-100);
    --background-card-hover: var(--grey-200);
    --border: var(--grey-200);
    --border-subtle: var(--grey-100);
}

/* ========== TYPOGRAPHY ========== */
body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Body Text */
p {
    font-family: 'IBM Plex Mono', monospace;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Monospace for Code */
code, pre {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* ========== SPACING SYSTEM ========== */
/* Based on 8px grid */
:root {
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-2xl: 3rem;     /* 48px */
    --space-3xl: 4rem;     /* 64px */
    --space-4xl: 6rem;     /* 96px */
    --space-5xl: 8rem;     /* 128px */
}

/* ========== BUTTON SYSTEM ========== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: #ff5705;
    color: var(--pure-white);
}

.btn-primary:hover {
    background: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 87, 5, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: var(--background);
}

.btn-blue {
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
}

.btn-blue:hover {
    background: var(--accent-blue);
    color: var(--pure-white);
    box-shadow: 0 4px 12px rgba(5, 173, 255, 0.3);
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1rem;
}

.btn-contact {
    padding: 0.75rem 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border-radius: 0;
}

.btn-contact:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--background-elevated);
}

/* ========== DOT SYSTEM ========== */
/* Single dot indicator (inspired by logo) */
.dot-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 50%;
}

.dot-orange {
    background: var(--accent-orange);
}

.dot-blue {
    background: var(--accent-blue);
}

.dot-green {
    background: var(--accent-green);
}

/* Single dot - simple, matches logo style */
.single-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 50%;
}

.list-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-orange);
    border-radius: 50%;
    margin-right: 0.75rem;
}

.list-dot-blue {
    background: var(--accent-blue);
}

.list-dot-green {
    background: var(--accent-green);
}

/* ========== FORM ELEMENTS ========== */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--background);
    border: none;
    border-bottom: 2px solid var(--border);
    border-radius: 0;
    transition: all 0.2s ease;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-bottom-color: var(--text-primary);
    background: var(--background-elevated);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

select option {
    background: var(--background);
    color: var(--text-primary);
    padding: 1rem;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========== CARD SYSTEM ========== */
.card {
    background: var(--background-card);
    border: 1px solid var(--border);
    padding: var(--space-2xl);
    transition: all 0.3s ease;
}

.card:hover {
    background: var(--background-card-hover);
    border-color: var(--text-muted);
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.theme-toggle:hover {
    background: var(--background-card-hover);
    border-color: var(--text-primary);
}

.theme-toggle-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: block;
}

[data-theme="dark"] .theme-toggle-icon {
    background: var(--pure-white);
}

[data-theme="light"] .theme-toggle-icon {
    background: var(--pure-black);
}

/* ========== UTILITY CLASSES ========== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.monospace {
    font-family: 'IBM Plex Mono', monospace;
}

/* ========== IMAGES ========== */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ========== SELECTION ========== */
::selection {
    background: var(--accent-orange);
    color: var(--pure-white);
}

::-moz-selection {
    background: var(--accent-orange);
    color: var(--pure-white);
}

/* ========== SCROLLBAR (Webkit) ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== ACCESSIBILITY ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus states */
*:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 4px;
}

/* ========== PERFORMANCE ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

