/*
 * E-BLISS LLC - Base CSS
 * Foundation styles: reset, variables, typography
 *
 * Design tokens are derived from libs/ui/ (the Studio design system).
 * Do NOT hand-edit color/spacing/type values — update libs/ui/ and
 * run: make -C libs/ui tokens
 */

/* ========================================================================
   Design Tokens (auto-generated from libs/ui/)
   ======================================================================== */

@import url('tokens.css');

/* ========================================================================
   Reset
   ======================================================================== */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
}

main {
    overflow-y: auto;
}

/* ========================================================================
   Typography
   ======================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
}

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

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--color-bg-surface);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 3px;
}

/* ========================================================================
   Utility Classes
   ======================================================================== */

.text-muted { color: var(--color-text-muted); }
.text-subtle { color: var(--color-text-subtle); }
.text-accent { color: var(--color-accent); }
.text-error { color: var(--color-error); }
.text-success { color: var(--color-success); }

.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; letter-spacing: var(--letter-spacing-wide); }

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

/* ========================================================================
   Layout Utilities
   ======================================================================== */

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

.container-wide {
    max-width: var(--max-width-wide);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ========================================================================
   Spacing Utilities
   ======================================================================== */

.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); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.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); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.gap-xl { gap: var(--space-xl); }

/* ========================================================================
   Display Utilities
   ======================================================================== */

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.w-full { width: 100%; }

/* ========================================================================
   Accessibility Utilities
   ======================================================================== */

.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;
}
