/* ============================================
   CAMINO AI - BAUHAUS DESIGN SYSTEM
   Bold. Minimal. Geometric.
   ============================================ */

/* ----------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------- */

:root {
    /* Primary Bauhaus Palette */
    --red: #D32F2F;
    --yellow: #FBC02D;
    --blue: #1976D2;
    --black: #121212;
    --white: #FAFAFA;
    --cream: #F5F0E6;

    /* Semantic Colors */
    --text-primary: #121212;
    --text-secondary: #424242;
    --text-muted: #757575;
    --text-inverse: #FAFAFA;

    --bg-primary: #F5F0E6;
    --bg-secondary: #FAFAFA;
    --bg-inverse: #121212;

    --border-color: #121212;
    --border-light: #E0E0E0;

    /* Feedback Colors */
    --success: #2E7D32;
    --error: #C62828;
    --warning: #F9A825;
    --info: #1565C0;

    /* Typography */
    --font-primary: 'DM Sans', 'Futura', 'Century Gothic', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    --text-6xl: 5rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Shadows (hard, offset - Bauhaus style) */
    --shadow-sm: 2px 2px 0 var(--black);
    --shadow-md: 4px 4px 0 var(--black);
    --shadow-lg: 6px 6px 0 var(--black);
    --shadow-red: 4px 4px 0 var(--red);
    --shadow-blue: 4px 4px 0 var(--blue);
    --shadow-yellow: 4px 4px 0 var(--yellow);

    /* Borders */
    --border-thin: 2px solid var(--black);
    --border-medium: 3px solid var(--black);
    --border-thick: 4px solid var(--black);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;

    /* Layout */
    --max-width: 1400px;
    --nav-height: 68px;
}

/* ----------------------------------------
   2. RESET & BASE
   ---------------------------------------- */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

img, video, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ----------------------------------------
   3. TYPOGRAPHY
   ---------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

.label {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.mono {
    font-family: var(--font-mono);
}

/* ----------------------------------------
   4. LAYOUT
   ---------------------------------------- */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-sm { max-width: 800px; }
.container-lg { max-width: 1600px; }

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Split layouts */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.split-reverse {
    display: grid;
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}
.split-reverse > * {
    direction: ltr;
}

/* Flex 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-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ----------------------------------------
   5. SECTIONS
   ---------------------------------------- */

.section {
    padding: var(--space-xl) 0;
}

.section-sm { padding: var(--space-lg) 0; }
.section-lg { padding: calc(var(--space-xl) * 1.5) 0; }

/* Section backgrounds */
.section-cream { background: var(--cream); }
.section-white { background: var(--white); }
.section-black { background: var(--black); color: var(--white); }
.section-red { background: var(--red); color: var(--white); }
.section-blue { background: var(--blue); color: var(--white); }
.section-yellow { background: var(--yellow); color: var(--black); }

/* Section borders */
.section-border-top { border-top: var(--border-thick); }
.section-border-bottom { border-bottom: var(--border-thick); }
.section-border-yellow { border-color: var(--yellow); }
.section-border-red { border-color: var(--red); }

/* ----------------------------------------
   6. NAVIGATION
   ---------------------------------------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--black);
    border-bottom: 4px solid var(--yellow);
    height: var(--nav-height);
}

.nav-inner {
    max-width: var(--max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--white);
    text-decoration: none;
}

.nav-logo-mark {
    width: 40px;
    height: 40px;
    background: var(--red);
    position: relative;
}

/* Downward chevron */
.nav-logo-mark::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 18px;
    height: 18px;
    border-bottom: 4px solid var(--white);
    border-right: 4px solid var(--white);
}

/* Circle/dot in the chevron wings */
.nav-logo-mark::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--white);
    border-radius: 50%;
}

.nav-logo-text {
    font-size: var(--text-2xl);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.nav-link {
    color: var(--white);
    font-weight: 700;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--yellow);
}

/* Mobile nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: var(--text-xl);
    padding: var(--space-xs);
}

/* ----------------------------------------
   7. BUTTONS
   ---------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
    transform: translate(-2px, -2px);
}

.btn:active {
    transform: translate(0, 0);
}

/* Button variants */
.btn-primary {
    background: var(--yellow);
    color: var(--black);
    border-color: var(--black);
    box-shadow: var(--shadow-md);
}
.btn-primary:hover {
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--black);
    border-color: var(--black);
}
.btn-secondary:hover {
    background: var(--black);
    color: var(--white);
}

.btn-dark {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
    box-shadow: var(--shadow-red);
}
.btn-dark:hover {
    box-shadow: 6px 6px 0 var(--red);
}

.btn-white {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.btn-ghost:hover {
    background: var(--white);
    color: var(--black);
}

/* Button sizes */
.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: calc(var(--space-sm) * 1.25) calc(var(--space-md) * 1.25);
    font-size: var(--text-base);
}

/* ----------------------------------------
   8. CARDS
   ---------------------------------------- */

.card {
    background: var(--white);
    border: var(--border-medium);
    padding: var(--space-md);
}

.card-shadow {
    box-shadow: var(--shadow-md);
}

.card-hover {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card-hover:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-lg);
}

/* Card variants */
.card-yellow { background: var(--yellow); }
.card-red { background: var(--red); color: var(--white); }
.card-blue { background: var(--blue); color: var(--white); }
.card-black { background: var(--black); color: var(--white); }

.card-header {
    font-size: var(--text-xl);
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

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

/* ----------------------------------------
   9. FORMS
   ---------------------------------------- */

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-sm);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    background: var(--white);
    border: var(--border-medium);
    transition: box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    box-shadow: var(--shadow-sm);
}

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

.form-hint {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: var(--text-sm);
    color: var(--error);
    margin-top: var(--space-xs);
}

/* ----------------------------------------
   10. TABLES
   ---------------------------------------- */

.table {
    width: 100%;
    border-collapse: collapse;
    border: var(--border-medium);
}

.table th,
.table td {
    padding: var(--space-sm);
    text-align: left;
    border-bottom: 2px solid var(--black);
}

.table th {
    font-weight: 900;
    text-transform: uppercase;
    font-size: var(--text-sm);
    letter-spacing: 0.05em;
    background: var(--black);
    color: var(--white);
}

.table tr:last-child td {
    border-bottom: none;
}

.table-striped tr:nth-child(even) {
    background: var(--cream);
}

/* ----------------------------------------
   11. CODE
   ---------------------------------------- */

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--cream);
    padding: 0.2em 0.4em;
    border: 1px solid var(--border-light);
}

pre,
.code-block {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: var(--space-md);
    overflow-x: auto;
    border-left: 4px solid var(--yellow);
    margin: var(--space-md) 0;
}

pre code,
.code-block code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
    white-space: pre;
}

/* Syntax highlighting */
.code-comment { color: #6A9955; }
.code-string { color: #CE9178; }
.code-keyword { color: #569CD6; }
.code-property { color: #9CDCFE; }
.code-number { color: #B5CEA8; }

/* ----------------------------------------
   12. FOOTER
   ---------------------------------------- */

.footer {
    background: var(--black);
    color: var(--white);
    padding: var(--space-lg) 0;
    border-top: 8px solid var(--yellow);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
}

.footer-brand p {
    opacity: 0.7;
    margin-top: var(--space-sm);
    max-width: 300px;
}

.footer-col h4 {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-sm);
    color: var(--yellow);
}

.footer-col a {
    display: block;
    padding: var(--space-xs) 0;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.footer-col a:hover {
    opacity: 1;
}

.footer-bottom {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    opacity: 0.6;
}

/* ----------------------------------------
   13. GEOMETRIC SHAPES
   ---------------------------------------- */

.shape {
    position: absolute;
    pointer-events: none;
}

.shape-circle {
    border-radius: 50%;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 87px solid currentColor;
}

.shape-red { background: var(--red); color: var(--red); }
.shape-yellow { background: var(--yellow); color: var(--yellow); }
.shape-blue { background: var(--blue); color: var(--blue); }
.shape-black { background: var(--black); color: var(--black); }
.shape-white { background: var(--white); color: var(--white); }

/* ----------------------------------------
   14. UTILITIES
   ---------------------------------------- */

/* Spacing */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.pt-xs { padding-top: var(--space-xs); }
.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }

.pb-xs { padding-bottom: var(--space-xs); }
.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }

/* Text */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--white); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-blue { color: var(--blue); }

.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* Width */
.w-full { width: 100%; }
.max-w-sm { max-width: 400px; }
.max-w-md { max-width: 600px; }
.max-w-lg { max-width: 800px; }

/* Borders */
.border { border: var(--border-medium); }
.border-t { border-top: var(--border-medium); }
.border-b { border-bottom: var(--border-medium); }
.border-l { border-left: var(--border-medium); }
.border-r { border-right: var(--border-medium); }

/* Background */
.bg-cream { background: var(--cream); }
.bg-white { background: var(--white); }
.bg-black { background: var(--black); }
.bg-red { background: var(--red); }
.bg-yellow { background: var(--yellow); }
.bg-blue { background: var(--blue); }

/* ----------------------------------------
   15. RESPONSIVE
   ---------------------------------------- */

@media (max-width: 1024px) {
    :root {
        --text-5xl: 3rem;
        --text-6xl: 4rem;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .split {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 4rem;
        --text-4xl: 2rem;
        --text-5xl: 2.5rem;
    }

    h1 { font-size: var(--text-4xl); }
    h2 { font-size: var(--text-3xl); }

    .container {
        padding: 0 var(--space-sm);
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}

/* ----------------------------------------
   16. PRINT
   ---------------------------------------- */

@media print {
    .nav, .footer, .btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        padding: 1rem 0;
    }
}
